From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 00:14:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 222D3106566C; Sun, 10 Jan 2010 00:14:05 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 105DC8FC0A; Sun, 10 Jan 2010 00:14:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A0E45t058318; Sun, 10 Jan 2010 00:14:04 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A0E4xv058316; Sun, 10 Jan 2010 00:14:04 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001100014.o0A0E4xv058316@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 10 Jan 2010 00:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201966 - head/sys/boot/ia64/efi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 00:14:05 -0000 Author: marcel Date: Sun Jan 10 00:14:04 2010 New Revision: 201966 URL: http://svn.freebsd.org/changeset/base/201966 Log: Remove debugging printf(). There's no need to print the image base address anymore. Modified: head/sys/boot/ia64/efi/main.c Modified: head/sys/boot/ia64/efi/main.c ============================================================================== --- head/sys/boot/ia64/efi/main.c Sun Jan 10 00:08:26 2010 (r201965) +++ head/sys/boot/ia64/efi/main.c Sun Jan 10 00:14:04 2010 (r201966) @@ -127,8 +127,6 @@ main(int argc, CHAR16 *argv[]) /* Get our loaded image protocol interface structure. */ BS->HandleProtocol(IH, &imgid, (VOID**)&img); - printf("Image base: 0x%016lx\n", (u_long)img->ImageBase); - printf("\n"); printf("%s, Revision %s\n", bootprog_name, bootprog_rev); printf("(%s, %s)\n", bootprog_maker, bootprog_date); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 03:46:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4725E106566C; Sun, 10 Jan 2010 03:46:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35DFC8FC08; Sun, 10 Jan 2010 03:46:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A3k9rn005661; Sun, 10 Jan 2010 03:46:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A3k9a9005660; Sun, 10 Jan 2010 03:46:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100346.o0A3k9a9005660@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 03:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201972 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 03:46:09 -0000 Author: imp Date: Sun Jan 10 03:46:08 2010 New Revision: 201972 URL: http://svn.freebsd.org/changeset/base/201972 Log: Merge from projects/mips to head by hand: special ld script for 64-bit octeon link. Added: - copied unchanged from r201971, projects/mips/sys/conf/ldscript.mips.octeon1.64 Directory Properties: head/sys/conf/ldscript.mips.octeon1.64 (props changed) Copied: head/sys/conf/ldscript.mips.octeon1.64 (from r201971, projects/mips/sys/conf/ldscript.mips.octeon1.64) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/ldscript.mips.octeon1.64 Sun Jan 10 03:46:08 2010 (r201972, copy of r201971, projects/mips/sys/conf/ldscript.mips.octeon1.64) @@ -0,0 +1,61 @@ +TARGET(elf64-tradbigmips) +OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips", "elf64-tradlittlemips") +OUTPUT_ARCH(mips) +ENTRY(_start) +/* __DYNAMIC = 0; +PROVIDE (_DYNAMIC = 0); +*/ +PHDRS { + text PT_LOAD FLAGS ( 5 ) ; +} + +SECTIONS { + + .text _start : { + *(.text) + /*(.dynamic)*/ + etext = .; + _etext = .; + . = ALIGN(0x2000); + } : text + + .rodata ALIGN(0x2000) : { + _fdata = .; + *(.rodata) + . = ALIGN(32); + } + + .data . : { + _rwdata = .; + *(.data) + . = ALIGN(32); + CONSTRUCTORS; + } + + _gp = (. + 0x8000); + + .sdata . : { + _small_start = .; + *(.sdata) + . = ALIGN(32); + edata = .; + _edata = .; + } + + .sbss . : { + __bss_start = .; + _fbss = .; + *(.sbss) *(.scommon) + _small_end = .; + . = ALIGN(32); + } + + .bss . : { + *(.bss) + *(COMMON) + . = ALIGN(32); + _end = .; + end = .; + } + +} From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 03:47:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 012B01065692; Sun, 10 Jan 2010 03:47:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF2FE8FC14; Sun, 10 Jan 2010 03:47:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A3lC57005936; Sun, 10 Jan 2010 03:47:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A3lCv9005935; Sun, 10 Jan 2010 03:47:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100347.o0A3lCv9005935@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 03:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201973 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 03:47:13 -0000 Author: imp Date: Sun Jan 10 03:47:12 2010 New Revision: 201973 URL: http://svn.freebsd.org/changeset/base/201973 Log: Merge from projects/mips to head by hand: mips64 ld script for the kernel. Added: - copied unchanged from r201972, projects/mips/sys/conf/ldscript.mips.mips64 Directory Properties: head/sys/conf/ldscript.mips.mips64 (props changed) Copied: head/sys/conf/ldscript.mips.mips64 (from r201972, projects/mips/sys/conf/ldscript.mips.mips64) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/ldscript.mips.mips64 Sun Jan 10 03:47:12 2010 (r201973, copy of r201972, projects/mips/sys/conf/ldscript.mips.mips64) @@ -0,0 +1,303 @@ +/*- + * Copyright (c) 2001, 2004, 2008, Juniper Networks, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Juniper Networks, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY JUNIPER NETWORKS 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 JUNIPER NETWORKS 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. + * + * JNPR: ldscript.mips,v 1.3 2006/10/11 06:12:04 + * $FreeBSD: projects/mips/sys/conf/ldscript.mips 191079 2009-04-14 22:53:22Z gonzo $ + */ + +OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips", + "elf64-tradlittlemips") + +OUTPUT_ARCH(mips) +ENTRY(_start) +SEARCH_DIR(/usr/lib); +/* Do we need any of these for elf? + __DYNAMIC = 0; +PROVIDE (_DYNAMIC = 0); +*/ +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = KERNLOADADDR + SIZEOF_HEADERS; + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.text : + { + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t.*) + } + .rela.text : + { + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t.*) + } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.rodata : + { + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r.*) + } + .rela.rodata : + { + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r.*) + } + .rel.data : + { + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d.*) + } + .rela.data : + { + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d.*) + } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.sdata : + { + *(.rel.sdata) + *(.rel.sdata.*) + *(.rel.gnu.linkonce.s.*) + } + .rela.sdata : + { + *(.rela.sdata) + *(.rela.sdata.*) + *(.rela.gnu.linkonce.s.*) + } + .rel.sbss : + { + *(.rel.sbss) + *(.rel.sbss.*) + *(.rel.gnu.linkonce.sb.*) + } + .rela.sbss : + { + *(.rela.sbss) + *(.rela.sbss.*) + *(.rel.gnu.linkonce.sb.*) + } + .rel.sdata2 : + { + *(.rel.sdata2) + *(.rel.sdata2.*) + *(.rel.gnu.linkonce.s2.*) + } + .rela.sdata2 : + { + *(.rela.sdata2) + *(.rela.sdata2.*) + *(.rela.gnu.linkonce.s2.*) + } + .rel.sbss2 : + { + *(.rel.sbss2) + *(.rel.sbss2.*) + *(.rel.gnu.linkonce.sb2.*) + } + .rela.sbss2 : + { + *(.rela.sbss2) + *(.rela.sbss2.*) + *(.rela.gnu.linkonce.sb2.*) + } + .rel.bss : + { + *(.rel.bss) + *(.rel.bss.*) + *(.rel.gnu.linkonce.b.*) + } + .rela.bss : + { + *(.rela.bss) + *(.rela.bss.*) + *(.rela.gnu.linkonce.b.*) + } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .init : + { + KEEP (*(.init)) + } =0x1000000 + .text : + { + *(.trap) + *(.text) + *(.text.*) + *(.stub) + /* .gnu.warning sections are handled specially by elf64.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t.*) + } =0x1000000 + .fini : + { + KEEP (*(.fini)) + } =0x1000000 + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .reginfo : { *(.reginfo) } + .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) } + .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) } + . = ALIGN(0x2000) + (. & (0x2000 - 1)); + .data : + { + *(.data) + *(.data.*) + *(.gnu.linkonce.d.*) + SORT(CONSTRUCTORS) + } + .data1 : { *(.data1) } + .eh_frame : { KEEP (*(.eh_frame)) } + .gcc_except_table : { *(.gcc_except_table) } + .ctors : + { + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + KEEP (*crtbegin.o(.ctors)) + /* We don't want to include the .ctor section from + from the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + } + .plt : { *(.plt) } + _gp = ALIGN(16) + 0x7ff0; + .got : { *(.got.plt) *(.got) } + .dynamic : { *(.dynamic) } + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : + { + *(.sdata) + *(.sdata.*) + *(.gnu.linkonce.s.*) + } + _edata = .; + PROVIDE (edata = .); + __bss_start = .; + .sbss : + { + PROVIDE (__sbss_start = .); + PROVIDE (___sbss_start = .); + *(.dynsbss) + *(.sbss) + *(.sbss.*) + *(.gnu.linkonce.sb.*) + *(.scommon) + PROVIDE (__sbss_end = .); + PROVIDE (___sbss_end = .); + } + .bss : + { + *(.dynbss) + *(.bss) + *(.bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. */ + . = ALIGN(64 / 8); + } + . = ALIGN(64 / 8); + _end = .; + PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* These must appear regardless of . */ +} From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 04:48:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9372D106566B; Sun, 10 Jan 2010 04:48:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82D638FC08; Sun, 10 Jan 2010 04:48:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A4mQmX019291; Sun, 10 Jan 2010 04:48:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A4mQXf019290; Sun, 10 Jan 2010 04:48:26 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100448.o0A4mQXf019290@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 04:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201974 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 04:48:26 -0000 Author: imp Date: Sun Jan 10 04:48:26 2010 New Revision: 201974 URL: http://svn.freebsd.org/changeset/base/201974 Log: Merge from projects/mips to head by hand: Special linker file for octeon1 in pseudo-32-bit mode. Added: - copied unchanged from r201973, projects/mips/sys/conf/ldscript.mips.octeon1.32 Directory Properties: head/sys/conf/ldscript.mips.octeon1.32 (props changed) Copied: head/sys/conf/ldscript.mips.octeon1.32 (from r201973, projects/mips/sys/conf/ldscript.mips.octeon1.32) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/ldscript.mips.octeon1.32 Sun Jan 10 04:48:26 2010 (r201974, copy of r201973, projects/mips/sys/conf/ldscript.mips.octeon1.32) @@ -0,0 +1,58 @@ +/* + * This product includes software developed by the University of + * California, Berkeley and its contributors." +*/ +OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips") +OUTPUT_ARCH(mips) +ENTRY(_start) + +SECTIONS { + . = KERNLOADADDR + SIZEOF_HEADERS; + .text . : { + *(.text) + *(.dynamic) + etext = .; + _etext = .; + . = ALIGN(0x2000); + } + + .rodata ALIGN(0x2000) : { + _fdata = .; + *(.rodata) + . = ALIGN(32); + } + + .data . : { + _rwdata = .; + *(.data) + . = ALIGN(32); + CONSTRUCTORS; + } + + _gp = (. + 0x8000); + + .sdata . : { + _small_start = .; + *(.sdata) + . = ALIGN(32); + edata = .; + _edata = .; + } + + .sbss . : { + __bss_start = .; + _fbss = .; + *(.sbss) *(.scommon) + _small_end = .; + . = ALIGN(32); + } + + .bss . : { + *(.bss) + *(COMMON) + . = ALIGN(32); + _end = .; + end = .; + } + +} From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 04:49:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61E331065695; Sun, 10 Jan 2010 04:49:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51A978FC16; Sun, 10 Jan 2010 04:49:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A4nDMT019523; Sun, 10 Jan 2010 04:49:13 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A4nDYJ019522; Sun, 10 Jan 2010 04:49:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100449.o0A4nDYJ019522@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 04:49:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201975 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 04:49:13 -0000 Author: imp Date: Sun Jan 10 04:49:13 2010 New Revision: 201975 URL: http://svn.freebsd.org/changeset/base/201975 Log: Merge from projects/mips to head by hand: loader script for octeon1 in n32 abi mode. Added: - copied unchanged from r201974, projects/mips/sys/conf/ldscript.mips.octeon1.n32 Directory Properties: head/sys/conf/ldscript.mips.octeon1.n32 (props changed) Copied: head/sys/conf/ldscript.mips.octeon1.n32 (from r201974, projects/mips/sys/conf/ldscript.mips.octeon1.n32) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/ldscript.mips.octeon1.n32 Sun Jan 10 04:49:13 2010 (r201975, copy of r201974, projects/mips/sys/conf/ldscript.mips.octeon1.n32) @@ -0,0 +1,57 @@ +TARGET(elf32-ntradbigmips) +OUTPUT_FORMAT("elf32-ntradbigmips", "elf32-ntradbigmips", "elf32-ntradlittlemips") +OUTPUT_ARCH(mips) +ENTRY(_start) + __DYNAMIC = 0; +PROVIDE (_DYNAMIC = 0); + +SECTIONS { + + .text . : { + *(.text) + *(.dynamic) + etext = .; + _etext = .; + . = ALIGN(0x2000); + } + + .rodata ALIGN(0x2000) : { + _fdata = .; + *(.rodata) + . = ALIGN(32); + } + + .data . : { + _rwdata = .; + *(.data) + . = ALIGN(32); + CONSTRUCTORS; + } + + _gp = (. + 0x8000); + + .sdata . : { + _small_start = .; + *(.sdata) + . = ALIGN(32); + edata = .; + _edata = .; + } + + .sbss . : { + __bss_start = .; + _fbss = .; + *(.sbss) *(.scommon) + _small_end = .; + . = ALIGN(32); + } + + .bss . : { + *(.bss) + *(COMMON) + . = ALIGN(32); + _end = .; + end = .; + } + +} From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 05:01:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C97D106566C; Sun, 10 Jan 2010 05:01:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 625A38FC0A; Sun, 10 Jan 2010 05:01:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A51lGA022306; Sun, 10 Jan 2010 05:01:47 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A51lkH022305; Sun, 10 Jan 2010 05:01:47 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100501.o0A51lkH022305@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 05:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201976 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 05:01:47 -0000 Author: imp Date: Sun Jan 10 05:01:47 2010 New Revision: 201976 URL: http://svn.freebsd.org/changeset/base/201976 Log: Merge from projects/mips to head by hand: Placeholder for ptrace machine specific stuff... This will likely be used to report CP2 or CP3 registers on those CPUs that have them... Added: - copied unchanged from r201975, projects/mips/sys/mips/mips/ptrace_machdep.c Directory Properties: head/sys/mips/mips/ptrace_machdep.c (props changed) Copied: head/sys/mips/mips/ptrace_machdep.c (from r201975, projects/mips/sys/mips/mips/ptrace_machdep.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/mips/ptrace_machdep.c Sun Jan 10 05:01:47 2010 (r201976, copy of r201975, projects/mips/sys/mips/mips/ptrace_machdep.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2009 M. Warner Losh. + * 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. + * + */ + +#if 0 +#include +__FBSDID("$FreeBSD$"); + +/* + * This file is a place holder for MIPS. Some models of MIPS may need special + * functions here, but for now nothing is needed. The MI parts of ptrace + * suffice. + */ +#endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 05:05:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DF90106566C; Sun, 10 Jan 2010 05:05:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 747428FC0C; Sun, 10 Jan 2010 05:05:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A55XUX023161; Sun, 10 Jan 2010 05:05:33 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A55XWD023160; Sun, 10 Jan 2010 05:05:33 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100505.o0A55XWD023160@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 05:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201977 - head/sys/mips/sentry5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 05:05:33 -0000 Author: imp Date: Sun Jan 10 05:05:33 2010 New Revision: 201977 URL: http://svn.freebsd.org/changeset/base/201977 Log: These files have been moved on the branch. Delete them here before copying them from the branch. Deleted: head/sys/mips/sentry5/siba_cc.c head/sys/mips/sentry5/siba_mips.c head/sys/mips/sentry5/siba_sdram.c From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 05:07:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 280CB106568F; Sun, 10 Jan 2010 05:07:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2B5C8FC08; Sun, 10 Jan 2010 05:07:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A57TXH023628; Sun, 10 Jan 2010 05:07:29 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A57TMb023627; Sun, 10 Jan 2010 05:07:29 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100507.o0A57TMb023627@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 05:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201978 - head/sys/dev/siba/siba X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 05:07:30 -0000 Author: imp Date: Sun Jan 10 05:07:29 2010 New Revision: 201978 URL: http://svn.freebsd.org/changeset/base/201978 Log: Merge from projects/mips to head by hand: Merge the siba bus device. This was moved from mips to dev because siba bus can be in other architectures, like ARM. Added: - copied from r201977, projects/mips/sys/dev/siba/ Directory Properties: head/sys/dev/siba/siba/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 05:11:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA446106566C; Sun, 10 Jan 2010 05:11:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0B298FC25; Sun, 10 Jan 2010 05:11:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A5BRTw024524; Sun, 10 Jan 2010 05:11:27 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A5BRRk024523; Sun, 10 Jan 2010 05:11:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100511.o0A5BRRk024523@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 05:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201979 - head/sys/mips/rmi/dev X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 05:11:28 -0000 Author: imp Date: Sun Jan 10 05:11:27 2010 New Revision: 201979 URL: http://svn.freebsd.org/changeset/base/201979 Log: Merge from projects/mips to head by hand: Copy sys/dev/rmi to sys/mips/rmi/dev [sic]. For devices that are on only one SoC, or family of SoC, we place them under sys//dev. I'll fix the build problems this causes as best I can since rmi kernel require external toolchains due to lack of support for rmi op-codes in the ancient binutils we have in the tree. Added: - copied from r201978, projects/mips/sys/dev/rmi/ Directory Properties: head/sys/mips/rmi/dev/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 05:15:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0C93106566C; Sun, 10 Jan 2010 05:15:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF1FC8FC0A; Sun, 10 Jan 2010 05:15:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A5FkOd025570; Sun, 10 Jan 2010 05:15:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A5Fk7N025568; Sun, 10 Jan 2010 05:15:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100515.o0A5Fk7N025568@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 05:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201981 - head/sys/dev/flash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 05:15:46 -0000 Author: imp Date: Sun Jan 10 05:15:46 2010 New Revision: 201981 URL: http://svn.freebsd.org/changeset/base/201981 Log: Merge from projects/mips to head by hand: Merge support for MX25L spi flash. Added: - copied unchanged from r201980, projects/mips/sys/dev/flash/mx25l.c Directory Properties: head/sys/dev/flash/mx25l.c (props changed) Copied: head/sys/dev/flash/mx25l.c (from r201980, projects/mips/sys/dev/flash/mx25l.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/flash/mx25l.c Sun Jan 10 05:15:46 2010 (r201981, copy of r201980, projects/mips/sys/dev/flash/mx25l.c) @@ -0,0 +1,479 @@ +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2009 Oleksandr Tymoshenko. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "spibus_if.h" + +#include + +struct mx25l_flash_ident +{ + const char *name; + uint8_t manufacturer_id; + uint16_t device_id; + unsigned int sectorsize; + unsigned int sectorcount; +}; + +struct mx25l_softc +{ + device_t sc_dev; + uint8_t sc_manufacturer_id; + uint16_t sc_device_id; + unsigned int sc_sectorsize; + struct mtx sc_mtx; + struct disk *sc_disk; + struct proc *sc_p; + struct bio_queue_head sc_bio_queue; +}; + +#define M25PXX_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define M25PXX_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define M25PXX_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ + "mx25l", MTX_DEF) +#define M25PXX_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); +#define M25PXX_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); +#define M25PXX_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); + +/* disk routines */ +static int mx25l_open(struct disk *dp); +static int mx25l_close(struct disk *dp); +static int mx25l_ioctl(struct disk *, u_long, void *, int, struct thread *); +static void mx25l_strategy(struct bio *bp); +static void mx25l_task(void *arg); + +struct mx25l_flash_ident flash_devices[] = { + { "mx25ll32", 0xc2, 0x2016, 64 * 1024, 64 }, + { "mx25ll64", 0xc2, 0x2017, 64 * 1024, 128 }, + { "mx25ll128", 0xc2, 0x2018, 64 * 1024, 256 }, + { "s25fl128", 0x01, 0x2018, 64 * 1024, 256 }, +}; + +static uint8_t +mx25l_get_status(device_t dev) +{ + uint8_t txBuf[2], rxBuf[2]; + struct spi_command cmd; + int err; + + memset(&cmd, 0, sizeof(cmd)); + memset(txBuf, 0, sizeof(txBuf)); + memset(rxBuf, 0, sizeof(rxBuf)); + + txBuf[0] = CMD_READ_STATUS; + cmd.tx_cmd = txBuf; + cmd.rx_cmd = rxBuf; + cmd.rx_cmd_sz = 2; + cmd.tx_cmd_sz = 2; + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); + return (rxBuf[1]); +} + +static void +mx25l_wait_for_device_ready(device_t dev) +{ + while ((mx25l_get_status(dev) & STATUS_WIP)) + continue; +} + +static struct mx25l_flash_ident* +mx25l_get_device_ident(struct mx25l_softc *sc) +{ + device_t dev = sc->sc_dev; + uint8_t txBuf[8], rxBuf[8]; + struct spi_command cmd; + uint8_t manufacturer_id; + uint16_t dev_id; + int err, i; + + memset(&cmd, 0, sizeof(cmd)); + memset(txBuf, 0, sizeof(txBuf)); + memset(rxBuf, 0, sizeof(rxBuf)); + + txBuf[0] = CMD_READ_IDENT; + cmd.tx_cmd = &txBuf; + cmd.rx_cmd = &rxBuf; + /* + * Some compatible devices has extended two-bytes ID + * We'll use only manufacturer/deviceid atm + */ + cmd.tx_cmd_sz = 4; + cmd.rx_cmd_sz = 4; + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); + if (err) + return (NULL); + + manufacturer_id = rxBuf[1]; + dev_id = (rxBuf[2] << 8) | (rxBuf[3]); + + for (i = 0; + i < sizeof(flash_devices)/sizeof(struct mx25l_flash_ident); i++) { + if ((flash_devices[i].manufacturer_id == manufacturer_id) && + (flash_devices[i].device_id == dev_id)) + return &flash_devices[i]; + } + + printf("Unknown SPI flash device. Vendor: %02x, device id: %04x\n", + manufacturer_id, dev_id); + return (NULL); +} + +static void +mx25l_set_writable(device_t dev, int writable) +{ + uint8_t txBuf[1], rxBuf[1]; + struct spi_command cmd; + int err; + + memset(&cmd, 0, sizeof(cmd)); + memset(txBuf, 0, sizeof(txBuf)); + memset(rxBuf, 0, sizeof(rxBuf)); + + txBuf[0] = writable ? CMD_WRITE_ENABLE : CMD_WRITE_DISABLE; + cmd.tx_cmd = txBuf; + cmd.rx_cmd = rxBuf; + cmd.rx_cmd_sz = 1; + cmd.tx_cmd_sz = 1; + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); +} + +static void +mx25l_erase_sector(device_t dev, off_t sector) +{ + uint8_t txBuf[4], rxBuf[4]; + struct spi_command cmd; + int err; + + mx25l_wait_for_device_ready(dev); + mx25l_set_writable(dev, 1); + + memset(&cmd, 0, sizeof(cmd)); + memset(txBuf, 0, sizeof(txBuf)); + memset(rxBuf, 0, sizeof(rxBuf)); + + txBuf[0] = CMD_SECTOR_ERASE; + cmd.tx_cmd = txBuf; + cmd.rx_cmd = rxBuf; + cmd.rx_cmd_sz = 4; + cmd.tx_cmd_sz = 4; + txBuf[1] = ((sector >> 16) & 0xff); + txBuf[2] = ((sector >> 8) & 0xff); + txBuf[3] = (sector & 0xff); + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); +} + +static int +mx25l_write(device_t dev, off_t offset, caddr_t data, off_t count) +{ + struct mx25l_softc *sc; + uint8_t txBuf[8], rxBuf[8]; + struct spi_command cmd; + off_t write_offset; + long bytes_to_write, bytes_writen; + device_t pdev; + int err = 0; + + pdev = device_get_parent(dev); + sc = device_get_softc(dev); + + cmd.tx_cmd_sz = 4; + cmd.rx_cmd_sz = 4; + + bytes_writen = 0; + write_offset = offset; + + /* + * Sanity checks + */ + KASSERT(count % sc->sc_sectorsize == 0, + ("count for BIO_WRITE is not sector size (%d bytes) aligned", + sc->sc_sectorsize)); + + KASSERT(offset % sc->sc_sectorsize == 0, + ("offset for BIO_WRITE is not sector size (%d bytes) aligned", + sc->sc_sectorsize)); + + /* + * Assume here that we write per-sector only + * and sector size should be 256 bytes aligned + */ + KASSERT(write_offset % FLASH_PAGE_SIZE == 0, + ("offset for BIO_WRITE is not page size (%d bytes) aligned", + FLASH_PAGE_SIZE)); + + /* + * Maximum write size for CMD_PAGE_PROGRAM is + * FLASH_PAGE_SIZE, so split data to chunks + * FLASH_PAGE_SIZE bytes eash and write them + * one by one + */ + while (bytes_writen < count) { + /* + * If we crossed sector boundary - erase next sector + */ + if (((offset + bytes_writen) % sc->sc_sectorsize) == 0) + mx25l_erase_sector(dev, offset + bytes_writen); + + txBuf[0] = CMD_PAGE_PROGRAM; + txBuf[1] = ((write_offset >> 16) & 0xff); + txBuf[2] = ((write_offset >> 8) & 0xff); + txBuf[3] = (write_offset & 0xff); + + bytes_to_write = MIN(FLASH_PAGE_SIZE, + count - bytes_writen); + cmd.tx_cmd = txBuf; + cmd.rx_cmd = rxBuf; + cmd.tx_data = data + bytes_writen; + cmd.tx_data_sz = bytes_to_write; + cmd.rx_data = data + bytes_writen; + cmd.rx_data_sz = bytes_to_write; + + /* + * Eash completed write operation resets WEL + * (write enable latch) to disabled state, + * so we re-enable it here + */ + mx25l_wait_for_device_ready(dev); + mx25l_set_writable(dev, 1); + + err = SPIBUS_TRANSFER(pdev, dev, &cmd); + if (err) + break; + + bytes_writen += bytes_to_write; + write_offset += bytes_to_write; + } + + return (err); +} + +static int +mx25l_read(device_t dev, off_t offset, caddr_t data, off_t count) +{ + struct mx25l_softc *sc; + uint8_t txBuf[8], rxBuf[8]; + struct spi_command cmd; + device_t pdev; + int err = 0; + + pdev = device_get_parent(dev); + sc = device_get_softc(dev); + + /* + * Sanity checks + */ + KASSERT(count % sc->sc_sectorsize == 0, + ("count for BIO_WRITE is not sector size (%d bytes) aligned", + sc->sc_sectorsize)); + + KASSERT(offset % sc->sc_sectorsize == 0, + ("offset for BIO_WRITE is not sector size (%d bytes) aligned", + sc->sc_sectorsize)); + + txBuf[0] = CMD_FAST_READ; + cmd.tx_cmd_sz = 5; + cmd.rx_cmd_sz = 5; + + txBuf[1] = ((offset >> 16) & 0xff); + txBuf[2] = ((offset >> 8) & 0xff); + txBuf[3] = (offset & 0xff); + /* Dummy byte */ + txBuf[4] = 0; + + cmd.tx_cmd = txBuf; + cmd.rx_cmd = rxBuf; + cmd.tx_data = data; + cmd.tx_data_sz = count; + cmd.rx_data = data; + cmd.rx_data_sz = count; + + err = SPIBUS_TRANSFER(pdev, dev, &cmd); + + return (err); +} + +static int +mx25l_probe(device_t dev) +{ + device_set_desc(dev, "M25Pxx Flash Family"); + return (0); +} + +static int +mx25l_attach(device_t dev) +{ + struct mx25l_softc *sc; + struct mx25l_flash_ident *ident; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + M25PXX_LOCK_INIT(sc); + + ident = mx25l_get_device_ident(sc); + if (ident == NULL) + return (ENXIO); + + mx25l_wait_for_device_ready(sc->sc_dev); + + sc->sc_disk = disk_alloc(); + sc->sc_disk->d_open = mx25l_open; + sc->sc_disk->d_close = mx25l_close; + sc->sc_disk->d_strategy = mx25l_strategy; + sc->sc_disk->d_ioctl = mx25l_ioctl; + sc->sc_disk->d_name = "flash/spi"; + sc->sc_disk->d_drv1 = sc; + sc->sc_disk->d_maxsize = DFLTPHYS; + sc->sc_disk->d_sectorsize = ident->sectorsize; + sc->sc_disk->d_mediasize = ident->sectorsize * ident->sectorcount; + sc->sc_disk->d_unit = device_get_unit(sc->sc_dev); + sc->sc_disk->d_dump = NULL; /* NB: no dumps */ + /* Sectorsize for erase operations */ + sc->sc_sectorsize = ident->sectorsize; + + /* NB: use stripesize to hold the erase/region size for RedBoot */ + sc->sc_disk->d_stripesize = ident->sectorsize; + + disk_create(sc->sc_disk, DISK_VERSION); + bioq_init(&sc->sc_bio_queue); + + kproc_create(&mx25l_task, sc, &sc->sc_p, 0, 0, "task: mx25l flash"); + device_printf(sc->sc_dev, "%s, sector %d bytes, %d sectors\n", + ident->name, ident->sectorsize, ident->sectorcount); + + return (0); +} + +static int +mx25l_detach(device_t dev) +{ + + return (EIO); +} + +static int +mx25l_open(struct disk *dp) +{ + return (0); +} + +static int +mx25l_close(struct disk *dp) +{ + + return (0); +} + +static int +mx25l_ioctl(struct disk *dp, u_long cmd, void *data, int fflag, + struct thread *td) +{ + + return (EINVAL); +} + +static void +mx25l_strategy(struct bio *bp) +{ + struct mx25l_softc *sc; + + sc = (struct mx25l_softc *)bp->bio_disk->d_drv1; + M25PXX_LOCK(sc); + bioq_disksort(&sc->sc_bio_queue, bp); + wakeup(sc); + M25PXX_UNLOCK(sc); +} + +static void +mx25l_task(void *arg) +{ + struct mx25l_softc *sc = (struct mx25l_softc*)arg; + struct bio *bp; + device_t dev; + + for (;;) { + dev = sc->sc_dev; + M25PXX_LOCK(sc); + do { + bp = bioq_first(&sc->sc_bio_queue); + if (bp == NULL) + msleep(sc, &sc->sc_mtx, PRIBIO, "jobqueue", 0); + } while (bp == NULL); + bioq_remove(&sc->sc_bio_queue, bp); + M25PXX_UNLOCK(sc); + + switch (bp->bio_cmd) { + case BIO_READ: + bp->bio_error = mx25l_read(dev, bp->bio_offset, + bp->bio_data, bp->bio_bcount); + break; + case BIO_WRITE: + bp->bio_error = mx25l_write(dev, bp->bio_offset, + bp->bio_data, bp->bio_bcount); + break; + default: + bp->bio_error = EINVAL; + } + + + biodone(bp); + } +} + +static devclass_t mx25l_devclass; + +static device_method_t mx25l_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, mx25l_probe), + DEVMETHOD(device_attach, mx25l_attach), + DEVMETHOD(device_detach, mx25l_detach), + + { 0, 0 } +}; + +static driver_t mx25l_driver = { + "mx25l", + mx25l_methods, + sizeof(struct mx25l_softc), +}; + +DRIVER_MODULE(mx25l, spibus, mx25l_driver, mx25l_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 05:16:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 100DF106568F; Sun, 10 Jan 2010 05:16:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA62C8FC19; Sun, 10 Jan 2010 05:16:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A5GtSS025876; Sun, 10 Jan 2010 05:16:55 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A5GtXA025874; Sun, 10 Jan 2010 05:16:55 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100516.o0A5GtXA025874@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 05:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201982 - head/sys/dev/flash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 05:16:56 -0000 Author: imp Date: Sun Jan 10 05:16:55 2010 New Revision: 201982 URL: http://svn.freebsd.org/changeset/base/201982 Log: Merge from projects/mips to head by hand: merge register definitions for mx25l flash. Added: - copied unchanged from r201981, projects/mips/sys/dev/flash/mx25lreg.h Directory Properties: head/sys/dev/flash/mx25lreg.h (props changed) Copied: head/sys/dev/flash/mx25lreg.h (from r201981, projects/mips/sys/dev/flash/mx25lreg.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/flash/mx25lreg.h Sun Jan 10 05:16:55 2010 (r201982, copy of r201981, projects/mips/sys/dev/flash/mx25lreg.h) @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2009, Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 __MX25LREG_H__ +#define __MX25LREG_H__ + +/* + * Commands + */ +#define CMD_WRITE_ENABLE 0x06 +#define CMD_WRITE_DISABLE 0x04 +#define CMD_READ_IDENT 0x9F +#define CMD_READ_STATUS 0x05 +#define CMD_WRITE_STATUS 0x01 +#define CMD_READ 0x03 +#define CMD_FAST_READ 0x0B +#define CMD_PAGE_PROGRAM 0x02 +#define CMD_SECTOR_ERASE 0xD8 +#define CMD_BULK_ERASE 0xC7 + +/* + * Status register flags + */ +#define STATUS_SRWD (1 << 7) +#define STATUS_BP2 (1 << 4) +#define STATUS_BP1 (1 << 3) +#define STATUS_BP0 (1 << 2) +#define STATUS_WEL (1 << 1) +#define STATUS_WIP (1 << 0) + +#define FLASH_PAGE_SIZE 256 + +#endif /* __MX25LREG_H__ */ + From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 05:28:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDB9B106566C; Sun, 10 Jan 2010 05:28:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD9DD8FC15; Sun, 10 Jan 2010 05:28:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A5SaGH028460; Sun, 10 Jan 2010 05:28:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A5SawI028458; Sun, 10 Jan 2010 05:28:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100528.o0A5SawI028458@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 05:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201983 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 05:28:37 -0000 Author: imp Date: Sun Jan 10 05:28:36 2010 New Revision: 201983 URL: http://svn.freebsd.org/changeset/base/201983 Log: Merge r192355 from projects/mips to head by hand: r192355 | gonzo | 2009-05-18 17:20:56 -0600 (Mon, 18 May 2009) | 2 lines - Add support for MX25Lxxx SPI flash (readonly atm) Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 10 05:16:55 2010 (r201982) +++ head/sys/conf/files Sun Jan 10 05:28:36 2010 (r201983) @@ -933,6 +933,7 @@ dev/firewire/if_fwip.c optional fwip dev/firewire/sbp.c optional sbp dev/firewire/sbp_targ.c optional sbp_targ dev/flash/at45d.c optional at45d +dev/flash/mx25l.c optional mx25l dev/fxp/if_fxp.c optional fxp inet dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 05:34:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DBAE106566B; Sun, 10 Jan 2010 05:34:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D32B8FC0C; Sun, 10 Jan 2010 05:34:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A5YkRB029860; Sun, 10 Jan 2010 05:34:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A5Yk0V029858; Sun, 10 Jan 2010 05:34:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100534.o0A5Yk0V029858@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 05:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201984 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 05:34:46 -0000 Author: imp Date: Sun Jan 10 05:34:46 2010 New Revision: 201984 URL: http://svn.freebsd.org/changeset/base/201984 Log: Merge r187428, r191079, r195533, r195669, r197004, r197012 and r197015 from projects/mips to head by hand: r197015 | imp | 2009-09-08 21:59:46 -0600 (Tue, 08 Sep 2009) | 2 lines Prefer PTR_LA over a naked la to work with 64-bits.. r197012 | imp | 2009-09-08 21:46:04 -0600 (Tue, 08 Sep 2009) | 3 lines Use proper set of flags to build the tramp. this gets 64-bit almost building and lets me debug the 'almost' :) r197004 | imp | 2009-09-08 18:47:12 -0600 (Tue, 08 Sep 2009) | 2 lines Use ${LDSCRIPT_NAME} in preference to ldscript.$M. r195669 | gonzo | 2009-07-13 17:03:44 -0600 (Mon, 13 Jul 2009) | 3 lines - Remove -mno-dsp from CFLAGS. MIPS DSP ASE is off by default now (as it should be) r195533 | imp | 2009-07-10 01:21:26 -0600 (Fri, 10 Jul 2009) | 4 lines Add in the emulation selection when linking... We're still not 100% of the way there, but we're better with it. hack.so build now, but we die when we try to link it in. r191079 | gonzo | 2009-04-14 16:53:22 -0600 (Tue, 14 Apr 2009) | 2 lines - Revert changes accidentally killed by merge operation r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines - Add trampoline stuff for bootloaders that do not support ELF - Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with KERNLOADADDR/TRAMPLOADADDR and clean configs Modified: head/sys/conf/Makefile.mips Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Sun Jan 10 05:28:36 2010 (r201983) +++ head/sys/conf/Makefile.mips Sun Jan 10 05:34:46 2010 (r201984) @@ -28,35 +28,83 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" +LDSCRIPT_NAME?=ldscript.$M +SYSTEM_LD:= ${SYSTEM_LD:$S/conf/${LDSCRIPT_NAME}=${LDSCRIPT_NAME}} +SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/${LDSCRIPT_NAME}=${LDSCRIPT_NAME}} + # XXX: Such sweeping assumptions... MACHINE=mips MACHINE_ARCH=mips +KERNLOADADDR?=0x80001000 +# This obscure value is defined by CFE for WR160N +# To be changed later +TRAMPLOADADDR?=0x807963c0 MKMODULESENV+= MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} # We default to the MIPS32 ISA, if none specified in the # kernel configuration file. ARCH_FLAGS?=-march=mips32 +EXTRA_FLAGS=-fno-pic -mno-abicalls -G0 HACK_EXTRA_FLAGS=-shared .if defined(TARGET_BIG_ENDIAN) CFLAGS+=-EB SYSTEM_LD+=-EB +EXTRA_FLAGS+=-EB +TRAMP_LDFLAGS+=-Wl,-EB HACK_EXTRA_FLAGS+=-EB -Wl,-EB +.if defined(TARGET_64BIT) +SYSTEM_LD+=-m elf64btsmip_fbsd +HACK_EXTRA_FLAGS+=-Wl,-m,elf64btsmip_fbsd +.endif .else CFLAGS+=-EL SYSTEM_LD+=-EL +EXTRA_FLAGS+=-EL +TRAMP_LDFLAGS+=-Wl,-EL HACK_EXTRA_FLAGS+=-EL -Wl,-EL +.if defined(TARGET_64BIT) +SYSTEM_LD+=-m elf64ltsmip_fbsd +HACK_EXTRA_FLAGS+=-Wl,-m,elf64ltsmip_fbsd +.endif .endif + # We add the -fno-pic flag to kernels because otherwise performance # is extremely poor, as well as -mno-abicalls to force no ABI usage. -CFLAGS+=-fno-pic -mno-abicalls -G0 $(ARCH_FLAGS) -HACK_EXTRA_FLAGS+=-fno-pic -mno-abicalls -G0 $(ARCH_FLAGS) +CFLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS) +HACK_EXTRA_FLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS) # XXX hardcoded kernel entry point ASM_CFLAGS+=${CFLAGS} -D_LOCORE -DLOCORE +KERNEL_EXTRA=trampoline +trampoline: ${KERNEL_KO}.tramp.bin +${KERNEL_KO}.tramp.bin: ${KERNEL_KO} $S/$M/$M/elf_trampoline.c \ + $S/$M/$M/inckern.S + ${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \ + -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp + sed s/${KERNLOADADDR}/${TRAMPLOADADDR}/ ${LDSCRIPT_NAME} | \ + sed s/" + SIZEOF_HEADERS"// > ${LDSCRIPT_NAME}.tramp.noheader + # Generate .S file that setups stack and jumps to trampoline + echo "#include " >tmphack.S + echo "ENTRY(_start)" >>tmphack.S + echo "PTR_LA t0, kernel_end" >>tmphack.S + echo "move sp, t0" >>tmphack.S + echo "add sp, 0x2000" >>tmphack.S + echo "and sp, ~0x7" >>tmphack.S + echo "PTR_LA t0, _startC" >>tmphack.S + echo "j t0" >>tmphack.S + echo "END(_start)" >>tmphack.S + echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h + ${CC} -O -nostdlib -I. -I$S ${HACK_EXTRA_FLAGS} ${TRAMP_LDFLAGS} -Xlinker \ + -T -Xlinker ${LDSCRIPT_NAME}.tramp.noheader tmphack.S \ + $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ + -o ${KERNEL_KO}.tramp.noheader + ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ + ${KERNEL_KO}.tramp.bin \ + %BEFORE_DEPEND %OBJS @@ -69,6 +117,12 @@ ASM_CFLAGS+=${CFLAGS} -D_LOCORE -DLOCORE %CLEAN +CLEAN+= ${LDSCRIPT_NAME} ${LDSCRIPT_NAME}.tramp.noheader \ + ${KERNEL_KO}.tramp.noheader ${KERNEL_KO}.tramp.bin + +${LDSCRIPT_NAME}: $S/conf/${LDSCRIPT_NAME} + cat $S/conf/${LDSCRIPT_NAME}|sed s/KERNLOADADDR/${KERNLOADADDR}/g \ + > ${LDSCRIPT_NAME} %RULES .include "$S/conf/kern.post.mk" From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 05:36:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2048E106566B; Sun, 10 Jan 2010 05:36:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1066D8FC15; Sun, 10 Jan 2010 05:36:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A5acuK030324; Sun, 10 Jan 2010 05:36:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A5acVV030322; Sun, 10 Jan 2010 05:36:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100536.o0A5acVV030322@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 05:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201985 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 05:36:39 -0000 Author: imp Date: Sun Jan 10 05:36:38 2010 New Revision: 201985 URL: http://svn.freebsd.org/changeset/base/201985 Log: Merge r187418 from projects/mips to head by hand: r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines - Add trampoline stuff for bootloaders that do not support ELF - Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with KERNLOADADDR/TRAMPLOADADDR and clean configs Modified: head/sys/conf/ldscript.mips Modified: head/sys/conf/ldscript.mips ============================================================================== --- head/sys/conf/ldscript.mips Sun Jan 10 05:34:46 2010 (r201984) +++ head/sys/conf/ldscript.mips Sun Jan 10 05:36:38 2010 (r201985) @@ -43,7 +43,7 @@ PROVIDE (_DYNAMIC = 0); SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0x80100000 + SIZEOF_HEADERS; + . = KERNLOADADDR + SIZEOF_HEADERS; .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 05:46:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D616106566B; Sun, 10 Jan 2010 05:46:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BAE18FC1C; Sun, 10 Jan 2010 05:46:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A5kKIs032460; Sun, 10 Jan 2010 05:46:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A5kK7o032457; Sun, 10 Jan 2010 05:46:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001100546.o0A5kK7o032457@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 05:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201986 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 05:46:20 -0000 Author: imp Date: Sun Jan 10 05:46:19 2010 New Revision: 201986 URL: http://svn.freebsd.org/changeset/base/201986 Log: Merge from projects/mips to head by hand: r200593 | imp | 2009-12-15 16:22:19 -0700 (Tue, 15 Dec 2009) | 4 lines Remove the now-obsolete comments about compile-with. There are no compile-with lines in this file at all. So we don't need two warnings about them. r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-) r198311 | neel | 2009-10-20 18:56:13 -0600 (Tue, 20 Oct 2009) | 8 lines Update options.mips to support config options required to build the SWARM kernel. The SWARM kernel does not build yet but at least it gets past the kernel config stage. r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling. r196315 | imp | 2009-08-17 06:37:06 -0600 (Mon, 17 Aug 2009) | 5 lines Like qdivrem, remove the other quad_t support stuff from 64-bit kernels. r195331 | imp | 2009-07-03 20:49:17 -0600 (Fri, 03 Jul 2009) | 4 lines Merge in new cfe environment passing of kenv for swarm/sibyte boards. Submitted by: Neelkanth Natu r195732 | gonzo | 2009-07-16 20:28:27 -0600 (Thu, 16 Jul 2009) | 2 lines - Add DES and Blowfish implementstions to build. Required by crypto(4) r195437 | imp | 2009-07-07 23:57:58 -0600 (Tue, 07 Jul 2009) | 2 lines The kernel isn't quite ready for this to be optional... r195401 | imp | 2009-07-06 02:16:25 -0600 (Mon, 06 Jul 2009) | 4 lines Only build qdivrem on 32-bit ISA... r195331 | imp | 2009-07-03 20:49:17 -0600 (Fri, 03 Jul 2009) | 4 lines Merge in new cfe environment passing of kenv for swarm/sibyte boards. Submitted by: Neelkanth Natu r195165 | gonzo | 2009-06-29 11:36:47 -0600 (Mon, 29 Jun 2009) | 2 lines - add sys_machdep.c to build r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines - Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default we assume that there is no FPU, because majority of SoC does not have it. r191085 | gonzo | 2009-04-14 20:41:35 -0600 (Tue, 14 Apr 2009) | 2 lines - mainbus.c seems not to be used, disconnect it from build r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order. r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines - Add trampoline stuff for bootloaders that do not support ELF - Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with KERNLOADADDR/TRAMPLOADADDR and clean configs r187415 | gonzo | 2009-01-18 16:49:02 -0700 (Sun, 18 Jan 2009) | 3 lines - Move Silicon Backplanes code out to system-wide level (dev/siba) as it's going to be used not only for siba5 devices. Modified: head/sys/conf/files.mips head/sys/conf/options.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Sun Jan 10 05:36:38 2010 (r201985) +++ head/sys/conf/files.mips Sun Jan 10 05:46:19 2010 (r201986) @@ -5,10 +5,6 @@ # All rights reserved. # JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta # -# The long compile-with and dependency lines are required because of -# limitations in config: backslash-newline doesn't work in strings, and -# dependency lines other than the first are silently ignored. -# # ---------------------------------------------------------------------- # Phase 2 # ---------------------------------------------------------------------- @@ -20,10 +16,6 @@ # JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta # $FreeBSD$ # -# The long compile-with and dependency lines are required because of -# limitations in config: backslash-newline doesn't work in strings, and -# dependency lines other than the first are silently ignored. -# # ---------------------------------------------------------------------- # Phase 2 # ---------------------------------------------------------------------- @@ -38,14 +30,13 @@ mips/mips/cpu.c standard mips/mips/elf_machdep.c standard mips/mips/exception.S standard mips/mips/gdb_machdep.c standard -mips/mips/mainbus.c standard +# mips/mips/mainbus.c standard mips/mips/pmap.c standard mips/mips/trap.c standard mips/mips/vm_machdep.c standard # ---------------------------------------------------------------------- # Phase 4 # ---------------------------------------------------------------------- -mips/mips/tick.c standard # ---------------------------------------------------------------------- # Phase 5 # ---------------------------------------------------------------------- @@ -54,6 +45,7 @@ mips/mips/pm_machdep.c standard mips/mips/swtch.S standard mips/mips/tlb.S standard +mips/mips/bus_space_generic.c standard mips/mips/busdma_machdep.c standard mips/mips/cache.c standard mips/mips/cache_mipsNN.c standard @@ -63,30 +55,32 @@ mips/mips/db_interface.c optional ddb mips/mips/db_trace.c optional ddb mips/mips/dump_machdep.c standard mips/mips/in_cksum.c optional inet -mips/mips/intr_machdep.c standard mips/mips/locore.S standard no-obj mips/mips/mem.c optional mem mips/mips/nexus.c standard mips/mips/stack_machdep.c optional ddb | stack mips/mips/support.S standard +mips/mips/sys_machdep.c standard mips/mips/swtch.S standard mips/mips/uio_machdep.c standard +crypto/blowfish/bf_enc.c optional crypto | ipsec +crypto/des/des_enc.c optional crypto | ipsec | netsmb geom/geom_bsd.c optional geom_bsd geom/geom_bsd_enc.c optional geom_bsd geom/geom_mbr.c optional geom_mbr geom/geom_mbr_enc.c optional geom_mbr libkern/ashldi3.c standard libkern/ashrdi3.c standard -libkern/divdi3.c standard +libkern/divdi3.c optional isa_mips32 libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard libkern/lshrdi3.c standard libkern/memmove.c standard -libkern/moddi3.c standard -libkern/qdivrem.c standard -libkern/udivdi3.c standard -libkern/umoddi3.c standard +libkern/moddi3.c optional isa_mips32 +libkern/qdivrem.c optional isa_mips32 +libkern/udivdi3.c optional isa_mips32 +libkern/umoddi3.c optional isa_mips32 #XXX: We can't use these versions, as strcmp.c is included conf/files #libkern/mips/strcmp.S standard @@ -94,5 +88,10 @@ libkern/umoddi3.c standard dev/cfe/cfe_api.c optional cfe dev/cfe/cfe_console.c optional cfe_console +dev/cfe/cfe_env.c optional cfe_env #dev/cfe/cfe_resource.c optional cfe # not yet needed +dev/siba/siba.c optional siba +dev/siba/siba_pcib.c optional siba pci +dev/siba/siba_cc.c optional siba +#mips/sentry5/siba_mips.c optional siba # not yet Modified: head/sys/conf/options.mips ============================================================================== --- head/sys/conf/options.mips Sun Jan 10 05:36:38 2010 (r201985) +++ head/sys/conf/options.mips Sun Jan 10 05:46:19 2010 (r201986) @@ -31,8 +31,9 @@ CPU_MIPS4KC opt_global.h CPU_MIPS32 opt_global.h CPU_MIPS64 opt_global.h -CPU_NOFPU opt_global.h CPU_SENTRY5 opt_global.h +CPU_HAVEFPU opt_global.h +CPU_SB1 opt_global.h ISA_MIPS1 opt_cputype.h ISA_MIPS3 opt_cputype.h @@ -44,14 +45,30 @@ ISA_MIPS64v2 opt_cputype.h YAMON opt_global.h CFE opt_global.h CFE_CONSOLE opt_global.h +CFE_ENV opt_global.h +CFE_ENV_SIZE opt_global.h KERNPHYSADDR opt_global.h KERNVIRTADDR opt_global.h PHYSADDR opt_global.h -SOFTFLOAT opt_global.h - +PHYS_ADDR_64BIT opt_global.h +NOFPU opt_global.h TARGET_OCTEON opt_global.h TARGET_EMULATOR opt_ddb.h +TARGET_XLR_XLS opt_global.h TICK_USE_YAMON_FREQ opt_global.h TICK_USE_MALTA_RTC opt_global.h + +# +# The MIPS architecture does not have separate memory and i/o address space +# like x86. However some MIPS processors provide a memory-mapped window that +# maps onto the PCI I/O space. +# +PCI_IOSPACE_SIZE opt_global.h +PCI_IOSPACE_ADDR opt_global.h + +# +# The highest memory address that can be used by the kernel in units of KB. +# +MAXMEM opt_global.h From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 07:08:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C459E1065670; Sun, 10 Jan 2010 07:08:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99A0B8FC14; Sun, 10 Jan 2010 07:08:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A78BOB050332; Sun, 10 Jan 2010 07:08:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A78BqN050330; Sun, 10 Jan 2010 07:08:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001100708.o0A78BqN050330@svn.freebsd.org> From: Xin LI Date: Sun, 10 Jan 2010 07:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201987 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 07:08:11 -0000 Author: delphij Date: Sun Jan 10 07:08:11 2010 New Revision: 201987 URL: http://svn.freebsd.org/changeset/base/201987 Log: MFC r201756: Re-apply onnv-gate revisions 7994 and 8986 (corresponds to FreeBSD revision 200726 and 200727). Reviewed by: mm@ Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sun Jan 10 05:46:19 2010 (r201986) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sun Jan 10 07:08:11 2010 (r201987) @@ -847,6 +847,12 @@ restore_object(struct restorearg *ra, ob if (err != 0 && err != ENOENT) return (EINVAL); + if (drro->drr_bonuslen) { + data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8)); + if (ra->err) + return (ra->err); + } + if (err == ENOENT) { /* currently free, want to be allocated */ tx = dmu_tx_create(os); @@ -862,7 +868,6 @@ restore_object(struct restorearg *ra, ob dmu_tx_commit(tx); } else { /* currently allocated, want to be allocated */ - err = dmu_object_reclaim(os, drro->drr_object, drro->drr_type, drro->drr_blksz, drro->drr_bonustype, drro->drr_bonuslen); @@ -870,12 +875,6 @@ restore_object(struct restorearg *ra, ob if (err) return (EINVAL); - if (drro->drr_bonuslen) { - data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8)); - if (ra->err) - return (ra->err); - } - tx = dmu_tx_create(os); dmu_tx_hold_bonus(tx, drro->drr_object); err = dmu_tx_assign(tx, TXG_WAIT); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 07:18:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DED81065670; Sun, 10 Jan 2010 07:18:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CB748FC12; Sun, 10 Jan 2010 07:18:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A7IaPL052664; Sun, 10 Jan 2010 07:18:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A7IaE9052662; Sun, 10 Jan 2010 07:18:36 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001100718.o0A7IaE9052662@svn.freebsd.org> From: Xin LI Date: Sun, 10 Jan 2010 07:18:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201988 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 07:18:36 -0000 Author: delphij Date: Sun Jan 10 07:18:35 2010 New Revision: 201988 URL: http://svn.freebsd.org/changeset/base/201988 Log: MFC r201756: Re-apply onnv-gate revisions 7994 and 8986 (corresponds to FreeBSD revision 200726 and 200727). Reviewed by: mm@ Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sun Jan 10 07:08:11 2010 (r201987) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sun Jan 10 07:18:35 2010 (r201988) @@ -847,6 +847,12 @@ restore_object(struct restorearg *ra, ob if (err != 0 && err != ENOENT) return (EINVAL); + if (drro->drr_bonuslen) { + data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8)); + if (ra->err) + return (ra->err); + } + if (err == ENOENT) { /* currently free, want to be allocated */ tx = dmu_tx_create(os); @@ -862,7 +868,6 @@ restore_object(struct restorearg *ra, ob dmu_tx_commit(tx); } else { /* currently allocated, want to be allocated */ - err = dmu_object_reclaim(os, drro->drr_object, drro->drr_type, drro->drr_blksz, drro->drr_bonustype, drro->drr_bonuslen); @@ -870,12 +875,6 @@ restore_object(struct restorearg *ra, ob if (err) return (EINVAL); - if (drro->drr_bonuslen) { - data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8)); - if (ra->err) - return (ra->err); - } - tx = dmu_tx_create(os); dmu_tx_hold_bonus(tx, drro->drr_object); err = dmu_tx_assign(tx, TXG_WAIT); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 07:18:53 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00452106566C; Sun, 10 Jan 2010 07:18:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 72E268FC19; Sun, 10 Jan 2010 07:18:52 +0000 (UTC) Received: from besplex.bde.org (c122-106-175-149.carlnfd1.nsw.optusnet.com.au [122.106.175.149]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0A7ImEV004925 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 10 Jan 2010 18:18:49 +1100 Date: Sun, 10 Jan 2010 18:18:48 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jaakko Heinonen In-Reply-To: <20100108214821.GA985@a91-153-117-195.elisa-laajakaista.fi> Message-ID: <20100110181132.D1354@besplex.bde.org> References: <201001080757.o087vhrr009799@svn.freebsd.org> <20100109051536.R57595@delplex.bde.org> <20100108214821.GA985@a91-153-117-195.elisa-laajakaista.fi> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r201773 - head/sys/fs/tmpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 07:18:53 -0000 On Fri, 8 Jan 2010, Jaakko Heinonen wrote: > Does following patch look reasonable? > > - Fix style bugs introduced in r201773. > - Change the type of nodes_max to u_int and use "%u" format string to > convert its value. > Index: sys/fs/tmpfs/tmpfs_vfsops.c > =================================================================== > --- sys/fs/tmpfs/tmpfs_vfsops.c (revision 201818) > +++ sys/fs/tmpfs/tmpfs_vfsops.c (working copy) > @@ -239,7 +239,7 @@ tmpfs_mount(struct mount *mp) > * allowed to use, based on the maximum size the user passed in > * the mount structure. A value of zero is treated as if the > * maximum available space was requested. */ > - if (size_max < PAGE_SIZE || size_max > (SIZE_MAX - PAGE_SIZE)) > + if (size_max < PAGE_SIZE || size_max > SIZE_MAX - PAGE_SIZE) > pages = SIZE_MAX; I think you should change this to use howmany() (or set size_max and join the else clause) too. > else > pages = howmany(size_max, PAGE_SIZE); OK. Gleb Kurtsou reported a more interesting problem related to large values of `pages' being too large. I'll let you look at this... IIRC he made the byte limit UINT_MAX. Perhaps it should be a small fraction of the address space (UINT_MAX is still larger than physically possible for 32-bit systems). Bruce From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 08:02:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC33A106566B; Sun, 10 Jan 2010 08:02:07 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBB8E8FC12; Sun, 10 Jan 2010 08:02:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A827ff062194; Sun, 10 Jan 2010 08:02:07 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A827qE062190; Sun, 10 Jan 2010 08:02:07 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001100802.o0A827qE062190@svn.freebsd.org> From: Ruslan Ermilov Date: Sun, 10 Jan 2010 08:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201989 - in head: contrib/one-true-awk usr.bin/awk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 08:02:07 -0000 Author: ru Date: Sun Jan 10 08:02:07 2010 New Revision: 201989 URL: http://svn.freebsd.org/changeset/base/201989 Log: Apply patches directly to sources. Their effect is as follows: - Make one-true-awk respect locale's collating order in [a-z] bracket expressions, until a more complete fix (like handing BREs) is ready. - Don't require a space between -[fv] and its argument. Deleted: head/usr.bin/awk/b.c.diff head/usr.bin/awk/main.c.diff head/usr.bin/awk/run.c.diff Modified: head/contrib/one-true-awk/b.c head/contrib/one-true-awk/main.c head/contrib/one-true-awk/run.c head/usr.bin/awk/Makefile Modified: head/contrib/one-true-awk/b.c ============================================================================== --- head/contrib/one-true-awk/b.c Sun Jan 10 07:18:35 2010 (r201988) +++ head/contrib/one-true-awk/b.c Sun Jan 10 08:02:07 2010 (r201989) @@ -24,6 +24,9 @@ THIS SOFTWARE. /* lasciate ogne speranza, voi ch'intrate. */ +#include +__FBSDID("$FreeBSD$"); + #define DEBUG #include @@ -285,9 +288,21 @@ int quoted(char **pp) /* pick up next th return c; } +static int collate_range_cmp(int a, int b) +{ + static char s[2][2]; + + if ((uschar)a == (uschar)b) + return 0; + s[0][0] = a; + s[1][0] = b; + return (strcoll(s[0], s[1])); +} + char *cclenter(const char *argp) /* add a character class */ { int i, c, c2; + int j; uschar *p = (uschar *) argp; uschar *op, *bp; static uschar *buf = 0; @@ -306,15 +321,18 @@ char *cclenter(const char *argp) /* add c2 = *p++; if (c2 == '\\') c2 = quoted((char **) &p); - if (c > c2) { /* empty; ignore */ + if (collate_range_cmp(c, c2) > 0) { bp--; i--; continue; } - while (c < c2) { + for (j = 0; j < NCHARS; j++) { + if ((collate_range_cmp(c, j) > 0) || + collate_range_cmp(j, c2) > 0) + continue; if (!adjbuf((char **) &buf, &bufsz, bp-buf+2, 100, (char **) &bp, "cclenter1")) FATAL("out of space for character class [%.10s...] 2", p); - *bp++ = ++c; + *bp++ = j; i++; } continue; Modified: head/contrib/one-true-awk/main.c ============================================================================== --- head/contrib/one-true-awk/main.c Sun Jan 10 07:18:35 2010 (r201988) +++ head/contrib/one-true-awk/main.c Sun Jan 10 08:02:07 2010 (r201989) @@ -22,7 +22,10 @@ ARISING OUT OF OR IN CONNECTION WITH THE THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20091126"; +#include +__FBSDID("$FreeBSD$"); + +const char *version = "version 20091126 (FreeBSD)"; #define DEBUG #include @@ -58,6 +61,7 @@ int main(int argc, char *argv[]) const char *fs = NULL; setlocale(LC_CTYPE, ""); + setlocale(LC_COLLATE, ""); setlocale(LC_NUMERIC, "C"); /* for parsing cmdline & prog */ cmdname = argv[0]; if (argc == 1) { @@ -86,13 +90,18 @@ int main(int argc, char *argv[]) safe = 1; break; case 'f': /* next argument is program filename */ - argc--; - argv++; - if (argc <= 1) - FATAL("no program filename"); - if (npfile >= MAX_PFILE - 1) - FATAL("too many -f options"); - pfile[npfile++] = argv[1]; + if (argv[1][2] != 0) { /* arg is -fsomething */ + if (npfile >= MAX_PFILE - 1) + FATAL("too many -f options"); + pfile[npfile++] = &argv[1][2]; + } else { /* arg is -f something */ + argc--; argv++; + if (argc <= 1) + FATAL("no program filename"); + if (npfile >= MAX_PFILE - 1) + FATAL("too many -f options"); + pfile[npfile++] = argv[1]; + } break; case 'F': /* set field separator */ if (argv[1][2] != 0) { /* arg is -Fsomething */ @@ -111,8 +120,14 @@ int main(int argc, char *argv[]) WARNING("field separator FS is empty"); break; case 'v': /* -v a=1 to be done NOW. one -v for each */ - if (argv[1][2] == '\0' && --argc > 1 && isclvar((++argv)[1])) - setclvar(argv[1]); + if (argv[1][2] != 0) { /* arg is -vsomething */ + if (argv[1][2] != 0) + setclvar(&argv[1][2]); + } else { /* arg is -v something */ + argc--; argv++; + if (argc > 1 && isclvar(argv[1])) + setclvar(argv[1]); + } break; case 'd': dbg = atoi(&argv[1][2]); Modified: head/contrib/one-true-awk/run.c ============================================================================== --- head/contrib/one-true-awk/run.c Sun Jan 10 07:18:35 2010 (r201988) +++ head/contrib/one-true-awk/run.c Sun Jan 10 08:02:07 2010 (r201989) @@ -22,6 +22,9 @@ ARISING OUT OF OR IN CONNECTION WITH THE THIS SOFTWARE. ****************************************************************/ +#include +__FBSDID("$FreeBSD$"); + #define DEBUG #include #include @@ -653,7 +656,7 @@ Cell *relop(Node **a, int n) /* a[0 < a[ j = x->fval - y->fval; i = j<0? -1: (j>0? 1: 0); } else { - i = strcmp(getsval(x), getsval(y)); + i = strcoll(getsval(x), getsval(y)); } tempfree(x); tempfree(y); Modified: head/usr.bin/awk/Makefile ============================================================================== --- head/usr.bin/awk/Makefile Sun Jan 10 07:18:35 2010 (r201988) +++ head/usr.bin/awk/Makefile Sun Jan 10 08:02:07 2010 (r201989) @@ -27,10 +27,4 @@ proctab.c: maketab build-tools: maketab maketab: ytab.h ${AWKSRC}/maketab.c -.for f in b.c main.c run.c -${f}: ${AWKSRC}/${f} ${.CURDIR}/${f}.diff - patch -s -b .orig -o ${.TARGET} < ${.CURDIR}/${f}.diff ${AWKSRC}/${f} -CLEANFILES+= ${f} -.endfor - .include From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 09:03:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55C2D106566C; Sun, 10 Jan 2010 09:03:29 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id BF4058FC08; Sun, 10 Jan 2010 09:03:28 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0A93Pmm040373; Sun, 10 Jan 2010 12:03:25 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263114206; bh=q7UdsxG+HedhiZlQvaUJRlGSh13o2Dpp4gCA+IZ46BM=; l=143; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=Z8y6jqKILLTilsdLdvaxkb2ILCjTtiZKuYEqoRaJnEP4WV24ztdcIpafSJrBBkDSX nn3k/fFJsX0OytKmGN+B11X7VR/xYoDEf03djSyq81xseBGznoeq5HD+eYbHCgqyoU aLNikqHI0QO0rLAnxRIHznmYc7eX4QRyiRJjZTYo= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0A93OJb040372; Sun, 10 Jan 2010 12:03:24 +0300 (MSK) (envelope-from ache) Date: Sun, 10 Jan 2010 12:03:22 +0300 From: Andrey Chernov To: Bruce Evans , Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100110090321.GA40262@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201001052020.o05KKVEp002337@svn.freebsd.org> <20100107050409.GA85573@nagual.pp.ru> <20100108030937.Q56559@delplex.bde.org> <20100108061123.GA13136@nagual.pp.ru> <20100108062634.GA14489@nagual.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100108062634.GA14489@nagual.pp.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r201604 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 09:03:29 -0000 Well. Since I see no objections so far, I'll plan to commit strcmp()->strcoll() replacement in alphasort() soon. -- http://ache.pp.ru/ From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 09:20:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2218C106566C; Sun, 10 Jan 2010 09:20:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1169B8FC08; Sun, 10 Jan 2010 09:20:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A9Ku6K079423; Sun, 10 Jan 2010 09:20:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A9Kukc079420; Sun, 10 Jan 2010 09:20:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001100920.o0A9Kukc079420@svn.freebsd.org> From: Alexander Motin Date: Sun, 10 Jan 2010 09:20:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201990 - in head/sys: cam/ata dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 09:20:57 -0000 Author: mav Date: Sun Jan 10 09:20:56 2010 New Revision: 201990 URL: http://svn.freebsd.org/changeset/base/201990 Log: - Report SATA in legacy emulation mode still as SATA. - Make ATA XPT able to handle such case. Modified: head/sys/cam/ata/ata_xpt.c head/sys/dev/ata/ata-all.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Sun Jan 10 08:02:07 2010 (r201989) +++ head/sys/cam/ata/ata_xpt.c Sun Jan 10 09:20:56 2010 (r201990) @@ -1001,7 +1001,6 @@ typedef struct { union ccb *request_ccb; struct ccb_pathinq *cpi; int counter; - int found; } ata_scan_bus_info; /* @@ -1049,14 +1048,11 @@ ata_scan_bus(struct cam_periph *periph, } scan_info->request_ccb = request_ccb; scan_info->cpi = &work_ccb->cpi; - if (scan_info->cpi->transport == XPORT_ATA) - scan_info->found = 0x0003; - else - scan_info->found = 0x8001; - scan_info->counter = 0; /* If PM supported, probe it first. */ if (scan_info->cpi->hba_inquiry & PI_SATAPM) - scan_info->counter = 15; + scan_info->counter = scan_info->cpi->max_target; + else + scan_info->counter = 0; work_ccb = xpt_alloc_ccb_nowait(); if (work_ccb == NULL) { @@ -1073,10 +1069,11 @@ ata_scan_bus(struct cam_periph *periph, /* Free the current request path- we're done with it. */ xpt_free_path(work_ccb->ccb_h.path); /* If there is PMP... */ - if (scan_info->counter == 15) { + if ((scan_info->cpi->hba_inquiry & PI_SATAPM) && + (scan_info->counter == scan_info->cpi->max_target)) { if (work_ccb->ccb_h.ppriv_field1 != 0) { /* everything else willbe probed by it */ - scan_info->found = 0x8000; + goto done; } else { struct ccb_trans_settings cts; @@ -1091,11 +1088,10 @@ ata_scan_bus(struct cam_periph *periph, xpt_action((union ccb *)&cts); } } -take_next: - /* Take next device. Wrap from 15 (PM) to 0. */ - scan_info->counter = (scan_info->counter + 1 ) & 0x0f; - if (scan_info->counter > scan_info->cpi->max_target - - ((scan_info->cpi->hba_inquiry & PI_SATAPM) ? 1 : 0)) { + if (scan_info->counter == + ((scan_info->cpi->hba_inquiry & PI_SATAPM) ? + 0 : scan_info->cpi->max_target)) { +done: xpt_free_ccb(work_ccb); xpt_free_ccb((union ccb *)scan_info->cpi); request_ccb = scan_info->request_ccb; @@ -1104,9 +1100,10 @@ take_next: xpt_done(request_ccb); break; } + /* Take next device. Wrap from max (PMP) to 0. */ + scan_info->counter = (scan_info->counter + 1 ) % + (scan_info->cpi->max_target + 1); scan_next: - if ((scan_info->found & (1 << scan_info->counter)) == 0) - goto take_next; status = xpt_create_path(&path, xpt_periph, scan_info->request_ccb->ccb_h.path_id, scan_info->counter, 0); Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sun Jan 10 08:02:07 2010 (r201989) +++ head/sys/dev/ata/ata-all.c Sun Jan 10 09:20:56 2010 (r201990) @@ -1473,7 +1473,7 @@ ataaction(struct cam_sim *sim, union ccb d = &ch->curr[ccb->ccb_h.target_id]; else d = &ch->user[ccb->ccb_h.target_id]; - if ((ch->flags & ATA_SATA) && (ch->flags & ATA_NO_SLAVE)) { + if (ch->flags & ATA_SATA) { if (cts->xport_specific.sata.valid & CTS_SATA_VALID_REVISION) d->revision = cts->xport_specific.sata.revision; if (cts->xport_specific.ata.valid & CTS_SATA_VALID_MODE) { @@ -1497,8 +1497,6 @@ ataaction(struct cam_sim *sim, union ccb } if (cts->xport_specific.ata.valid & CTS_ATA_VALID_BYTECOUNT) d->bytecount = cts->xport_specific.ata.bytecount; - if (ch->flags & ATA_SATA) - d->bytecount = min(8192, d->bytecount); } ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -1515,7 +1513,7 @@ ataaction(struct cam_sim *sim, union ccb d = &ch->user[ccb->ccb_h.target_id]; cts->protocol = PROTO_ATA; cts->protocol_version = PROTO_VERSION_UNSPECIFIED; - if ((ch->flags & ATA_SATA) && (ch->flags & ATA_NO_SLAVE)) { + if (ch->flags & ATA_SATA) { cts->transport = XPORT_SATA; cts->transport_version = XPORT_VERSION_UNSPECIFIED; cts->xport_specific.sata.mode = d->mode; @@ -1604,7 +1602,7 @@ ataaction(struct cam_sim *sim, union ccb strncpy(cpi->hba_vid, "ATA", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - if ((ch->flags & ATA_SATA) && (ch->flags & ATA_NO_SLAVE)) + if (ch->flags & ATA_SATA) cpi->transport = XPORT_SATA; else cpi->transport = XPORT_ATA; From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 09:31:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C85531065693; Sun, 10 Jan 2010 09:31:57 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B70CC8FC1F; Sun, 10 Jan 2010 09:31:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A9VvDt081882; Sun, 10 Jan 2010 09:31:57 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A9VvFx081880; Sun, 10 Jan 2010 09:31:57 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001100931.o0A9VvFx081880@svn.freebsd.org> From: David Xu Date: Sun, 10 Jan 2010 09:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201991 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 09:31:57 -0000 Author: davidxu Date: Sun Jan 10 09:31:57 2010 New Revision: 201991 URL: http://svn.freebsd.org/changeset/base/201991 Log: Make a chain be a list of queues, and make threads waiting for same key coalesce to same queue, this makes searching path shorter and improves performance. Also fix comments about shared PI-mutex. Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Sun Jan 10 09:20:56 2010 (r201990) +++ head/sys/kern/kern_umtx.c Sun Jan 10 09:31:57 2010 (r201991) @@ -144,20 +144,38 @@ struct umtx_q { /* Inherited priority from PP mutex */ u_char uq_inherited_pri; + + /* Spare queue ready to be reused */ + struct umtxq_queue *uq_spare_queue; + + /* The queue we on */ + struct umtxq_queue *uq_cur_queue; }; TAILQ_HEAD(umtxq_head, umtx_q); +/* Per-key wait-queue */ +struct umtxq_queue { + struct umtxq_head head; + struct umtx_key key; + LIST_ENTRY(umtxq_queue) link; + int length; +}; + +LIST_HEAD(umtxq_list, umtxq_queue); + /* Userland lock object's wait-queue chain */ struct umtxq_chain { /* Lock for this chain. */ struct mtx uc_lock; /* List of sleep queues. */ - struct umtxq_head uc_queue[2]; + struct umtxq_list uc_queue[2]; #define UMTX_SHARED_QUEUE 0 #define UMTX_EXCLUSIVE_QUEUE 1 + LIST_HEAD(, umtxq_queue) uc_spare_queue; + /* Busy flag */ char uc_busy; @@ -166,6 +184,7 @@ struct umtxq_chain { /* All PI in the list */ TAILQ_HEAD(,umtx_pi) uc_pi_list; + }; #define UMTXQ_LOCKED_ASSERT(uc) mtx_assert(&(uc)->uc_lock, MA_OWNED) @@ -247,8 +266,9 @@ umtxq_sysinit(void *arg __unused) for (j = 0; j < UMTX_CHAINS; ++j) { mtx_init(&umtxq_chains[i][j].uc_lock, "umtxql", NULL, MTX_DEF | MTX_DUPOK); - TAILQ_INIT(&umtxq_chains[i][j].uc_queue[0]); - TAILQ_INIT(&umtxq_chains[i][j].uc_queue[1]); + LIST_INIT(&umtxq_chains[i][j].uc_queue[0]); + LIST_INIT(&umtxq_chains[i][j].uc_queue[1]); + LIST_INIT(&umtxq_chains[i][j].uc_spare_queue); TAILQ_INIT(&umtxq_chains[i][j].uc_pi_list); umtxq_chains[i][j].uc_busy = 0; umtxq_chains[i][j].uc_waiters = 0; @@ -265,6 +285,8 @@ umtxq_alloc(void) struct umtx_q *uq; uq = malloc(sizeof(struct umtx_q), M_UMTX, M_WAITOK | M_ZERO); + uq->uq_spare_queue = malloc(sizeof(struct umtxq_queue), M_UMTX, M_WAITOK | M_ZERO); + TAILQ_INIT(&uq->uq_spare_queue->head); TAILQ_INIT(&uq->uq_pi_contested); uq->uq_inherited_pri = PRI_MAX; return (uq); @@ -273,6 +295,8 @@ umtxq_alloc(void) void umtxq_free(struct umtx_q *uq) { + MPASS(uq->uq_spare_queue != NULL); + free(uq->uq_spare_queue, M_UMTX); free(uq, M_UMTX); } @@ -371,27 +395,72 @@ umtxq_unbusy(struct umtx_key *key) wakeup_one(uc); } +static struct umtxq_queue * +umtxq_queue_lookup(struct umtx_key *key, int q) +{ + struct umtxq_queue *uh; + struct umtxq_chain *uc; + + uc = umtxq_getchain(key); + UMTXQ_LOCKED_ASSERT(uc); + LIST_FOREACH(uh, &uc->uc_queue[q], link) { + if (umtx_key_match(&uh->key, key)) + return (uh); + } + + return (NULL); +} + static inline void umtxq_insert_queue(struct umtx_q *uq, int q) { + struct umtxq_queue *uh; struct umtxq_chain *uc; uc = umtxq_getchain(&uq->uq_key); UMTXQ_LOCKED_ASSERT(uc); - TAILQ_INSERT_TAIL(&uc->uc_queue[q], uq, uq_link); + KASSERT((uq->uq_flags & UQF_UMTXQ) == 0, ("umtx_q is already on queue")); + uh = umtxq_queue_lookup(&uq->uq_key, UMTX_SHARED_QUEUE); + if (uh != NULL) { + LIST_INSERT_HEAD(&uc->uc_spare_queue, uq->uq_spare_queue, link); + } else { + uh = uq->uq_spare_queue; + uh->key = uq->uq_key; + LIST_INSERT_HEAD(&uc->uc_queue[q], uh, link); + } + uq->uq_spare_queue = NULL; + + TAILQ_INSERT_TAIL(&uh->head, uq, uq_link); + uh->length++; uq->uq_flags |= UQF_UMTXQ; + uq->uq_cur_queue = uh; + return; } static inline void umtxq_remove_queue(struct umtx_q *uq, int q) { struct umtxq_chain *uc; + struct umtxq_queue *uh; uc = umtxq_getchain(&uq->uq_key); UMTXQ_LOCKED_ASSERT(uc); if (uq->uq_flags & UQF_UMTXQ) { - TAILQ_REMOVE(&uc->uc_queue[q], uq, uq_link); + uh = uq->uq_cur_queue; + TAILQ_REMOVE(&uh->head, uq, uq_link); + uh->length--; uq->uq_flags &= ~UQF_UMTXQ; + if (TAILQ_EMPTY(&uh->head)) { + KASSERT(uh->length == 0, + ("inconsistent umtxq_queue length")); + LIST_REMOVE(uh, link); + } else { + uh = LIST_FIRST(&uc->uc_spare_queue); + KASSERT(uh != NULL, ("uc_spare_queue is empty")); + LIST_REMOVE(uh, link); + } + uq->uq_spare_queue = uh; + uq->uq_cur_queue = NULL; } } @@ -402,18 +471,14 @@ static int umtxq_count(struct umtx_key *key) { struct umtxq_chain *uc; - struct umtx_q *uq; - int count = 0; + struct umtxq_queue *uh; uc = umtxq_getchain(key); UMTXQ_LOCKED_ASSERT(uc); - TAILQ_FOREACH(uq, &uc->uc_queue[UMTX_SHARED_QUEUE], uq_link) { - if (umtx_key_match(&uq->uq_key, key)) { - if (++count > 1) - break; - } - } - return (count); + uh = umtxq_queue_lookup(key, UMTX_SHARED_QUEUE); + if (uh != NULL) + return (uh->length); + return (0); } /* @@ -424,20 +489,17 @@ static int umtxq_count_pi(struct umtx_key *key, struct umtx_q **first) { struct umtxq_chain *uc; - struct umtx_q *uq; - int count = 0; + struct umtxq_queue *uh; *first = NULL; uc = umtxq_getchain(key); UMTXQ_LOCKED_ASSERT(uc); - TAILQ_FOREACH(uq, &uc->uc_queue[UMTX_SHARED_QUEUE], uq_link) { - if (umtx_key_match(&uq->uq_key, key)) { - if (++count > 1) - break; - *first = uq; - } + uh = umtxq_queue_lookup(key, UMTX_SHARED_QUEUE); + if (uh != NULL) { + *first = TAILQ_FIRST(&uh->head); + return (uh->length); } - return (count); + return (0); } /* @@ -448,18 +510,20 @@ static int umtxq_signal_queue(struct umtx_key *key, int n_wake, int q) { struct umtxq_chain *uc; - struct umtx_q *uq, *next; + struct umtxq_queue *uh; + struct umtx_q *uq; int ret; ret = 0; uc = umtxq_getchain(key); UMTXQ_LOCKED_ASSERT(uc); - TAILQ_FOREACH_SAFE(uq, &uc->uc_queue[q], uq_link, next) { - if (umtx_key_match(&uq->uq_key, key)) { + uh = umtxq_queue_lookup(key, q); + if (uh != NULL) { + while ((uq = TAILQ_FIRST(&uh->head)) != NULL) { umtxq_remove_queue(uq, q); wakeup(uq); if (++ret >= n_wake) - break; + return (ret); } } return (ret); @@ -1524,12 +1588,8 @@ umtxq_sleep_pi(struct umtx_q *uq, struct if (pi->pi_owner == NULL) { /* XXX * Current, We only support process private PI-mutex, - * non-contended PI-mutexes are locked in userland. - * Process shared PI-mutex should always be initialized - * by kernel and be registered in kernel, locking should - * always be done by kernel to avoid security problems. - * For process private PI-mutex, we can find owner - * thread and boost its priority safely. + * we need a faster way to find an owner thread for + * process-shared mutex (not available yet). */ mtx_unlock_spin(&umtx_lock); PROC_LOCK(curproc); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 11:02:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD7D8106566C; Sun, 10 Jan 2010 11:02:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A186A8FC0C; Sun, 10 Jan 2010 11:02:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AB2AHV006052; Sun, 10 Jan 2010 11:02:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AB2ANx006050; Sun, 10 Jan 2010 11:02:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001101102.o0AB2ANx006050@svn.freebsd.org> From: Alexander Motin Date: Sun, 10 Jan 2010 11:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201993 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 11:02:10 -0000 Author: mav Date: Sun Jan 10 11:02:10 2010 New Revision: 201993 URL: http://svn.freebsd.org/changeset/base/201993 Log: Report which of IXP700 legacy ATA channels is SATA. Modified: head/sys/dev/ata/chipsets/ata-ati.c Modified: head/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ati.c Sun Jan 10 10:42:58 2010 (r201992) +++ head/sys/dev/ata/chipsets/ata-ati.c Sun Jan 10 11:02:10 2010 (r201993) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); /* local prototypes */ static int ata_ati_chipinit(device_t dev); +static int ata_ati_ixp700_ch_attach(device_t dev); static int ata_ati_setmode(device_t dev, int target, int mode); /* misc defines */ @@ -121,7 +122,7 @@ ata_ati_chipinit(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); device_t smbdev; - int satacfg; + uint8_t satacfg; if (ata_setup_interrupt(dev, ata_generic_intr)) return ENXIO; @@ -145,13 +146,16 @@ ata_ati_chipinit(device_t dev) (satacfg & 0x01) == 0 ? "disabled" : "enabled", (satacfg & 0x08) == 0 ? "" : "combined mode, ", (satacfg & 0x10) == 0 ? "primary" : "secondary"); - + ctlr->chipset_data = (void *)(uintptr_t)satacfg; /* * If SATA controller is enabled but combined mode is disabled, * we have only one PATA channel. Ignore a non-existent channel. */ if ((satacfg & 0x09) == 0x01) ctlr->ichannels &= ~(1 << ((satacfg & 0x10) >> 4)); + else { + ctlr->ch_attach = ata_ati_ixp700_ch_attach; + } } break; } @@ -161,6 +165,23 @@ ata_ati_chipinit(device_t dev) } static int +ata_ati_ixp700_ch_attach(device_t dev) +{ + struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); + struct ata_channel *ch = device_get_softc(dev); + uint8_t satacfg = (uint8_t)(uintptr_t)ctlr->chipset_data; + + /* Setup the usual register normal pci style. */ + if (ata_pci_ch_attach(dev)) + return ENXIO; + + /* One of channels is PATA, another is SATA. */ + if (ch->unit == ((satacfg & 0x10) >> 4)) + ch->flags |= ATA_SATA; + return (0); +} + +static int ata_ati_setmode(device_t dev, int target, int mode) { device_t parent = device_get_parent(dev); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 11:25:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 382B01065764; Sun, 10 Jan 2010 11:25:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2633B8FC08; Sun, 10 Jan 2010 11:25:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ABPZJT011281; Sun, 10 Jan 2010 11:25:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ABPZDw011279; Sun, 10 Jan 2010 11:25:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001101125.o0ABPZDw011279@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 10 Jan 2010 11:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201994 - stable/8/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 11:25:35 -0000 Author: kib Date: Sun Jan 10 11:25:34 2010 New Revision: 201994 URL: http://svn.freebsd.org/changeset/base/201994 Log: MFC r201743: Give some information on SF_MNOWAIT flag. MFC r201759 (by brueffer): Fix a typo and bump date for the previous commit. MFC r201760: Further fix grammar. Modified: stable/8/lib/libc/sys/sendfile.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sys/sendfile.2 ============================================================================== --- stable/8/lib/libc/sys/sendfile.2 Sun Jan 10 11:02:10 2010 (r201993) +++ stable/8/lib/libc/sys/sendfile.2 Sun Jan 10 11:25:34 2010 (r201994) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2006 +.Dd January 7, 2010 .Dt SENDFILE 2 .Os .Sh NAME @@ -116,9 +116,17 @@ Busy servers may benefit by transferring block to a separate I/O worker thread. .It .Dv SF_MNOWAIT . -(description missing) +Do not wait for some kernel resource to become available, +in particular, +.Vt mbuf +and +.Vt sf_buf . +The flag does not make the +.Fn sendfile +syscall truly non-blocking, since other resources are still allocated +in a blocking fashion. .It -.Dv SF_SYNC , +.Dv SF_SYNC . .Nm sleeps until the network stack no longer references the VM pages of the file, making subsequent modifications to it safe. From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 12:03:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 662031065676; Sun, 10 Jan 2010 12:03:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54FE48FC19; Sun, 10 Jan 2010 12:03:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AC3rYq019643; Sun, 10 Jan 2010 12:03:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AC3rV2019641; Sun, 10 Jan 2010 12:03:53 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001101203.o0AC3rV2019641@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 10 Jan 2010 12:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201995 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 12:03:53 -0000 Author: bz Date: Sun Jan 10 12:03:53 2010 New Revision: 201995 URL: http://svn.freebsd.org/changeset/base/201995 Log: Correct a typo. MFC after: 5 days Modified: head/sys/net/if_epair.c Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Sun Jan 10 11:25:34 2010 (r201994) +++ head/sys/net/if_epair.c Sun Jan 10 12:03:53 2010 (r201995) @@ -323,7 +323,7 @@ epair_add_ifp_for_draining(struct ifnet STAILQ_FOREACH(elm, &epair_dpcpu->epair_ifp_drain_list, ifp_next) if (elm->ifp == ifp) break; - /* If the ipf is there already, return success. */ + /* If the ifp is there already, return success. */ if (elm != NULL) return (0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 13:36:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70FD0106566B; Sun, 10 Jan 2010 13:36:32 +0000 (UTC) (envelope-from mdounin@mdounin.ru) Received: from mdounin.cust.ramtel.ru (mdounin.cust.ramtel.ru [81.19.69.81]) by mx1.freebsd.org (Postfix) with ESMTP id 196E58FC12; Sun, 10 Jan 2010 13:36:31 +0000 (UTC) Received: from mdounin.ru (mdounin.cust.ramtel.ru [81.19.69.81]) by mdounin.cust.ramtel.ru (Postfix) with ESMTP id 2E00617015; Sun, 10 Jan 2010 16:36:30 +0300 (MSK) Date: Sun, 10 Jan 2010 16:36:30 +0300 From: Maxim Dounin To: Xin LI Message-ID: <20100110133629.GF1063@mdounin.ru> References: <201001100718.o0A7IaE9052662@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001100718.o0A7IaE9052662@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r201988 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 13:36:32 -0000 Hello! On Sun, Jan 10, 2010 at 07:18:36AM +0000, Xin LI wrote: > Author: delphij > Date: Sun Jan 10 07:18:35 2010 > New Revision: 201988 > URL: http://svn.freebsd.org/changeset/base/201988 > > Log: > MFC r201756: > > Re-apply onnv-gate revisions 7994 and 8986 (corresponds to FreeBSD > revision 200726 and 200727). For source control onnv-gate uses Mercurial, and this means that revision numbers make sense only for one particular clone. It make sense to record changeset hash instead, which is stable between clones. See here for more details: http://mercurial.selenic.com/wiki/RevisionNumber Just for the record: 7994:7a573dc88b73 8986:45c289aff7c9 Maxim Dounin From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 14:30:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE5C4106566B; Sun, 10 Jan 2010 14:30:30 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC4CD8FC16; Sun, 10 Jan 2010 14:30:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AEUUhZ051920; Sun, 10 Jan 2010 14:30:30 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AEUURS051917; Sun, 10 Jan 2010 14:30:30 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201001101430.o0AEUURS051917@svn.freebsd.org> From: Colin Percival Date: Sun, 10 Jan 2010 14:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201999 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 14:30:31 -0000 Author: cperciva Date: Sun Jan 10 14:30:30 2010 New Revision: 201999 URL: http://svn.freebsd.org/changeset/base/201999 Log: Give a less silly response to a silly request. Prior to this commit, fread/fwrite calls with size * nmemb > SIZE_MAX were handled by reading or writing (size_t)(size * nmemb) bytes; for example, on 32-bit platforms, fread(ptr, 641, 6700417, f) would read 1 byte and indicate that the requested 6700417 blocks had been read. This commit adds a check for such integer overflows, and treats them as if an overly large request was passed to read/write; i.e., it sets errno to EINVAL, sets the error indicator on the file, and returns a short object count (0, to be specific). The overflow check involves an integer division, so as a performance optimization we check first to see if both size and nmemb are less than 2^16; if they are, no overflow is possible and we avoid the division. We assume here that size_t is at least 32 bits; this appears to be true on all platforms FreeBSD supports. Although this commit fixes an integer overflow, it is not likely to have any security implications, since any program which would be affected by this bug fix is quite clearly already very confused. Reviewed by: kib MFC after: 1 month Modified: head/lib/libc/stdio/fread.c head/lib/libc/stdio/fwrite.c Modified: head/lib/libc/stdio/fread.c ============================================================================== --- head/lib/libc/stdio/fread.c Sun Jan 10 13:30:45 2010 (r201998) +++ head/lib/libc/stdio/fread.c Sun Jan 10 14:30:30 2010 (r201999) @@ -37,6 +37,8 @@ static char sccsid[] = "@(#)fread.c 8.2 __FBSDID("$FreeBSD$"); #include "namespace.h" +#include +#include #include #include #include "un-namespace.h" @@ -69,8 +71,27 @@ __fread(void * __restrict buf, size_t si /* * ANSI and SUSv2 require a return value of 0 if size or count are 0. */ - if ((resid = count * size) == 0) + if ((count == 0) || (size == 0)) return (0); + + /* + * Check for integer overflow. As an optimization, first check that + * at least one of {count, size} is at least 2^16, since if both + * values are less than that, their product can't possible overflow + * (size_t is always at least 32 bits on FreeBSD). + */ + if (((count | size) > 0xFFFF) && + (count > SIZE_MAX / size)) { + errno = EINVAL; + fp->_flags |= __SERR; + return (0); + } + + /* + * Compute the (now required to not overflow) number of bytes to + * read and actually do the work. + */ + resid = count * size; ORIENT(fp, -1); if (fp->_r < 0) fp->_r = 0; Modified: head/lib/libc/stdio/fwrite.c ============================================================================== --- head/lib/libc/stdio/fwrite.c Sun Jan 10 13:30:45 2010 (r201998) +++ head/lib/libc/stdio/fwrite.c Sun Jan 10 14:30:30 2010 (r201999) @@ -37,6 +37,8 @@ static char sccsid[] = "@(#)fwrite.c 8.1 __FBSDID("$FreeBSD$"); #include "namespace.h" +#include +#include #include #include "un-namespace.h" #include "local.h" @@ -60,10 +62,24 @@ fwrite(buf, size, count, fp) /* * ANSI and SUSv2 require a return value of 0 if size or count are 0. */ - n = count * size; - if (n == 0) + if ((count == 0) || (size == 0)) return (0); + /* + * Check for integer overflow. As an optimization, first check that + * at least one of {count, size} is at least 2^16, since if both + * values are less than that, their product can't possible overflow + * (size_t is always at least 32 bits on FreeBSD). + */ + if (((count | size) > 0xFFFF) && + (count > SIZE_MAX / size)) { + errno = EINVAL; + fp->_flags |= __SERR; + return (0); + } + + n = count * size; + iov.iov_base = (void *)buf; uio.uio_resid = iov.iov_len = n; uio.uio_iov = &iov; From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 14:48:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB7881065670; Sun, 10 Jan 2010 14:48:42 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA2328FC1C; Sun, 10 Jan 2010 14:48:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AEmgrQ055984; Sun, 10 Jan 2010 14:48:42 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AEmgKi055982; Sun, 10 Jan 2010 14:48:42 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001101448.o0AEmgKi055982@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 10 Jan 2010 14:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202000 - head/sys/dev/ae X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 14:48:43 -0000 Author: gavin Date: Sun Jan 10 14:48:42 2010 New Revision: 202000 URL: http://svn.freebsd.org/changeset/base/202000 Log: Don't panic on attach if we can't allocate ifp Approved by: ed (mentor) MFC after: 2 weeks Modified: head/sys/dev/ae/if_ae.c Modified: head/sys/dev/ae/if_ae.c ============================================================================== --- head/sys/dev/ae/if_ae.c Sun Jan 10 14:30:30 2010 (r201999) +++ head/sys/dev/ae/if_ae.c Sun Jan 10 14:48:42 2010 (r202000) @@ -367,6 +367,7 @@ ae_attach(device_t dev) if (ifp == NULL) { device_printf(dev, "could not allocate ifnet structure.\n"); error = ENXIO; + goto fail; } ifp->if_softc = sc; From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 15:12:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC509106566B; Sun, 10 Jan 2010 15:12:15 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9E748FC08; Sun, 10 Jan 2010 15:12:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AFCFwX061254; Sun, 10 Jan 2010 15:12:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AFCFgB061252; Sun, 10 Jan 2010 15:12:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001101512.o0AFCFgB061252@svn.freebsd.org> From: Marius Strobl Date: Sun, 10 Jan 2010 15:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202003 - head/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 15:12:16 -0000 Author: marius Date: Sun Jan 10 15:12:15 2010 New Revision: 202003 URL: http://svn.freebsd.org/changeset/base/202003 Log: - According to OpenSolaris it's sufficient to align the MSIs of a device in the table based on the count rather than the maxcount. Also the previous code didn't work properly as it would have been necessary to reserve the entire maxcount range in order keep later requests from filling the spare MSIs between count and maxcount, which would be complicated to unreserve in fire_release_msi(). - For MSIs with filters rather than handlers only don't clear the event queue interrupt via fire_intr_clear() since given that these are executed directly would clear it while we're still processing the event queue, which in turn would lead to lost MSIs. - Save one level of indentation in fire_setup_intr(). - Correct a bug in fire_teardown_intr() which prevented it from correctly restoring the MSI in the resource, causing allocation of a resource representing an MSI to fail after the first pass when repeatedly loading and unloading a driver module. Modified: head/sys/sparc64/pci/fire.c Modified: head/sys/sparc64/pci/fire.c ============================================================================== --- head/sys/sparc64/pci/fire.c Sun Jan 10 14:55:38 2010 (r202002) +++ head/sys/sparc64/pci/fire.c Sun Jan 10 15:12:15 2010 (r202003) @@ -83,6 +83,8 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" +struct fire_msiqarg; + static bus_space_tag_t fire_alloc_bus_tag(struct fire_softc *sc, int type); static const struct fire_desc *fire_get_desc(device_t dev); static void fire_dmamap_sync(bus_dma_tag_t dt __unused, bus_dmamap_t map, @@ -94,6 +96,9 @@ static void fire_intr_clear(void *arg); static void fire_intr_disable(void *arg); static void fire_intr_enable(void *arg); static int fire_intr_register(struct fire_softc *sc, u_int ino); +static inline void fire_msiq_common(struct intr_vector *iv, + struct fire_msiqarg *fmqa); +static void fire_msiq_filter(void *cookie); static void fire_msiq_handler(void *cookie); static void fire_set_intr(struct fire_softc *sc, u_int index, u_int ino, driver_filter_t handler, void *arg); @@ -184,6 +189,13 @@ struct fire_icarg { bus_addr_t fica_clr; }; +static const struct intr_controller fire_msiqc_filter = { + fire_intr_enable, + fire_intr_disable, + fire_intr_assign, + NULL +}; + struct fire_msiqarg { struct fire_icarg fmqa_fica; struct mtx fmqa_mtx; @@ -1611,7 +1623,7 @@ fire_intr_clear(void *arg) */ static int -fire_alloc_msi(device_t dev, device_t child, int count, int maxcount, +fire_alloc_msi(device_t dev, device_t child, int count, int maxcount __unused, int *irqs) { struct fire_softc *sc; @@ -1637,16 +1649,11 @@ fire_alloc_msi(device_t dev, device_t ch mtx_unlock(&sc->sc_msi_mtx); return (ENXIO); } - /* - * It's unclear whether we need to actually align the MSIs in the - * mapping table based on the maxcount or just the count. We use - * maxcount to be on the safe side. - */ - for (i = 0; i + maxcount < sc->sc_msi_count; i += maxcount) { - for (j = i; j < i + maxcount; j++) + for (i = 0; i + count < sc->sc_msi_count; i += count) { + for (j = i; j < i + count; j++) if (isclr(sc->sc_msi_bitmap, j) == 0) break; - if (j == i + maxcount) { + if (j == i + count) { for (j = 0; j < count; j++) { setbit(sc->sc_msiq_bitmap, msiqrun + j); setbit(sc->sc_msi_bitmap, i + j); @@ -1765,33 +1772,67 @@ fire_msiq_handler(void *cookie) { struct intr_vector *iv; struct fire_msiqarg *fmqa; - struct fire_softc *sc; - struct fo_msiq_record *qrec; - device_t dev; - uint64_t word0; - u_int head, msi, msiq; iv = cookie; fmqa = iv->iv_icarg; - sc = fmqa->fmqa_fica.fica_sc; - dev = sc->sc_dev; - msiq = fmqa->fmqa_msiq; /* * Note that since fire_intr_clear() will clear the event queue - * interrupt after the filter/handler associated with the MSI [sic] - * has been executed we have to protect the access to the event queue - * as otherwise nested event queue interrupts cause corruption of the + * interrupt after the handler associated with the MSI [sic] has + * been executed we have to protect the access to the event queue as + * otherwise nested event queue interrupts cause corruption of the * event queue on MP machines. Obviously especially when abandoning * the 1:1 mapping it would be better to not clear the event queue - * interrupt after each filter/handler invocation but only once when - * the outstanding MSIs have been processed but unfortunately that + * interrupt after each handler invocation but only once when the + * outstanding MSIs have been processed but unfortunately that * doesn't work well and leads to interrupt storms with controllers/ - * drivers which don't mask interrupts while the filter/handler is - * executed. Maybe delaying clearing the MSI until after the filter/ - * handler has been executed could be used to work around this but - * that's not the intended usage and might in turn cause lost MSIs. + * drivers which don't mask interrupts while the handler is executed. + * Maybe delaying clearing the MSI until after the handler has been + * executed could be used to work around this but that's not the + * intended usage and might in turn cause lost MSIs. */ mtx_lock_spin(&fmqa->fmqa_mtx); + fire_msiq_common(iv, fmqa); + mtx_unlock_spin(&fmqa->fmqa_mtx); +} + +static void +fire_msiq_filter(void *cookie) +{ + struct intr_vector *iv; + struct fire_msiqarg *fmqa; + + iv = cookie; + fmqa = iv->iv_icarg; + /* + * For filters we don't use fire_intr_clear() since it would clear + * the event queue interrupt while we're still processing the event + * queue as filters and associated post-filter handler are executed + * directly, which in turn would lead to lost MSIs. So we clear the + * event queue interrupt only once after processing the event queue. + * Given that this still guarantees the filters to not be executed + * concurrently and no other CPU can clear the event queue interrupt + * while the event queue is still processed, we don't even need to + * interlock the access to the event queue in this case. + */ + critical_enter(); + fire_msiq_common(iv, fmqa); + FIRE_PCI_WRITE_8(fmqa->fmqa_fica.fica_sc, fmqa->fmqa_fica.fica_clr, + INTCLR_IDLE); + critical_exit(); +} + +static inline void +fire_msiq_common(struct intr_vector *iv, struct fire_msiqarg *fmqa) +{ + struct fire_softc *sc; + struct fo_msiq_record *qrec; + device_t dev; + uint64_t word0; + u_int head, msi, msiq; + + sc = fmqa->fmqa_fica.fica_sc; + dev = sc->sc_dev; + msiq = fmqa->fmqa_msiq; head = (FIRE_PCI_READ_8(sc, fmqa->fmqa_head) & FO_PCI_EQ_HD_MASK) >> FO_PCI_EQ_HD_SHFT; qrec = &fmqa->fmqa_base[head]; @@ -1833,7 +1874,6 @@ fire_msiq_handler(void *cookie) FIRE_PCI_READ_8(sc, FO_PCI_EQ_CTRL_CLR_BASE + msiq) | FO_PCI_EQ_CTRL_CLR_COVERR); } - mtx_unlock_spin(&fmqa->fmqa_mtx); } static int @@ -1872,31 +1912,32 @@ fire_setup_intr(device_t dev, device_t c intr, arg, cookiep); rman_set_start(ires, msi); rman_set_end(ires, msi); - if (error == 0) { - /* - * XXX inject our event queue handler. - */ + if (error != 0) + return (error); + /* + * XXX inject our event queue handler. + */ + if (filt != NULL) { + intr_vectors[vec].iv_func = fire_msiq_filter; + intr_vectors[vec].iv_ic = &fire_msiqc_filter; + } else intr_vectors[vec].iv_func = fire_msiq_handler; - /* - * Record the MSI/MSI-X as long as we we use a 1:1 - * mapping. - */ - ((struct fire_msiqarg *)intr_vectors[vec].iv_icarg)-> - fmqa_msi = msi; - FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_CTRL_SET_BASE + - (msiq << 3), FO_PCI_EQ_CTRL_SET_EN); - msi <<= 3; - FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, - (FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) & - ~FO_PCI_MSI_MAP_EQNUM_MASK) | - ((msiq << FO_PCI_MSI_MAP_EQNUM_SHFT) & - FO_PCI_MSI_MAP_EQNUM_MASK)); - FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_CLR_BASE + msi, - FO_PCI_MSI_CLR_EQWR_N); - FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, - FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) | - FO_PCI_MSI_MAP_V); - } + /* Record the MSI/MSI-X as long as we we use a 1:1 mapping. */ + ((struct fire_msiqarg *)intr_vectors[vec].iv_icarg)-> + fmqa_msi = msi; + FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_CTRL_SET_BASE + (msiq << 3), + FO_PCI_EQ_CTRL_SET_EN); + msi <<= 3; + FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, + (FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) & + ~FO_PCI_MSI_MAP_EQNUM_MASK) | + ((msiq << FO_PCI_MSI_MAP_EQNUM_SHFT) & + FO_PCI_MSI_MAP_EQNUM_MASK)); + FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_CLR_BASE + msi, + FO_PCI_MSI_CLR_EQWR_N); + FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, + FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) | + FO_PCI_MSI_MAP_V); return (error); } @@ -1945,14 +1986,16 @@ fire_teardown_intr(device_t dev, device_ (0 << FO_PCI_EQ_TL_SHFT) & FO_PCI_EQ_TL_MASK); FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_HD_BASE + msiq, (0 << FO_PCI_EQ_HD_SHFT) & FO_PCI_EQ_HD_MASK); + intr_vectors[vec].iv_ic = &fire_ic; /* * The MD interrupt code needs the vector rather than the MSI. */ rman_set_start(ires, vec); rman_set_end(ires, vec); error = bus_generic_teardown_intr(dev, child, ires, cookie); + msi >>= 3; rman_set_start(ires, msi); - rman_set_end(ires, msi >> 3); + rman_set_end(ires, msi); return (error); } return (bus_generic_teardown_intr(dev, child, ires, cookie)); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 15:44:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADF77106566B; Sun, 10 Jan 2010 15:44:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B47C8FC1B; Sun, 10 Jan 2010 15:44:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AFim0Z068488; Sun, 10 Jan 2010 15:44:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AFim1o068482; Sun, 10 Jan 2010 15:44:48 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001101544.o0AFim1o068482@svn.freebsd.org> From: Marius Strobl Date: Sun, 10 Jan 2010 15:44:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202006 - in head/sys: conf modules modules/epic sparc64/conf sparc64/ebus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 15:44:48 -0000 Author: marius Date: Sun Jan 10 15:44:48 2010 New Revision: 202006 URL: http://svn.freebsd.org/changeset/base/202006 Log: Add epic(4), a driver for the front panel LEDs in Sun Fire V215/V245. It's named after the driver doing the same job in OpenSolaris. Added: head/sys/modules/epic/ head/sys/modules/epic/Makefile (contents, props changed) head/sys/sparc64/ebus/epic.c (contents, props changed) Modified: head/sys/conf/files.sparc64 head/sys/modules/Makefile head/sys/sparc64/conf/GENERIC Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Sun Jan 10 15:25:45 2010 (r202005) +++ head/sys/conf/files.sparc64 Sun Jan 10 15:44:48 2010 (r202006) @@ -67,6 +67,7 @@ libkern/flsl.c standard libkern/memmove.c standard sparc64/central/central.c optional central sparc64/ebus/ebus.c optional ebus +sparc64/ebus/epic.c optional epic ebus sparc64/fhc/clkbrd.c optional fhc sparc64/fhc/fhc.c optional fhc sparc64/isa/isa.c optional isa Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Jan 10 15:25:45 2010 (r202005) +++ head/sys/modules/Makefile Sun Jan 10 15:44:48 2010 (r202006) @@ -81,6 +81,7 @@ SUBDIR= ${_3dfx} \ ${_em} \ en \ ${_ep} \ + ${_epic} \ ${_et} \ ${_ex} \ ${_exca} \ @@ -602,6 +603,7 @@ _sound= sound .if ${MACHINE_ARCH} == "sparc64" _auxio= auxio _em= em +_epic= epic _i2c= i2c _igb= igb .if ${MK_CDDL} != "no" || defined(ALL_MODULES) Added: head/sys/modules/epic/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/epic/Makefile Sun Jan 10 15:44:48 2010 (r202006) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../sparc64/ebus + +KMOD= epic +SRCS= device_if.h epic.c bus_if.h ofw_bus_if.h + +.include Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Sun Jan 10 15:25:45 2010 (r202005) +++ head/sys/sparc64/conf/GENERIC Sun Jan 10 15:44:48 2010 (r202006) @@ -150,6 +150,7 @@ device eeprom # eeprom (really a front device mk48txx # Mostek MK48Txx clocks device rtc # rtc (really a front-end for the MC146818) device mc146818 # Motorola MC146818 and compatible clocks +device epic # Sun Fire V215/V245 LEDs # Serial (COM) ports device puc # Multi-channel uarts Added: head/sys/sparc64/ebus/epic.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sparc64/ebus/epic.c Sun Jan 10 15:44:48 2010 (r202006) @@ -0,0 +1,216 @@ +/*- + * Copyright (c) 2009 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#define EPIC_DELAY 10000 + +#define EPIC_NREG 1 +#define EPIC_FW_LED 0 + +#define EPIC_FW_LED_DATA 0x40 +#define EPIC_FW_LED_ADDR 0x41 +#define EPIC_FW_LED_WRITE_MASK 0x80 + +#define EPIC_FW_VERSION 0x05 +#define EPIC_LED_STATE0 0x06 + +#define EPIC_LED_ALERT_MASK 0x0c +#define EPIC_LED_ALERT_OFF 0x00 +#define EPIC_LED_ALERT_ON 0x04 + +#define EPIC_LED_POWER_MASK 0x30 +#define EPIC_LED_POWER_OFF 0x00 +#define EPIC_LED_POWER_ON 0x10 +#define EPIC_LED_POWER_SB_BLINK 0x20 +#define EPIC_LED_POWER_FAST_BLINK 0x30 + +static struct resource_spec epic_res_spec[] = { + { SYS_RES_MEMORY, EPIC_FW_LED, RF_ACTIVE }, + { -1, 0 } +}; + +struct epic_softc { + struct mtx sc_mtx; + struct resource *sc_res[EPIC_NREG]; + struct cdev *sc_led_dev_alert; + struct cdev *sc_led_dev_power; +}; + +#define EPIC_FW_LED_READ(sc, off) ({ \ + uint8_t __val; \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, (off));\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, 1, \ + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ + __val = bus_read_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA);\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA, 1, \ + BUS_SPACE_BARRIER_READ); \ + DELAY(EPIC_DELAY); \ + __val; \ +}) + +#define EPIC_FW_LED_WRITE(sc, off, mask, val) do { \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, (off));\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, 1, \ + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_WRITE_MASK, \ + (mask)); \ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_WRITE_MASK, \ + 1, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA, (val));\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA, 1, \ + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ +} while (0) + +#define EPIC_LOCK_INIT(sc) \ + mtx_init(&(sc)->sc_mtx, "epic mtx", NULL, MTX_DEF) +#define EPIC_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx) +#define EPIC_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define EPIC_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) + +static device_probe_t epic_probe; +static device_attach_t epic_attach; +static device_detach_t epic_detach; + +static void epic_led_alert(void *arg, int onoff); +static void epic_led_power(void *arg, int onoff); + +static device_method_t epic_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, epic_probe), + DEVMETHOD(device_attach, epic_attach), + DEVMETHOD(device_detach, epic_detach), + + KOBJMETHOD_END +}; + +static devclass_t epic_devclass; + +DEFINE_CLASS_0(epic, epic_driver, epic_methods, + sizeof(struct epic_softc)); +DRIVER_MODULE(epic, ebus, epic_driver, epic_devclass, 0, 0); + +static int +epic_probe(device_t dev) +{ + const char* compat; + + compat = ofw_bus_get_compat(dev); + if (compat != NULL && strcmp(ofw_bus_get_name(dev), + "env-monitor") == 0 && strcmp(compat, "epic") == 0) { + device_set_desc(dev, "Sun Fire V215/V245 LEDs"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); +} + +static int +epic_attach(device_t dev) +{ + struct epic_softc *sc; + + sc = device_get_softc(dev); + if (bus_alloc_resources(dev, epic_res_spec, sc->sc_res)) { + device_printf(dev, "failed to allocate resources\n"); + bus_release_resources(dev, epic_res_spec, sc->sc_res); + return (ENXIO); + } + + EPIC_LOCK_INIT(sc); + + if (bootverbose) + device_printf(dev, "version 0x%x\n", + EPIC_FW_LED_READ(sc, EPIC_FW_VERSION)); + + sc->sc_led_dev_alert = led_create(epic_led_alert, sc, "alert"); + sc->sc_led_dev_power = led_create(epic_led_power, sc, "power"); + + return (0); +} + +static int +epic_detach(device_t dev) +{ + struct epic_softc *sc; + + sc = device_get_softc(dev); + + led_destroy(sc->sc_led_dev_alert); + led_destroy(sc->sc_led_dev_power); + + bus_release_resources(dev, epic_res_spec, sc->sc_res); + + EPIC_LOCK_DESTROY(sc); + + return (0); +} + +static void +epic_led_alert(void *arg, int onoff) +{ + struct epic_softc *sc; + + sc = (struct epic_softc *)arg; + + EPIC_LOCK(sc); + EPIC_FW_LED_WRITE(sc, EPIC_LED_STATE0, EPIC_LED_ALERT_MASK, + onoff ? EPIC_LED_ALERT_ON : EPIC_LED_ALERT_OFF); + EPIC_UNLOCK(sc); +} + +static void +epic_led_power(void *arg, int onoff) +{ + struct epic_softc *sc; + + sc = (struct epic_softc *)arg; + + EPIC_LOCK(sc); + EPIC_FW_LED_WRITE(sc, EPIC_LED_STATE0, EPIC_LED_POWER_MASK, + onoff ? EPIC_LED_POWER_ON : EPIC_LED_POWER_OFF); + EPIC_UNLOCK(sc); +} From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 16:00:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01F3A1065670; Sun, 10 Jan 2010 16:00:00 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEF948FC0C; Sun, 10 Jan 2010 16:00:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AG00J2071878; Sun, 10 Jan 2010 16:00:00 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AG00p6071875; Sun, 10 Jan 2010 16:00:00 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201001101600.o0AG00p6071875@svn.freebsd.org> From: Fabien Thomas Date: Sun, 10 Jan 2010 16:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202008 - in stable/8/sys: dev/hwpmc sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 16:00:02 -0000 Author: fabient Date: Sun Jan 10 16:00:00 2010 New Revision: 202008 URL: http://svn.freebsd.org/changeset/base/202008 Log: MFC 201021: Log process mappings for existing processes at PMC start time. Modified: stable/8/sys/dev/hwpmc/hwpmc_mod.c stable/8/sys/sys/pmc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 15:59:59 2010 (r202007) +++ stable/8/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:00:00 2010 (r202008) @@ -63,6 +63,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include +#include + /* * Types */ @@ -1619,6 +1625,151 @@ pmc_log_kernel_mappings(struct pmc *pm) static void pmc_log_process_mappings(struct pmc_owner *po, struct proc *p) { + vm_map_t map; + struct vnode *vp; + struct vmspace *vm; + vm_map_entry_t entry; + vm_offset_t last_end; + u_int last_timestamp; + struct vnode *last_vp; + vm_offset_t start_addr; + vm_object_t obj, lobj, tobj; + char *fullpath, *freepath; + + last_vp = NULL; + last_end = (vm_offset_t) 0; + fullpath = freepath = NULL; + + if ((vm = vmspace_acquire_ref(p)) == NULL) + return; + + map = &vm->vm_map; + vm_map_lock_read(map); + + for (entry = map->header.next; entry != &map->header; entry = entry->next) { + + if (entry == NULL) { + PMCDBG(LOG,OPS,2, "hwpmc: vm_map entry unexpectedly " + "NULL! pid=%d vm_map=%p\n", p->p_pid, map); + break; + } + + /* + * We only care about executable map entries. + */ + if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) || + !(entry->protection & VM_PROT_EXECUTE) || + (entry->object.vm_object == NULL)) { + continue; + } + + obj = entry->object.vm_object; + VM_OBJECT_LOCK(obj); + + /* + * Walk the backing_object list to find the base + * (non-shadowed) vm_object. + */ + for (lobj = tobj = obj; tobj != NULL; tobj = tobj->backing_object) { + if (tobj != obj) + VM_OBJECT_LOCK(tobj); + if (lobj != obj) + VM_OBJECT_UNLOCK(lobj); + lobj = tobj; + } + + /* + * At this point lobj is the base vm_object and it is locked. + */ + if (lobj == NULL) { + PMCDBG(LOG,OPS,2, "hwpmc: lobj unexpectedly NULL! pid=%d " + "vm_map=%p vm_obj=%p\n", p->p_pid, map, obj); + VM_OBJECT_UNLOCK(obj); + continue; + } + + if (lobj->type != OBJT_VNODE || lobj->handle == NULL) { + if (lobj != obj) + VM_OBJECT_UNLOCK(lobj); + VM_OBJECT_UNLOCK(obj); + continue; + } + + /* + * Skip contiguous regions that point to the same + * vnode, so we don't emit redundant MAP-IN + * directives. + */ + if (entry->start == last_end && lobj->handle == last_vp) { + last_end = entry->end; + if (lobj != obj) + VM_OBJECT_UNLOCK(lobj); + VM_OBJECT_UNLOCK(obj); + continue; + } + + /* + * We don't want to keep the proc's vm_map or this + * vm_object locked while we walk the pathname, since + * vn_fullpath() can sleep. However, if we drop the + * lock, it's possible for concurrent activity to + * modify the vm_map list. To protect against this, + * we save the vm_map timestamp before we release the + * lock, and check it after we reacquire the lock + * below. + */ + start_addr = entry->start; + last_end = entry->end; + last_timestamp = map->timestamp; + vm_map_unlock_read(map); + + vp = lobj->handle; + vref(vp); + if (lobj != obj) + VM_OBJECT_UNLOCK(lobj); + + VM_OBJECT_UNLOCK(obj); + + freepath = NULL; + pmc_getfilename(vp, &fullpath, &freepath); + last_vp = vp; + vrele(vp); + vp = NULL; + pmclog_process_map_in(po, p->p_pid, start_addr, fullpath); + if (freepath) + free(freepath, M_TEMP); + + vm_map_lock_read(map); + + /* + * If our saved timestamp doesn't match, this means + * that the vm_map was modified out from under us and + * we can't trust our current "entry" pointer. Do a + * new lookup for this entry. If there is no entry + * for this address range, vm_map_lookup_entry() will + * return the previous one, so we always want to go to + * entry->next on the next loop iteration. + * + * There is an edge condition here that can occur if + * there is no entry at or before this address. In + * this situation, vm_map_lookup_entry returns + * &map->header, which would cause our loop to abort + * without processing the rest of the map. However, + * in practice this will never happen for process + * vm_map. This is because the executable's text + * segment is the first mapping in the proc's address + * space, and this mapping is never removed until the + * process exits, so there will always be a non-header + * entry at or before the requested address for + * vm_map_lookup_entry to return. + */ + if (map->timestamp != last_timestamp) + vm_map_lookup_entry(map, last_end - 1, &entry); + } + + vm_map_unlock_read(map); + vmspace_free(vm); + return; } /* @@ -1897,7 +2048,7 @@ pmc_allocate_owner_descriptor(struct pro /* allocate space for N pointers and one descriptor struct */ po = malloc(sizeof(struct pmc_owner), M_PMC, M_WAITOK|M_ZERO); - po->po_sscount = po->po_error = po->po_flags = 0; + po->po_sscount = po->po_error = po->po_flags = po->po_logprocmaps = 0; po->po_file = NULL; po->po_owner = p; po->po_kthread = NULL; @@ -2520,8 +2671,15 @@ pmc_start(struct pmc *pm) po->po_sscount++; } - /* Log mapping information for all processes in the system. */ - pmc_log_all_process_mappings(po); + /* + * Log mapping information for all existing processes in the + * system. Subsequent mappings are logged as they happen; + * see pmc_process_mmap(). + */ + if (po->po_logprocmaps == 0) { + pmc_log_all_process_mappings(po); + po->po_logprocmaps = 1; + } /* * Move to the CPU associated with this Modified: stable/8/sys/sys/pmc.h ============================================================================== --- stable/8/sys/sys/pmc.h Sun Jan 10 15:59:59 2010 (r202007) +++ stable/8/sys/sys/pmc.h Sun Jan 10 16:00:00 2010 (r202008) @@ -750,7 +750,8 @@ struct pmc_owner { struct pmclog_buffer *po_curbuf; /* current log buffer */ struct file *po_file; /* file reference */ int po_error; /* recorded error */ - int po_sscount; /* # SS PMCs owned */ + short po_sscount; /* # SS PMCs owned */ + short po_logprocmaps; /* global mappings done */ }; #define PMC_PO_OWNS_LOGFILE 0x00000001 /* has a log file */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 16:04:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45934106568B; Sun, 10 Jan 2010 16:04:33 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 344AD8FC15; Sun, 10 Jan 2010 16:04:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AG4XUY072981; Sun, 10 Jan 2010 16:04:33 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AG4XR5072979; Sun, 10 Jan 2010 16:04:33 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201001101604.o0AG4XR5072979@svn.freebsd.org> From: Fabien Thomas Date: Sun, 10 Jan 2010 16:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202009 - stable/8/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 16:04:33 -0000 Author: fabient Date: Sun Jan 10 16:04:32 2010 New Revision: 202009 URL: http://svn.freebsd.org/changeset/base/202009 Log: MFC 201023: * Support the L1D_CACHE_LD event on Core2 processors. * Correct a group of typos: for Core2 programmable events, check user supplied umask values against the correct event descriptor field. Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_core.c Sun Jan 10 16:00:00 2010 (r202008) +++ stable/8/sys/dev/hwpmc/hwpmc_core.c Sun Jan 10 16:04:32 2010 (r202009) @@ -669,7 +669,7 @@ static struct iap_event_descr iap_events IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUS), IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC), + IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), IAPDESCR(40H_21H, 0x40, 0x21, IAP_F_FM | IAP_F_CA), IAPDESCR(41H, 0x41, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), @@ -1419,17 +1419,17 @@ iap_allocate_pmc(int cpu, int ri, struct mask = 0; - if (ie->iap_flags & IAP_M_CORE) { + if (ie->iap_umask & IAP_M_CORE) { if ((c = (config & IAP_F_CORE)) != IAP_CORE_ALL && c != IAP_CORE_THIS) return (EINVAL); mask |= IAP_F_CORE; } - if (ie->iap_flags & IAP_M_AGENT) + if (ie->iap_umask & IAP_M_AGENT) mask |= IAP_F_AGENT; - if (ie->iap_flags & IAP_M_PREFETCH) { + if (ie->iap_umask & IAP_M_PREFETCH) { if ((c = (config & IAP_F_PREFETCH)) == IAP_PREFETCH_RESERVED) @@ -1438,16 +1438,16 @@ iap_allocate_pmc(int cpu, int ri, struct mask |= IAP_F_PREFETCH; } - if (ie->iap_flags & IAP_M_MESI) + if (ie->iap_umask & IAP_M_MESI) mask |= IAP_F_MESI; - if (ie->iap_flags & IAP_M_SNOOPRESPONSE) + if (ie->iap_umask & IAP_M_SNOOPRESPONSE) mask |= IAP_F_SNOOPRESPONSE; - if (ie->iap_flags & IAP_M_SNOOPTYPE) + if (ie->iap_umask & IAP_M_SNOOPTYPE) mask |= IAP_F_SNOOPTYPE; - if (ie->iap_flags & IAP_M_TRANSITION) + if (ie->iap_umask & IAP_M_TRANSITION) mask |= IAP_F_TRANSITION; /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 16:04:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D61AA1065679; Sun, 10 Jan 2010 16:04:55 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5D908FC12; Sun, 10 Jan 2010 16:04:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AG4t6T073084; Sun, 10 Jan 2010 16:04:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AG4tQt073082; Sun, 10 Jan 2010 16:04:55 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001101604.o0AG4tQt073082@svn.freebsd.org> From: Marius Strobl Date: Sun, 10 Jan 2010 16:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202010 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 16:04:55 -0000 Author: marius Date: Sun Jan 10 16:04:55 2010 New Revision: 202010 URL: http://svn.freebsd.org/changeset/base/202010 Log: Now that everything required to properly support Sun Fire V215/V245 is in place (r201932 and r202003 were the last parts missing), hook up fire(4). Modified: head/sys/conf/files.sparc64 Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Sun Jan 10 16:04:32 2010 (r202009) +++ head/sys/conf/files.sparc64 Sun Jan 10 16:04:55 2010 (r202010) @@ -74,6 +74,7 @@ sparc64/isa/isa.c optional isa sparc64/isa/isa_dma.c optional isa sparc64/isa/ofw_isa.c optional ebus | isa sparc64/pci/apb.c optional pci +sparc64/pci/fire.c optional pci sparc64/pci/ofw_pcib.c optional pci sparc64/pci/ofw_pcib_subr.c optional pci sparc64/pci/ofw_pcibus.c optional pci From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 16:05:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17D0E106566B; Sun, 10 Jan 2010 16:05:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00B0C8FC15; Sun, 10 Jan 2010 16:05:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AG55TX073172; Sun, 10 Jan 2010 16:05:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AG55a2073170; Sun, 10 Jan 2010 16:05:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001101605.o0AG55a2073170@svn.freebsd.org> From: Alexander Motin Date: Sun, 10 Jan 2010 16:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202011 - head/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 16:05:06 -0000 Author: mav Date: Sun Jan 10 16:05:05 2010 New Revision: 202011 URL: http://svn.freebsd.org/changeset/base/202011 Log: While AHCI specification tells that multi-vector MSI doesn't use global IS register, nVidia chipsets have different oppinion, requiring every interrupt to be acknowledged there. While there, add interrupt descriptions in multi-vector MSI mode. Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Jan 10 16:04:55 2010 (r202010) +++ head/sys/dev/ahci/ahci.c Sun Jan 10 16:05:05 2010 (r202011) @@ -570,6 +570,12 @@ ahci_setup_interrupt(device_t dev) device_printf(dev, "unable to setup interrupt\n"); return ENXIO; } + if (ctlr->numirqs > 1) { + bus_describe_intr(dev, ctlr->irqs[i].r_irq, + ctlr->irqs[i].handle, + ctlr->irqs[i].mode == AHCI_IRQ_MODE_ONE ? + "ch%d" : "%d", i); + } } return (0); } @@ -622,8 +628,14 @@ ahci_intr_one(void *data) int unit; unit = irq->r_irq_rid - 1; + /* Some controllers have edge triggered IS. */ + if (ctlr->quirks & AHCI_Q_EDGEIS) + ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); if ((arg = ctlr->interrupt[unit].argument)) ctlr->interrupt[unit].function(arg); + /* AHCI declares level triggered IS. */ + if (!(ctlr->quirks & AHCI_Q_EDGEIS)) + ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); } static struct resource * From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 16:08:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F06F1065670; Sun, 10 Jan 2010 16:08:14 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB2F8FC19; Sun, 10 Jan 2010 16:08:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AG8Ex2073893; Sun, 10 Jan 2010 16:08:14 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AG8EUj073891; Sun, 10 Jan 2010 16:08:14 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201001101608.o0AG8EUj073891@svn.freebsd.org> From: Fabien Thomas Date: Sun, 10 Jan 2010 16:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202012 - stable/8/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 16:08:14 -0000 Author: fabient Date: Sun Jan 10 16:08:14 2010 New Revision: 202012 URL: http://svn.freebsd.org/changeset/base/202012 Log: MFC 201151: Use VFS_{LOCK,UNLOCK}_GIANT() around the call to vrele(). Modified: stable/8/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:05:05 2010 (r202011) +++ stable/8/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:08:14 2010 (r202012) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1625,6 +1626,7 @@ pmc_log_kernel_mappings(struct pmc *pm) static void pmc_log_process_mappings(struct pmc_owner *po, struct proc *p) { + int locked; vm_map_t map; struct vnode *vp; struct vmspace *vm; @@ -1733,7 +1735,11 @@ pmc_log_process_mappings(struct pmc_owne freepath = NULL; pmc_getfilename(vp, &fullpath, &freepath); last_vp = vp; + + locked = VFS_LOCK_GIANT(vp->v_mount); vrele(vp); + VFS_UNLOCK_GIANT(locked); + vp = NULL; pmclog_process_map_in(po, p->p_pid, start_addr, fullpath); if (freepath) From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 16:36:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C03911065679; Sun, 10 Jan 2010 16:36:43 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEC898FC19; Sun, 10 Jan 2010 16:36:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AGahuj080266; Sun, 10 Jan 2010 16:36:43 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AGahlB080263; Sun, 10 Jan 2010 16:36:43 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201001101636.o0AGahlB080263@svn.freebsd.org> From: Fabien Thomas Date: Sun, 10 Jan 2010 16:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202014 - in stable/7/sys: dev/hwpmc sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 16:36:43 -0000 Author: fabient Date: Sun Jan 10 16:36:43 2010 New Revision: 202014 URL: http://svn.freebsd.org/changeset/base/202014 Log: MFC 201021: Log process mappings for existing processes at PMC start time. Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c stable/7/sys/sys/pmc.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:30:54 2010 (r202013) +++ stable/7/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:36:43 2010 (r202014) @@ -63,6 +63,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include +#include + /* * Types */ @@ -1622,6 +1628,151 @@ pmc_log_kernel_mappings(struct pmc *pm) static void pmc_log_process_mappings(struct pmc_owner *po, struct proc *p) { + vm_map_t map; + struct vnode *vp; + struct vmspace *vm; + vm_map_entry_t entry; + vm_offset_t last_end; + u_int last_timestamp; + struct vnode *last_vp; + vm_offset_t start_addr; + vm_object_t obj, lobj, tobj; + char *fullpath, *freepath; + + last_vp = NULL; + last_end = (vm_offset_t) 0; + fullpath = freepath = NULL; + + if ((vm = vmspace_acquire_ref(p)) == NULL) + return; + + map = &vm->vm_map; + vm_map_lock_read(map); + + for (entry = map->header.next; entry != &map->header; entry = entry->next) { + + if (entry == NULL) { + PMCDBG(LOG,OPS,2, "hwpmc: vm_map entry unexpectedly " + "NULL! pid=%d vm_map=%p\n", p->p_pid, map); + break; + } + + /* + * We only care about executable map entries. + */ + if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) || + !(entry->protection & VM_PROT_EXECUTE) || + (entry->object.vm_object == NULL)) { + continue; + } + + obj = entry->object.vm_object; + VM_OBJECT_LOCK(obj); + + /* + * Walk the backing_object list to find the base + * (non-shadowed) vm_object. + */ + for (lobj = tobj = obj; tobj != NULL; tobj = tobj->backing_object) { + if (tobj != obj) + VM_OBJECT_LOCK(tobj); + if (lobj != obj) + VM_OBJECT_UNLOCK(lobj); + lobj = tobj; + } + + /* + * At this point lobj is the base vm_object and it is locked. + */ + if (lobj == NULL) { + PMCDBG(LOG,OPS,2, "hwpmc: lobj unexpectedly NULL! pid=%d " + "vm_map=%p vm_obj=%p\n", p->p_pid, map, obj); + VM_OBJECT_UNLOCK(obj); + continue; + } + + if (lobj->type != OBJT_VNODE || lobj->handle == NULL) { + if (lobj != obj) + VM_OBJECT_UNLOCK(lobj); + VM_OBJECT_UNLOCK(obj); + continue; + } + + /* + * Skip contiguous regions that point to the same + * vnode, so we don't emit redundant MAP-IN + * directives. + */ + if (entry->start == last_end && lobj->handle == last_vp) { + last_end = entry->end; + if (lobj != obj) + VM_OBJECT_UNLOCK(lobj); + VM_OBJECT_UNLOCK(obj); + continue; + } + + /* + * We don't want to keep the proc's vm_map or this + * vm_object locked while we walk the pathname, since + * vn_fullpath() can sleep. However, if we drop the + * lock, it's possible for concurrent activity to + * modify the vm_map list. To protect against this, + * we save the vm_map timestamp before we release the + * lock, and check it after we reacquire the lock + * below. + */ + start_addr = entry->start; + last_end = entry->end; + last_timestamp = map->timestamp; + vm_map_unlock_read(map); + + vp = lobj->handle; + vref(vp); + if (lobj != obj) + VM_OBJECT_UNLOCK(lobj); + + VM_OBJECT_UNLOCK(obj); + + freepath = NULL; + pmc_getfilename(vp, &fullpath, &freepath); + last_vp = vp; + vrele(vp); + vp = NULL; + pmclog_process_map_in(po, p->p_pid, start_addr, fullpath); + if (freepath) + free(freepath, M_TEMP); + + vm_map_lock_read(map); + + /* + * If our saved timestamp doesn't match, this means + * that the vm_map was modified out from under us and + * we can't trust our current "entry" pointer. Do a + * new lookup for this entry. If there is no entry + * for this address range, vm_map_lookup_entry() will + * return the previous one, so we always want to go to + * entry->next on the next loop iteration. + * + * There is an edge condition here that can occur if + * there is no entry at or before this address. In + * this situation, vm_map_lookup_entry returns + * &map->header, which would cause our loop to abort + * without processing the rest of the map. However, + * in practice this will never happen for process + * vm_map. This is because the executable's text + * segment is the first mapping in the proc's address + * space, and this mapping is never removed until the + * process exits, so there will always be a non-header + * entry at or before the requested address for + * vm_map_lookup_entry to return. + */ + if (map->timestamp != last_timestamp) + vm_map_lookup_entry(map, last_end - 1, &entry); + } + + vm_map_unlock_read(map); + vmspace_free(vm); + return; } /* @@ -1900,7 +2051,7 @@ pmc_allocate_owner_descriptor(struct pro /* allocate space for N pointers and one descriptor struct */ po = malloc(sizeof(struct pmc_owner), M_PMC, M_WAITOK|M_ZERO); - po->po_sscount = po->po_error = po->po_flags = 0; + po->po_sscount = po->po_error = po->po_flags = po->po_logprocmaps = 0; po->po_file = NULL; po->po_owner = p; po->po_kthread = NULL; @@ -2523,8 +2674,15 @@ pmc_start(struct pmc *pm) po->po_sscount++; } - /* Log mapping information for all processes in the system. */ - pmc_log_all_process_mappings(po); + /* + * Log mapping information for all existing processes in the + * system. Subsequent mappings are logged as they happen; + * see pmc_process_mmap(). + */ + if (po->po_logprocmaps == 0) { + pmc_log_all_process_mappings(po); + po->po_logprocmaps = 1; + } /* * Move to the CPU associated with this Modified: stable/7/sys/sys/pmc.h ============================================================================== --- stable/7/sys/sys/pmc.h Sun Jan 10 16:30:54 2010 (r202013) +++ stable/7/sys/sys/pmc.h Sun Jan 10 16:36:43 2010 (r202014) @@ -755,7 +755,8 @@ struct pmc_owner { struct pmclog_buffer *po_curbuf; /* current log buffer */ struct file *po_file; /* file reference */ int po_error; /* recorded error */ - int po_sscount; /* # SS PMCs owned */ + short po_sscount; /* # SS PMCs owned */ + short po_logprocmaps; /* global mappings done */ }; #define PMC_PO_OWNS_LOGFILE 0x00000001 /* has a log file */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 16:40:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 070031065672; Sun, 10 Jan 2010 16:40:15 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D18088FC15; Sun, 10 Jan 2010 16:40:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AGeEfE081094; Sun, 10 Jan 2010 16:40:14 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AGeE0r081092; Sun, 10 Jan 2010 16:40:14 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201001101640.o0AGeE0r081092@svn.freebsd.org> From: Fabien Thomas Date: Sun, 10 Jan 2010 16:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202015 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 16:40:15 -0000 Author: fabient Date: Sun Jan 10 16:40:14 2010 New Revision: 202015 URL: http://svn.freebsd.org/changeset/base/202015 Log: MFC 201023: * Support the L1D_CACHE_LD event on Core2 processors. * Correct a group of typos: for Core2 programmable events, check user supplied umask values against the correct event descriptor field. Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_core.c Sun Jan 10 16:36:43 2010 (r202014) +++ stable/7/sys/dev/hwpmc/hwpmc_core.c Sun Jan 10 16:40:14 2010 (r202015) @@ -669,7 +669,7 @@ static struct iap_event_descr iap_events IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUS), IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC), + IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), IAPDESCR(40H_21H, 0x40, 0x21, IAP_F_FM | IAP_F_CA), IAPDESCR(41H, 0x41, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), @@ -1419,17 +1419,17 @@ iap_allocate_pmc(int cpu, int ri, struct mask = 0; - if (ie->iap_flags & IAP_M_CORE) { + if (ie->iap_umask & IAP_M_CORE) { if ((c = (config & IAP_F_CORE)) != IAP_CORE_ALL && c != IAP_CORE_THIS) return (EINVAL); mask |= IAP_F_CORE; } - if (ie->iap_flags & IAP_M_AGENT) + if (ie->iap_umask & IAP_M_AGENT) mask |= IAP_F_AGENT; - if (ie->iap_flags & IAP_M_PREFETCH) { + if (ie->iap_umask & IAP_M_PREFETCH) { if ((c = (config & IAP_F_PREFETCH)) == IAP_PREFETCH_RESERVED) @@ -1438,16 +1438,16 @@ iap_allocate_pmc(int cpu, int ri, struct mask |= IAP_F_PREFETCH; } - if (ie->iap_flags & IAP_M_MESI) + if (ie->iap_umask & IAP_M_MESI) mask |= IAP_F_MESI; - if (ie->iap_flags & IAP_M_SNOOPRESPONSE) + if (ie->iap_umask & IAP_M_SNOOPRESPONSE) mask |= IAP_F_SNOOPRESPONSE; - if (ie->iap_flags & IAP_M_SNOOPTYPE) + if (ie->iap_umask & IAP_M_SNOOPTYPE) mask |= IAP_F_SNOOPTYPE; - if (ie->iap_flags & IAP_M_TRANSITION) + if (ie->iap_umask & IAP_M_TRANSITION) mask |= IAP_F_TRANSITION; /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 16:43:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0A34106566B; Sun, 10 Jan 2010 16:43:45 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 900258FC12; Sun, 10 Jan 2010 16:43:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AGhjRX081889; Sun, 10 Jan 2010 16:43:45 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AGhjvT081887; Sun, 10 Jan 2010 16:43:45 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201001101643.o0AGhjvT081887@svn.freebsd.org> From: Fabien Thomas Date: Sun, 10 Jan 2010 16:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202016 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 16:43:45 -0000 Author: fabient Date: Sun Jan 10 16:43:45 2010 New Revision: 202016 URL: http://svn.freebsd.org/changeset/base/202016 Log: MFC 201151: Use VFS_{LOCK,UNLOCK}_GIANT() around the call to vrele(). Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:40:14 2010 (r202015) +++ stable/7/sys/dev/hwpmc/hwpmc_mod.c Sun Jan 10 16:43:45 2010 (r202016) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1628,6 +1629,7 @@ pmc_log_kernel_mappings(struct pmc *pm) static void pmc_log_process_mappings(struct pmc_owner *po, struct proc *p) { + int locked; vm_map_t map; struct vnode *vp; struct vmspace *vm; @@ -1736,7 +1738,11 @@ pmc_log_process_mappings(struct pmc_owne freepath = NULL; pmc_getfilename(vp, &fullpath, &freepath); last_vp = vp; + + locked = VFS_LOCK_GIANT(vp->v_mount); vrele(vp); + VFS_UNLOCK_GIANT(locked); + vp = NULL; pmclog_process_map_in(po, p->p_pid, start_addr, fullpath); if (freepath) From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 16:58:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A09D5106566B; Sun, 10 Jan 2010 16:58:12 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 765728FC08; Sun, 10 Jan 2010 16:58:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AGwCKu085116; Sun, 10 Jan 2010 16:58:12 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AGwCvw085115; Sun, 10 Jan 2010 16:58:12 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201001101658.o0AGwCvw085115@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 10 Jan 2010 16:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202017 - stable/8/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 16:58:12 -0000 Author: jilles Date: Sun Jan 10 16:58:12 2010 New Revision: 202017 URL: http://svn.freebsd.org/changeset/base/202017 Log: MFC r210428: sh: Add a regression test that tries out all arithmetic ops. The gaps in the numbering sequence cannot really be avoided, as HEAD changes are not necessarily merged in the same order as they are made (if they are merged at all). Added: stable/8/tools/regression/bin/sh/expansion/arith2.0 - copied unchanged from r201428, head/tools/regression/bin/sh/expansion/arith2.0 Modified: Directory Properties: stable/8/tools/regression/bin/sh/ (props changed) Copied: stable/8/tools/regression/bin/sh/expansion/arith2.0 (from r201428, head/tools/regression/bin/sh/expansion/arith2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/arith2.0 Sun Jan 10 16:58:12 2010 (r202017, copy of r201428, head/tools/regression/bin/sh/expansion/arith2.0) @@ -0,0 +1,76 @@ +# $FreeBSD$ + +failures=0 + +check() { + if [ $(($1)) != $2 ]; then + failures=$((failures+1)) + echo "For $1, expected $2 actual $(($1))" + fi +} + +# variables +unset v +check "v=2" 2 +check "v" 2 +check "$(($v))" 2 +check "v+=1" 3 +check "v" 3 + +# constants +check "4611686018427387904" 4611686018427387904 +check "0x4000000000000000" 4611686018427387904 +check "0400000000000000000000" 4611686018427387904 +check "0x4Ab0000000000000" 5381801554707742720 + +# try out all operators +v=42 +check "!v" 0 +check "!!v" 1 +check "!0" 1 +check "~0" -1 +check "~(-1)" 0 +check "-0" 0 +check "-v" -42 +check "v*v" 1764 +check "v/2" 21 +check "v%10" 2 +check "v+v" 84 +check "v-4" 38 +check "v<<1" 84 +check "v>>1" 21 +check "v<43" 1 +check "v>42" 0 +check "v<=43" 1 +check "v>=43" 0 +check "v==41" 0 +check "v!=42" 0 +check "v&3" 2 +check "v^3" 41 +check "v|3" 43 +check "v>=40&&v<=44" 1 +check "v<40||v>44" 0 +check "(v=42)&&(v+=1)==43" 1 +check "v" 43 +check "(v=42)&&(v-=1)==41" 1 +check "v" 41 +check "(v=42)&&(v*=2)==84" 1 +check "v" 84 +check "(v=42)&&(v/=10)==4" 1 +check "v" 4 +check "(v=42)&&(v%=10)==2" 1 +check "v" 2 +check "(v=42)&&(v<<=1)==84" 1 +check "v" 84 +check "(v=42)&&(v>>=2)==10" 1 +check "v" 10 +check "(v=42)&&(v&=32)==32" 1 +check "v" 32 +check "(v=42)&&(v^=32)==10" 1 +check "v" 10 +check "(v=42)&&(v|=32)==42" 1 +check "v" 42 + +# missing: ternary, comma + +exit $((failures != 0)) From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 17:40:15 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D50AA106566B; Sun, 10 Jan 2010 17:40:15 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 6466A8FC0A; Sun, 10 Jan 2010 17:40:14 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 712F3A5519A; Mon, 11 Jan 2010 01:40:12 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id 9zRp9o0GzZ6g; Mon, 11 Jan 2010 01:39:59 +0800 (CST) Received: from delta.delphij.net (c-69-181-136-105.hsd1.ca.comcast.net [69.181.136.105]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id AAC68A550C0; Mon, 11 Jan 2010 01:39:56 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=frLJyAzcuHwxyV79oCRrGU163RsvS+wJrvdJx2ujl+Cu/kK9jdly2hie4scl/U/vF OmCfwwHBe8XA1r3TIeo0g== Message-ID: <4B4A10E8.9050504@delphij.net> Date: Sun, 10 Jan 2010 09:39:52 -0800 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.5) Gecko/20091220 Thunderbird/3.0 ThunderBrowse/3.2.6.8 MIME-Version: 1.0 To: Maxim Dounin References: <201001100718.o0A7IaE9052662@svn.freebsd.org> <20100110133629.GF1063@mdounin.ru> In-Reply-To: <20100110133629.GF1063@mdounin.ru> X-Enigmail-Version: 1.0 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@FreeBSD.ORG, svn-src-stable@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: svn commit: r201988 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 17:40:16 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010/01/10 05:36, Maxim Dounin wrote: > Hello! > > On Sun, Jan 10, 2010 at 07:18:36AM +0000, Xin LI wrote: > >> Author: delphij >> Date: Sun Jan 10 07:18:35 2010 >> New Revision: 201988 >> URL: http://svn.freebsd.org/changeset/base/201988 >> >> Log: >> MFC r201756: >> >> Re-apply onnv-gate revisions 7994 and 8986 (corresponds to FreeBSD >> revision 200726 and 200727). > > For source control onnv-gate uses Mercurial, and this means that > revision numbers make sense only for one particular clone. It > make sense to record changeset hash instead, which is stable > between clones. See here for more details: > > http://mercurial.selenic.com/wiki/RevisionNumber > > Just for the record: > > 7994:7a573dc88b73 > 8986:45c289aff7c9 Thanks for the hint, I'll make sure that these information be included next time. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLShDoAAoJEATO+BI/yjfBBQ8H/1YjObGpgT9uV7T6P65DNuSa 7sT279l89dafIYcaeBGiCkeajW9mQFM82Z3o3jJ1m4RLrZltoi7IlSzwUmQvs3oY wXOo/58x17N8XFTd2fB0Yxl/ph80hx3tB8G0jb9kqYlQGW+zsMKYyhemUsHUBexs dUu6Pn3bmVpuC1URNBjRaV+oqaLb8PE06+ZBZNJ4/iLSM569Twl+VepON+AIl0M3 JMq/EDB62Ad2pXR8tYNGRU8KVYfjn6AqsNiIQA/dMmBXdx7INmvIU9IU9SpP9ok6 AgBrh8FQqWBGgkaOuA2Tlt2OSeRHRQmSuJNywYPVP8SaaU+LhqoOYEd2l2lE7qU= =go2M -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 17:44:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2407B106568B; Sun, 10 Jan 2010 17:44:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13B9E8FC25; Sun, 10 Jan 2010 17:44:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AHiMt6095310; Sun, 10 Jan 2010 17:44:22 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AHiM2d095302; Sun, 10 Jan 2010 17:44:22 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001101744.o0AHiM2d095302@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 17:44:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202019 - in head/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 17:44:23 -0000 Author: imp Date: Sun Jan 10 17:44:22 2010 New Revision: 202019 URL: http://svn.freebsd.org/changeset/base/202019 Log: Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. # This is the resolution of removing it from DEFAULTS... MFC after: 5 days Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/ia64/conf/GENERIC head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/sparc64/conf/GENERIC head/sys/sun4v/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Jan 10 17:15:36 2010 (r202018) +++ head/sys/amd64/conf/GENERIC Sun Jan 10 17:44:22 2010 (r202019) @@ -75,6 +75,7 @@ options MAC # TrustedBSD MAC Framewor options FLOWTABLE # per-cpu routing cache #options KDTRACE_FRAME # Ensure frames are compiled in #options KDTRACE_HOOKS # Kernel DTrace hooks +options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging for use in -current options KDB # Enable kernel debugger support. Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Sun Jan 10 17:15:36 2010 (r202018) +++ head/sys/i386/conf/GENERIC Sun Jan 10 17:44:22 2010 (r202019) @@ -75,6 +75,7 @@ options AUDIT # Security event auditi options MAC # TrustedBSD MAC Framework options FLOWTABLE # per-cpu routing cache #options KDTRACE_HOOKS # Kernel DTrace hooks +options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging for use in -current options KDB # Enable kernel debugger support. Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Sun Jan 10 17:15:36 2010 (r202018) +++ head/sys/ia64/conf/GENERIC Sun Jan 10 17:44:22 2010 (r202019) @@ -67,6 +67,7 @@ options WITNESS # Enable checks to det options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +options INCLUDE_CONFIG_FILE # Include this file in kernel # Various "busses" device firewire # FireWire bus code Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sun Jan 10 17:15:36 2010 (r202018) +++ head/sys/pc98/conf/GENERIC Sun Jan 10 17:44:22 2010 (r202019) @@ -75,6 +75,7 @@ options KBD_INSTALL_CDEV # install a CD options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework +options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging for use in -current options KDB # Enable kernel debugger support. Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Sun Jan 10 17:15:36 2010 (r202018) +++ head/sys/powerpc/conf/GENERIC Sun Jan 10 17:44:22 2010 (r202019) @@ -66,6 +66,7 @@ options _KPOSIX_PRIORITY_SCHEDULING #Po options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework +options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging for use in -current options KDB #Enable the kernel debugger Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Sun Jan 10 17:15:36 2010 (r202018) +++ head/sys/sparc64/conf/GENERIC Sun Jan 10 17:44:22 2010 (r202019) @@ -72,6 +72,7 @@ options PRINTF_BUFR_SIZE=128 # Prevent options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework +options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging for use in -current options KDB # Enable kernel debugger support. Modified: head/sys/sun4v/conf/GENERIC ============================================================================== --- head/sys/sun4v/conf/GENERIC Sun Jan 10 17:15:36 2010 (r202018) +++ head/sys/sun4v/conf/GENERIC Sun Jan 10 17:44:22 2010 (r202019) @@ -66,6 +66,7 @@ options PRINTF_BUFR_SIZE=128 # Prevent options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework +options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging for use in -current options KDB # Enable kernel debugger support. @@ -219,4 +220,3 @@ device ccd # on most arches and in most cases 1000Hz pessimizes performance # its choice was not adequately researched options HZ=100 - From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 18:39:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CB251065672; Sun, 10 Jan 2010 18:39:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D70E8FC0C; Sun, 10 Jan 2010 18:39:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AIdTwO007644; Sun, 10 Jan 2010 18:39:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AIdTrY007642; Sun, 10 Jan 2010 18:39:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001101839.o0AIdTrY007642@svn.freebsd.org> From: Marius Strobl Date: Sun, 10 Jan 2010 18:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202023 - head/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 18:39:29 -0000 Author: marius Date: Sun Jan 10 18:39:29 2010 New Revision: 202023 URL: http://svn.freebsd.org/changeset/base/202023 Log: When setting up MSIs with a filter ensure that the event queue interrupt is cleared as it might have triggered before and given we supply NULL as ic_clear, inthand_add() won't do this for us in this case. Modified: head/sys/sparc64/pci/fire.c Modified: head/sys/sparc64/pci/fire.c ============================================================================== --- head/sys/sparc64/pci/fire.c Sun Jan 10 18:09:33 2010 (r202022) +++ head/sys/sparc64/pci/fire.c Sun Jan 10 18:39:29 2010 (r202023) @@ -1882,6 +1882,7 @@ fire_setup_intr(device_t dev, device_t c void **cookiep) { struct fire_softc *sc; + struct fire_msiqarg *fmqa; u_long vec; int error; u_int msi, msiq; @@ -1914,17 +1915,24 @@ fire_setup_intr(device_t dev, device_t c rman_set_end(ires, msi); if (error != 0) return (error); + fmqa = intr_vectors[vec].iv_icarg; /* * XXX inject our event queue handler. */ if (filt != NULL) { intr_vectors[vec].iv_func = fire_msiq_filter; intr_vectors[vec].iv_ic = &fire_msiqc_filter; + /* + * Ensure the event queue interrupt is cleared, it + * might have triggered before. Given we supply NULL + * as ic_clear, inthand_add() won't do this for us. + */ + FIRE_PCI_WRITE_8(sc, fmqa->fmqa_fica.fica_clr, + INTCLR_IDLE); } else intr_vectors[vec].iv_func = fire_msiq_handler; /* Record the MSI/MSI-X as long as we we use a 1:1 mapping. */ - ((struct fire_msiqarg *)intr_vectors[vec].iv_icarg)-> - fmqa_msi = msi; + fmqa->fmqa_msi = msi; FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_CTRL_SET_BASE + (msiq << 3), FO_PCI_EQ_CTRL_SET_EN); msi <<= 3; From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 18:53:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85A4D106568B; Sun, 10 Jan 2010 18:53:15 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7697B8FC13; Sun, 10 Jan 2010 18:53:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AIrFNs010698; Sun, 10 Jan 2010 18:53:15 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AIrF32010696; Sun, 10 Jan 2010 18:53:15 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001101853.o0AIrF32010696@svn.freebsd.org> From: Andrew Thompson Date: Sun, 10 Jan 2010 18:53:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202024 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 18:53:15 -0000 Author: thompsa Date: Sun Jan 10 18:53:15 2010 New Revision: 202024 URL: http://svn.freebsd.org/changeset/base/202024 Log: Change the second usb example for ulpt to one describing libusb which would be more common. Modified: head/share/man/man5/devfs.rules.5 Modified: head/share/man/man5/devfs.rules.5 ============================================================================== --- head/share/man/man5/devfs.rules.5 Sun Jan 10 18:39:29 2010 (r202023) +++ head/share/man/man5/devfs.rules.5 Sun Jan 10 18:53:15 2010 (r202024) @@ -100,13 +100,15 @@ The first line declares and starts a new .Va localrules and the number 10. .Pp -To make all the -.Xr ulpt 4 -devices accessible to their owner and the +To give +.Xr usbconfig 8 +and +.Xr libusb 3 +enabled applications permission to all usb devices for their owner and the .Dq Li usb group, a similar rule may be used: .Pp -.Dl "add path 'ulpt*' mode 0660 group usb" +.Dl "add path 'usb/*' mode 0660 group usb" .Sh SEE ALSO .Xr glob 3 , .Xr devfs 5 , From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 19:18:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40A341065670; Sun, 10 Jan 2010 19:18:50 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31A0E8FC17; Sun, 10 Jan 2010 19:18:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AJIoE2016321; Sun, 10 Jan 2010 19:18:50 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AJIomp016319; Sun, 10 Jan 2010 19:18:50 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001101918.o0AJIomp016319@svn.freebsd.org> From: Andrew Thompson Date: Sun, 10 Jan 2010 19:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202025 - head/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 19:18:50 -0000 Author: thompsa Date: Sun Jan 10 19:18:49 2010 New Revision: 202025 URL: http://svn.freebsd.org/changeset/base/202025 Log: Reset variable fields in case the transfer is opened again Submitted by: Hans Petter Selasky Modified: head/lib/libusb/libusb20.c Modified: head/lib/libusb/libusb20.c ============================================================================== --- head/lib/libusb/libusb20.c Sun Jan 10 18:53:15 2010 (r202024) +++ head/lib/libusb/libusb20.c Sun Jan 10 19:18:49 2010 (r202025) @@ -130,8 +130,19 @@ libusb20_tr_close(struct libusb20_transf if (xfer->ppBuffer) { free(xfer->ppBuffer); } - /* clear some fields */ + /* reset variable fields in case the transfer is opened again */ + xfer->priv_sc0 = 0; + xfer->priv_sc1 = 0; xfer->is_opened = 0; + xfer->is_pending = 0; + xfer->is_cancel = 0; + xfer->is_draining = 0; + xfer->is_restart = 0; + xfer->status = 0; + xfer->flags = 0; + xfer->nFrames = 0; + xfer->aFrames = 0; + xfer->timeout = 0; xfer->maxFrames = 0; xfer->maxTotalLength = 0; xfer->maxPacketLen = 0; From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 19:21:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6070A1065696; Sun, 10 Jan 2010 19:21:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 516548FC1E; Sun, 10 Jan 2010 19:21:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AJLNXH016913; Sun, 10 Jan 2010 19:21:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AJLNQx016911; Sun, 10 Jan 2010 19:21:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001101921.o0AJLNQx016911@svn.freebsd.org> From: Andrew Thompson Date: Sun, 10 Jan 2010 19:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202026 - head/usr.sbin/usbconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 19:21:23 -0000 Author: thompsa Date: Sun Jan 10 19:21:23 2010 New Revision: 202026 URL: http://svn.freebsd.org/changeset/base/202026 Log: Print error messages to stderr. Submitted by: Hans Petter Selasky Modified: head/usr.sbin/usbconfig/usbconfig.c Modified: head/usr.sbin/usbconfig/usbconfig.c ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.c Sun Jan 10 19:18:49 2010 (r202025) +++ head/usr.sbin/usbconfig/usbconfig.c Sun Jan 10 19:21:23 2010 (r202026) @@ -175,7 +175,7 @@ be_dev_remove_quirk(struct libusb20_back error = libusb20_be_remove_dev_quirk(pbe, &q); if (error) { - printf("Removing quirk '%s' failed, continuing.\n", str); + fprintf(stderr, "Removing quirk '%s' failed, continuing.\n", str); } return; } @@ -198,7 +198,7 @@ be_dev_add_quirk(struct libusb20_backend error = libusb20_be_add_dev_quirk(pbe, &q); if (error) { - printf("Adding quirk '%s' failed, continuing.\n", str); + fprintf(stderr, "Adding quirk '%s' failed, continuing.\n", str); } return; } @@ -257,7 +257,7 @@ get_int(const char *s) static void duplicate_option(const char *ptr) { - printf("Syntax error: " + fprintf(stderr, "Syntax error: " "Duplicate option: '%s'\n", ptr); exit(1); } @@ -265,7 +265,7 @@ duplicate_option(const char *ptr) static void usage(void) { - printf("" + fprintf(stderr, "" "usbconfig - configure the USB subsystem" "\n" "usage: usbconfig -u -a -i [cmds...]" "\n" "usage: usbconfig -d [ugen]. -i [cmds...]" "\n" @@ -349,7 +349,7 @@ flush_command(struct libusb20_backend *p if (opt->got_set_template) { opt->got_any--; if (libusb20_be_set_template(pbe, opt->template)) { - printf("Setting USB template %u failed, " + fprintf(stderr, "Setting USB template %u failed, " "continuing.\n", opt->template); } } From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 19:39:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76129106566B; Sun, 10 Jan 2010 19:39:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6692D8FC08; Sun, 10 Jan 2010 19:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AJd88j020835; Sun, 10 Jan 2010 19:39:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AJd8DA020829; Sun, 10 Jan 2010 19:39:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001101939.o0AJd8DA020829@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 19:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202027 - head/sys/mips/idt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 19:39:08 -0000 Author: imp Date: Sun Jan 10 19:39:08 2010 New Revision: 202027 URL: http://svn.freebsd.org/changeset/base/202027 Log: Merge from projects/mips to head by hand: r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype. r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines Centralize initialization of pcpu, and set curthread early... r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-) r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling. r194216 | gonzo | 2009-06-14 15:16:23 -0600 (Sun, 14 Jun 2009) | 2 lines - Fix prototypes to make compiler happy r194215 | gonzo | 2009-06-14 15:16:04 -0600 (Sun, 14 Jun 2009) | 2 lines - Get rid of mask_fn and fix pre_filter/post_filter functions' prototypes r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places. r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order. Modified: head/sys/mips/idt/files.idt head/sys/mips/idt/idt_machdep.c head/sys/mips/idt/obio.c head/sys/mips/idt/uart_bus_rc32434.c head/sys/mips/idt/uart_cpu_rc32434.c Modified: head/sys/mips/idt/files.idt ============================================================================== --- head/sys/mips/idt/files.idt Sun Jan 10 19:21:23 2010 (r202026) +++ head/sys/mips/idt/files.idt Sun Jan 10 19:39:08 2010 (r202027) @@ -6,3 +6,5 @@ mips/idt/if_kr.c optional kr mips/idt/obio.c standard mips/idt/uart_cpu_rc32434.c optional uart mips/idt/uart_bus_rc32434.c optional uart +mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: head/sys/mips/idt/idt_machdep.c ============================================================================== --- head/sys/mips/idt/idt_machdep.c Sun Jan 10 19:21:23 2010 (r202026) +++ head/sys/mips/idt/idt_machdep.c Sun Jan 10 19:39:08 2010 (r202027) @@ -76,6 +76,12 @@ extern int *edata; extern int *end; void +platform_cpu_init() +{ + /* Nothing special */ +} + +void platform_halt(void) { @@ -131,6 +137,9 @@ platform_start(__register_t a0, __regist kernend = round_page((vm_offset_t)&end); memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + /* Initialize pcpu stuff */ + mips_pcpu0_init(); + /* * Looking for mem=XXM argument */ Modified: head/sys/mips/idt/obio.c ============================================================================== --- head/sys/mips/idt/obio.c Sun Jan 10 19:21:23 2010 (r202026) +++ head/sys/mips/idt/obio.c Sun Jan 10 19:39:08 2010 (r202027) @@ -76,8 +76,10 @@ static int obio_setup_intr(device_t, dev static int obio_teardown_intr(device_t, device_t, struct resource *, void *); -static void obio_mask_irq(unsigned int irq) +static void +obio_mask_irq(void *arg) { + unsigned int irq = (unsigned int)arg; int ip_bit, mask, mask_register; /* mask IRQ */ @@ -88,8 +90,10 @@ static void obio_mask_irq(unsigned int i ICU_REG_WRITE(mask_register, mask | ip_bit); } -static void obio_unmask_irq(unsigned int irq) +static void +obio_unmask_irq(void *arg) { + unsigned int irq = (unsigned int)arg; int ip_bit, mask, mask_register; /* unmask IRQ */ @@ -274,7 +278,7 @@ obio_setup_intr(device_t dev, device_t c event = sc->sc_eventstab[irq]; if (event == NULL) { error = intr_event_create(&event, (void *)irq, 0, irq, - (mask_fn)obio_mask_irq, (mask_fn)obio_unmask_irq, + obio_mask_irq, obio_unmask_irq, NULL, NULL, "obio intr%d:", irq); Modified: head/sys/mips/idt/uart_bus_rc32434.c ============================================================================== --- head/sys/mips/idt/uart_bus_rc32434.c Sun Jan 10 19:21:23 2010 (r202026) +++ head/sys/mips/idt/uart_bus_rc32434.c Sun Jan 10 19:39:08 2010 (r202027) @@ -88,10 +88,10 @@ uart_rc32434_probe(device_t dev) sc->sc_class = &uart_ns8250_class; bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); sc->sc_sysdev->bas.regshft = 2; - sc->sc_sysdev->bas.bst = 0; + sc->sc_sysdev->bas.bst = mips_bus_space_generic; sc->sc_sysdev->bas.bsh = MIPS_PHYS_TO_KSEG1(IDT_BASE_UART0); sc->sc_bas.regshft = 2; - sc->sc_bas.bst = 0; + sc->sc_bas.bst = mips_bus_space_generic; sc->sc_bas.bsh = MIPS_PHYS_TO_KSEG1(IDT_BASE_UART0); return (uart_bus_probe(dev, 2, 330000000UL/2, 0, 0)); Modified: head/sys/mips/idt/uart_cpu_rc32434.c ============================================================================== --- head/sys/mips/idt/uart_cpu_rc32434.c Sun Jan 10 19:21:23 2010 (r202026) +++ head/sys/mips/idt/uart_cpu_rc32434.c Sun Jan 10 19:39:08 2010 (r202027) @@ -71,7 +71,7 @@ uart_cpu_getdev(int devtype, struct uart /* Got it. Fill in the instance and return it. */ di->ops = uart_getops(&uart_ns8250_class); di->bas.chan = 0; - di->bas.bst = 0; + di->bas.bst = mips_bus_space_generic; di->bas.regshft = 2; di->bas.rclk = 330000000UL/2; /* IPbus clock */ di->baudrate = 115200; @@ -79,7 +79,7 @@ uart_cpu_getdev(int devtype, struct uart di->stopbits = 1; di->parity = UART_PARITY_NONE; uart_bus_space_io = 0; - uart_bus_space_mem = 0; + uart_bus_space_mem = mips_bus_space_generic; di->bas.bsh = MIPS_PHYS_TO_KSEG1(maddr); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 19:42:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33E0E106568B; Sun, 10 Jan 2010 19:42:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C2438FC19; Sun, 10 Jan 2010 19:42:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AJgJQC021556; Sun, 10 Jan 2010 19:42:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AJgJt2021555; Sun, 10 Jan 2010 19:42:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001101942.o0AJgJt2021555@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 19:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202028 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 19:42:20 -0000 Author: imp Date: Sun Jan 10 19:42:19 2010 New Revision: 202028 URL: http://svn.freebsd.org/changeset/base/202028 Log: Remove files that were deleted in the projects/mips branch. Deleted: head/sys/mips/include/bus_octeon.h head/sys/mips/include/intr.h head/sys/mips/include/pltfm.h From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 19:43:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EC7E1065697; Sun, 10 Jan 2010 19:43:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 567958FC1F; Sun, 10 Jan 2010 19:43:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AJhBG9021760; Sun, 10 Jan 2010 19:43:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AJhBlH021758; Sun, 10 Jan 2010 19:43:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001101943.o0AJhBlH021758@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 19:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202029 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 19:43:11 -0000 Author: imp Date: Sun Jan 10 19:43:11 2010 New Revision: 202029 URL: http://svn.freebsd.org/changeset/base/202029 Log: Merge from projects/mips to head by hand: Copy over new cdefs.h.. Added: - copied unchanged from r202028, projects/mips/sys/mips/include/cdefs.h Directory Properties: head/sys/mips/include/cdefs.h (props changed) Copied: head/sys/mips/include/cdefs.h (from r202028, projects/mips/sys/mips/include/cdefs.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/include/cdefs.h Sun Jan 10 19:43:11 2010 (r202029, copy of r202028, projects/mips/sys/mips/include/cdefs.h) @@ -0,0 +1,54 @@ +/* $NetBSD: cdefs.h,v 1.12 2006/08/27 19:04:30 matt Exp $ */ + +/* + * Copyright (c) 1995 Carnegie-Mellon University. + * All rights reserved. + * + * Author: Chris G. Demetriou + * + * Permission to use, copy, modify and distribute this software and + * its documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ + +#ifndef _MIPS_CDEFS_H_ +#define _MIPS_CDEFS_H_ + +/* MIPS Subprogram Interface Model */ +#define _MIPS_SIM_ABIX32 4 /* 64 bit safe, ILP32 o32 model */ +#define _MIPS_SIM_ABI64 3 +#define _MIPS_SIM_NABI32 2 /* 64bit safe, ILP32 n32 model */ +#define _MIPS_SIM_ABI32 1 + +#define _MIPS_BSD_API_LP32 _MIPS_SIM_ABI32 +#define _MIPS_BSD_API_LP32_64CLEAN _MIPS_SIM_ABIX32 +#define _MIPS_BSD_API_N32 _MIPS_SIM_NABI32 +#define _MIPS_BSD_API_LP64 _MIPS_SIM_ABI64 + +#if defined(__mips_n64) +#define _MIPS_BSD_API _MIPS_BSD_API_LP64 +#elif defined(__mips_n32) +#define _MIPS_BSD_API _MIPS_BSD_API_N32 +#elif defined(__mips_o64) +#define _MIPS_BSD_API _MIPS_BSD_API_LP32_64CLEAN +#else +#define _MIPS_BSD_API _MIPS_BSD_API_LP32 +#endif + +#endif /* !_MIPS_CDEFS_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 19:44:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A398A106566B; Sun, 10 Jan 2010 19:44:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B7B78FC14; Sun, 10 Jan 2010 19:44:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AJi8qK022040; Sun, 10 Jan 2010 19:44:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AJi8Q1022039; Sun, 10 Jan 2010 19:44:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001101944.o0AJi8Q1022039@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 19:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202030 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 19:44:08 -0000 Author: imp Date: Sun Jan 10 19:44:08 2010 New Revision: 202030 URL: http://svn.freebsd.org/changeset/base/202030 Log: Merge from projects/mips to head by hand: Merge in rmi's fls64 code... Added: - copied unchanged from r202029, projects/mips/sys/mips/include/fls64.h Directory Properties: head/sys/mips/include/fls64.h (props changed) Copied: head/sys/mips/include/fls64.h (from r202029, projects/mips/sys/mips/include/fls64.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/include/fls64.h Sun Jan 10 19:44:08 2010 (r202030, copy of r202029, projects/mips/sys/mips/include/fls64.h) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2003-2009 RMI Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of RMI Corporation, nor the names of its contributors, + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE 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. + * + * RMI_BSD */ +#ifndef _MIPS_FLS64_H_ +#define _MIPS_FLS64_H_ + +/* + * Find Last Set bit (64 bit) + */ +static inline int +fls64(__uint64_t mask) +{ + int bit; + + if (mask == 0) + return (0); + for (bit = 1; ((mask & 0x1ULL) == 0); bit++) + mask = mask >> 1; + return (bit); +} +#endif From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 19:50:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3D561065679; Sun, 10 Jan 2010 19:50:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92BCA8FC25; Sun, 10 Jan 2010 19:50:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AJoOJc023449; Sun, 10 Jan 2010 19:50:24 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AJoOSO023427; Sun, 10 Jan 2010 19:50:24 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001101950.o0AJoOSO023427@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 19:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202031 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 19:50:24 -0000 Author: imp Date: Sun Jan 10 19:50:24 2010 New Revision: 202031 URL: http://svn.freebsd.org/changeset/base/202031 Log: Merge from projects/mips to head by hand: r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype. r200343 | imp | 2009-12-09 18:44:11 -0700 (Wed, 09 Dec 2009) | 4 lines Get the sense of this right. We use uintpr_t for bus_addr_t when we're building everything except octeon && 32-bit. As note before, we need a clearner way, but at least now the hack is right. r199760 | imp | 2009-11-24 10:15:22 -0700 (Tue, 24 Nov 2009) | 2 lines Add in Cavium's CID. Report what the unknown CID is. r199754 | imp | 2009-11-24 09:32:31 -0700 (Tue, 24 Nov 2009) | 6 lines Include opt_cputype.h for all .c and .S files referencing TARGET_OCTEON. Spell ld script name right. r199599 | imp | 2009-11-20 09:32:26 -0700 (Fri, 20 Nov 2009) | 2 lines Another kludge for 64-bit bus_addr_t with 32-bit pointers... r199496 | gonzo | 2009-11-18 15:52:05 -0700 (Wed, 18 Nov 2009) | 5 lines - Add cpu_init_interrupts function that is supposed to prepeare stuff required for spinning out interrupts later - Add API for managing intrcnt/intrnames arrays - Some minor style(9) fixes r198958 | rrs | 2009-11-05 11:15:47 -0700 (Thu, 05 Nov 2009) | 2 lines For XLR adds extern for its bus space routines r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-) r198666 | imp | 2009-10-29 18:37:50 -0600 (Thu, 29 Oct 2009) | 2 lines Add some newer MIPS CO cores. r198665 | imp | 2009-10-29 18:37:04 -0600 (Thu, 29 Oct 2009) | 4 lines db_expr_t is really closer to a register_t. Submitted by: bde@ r198531 | gonzo | 2009-10-27 18:01:20 -0600 (Tue, 27 Oct 2009) | 3 lines - Remove bunch of declared but not defined cach-related variables - Add mips_picache_linesize and mips_pdcache_linesize variables r198354 | neel | 2009-10-21 20:51:31 -0600 (Wed, 21 Oct 2009) | 9 lines Get rid of the hardcoded constants to define cacheable memory: SDRAM_ADDR_START, SDRAM_ADDR_END and SDRAM_MEM_SIZE Instead we now keep a copy of the memory regions enumerated by platform-specific code and use that to determine whether an address is cacheable or not. r198310 | gonzo | 2009-10-20 17:13:08 -0600 (Tue, 20 Oct 2009) | 5 lines - Commit missing part of "bt" fix: store PC register in pcb_context struct in cpu_switch and use it in stack_trace function later. pcb_regs contains state of the process stored by exception handler and therefor is not valid for sleeping processes. r198207 | imp | 2009-10-18 08:57:04 -0600 (Sun, 18 Oct 2009) | 2 lines Undo spamage of last MFC. r198206 | imp | 2009-10-18 08:56:33 -0600 (Sun, 18 Oct 2009) | 3 lines _ALIGN has to return u_long, since pointers don't fit into u_int in 64-bit mips. r198182 | gonzo | 2009-10-16 18:22:07 -0600 (Fri, 16 Oct 2009) | 11 lines - Use PC/RA/SP values as arguments for stacktrace_subr instead of trapframe. Context info could be obtained from other sources (see below) no only from td_pcb field - Do not show a0..a3 values unless they're obtained from the stack. These are only confirmed values. - Fix bt command in DDB. Previous implementation used thread's trapframe structure as a source info for trace unwinding, but this structure is filled only when exception occurs. Valid register values for sleeping processes are in pcb_context array. For curthread use pc/sp/ra for current frame r198181 | gonzo | 2009-10-16 16:52:18 -0600 (Fri, 16 Oct 2009) | 2 lines - Get rid of label_t. It came from NetBSD and was used only in one place r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling. r198066 | gonzo | 2009-10-13 19:43:53 -0600 (Tue, 13 Oct 2009) | 5 lines - Move stack tracing function to db_trace.c - Axe unused extern MipsXXX declarations - Move all declarations for functions in exceptions.S/swtch.S from trap.c to respective headers r197685 | gonzo | 2009-10-01 14:05:36 -0600 (Thu, 01 Oct 2009) | 2 lines - Sync caches properly when dealing with sf_buf r196215 | imp | 2009-08-14 10:15:18 -0600 (Fri, 14 Aug 2009) | 6 lines (u_int) is the wrong type here. Use unsigned long instead, even though that's only less wrong... r196199 | imp | 2009-08-13 13:47:13 -0600 (Thu, 13 Aug 2009) | 7 lines Use unsigned long instead of unsigned for the integer casts here. The former works for both ILP32 and LP64 programming models, while the latter fails LP64. r196089 | gonzo | 2009-08-09 19:49:59 -0600 (Sun, 09 Aug 2009) | 4 lines - Make i/d cache size field 32-bit to prevent overflow Submited by: Neelkanth Natu r195582 | imp | 2009-07-10 13:07:07 -0600 (Fri, 10 Jul 2009) | 2 lines fix prototype for MipsEmulateBranch. r195581 | imp | 2009-07-10 13:06:43 -0600 (Fri, 10 Jul 2009) | 2 lines Better definitions for a few types for n32/n64. r195580 | imp | 2009-07-10 13:06:15 -0600 (Fri, 10 Jul 2009) | 5 lines Fixed aligned macros... r195478 | gonzo | 2009-07-08 16:28:36 -0600 (Wed, 08 Jul 2009) | 5 lines - Port busdma code from FreeBSD/arm. This is more mature version that takes into account all limitation to DMA memory (boundaries, alignment) and implements bounce pages. - Add BUS_DMASYNC_POSTREAD case to bus_dmamap_sync_buf r195440 | imp | 2009-07-08 00:01:37 -0600 (Wed, 08 Jul 2009) | 2 lines Fix atomic_store_64 prototype for 64-bit systems. r195392 | imp | 2009-07-05 20:27:03 -0600 (Sun, 05 Jul 2009) | 3 lines The MCOUNT macro isn't going to work in 64-bit mode. Add a note to this effect. r195391 | imp | 2009-07-05 20:22:51 -0600 (Sun, 05 Jul 2009) | 3 lines Provide a macro for PTR_ADDU as well. We may need to implement this differently for N32... Use PTR_ADDU in DO_AST macro. r195390 | imp | 2009-07-05 20:22:06 -0600 (Sun, 05 Jul 2009) | 4 lines Change the addu here to daddu. addu paranoina prodded by: jmallet@ r195382 | imp | 2009-07-05 15:16:26 -0600 (Sun, 05 Jul 2009) | 5 lines addu and subu are special. We need to use daddu and dsubu here to get proper behavior. Submitted by: jmallet@ r195370 | imp | 2009-07-05 09:20:16 -0600 (Sun, 05 Jul 2009) | 6 lines The SB1 has cohernet memory, so add it. Also, Maxmem is better as a long. Submitted by: Neelkanth Natu r195369 | imp | 2009-07-05 09:19:28 -0600 (Sun, 05 Jul 2009) | 4 lines The SB1 needs a special value for the cache field of the pte. Submitted by: Neelkanth Natu r195368 | imp | 2009-07-05 09:18:06 -0600 (Sun, 05 Jul 2009) | 2 lines compute the areas to save registers in for 64-bit access correctly. r195367 | imp | 2009-07-05 09:17:11 -0600 (Sun, 05 Jul 2009) | 3 lines First cut at 64-bit types. not 100% sure these are all correct for N32 ABI. r195366 | imp | 2009-07-05 09:16:27 -0600 (Sun, 05 Jul 2009) | 3 lines Trim unreferenced goo. SDRAM likely should be next, but it is still referenced. r195365 | imp | 2009-07-05 09:13:24 -0600 (Sun, 05 Jul 2009) | 9 lines First cut at atomics for 64-bit machines and SMP machines. # Note: Cavium provided a port that has atomics similar to these, but # that does a syncw; sync; atomic; sync; syncw where we just do the classic # mips 'atomic' operation (eg ll; frob; sc). It is unclear to me why # the extra is needed. Since my initial target is one core, I'll defer # investigation until I bring up multiple cores. syncw is an octeon specific # instruction. r195359 | imp | 2009-07-05 02:14:00 -0600 (Sun, 05 Jul 2009) | 4 lines Bring in cdefs.h from NetBSD to define ABI goo. Obtained from: NetBSD r195358 | imp | 2009-07-05 02:13:19 -0600 (Sun, 05 Jul 2009) | 4 lines Pull in machine/cdefs.h for the ABI definitions. Provide a PTR_LA, ala sgi, and use it in preference to a bare 'la' so that it gets translated to a 'dla' for the 64-bit pointer ABIs. r195357 | imp | 2009-07-05 01:01:34 -0600 (Sun, 05 Jul 2009) | 2 lines Use uintptr_t rather than unsigned here for 64-bit correctness. r195356 | imp | 2009-07-05 01:00:51 -0600 (Sun, 05 Jul 2009) | 6 lines Define __ELF_WORD_SIZE appropriately for n64. Note for N32 I believe this is correct. While registers are 64-bit, n32 is a 32-bit ABI and lives in a 32-bit world (with explicit 64-bit registers, however). Change an 8, which was 4 + 4 or sizeof(int) + SZREG to be a simple '4 + SZREG' to reflect the actual offset of the structure in question. r195355 | imp | 2009-07-05 00:56:51 -0600 (Sun, 05 Jul 2009) | 7 lines (1) Use uintptr_t in preference to unsigned. The latter isn't right for 64-bit case, while the former is. (2) include a SB1 specific coherency mapping Submitted by: Neelkanth Nath (2) r195352 | imp | 2009-07-05 00:44:37 -0600 (Sun, 05 Jul 2009) | 3 lines db_expr_t should be a intptr_t, not an int. These expressions can be addresses or numbers, and that's a intptr_t if I ever saw one. r195351 | imp | 2009-07-05 00:43:01 -0600 (Sun, 05 Jul 2009) | 4 lines Define COP0_SYNC for SB1 CPU. Submitted by: Neelkanth Natu r195350 | imp | 2009-07-05 00:39:37 -0600 (Sun, 05 Jul 2009) | 7 lines Switch to ABI agnostic ta0-ta3. Provide defs for this in the right places. Provide n32/n64 register name defintions. This should have no effect for the O32 builds that everybody else uses, but should help make N64 builds possible (lots of other changes are needed for that). Obtained from: NetBSD (for the regdef.h changes) r195128 | gonzo | 2009-06-27 17:27:41 -0600 (Sat, 27 Jun 2009) | 4 lines - Add support for handling TLS area address in kernel space. From the userland point of view get/set operations are performed using sysarch(2) call. r195076 | gonzo | 2009-06-26 13:54:06 -0600 (Fri, 26 Jun 2009) | 2 lines - Add guards to ensure that these files are included only once r194469 | gonzo | 2009-06-18 22:43:49 -0600 (Thu, 18 Jun 2009) | 16 lines - Mark temp variable as "earlyclobber" in assembler inline in atomic_fetchadd_32. Without it gcc would use it as input register for v and sometimes generate following code for function call like atomic_fetchadd_32(&(fp)->f_count, -1): 801238b4: 2402ffff li v0,-1 801238b8: c2230018 ll v1,24(s1) 801238bc: 00431021 addu v0,v0,v1 801238c0: e2220018 sc v0,24(s1) 801238c4: 1040fffc beqz v0,801238b8 801238c8: 00000000 nop Which is definitly wrong because if sc fails v0 is set to 0 and previous value of -1 is overriden hence whole operation turns to bogus r194164 | imp | 2009-06-14 00:14:25 -0600 (Sun, 14 Jun 2009) | 3 lines bye bye. This is no longer referenced, but much code from it will resurface for a bus-space implementation. r194160 | imp | 2009-06-14 00:10:36 -0600 (Sun, 14 Jun 2009) | 3 lines Cavium-specific goo is no longer necessary here. Of course, I now have to write a bus space for cavium, but that shouldn't be too hard. r194157 | imp | 2009-06-14 00:01:46 -0600 (Sun, 14 Jun 2009) | 2 lines Move this to a more approrpiate plae. r194156 | imp | 2009-06-13 23:29:13 -0600 (Sat, 13 Jun 2009) | 2 lines Bring this in from the cavium port. r193487 | gonzo | 2009-06-05 02:37:11 -0600 (Fri, 05 Jun 2009) | 2 lines - Use restoreintr instead of enableint while accessing pcpu in DO_AST r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines - Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default we assume that there is no FPU, because majority of SoC does not have it. r192817 | gonzo | 2009-05-26 10:35:05 -0600 (Tue, 26 May 2009) | 2 lines - Add type cast for atomic_cmpset_acq_ptr arguments r192792 | gonzo | 2009-05-26 00:01:17 -0600 (Tue, 26 May 2009) | 2 lines - Remove now unused NetBSDism intr.h r192177 | gonzo | 2009-05-15 20:39:13 -0600 (Fri, 15 May 2009) | 4 lines - Add MIPS_IS_KSEG0_ADDR, MIPS_IS_KSEG1_ADDR and MIPS_IS_VALID_PTR macroses thet check if address belongs to KSEG0, KSEG1 or both of them respectively. r191589 | gonzo | 2009-04-27 13:18:55 -0600 (Mon, 27 Apr 2009) | 3 lines - Cast argument to proper type in order to avoid warnings like "shift value is too large for given type" r191577 | gonzo | 2009-04-27 12:29:59 -0600 (Mon, 27 Apr 2009) | 4 lines - Use naming convention the same as MIPS spec does: eliminate _sel1 sufix and just use selector number. e.g. mips_rd_config_sel1 -> mips_rd_config1 - Add WatchHi/WatchLo accessors for selctors 1..3 (for debug purposes) r191451 | gonzo | 2009-04-23 22:17:21 -0600 (Thu, 23 Apr 2009) | 4 lines - Define accessor functions for CP0 Config(16) register selects 1, 2, 3. Content of these registers is defined in MIPS spec and can be used for obtaining info about CPU capabilities. r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places. r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order. Modified: head/sys/mips/include/_align.h head/sys/mips/include/_bus.h head/sys/mips/include/_types.h head/sys/mips/include/asm.h head/sys/mips/include/atomic.h head/sys/mips/include/bus.h head/sys/mips/include/cache.h head/sys/mips/include/cache_mipsNN.h head/sys/mips/include/cpu.h head/sys/mips/include/cpufunc.h head/sys/mips/include/cpuinfo.h head/sys/mips/include/cpuregs.h head/sys/mips/include/db_machdep.h head/sys/mips/include/elf.h head/sys/mips/include/endian.h head/sys/mips/include/float.h head/sys/mips/include/hwfunc.h head/sys/mips/include/intr_machdep.h head/sys/mips/include/kdb.h head/sys/mips/include/locore.h head/sys/mips/include/md_var.h head/sys/mips/include/param.h head/sys/mips/include/pcb.h head/sys/mips/include/pmap.h head/sys/mips/include/proc.h head/sys/mips/include/profile.h head/sys/mips/include/psl.h head/sys/mips/include/pte.h head/sys/mips/include/regdef.h head/sys/mips/include/regnum.h head/sys/mips/include/trap.h head/sys/mips/include/ucontext.h Modified: head/sys/mips/include/_align.h ============================================================================== --- head/sys/mips/include/_align.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/_align.h Sun Jan 10 19:50:24 2010 (r202031) @@ -44,10 +44,10 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value for all - * data types (int, long, ...). The result is u_int and must be cast to + * data types (int, long, ...). The result is u_long and must be cast to * any desired pointer type. */ #define _ALIGNBYTES 7 -#define _ALIGN(p) (((u_int)(p) + _ALIGNBYTES) &~ _ALIGNBYTES) +#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES) #endif /* !_MIPS_INCLUDE__ALIGN_H_ */ Modified: head/sys/mips/include/_bus.h ============================================================================== --- head/sys/mips/include/_bus.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/_bus.h Sun Jan 10 19:50:24 2010 (r202031) @@ -31,19 +31,20 @@ #ifndef MIPS_INCLUDE__BUS_H #define MIPS_INCLUDE__BUS_H -#ifdef TARGET_OCTEON -#include "_bus_octeon.h" -#else /* * Bus address and size types */ +#include "opt_cputype.h" +#if !(defined(TARGET_OCTEON) && defined(ISA_MIPS32)) typedef uintptr_t bus_addr_t; +#else +typedef uint64_t bus_addr_t; +#endif typedef uintptr_t bus_size_t; /* * Access methods for bus resources and address space. */ -typedef long bus_space_tag_t; -typedef u_long bus_space_handle_t; -#endif +typedef struct bus_space *bus_space_tag_t; +typedef bus_addr_t bus_space_handle_t; #endif /* MIPS_INCLUDE__BUS_H */ Modified: head/sys/mips/include/_types.h ============================================================================== --- head/sys/mips/include/_types.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/_types.h Sun Jan 10 19:50:24 2010 (r202031) @@ -54,7 +54,7 @@ typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; -#ifdef __mips64 +#ifdef __mips_n64 typedef long __int64_t; typedef unsigned long __uint64_t; #else @@ -79,14 +79,14 @@ typedef unsigned long long __uint64_t; */ typedef __int32_t __clock_t; /* clock()... */ typedef unsigned int __cpumask_t; -#ifdef __mips64 +#ifdef __mips_n64 typedef __int64_t __critical_t; #else typedef __int32_t __critical_t; #endif typedef double __double_t; typedef double __float_t; -#ifdef __mips64 +#ifdef __mips_n64 typedef __int64_t __intfptr_t; typedef __int64_t __intptr_t; #else @@ -102,14 +102,14 @@ typedef __int8_t __int_least8_t; typedef __int16_t __int_least16_t; typedef __int32_t __int_least32_t; typedef __int64_t __int_least64_t; -#if defined(__mips64) || defined(ISA_MIPS64) +#if defined(__mips_n64) || defined(__mips_n32) typedef __int64_t __register_t; typedef __int64_t f_register_t; #else typedef __int32_t __register_t; typedef __int32_t f_register_t; #endif -#ifdef __mips64 +#ifdef __mips_n64 typedef __int64_t __ptrdiff_t; typedef __int64_t __segsz_t; typedef __uint64_t __size_t; @@ -134,13 +134,16 @@ typedef __uint8_t __uint_least8_t; typedef __uint16_t __uint_least16_t; typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; -#if defined(__mips64) || defined(ISA_MIPS64) +#if defined(__mips_n64) || defined(__mips_n32) typedef __uint64_t __u_register_t; +#else +typedef __uint32_t __u_register_t; +#endif +#if defined(__mips_n64) typedef __uint64_t __vm_offset_t; typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_size_t; #else -typedef __uint32_t __u_register_t; typedef __uint32_t __vm_offset_t; typedef __uint32_t __vm_paddr_t; typedef __uint32_t __vm_size_t; @@ -162,8 +165,4 @@ typedef char * __va_list; typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif -typedef struct label_t { - __register_t val[13]; -} label_t; - #endif /* !_MACHINE__TYPES_H_ */ Modified: head/sys/mips/include/asm.h ============================================================================== --- head/sys/mips/include/asm.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/asm.h Sun Jan 10 19:50:24 2010 (r202031) @@ -60,6 +60,7 @@ #include #endif #include +#include #undef __FBSDID #if !defined(lint) && !defined(STRIP_FBSDID) @@ -281,7 +282,7 @@ _C_LABEL(x): * Macros to panic and printf from assembly language. */ #define PANIC(msg) \ - la a0, 9f; \ + PTR_LA a0, 9f; \ jal _C_LABEL(panic); \ nop; \ MSG(msg) @@ -289,7 +290,7 @@ _C_LABEL(x): #define PANIC_KSEG0(msg, reg) PANIC(msg) #define PRINTF(msg) \ - la a0, 9f; \ + PTR_LA a0, 9f; \ jal _C_LABEL(printf); \ nop; \ MSG(msg) @@ -308,23 +309,24 @@ _C_LABEL(x): */ #define DO_AST \ 44: \ - la s0, _C_LABEL(disableintr) ;\ + PTR_LA s0, _C_LABEL(disableintr) ;\ jalr s0 ;\ nop ;\ + move a0, v0 ;\ GET_CPU_PCPU(s1) ;\ lw s3, PC_CURPCB(s1) ;\ lw s1, PC_CURTHREAD(s1) ;\ lw s2, TD_FLAGS(s1) ;\ li s0, TDF_ASTPENDING | TDF_NEEDRESCHED;\ and s2, s0 ;\ - la s0, _C_LABEL(enableintr) ;\ + PTR_LA s0, _C_LABEL(restoreintr) ;\ jalr s0 ;\ nop ;\ beq s2, zero, 4f ;\ nop ;\ - la s0, _C_LABEL(ast) ;\ + PTR_LA s0, _C_LABEL(ast) ;\ jalr s0 ;\ - addu a0, s3, U_PCB_REGS ;\ + PTR_ADDU a0, s3, U_PCB_REGS ;\ j 44b ;\ nop ;\ 4: @@ -361,12 +363,15 @@ _C_LABEL(x): */ #if !defined(_MIPS_BSD_API) || _MIPS_BSD_API == _MIPS_BSD_API_LP32 +/* #if !defined(__mips_n64) */ #define REG_L lw #define REG_S sw #define REG_LI li #define REG_PROLOGUE .set push #define REG_EPILOGUE .set pop #define SZREG 4 +#define PTR_LA la +#define PTR_ADDU addu #else #define REG_L ld #define REG_S sd @@ -374,6 +379,8 @@ _C_LABEL(x): #define REG_PROLOGUE .set push ; .set mips3 #define REG_EPILOGUE .set pop #define SZREG 8 +#define PTR_LA dla +#define PTR_ADDU daddu #endif /* _MIPS_BSD_API */ #define mfc0_macro(data, spr) \ Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/atomic.h Sun Jan 10 19:50:24 2010 (r202031) @@ -34,6 +34,17 @@ #error this file needs sys/cdefs.h as a prerequisite #endif +/* + * Note: All the 64-bit atomic operations are only atomic when running + * in 64-bit mode. It is assumed that code compiled for n32 and n64 + * fits into this definition and no further safeties are needed. + * + * It is also assumed that the add, subtract and other arithmetic is + * done on numbers not pointers. The special rules for n32 pointers + * do not have atomic operations defined for them, but generally shouldn't + * need atomic operations. + */ + static __inline void mips_sync(void) { @@ -126,7 +137,7 @@ atomic_subtract_32(__volatile uint32_t * "1:\tll %0, %3\n\t" /* load old value */ "subu %0, %2\n\t" /* calculate new value */ "sc %0, %1\n\t" /* attempt to store */ - "beqz %0, 1b\n\t" /* spin if failed */ + "beqz %0, 1b\n\t" /* spin if failed */ : "=&r" (temp), "=m" (*p) : "r" (v), "m" (*p) : "memory"); @@ -166,6 +177,110 @@ atomic_readandset_32(__volatile uint32_t return result; } +#if defined(__mips_n64) || defined(__mips_n32) +static __inline void +atomic_set_64(__volatile uint64_t *p, uint64_t v) +{ + uint64_t temp; + + __asm __volatile ( + "1:\n\t" + "lld %0, %3\n\t" /* load old value */ + "or %0, %2, %0\n\t" /* calculate new value */ + "scd %0, %1\n\t" /* attempt to store */ + "beqz %0, 1b\n\t" /* spin if failed */ + : "=&r" (temp), "=m" (*p) + : "r" (v), "m" (*p) + : "memory"); + +} + +static __inline void +atomic_clear_64(__volatile uint64_t *p, uint64_t v) +{ + uint64_t temp; + v = ~v; + + __asm __volatile ( + "1:\n\t" + "lld %0, %3\n\t" /* load old value */ + "and %0, %2, %0\n\t" /* calculate new value */ + "scd %0, %1\n\t" /* attempt to store */ + "beqz %0, 1b\n\t" /* spin if failed */ + : "=&r" (temp), "=m" (*p) + : "r" (v), "m" (*p) + : "memory"); +} + +static __inline void +atomic_add_64(__volatile uint64_t *p, uint64_t v) +{ + uint64_t temp; + + __asm __volatile ( + "1:\n\t" + "lld %0, %3\n\t" /* load old value */ + "daddu %0, %2, %0\n\t" /* calculate new value */ + "scd %0, %1\n\t" /* attempt to store */ + "beqz %0, 1b\n\t" /* spin if failed */ + : "=&r" (temp), "=m" (*p) + : "r" (v), "m" (*p) + : "memory"); +} + +static __inline void +atomic_subtract_64(__volatile uint64_t *p, uint64_t v) +{ + uint64_t temp; + + __asm __volatile ( + "1:\n\t" + "lld %0, %3\n\t" /* load old value */ + "dsubu %0, %2\n\t" /* calculate new value */ + "scd %0, %1\n\t" /* attempt to store */ + "beqz %0, 1b\n\t" /* spin if failed */ + : "=&r" (temp), "=m" (*p) + : "r" (v), "m" (*p) + : "memory"); +} + +static __inline uint64_t +atomic_readandclear_64(__volatile uint64_t *addr) +{ + uint64_t result,temp; + + __asm __volatile ( + "1:\n\t" + "lld %0, %3\n\t" /* load old value */ + "li %1, 0\n\t" /* value to store */ + "scd %1, %2\n\t" /* attempt to store */ + "beqz %1, 1b\n\t" /* if the store failed, spin */ + : "=&r"(result), "=&r"(temp), "=m" (*addr) + : "m" (*addr) + : "memory"); + + return result; +} + +static __inline uint64_t +atomic_readandset_64(__volatile uint64_t *addr, uint64_t value) +{ + uint64_t result,temp; + + __asm __volatile ( + "1:\n\t" + "lld %0,%3\n\t" /* Load old value*/ + "or %1,$0,%4\n\t" + "scd %1,%2\n\t" /* attempt to store */ + "beqz %1, 1b\n\t" /* if the store failed, spin */ + : "=&r"(result), "=&r"(temp), "=m" (*addr) + : "m" (*addr), "r" (value) + : "memory"); + + return result; +} +#endif + #define ATOMIC_ACQ_REL(NAME, WIDTH) \ static __inline void \ atomic_##NAME##_acq_##WIDTH(__volatile uint##WIDTH##_t *p, uint##WIDTH##_t v)\ @@ -194,7 +309,7 @@ ATOMIC_ACQ_REL(set, 32) ATOMIC_ACQ_REL(clear, 32) ATOMIC_ACQ_REL(add, 32) ATOMIC_ACQ_REL(subtract, 32) -#if 0 +#if defined(__mips_n64) || defined(__mips_n32) ATOMIC_ACQ_REL(set, 64) ATOMIC_ACQ_REL(clear, 64) ATOMIC_ACQ_REL(add, 64) @@ -226,8 +341,22 @@ atomic_store_rel_##WIDTH(__volatile uint ATOMIC_STORE_LOAD(32) ATOMIC_STORE_LOAD(64) -void atomic_store_64 (__volatile uint64_t *, uint64_t *); -void atomic_load_64 (__volatile uint64_t *, uint64_t *); +#if !defined(__mips_n64) && !defined(__mips_n32) +void atomic_store_64(__volatile uint64_t *, uint64_t *); +void atomic_load_64(__volatile uint64_t *, uint64_t *); +#else +static __inline void +atomic_store_64(__volatile uint64_t *p, uint64_t *v) +{ + *p = *v; +} + +static __inline void +atomic_load_64(__volatile uint64_t *p, uint64_t *v) +{ + *v = *p; +} +#endif #undef ATOMIC_STORE_LOAD @@ -294,11 +423,83 @@ atomic_fetchadd_32(__volatile uint32_t * "addu %2, %3, %0\n\t" /* calculate new value */ "sc %2, %1\n\t" /* attempt to store */ "beqz %2, 1b\n\t" /* spin if failed */ - : "=&r" (value), "=m" (*p), "=r" (temp) + : "=&r" (value), "=m" (*p), "=&r" (temp) : "r" (v), "m" (*p)); return (value); } +#if defined(__mips_n64) || defined(__mips_n32) +/* + * Atomically compare the value stored at *p with cmpval and if the + * two values are equal, update the value of *p with newval. Returns + * zero if the compare failed, nonzero otherwise. + */ +static __inline uint64_t +atomic_cmpset_64(__volatile uint64_t* p, uint64_t cmpval, uint64_t newval) +{ + uint64_t ret; + + __asm __volatile ( + "1:\n\t" + "lld %0, %4\n\t" /* load old value */ + "bne %0, %2, 2f\n\t" /* compare */ + "move %0, %3\n\t" /* value to store */ + "scd %0, %1\n\t" /* attempt to store */ + "beqz %0, 1b\n\t" /* if it failed, spin */ + "j 3f\n\t" + "2:\n\t" + "li %0, 0\n\t" + "3:\n" + : "=&r" (ret), "=m" (*p) + : "r" (cmpval), "r" (newval), "m" (*p) + : "memory"); + + return ret; +} + +/* + * Atomically compare the value stored at *p with cmpval and if the + * two values are equal, update the value of *p with newval. Returns + * zero if the compare failed, nonzero otherwise. + */ +static __inline uint64_t +atomic_cmpset_acq_64(__volatile uint64_t *p, uint64_t cmpval, uint64_t newval) +{ + int retval; + + retval = atomic_cmpset_64(p, cmpval, newval); + mips_sync(); + return (retval); +} + +static __inline uint64_t +atomic_cmpset_rel_64(__volatile uint64_t *p, uint64_t cmpval, uint64_t newval) +{ + mips_sync(); + return (atomic_cmpset_64(p, cmpval, newval)); +} + +/* + * Atomically add the value of v to the integer pointed to by p and return + * the previous value of *p. + */ +static __inline uint64_t +atomic_fetchadd_64(__volatile uint64_t *p, uint64_t v) +{ + uint64_t value, temp; + + __asm __volatile ( + "1:\n\t" + "lld %0, %1\n\t" /* load old value */ + "daddu %2, %3, %0\n\t" /* calculate new value */ + "scd %2, %1\n\t" /* attempt to store */ + "beqz %2, 1b\n\t" /* spin if failed */ + : "=&r" (value), "=m" (*p), "=&r" (temp) + : "r" (v), "m" (*p)); + return (value); +} +#endif + /* Operations on chars. */ #define atomic_set_char atomic_set_8 #define atomic_set_acq_char atomic_set_acq_8 @@ -349,7 +550,13 @@ atomic_fetchadd_32(__volatile uint32_t * #define atomic_readandset_int atomic_readandset_32 #define atomic_fetchadd_int atomic_fetchadd_32 -#ifdef __mips64 +/* + * I think the following is right, even for n32. For n32 the pointers + * are still 32-bits, so we need to operate on them as 32-bit quantities, + * even though they are sign extended in operation. For longs, there's + * no question because they are always 32-bits. + */ +#ifdef __mips_n64 /* Operations on longs. */ #define atomic_set_long atomic_set_64 #define atomic_set_acq_long atomic_set_acq_64 @@ -371,27 +578,7 @@ atomic_fetchadd_32(__volatile uint32_t * #define atomic_fetchadd_long atomic_fetchadd_64 #define atomic_readandclear_long atomic_readandclear_64 -/* Operations on pointers. */ -#define atomic_set_ptr atomic_set_64 -#define atomic_set_acq_ptr atomic_set_acq_64 -#define atomic_set_rel_ptr atomic_set_rel_64 -#define atomic_clear_ptr atomic_clear_64 -#define atomic_clear_acq_ptr atomic_clear_acq_64 -#define atomic_clear_rel_ptr atomic_clear_rel_64 -#define atomic_add_ptr atomic_add_64 -#define atomic_add_acq_ptr atomic_add_acq_64 -#define atomic_add_rel_ptr atomic_add_rel_64 -#define atomic_subtract_ptr atomic_subtract_64 -#define atomic_subtract_acq_ptr atomic_subtract_acq_64 -#define atomic_subtract_rel_ptr atomic_subtract_rel_64 -#define atomic_cmpset_ptr atomic_cmpset_64 -#define atomic_cmpset_acq_ptr atomic_cmpset_acq_64 -#define atomic_cmpset_rel_ptr atomic_cmpset_rel_64 -#define atomic_load_acq_ptr atomic_load_acq_64 -#define atomic_store_rel_ptr atomic_store_rel_64 -#define atomic_readandclear_ptr atomic_readandclear_64 - -#else /* __mips64 */ +#else /* !__mips_n64 */ /* Operations on longs. */ #define atomic_set_long atomic_set_32 @@ -421,25 +608,26 @@ atomic_fetchadd_32(__volatile uint32_t * atomic_fetchadd_32((volatile u_int *)(p), (u_int)(v)) #define atomic_readandclear_long atomic_readandclear_32 +#endif /* __mips_n64 */ + /* Operations on pointers. */ -#define atomic_set_ptr atomic_set_32 -#define atomic_set_acq_ptr atomic_set_acq_32 -#define atomic_set_rel_ptr atomic_set_rel_32 -#define atomic_clear_ptr atomic_clear_32 -#define atomic_clear_acq_ptr atomic_clear_acq_32 -#define atomic_clear_rel_ptr atomic_clear_rel_32 -#define atomic_add_ptr atomic_add_32 -#define atomic_add_acq_ptr atomic_add_acq_32 -#define atomic_add_rel_ptr atomic_add_rel_32 -#define atomic_subtract_ptr atomic_subtract_32 -#define atomic_subtract_acq_ptr atomic_subtract_acq_32 -#define atomic_subtract_rel_ptr atomic_subtract_rel_32 -#define atomic_cmpset_ptr atomic_cmpset_32 -#define atomic_cmpset_acq_ptr atomic_cmpset_acq_32 -#define atomic_cmpset_rel_ptr atomic_cmpset_rel_32 -#define atomic_load_acq_ptr atomic_load_acq_32 -#define atomic_store_rel_ptr atomic_store_rel_32 -#define atomic_readandclear_ptr atomic_readandclear_32 -#endif /* __mips64 */ +#define atomic_set_ptr atomic_set_long +#define atomic_set_acq_ptr atomic_set_acq_long +#define atomic_set_rel_ptr atomic_set_rel_long +#define atomic_clear_ptr atomic_clear_long +#define atomic_clear_acq_ptr atomic_clear_acq_long +#define atomic_clear_rel_ptr atomic_clear_rel_long +#define atomic_add_ptr atomic_add_long +#define atomic_add_acq_ptr atomic_add_acq_long +#define atomic_add_rel_ptr atomic_add_rel_long +#define atomic_subtract_ptr atomic_subtract_long +#define atomic_subtract_acq_ptr atomic_subtract_acq_long +#define atomic_subtract_rel_ptr atomic_subtract_rel_long +#define atomic_cmpset_ptr atomic_cmpset_long +#define atomic_cmpset_acq_ptr atomic_cmpset_acq_long +#define atomic_cmpset_rel_ptr atomic_cmpset_rel_long +#define atomic_load_acq_ptr atomic_load_acq_long +#define atomic_store_rel_ptr atomic_store_rel_long +#define atomic_readandclear_ptr atomic_readandclear_long #endif /* ! _MACHINE_ATOMIC_H_ */ Modified: head/sys/mips/include/bus.h ============================================================================== --- head/sys/mips/include/bus.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/bus.h Sun Jan 10 19:50:24 2010 (r202031) @@ -1,8 +1,7 @@ -/* $NetBSD: bus.h,v 1.12 1997/10/01 08:25:15 fvdl Exp $ */ +/* $NetBSD: bus.h,v 1.11 2003/07/28 17:35:54 thorpej Exp $ */ + /*- - * $Id: bus.h,v 1.6 2007/08/09 11:23:32 katta Exp $ - * - * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. + * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -38,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1996 Charles M. Hannum. All rights reserved. * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. * Modified: head/sys/mips/include/cache.h ============================================================================== --- head/sys/mips/include/cache.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/cache.h Sun Jan 10 19:50:24 2010 (r202031) @@ -37,6 +37,9 @@ * $FreeBSD$ */ +#ifndef _MACHINE_CACHE_H_ +#define _MACHINE_CACHE_H_ + /* * Cache operations. * @@ -156,50 +159,8 @@ struct mips_cache_ops { extern struct mips_cache_ops mips_cache_ops; /* PRIMARY CACHE VARIABLES */ -extern u_int mips_picache_size; -extern u_int mips_picache_line_size; -extern u_int mips_picache_ways; -extern u_int mips_picache_way_size; -extern u_int mips_picache_way_mask; - -extern u_int mips_pdcache_size; /* and unified */ -extern u_int mips_pdcache_line_size; -extern u_int mips_pdcache_ways; -extern u_int mips_pdcache_way_size; -extern u_int mips_pdcache_way_mask; -extern int mips_pdcache_write_through; - -extern int mips_pcache_unified; - -/* SECONDARY CACHE VARIABLES */ -extern u_int mips_sicache_size; -extern u_int mips_sicache_line_size; -extern u_int mips_sicache_ways; -extern u_int mips_sicache_way_size; -extern u_int mips_sicache_way_mask; - -extern u_int mips_sdcache_size; /* and unified */ -extern u_int mips_sdcache_line_size; -extern u_int mips_sdcache_ways; -extern u_int mips_sdcache_way_size; -extern u_int mips_sdcache_way_mask; -extern int mips_sdcache_write_through; - -extern int mips_scache_unified; - -/* TERTIARY CACHE VARIABLES */ -extern u_int mips_tcache_size; /* always unified */ -extern u_int mips_tcache_line_size; -extern u_int mips_tcache_ways; -extern u_int mips_tcache_way_size; -extern u_int mips_tcache_way_mask; -extern int mips_tcache_write_through; - -extern u_int mips_dcache_align; -extern u_int mips_dcache_align_mask; - -extern u_int mips_cache_alias_mask; -extern u_int mips_cache_prefer_mask; +extern int mips_picache_linesize; +extern int mips_pdcache_linesize; #define __mco_noargs(prefix, x) \ do { \ @@ -259,3 +220,4 @@ void mips_config_cache(struct mips_cp void mips_dcache_compute_align(void); #include +#endif /* _MACHINE_CACHE_H_ */ Modified: head/sys/mips/include/cache_mipsNN.h ============================================================================== --- head/sys/mips/include/cache_mipsNN.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/cache_mipsNN.h Sun Jan 10 19:50:24 2010 (r202031) @@ -36,6 +36,8 @@ * * $FreeBSD$ */ +#ifndef _MACHINE_CACHE_MIPSNN_H_ +#define _MACHINE_CACHE_MIPSNN_H_ void mipsNN_cache_init(struct mips_cpuinfo *); @@ -65,3 +67,5 @@ void mipsNN_pdcache_wbinv_range_index_12 void mipsNN_pdcache_inv_range_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_wb_range_128(vm_offset_t, vm_size_t); #endif + +#endif /* _MACHINE_CACHE_MIPSNN_H_ */ Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/cpu.h Sun Jan 10 19:50:24 2010 (r202031) @@ -56,21 +56,30 @@ #define MIPS_RESERVED_ADDR 0xbfc80000 #define MIPS_KSEG0_LARGEST_PHYS 0x20000000 -#define MIPS_CACHED_TO_PHYS(x) ((unsigned)(x) & 0x1fffffff) -#define MIPS_PHYS_TO_CACHED(x) ((unsigned)(x) | MIPS_CACHED_MEMORY_ADDR) -#define MIPS_UNCACHED_TO_PHYS(x) ((unsigned)(x) & 0x1fffffff) -#define MIPS_PHYS_TO_UNCACHED(x) ((unsigned)(x) | MIPS_UNCACHED_MEMORY_ADDR) +#define MIPS_CACHED_TO_PHYS(x) ((uintptr_t)(x) & 0x1fffffff) +#define MIPS_PHYS_TO_CACHED(x) ((uintptr_t)(x) | MIPS_CACHED_MEMORY_ADDR) +#define MIPS_UNCACHED_TO_PHYS(x) ((uintptr_t)(x) & 0x1fffffff) +#define MIPS_PHYS_TO_UNCACHED(x) ((uintptr_t)(x) | MIPS_UNCACHED_MEMORY_ADDR) #define MIPS_PHYS_MASK (0x1fffffff) #define MIPS_PA_2_K1VA(x) (MIPS_KSEG1_START | ((x) & MIPS_PHYS_MASK)) -#define MIPS_VA_TO_CINDEX(x) ((unsigned)(x) & 0xffffff | MIPS_CACHED_MEMORY_ADDR) +#define MIPS_VA_TO_CINDEX(x) ((uintptr_t)(x) & 0xffffff | MIPS_CACHED_MEMORY_ADDR) #define MIPS_CACHED_TO_UNCACHED(x) (MIPS_PHYS_TO_UNCACHED(MIPS_CACHED_TO_PHYS(x))) -#define MIPS_PHYS_TO_KSEG0(x) ((unsigned)(x) | MIPS_KSEG0_START) -#define MIPS_PHYS_TO_KSEG1(x) ((unsigned)(x) | MIPS_KSEG1_START) -#define MIPS_KSEG0_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) -#define MIPS_KSEG1_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) +#define MIPS_PHYS_TO_KSEG0(x) ((uintptr_t)(x) | MIPS_KSEG0_START) +#define MIPS_PHYS_TO_KSEG1(x) ((uintptr_t)(x) | MIPS_KSEG1_START) +#define MIPS_KSEG0_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) +#define MIPS_KSEG1_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) + +#define MIPS_IS_KSEG0_ADDR(x) \ + (((vm_offset_t)(x) >= MIPS_KSEG0_START) && \ + ((vm_offset_t)(x) <= MIPS_KSEG0_END)) +#define MIPS_IS_KSEG1_ADDR(x) \ + (((vm_offset_t)(x) >= MIPS_KSEG1_START) && \ + ((vm_offset_t)(x) <= MIPS_KSEG1_END)) +#define MIPS_IS_VALID_PTR(x) (MIPS_IS_KSEG0_ADDR(x) || \ + MIPS_IS_KSEG1_ADDR(x)) /* * Status register. @@ -154,7 +163,11 @@ * The bits in the CONFIG register */ #define CFG_K0_UNCACHED 2 +#if defined(CPU_SB1) +#define CFG_K0_COHERENT 5 /* cacheable coherent */ +#else #define CFG_K0_CACHED 3 +#endif /* * The bits in the context register. Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/cpufunc.h Sun Jan 10 19:50:24 2010 (r202031) @@ -183,20 +183,46 @@ mips_wr_ ## n (uint32_t a0) \ mips_barrier(); \ } struct __hack +#define MIPS_RDRW32_COP0_SEL(n,r,s) \ +static __inline uint32_t \ +mips_rd_ ## n ## s(void) \ +{ \ + int v0; \ + __asm __volatile ("mfc0 %[v0], $"__XSTRING(r)", "__XSTRING(s)";" \ + : [v0] "=&r"(v0)); \ + mips_barrier(); \ + return (v0); \ +} \ +static __inline void \ +mips_wr_ ## n ## s(uint32_t a0) \ +{ \ + __asm __volatile ("mtc0 %[a0], $"__XSTRING(r)", "__XSTRING(s)";" \ + __XSTRING(COP0_SYNC)";" \ + "nop;" \ + "nop;" \ + : \ + : [a0] "r"(a0)); \ + mips_barrier(); \ +} struct __hack + #ifdef TARGET_OCTEON static __inline void mips_sync_icache (void) { - __asm __volatile ( - ".set mips64\n" - ".word 0x041f0000\n" - "nop\n" - ".set mips0\n" - : : ); + __asm __volatile ( + ".set push\n" + ".set mips64\n" + ".word 0x041f0000\n" /* xxx ICACHE */ + "nop\n" + ".set pop\n" + : : ); } #endif MIPS_RDRW32_COP0(compare, MIPS_COP_0_COMPARE); MIPS_RDRW32_COP0(config, MIPS_COP_0_CONFIG); +MIPS_RDRW32_COP0_SEL(config, MIPS_COP_0_CONFIG, 1); +MIPS_RDRW32_COP0_SEL(config, MIPS_COP_0_CONFIG, 2); +MIPS_RDRW32_COP0_SEL(config, MIPS_COP_0_CONFIG, 3); MIPS_RDRW32_COP0(count, MIPS_COP_0_COUNT); MIPS_RDRW32_COP0(index, MIPS_COP_0_TLB_INDEX); MIPS_RDRW32_COP0(wired, MIPS_COP_0_TLB_WIRED); @@ -211,18 +237,13 @@ MIPS_RDRW32_COP0(entryhi, MIPS_COP_0_TLB MIPS_RDRW32_COP0(pagemask, MIPS_COP_0_TLB_PG_MASK); MIPS_RDRW32_COP0(prid, MIPS_COP_0_PRID); MIPS_RDRW32_COP0(watchlo, MIPS_COP_0_WATCH_LO); +MIPS_RDRW32_COP0_SEL(watchlo, MIPS_COP_0_WATCH_LO, 1); +MIPS_RDRW32_COP0_SEL(watchlo, MIPS_COP_0_WATCH_LO, 2); +MIPS_RDRW32_COP0_SEL(watchlo, MIPS_COP_0_WATCH_LO, 3); MIPS_RDRW32_COP0(watchhi, MIPS_COP_0_WATCH_HI); - -static __inline uint32_t -mips_rd_config_sel1(void) -{ - int v0; - __asm __volatile("mfc0 %[v0], $16, 1 ;" - : [v0] "=&r" (v0)); - mips_barrier(); - return (v0); -} - +MIPS_RDRW32_COP0_SEL(watchhi, MIPS_COP_0_WATCH_HI, 1); +MIPS_RDRW32_COP0_SEL(watchhi, MIPS_COP_0_WATCH_HI, 2); +MIPS_RDRW32_COP0_SEL(watchhi, MIPS_COP_0_WATCH_HI, 3); #undef MIPS_RDRW32_COP0 static __inline register_t Modified: head/sys/mips/include/cpuinfo.h ============================================================================== --- head/sys/mips/include/cpuinfo.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/cpuinfo.h Sun Jan 10 19:50:24 2010 (r202031) @@ -57,11 +57,11 @@ struct mips_cpuinfo { u_int16_t tlb_nentries; u_int8_t icache_virtual; struct { - u_int8_t ic_size; + u_int32_t ic_size; u_int8_t ic_linesize; u_int8_t ic_nways; u_int16_t ic_nsets; - u_int8_t dc_size; + u_int32_t dc_size; u_int8_t dc_linesize; u_int8_t dc_nways; u_int16_t dc_nsets; Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/cpuregs.h Sun Jan 10 19:50:24 2010 (r202031) @@ -103,6 +103,8 @@ /* CPU dependent mtc0 hazard hook */ #ifdef TARGET_OCTEON #define COP0_SYNC nop; nop; nop; nop; nop; +#elif defined(CPU_SB1) +#define COP0_SYNC ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop; ssnop #else #define COP0_SYNC /* nothing */ #endif @@ -848,6 +850,10 @@ #define MIPS_4KEc_R2 0x90 /* MIPS 4KEc_R2 ISA 32 Rel 2 */ #define MIPS_4KEmp_R2 0x91 /* MIPS 4KEm/4KEp_R2 ISA 32 Rel 2 */ #define MIPS_4KSd 0x92 /* MIPS 4KSd ISA 32 Rel 2 */ +#define MIPS_24K 0x93 /* MIPS 24Kc/24Kf ISA 32 Rel 2 */ +#define MIPS_34K 0x95 /* MIPS 34K ISA 32 R2 MT */ +#define MIPS_24KE 0x96 /* MIPS 24KEc ISA 32 Rel 2 */ +#define MIPS_74K 0x97 /* MIPS 74Kc/74Kf ISA 32 Rel 2 */ /* * AMD (company ID 3) use the processor ID field to donote the CPU core Modified: head/sys/mips/include/db_machdep.h ============================================================================== --- head/sys/mips/include/db_machdep.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/db_machdep.h Sun Jan 10 19:50:24 2010 (r202031) @@ -46,7 +46,7 @@ typedef struct trapframe db_regs_t; extern db_regs_t ddb_regs; /* register state */ typedef vm_offset_t db_addr_t; /* address - unsigned */ -typedef int db_expr_t; /* expression - signed */ +typedef register_t db_expr_t; /* expression - signed */ #if BYTE_ORDER == _BIG_ENDIAN #define BYTE_MSF (1) @@ -94,6 +94,7 @@ db_addr_t next_instr_address(db_addr_t, int db_inst_type(int); void db_dump_tlb(int, int); db_addr_t branch_taken(int inst, db_addr_t pc); -void stacktrace_subr(db_regs_t *, int (*)(const char *, ...)); +void stacktrace_subr(register_t pc, register_t sp, register_t ra, int (*)(const char *, ...)); +int kdbpeek(int *); #endif /* !_MIPS_DB_MACHDEP_H_ */ Modified: head/sys/mips/include/elf.h ============================================================================== --- head/sys/mips/include/elf.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/elf.h Sun Jan 10 19:50:24 2010 (r202031) @@ -41,8 +41,12 @@ /* Information taken from MIPS ABI supplemental */ #ifndef __ELF_WORD_SIZE +#if defined(__mips_n64) +#define __ELF_WORD_SIZE 64 /* Used by */ +#else #define __ELF_WORD_SIZE 32 /* Used by */ #endif +#endif #include /* Definitions common to all 32 bit architectures. */ #include /* Definitions common to all 64 bit architectures. */ #include Modified: head/sys/mips/include/endian.h ============================================================================== --- head/sys/mips/include/endian.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/endian.h Sun Jan 10 19:50:24 2010 (r202031) @@ -108,12 +108,12 @@ __bswap64_var(__uint64_t _x) ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); } -#define __bswap16(x) (__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \ - __bswap16_var(x)) -#define __bswap32(x) (__uint32_t)(__is_constant(x) ? __bswap32_const(x) : \ - __bswap32_var(x)) -#define __bswap64(x) (__uint64_t)(__is_constant(x) ? __bswap64_const(x) : \ - __bswap64_var(x)) +#define __bswap16(x) (__uint16_t)(__is_constant(x) ? \ + __bswap16_const((__uint16_t)x) : __bswap16_var((__uint16_t)x)) +#define __bswap32(x) (__uint32_t)(__is_constant(x) ? \ + __bswap32_const((__uint32_t)x) : __bswap32_var((__uint32_t)x)) +#define __bswap64(x) (__uint64_t)(__is_constant(x) ? \ + __bswap64_const((__uint64_t)x) : __bswap64_var((__uint64_t)x)) #ifdef __MIPSEB__ #define __htonl(x) ((__uint32_t)(x)) Modified: head/sys/mips/include/float.h ============================================================================== --- head/sys/mips/include/float.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/float.h Sun Jan 10 19:50:24 2010 (r202031) @@ -42,10 +42,10 @@ extern int __flt_rounds(void); __END_DECLS #define FLT_RADIX 2 /* b */ -#ifdef SOFTFLOAT -#define FLT_ROUNDS -1 -#else +#ifdef CPU_HAVEFPU #define FLT_ROUNDS __flt_rounds() /* FP addition rounds to nearest */ +#else +#define FLT_ROUNDS -1 #endif /* * XXXMIPS: MIPS32 has both float and double type, so set FLT_EVAL_METHOD Modified: head/sys/mips/include/hwfunc.h ============================================================================== --- head/sys/mips/include/hwfunc.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/hwfunc.h Sun Jan 10 19:50:24 2010 (r202031) @@ -29,7 +29,7 @@ #define _MACHINE_HWFUNC_H_ struct trapframe; - +struct timecounter; /* * Hooks downward into hardware functionality. */ @@ -39,4 +39,12 @@ void platform_intr(struct trapframe *); void platform_reset(void); void platform_start(__register_t, __register_t, __register_t, __register_t); +/* For clocks and ticks and such */ +void platform_initclocks(void); +uint64_t platform_get_frequency(void); +unsigned platform_get_timecount(struct timecounter *); + +/* For hardware specific CPU initialization */ +void platform_cpu_init(void); +void platform_secondary_init(void); #endif /* !_MACHINE_HWFUNC_H_ */ Modified: head/sys/mips/include/intr_machdep.h ============================================================================== --- head/sys/mips/include/intr_machdep.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/intr_machdep.h Sun Jan 10 19:50:24 2010 (r202031) @@ -29,15 +29,48 @@ #ifndef _MACHINE_INTR_MACHDEP_H_ #define _MACHINE_INTR_MACHDEP_H_ +#ifdef TARGET_XLR_XLS +/* + * XLR/XLS uses its own intr_machdep.c and has + * a different number of interupts. This probably + * should be placed somewhere else. + */ + +struct mips_intrhand { + struct intr_event *mih_event; + driver_intr_t *mih_disable; + volatile long *cntp; /* interrupt counter */ +}; + +extern struct mips_intrhand mips_intr_handlers[]; +#define XLR_MAX_INTR 64 + +#else #define NHARD_IRQS 6 #define NSOFT_IRQS 2 +#endif struct trapframe; -void cpu_establish_hardintr(const char *, int (*)(void*), void (*)(void*), +void cpu_init_interrupts(void); +void cpu_establish_hardintr(const char *, driver_filter_t *, driver_intr_t *, void *, int, int, void **); -void cpu_establish_softintr(const char *, int (*)(void*), void (*)(void*), +void cpu_establish_softintr(const char *, driver_filter_t *, void (*)(void*), void *, int, int, void **); void cpu_intr(struct trapframe *); +/* + * Opaque datatype that represents intr counter + */ +typedef unsigned long* mips_intrcnt_t; + +mips_intrcnt_t mips_intrcnt_create(const char *); +void mips_intrcnt_setname(mips_intrcnt_t, const char *); + +static __inline void +mips_intrcnt_inc(mips_intrcnt_t counter) +{ + if (counter) + atomic_add_long(counter, 1); +} #endif /* !_MACHINE_INTR_MACHDEP_H_ */ Modified: head/sys/mips/include/kdb.h ============================================================================== --- head/sys/mips/include/kdb.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/kdb.h Sun Jan 10 19:50:24 2010 (r202031) @@ -47,4 +47,8 @@ kdb_cpu_trap(int vector, int _) { } +static __inline void +kdb_cpu_sync_icache(unsigned char *addr, size_t size) +{ +} #endif /* _MACHINE_KDB_H_ */ Modified: head/sys/mips/include/locore.h ============================================================================== --- head/sys/mips/include/locore.h Sun Jan 10 19:44:08 2010 (r202030) +++ head/sys/mips/include/locore.h Sun Jan 10 19:50:24 2010 (r202031) @@ -60,6 +60,7 @@ typedef int mips_prid_t; /* 0x09 unannounced */ /* 0x0a unannounced */ #define MIPS_PRID_CID_LEXRA 0x0b /* Lexra */ +#define MIPS_PRID_CID_CAVIUM 0x0d /* Cavium */ #define MIPS_PRID_COPTS(x) (((x) >> 24) & 0x00ff) /* Company Options */ #ifdef _KERNEL *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 19:53:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F6E3106568B; Sun, 10 Jan 2010 19:53:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 612138FC29; Sun, 10 Jan 2010 19:53:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AJrbfe024199; Sun, 10 Jan 2010 19:53:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AJrbHY024198; Sun, 10 Jan 2010 19:53:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001101953.o0AJrbHY024198@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 19:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202032 - head/sys/mips/alchemy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 19:53:37 -0000 Author: imp Date: Sun Jan 10 19:53:37 2010 New Revision: 202032 URL: http://svn.freebsd.org/changeset/base/202032 Log: Merge from projects/mips to head by hand: Merge support for very early alchemy port. I wouldn't merge this except I don't want it to get lost when we retire projects/mips. Should be consiered pre-alpha at this stage. Also, alchemy is now owned by rmi, but started out life as a separate processor line, so I'm leaving it in its own directory rather than try to shoe-horn it into the unrelated rmi directory. Its future location is an open question. Added: - copied from r202031, projects/mips/sys/mips/alchemy/ Directory Properties: head/sys/mips/alchemy/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 19:54:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B13D1065693; Sun, 10 Jan 2010 19:54:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12EBC8FC25; Sun, 10 Jan 2010 19:54:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AJsIFb024372; Sun, 10 Jan 2010 19:54:18 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AJsITF024370; Sun, 10 Jan 2010 19:54:18 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001101954.o0AJsITF024370@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 19:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202033 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 19:54:19 -0000 Author: imp Date: Sun Jan 10 19:54:18 2010 New Revision: 202033 URL: http://svn.freebsd.org/changeset/base/202033 Log: Merge from projects/mips to head by hand: ALCHEMY config file. Added: - copied unchanged from r202032, projects/mips/sys/mips/conf/ALCHEMY Directory Properties: head/sys/mips/conf/ALCHEMY (props changed) Copied: head/sys/mips/conf/ALCHEMY (from r202032, projects/mips/sys/mips/conf/ALCHEMY) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/ALCHEMY Sun Jan 10 19:54:18 2010 (r202033, copy of r202032, projects/mips/sys/mips/conf/ALCHEMY) @@ -0,0 +1,66 @@ +# ALCHEMY -- Generic kernel for Alchemy Au1xxx CPUs. +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident ALCHEMY + +makeoptions ARCH_FLAGS=-march=mips32 +makeoptions MIPS_LITTLE_ENDIAN=defined + +# Don't build any modules yet. +makeoptions MODULES_OVERRIDE="" + +include "../alchemy/std.alchemy" + +hints "ALCHEMY.hints" #Default places to look for devices. + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCLIENT #Network Filesystem Client +options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options PSEUDOFS #Pseudo-filesystem framework +# options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=admsw0 +options BOOTP_COMPAT + +# options FFS #Berkeley Fast Filesystem +# options SOFTUPDATES #Enable FFS soft updates support +# options UFS_ACL #Support for access control lists +# options UFS_DIRHASH #Improve performance on big directories +options ROOTDEVNAME=\"nfs:10.0.0.1:/mnt/bsd\" + + +# Debugging for use in -current +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed + +device loop +device ether +device uart +# device md From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:03:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91CCF106566B; Sun, 10 Jan 2010 20:03:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82EEB8FC1B; Sun, 10 Jan 2010 20:03:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AK3G43026436; Sun, 10 Jan 2010 20:03:16 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AK3G3w026433; Sun, 10 Jan 2010 20:03:16 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102003.o0AK3G3w026433@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 20:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202034 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:03:16 -0000 Author: imp Date: Sun Jan 10 20:03:16 2010 New Revision: 202034 URL: http://svn.freebsd.org/changeset/base/202034 Log: Merge from projects/mips to head by hand: I think these are the relevant changes, but definitely are a superset of them. Software archaeologists are invited to check the branch itself for the details. r199695 | imp | 2009-11-23 00:49:50 -0700 (Mon, 23 Nov 2009) | 2 lines Specify loader script and load address r198263 | neel | 2009-10-19 22:31:20 -0600 (Mon, 19 Oct 2009) | 7 lines The default KERNLOADADDR does not work on MALTA hardware. On my platform the "First free SDRAM address" reported by YAMON is 0x800b6e61. So use a conservative KERNLOADADDR of 0x80100000. Approved by: imp (mentor) r194163 | imp | 2009-06-14 00:12:21 -0600 (Sun, 14 Jun 2009) | 2 lines Kludge: pretend to be ISA_MIPS32 for the moment. r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines - Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default we assume that there is no FPU, because majority of SoC does not have it. r187461 | gonzo | 2009-01-19 21:24:03 -0700 (Mon, 19 Jan 2009) | 3 lines - KERNLOADADDR should be defined with makeoption. Redboot loads kernel now r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines - Add trampoline stuff for bootloaders that do not support ELF - Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with KERNLOADADDR/TRAMPLOADADDR and clean configs Modified: head/sys/mips/conf/MALTA head/sys/mips/conf/SENTRY5 Modified: head/sys/mips/conf/MALTA ============================================================================== --- head/sys/mips/conf/MALTA Sun Jan 10 19:54:18 2010 (r202033) +++ head/sys/mips/conf/MALTA Sun Jan 10 20:03:16 2010 (r202034) @@ -21,6 +21,7 @@ ident MALTA #makeoptions ARCH_FLAGS=-march=mips32 makeoptions MIPS_LITTLE_ENDIAN=defined +makeoptions KERNLOADADDR=0x80100000 options YAMON @@ -33,6 +34,8 @@ options TICK_USE_YAMON_FREQ=defined include "../malta/std.malta" +options ISA_MIPS32 + hints "MALTA.hints" #Default places to look for devices. makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/mips/conf/SENTRY5 ============================================================================== --- head/sys/mips/conf/SENTRY5 Sun Jan 10 19:54:18 2010 (r202033) +++ head/sys/mips/conf/SENTRY5 Sun Jan 10 20:03:16 2010 (r202034) @@ -26,9 +26,8 @@ ident SENTRY5 cpu CPU_MIPS4KC -options CPU_NOFPU options ISA_MIPS32 -options CPU_SENTRY5 # XXX should this be a +options CPU_SENTRY5 # XXX should this be a # sub-cpu option? # XXX only siba should be hardwired for now; we will use @@ -37,50 +36,43 @@ files "../sentry5/files.sentry5" hints "SENTRY5.hints" # sentry5 normally ships with cfe firmware; use the console for now -options CFE -options CFE_CONSOLE -options ALT_BREAK_TO_DEBUGGER - -# cfe loader expects kernel at 0x80001000 for mips32 w/o backwards -# offsets in the linked elf image (see ldscript hack) -# XXX can we conditionalize the linker stuff on options CFE? -options KERNVIRTADDR=0x80001000 - -makeoptions LDSCRIPT_NAME= ldscript.mips.cfe +options CFE +options CFE_CONSOLE +options ALT_BREAK_TO_DEBUGGER #makeoptions ARCH_FLAGS=-march=mips32 makeoptions MIPS_LITTLE_ENDIAN=defined makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols makeoptions MODULES_OVERRIDE="" -options DDB -options KDB +options DDB +options KDB -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options NFSCLIENT #Network Filesystem Client -options NFS_ROOT #NFS usable as /, requires NFSCLIENT -options PSEUDOFS #Pseudo-filesystem framework -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCLIENT #Network Filesystem Client +options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions # Debugging for use in -current -options INVARIANTS -options INVARIANT_SUPPORT +options INVARIANTS +options INVARIANT_SUPPORT -#options BUS_DEBUG +#options BUS_DEBUG #makeoptions BUS_DEBUG device siba # Sonics SiliconBackplane device pci # siba_pcib -device bfe # XXX will build both pci and siba -device miibus # attachments +# device bfe # XXX will build both pci and siba +# device miibus # attachments # pci devices # notyet: #device ath # in pci slot #device ath_hal # pci chip support -#options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors +#options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors device usb # USB Bus (required) device uhci # UHCI PCI->USB interface From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:06:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 218A9106566B; Sun, 10 Jan 2010 20:06:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 117B98FC12; Sun, 10 Jan 2010 20:06:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AK6Ffa027153; Sun, 10 Jan 2010 20:06:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AK6ECt027143; Sun, 10 Jan 2010 20:06:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102006.o0AK6ECt027143@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 20:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202035 - head/sys/mips/malta X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:06:15 -0000 Author: imp Date: Sun Jan 10 20:06:14 2010 New Revision: 202035 URL: http://svn.freebsd.org/changeset/base/202035 Log: Merge from projects/mips to head by hand: r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype. r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-) r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling. r196836 | gonzo | 2009-09-04 13:02:11 -0600 (Fri, 04 Sep 2009) | 2 lines - Clean out some XXXMIPS comments that's not relevant now r196236 | imp | 2009-08-14 19:03:13 -0600 (Fri, 14 Aug 2009) | 3 lines Fix style error replicated multiple times. Move to mips_bus_space_generic for octeon obio impl. r195496 | imp | 2009-07-09 09:04:52 -0600 (Thu, 09 Jul 2009) | 2 lines Don't force ISA_MIPS32. r195495 | imp | 2009-07-09 09:04:24 -0600 (Thu, 09 Jul 2009) | 4 lines Make the yamon function pointer stuff 64-bit safe. Make the base unsigned long, and sign extend the address of the function we're calling through. r195494 | imp | 2009-07-09 08:54:09 -0600 (Thu, 09 Jul 2009) | 3 lines Addresses should be unsigned long. Make the address constants unsigned long. r194929 | gonzo | 2009-06-24 16:42:52 -0600 (Wed, 24 Jun 2009) | 6 lines - Do not use hardcoded uart speed - Call mips_timer_early_init before initializing uart in order to make DELAY usable for ns8250 driver Submitted by: Neelkanth Natu r194212 | gonzo | 2009-06-14 14:54:46 -0600 (Sun, 14 Jun 2009) | 2 lines - Fix prototypes to make compiler happy r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines - Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default we assume that there is no FPU, because majority of SoC does not have it. r192788 | gonzo | 2009-05-25 22:51:56 -0600 (Mon, 25 May 2009) | 3 lines - Provide proper pre_thread/post_ithread functions for GT PCI controller. r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places. r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order. Modified: head/sys/mips/malta/files.malta head/sys/mips/malta/gt_pci.c head/sys/mips/malta/malta_machdep.c head/sys/mips/malta/maltareg.h head/sys/mips/malta/obio.c head/sys/mips/malta/std.malta head/sys/mips/malta/uart_bus_maltausart.c head/sys/mips/malta/uart_cpu_maltausart.c head/sys/mips/malta/yamon.h Modified: head/sys/mips/malta/files.malta ============================================================================== --- head/sys/mips/malta/files.malta Sun Jan 10 20:03:16 2010 (r202034) +++ head/sys/mips/malta/files.malta Sun Jan 10 20:06:14 2010 (r202035) @@ -7,3 +7,5 @@ mips/malta/uart_bus_maltausart.c optiona dev/uart/uart_dev_ns8250.c optional uart mips/malta/malta_machdep.c standard mips/malta/yamon.c standard +mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: head/sys/mips/malta/gt_pci.c ============================================================================== --- head/sys/mips/malta/gt_pci.c Sun Jan 10 20:03:16 2010 (r202034) +++ head/sys/mips/malta/gt_pci.c Sun Jan 10 20:06:14 2010 (r202035) @@ -91,11 +91,16 @@ __FBSDID("$FreeBSD$"); #define OCW3_POLL_IRQ(x) ((x) & 0x7f) #define OCW3_POLL_PENDING (1U << 7) +struct gt_pci_softc; + +struct gt_pci_intr_cookie { + int irq; + struct gt_pci_softc *sc; +}; + struct gt_pci_softc { device_t sc_dev; bus_space_tag_t sc_st; - bus_space_tag_t sc_pciio; - bus_space_tag_t sc_pcimem; bus_space_handle_t sc_ioh_icu1; bus_space_handle_t sc_ioh_icu2; bus_space_handle_t sc_ioh_elcr; @@ -109,6 +114,7 @@ struct gt_pci_softc { struct resource *sc_irq; struct intr_event *sc_eventstab[ICU_LEN]; + struct gt_pci_intr_cookie sc_intr_cookies[ICU_LEN]; uint16_t sc_imask; uint16_t sc_elcr; @@ -117,6 +123,52 @@ struct gt_pci_softc { void *sc_ih; }; +static void gt_pci_set_icus(struct gt_pci_softc *); +static int gt_pci_intr(void *v); +static int gt_pci_probe(device_t); +static int gt_pci_attach(device_t); +static int gt_pci_activate_resource(device_t, device_t, int, int, + struct resource *); +static int gt_pci_setup_intr(device_t, device_t, struct resource *, + int, driver_filter_t *, driver_intr_t *, void *, void **); +static int gt_pci_teardown_intr(device_t, device_t, struct resource *, void*); +static int gt_pci_maxslots(device_t ); +static int gt_pci_conf_setup(struct gt_pci_softc *, int, int, int, int, + uint32_t *); +static uint32_t gt_pci_read_config(device_t, u_int, u_int, u_int, u_int, int); +static void gt_pci_write_config(device_t, u_int, u_int, u_int, u_int, + uint32_t, int); +static int gt_pci_route_interrupt(device_t pcib, device_t dev, int pin); +static struct resource * gt_pci_alloc_resource(device_t, device_t, int, + int *, u_long, u_long, u_long, u_int); + +static void +gt_pci_mask_irq(void *source) +{ + struct gt_pci_intr_cookie *cookie = source; + struct gt_pci_softc *sc = cookie->sc; + int irq = cookie->irq; + + sc->sc_imask |= (1 << irq); + sc->sc_elcr |= (1 << irq); + + gt_pci_set_icus(sc); +} + +static void +gt_pci_unmask_irq(void *source) +{ + struct gt_pci_intr_cookie *cookie = source; + struct gt_pci_softc *sc = cookie->sc; + int irq = cookie->irq; + + /* Enable it, set trigger mode. */ + sc->sc_imask &= ~(1 << irq); + sc->sc_elcr &= ~(1 << irq); + + gt_pci_set_icus(sc); +} + static void gt_pci_set_icus(struct gt_pci_softc *sc) { @@ -126,14 +178,14 @@ gt_pci_set_icus(struct gt_pci_softc *sc) else sc->sc_imask |= (1U << 2); - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, PIC_OCW1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu1, PIC_OCW1, sc->sc_imask & 0xff); - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, PIC_OCW1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu2, PIC_OCW1, (sc->sc_imask >> 8) & 0xff); - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_elcr, 0, + bus_space_write_1(sc->sc_st, sc->sc_ioh_elcr, 0, sc->sc_elcr & 0xff); - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_elcr, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_elcr, 1, (sc->sc_elcr >> 8) & 0xff); } @@ -145,9 +197,9 @@ gt_pci_intr(void *v) int irq; for (;;) { - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, PIC_OCW3, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu1, PIC_OCW3, OCW3_SEL | OCW3_P); - irq = bus_space_read_1(sc->sc_pciio, sc->sc_ioh_icu1, PIC_OCW3); + irq = bus_space_read_1(sc->sc_st, sc->sc_ioh_icu1, PIC_OCW3); if ((irq & OCW3_POLL_PENDING) == 0) { return FILTER_HANDLED; @@ -156,9 +208,9 @@ gt_pci_intr(void *v) irq = OCW3_POLL_IRQ(irq); if (irq == 2) { - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu2, PIC_OCW3, OCW3_SEL | OCW3_P); - irq = bus_space_read_1(sc->sc_pciio, sc->sc_ioh_icu2, + irq = bus_space_read_1(sc->sc_st, sc->sc_ioh_icu2, PIC_OCW3); if (irq & OCW3_POLL_PENDING) irq = OCW3_POLL_IRQ(irq) + 8; @@ -177,13 +229,13 @@ gt_pci_intr(void *v) /* Send a specific EOI to the 8259. */ if (irq > 7) { - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu2, PIC_OCW2, OCW2_SELECT | OCW2_EOI | OCW2_SL | OCW2_ILS(irq & 7)); irq = 2; } - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, PIC_OCW2, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu1, PIC_OCW2, OCW2_SELECT | OCW2_EOI | OCW2_SL | OCW2_ILS(irq)); } @@ -208,8 +260,7 @@ gt_pci_attach(device_t dev) busno = 0; sc->sc_dev = dev; sc->sc_busno = busno; - sc->sc_pciio = MIPS_BUS_SPACE_IO; - sc->sc_pcimem = MIPS_BUS_SPACE_MEM; + sc->sc_st = mips_bus_space_generic; /* Use KSEG1 to access IO ports for it is uncached */ sc->sc_io = MIPS_PHYS_TO_KSEG1(MALTA_PCI0_IO_BASE); @@ -239,11 +290,11 @@ gt_pci_attach(device_t dev) * Map the PIC/ELCR registers. */ #if 0 - if (bus_space_map(sc->sc_pciio, 0x4d0, 2, 0, &sc->sc_ioh_elcr) != 0) + if (bus_space_map(sc->sc_st, 0x4d0, 2, 0, &sc->sc_ioh_elcr) != 0) device_printf(dev, "unable to map ELCR registers\n"); - if (bus_space_map(sc->sc_pciio, IO_ICU1, 2, 0, &sc->sc_ioh_icu1) != 0) + if (bus_space_map(sc->sc_st, IO_ICU1, 2, 0, &sc->sc_ioh_icu1) != 0) device_printf(dev, "unable to map ICU1 registers\n"); - if (bus_space_map(sc->sc_pciio, IO_ICU2, 2, 0, &sc->sc_ioh_icu2) != 0) + if (bus_space_map(sc->sc_st, IO_ICU2, 2, 0, &sc->sc_ioh_icu2) != 0) device_printf(dev, "unable to map ICU2 registers\n"); #else sc->sc_ioh_elcr = sc->sc_io + 0x4d0; @@ -262,58 +313,58 @@ gt_pci_attach(device_t dev) * Initialize the 8259s. */ /* reset, program device, 4 bytes */ - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 0, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu1, 0, ICW1_RESET | ICW1_IC4); /* * XXX: values from NetBSD's */ - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu1, 1, 0/*XXX*/); - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu1, 1, 1 << 2); - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu1, 1, ICW4_8086); /* mask all interrupts */ - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 0, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu1, 0, sc->sc_imask & 0xff); /* enable special mask mode */ - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu1, 1, OCW3_SEL | OCW3_ESMM | OCW3_SMM); /* read IRR by default */ - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu1, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu1, 1, OCW3_SEL | OCW3_RR); /* reset, program device, 4 bytes */ - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 0, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu2, 0, ICW1_RESET | ICW1_IC4); - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu2, 1, 0/*XXX*/); - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu2, 1, 1 << 2); - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu2, 1, ICW4_8086); /* mask all interrupts */ - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 0, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu2, 0, sc->sc_imask & 0xff); /* enable special mask mode */ - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu2, 1, OCW3_SEL | OCW3_ESMM | OCW3_SMM); /* read IRR by default */ - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_icu2, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_icu2, 1, OCW3_SEL | OCW3_RR); /* * Default all interrupts to edge-triggered. */ - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_elcr, 0, + bus_space_write_1(sc->sc_st, sc->sc_ioh_elcr, 0, sc->sc_elcr & 0xff); - bus_space_write_1(sc->sc_pciio, sc->sc_ioh_elcr, 1, + bus_space_write_1(sc->sc_st, sc->sc_ioh_elcr, 1, (sc->sc_elcr >> 8) & 0xff); /* @@ -570,12 +621,12 @@ gt_pci_alloc_resource(device_t bus, devi break; case SYS_RES_MEMORY: rm = &sc->sc_mem_rman; - bt = sc->sc_pcimem; + bt = sc->sc_st; bh = sc->sc_mem; break; case SYS_RES_IOPORT: rm = &sc->sc_io_rman; - bt = sc->sc_pciio; + bt = sc->sc_st; bh = sc->sc_io; break; default: @@ -632,10 +683,13 @@ gt_pci_setup_intr(device_t dev, device_t panic("%s: bad irq or type", __func__); event = sc->sc_eventstab[irq]; + sc->sc_intr_cookies[irq].irq = irq; + sc->sc_intr_cookies[irq].sc = sc; if (event == NULL) { - error = intr_event_create(&event, (void *)irq, 0, irq, - (mask_fn)mips_mask_irq, (mask_fn)mips_unmask_irq, - (mask_fn)mips_unmask_irq, NULL, "gt_pci intr%d:", irq); + error = intr_event_create(&event, + (void *)&sc->sc_intr_cookies[irq], 0, irq, + gt_pci_mask_irq, gt_pci_unmask_irq, + NULL, NULL, "gt_pci intr%d:", irq); if (error) return 0; sc->sc_eventstab[irq] = event; @@ -644,12 +698,7 @@ gt_pci_setup_intr(device_t dev, device_t intr_event_add_handler(event, device_get_nameunit(child), filt, handler, arg, intr_priority(flags), flags, cookiep); - /* Enable it, set trigger mode. */ - sc->sc_imask &= ~(1 << irq); - sc->sc_elcr &= ~(1 << irq); - - gt_pci_set_icus(sc); - + gt_pci_unmask_irq((void *)&sc->sc_intr_cookies[irq]); return 0; } @@ -657,6 +706,12 @@ static int gt_pci_teardown_intr(device_t dev, device_t child, struct resource *res, void *cookie) { + struct gt_pci_softc *sc = device_get_softc(dev); + int irq; + + irq = rman_get_start(res); + gt_pci_mask_irq((void *)&sc->sc_intr_cookies[irq]); + return (intr_event_remove_handler(cookie)); } Modified: head/sys/mips/malta/malta_machdep.c ============================================================================== --- head/sys/mips/malta/malta_machdep.c Sun Jan 10 20:03:16 2010 (r202034) +++ head/sys/mips/malta/malta_machdep.c Sun Jan 10 20:06:14 2010 (r202035) @@ -97,6 +97,12 @@ static int malta_lcd_offs[] = { MALTA_ASCIIPOS7 }; +void +platform_cpu_init() +{ + /* Nothing special */ +} + /* * Put character to Malta LCD at given position. */ @@ -226,6 +232,52 @@ platform_trap_exit(void) } +static uint64_t +malta_cpu_freq(void) +{ + uint64_t platform_counter_freq = 0; + +#if defined(TICK_USE_YAMON_FREQ) + /* + * If we are running on a board which uses YAMON firmware, + * then query CPU pipeline clock from the syscon object. + * If unsuccessful, use hard-coded default. + */ + platform_counter_freq = yamon_getcpufreq(); + +#elif defined(TICK_USE_MALTA_RTC) + /* + * If we are running on a board with the MC146818 RTC, + * use it to determine CPU pipeline clock frequency. + */ + u_int64_t counterval[2]; + + /* Set RTC to binary mode. */ + writertc(RTC_STATUSB, (rtcin(RTC_STATUSB) | RTCSB_BCD)); + + /* Busy-wait for falling edge of RTC update. */ + while (((rtcin(RTC_STATUSA) & RTCSA_TUP) == 0)) + ; + while (((rtcin(RTC_STATUSA)& RTCSA_TUP) != 0)) + ; + counterval[0] = mips_rd_count(); + + /* Busy-wait for falling edge of RTC update. */ + while (((rtcin(RTC_STATUSA) & RTCSA_TUP) == 0)) + ; + while (((rtcin(RTC_STATUSA)& RTCSA_TUP) != 0)) + ; + counterval[1] = mips_rd_count(); + + platform_counter_freq = counterval[1] - counterval[0]; +#endif + + if (platform_counter_freq == 0) + platform_counter_freq = MIPS_DEFAULT_HZ; + + return (platform_counter_freq); +} + void platform_start(__register_t a0, __register_t a1, __register_t a2, __register_t a3) @@ -242,6 +294,10 @@ platform_start(__register_t a0, __regist kernend = round_page((vm_offset_t)&end); memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + mips_pcpu0_init(); + platform_counter_freq = malta_cpu_freq(); + mips_timer_early_init(platform_counter_freq); + cninit(); printf("entry: platform_start()\n"); @@ -262,44 +318,5 @@ platform_start(__register_t a0, __regist realmem = btoc(memsize); mips_init(); - do { -#if defined(TICK_USE_YAMON_FREQ) - /* - * If we are running on a board which uses YAMON firmware, - * then query CPU pipeline clock from the syscon object. - * If unsuccessful, use hard-coded default. - */ - platform_counter_freq = yamon_getcpufreq(); - if (platform_counter_freq == 0) - platform_counter_freq = MIPS_DEFAULT_HZ; - -#elif defined(TICK_USE_MALTA_RTC) - /* - * If we are running on a board with the MC146818 RTC, - * use it to determine CPU pipeline clock frequency. - */ - u_int64_t counterval[2]; - - /* Set RTC to binary mode. */ - writertc(RTC_STATUSB, (rtcin(RTC_STATUSB) | RTCSB_BCD)); - - /* Busy-wait for falling edge of RTC update. */ - while (((rtcin(RTC_STATUSA) & RTCSA_TUP) == 0)) - ; - while (((rtcin(RTC_STATUSA)& RTCSA_TUP) != 0)) - ; - counterval[0] = mips_rd_count(); - - /* Busy-wait for falling edge of RTC update. */ - while (((rtcin(RTC_STATUSA) & RTCSA_TUP) == 0)) - ; - while (((rtcin(RTC_STATUSA)& RTCSA_TUP) != 0)) - ; - counterval[1] = mips_rd_count(); - - platform_counter_freq = counterval[1] - counterval[0]; -#endif - } while(0); - mips_timer_init_params(platform_counter_freq, 0); } Modified: head/sys/mips/malta/maltareg.h ============================================================================== --- head/sys/mips/malta/maltareg.h Sun Jan 10 20:03:16 2010 (r202034) +++ head/sys/mips/malta/maltareg.h Sun Jan 10 20:06:14 2010 (r202035) @@ -94,37 +94,37 @@ 15 Secondary IDE Secondary IDE slot/Compact flash connector */ -#define MALTA_SYSTEMRAM_BASE 0x00000000 /* System RAM: */ +#define MALTA_SYSTEMRAM_BASE 0x00000000ul /* System RAM: */ #define MALTA_SYSTEMRAM_SIZE 0x08000000 /* 128 MByte */ -#define MALTA_PCIMEM1_BASE 0x08000000 /* PCI 1 memory: */ +#define MALTA_PCIMEM1_BASE 0x08000000ul /* PCI 1 memory: */ #define MALTA_PCIMEM1_SIZE 0x08000000 /* 128 MByte */ -#define MALTA_PCIMEM2_BASE 0x10000000 /* PCI 2 memory: */ +#define MALTA_PCIMEM2_BASE 0x10000000ul /* PCI 2 memory: */ #define MALTA_PCIMEM2_SIZE 0x08000000 /* 128 MByte */ -#define MALTA_PCIMEM3_BASE 0x18000000 /* PCI 3 memory */ +#define MALTA_PCIMEM3_BASE 0x18000000ul /* PCI 3 memory */ #define MALTA_PCIMEM3_SIZE 0x03e00000 /* 62 MByte */ -#define MALTA_CORECTRL_BASE 0x1be00000 /* Core control: */ +#define MALTA_CORECTRL_BASE 0x1be00000ul /* Core control: */ #define MALTA_CORECTRL_SIZE 0x00200000 /* 2 MByte */ -#define MALTA_RESERVED_BASE1 0x1c000000 /* Reserved: */ +#define MALTA_RESERVED_BASE1 0x1c000000ul /* Reserved: */ #define MALTA_RESERVED_SIZE1 0x02000000 /* 32 MByte */ -#define MALTA_MONITORFLASH_BASE 0x1e000000 /* Monitor Flash: */ +#define MALTA_MONITORFLASH_BASE 0x1e000000ul /* Monitor Flash: */ #define MALTA_MONITORFLASH_SIZE 0x003e0000 /* 4 MByte */ #define MALTA_MONITORFLASH_SECTORSIZE 0x00010000 /* Sect. = 64 KB */ -#define MALTA_FILEFLASH_BASE 0x1e3e0000 /* File Flash (for monitor): */ +#define MALTA_FILEFLASH_BASE 0x1e3e0000ul /* File Flash (for monitor): */ #define MALTA_FILEFLASH_SIZE 0x00020000 /* 128 KByte */ #define MALTA_FILEFLASH_SECTORSIZE 0x00010000 /* Sect. = 64 KB */ -#define MALTA_RESERVED_BASE2 0x1e400000 /* Reserved: */ +#define MALTA_RESERVED_BASE2 0x1e400000ul /* Reserved: */ #define MALTA_RESERVED_SIZE2 0x00c00000 /* 12 MByte */ -#define MALTA_FPGA_BASE 0x1f000000 /* FPGA: */ +#define MALTA_FPGA_BASE 0x1f000000ul /* FPGA: */ #define MALTA_FPGA_SIZE 0x00c00000 /* 12 MByte */ #define MALTA_NMISTATUS (MALTA_FPGA_BASE + 0x24) @@ -191,10 +191,10 @@ #define MALTA_I2COUT 0x10 #define MALTA_I2CSEL 0x18 -#define MALTA_BOOTROM_BASE 0x1fc00000 /* Boot ROM: */ +#define MALTA_BOOTROM_BASE 0x1fc00000ul /* Boot ROM: */ #define MALTA_BOOTROM_SIZE 0x00400000 /* 4 MByte */ -#define MALTA_REVISION 0x1fc00010 +#define MALTA_REVISION 0x1fc00010ul #define MALTA_REV_FPGRV 0xff0000 /* CBUS FPGA revision */ #define MALTA_REV_CORID 0x00fc00 /* Core Board ID */ #define MALTA_REV_CORRV 0x000300 /* Core Board Revision */ Modified: head/sys/mips/malta/obio.c ============================================================================== --- head/sys/mips/malta/obio.c Sun Jan 10 20:03:16 2010 (r202034) +++ head/sys/mips/malta/obio.c Sun Jan 10 20:06:14 2010 (r202035) @@ -63,20 +63,18 @@ int obio_attach(device_t); * A bit tricky and hackish. Since we need OBIO to rely * on PCI we make it pseudo-pci device. But there should * be only one such device, so we use this static flag - * to prevent false positives on every realPCI device probe. + * to prevent false positives on every real PCI device probe. */ static int have_one = 0; int obio_probe(device_t dev) { - if(!have_one) - { + if (!have_one) { have_one = 1; return 0; } - else - return (ENXIO); + return (ENXIO); } int @@ -84,7 +82,7 @@ obio_attach(device_t dev) { struct obio_softc *sc = device_get_softc(dev); - sc->oba_st = MIPS_BUS_SPACE_IO; + sc->oba_st = mips_bus_space_generic; sc->oba_addr = MIPS_PHYS_TO_KSEG1(MALTA_UART0ADR); sc->oba_size = MALTA_PCIMEM3_SIZE; sc->oba_rman.rm_type = RMAN_ARRAY; Modified: head/sys/mips/malta/std.malta ============================================================================== --- head/sys/mips/malta/std.malta Sun Jan 10 20:03:16 2010 (r202034) +++ head/sys/mips/malta/std.malta Sun Jan 10 20:06:14 2010 (r202035) @@ -2,8 +2,7 @@ files "../malta/files.malta" cpu CPU_MIPS4KC -options ISA_MIPS32 -options SOFTFLOAT +#options ISA_MIPS32 device pci device ata device atadisk Modified: head/sys/mips/malta/uart_bus_maltausart.c ============================================================================== --- head/sys/mips/malta/uart_bus_maltausart.c Sun Jan 10 20:03:16 2010 (r202034) +++ head/sys/mips/malta/uart_bus_maltausart.c Sun Jan 10 20:06:14 2010 (r202035) @@ -28,10 +28,6 @@ * code written by Olivier Houchard. */ -/* - * XXXMIPS: This file is hacked from arm/... . XXXMIPS here means this file is - * experimental and was written for MIPS32 port. - */ #include "opt_uart.h" #include @@ -53,9 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* - * XXXMIPS: - */ #include #include "uart_if.h" @@ -88,9 +81,9 @@ uart_malta_probe(device_t dev) sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs); sc->sc_class = &uart_ns8250_class; bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); - sc->sc_sysdev->bas.bst = 0; + sc->sc_sysdev->bas.bst = mips_bus_space_generic; sc->sc_sysdev->bas.bsh = MIPS_PHYS_TO_KSEG1(MALTA_UART0ADR); - sc->sc_bas.bst = 0; + sc->sc_bas.bst = mips_bus_space_generic; sc->sc_bas.bsh = MIPS_PHYS_TO_KSEG1(MALTA_UART0ADR); return(uart_bus_probe(dev, 0, 0, 0, 0)); } Modified: head/sys/mips/malta/uart_cpu_maltausart.c ============================================================================== --- head/sys/mips/malta/uart_cpu_maltausart.c Sun Jan 10 20:03:16 2010 (r202034) +++ head/sys/mips/malta/uart_cpu_maltausart.c Sun Jan 10 20:06:14 2010 (r202035) @@ -29,10 +29,6 @@ * Skeleton of this file was based on respective code for ARM * code written by Olivier Houchard. */ -/* - * XXXMIPS: This file is hacked from arm/... . XXXMIPS here means this file is - * experimental and was written for MIPS32 port. - */ #include "opt_uart.h" #include @@ -67,16 +63,16 @@ uart_cpu_getdev(int devtype, struct uart { di->ops = uart_getops(&uart_ns8250_class); di->bas.chan = 0; - di->bas.bst = 0; + di->bas.bst = mips_bus_space_generic; + di->bas.bsh = MIPS_PHYS_TO_KSEG1(MALTA_UART0ADR); di->bas.regshft = 0; di->bas.rclk = 0; - di->baudrate = 115200; + di->baudrate = 0; /* retain the baudrate configured by YAMON */ di->databits = 8; di->stopbits = 1; di->parity = UART_PARITY_NONE; - uart_bus_space_io = MIPS_PHYS_TO_KSEG1(MALTA_UART0ADR); - uart_bus_space_mem = MIPS_PHYS_TO_KSEG1(MALTA_UART0ADR); - di->bas.bsh = MIPS_PHYS_TO_KSEG1(MALTA_UART0ADR); + uart_bus_space_io = NULL; + uart_bus_space_mem = mips_bus_space_generic; return (0); } Modified: head/sys/mips/malta/yamon.h ============================================================================== --- head/sys/mips/malta/yamon.h Sun Jan 10 20:03:16 2010 (r202034) +++ head/sys/mips/malta/yamon.h Sun Jan 10 20:06:14 2010 (r202035) @@ -38,7 +38,7 @@ #ifndef _MALTA_YAMON_H_ #define _MALTA_YAMON_H_ -#define YAMON_FUNCTION_BASE 0x1fc00500 +#define YAMON_FUNCTION_BASE 0x1fc00500ul #define YAMON_PRINT_COUNT_OFS (YAMON_FUNCTION_BASE + 0x04) #define YAMON_EXIT_OFS (YAMON_FUNCTION_BASE + 0x20) @@ -53,7 +53,7 @@ #define YAMON_GETCHAR_OFS (YAMON_FUNCTION_BASE + 0x50) #define YAMON_SYSCON_READ_OFS (YAMON_FUNCTION_BASE + 0x54) -#define YAMON_FUNC(ofs) (*(uint32_t *)(MIPS_PHYS_TO_KSEG0(ofs))) +#define YAMON_FUNC(ofs) ((long)(*(int32_t *)(MIPS_PHYS_TO_KSEG0(ofs)))) typedef void (*t_yamon_print_count)(uint32_t port, char *s, uint32_t count); #define YAMON_PRINT_COUNT(s, count) \ From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:09:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4078F1065672; Sun, 10 Jan 2010 20:09:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30D2A8FC0C; Sun, 10 Jan 2010 20:09:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AK9VFU027908; Sun, 10 Jan 2010 20:09:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AK9VtG027902; Sun, 10 Jan 2010 20:09:31 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102009.o0AK9VtG027902@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 20:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202036 - head/sys/mips/sentry5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:09:31 -0000 Author: imp Date: Sun Jan 10 20:09:30 2010 New Revision: 202036 URL: http://svn.freebsd.org/changeset/base/202036 Log: Merge from projects/mips to head by hand: r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype. r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines Centralize initialization of pcpu, and set curthread early... r201631 | neel | 2010-01-05 23:42:08 -0700 (Tue, 05 Jan 2010) | 5 lines Remove all CFE-specific code from locore.S. The CFE entrypoint initialization is now done in platform-specific code. Approved by: imp (mentor) r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-) r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling. r196236 | imp | 2009-08-14 19:03:13 -0600 (Fri, 14 Aug 2009) | 3 lines Fix style error replicated multiple times. Move to mips_bus_space_generic for octeon obio impl. r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places. r187415 | gonzo | 2009-01-18 16:49:02 -0700 (Sun, 18 Jan 2009) | 3 lines - Move Silicon Backplanes code out to system-wide level (dev/siba) as it's going to be used not only for siba5 devices. Modified: head/sys/mips/sentry5/files.sentry5 head/sys/mips/sentry5/obio.c head/sys/mips/sentry5/s5_machdep.c head/sys/mips/sentry5/uart_bus_sbusart.c head/sys/mips/sentry5/uart_cpu_sbusart.c Modified: head/sys/mips/sentry5/files.sentry5 ============================================================================== --- head/sys/mips/sentry5/files.sentry5 Sun Jan 10 20:06:14 2010 (r202035) +++ head/sys/mips/sentry5/files.sentry5 Sun Jan 10 20:09:30 2010 (r202036) @@ -4,11 +4,6 @@ # for USB 1.1 OHCI, Ethernet and IPSEC cores # which are believed to be devices we have drivers for # which just need to be tweaked for attachment to an SSB system bus. - mips/sentry5/s5_machdep.c standard -dev/siba/siba.c optional siba -dev/siba/siba_pcib.c optional siba pci -mips/sentry5/siba_cc.c optional siba - -# notyet -#mips/sentry5/siba_mips.c optional siba +mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: head/sys/mips/sentry5/obio.c ============================================================================== --- head/sys/mips/sentry5/obio.c Sun Jan 10 20:06:14 2010 (r202035) +++ head/sys/mips/sentry5/obio.c Sun Jan 10 20:09:30 2010 (r202036) @@ -72,13 +72,11 @@ static int have_one = 0; int obio_probe(device_t dev) { - if(!have_one) - { + if (!have_one) { have_one = 1; return 0; } - else - return (ENXIO); + return (ENXIO); } int @@ -119,7 +117,6 @@ obio_alloc_resource(device_t bus, device { struct resource *rv; struct rman *rm; - bus_space_tag_t bt = 0; bus_space_handle_t bh = 0; struct obio_softc *sc = device_get_softc(bus); @@ -131,7 +128,6 @@ obio_alloc_resource(device_t bus, device return (NULL); case SYS_RES_IOPORT: rm = &sc->oba_rman; - bt = sc->oba_st; bh = sc->oba_addr; start = bh; break; @@ -146,7 +142,7 @@ obio_alloc_resource(device_t bus, device if (type == SYS_RES_IRQ) return (rv); rman_set_rid(rv, *rid); - rman_set_bustag(rv, bt); + rman_set_bustag(rv, mips_bus_space_generic); rman_set_bushandle(rv, bh); if (0) { Modified: head/sys/mips/sentry5/s5_machdep.c ============================================================================== --- head/sys/mips/sentry5/s5_machdep.c Sun Jan 10 20:06:14 2010 (r202035) +++ head/sys/mips/sentry5/s5_machdep.c Sun Jan 10 20:09:30 2010 (r202036) @@ -79,14 +79,15 @@ __FBSDID("$FreeBSD$"); #include #endif -#ifdef CFE -extern uint32_t cfe_handle; -extern uint32_t cfe_vector; -#endif - extern int *edata; extern int *end; +void +platform_cpu_init() +{ + /* Nothing special */ +} + static void mips_init(void) { @@ -177,8 +178,8 @@ platform_trap_exit(void) } void -platform_start(__register_t a0 __unused, __register_t a1 __unused, - __register_t a2 __unused, __register_t a3 __unused) +platform_start(__register_t a0, __register_t a1, __register_t a2, + __register_t a3) { vm_offset_t kernend; uint64_t platform_counter_freq; @@ -187,20 +188,24 @@ platform_start(__register_t a0 __unused, kernend = round_page((vm_offset_t)&end); memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + /* Initialize pcpu stuff */ + mips_pcpu0_init(); + #ifdef CFE /* * Initialize CFE firmware trampolines before * we initialize the low-level console. + * + * CFE passes the following values in registers: + * a0: firmware handle + * a2: firmware entry point + * a3: entry point seal */ - if (cfe_handle != 0) - cfe_init(cfe_handle, cfe_vector); + if (a3 == CFE_EPTSEAL) + cfe_init(a0, a2); #endif cninit(); -#ifdef CFE - if (cfe_handle == 0) - panic("CFE was not detected by locore.\n"); -#endif mips_init(); # if 0 Modified: head/sys/mips/sentry5/uart_bus_sbusart.c ============================================================================== --- head/sys/mips/sentry5/uart_bus_sbusart.c Sun Jan 10 20:06:14 2010 (r202035) +++ head/sys/mips/sentry5/uart_bus_sbusart.c Sun Jan 10 20:09:30 2010 (r202036) @@ -85,9 +85,9 @@ uart_malta_probe(device_t dev) sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs); sc->sc_class = &uart_ns8250_class; bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); - sc->sc_sysdev->bas.bst = 0; + sc->sc_sysdev->bas.bst = mips_bus_space_generic; sc->sc_sysdev->bas.bsh = MIPS_PHYS_TO_KSEG1(SENTRY5_UART1ADR); - sc->sc_bas.bst = 0; + sc->sc_bas.bst = mips_bus_space_generic; sc->sc_bas.bsh = MIPS_PHYS_TO_KSEG1(SENTRY5_UART1ADR); return(uart_bus_probe(dev, 0, 0, 0, 0)); } Modified: head/sys/mips/sentry5/uart_cpu_sbusart.c ============================================================================== --- head/sys/mips/sentry5/uart_cpu_sbusart.c Sun Jan 10 20:06:14 2010 (r202035) +++ head/sys/mips/sentry5/uart_cpu_sbusart.c Sun Jan 10 20:09:30 2010 (r202036) @@ -76,7 +76,7 @@ uart_cpu_getdev(int devtype, struct uart di->parity = UART_PARITY_NONE; uart_bus_space_io = MIPS_PHYS_TO_KSEG1(SENTRY5_UART1ADR); - uart_bus_space_mem = MIPS_PHYS_TO_KSEG1(SENTRY5_UART1ADR); + uart_bus_space_mem = mips_bus_space_generic; di->bas.bsh = MIPS_PHYS_TO_KSEG1(SENTRY5_UART1ADR); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:11:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E961106566C; Sun, 10 Jan 2010 20:11:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EF448FC0A; Sun, 10 Jan 2010 20:11:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AKBAoU028334; Sun, 10 Jan 2010 20:11:10 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AKBAZq028328; Sun, 10 Jan 2010 20:11:10 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102011.o0AKBAZq028328@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 20:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202037 - head/sys/mips/adm5120 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:11:10 -0000 Author: imp Date: Sun Jan 10 20:11:10 2010 New Revision: 202037 URL: http://svn.freebsd.org/changeset/base/202037 Log: Merge from projects/mips to head by hand: r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype. r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines Centralize initialization of pcpu, and set curthread early... r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-) r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling. r194213 | gonzo | 2009-06-14 15:04:54 -0600 (Sun, 14 Jun 2009) | 2 lines - Fix prototype and implementation of admsw_shutdown r192790 | gonzo | 2009-05-25 23:52:24 -0600 (Mon, 25 May 2009) | 2 lines - Provide proper pre_ithread/post_ithread functions r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places. r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order. Modified: head/sys/mips/adm5120/adm5120_machdep.c head/sys/mips/adm5120/files.adm5120 head/sys/mips/adm5120/if_admsw.c head/sys/mips/adm5120/obio.c head/sys/mips/adm5120/uart_cpu_adm5120.c Modified: head/sys/mips/adm5120/adm5120_machdep.c ============================================================================== --- head/sys/mips/adm5120/adm5120_machdep.c Sun Jan 10 20:09:30 2010 (r202036) +++ head/sys/mips/adm5120/adm5120_machdep.c Sun Jan 10 20:11:10 2010 (r202037) @@ -73,6 +73,12 @@ __FBSDID("$FreeBSD$"); extern int *edata; extern int *end; +void +platform_cpu_init() +{ + /* Nothing special */ +} + static void mips_init(void) { @@ -148,6 +154,9 @@ platform_start(__register_t a0 __unused, kernend = round_page((vm_offset_t)&end); memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + /* Initialize pcpu stuff */ + mips_pcpu0_init(); + cninit(); mips_init(); mips_timer_init_params(platform_counter_freq, 0); Modified: head/sys/mips/adm5120/files.adm5120 ============================================================================== --- head/sys/mips/adm5120/files.adm5120 Sun Jan 10 20:09:30 2010 (r202036) +++ head/sys/mips/adm5120/files.adm5120 Sun Jan 10 20:11:10 2010 (r202037) @@ -9,3 +9,5 @@ mips/adm5120/obio.c standard mips/adm5120/uart_bus_adm5120.c optional uart mips/adm5120/uart_cpu_adm5120.c optional uart mips/adm5120/uart_dev_adm5120.c optional uart +mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: head/sys/mips/adm5120/if_admsw.c ============================================================================== --- head/sys/mips/adm5120/if_admsw.c Sun Jan 10 20:09:30 2010 (r202036) +++ head/sys/mips/adm5120/if_admsw.c Sun Jan 10 20:11:10 2010 (r202037) @@ -528,7 +528,7 @@ admsw_attach(device_t dev) ifmedia_add(&sc->sc_ifmedia[i], IFM_ETHER|IFM_AUTO, 0, NULL); ifmedia_set(&sc->sc_ifmedia[i], IFM_ETHER|IFM_AUTO); - ifp = sc->sc_ifnet[i] = if_alloc(IFT_ETHER); + ifp = sc->sc_ifnet[i] = if_alloc(IFT_ETHER);; /* Setup interface parameters */ ifp->if_softc = sc; Modified: head/sys/mips/adm5120/obio.c ============================================================================== --- head/sys/mips/adm5120/obio.c Sun Jan 10 20:09:30 2010 (r202036) +++ head/sys/mips/adm5120/obio.c Sun Jan 10 20:11:10 2010 (r202037) @@ -120,6 +120,39 @@ static int obio_setup_intr(device_t, dev static int obio_teardown_intr(device_t, device_t, struct resource *, void *); + +static void +obio_mask_irq(void *source) +{ + int irq; + uint32_t irqmask; + uint32_t reg; + + irq = (int)source; + irqmask = 1 << irq; + + /* disable IRQ */ + reg = REG_READ(ICU_DISABLE_REG); + REG_WRITE(ICU_DISABLE_REG, (reg | irqmask)); +} + +static void +obio_unmask_irq(void *source) +{ + int irq; + uint32_t irqmask; + uint32_t reg; + + irq = (int)source; + irqmask = 1 << irq; + + /* disable IRQ */ + reg = REG_READ(ICU_DISABLE_REG); + REG_WRITE(ICU_DISABLE_REG, (reg & ~irqmask)); + +} + + static int obio_probe(device_t dev) { @@ -269,7 +302,7 @@ obio_activate_resource(device_t bus, dev vaddr = (void *)MIPS_PHYS_TO_KSEG1((intptr_t)rman_get_start(r)); rman_set_virtual(r, vaddr); - rman_set_bustag(r, MIPS_BUS_SPACE_MEM); + rman_set_bustag(r, mips_bus_space_generic); rman_set_bushandle(r, (bus_space_handle_t)vaddr); } @@ -321,7 +354,7 @@ obio_setup_intr(device_t dev, device_t c event = sc->sc_eventstab[irq]; if (event == NULL) { error = intr_event_create(&event, (void *)irq, 0, irq, - (mask_fn)mips_mask_irq, (mask_fn)mips_unmask_irq, + obio_mask_irq, obio_unmask_irq, NULL, NULL, "obio intr%d:", irq); sc->sc_eventstab[irq] = event; @@ -343,6 +376,8 @@ obio_setup_intr(device_t dev, device_t c /* enable */ REG_WRITE(ICU_ENABLE_REG, irqmask); + obio_unmask_irq((void*)irq); + return (0); } @@ -351,7 +386,7 @@ obio_teardown_intr(device_t dev, device_ void *cookie) { struct obio_softc *sc = device_get_softc(dev); - int irq, result; + int irq, result, priority; uint32_t irqmask; irq = rman_get_start(ires); @@ -361,10 +396,18 @@ obio_teardown_intr(device_t dev, device_ if (sc->sc_eventstab[irq] == NULL) panic("Trying to teardown unoccupied IRQ"); - irqmask = 1 << irq; /* only used as a mask from here on */ + irqmask = (1 << irq); + priority = irq_priorities[irq]; - /* disable this irq in HW */ - REG_WRITE(ICU_DISABLE_REG, irqmask); + if (priority == INTR_FIQ) + REG_WRITE(ICU_MODE_REG, REG_READ(ICU_MODE_REG) & ~irqmask); + else + REG_WRITE(ICU_MODE_REG, REG_READ(ICU_MODE_REG) | irqmask); + + /* disable */ + irqmask = REG_READ(ICU_ENABLE_REG); + irqmask &= ~(1 << irq); + REG_WRITE(ICU_ENABLE_REG, irqmask); result = intr_event_remove_handler(cookie); if (!result) { Modified: head/sys/mips/adm5120/uart_cpu_adm5120.c ============================================================================== --- head/sys/mips/adm5120/uart_cpu_adm5120.c Sun Jan 10 20:09:30 2010 (r202036) +++ head/sys/mips/adm5120/uart_cpu_adm5120.c Sun Jan 10 20:11:10 2010 (r202037) @@ -67,7 +67,7 @@ uart_cpu_getdev(int devtype, struct uart di->ops = uart_getops(&uart_adm5120_uart_class); di->bas.chan = 0; - di->bas.bst = 0; + di->bas.bst = mips_bus_space_generic; di->bas.regshft = 0; di->bas.rclk = 0; di->baudrate = 115200; @@ -76,7 +76,7 @@ uart_cpu_getdev(int devtype, struct uart di->parity = UART_PARITY_NONE; uart_bus_space_io = 0; - uart_bus_space_mem = MIPS_PHYS_TO_KSEG1(ADM5120_BASE_UART0); + uart_bus_space_mem = mips_bus_space_generic; di->bas.bsh = MIPS_PHYS_TO_KSEG1(ADM5120_BASE_UART0); return (0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:12:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1051B1065694; Sun, 10 Jan 2010 20:12:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC14B8FC1B; Sun, 10 Jan 2010 20:12:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AKCHQE028636; Sun, 10 Jan 2010 20:12:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AKCHgG028633; Sun, 10 Jan 2010 20:12:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102012.o0AKCHgG028633@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 20:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202038 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:12:18 -0000 Author: imp Date: Sun Jan 10 20:12:17 2010 New Revision: 202038 URL: http://svn.freebsd.org/changeset/base/202038 Log: Merge from projects/mips to head by hand: Copy over inckern.S for crunched kernel support. Added: - copied unchanged from r202037, projects/mips/sys/mips/mips/inckern.S Directory Properties: head/sys/mips/mips/inckern.S (props changed) Copied: head/sys/mips/mips/inckern.S (from r202037, projects/mips/sys/mips/mips/inckern.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/mips/inckern.S Sun Jan 10 20:12:17 2010 (r202038, copy of r202037, projects/mips/sys/mips/mips/inckern.S) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2005 Olivier Houchard. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opt_kernname.h" + +#include +__FBSDID("$FreeBSD$") +.section ".real_kernel","aw" +.globl kernel_start; +kernel_start: +.incbin KERNNAME +.globl kernel_end; +kernel_end: From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:13:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D355106566B; Sun, 10 Jan 2010 20:13:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 846FB8FC0C; Sun, 10 Jan 2010 20:13:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AKD5KP028843; Sun, 10 Jan 2010 20:13:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AKD55o028841; Sun, 10 Jan 2010 20:13:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102013.o0AKD55o028841@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 20:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202039 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:13:05 -0000 Author: imp Date: Sun Jan 10 20:13:05 2010 New Revision: 202039 URL: http://svn.freebsd.org/changeset/base/202039 Log: Merge from projects/mips to head by hand: Copy over sys_machdep.c Added: - copied unchanged from r202038, projects/mips/sys/mips/mips/sys_machdep.c Directory Properties: head/sys/mips/mips/sys_machdep.c (props changed) Copied: head/sys/mips/mips/sys_machdep.c (from r202038, projects/mips/sys/mips/mips/sys_machdep.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/mips/sys_machdep.c Sun Jan 10 20:13:05 2010 (r202039, copy of r202038, projects/mips/sys/mips/mips/sys_machdep.c) @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91 + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + +#ifndef _SYS_SYSPROTO_H_ +struct sysarch_args { + int op; + char *parms; +}; +#endif + +int +sysarch(td, uap) + struct thread *td; + register struct sysarch_args *uap; +{ + int error; + void *tlsbase; + + switch (uap->op) { + case MIPS_SET_TLS : + td->td_md.md_tls = (void*)uap->parms; + error = 0; + break; + + case MIPS_GET_TLS : + tlsbase = td->td_md.md_tls; + error = copyout(&tlsbase, uap->parms, sizeof(tlsbase)); + break; + default: + error = EINVAL; + } + return (error); +} From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:13:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7849B1065692; Sun, 10 Jan 2010 20:13:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 692EF8FC1B; Sun, 10 Jan 2010 20:13:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AKDw6u029076; Sun, 10 Jan 2010 20:13:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AKDwVl029074; Sun, 10 Jan 2010 20:13:58 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102013.o0AKDwVl029074@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 20:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202040 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:13:58 -0000 Author: imp Date: Sun Jan 10 20:13:58 2010 New Revision: 202040 URL: http://svn.freebsd.org/changeset/base/202040 Log: Merge from projects/mips to head by hand: Copy over elf_trampoline.c for crunched kernel support. Added: - copied unchanged from r202039, projects/mips/sys/mips/mips/elf_trampoline.c Directory Properties: head/sys/mips/mips/elf_trampoline.c (props changed) Copied: head/sys/mips/mips/elf_trampoline.c (from r202039, projects/mips/sys/mips/mips/elf_trampoline.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/mips/elf_trampoline.c Sun Jan 10 20:13:58 2010 (r202040, copy of r202039, projects/mips/sys/mips/mips/elf_trampoline.c) @@ -0,0 +1,147 @@ +/*- + * Copyright (c) 2005 Olivier Houchard. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include + +#ifdef __mips_n64 +#include +#else +#include +#endif +#include +#include +#include +#include + +/* + * Since we are compiled outside of the normal kernel build process, we + * need to include opt_global.h manually. + */ +#include "opt_global.h" +#include "opt_kernname.h" + +extern char kernel_start[]; +extern char kernel_end[]; + +static __inline void * +memcpy(void *dst, const void *src, size_t len) +{ + const char *s = src; + char *d = dst; + + while (len) { + if (0 && len >= 4 && !((vm_offset_t)d & 3) && + !((vm_offset_t)s & 3)) { + *(uint32_t *)d = *(uint32_t *)s; + s += 4; + d += 4; + len -= 4; + } else { + *d++ = *s++; + len--; + } + } + return (dst); +} + +static __inline void +bzero(void *addr, size_t count) +{ + char *tmp = (char *)addr; + + while (count > 0) { + if (count >= 4 && !((vm_offset_t)tmp & 3)) { + *(uint32_t *)tmp = 0; + tmp += 4; + count -= 4; + } else { + *tmp = 0; + tmp++; + count--; + } + } +} + +/* + * Relocate PT_LOAD segements of kernel ELF image to their respective + * virtual addresses and return entry point + */ +void * +load_kernel(void * kstart) +{ +#ifdef __mips_n64 + Elf64_Ehdr *eh; + Elf64_Phdr phdr[64] /* XXX */; +#else + Elf32_Ehdr *eh; + Elf32_Phdr phdr[64] /* XXX */; +#endif + int i; + void *entry_point; + +#ifdef __mips_n64 + eh = (Elf64_Ehdr *)kstart; +#else + eh = (Elf32_Ehdr *)kstart; +#endif + entry_point = (void*)eh->e_entry; + memcpy(phdr, (void *)(kstart + eh->e_phoff ), + eh->e_phnum * sizeof(phdr[0])); + + for (i = 0; i < eh->e_phnum; i++) { + volatile char c; + + if (phdr[i].p_type != PT_LOAD) + continue; + + memcpy((void *)(phdr[i].p_vaddr), + (void*)(kstart + phdr[i].p_offset), phdr[i].p_filesz); + /* Clean space from oversized segments, eg: bss. */ + if (phdr[i].p_filesz < phdr[i].p_memsz) + bzero((void *)(phdr[i].p_vaddr + phdr[i].p_filesz), + phdr[i].p_memsz - phdr[i].p_filesz); + } + + return entry_point; +} + +void +_startC(register_t a0, register_t a1, register_t a2, register_t a3) +{ + unsigned int * code; + int i; + void (*entry_point)(register_t, register_t, register_t, register_t); + + /* + * Relocate segment to the predefined memory location + * Most likely it will be KSEG0/KSEG1 address + */ + entry_point = load_kernel(kernel_start); + + /* Pass saved registers to original _start */ + entry_point(a0, a1, a2, a3); +} From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:14:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B61B8106566B; Sun, 10 Jan 2010 20:14:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5EEB8FC17; Sun, 10 Jan 2010 20:14:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AKEcWh029262; Sun, 10 Jan 2010 20:14:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AKEcJB029245; Sun, 10 Jan 2010 20:14:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102014.o0AKEcJB029245@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 20:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202041 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:14:38 -0000 Author: imp Date: Sun Jan 10 20:14:38 2010 New Revision: 202041 URL: http://svn.freebsd.org/changeset/base/202041 Log: Merge from projects/mips to head by hand: copy over the generic bus space implementation... Added: - copied unchanged from r202040, projects/mips/sys/mips/mips/bus_space_generic.c Directory Properties: head/sys/mips/mips/bus_space_generic.c (props changed) Copied: head/sys/mips/mips/bus_space_generic.c (from r202040, projects/mips/sys/mips/mips/bus_space_generic.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/mips/bus_space_generic.c Sun Jan 10 20:14:38 2010 (r202041, copy of r202040, projects/mips/sys/mips/mips/bus_space_generic.c) @@ -0,0 +1,590 @@ +/* $NetBSD: bus.h,v 1.12 1997/10/01 08:25:15 fvdl Exp $ */ +/*- + * $Id: bus.h,v 1.6 2007/08/09 11:23:32 katta Exp $ + * + * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, + * NASA Ames Research Center. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Copyright (c) 1996 Charles M. Hannum. All rights reserved. + * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Christopher G. Demetriou + * for the NetBSD Project. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * from: src/sys/alpha/include/bus.h,v 1.5 1999/08/28 00:38:40 peter + * $FreeBSD$ + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +static struct bus_space generic_space = { + /* cookie */ + (void *) 0, + + /* mapping/unmapping */ + generic_bs_map, + generic_bs_unmap, + generic_bs_subregion, + + /* allocation/deallocation */ + NULL, + NULL, + + /* barrier */ + generic_bs_barrier, + + /* read (single) */ + generic_bs_r_1, + generic_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple */ + generic_bs_rm_1, + generic_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region */ + generic_bs_rr_1, + generic_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) */ + generic_bs_w_1, + generic_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple */ + generic_bs_wm_1, + generic_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region */ + NULL, + generic_bs_wr_2, + generic_bs_wr_4, + NULL, + + /* set multiple */ + NULL, + NULL, + NULL, + NULL, + + /* set region */ + NULL, + generic_bs_sr_2, + generic_bs_sr_4, + NULL, + + /* copy */ + NULL, + generic_bs_c_2, + NULL, + NULL, + + /* read (single) stream */ + generic_bs_r_1, + generic_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple stream */ + generic_bs_rm_1, + generic_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region stream */ + generic_bs_rr_1, + generic_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) stream */ + generic_bs_w_1, + generic_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple stream */ + generic_bs_wm_1, + generic_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region stream */ + NULL, + generic_bs_wr_2, + generic_bs_wr_4, + NULL, +}; + +/* Ultra-gross kludge */ +#include "opt_cputype.h" +#if defined(TARGET_OCTEON) && defined(ISA_MIPS32) +#include +#define rd8(a) oct_read8(a) +#define rd16(a) oct_read16(a) +#define rd32(a) oct_read32(a) +#define wr8(a, v) oct_write8(a, v) +#define wr16(a, v) oct_write16(a, v) +#define wr32(a, v) oct_write32(a, v) +#else +#define rd8(a) readb(a) +#define rd16(a) readw(a) +#define rd32(a) readl(a) +#define wr8(a, v) writeb(a, v) +#define wr16(a, v) writew(a, v) +#define wr32(a, v) writel(a, v) +#endif + +/* generic bus_space tag */ +bus_space_tag_t mips_bus_space_generic = &generic_space; + +int +generic_bs_map(void *t __unused, bus_addr_t addr, + bus_size_t size __unused, int flags __unused, + bus_space_handle_t *bshp) +{ + + *bshp = addr; + return (0); +} + +void +generic_bs_unmap(void *t __unused, bus_space_handle_t bh __unused, + bus_size_t size __unused) +{ + + /* Do nothing */ +} + +int +generic_bs_subregion(void *t __unused, bus_space_handle_t handle __unused, + bus_size_t offset __unused, bus_size_t size __unused, + bus_space_handle_t *nhandle __unused) +{ + + printf("SUBREGION?!?!?!\n"); + /* Do nothing */ + return (0); +} + +uint8_t +generic_bs_r_1(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + + return (rd8(handle + offset)); +} + +uint16_t +generic_bs_r_2(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + + return (rd16(handle + offset)); +} + +uint32_t +generic_bs_r_4(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + + return (rd32(handle + offset)); +} + + +void +generic_bs_rm_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint8_t *addr, size_t count) +{ + + while (count--) + *addr++ = rd8(bsh + offset); +} + +void +generic_bs_rm_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) + *addr++ = rd16(baddr); +} + +void +generic_bs_rm_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) + *addr++ = rd32(baddr); +} + + +/* + * Read `count' 1, 2, 4, or 8 byte quantities from bus space + * described by tag/handle and starting at `offset' and copy into + * buffer provided. + */ +void +generic_bs_rr_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint8_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = rd8(baddr); + baddr += 1; + } +} + +void +generic_bs_rr_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = rd16(baddr); + baddr += 2; + } +} + +void +generic_bs_rr_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = rd32(baddr); + baddr += 4; + } +} + +/* + * Write the 1, 2, 4, or 8 byte value `value' to bus space + * described by tag/handle/offset. + */ +void +generic_bs_w_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint8_t value) +{ + + wr8(bsh + offset, value); +} + +void +generic_bs_w_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t value) +{ + + wr16(bsh + offset, value); +} + +void +generic_bs_w_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t value) +{ + + wr32(bsh + offset, value); +} + +/* + * Write `count' 1, 2, 4, or 8 byte quantities from the buffer + * provided to bus space described by tag/handle/offset. + */ +void +generic_bs_wm_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, const uint8_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) + wr8(baddr, *addr++); +} + +void +generic_bs_wm_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, const uint16_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) + wr16(baddr, *addr++); +} + +void +generic_bs_wm_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, const uint32_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) + wr32(baddr, *addr++); +} + +/* + * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided + * to bus space described by tag/handle starting at `offset'. + */ +void +generic_bs_wr_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, const uint8_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + wr8(baddr, *addr++); + baddr += 1; + } +} + +void +generic_bs_wr_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, const uint16_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + wr16(baddr, *addr++); + baddr += 2; + } +} + +void +generic_bs_wr_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, const uint32_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + wr32(baddr, *addr++); + baddr += 4; + } +} + +/* + * Write the 1, 2, 4, or 8 byte value `val' to bus space described + * by tag/handle/offset `count' times. + */ +void +generic_bs_sm_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint8_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + while (count--) + wr8(addr, value); +} + +void +generic_bs_sm_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + while (count--) + wr16(addr, value); +} + +void +generic_bs_sm_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + while (count--) + wr32(addr, value); +} + +/* + * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described + * by tag/handle starting at `offset'. + */ +void +generic_bs_sr_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint8_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr++) + wr8(addr, value); +} + +void +generic_bs_sr_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 2) + wr16(addr, value); +} + +void +generic_bs_sr_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 4) + wr32(addr, value); +} + +/* + * Copy `count' 1, 2, 4, or 8 byte values from bus space starting + * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. + */ +void +generic_bs_c_1(void *t, bus_space_handle_t bsh1, + bus_size_t off1, bus_space_handle_t bsh2, + bus_size_t off2, size_t count) +{ + bus_addr_t addr1 = bsh1 + off1; + bus_addr_t addr2 = bsh2 + off2; + + if (addr1 >= addr2) { + /* src after dest: copy forward */ + for (; count != 0; count--, addr1++, addr2++) + wr8(addr2, rd8(addr1)); + } else { + /* dest after src: copy backwards */ + for (addr1 += (count - 1), addr2 += (count - 1); + count != 0; count--, addr1--, addr2--) + wr8(addr2, rd8(addr1)); + } +} + +void +generic_bs_c_2(void *t, bus_space_handle_t bsh1, + bus_size_t off1, bus_space_handle_t bsh2, + bus_size_t off2, size_t count) +{ + bus_addr_t addr1 = bsh1 + off1; + bus_addr_t addr2 = bsh2 + off2; + + if (addr1 >= addr2) { + /* src after dest: copy forward */ + for (; count != 0; count--, addr1 += 2, addr2 += 2) + wr16(addr2, rd16(addr1)); + } else { + /* dest after src: copy backwards */ + for (addr1 += 2 * (count - 1), addr2 += 2 * (count - 1); + count != 0; count--, addr1 -= 2, addr2 -= 2) + wr16(addr2, rd16(addr1)); + } +} + +void +generic_bs_c_4(void *t, bus_space_handle_t bsh1, + bus_size_t off1, bus_space_handle_t bsh2, + bus_size_t off2, size_t count) +{ + bus_addr_t addr1 = bsh1 + off1; + bus_addr_t addr2 = bsh2 + off2; + + if (addr1 >= addr2) { + /* src after dest: copy forward */ + for (; count != 0; count--, addr1 += 4, addr2 += 4) + wr32(addr2, rd32(addr1)); + } else { + /* dest after src: copy backwards */ + for (addr1 += 4 * (count - 1), addr2 += 4 * (count - 1); + count != 0; count--, addr1 -= 4, addr2 -= 4) + wr32(addr2, rd32(addr1)); + } +} + +void +generic_bs_barrier(void *t __unused, + bus_space_handle_t bsh __unused, + bus_size_t offset __unused, bus_size_t len __unused, + int flags) +{ +#if 0 + if (flags & BUS_SPACE_BARRIER_WRITE) + mips_dcache_wbinv_all(); +#endif +} From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:22:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80C05106566C; Sun, 10 Jan 2010 20:22:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 709C68FC19; Sun, 10 Jan 2010 20:22:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AKM5fM031071; Sun, 10 Jan 2010 20:22:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AKM5pd031069; Sun, 10 Jan 2010 20:22:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102022.o0AKM5pd031069@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 20:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202044 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:22:05 -0000 Author: imp Date: Sun Jan 10 20:22:05 2010 New Revision: 202044 URL: http://svn.freebsd.org/changeset/base/202044 Log: Fix mis-merge from projects/mips... the diff didn't apply correctly and I didn't notice until after the commit. Modified: head/sys/mips/include/bus.h Modified: head/sys/mips/include/bus.h ============================================================================== --- head/sys/mips/include/bus.h Sun Jan 10 20:21:42 2010 (r202043) +++ head/sys/mips/include/bus.h Sun Jan 10 20:22:05 2010 (r202044) @@ -67,843 +67,662 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: src/sys/alpha/include/bus.h,v 1.5 1999/08/28 00:38:40 peter * $FreeBSD$ -*/ + */ #ifndef _MACHINE_BUS_H_ -#define _MACHINE_BUS_H_ +#define _MACHINE_BUS_H_ -#ifdef TARGET_OCTEON -#include -#else #include -#include - -/* - * Values for the mips bus space tag, not to be used directly by MI code. - */ -#define MIPS_BUS_SPACE_IO 0 /* space is i/o space */ -#define MIPS_BUS_SPACE_MEM 1 /* space is mem space */ - - -#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF -#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXSIZE 0xFFFFFFFF /* Maximum supported size */ -#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF -#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXADDR 0xFFFFFFFF - -#define BUS_SPACE_UNRESTRICTED (~0) - -/* - * Map a region of device bus space into CPU virtual address space. - */ -static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, - bus_size_t size, int flags, - bus_space_handle_t *bshp); - -static __inline int -bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, - bus_size_t size __unused, int flags __unused, - bus_space_handle_t *bshp) -{ - - *bshp = addr; - return (0); -} - -/* - * Unmap a region of device bus space. - */ - -void bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size); - -/* - * Get a new handle for a subregion of an already-mapped area of bus space. - */ - -int bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp); - -/* - * Allocate a region of memory that is accessible to devices in bus space. - */ - -int bus_space_alloc(bus_space_tag_t t, bus_addr_t rstart, - bus_addr_t rend, bus_size_t size, bus_size_t align, - bus_size_t boundary, int flags, bus_addr_t *addrp, - bus_space_handle_t *bshp); - -/* - * Free a region of bus space accessible memory. - */ - -void bus_space_free(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size); - - -/* - * Read a 1, 2, 4, or 8 byte quantity from bus space - * described by tag/handle/offset. - */ -static __inline u_int8_t bus_space_read_1(bus_space_tag_t tag, - bus_space_handle_t handle, - bus_size_t offset); - -static __inline u_int16_t bus_space_read_2(bus_space_tag_t tag, - bus_space_handle_t handle, - bus_size_t offset); - -static __inline u_int32_t bus_space_read_4(bus_space_tag_t tag, - bus_space_handle_t handle, - bus_size_t offset); - -static __inline u_int8_t -bus_space_read_1(bus_space_tag_t tag, bus_space_handle_t handle, - bus_size_t offset) -{ - - if (tag == MIPS_BUS_SPACE_IO) - return (inb(handle + offset)); - return (readb(handle + offset)); -} - -static __inline u_int16_t -bus_space_read_2(bus_space_tag_t tag, bus_space_handle_t handle, - bus_size_t offset) -{ - - if (tag == MIPS_BUS_SPACE_IO) - return (inw(handle + offset)); - return (readw(handle + offset)); -} - -static __inline u_int32_t -bus_space_read_4(bus_space_tag_t tag, bus_space_handle_t handle, - bus_size_t offset) -{ - - if (tag == MIPS_BUS_SPACE_IO) - return (inl(handle + offset)); - return (readl(handle + offset)); -} - -#if 0 /* Cause a link error for bus_space_read_8 */ -#define bus_space_read_8(t, h, o) !!! bus_space_read_8 unimplemented !!! -#endif - -/* - * Read `count' 1, 2, 4, or 8 byte quantities from bus space - * described by tag/handle/offset and copy into buffer provided. - */ -static __inline void bus_space_read_multi_1(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int8_t *addr, - size_t count); - -static __inline void bus_space_read_multi_2(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int16_t *addr, - size_t count); - -static __inline void bus_space_read_multi_4(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int32_t *addr, - size_t count); - -static __inline void -bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int8_t *addr, size_t count) -{ - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - *addr++ = inb(bsh + offset); - else - while (count--) - *addr++ = readb(bsh + offset); -} - -static __inline void -bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int16_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - *addr++ = inw(baddr); - else - while (count--) - *addr++ = readw(baddr); -} - -static __inline void -bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int32_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - *addr++ = inl(baddr); - else - while (count--) - *addr++ = readl(baddr); -} - -#if 0 /* Cause a link error for bus_space_read_multi_8 */ -#define bus_space_read_multi_8 !!! bus_space_read_multi_8 unimplemented !!! -#endif - -/* - * Read `count' 1, 2, 4, or 8 byte quantities from bus space - * described by tag/handle and starting at `offset' and copy into - * buffer provided. - */ -static __inline void bus_space_read_region_1(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int8_t *addr, - size_t count); - -static __inline void bus_space_read_region_2(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int16_t *addr, - size_t count); - -static __inline void bus_space_read_region_4(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int32_t *addr, - size_t count); - - -static __inline void -bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int8_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) { - *addr++ = inb(baddr); - baddr += 1; - } - else - while (count--) { - *addr++ = readb(baddr); - baddr += 1; - } -} - -static __inline void -bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int16_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) { - *addr++ = inw(baddr); - baddr += 2; - } - else - while (count--) { - *addr++ = readw(baddr); - baddr += 2; - } -} - -static __inline void -bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int32_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) { - *addr++ = inl(baddr); - baddr += 4; - } - else - while (count--) { - *addr++ = readb(baddr); - baddr += 4; - } -} - -#if 0 /* Cause a link error for bus_space_read_region_8 */ -#define bus_space_read_region_8 !!! bus_space_read_region_8 unimplemented !!! -#endif - -/* - * Write the 1, 2, 4, or 8 byte value `value' to bus space - * described by tag/handle/offset. - */ +struct bus_space { + /* cookie */ + void *bs_cookie; + + /* mapping/unmapping */ + int (*bs_map) (void *, bus_addr_t, bus_size_t, + int, bus_space_handle_t *); + void (*bs_unmap) (void *, bus_space_handle_t, bus_size_t); + int (*bs_subregion) (void *, bus_space_handle_t, + bus_size_t, bus_size_t, bus_space_handle_t *); + + /* allocation/deallocation */ + int (*bs_alloc) (void *, bus_addr_t, bus_addr_t, + bus_size_t, bus_size_t, bus_size_t, int, + bus_addr_t *, bus_space_handle_t *); + void (*bs_free) (void *, bus_space_handle_t, + bus_size_t); + + /* get kernel virtual address */ + /* barrier */ + void (*bs_barrier) (void *, bus_space_handle_t, + bus_size_t, bus_size_t, int); + + /* read (single) */ + u_int8_t (*bs_r_1) (void *, bus_space_handle_t, bus_size_t); + u_int16_t (*bs_r_2) (void *, bus_space_handle_t, bus_size_t); + u_int32_t (*bs_r_4) (void *, bus_space_handle_t, bus_size_t); + u_int64_t (*bs_r_8) (void *, bus_space_handle_t, bus_size_t); + + /* read multiple */ + void (*bs_rm_1) (void *, bus_space_handle_t, bus_size_t, + u_int8_t *, bus_size_t); + void (*bs_rm_2) (void *, bus_space_handle_t, bus_size_t, + u_int16_t *, bus_size_t); + void (*bs_rm_4) (void *, bus_space_handle_t, + bus_size_t, u_int32_t *, bus_size_t); + void (*bs_rm_8) (void *, bus_space_handle_t, + bus_size_t, u_int64_t *, bus_size_t); + + /* read region */ + void (*bs_rr_1) (void *, bus_space_handle_t, + bus_size_t, u_int8_t *, bus_size_t); + void (*bs_rr_2) (void *, bus_space_handle_t, + bus_size_t, u_int16_t *, bus_size_t); + void (*bs_rr_4) (void *, bus_space_handle_t, + bus_size_t, u_int32_t *, bus_size_t); + void (*bs_rr_8) (void *, bus_space_handle_t, + bus_size_t, u_int64_t *, bus_size_t); + + /* write (single) */ + void (*bs_w_1) (void *, bus_space_handle_t, + bus_size_t, u_int8_t); + void (*bs_w_2) (void *, bus_space_handle_t, + bus_size_t, u_int16_t); + void (*bs_w_4) (void *, bus_space_handle_t, + bus_size_t, u_int32_t); + void (*bs_w_8) (void *, bus_space_handle_t, + bus_size_t, u_int64_t); + + /* write multiple */ + void (*bs_wm_1) (void *, bus_space_handle_t, + bus_size_t, const u_int8_t *, bus_size_t); + void (*bs_wm_2) (void *, bus_space_handle_t, + bus_size_t, const u_int16_t *, bus_size_t); + void (*bs_wm_4) (void *, bus_space_handle_t, + bus_size_t, const u_int32_t *, bus_size_t); + void (*bs_wm_8) (void *, bus_space_handle_t, + bus_size_t, const u_int64_t *, bus_size_t); + + /* write region */ + void (*bs_wr_1) (void *, bus_space_handle_t, + bus_size_t, const u_int8_t *, bus_size_t); + void (*bs_wr_2) (void *, bus_space_handle_t, + bus_size_t, const u_int16_t *, bus_size_t); + void (*bs_wr_4) (void *, bus_space_handle_t, + bus_size_t, const u_int32_t *, bus_size_t); + void (*bs_wr_8) (void *, bus_space_handle_t, + bus_size_t, const u_int64_t *, bus_size_t); + + /* set multiple */ + void (*bs_sm_1) (void *, bus_space_handle_t, + bus_size_t, u_int8_t, bus_size_t); + void (*bs_sm_2) (void *, bus_space_handle_t, + bus_size_t, u_int16_t, bus_size_t); + void (*bs_sm_4) (void *, bus_space_handle_t, + bus_size_t, u_int32_t, bus_size_t); + void (*bs_sm_8) (void *, bus_space_handle_t, + bus_size_t, u_int64_t, bus_size_t); + + /* set region */ + void (*bs_sr_1) (void *, bus_space_handle_t, + bus_size_t, u_int8_t, bus_size_t); + void (*bs_sr_2) (void *, bus_space_handle_t, + bus_size_t, u_int16_t, bus_size_t); + void (*bs_sr_4) (void *, bus_space_handle_t, + bus_size_t, u_int32_t, bus_size_t); + void (*bs_sr_8) (void *, bus_space_handle_t, + bus_size_t, u_int64_t, bus_size_t); + + /* copy */ + void (*bs_c_1) (void *, bus_space_handle_t, bus_size_t, + bus_space_handle_t, bus_size_t, bus_size_t); + void (*bs_c_2) (void *, bus_space_handle_t, bus_size_t, + bus_space_handle_t, bus_size_t, bus_size_t); + void (*bs_c_4) (void *, bus_space_handle_t, bus_size_t, + bus_space_handle_t, bus_size_t, bus_size_t); + void (*bs_c_8) (void *, bus_space_handle_t, bus_size_t, + bus_space_handle_t, bus_size_t, bus_size_t); + + /* read stream (single) */ + u_int8_t (*bs_r_1_s) (void *, bus_space_handle_t, bus_size_t); + u_int16_t (*bs_r_2_s) (void *, bus_space_handle_t, bus_size_t); + u_int32_t (*bs_r_4_s) (void *, bus_space_handle_t, bus_size_t); + u_int64_t (*bs_r_8_s) (void *, bus_space_handle_t, bus_size_t); + + /* read multiple stream */ + void (*bs_rm_1_s) (void *, bus_space_handle_t, bus_size_t, + u_int8_t *, bus_size_t); + void (*bs_rm_2_s) (void *, bus_space_handle_t, bus_size_t, + u_int16_t *, bus_size_t); + void (*bs_rm_4_s) (void *, bus_space_handle_t, + bus_size_t, u_int32_t *, bus_size_t); + void (*bs_rm_8_s) (void *, bus_space_handle_t, + bus_size_t, u_int64_t *, bus_size_t); + + /* read region stream */ + void (*bs_rr_1_s) (void *, bus_space_handle_t, + bus_size_t, u_int8_t *, bus_size_t); + void (*bs_rr_2_s) (void *, bus_space_handle_t, + bus_size_t, u_int16_t *, bus_size_t); + void (*bs_rr_4_s) (void *, bus_space_handle_t, + bus_size_t, u_int32_t *, bus_size_t); + void (*bs_rr_8_s) (void *, bus_space_handle_t, + bus_size_t, u_int64_t *, bus_size_t); + + /* write stream (single) */ + void (*bs_w_1_s) (void *, bus_space_handle_t, + bus_size_t, u_int8_t); + void (*bs_w_2_s) (void *, bus_space_handle_t, + bus_size_t, u_int16_t); + void (*bs_w_4_s) (void *, bus_space_handle_t, + bus_size_t, u_int32_t); + void (*bs_w_8_s) (void *, bus_space_handle_t, + bus_size_t, u_int64_t); + + /* write multiple stream */ + void (*bs_wm_1_s) (void *, bus_space_handle_t, + bus_size_t, const u_int8_t *, bus_size_t); + void (*bs_wm_2_s) (void *, bus_space_handle_t, + bus_size_t, const u_int16_t *, bus_size_t); + void (*bs_wm_4_s) (void *, bus_space_handle_t, + bus_size_t, const u_int32_t *, bus_size_t); + void (*bs_wm_8_s) (void *, bus_space_handle_t, + bus_size_t, const u_int64_t *, bus_size_t); + + /* write region stream */ + void (*bs_wr_1_s) (void *, bus_space_handle_t, + bus_size_t, const u_int8_t *, bus_size_t); + void (*bs_wr_2_s) (void *, bus_space_handle_t, + bus_size_t, const u_int16_t *, bus_size_t); + void (*bs_wr_4_s) (void *, bus_space_handle_t, + bus_size_t, const u_int32_t *, bus_size_t); + void (*bs_wr_8_s) (void *, bus_space_handle_t, + bus_size_t, const u_int64_t *, bus_size_t); +}; + + +/* + * Utility macros; INTERNAL USE ONLY. + */ +#define __bs_c(a,b) __CONCAT(a,b) +#define __bs_opname(op,size) __bs_c(__bs_c(__bs_c(bs_,op),_),size) + +#define __bs_rs(sz, t, h, o) \ + (*(t)->__bs_opname(r,sz))((t)->bs_cookie, h, o) +#define __bs_ws(sz, t, h, o, v) \ + (*(t)->__bs_opname(w,sz))((t)->bs_cookie, h, o, v) +#define __bs_nonsingle(type, sz, t, h, o, a, c) \ + (*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, a, c) +#define __bs_set(type, sz, t, h, o, v, c) \ + (*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, v, c) +#define __bs_copy(sz, t, h1, o1, h2, o2, cnt) \ + (*(t)->__bs_opname(c,sz))((t)->bs_cookie, h1, o1, h2, o2, cnt) + +#define __bs_opname_s(op,size) __bs_c(__bs_c(__bs_c(__bs_c(bs_,op),_),size),_s) +#define __bs_rs_s(sz, t, h, o) \ + (*(t)->__bs_opname_s(r,sz))((t)->bs_cookie, h, o) +#define __bs_ws_s(sz, t, h, o, v) \ + (*(t)->__bs_opname_s(w,sz))((t)->bs_cookie, h, o, v) +#define __bs_nonsingle_s(type, sz, t, h, o, a, c) \ + (*(t)->__bs_opname_s(type,sz))((t)->bs_cookie, h, o, a, c) + + +/* + * Mapping and unmapping operations. + */ +#define bus_space_map(t, a, s, c, hp) \ + (*(t)->bs_map)((t)->bs_cookie, (a), (s), (c), (hp)) +#define bus_space_unmap(t, h, s) \ + (*(t)->bs_unmap)((t)->bs_cookie, (h), (s)) +#define bus_space_subregion(t, h, o, s, hp) \ + (*(t)->bs_subregion)((t)->bs_cookie, (h), (o), (s), (hp)) + + +/* + * Allocation and deallocation operations. + */ +#define bus_space_alloc(t, rs, re, s, a, b, c, ap, hp) \ + (*(t)->bs_alloc)((t)->bs_cookie, (rs), (re), (s), (a), (b), \ + (c), (ap), (hp)) +#define bus_space_free(t, h, s) \ + (*(t)->bs_free)((t)->bs_cookie, (h), (s)) + +/* + * Bus barrier operations. + */ +#define bus_space_barrier(t, h, o, l, f) \ + (*(t)->bs_barrier)((t)->bs_cookie, (h), (o), (l), (f)) + +#define BUS_SPACE_BARRIER_READ 0x01 +#define BUS_SPACE_BARRIER_WRITE 0x02 + +/* + * Bus read (single) operations. + */ +#define bus_space_read_1(t, h, o) __bs_rs(1,(t),(h),(o)) +#define bus_space_read_2(t, h, o) __bs_rs(2,(t),(h),(o)) +#define bus_space_read_4(t, h, o) __bs_rs(4,(t),(h),(o)) +#define bus_space_read_8(t, h, o) __bs_rs(8,(t),(h),(o)) + +#define bus_space_read_stream_1(t, h, o) __bs_rs_s(1,(t), (h), (o)) +#define bus_space_read_stream_2(t, h, o) __bs_rs_s(2,(t), (h), (o)) +#define bus_space_read_stream_4(t, h, o) __bs_rs_s(4,(t), (h), (o)) +#define bus_space_read_stream_8(t, h, o) __bs_rs_s(8,8,(t),(h),(o)) + +/* + * Bus read multiple operations. + */ +#define bus_space_read_multi_1(t, h, o, a, c) \ + __bs_nonsingle(rm,1,(t),(h),(o),(a),(c)) +#define bus_space_read_multi_2(t, h, o, a, c) \ + __bs_nonsingle(rm,2,(t),(h),(o),(a),(c)) +#define bus_space_read_multi_4(t, h, o, a, c) \ + __bs_nonsingle(rm,4,(t),(h),(o),(a),(c)) +#define bus_space_read_multi_8(t, h, o, a, c) \ + __bs_nonsingle(rm,8,(t),(h),(o),(a),(c)) + +#define bus_space_read_multi_stream_1(t, h, o, a, c) \ + __bs_nonsingle_s(rm,1,(t),(h),(o),(a),(c)) +#define bus_space_read_multi_stream_2(t, h, o, a, c) \ + __bs_nonsingle_s(rm,2,(t),(h),(o),(a),(c)) +#define bus_space_read_multi_stream_4(t, h, o, a, c) \ + __bs_nonsingle_s(rm,4,(t),(h),(o),(a),(c)) +#define bus_space_read_multi_stream_8(t, h, o, a, c) \ + __bs_nonsingle_s(rm,8,(t),(h),(o),(a),(c)) + + +/* + * Bus read region operations. + */ +#define bus_space_read_region_1(t, h, o, a, c) \ + __bs_nonsingle(rr,1,(t),(h),(o),(a),(c)) +#define bus_space_read_region_2(t, h, o, a, c) \ + __bs_nonsingle(rr,2,(t),(h),(o),(a),(c)) +#define bus_space_read_region_4(t, h, o, a, c) \ + __bs_nonsingle(rr,4,(t),(h),(o),(a),(c)) +#define bus_space_read_region_8(t, h, o, a, c) \ + __bs_nonsingle(rr,8,(t),(h),(o),(a),(c)) + +#define bus_space_read_region_stream_1(t, h, o, a, c) \ + __bs_nonsingle_s(rr,1,(t),(h),(o),(a),(c)) +#define bus_space_read_region_stream_2(t, h, o, a, c) \ + __bs_nonsingle_s(rr,2,(t),(h),(o),(a),(c)) +#define bus_space_read_region_stream_4(t, h, o, a, c) \ + __bs_nonsingle_s(rr,4,(t),(h),(o),(a),(c)) +#define bus_space_read_region_stream_8(t, h, o, a, c) \ + __bs_nonsingle_s(rr,8,(t),(h),(o),(a),(c)) + + +/* + * Bus write (single) operations. + */ +#define bus_space_write_1(t, h, o, v) __bs_ws(1,(t),(h),(o),(v)) +#define bus_space_write_2(t, h, o, v) __bs_ws(2,(t),(h),(o),(v)) +#define bus_space_write_4(t, h, o, v) __bs_ws(4,(t),(h),(o),(v)) +#define bus_space_write_8(t, h, o, v) __bs_ws(8,(t),(h),(o),(v)) + +#define bus_space_write_stream_1(t, h, o, v) __bs_ws_s(1,(t),(h),(o),(v)) +#define bus_space_write_stream_2(t, h, o, v) __bs_ws_s(2,(t),(h),(o),(v)) +#define bus_space_write_stream_4(t, h, o, v) __bs_ws_s(4,(t),(h),(o),(v)) +#define bus_space_write_stream_8(t, h, o, v) __bs_ws_s(8,(t),(h),(o),(v)) + + +/* + * Bus write multiple operations. + */ +#define bus_space_write_multi_1(t, h, o, a, c) \ + __bs_nonsingle(wm,1,(t),(h),(o),(a),(c)) +#define bus_space_write_multi_2(t, h, o, a, c) \ + __bs_nonsingle(wm,2,(t),(h),(o),(a),(c)) +#define bus_space_write_multi_4(t, h, o, a, c) \ + __bs_nonsingle(wm,4,(t),(h),(o),(a),(c)) +#define bus_space_write_multi_8(t, h, o, a, c) \ + __bs_nonsingle(wm,8,(t),(h),(o),(a),(c)) -static __inline void bus_space_write_1(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int8_t value); - -static __inline void bus_space_write_2(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int16_t value); - -static __inline void bus_space_write_4(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int32_t value); - -static __inline void -bus_space_write_1(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int8_t value) -{ - - if (tag == MIPS_BUS_SPACE_IO) - outb(bsh + offset, value); - else - writeb(bsh + offset, value); -} - -static __inline void -bus_space_write_2(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int16_t value) -{ - - if (tag == MIPS_BUS_SPACE_IO) - outw(bsh + offset, value); - else - writew(bsh + offset, value); -} - -static __inline void -bus_space_write_4(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int32_t value) -{ - - if (tag == MIPS_BUS_SPACE_IO) - outl(bsh + offset, value); - else - writel(bsh + offset, value); -} +#define bus_space_write_multi_stream_1(t, h, o, a, c) \ + __bs_nonsingle_s(wm,1,(t),(h),(o),(a),(c)) +#define bus_space_write_multi_stream_2(t, h, o, a, c) \ + __bs_nonsingle_s(wm,2,(t),(h),(o),(a),(c)) +#define bus_space_write_multi_stream_4(t, h, o, a, c) \ + __bs_nonsingle_s(wm,4,(t),(h),(o),(a),(c)) +#define bus_space_write_multi_stream_8(t, h, o, a, c) \ + __bs_nonsingle_s(wm,8,(t),(h),(o),(a),(c)) -#if 0 /* Cause a link error for bus_space_write_8 */ -#define bus_space_write_8 !!! bus_space_write_8 not implemented !!! -#endif /* - * Write `count' 1, 2, 4, or 8 byte quantities from the buffer - * provided to bus space described by tag/handle/offset. + * Bus write region operations. */ +#define bus_space_write_region_1(t, h, o, a, c) \ + __bs_nonsingle(wr,1,(t),(h),(o),(a),(c)) +#define bus_space_write_region_2(t, h, o, a, c) \ + __bs_nonsingle(wr,2,(t),(h),(o),(a),(c)) +#define bus_space_write_region_4(t, h, o, a, c) \ + __bs_nonsingle(wr,4,(t),(h),(o),(a),(c)) +#define bus_space_write_region_8(t, h, o, a, c) \ + __bs_nonsingle(wr,8,(t),(h),(o),(a),(c)) -static __inline void bus_space_write_multi_1(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, - const u_int8_t *addr, - size_t count); -static __inline void bus_space_write_multi_2(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, - const u_int16_t *addr, - size_t count); - -static __inline void bus_space_write_multi_4(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, - const u_int32_t *addr, - size_t count); - -static __inline void -bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, const u_int8_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - outb(baddr, *addr++); - else - while (count--) - writeb(baddr, *addr++); -} - -static __inline void -bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, const u_int16_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - outw(baddr, *addr++); - else - while (count--) - writew(baddr, *addr++); -} - -static __inline void -bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, const u_int32_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - outl(baddr, *addr++); - else - while (count--) - writel(baddr, *addr++); -} +#define bus_space_write_region_stream_1(t, h, o, a, c) \ + __bs_nonsingle_s(wr,1,(t),(h),(o),(a),(c)) +#define bus_space_write_region_stream_2(t, h, o, a, c) \ + __bs_nonsingle_s(wr,2,(t),(h),(o),(a),(c)) +#define bus_space_write_region_stream_4(t, h, o, a, c) \ + __bs_nonsingle_s(wr,4,(t),(h),(o),(a),(c)) +#define bus_space_write_region_stream_8(t, h, o, a, c) \ + __bs_nonsingle_s(wr,8,(t),(h),(o),(a),(c)) -#if 0 /* Cause a link error for bus_space_write_multi_8 */ -#define bus_space_write_multi_8(t, h, o, a, c) \ - !!! bus_space_write_multi_8 unimplemented !!! -#endif /* - * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided - * to bus space described by tag/handle starting at `offset'. + * Set multiple operations. */ +#define bus_space_set_multi_1(t, h, o, v, c) \ + __bs_set(sm,1,(t),(h),(o),(v),(c)) +#define bus_space_set_multi_2(t, h, o, v, c) \ + __bs_set(sm,2,(t),(h),(o),(v),(c)) +#define bus_space_set_multi_4(t, h, o, v, c) \ + __bs_set(sm,4,(t),(h),(o),(v),(c)) +#define bus_space_set_multi_8(t, h, o, v, c) \ + __bs_set(sm,8,(t),(h),(o),(v),(c)) -static __inline void bus_space_write_region_1(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, - const u_int8_t *addr, - size_t count); -static __inline void bus_space_write_region_2(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, - const u_int16_t *addr, - size_t count); -static __inline void bus_space_write_region_4(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, - const u_int32_t *addr, - size_t count); - -static __inline void -bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, const u_int8_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) { - outb(baddr, *addr++); - baddr += 1; - } - else - while (count--) { - writeb(baddr, *addr++); - baddr += 1; - } -} - -static __inline void -bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, const u_int16_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) { - outw(baddr, *addr++); - baddr += 2; - } - else - while (count--) { - writew(baddr, *addr++); - baddr += 2; - } -} - -static __inline void -bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, const u_int32_t *addr, size_t count) -{ - bus_addr_t baddr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) { - outl(baddr, *addr++); - baddr += 4; - } - else - while (count--) { - writel(baddr, *addr++); - baddr += 4; - } -} - -#if 0 /* Cause a link error for bus_space_write_region_8 */ -#define bus_space_write_region_8 \ - !!! bus_space_write_region_8 unimplemented !!! -#endif /* - * Write the 1, 2, 4, or 8 byte value `val' to bus space described - * by tag/handle/offset `count' times. + * Set region operations. */ +#define bus_space_set_region_1(t, h, o, v, c) \ + __bs_set(sr,1,(t),(h),(o),(v),(c)) +#define bus_space_set_region_2(t, h, o, v, c) \ + __bs_set(sr,2,(t),(h),(o),(v),(c)) +#define bus_space_set_region_4(t, h, o, v, c) \ + __bs_set(sr,4,(t),(h),(o),(v),(c)) +#define bus_space_set_region_8(t, h, o, v, c) \ + __bs_set(sr,8,(t),(h),(o),(v),(c)) -static __inline void bus_space_set_multi_1(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, - u_int8_t value, size_t count); -static __inline void bus_space_set_multi_2(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, - u_int16_t value, size_t count); -static __inline void bus_space_set_multi_4(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, - u_int32_t value, size_t count); - -static __inline void -bus_space_set_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int8_t value, size_t count) -{ - bus_addr_t addr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - outb(addr, value); - else - while (count--) - writeb(addr, value); -} - -static __inline void -bus_space_set_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int16_t value, size_t count) -{ - bus_addr_t addr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - outw(addr, value); - else - while (count--) - writew(addr, value); -} - -static __inline void -bus_space_set_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int32_t value, size_t count) -{ - bus_addr_t addr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - while (count--) - outl(addr, value); - else - while (count--) - writel(addr, value); -} - -#if 0 /* Cause a link error for bus_space_set_multi_8 */ -#define bus_space_set_multi_8 !!! bus_space_set_multi_8 unimplemented !!! -#endif /* - * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described - * by tag/handle starting at `offset'. + * Copy operations. */ - -static __inline void bus_space_set_region_1(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int8_t value, - size_t count); -static __inline void bus_space_set_region_2(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int16_t value, - size_t count); -static __inline void bus_space_set_region_4(bus_space_tag_t tag, - bus_space_handle_t bsh, - bus_size_t offset, u_int32_t value, - size_t count); - -static __inline void -bus_space_set_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int8_t value, size_t count) -{ - bus_addr_t addr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - for (; count != 0; count--, addr++) - outb(addr, value); - else - for (; count != 0; count--, addr++) - writeb(addr, value); -} - -static __inline void -bus_space_set_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int16_t value, size_t count) -{ - bus_addr_t addr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - for (; count != 0; count--, addr += 2) - outw(addr, value); - else - for (; count != 0; count--, addr += 2) - writew(addr, value); -} - -static __inline void -bus_space_set_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int32_t value, size_t count) -{ - bus_addr_t addr = bsh + offset; - - if (tag == MIPS_BUS_SPACE_IO) - for (; count != 0; count--, addr += 4) - outl(addr, value); - else - for (; count != 0; count--, addr += 4) - writel(addr, value); -} - -#if 0 /* Cause a link error for bus_space_set_region_8 */ -#define bus_space_set_region_8 !!! bus_space_set_region_8 unimplemented !!! -#endif +#define bus_space_copy_region_1(t, h1, o1, h2, o2, c) \ + __bs_copy(1, t, h1, o1, h2, o2, c) +#define bus_space_copy_region_2(t, h1, o1, h2, o2, c) \ + __bs_copy(2, t, h1, o1, h2, o2, c) +#define bus_space_copy_region_4(t, h1, o1, h2, o2, c) \ + __bs_copy(4, t, h1, o1, h2, o2, c) +#define bus_space_copy_region_8(t, h1, o1, h2, o2, c) \ + __bs_copy(8, t, h1, o1, h2, o2, c) /* - * Copy `count' 1, 2, 4, or 8 byte values from bus space starting - * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. + * Macros to provide prototypes for all the functions used in the + * bus_space structure */ -static __inline void bus_space_copy_region_1(bus_space_tag_t tag, - bus_space_handle_t bsh1, - bus_size_t off1, - bus_space_handle_t bsh2, - bus_size_t off2, size_t count); - -static __inline void bus_space_copy_region_2(bus_space_tag_t tag, - bus_space_handle_t bsh1, - bus_size_t off1, - bus_space_handle_t bsh2, - bus_size_t off2, size_t count); - -static __inline void bus_space_copy_region_4(bus_space_tag_t tag, - bus_space_handle_t bsh1, - bus_size_t off1, - bus_space_handle_t bsh2, - bus_size_t off2, size_t count); - -static __inline void -bus_space_copy_region_1(bus_space_tag_t tag, bus_space_handle_t bsh1, - bus_size_t off1, bus_space_handle_t bsh2, - bus_size_t off2, size_t count) -{ - bus_addr_t addr1 = bsh1 + off1; - bus_addr_t addr2 = bsh2 + off2; - - if (tag == MIPS_BUS_SPACE_IO) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:26:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0E61106566C; Sun, 10 Jan 2010 20:26:03 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A89248FC18; Sun, 10 Jan 2010 20:26:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AKQ3WZ032020; Sun, 10 Jan 2010 20:26:03 GMT (envelope-from harti@svn.freebsd.org) Received: (from harti@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AKQ34o032018; Sun, 10 Jan 2010 20:26:03 GMT (envelope-from harti@svn.freebsd.org) Message-Id: <201001102026.o0AKQ34o032018@svn.freebsd.org> From: Hartmut Brandt Date: Sun, 10 Jan 2010 20:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202045 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:26:03 -0000 Author: harti Date: Sun Jan 10 20:26:03 2010 New Revision: 202045 URL: http://svn.freebsd.org/changeset/base/202045 Log: Make make respect the TMPDIR environment variable. PR: bin/115447 Submitted by: Eugene Grosbein Modified: head/usr.bin/make/job.c Modified: head/usr.bin/make/job.c ============================================================================== --- head/usr.bin/make/job.c Sun Jan 10 20:22:05 2010 (r202044) +++ head/usr.bin/make/job.c Sun Jan 10 20:26:03 2010 (r202045) @@ -114,6 +114,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -137,7 +138,8 @@ __FBSDID("$FreeBSD$"); #include "util.h" #include "var.h" -#define TMPPAT "/tmp/makeXXXXXXXXXX" +#define TMPPAT "makeXXXXXXXXXX" +#define TMPDIR "/tmp" #ifndef USE_KQUEUE /* @@ -236,7 +238,7 @@ typedef struct Job { */ struct { /* Name of file to which shell output was rerouted */ - char of_outFile[sizeof(TMPPAT)]; + char of_outFile[PATH_MAX]; /* * Stream open to the output file. Used to funnel all @@ -1566,7 +1568,8 @@ JobStart(GNode *gn, int flags, Job *prev Boolean noExec; /* Set true if we decide not to run the job */ int tfd; /* File descriptor for temp file */ LstNode *ln; - char tfile[sizeof(TMPPAT)]; + char tfile[PATH_MAX]; + const char *tdir; if (interrupted) { JobPassSig(interrupted); @@ -1607,6 +1610,9 @@ JobStart(GNode *gn, int flags, Job *prev cmdsOK = TRUE; } + if ((tdir = getenv("TMPDIR")) == NULL) + tdir = TMPDIR; + /* * If the -n flag wasn't given, we open up OUR (not the child's) * temporary file to stuff commands in it. The thing is rd/wr so we @@ -1622,7 +1628,7 @@ JobStart(GNode *gn, int flags, Job *prev DieHorribly(); } - strcpy(tfile, TMPPAT); + snprintf(tfile, sizeof(tfile), "%s/%s", tdir, TMPPAT); if ((tfd = mkstemp(tfile)) == -1) Punt("Cannot create temp file: %s", strerror(errno)); job->cmdFILE = fdopen(tfd, "w+"); @@ -1801,7 +1807,10 @@ JobStart(GNode *gn, int flags, Job *prev } else { fprintf(stdout, "Remaking `%s'\n", gn->name); fflush(stdout); - strcpy(job->outFile, TMPPAT); + if ((tdir = getenv("TMPDIR")) == NULL) + tdir = TMPDIR; + snprintf(job->outFile, sizeof(job->outFile), "%s/%s", + tdir, TMPPAT); if ((job->outFd = mkstemp(job->outFile)) == -1) Punt("cannot create temp file: %s", strerror(errno)); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 20:29:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCA691065672; Sun, 10 Jan 2010 20:29:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBE968FC18; Sun, 10 Jan 2010 20:29:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AKTKX4032767; Sun, 10 Jan 2010 20:29:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AKTKGK032764; Sun, 10 Jan 2010 20:29:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102029.o0AKTKGK032764@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 20:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202046 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 20:29:21 -0000 Author: imp Date: Sun Jan 10 20:29:20 2010 New Revision: 202046 URL: http://svn.freebsd.org/changeset/base/202046 Log: Merge from projects/mips to head by hand: sorry for the huge firehose on this commit, it would be too tedious to do file by file r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype. r201880 | neel | 2010-01-08 19:17:14 -0700 (Fri, 08 Jan 2010) | 7 lines Compute the target of the jump in the 'J' and 'JAL' instructions correctly. The 256MB segment is formed by taking the top 4 bits of the address of the instruction in the "branch delay" slot as opposed to the 'J' or 'JAL' instruction itself. r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines Centralize initialization of pcpu, and set curthread early... r201770 | neel | 2010-01-07 22:53:11 -0700 (Thu, 07 Jan 2010) | 4 lines Add a DDB command "show pcb" to dump out the contents of a thread's PCB. r201631 | neel | 2010-01-05 23:42:08 -0700 (Tue, 05 Jan 2010) | 5 lines Remove all CFE-specific code from locore.S. The CFE entrypoint initialization is now done in platform-specific code. r201563 | neel | 2010-01-04 23:58:54 -0700 (Mon, 04 Jan 2010) | 6 lines This change increases the size of the kernel stack for thread0 from PAGE_SIZE to (2 * PAGE_SIZE). It depends on the memory allocated by pmap_steal_memory() being aligned to a PAGE_SIZE boundary. r200656 | imp | 2009-12-17 16:55:49 -0700 (Thu, 17 Dec 2009) | 7 lines Place holder ptrace mips module. Not entirely sure what's required here yet, so I've not connected it to the build. I think that we'll need to move something into the processor specific part of the mips port by requiring mips_cpu_ptrace or platform_cpu_ptrace be provided by the ports to get/set processor specific registers, ala SSE registers on x86. r200342 | imp | 2009-12-09 18:42:44 -0700 (Wed, 09 Dec 2009) | 4 lines app_descriptor_addr is unused (I know it is referened still). And unnecessary since we pass in a3 unmodified to platform_start. Eliminate it from here and kill one more TARGET_OCTEON in the process. r199760 | imp | 2009-11-24 10:15:22 -0700 (Tue, 24 Nov 2009) | 2 lines Add in Cavium's CID. Report what the unknown CID is. r199755 | imp | 2009-11-24 09:53:58 -0700 (Tue, 24 Nov 2009) | 5 lines looks like there's more to this patch than just this one file. I'll leave it to neel@ to get all the relevant pieces into the tree. r199754 | imp | 2009-11-24 09:32:31 -0700 (Tue, 24 Nov 2009) | 6 lines Include opt_cputype.h for all .c and .S files referencing TARGET_OCTEON. Spell ld script name right. # for the most part, we need to enhance infrastructure to obviate the need # for such an intrusive option. r199753 | imp | 2009-11-24 09:30:29 -0700 (Tue, 24 Nov 2009) | 3 lines Remove a comment that's bogus. Include opt_cputype.h since TARGET_OCTEON moved there. r199752 | imp | 2009-11-24 09:29:23 -0700 (Tue, 24 Nov 2009) | 4 lines Make sure kstack0 is page aligned. # this may have been from neel@ for the sibyte stuff r199742 | imp | 2009-11-24 01:35:11 -0700 (Tue, 24 Nov 2009) | 8 lines Move the hard-wiring of the dcache on octeon outside of the if statement. When no caches support was added, it looks like TARGET_OCTEON was bogusly moved inside the if. Also, include opt_cputype.h to make TARGET_OCTEON actually active. # now we die in pmap init somewhere... Most likely because 32MB of RAM is # too tight given the load address we're using. r199741 | imp | 2009-11-24 01:21:48 -0700 (Tue, 24 Nov 2009) | 2 lines TARGET_OCTEON reqiures opt_cputype.h. r199736 | imp | 2009-11-24 00:40:38 -0700 (Tue, 24 Nov 2009) | 2 lines Prefer ANSI spellings of uintXX_t, etc. r199598 | imp | 2009-11-20 09:30:35 -0700 (Fri, 20 Nov 2009) | 3 lines Horrible kludge to make octeon32 work. I think a better way is to move the generic code into the config files.... r199597 | imp | 2009-11-20 09:27:50 -0700 (Fri, 20 Nov 2009) | 4 lines cast vaddr to uintptr_t before casting it to a bus_space_handle_t. # I'm sure this indicates a problem, but I'm not sure what... r199496 | gonzo | 2009-11-18 15:52:05 -0700 (Wed, 18 Nov 2009) | 5 lines - Add cpu_init_interrupts function that is supposed to prepeare stuff required for spinning out interrupts later - Add API for managing intrcnt/intrnames arrays - Some minor style(9) fixes r199246 | neel | 2009-11-13 02:24:09 -0700 (Fri, 13 Nov 2009) | 10 lines Make pmap_copy_page() L2-cache friendly by doing the copy through the cacheable window on physical memory (KSEG0). On the Sibyte processor going through the uncacheable window (KSEG1) bypasses both L1 and L2 caches so we may end up with stale contents in the L2 cache. This also makes it consistent with the rest of the function that uses cacheable mappings to copy pages. Approved by: imp (mentor) r198842 | gonzo | 2009-11-02 23:42:55 -0700 (Mon, 02 Nov 2009) | 3 lines - Handle errors when adding children to nexus. This sittuation might occure when there is dublicate of child's entry in hints r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-) r198569 | neel | 2009-10-28 23:18:02 -0600 (Wed, 28 Oct 2009) | 5 lines Deal with overflow of the COUNT register correctly. The 'cycles_per_hz' has nothing to do with the rollover. r198550 | imp | 2009-10-28 11:03:20 -0600 (Wed, 28 Oct 2009) | 3 lines Remove useless for statement. i isn't used after it. Remove needless braces. r198534 | gonzo | 2009-10-27 21:34:05 -0600 (Tue, 27 Oct 2009) | 8 lines - Fix busdma sync: dcache invalidation operates on cache line aligned addresses and could modify areas of memory that share the same cache line at the beginning and at the ending of the buffer. In order to prevent a data loss we save these chunks in temporary buffer before invalidation and restore them afer it. Idea suggested by: cognet r198531 | gonzo | 2009-10-27 18:01:20 -0600 (Tue, 27 Oct 2009) | 3 lines - Remove bunch of declared but not defined cach-related variables - Add mips_picache_linesize and mips_pdcache_linesize variables r198530 | gonzo | 2009-10-27 17:45:48 -0600 (Tue, 27 Oct 2009) | 3 lines - Replace stubs with actual cache info - minor style(9) fix r198355 | neel | 2009-10-21 22:35:32 -0600 (Wed, 21 Oct 2009) | 11 lines Remove redundant instructions from tlb.S The "_MTC0 v0, COP_0_TLB_HI" is actually incorrect because v0 has not been initialized at that point. It worked correctly because we subsequently did the right thing and initialized TLB_HI correctly. The "li v0, MIPS_KSEG0_START" is redundant because we do exactly the same thing 2 instructions down. r198354 | neel | 2009-10-21 20:51:31 -0600 (Wed, 21 Oct 2009) | 9 lines Get rid of the hardcoded constants to define cacheable memory: SDRAM_ADDR_START, SDRAM_ADDR_END and SDRAM_MEM_SIZE Instead we now keep a copy of the memory regions enumerated by platform-specific code and use that to determine whether an address is cacheable or not. r198310 | gonzo | 2009-10-20 17:13:08 -0600 (Tue, 20 Oct 2009) | 5 lines - Commit missing part of "bt" fix: store PC register in pcb_context struct in cpu_switch and use it in stack_trace function later. pcb_regs contains state of the process stored by exception handler and therefor is not valid for sleeping processes. r198264 | neel | 2009-10-19 22:36:08 -0600 (Mon, 19 Oct 2009) | 5 lines Fix a bug where we would think that the L1 instruction and data cache are present even though the line size field in the CP0 Config1 register is 0. r198208 | imp | 2009-10-18 09:21:48 -0600 (Sun, 18 Oct 2009) | 3 lines Get the PC from the trap frame, since it isn't saved as part of the pcb regs. r198205 | imp | 2009-10-18 08:55:55 -0600 (Sun, 18 Oct 2009) | 3 lines Use correct signature for MipsEmulateBranch. The other one doesn't work for 64-bit compiles. r198182 | gonzo | 2009-10-16 18:22:07 -0600 (Fri, 16 Oct 2009) | 11 lines - Use PC/RA/SP values as arguments for stacktrace_subr instead of trapframe. Context info could be obtained from other sources (see below) no only from td_pcb field - Do not show a0..a3 values unless they're obtained from the stack. These are only confirmed values. - Fix bt command in DDB. Previous implementation used thread's trapframe structure as a source info for trace unwinding, but this structure is filled only when exception occurs. Valid register values for sleeping processes are in pcb_context array. For curthread use pc/sp/ra for current frame r198181 | gonzo | 2009-10-16 16:52:18 -0600 (Fri, 16 Oct 2009) | 2 lines - Get rid of label_t. It came from NetBSD and was used only in one place r198066 | gonzo | 2009-10-13 19:43:53 -0600 (Tue, 13 Oct 2009) | 5 lines - Move stack tracing function to db_trace.c - Axe unused extern MipsXXX declarations - Move all declarations for functions in exceptions.S/swtch.S from trap.c to respective headers r197796 | gonzo | 2009-10-05 17:19:51 -0600 (Mon, 05 Oct 2009) | 2 lines - Revert part of r197685 because this change leads to wrong data in cache. r197685 | gonzo | 2009-10-01 14:05:36 -0600 (Thu, 01 Oct 2009) | 2 lines - Sync caches properly when dealing with sf_buf r197014 | imp | 2009-09-08 21:57:10 -0600 (Tue, 08 Sep 2009) | 2 lines Ugly hack to get this to compile. I'm sure there's a better way... r197013 | imp | 2009-09-08 21:54:55 -0600 (Tue, 08 Sep 2009) | 2 lines First half of making this 64-bit clean: fix prototypes. r196988 | gonzo | 2009-09-08 13:15:29 -0600 (Tue, 08 Sep 2009) | 2 lines - MFC from head@196987 r196313 | imp | 2009-08-17 06:14:40 -0600 (Mon, 17 Aug 2009) | 2 lines suword64 and csuword64. Needed by ELF64 stuff... r196266 | imp | 2009-08-15 16:51:11 -0600 (Sat, 15 Aug 2009) | 5 lines (1) Fix a few 32/64-bit bugs. (2) Also, always allocate 2 pages for the stack to optimize TLB usage. Submitted by: neel@ (2) r196265 | imp | 2009-08-15 16:48:09 -0600 (Sat, 15 Aug 2009) | 2 lines Various 32/64-bit confusion cleanups. r196264 | imp | 2009-08-15 16:45:46 -0600 (Sat, 15 Aug 2009) | 6 lines (1) Some CPUs have a range to map I/O cyces on the pci bus. So allow them to work by allowding the nexus to assign ports. (2) Remove some Octeon junk that shouldn't be necessary. Submitted by: neel@ (#1) for SB1 port. r196061 | gonzo | 2009-08-04 11:32:55 -0600 (Tue, 04 Aug 2009) | 2 lines - Use register_t for registers values r195984 | gonzo | 2009-07-30 17:48:29 -0600 (Thu, 30 Jul 2009) | 4 lines - Properly unwind stack for functions with __noreturn__ attribute Submitted by: Neelkanth Natu r195983 | gonzo | 2009-07-30 17:29:59 -0600 (Thu, 30 Jul 2009) | 4 lines - mark map as coherent if requested by flags - explicitly set memory allocation method in map flags instead of duplicating conditions for malloc/contigalloc r195584 | imp | 2009-07-10 13:09:34 -0600 (Fri, 10 Jul 2009) | 3 lines Use PTR_* macros for pointers, and not potentially mips64 unsafe operations. r195583 | imp | 2009-07-10 13:08:48 -0600 (Fri, 10 Jul 2009) | 2 lines Use PTR_* macros to deal with pointers. r195579 | imp | 2009-07-10 13:04:32 -0600 (Fri, 10 Jul 2009) | 2 lines use ta0-ta3 rather than t4-t7 for n32/n64 goodness. r195511 | gonzo | 2009-07-09 13:02:17 -0600 (Thu, 09 Jul 2009) | 3 lines - Ooops, this debug code wasn't supposed to get into final commit. My appologises. r195478 | gonzo | 2009-07-08 16:28:36 -0600 (Wed, 08 Jul 2009) | 5 lines - Port busdma code from FreeBSD/arm. This is more mature version that takes into account all limitation to DMA memory (boundaries, alignment) and implements bounce pages. - Add BUS_DMASYNC_POSTREAD case to bus_dmamap_sync_buf r195438 | imp | 2009-07-08 00:00:18 -0600 (Wed, 08 Jul 2009) | 2 lines Turns out this code was right, revert last change. r195429 | gonzo | 2009-07-07 13:55:09 -0600 (Tue, 07 Jul 2009) | 5 lines - Move dpcpu initialization to mips_proc0_init. It's more appropriate place for it. Besides dpcpu_init requires pmap module to be initialized and calling it int pmap.c hangs the system r195399 | imp | 2009-07-06 01:49:24 -0600 (Mon, 06 Jul 2009) | 2 lines Prefer uintptr_t to int cast here. r195398 | imp | 2009-07-06 01:48:31 -0600 (Mon, 06 Jul 2009) | 3 lines Better types for 64-bit compatibility. Use %p and cast to void * and prefer uintptr_t to other int-type casts. r195397 | imp | 2009-07-06 01:47:39 -0600 (Mon, 06 Jul 2009) | 2 lines No need to force mips32 here. r195396 | imp | 2009-07-06 01:46:13 -0600 (Mon, 06 Jul 2009) | 3 lines Pass in the uint64 value, rather than a pointer to it. that's what the function expects... r195395 | imp | 2009-07-06 01:45:02 -0600 (Mon, 06 Jul 2009) | 3 lines Use ta0 instead of t4 and ta1 instead of t5. These map to the same registers on O32 builds, but t4 and t5 don't exist on N32 or N64. r195394 | imp | 2009-07-06 01:43:50 -0600 (Mon, 06 Jul 2009) | 3 lines Use better casts for passing the small integer as a pointer here. Basically, replace int with uintptr_t. r195393 | imp | 2009-07-06 01:42:54 -0600 (Mon, 06 Jul 2009) | 5 lines (1) Improvements for SB1. only allow real memory to be accessed. (2) make compile n64 by using more-proper casts. Submitted by: Neelkanth Natu (1) r195373 | imp | 2009-07-05 09:23:54 -0600 (Sun, 05 Jul 2009) | 5 lines (1) Use PTR_LA rather than bare la for N64 goodness (it is dla there) (2) SB1 needs COHERENT policy, not cached for the config register Submitted by: (2) Neelkanth Natu r195372 | imp | 2009-07-05 09:22:22 -0600 (Sun, 05 Jul 2009) | 3 lines use "PTR_LA" in preference to a bare la so it translates to dla on 64-bit ABIs. r195371 | imp | 2009-07-05 09:21:35 -0600 (Sun, 05 Jul 2009) | 6 lines Now that we define atomic_{load,store}_64 inline in atomic.h, we don't need to define them here for the !N64 case. We now define atomic_readandclear_64 in atomic.h, so no need to repeat it here. r195364 | imp | 2009-07-05 09:10:07 -0600 (Sun, 05 Jul 2009) | 5 lines use %p in preference to 0x%08x for printing register_t values. Cast them to void * first. This neatly solves the "how do I print a register_t" problem because sizeof(void *) is always the same as sizeof(register_t), afaik. r195353 | imp | 2009-07-05 00:46:54 -0600 (Sun, 05 Jul 2009) | 6 lines Publish PAGE_SHIFT to assembler # we should likely phase out PGSHIFT Submitted by: Neelkanth Natu r195350 | imp | 2009-07-05 00:39:37 -0600 (Sun, 05 Jul 2009) | 7 lines Switch to ABI agnostic ta0-ta3. Provide defs for this in the right places. Provide n32/n64 register name defintions. This should have no effect for the O32 builds that everybody else uses, but should help make N64 builds possible (lots of other changes are needed for that). Obtained from: NetBSD (for the regdef.h changes) r195334 | imp | 2009-07-03 21:22:34 -0600 (Fri, 03 Jul 2009) | 6 lines Move from using the lame invalid address I chose when trying to get Octeon going... Turns out that you get tlb shutdowns with this... Use PGSHIFT instead of PAGE_SHIFT. Submitted by: Neelkanth Natu r195147 | gonzo | 2009-06-28 15:01:00 -0600 (Sun, 28 Jun 2009) | 2 lines - Replace casuword and casuword32 stubs with proper implementation r195128 | gonzo | 2009-06-27 17:27:41 -0600 (Sat, 27 Jun 2009) | 4 lines - Add support for handling TLS area address in kernel space. From the userland point of view get/set operations are performed using sysarch(2) call. r195127 | gonzo | 2009-06-27 17:01:35 -0600 (Sat, 27 Jun 2009) | 4 lines - Make cpu_set_upcall_kse conform MIPS ABI. T9 should be the same as PC in subroutine entry point - Preserve interrupt mask r194938 | gonzo | 2009-06-24 20:15:04 -0600 (Wed, 24 Jun 2009) | 3 lines - Invalidate cache in pmap_qenter. Fixes corruption of data that comes through pipe (may be other bugs) r194505 | gonzo | 2009-06-19 13:02:40 -0600 (Fri, 19 Jun 2009) | 5 lines - Keep interrupts mask intact by RESTORE_CPU in MipsKernGenException trap() function re-enables interrupts if exception happened with interrupts enabled and therefor status register might be modified by interrupt filters r194277 | gonzo | 2009-06-15 20:36:21 -0600 (Mon, 15 Jun 2009) | 2 lines - Remove debug printfs r194275 | gonzo | 2009-06-15 19:43:33 -0600 (Mon, 15 Jun 2009) | 2 lines - Handle KSEG0/KSEG1 addresses for /dev/mem as well. netstat requires it r193491 | gonzo | 2009-06-05 03:21:03 -0600 (Fri, 05 Jun 2009) | 6 lines - Status register should be set last in RESTORE_CPU in order to prevent race over k0, k1 registers. - Update interrupts mask in saved status register for MipsUserIntr and MipsUserGenException. It might be modified by intr filter or ithread. r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines - Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default we assume that there is no FPU, because majority of SoC does not have it. r192794 | gonzo | 2009-05-26 00:20:50 -0600 (Tue, 26 May 2009) | 5 lines - Preserve INT_MASK fields in Status register across context switches. They should be modified only by interrupt setup/teardown and pre_ithread/post_ithread functions r192793 | gonzo | 2009-05-26 00:02:38 -0600 (Tue, 26 May 2009) | 2 lines - Remove erroneus "break" instruction, it was meant for debug r192792 | gonzo | 2009-05-26 00:01:17 -0600 (Tue, 26 May 2009) | 2 lines - Remove now unused NetBSDism intr.h r192791 | gonzo | 2009-05-25 23:59:05 -0600 (Mon, 25 May 2009) | 7 lines - Provide proper pre_ithread/post_ithread functions for both hard and soft interrupts - Do not handle masked interrupts - Do not write Cause register because most bytes are read-only and writing the same byte to RW fields are pointless. And in case of software interrupt utterly wrong r192664 | gonzo | 2009-05-23 13:42:23 -0600 (Sat, 23 May 2009) | 4 lines - cpu_establish_hardintr modifies INT_MASK of Status register, so we should use disableintr/restoreintr that modifies only IE bit. r192655 | gonzo | 2009-05-23 12:00:20 -0600 (Sat, 23 May 2009) | 6 lines - Remove stale comments - Replace a1 with k1 to while restoring context. a1 was there by mistake, interrupts are disabled at this point and it's safe to use k0, k1. This code never was reached beacasue current Status register handling prevented interrupta from user mode. r192496 | gonzo | 2009-05-20 17:07:10 -0600 (Wed, 20 May 2009) | 4 lines - Invalidate caches for respective areain KSEG0 in order to prevent further overwriting of KSEG1 data with writeback. r192364 | gonzo | 2009-05-18 20:43:21 -0600 (Mon, 18 May 2009) | 6 lines - Cleanup ticker initialization code. For some MIPS cpu Counter register increments only every second cycle. The only timing references for us is Count value. Therefore it's better to convert frequencies related to it and use them. Besides cleanup this commit fixes twice more then requested sleep interval problem. r192176 | gonzo | 2009-05-15 20:34:03 -0600 (Fri, 15 May 2009) | 3 lines - Add informational title for cache info lines to separate them from environment variables dump r192119 | gonzo | 2009-05-14 15:26:07 -0600 (Thu, 14 May 2009) | 3 lines - Off by one check fix. Check for last address in region to fit in KSEG1 r191841 | gonzo | 2009-05-05 20:55:43 -0600 (Tue, 05 May 2009) | 5 lines - Use index ops in order to avoid TLBMiss exceptions when flushing caches on mapping removal - Writeback all VA for page that is being copied in pmap_copy_page to guaranty up-to-date data in SDRAM r191613 | gonzo | 2009-04-27 20:59:18 -0600 (Mon, 27 Apr 2009) | 4 lines - When destroying va -> pa mapping writeback all caches or we may endup with partial page content in SDRAM - style(9) fix r191583 | gonzo | 2009-04-27 12:46:57 -0600 (Mon, 27 Apr 2009) | 5 lines - Use new spacebus - Be a bit more verbose on failures - style(9) fixes - Use default rid value of 0 instead of MIPS_MEM_RID (0x20) r191577 | gonzo | 2009-04-27 12:29:59 -0600 (Mon, 27 Apr 2009) | 4 lines - Use naming convention the same as MIPS spec does: eliminate _sel1 sufix and just use selector number. e.g. mips_rd_config_sel1 -> mips_rd_config1 - Add WatchHi/WatchLo accessors for selctors 1..3 (for debug purposes) r191453 | gonzo | 2009-04-23 23:28:44 -0600 (Thu, 23 Apr 2009) | 4 lines Fix cut'n'paste code. cfg3 should get the value of selector 3 Spotted by: thompa@ r191452 | gonzo | 2009-04-23 22:18:16 -0600 (Thu, 23 Apr 2009) | 2 lines - Print supported CPU capabilities during stratup r191448 | gonzo | 2009-04-23 21:38:51 -0600 (Thu, 23 Apr 2009) | 2 lines - Fix whitespace to conform style(9) r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places. r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order. r191083 | gonzo | 2009-04-14 19:47:52 -0600 (Tue, 14 Apr 2009) | 4 lines - Cleanout stale #ifdef'ed chunk of code - Fix whitespaces - Explicitly undefine NEXUS_DEBUG flag r191079 | gonzo | 2009-04-14 16:53:22 -0600 (Tue, 14 Apr 2009) | 2 lines - Revert changes accidentally killed by merge operation ------------------------------------------------------------------------ r187512 | gonzo | 2009-01-20 22:49:30 -0700 (Tue, 20 Jan 2009) | 4 lines - Check if maddr/msize hints are there before setting hinted resources to device - Check for irq hint too r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines - Add trampoline stuff for bootloaders that do not support ELF - Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with KERNLOADADDR/TRAMPLOADADDR and clean configs Modified: head/sys/mips/mips/busdma_machdep.c head/sys/mips/mips/cache.c head/sys/mips/mips/cache_mipsNN.c head/sys/mips/mips/copystr.S head/sys/mips/mips/cpu.c head/sys/mips/mips/db_trace.c head/sys/mips/mips/elf_machdep.c head/sys/mips/mips/exception.S head/sys/mips/mips/fp.S head/sys/mips/mips/gdb_machdep.c head/sys/mips/mips/genassym.c head/sys/mips/mips/in_cksum.c head/sys/mips/mips/intr_machdep.c head/sys/mips/mips/locore.S head/sys/mips/mips/machdep.c head/sys/mips/mips/mainbus.c head/sys/mips/mips/mem.c head/sys/mips/mips/nexus.c head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/pmap.c head/sys/mips/mips/psraccess.S head/sys/mips/mips/support.S head/sys/mips/mips/swtch.S head/sys/mips/mips/tick.c head/sys/mips/mips/tlb.S head/sys/mips/mips/trap.c head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Sun Jan 10 20:26:03 2010 (r202045) +++ head/sys/mips/mips/busdma_machdep.c Sun Jan 10 20:29:20 2010 (r202046) @@ -23,50 +23,16 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * From i386/busdma_machdep.c,v 1.26 2002/04/19 22:58:09 alfred */ -/*- - * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, - * NASA Ames Research Center. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* $NetBSD: bus_dma.c,v 1.17 2006/03/01 12:38:11 yamt Exp $ */ - #include __FBSDID("$FreeBSD$"); +/* + * MIPS bus dma support routines + */ + #include #include #include @@ -79,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -88,6 +55,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#define MAX_BPAGES 64 +#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 +#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 + +struct bounce_zone; struct bus_dma_tag { bus_dma_tag_t parent; @@ -105,19 +79,59 @@ struct bus_dma_tag { int map_count; bus_dma_lock_t *lockfunc; void *lockfuncarg; - /* XXX: machine-dependent fields */ - vm_offset_t _physbase; - vm_offset_t _wbase; - vm_offset_t _wsize; + struct bounce_zone *bounce_zone; +}; + +struct bounce_page { + vm_offset_t vaddr; /* kva of bounce buffer */ + vm_offset_t vaddr_nocache; /* kva of bounce buffer uncached */ + bus_addr_t busaddr; /* Physical address */ + vm_offset_t datavaddr; /* kva of client data */ + bus_size_t datacount; /* client data count */ + STAILQ_ENTRY(bounce_page) links; }; +int busdma_swi_pending; + +struct bounce_zone { + STAILQ_ENTRY(bounce_zone) links; + STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; + int total_bpages; + int free_bpages; + int reserved_bpages; + int active_bpages; + int total_bounced; + int total_deferred; + int map_count; + bus_size_t alignment; + bus_addr_t lowaddr; + char zoneid[8]; + char lowaddrid[20]; + struct sysctl_ctx_list sysctl_tree; + struct sysctl_oid *sysctl_tree_top; +}; + +static struct mtx bounce_lock; +static int total_bpages; +static int busdma_zonecount; +static STAILQ_HEAD(, bounce_zone) bounce_zone_list; + +SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); +SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, + "Total bounce pages"); + #define DMAMAP_LINEAR 0x1 #define DMAMAP_MBUF 0x2 #define DMAMAP_UIO 0x4 -#define DMAMAP_ALLOCATED 0x10 #define DMAMAP_TYPE_MASK (DMAMAP_LINEAR|DMAMAP_MBUF|DMAMAP_UIO) #define DMAMAP_COHERENT 0x8 +#define DMAMAP_ALLOCATED 0x10 +#define DMAMAP_MALLOCUSED 0x20 + struct bus_dmamap { + struct bp_list bpages; + int pagesneeded; + int pagesreserved; bus_dma_tag_t dmat; int flags; void *buffer; @@ -125,8 +139,15 @@ struct bus_dmamap { void *allocbuffer; TAILQ_ENTRY(bus_dmamap) freelist; int len; + STAILQ_ENTRY(bus_dmamap) links; + bus_dmamap_callback_t *callback; + void *callback_arg; + }; +static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; +static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; + static TAILQ_HEAD(,bus_dmamap) dmamap_freelist = TAILQ_HEAD_INITIALIZER(dmamap_freelist); @@ -137,6 +158,45 @@ static struct mtx busdma_mtx; MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); +static void init_bounce_pages(void *dummy); +static int alloc_bounce_zone(bus_dma_tag_t dmat); +static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); +static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, + int commit); +static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, + vm_offset_t vaddr, bus_size_t size); +static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); + +/* Default tag, as most drivers provide no parent tag. */ +bus_dma_tag_t mips_root_dma_tag; + +/* + * Return true if a match is made. + * + * To find a match walk the chain of bus_dma_tag_t's looking for 'paddr'. + * + * If paddr is within the bounds of the dma tag then call the filter callback + * to check for a match, if there is no filter callback then assume a match. + */ +static int +run_filter(bus_dma_tag_t dmat, bus_addr_t paddr) +{ + int retval; + + retval = 0; + + do { + if (((paddr > dmat->lowaddr && paddr <= dmat->highaddr) + || ((paddr & (dmat->alignment - 1)) != 0)) + && (dmat->filter == NULL + || (*dmat->filter)(dmat->filterarg, paddr) != 0)) + retval = 1; + + dmat = dmat->parent; + } while (retval == 0 && dmat != NULL); + return (retval); +} + static void mips_dmamap_freelist_init(void *dummy) { @@ -157,6 +217,19 @@ bus_dmamap_load_buffer(bus_dma_tag_t dma bus_dmamap_t map, void *buf, bus_size_t buflen, struct pmap *pmap, int flags, vm_offset_t *lastaddrp, int *segp); +static __inline int +_bus_dma_can_bounce(vm_offset_t lowaddr, vm_offset_t highaddr) +{ + int i; + for (i = 0; phys_avail[i] && phys_avail[i + 1]; i += 2) { + if ((lowaddr >= phys_avail[i] && lowaddr <= phys_avail[i + 1]) + || (lowaddr < phys_avail[i] && + highaddr > phys_avail[i])) + return (1); + } + return (0); +} + /* * Convenience function for manipulating driver locks from busdma (during * busdma_swi, for example). Drivers that don't provide their own locks @@ -213,6 +286,7 @@ _busdma_alloc_dmamap(void) map->flags = DMAMAP_ALLOCATED; } else map->flags = 0; + STAILQ_INIT(&map->bpages); return (map); } @@ -228,6 +302,11 @@ _busdma_free_dmamap(bus_dmamap_t map) } } +/* + * Allocate a device specific dma_tag. + */ +#define SEG_NB 1024 + int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, bus_size_t boundary, bus_addr_t lowaddr, @@ -238,16 +317,12 @@ bus_dma_tag_create(bus_dma_tag_t parent, { bus_dma_tag_t newtag; int error = 0; - - /* Basic sanity checking */ - if (boundary != 0 && boundary < maxsegsz) - maxsegsz = boundary; - /* Return a NULL tag on failure */ *dmat = NULL; + if (!parent) + parent = mips_root_dma_tag; - newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, - M_ZERO | M_NOWAIT); + newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, M_NOWAIT); if (newtag == NULL) { CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", __func__, newtag, 0, error); @@ -257,21 +332,16 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->parent = parent; newtag->alignment = alignment; newtag->boundary = boundary; - newtag->lowaddr = trunc_page((vm_paddr_t)lowaddr) + (PAGE_SIZE - 1); - newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + - (PAGE_SIZE - 1); + newtag->lowaddr = trunc_page((vm_offset_t)lowaddr) + (PAGE_SIZE - 1); + newtag->highaddr = trunc_page((vm_offset_t)highaddr) + (PAGE_SIZE - 1); newtag->filter = filter; newtag->filterarg = filterarg; - newtag->maxsize = maxsize; - newtag->nsegments = nsegments; + newtag->maxsize = maxsize; + newtag->nsegments = nsegments; newtag->maxsegsz = maxsegsz; newtag->flags = flags; newtag->ref_count = 1; /* Count ourself */ newtag->map_count = 0; - newtag->_wbase = 0; - newtag->_physbase = 0; - /* XXXMIPS: Should we limit window size to amount of physical memory */ - newtag->_wsize = MIPS_KSEG1_START - MIPS_KSEG0_START; if (lockfunc != NULL) { newtag->lockfunc = lockfunc; newtag->lockfuncarg = lockfuncarg; @@ -279,36 +349,68 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->lockfunc = dflt_lock; newtag->lockfuncarg = NULL; } - - /* Take into account any restrictions imposed by our parent tag */ - if (parent != NULL) { - newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr); - newtag->highaddr = MAX(parent->highaddr, newtag->highaddr); + /* + * Take into account any restrictions imposed by our parent tag + */ + if (parent != NULL) { + newtag->lowaddr = min(parent->lowaddr, newtag->lowaddr); + newtag->highaddr = max(parent->highaddr, newtag->highaddr); if (newtag->boundary == 0) newtag->boundary = parent->boundary; else if (parent->boundary != 0) - newtag->boundary = MIN(parent->boundary, + newtag->boundary = min(parent->boundary, newtag->boundary); - if (newtag->filter == NULL) { - /* - * Short circuit looking at our parent directly - * since we have encapsulated all of its information - */ - newtag->filter = parent->filter; - newtag->filterarg = parent->filterarg; - newtag->parent = parent->parent; + if ((newtag->filter != NULL) || + ((parent->flags & BUS_DMA_COULD_BOUNCE) != 0)) + newtag->flags |= BUS_DMA_COULD_BOUNCE; + if (newtag->filter == NULL) { + /* + * Short circuit looking at our parent directly + * since we have encapsulated all of its information + */ + newtag->filter = parent->filter; + newtag->filterarg = parent->filterarg; + newtag->parent = parent->parent; } if (newtag->parent != NULL) atomic_add_int(&parent->ref_count, 1); } + if (_bus_dma_can_bounce(newtag->lowaddr, newtag->highaddr) + || newtag->alignment > 1) + newtag->flags |= BUS_DMA_COULD_BOUNCE; + + if (((newtag->flags & BUS_DMA_COULD_BOUNCE) != 0) && + (flags & BUS_DMA_ALLOCNOW) != 0) { + struct bounce_zone *bz; + + /* Must bounce */ + + if ((error = alloc_bounce_zone(newtag)) != 0) { + free(newtag, M_DEVBUF); + return (error); + } + bz = newtag->bounce_zone; + + if (ptoa(bz->total_bpages) < maxsize) { + int pages; - if (error != 0) { + pages = atop(maxsize) - bz->total_bpages; + + /* Add pages to our bounce pool */ + if (alloc_bounce_pages(newtag, pages) < pages) + error = ENOMEM; + } + /* Performed initial allocation */ + newtag->flags |= BUS_DMA_MIN_ALLOC_COMP; + } else + newtag->bounce_zone = NULL; + if (error != 0) free(newtag, M_DEVBUF); - } else { + else *dmat = newtag; - } CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", __func__, newtag, (newtag != NULL ? newtag->flags : 0), error); + return (error); } @@ -346,6 +448,7 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) return (0); } +#include /* * Allocate a handle for mapping from kva/uva/physical * address space into bus device space. @@ -354,9 +457,7 @@ int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) { bus_dmamap_t newmap; -#ifdef KTR int error = 0; -#endif newmap = _busdma_alloc_dmamap(); if (newmap == NULL) { @@ -365,13 +466,64 @@ bus_dmamap_create(bus_dma_tag_t dmat, in } *mapp = newmap; newmap->dmat = dmat; + newmap->allocbuffer = NULL; dmat->map_count++; + /* + * Bouncing might be required if the driver asks for an active + * exclusion region, a data alignment that is stricter than 1, and/or + * an active address boundary. + */ + if (dmat->flags & BUS_DMA_COULD_BOUNCE) { + + /* Must bounce */ + struct bounce_zone *bz; + int maxpages; + + if (dmat->bounce_zone == NULL) { + if ((error = alloc_bounce_zone(dmat)) != 0) { + _busdma_free_dmamap(newmap); + *mapp = NULL; + return (error); + } + } + bz = dmat->bounce_zone; + + /* Initialize the new map */ + STAILQ_INIT(&((*mapp)->bpages)); + + /* + * Attempt to add pages to our pool on a per-instance + * basis up to a sane limit. + */ + maxpages = MAX_BPAGES; + if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 + || (bz->map_count > 0 && bz->total_bpages < maxpages)) { + int pages; + + pages = MAX(atop(dmat->maxsize), 1); + pages = MIN(maxpages - bz->total_bpages, pages); + pages = MAX(pages, 1); + if (alloc_bounce_pages(dmat, pages) < pages) + error = ENOMEM; + + if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0) { + if (error == 0) + dmat->flags |= BUS_DMA_MIN_ALLOC_COMP; + } else { + error = 0; + } + } + bz->map_count++; + } + + if (flags & BUS_DMA_COHERENT) + newmap->flags |= DMAMAP_COHERENT; + CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, error); return (0); - } /* @@ -381,7 +533,15 @@ bus_dmamap_create(bus_dma_tag_t dmat, in int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) { + _busdma_free_dmamap(map); + if (STAILQ_FIRST(&map->bpages) != NULL) { + CTR3(KTR_BUSDMA, "%s: tag %p error %d", + __func__, dmat, EBUSY); + return (EBUSY); + } + if (dmat->bounce_zone) + dmat->bounce_zone->map_count--; dmat->map_count--; CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat); return (0); @@ -416,9 +576,16 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi dmat->map_count++; *mapp = newmap; newmap->dmat = dmat; + + if (flags & BUS_DMA_COHERENT) + newmap->flags |= DMAMAP_COHERENT; - if (dmat->maxsize <= PAGE_SIZE) { + if (dmat->maxsize <= PAGE_SIZE && + (dmat->alignment < dmat->maxsize) && + !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr) && + !(flags & BUS_DMA_COHERENT)) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); + newmap->flags |= DMAMAP_MALLOCUSED; } else { /* * XXX Use Contigmalloc until it is merged into this facility @@ -440,7 +607,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi maxphys = dmat->lowaddr; } *vaddr = contigmalloc(dmat->maxsize, M_DEVBUF, mflags, - 0ul, maxphys, dmat->alignment? dmat->alignment : 1ul, + 0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul, dmat->boundary); } if (*vaddr == NULL) { @@ -451,6 +618,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi *mapp = NULL; return (ENOMEM); } + if (flags & BUS_DMA_COHERENT) { void *tmpaddr = (void *)*vaddr; @@ -463,10 +631,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi *vaddr = tmpaddr; } else newmap->origbuffer = newmap->allocbuffer = NULL; - } else + } else newmap->origbuffer = newmap->allocbuffer = NULL; - return (0); + return (0); } /* @@ -481,15 +649,69 @@ bus_dmamem_free(bus_dma_tag_t dmat, void ("Trying to freeing the wrong DMA buffer")); vaddr = map->origbuffer; } - if (dmat->maxsize <= PAGE_SIZE) + + if (map->flags & DMAMAP_MALLOCUSED) free(vaddr, M_DEVBUF); - else { + else contigfree(vaddr, dmat->maxsize, M_DEVBUF); - } + dmat->map_count--; _busdma_free_dmamap(map); CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags); +} +static int +_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap, + void *buf, bus_size_t buflen, int flags) +{ + vm_offset_t vaddr; + vm_offset_t vendaddr; + bus_addr_t paddr; + + if ((map->pagesneeded == 0)) { + CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d", + dmat->lowaddr, dmat->boundary, dmat->alignment); + CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d", + map, map->pagesneeded); + /* + * Count the number of bounce pages + * needed in order to complete this transfer + */ + vaddr = trunc_page((vm_offset_t)buf); + vendaddr = (vm_offset_t)buf + buflen; + + while (vaddr < vendaddr) { + KASSERT(kernel_pmap == pmap, ("pmap is not kernel pmap")); + paddr = pmap_kextract(vaddr); + if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && + run_filter(dmat, paddr) != 0) + map->pagesneeded++; + vaddr += PAGE_SIZE; + } + CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); + } + + /* Reserve Necessary Bounce Pages */ + if (map->pagesneeded != 0) { + mtx_lock(&bounce_lock); + if (flags & BUS_DMA_NOWAIT) { + if (reserve_bounce_pages(dmat, map, 0) != 0) { + mtx_unlock(&bounce_lock); + return (ENOMEM); + } + } else { + if (reserve_bounce_pages(dmat, map, 1) != 0) { + /* Queue us for resources */ + STAILQ_INSERT_TAIL(&bounce_map_waitinglist, + map, links); + mtx_unlock(&bounce_lock); + return (EINPROGRESS); + } + } + mtx_unlock(&bounce_lock); + } + + return (0); } /* @@ -504,8 +726,7 @@ bus_dmamap_load_buffer(bus_dma_tag_t dma int flags, vm_offset_t *lastaddrp, int *segp) { bus_size_t sgsize; - bus_size_t bmask; - vm_offset_t curaddr, lastaddr; + bus_addr_t curaddr, lastaddr, baddr, bmask; vm_offset_t vaddr = (vm_offset_t)buf; int seg; int error = 0; @@ -513,36 +734,48 @@ bus_dmamap_load_buffer(bus_dma_tag_t dma lastaddr = *lastaddrp; bmask = ~(dmat->boundary - 1); + if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { + error = _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen, + flags); + if (error) + return (error); + } + CTR3(KTR_BUSDMA, "lowaddr= %d boundary= %d, " + "alignment= %d", dmat->lowaddr, dmat->boundary, dmat->alignment); + for (seg = *segp; buflen > 0 ; ) { /* * Get the physical address for this segment. + * + * XXX Don't support checking for coherent mappings + * XXX in user address space. */ KASSERT(kernel_pmap == pmap, ("pmap is not kernel pmap")); curaddr = pmap_kextract(vaddr); /* - * If we're beyond the current DMA window, indicate - * that and try to fall back onto something else. - */ - if (curaddr < dmat->_physbase || - curaddr >= (dmat->_physbase + dmat->_wsize)) - return (EINVAL); - - /* - * In a valid DMA range. Translate the physical - * memory address to an address in the DMA window. - */ - curaddr = (curaddr - dmat->_physbase) + dmat->_wbase; - - - /* * Compute the segment size, and adjust counts. */ sgsize = PAGE_SIZE - ((u_long)curaddr & PAGE_MASK); + if (sgsize > dmat->maxsegsz) + sgsize = dmat->maxsegsz; if (buflen < sgsize) sgsize = buflen; /* + * Make sure we don't cross any boundaries. + */ + if (dmat->boundary > 0) { + baddr = (curaddr + dmat->boundary) & bmask; + if (sgsize > (baddr - curaddr)) + sgsize = (baddr - curaddr); + } + if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && + map->pagesneeded != 0 && run_filter(dmat, curaddr)) { + curaddr = add_bounce_page(dmat, map, vaddr, sgsize); + } + + /* * Insert chunk into a segment, coalescing with * the previous segment if possible. */ @@ -574,9 +807,8 @@ segdone: * Did we fit? */ if (buflen != 0) - error = EFBIG; - - return error; + error = EFBIG; /* XXX better return value here? */ + return (error); } /* @@ -597,14 +829,17 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_ KASSERT(dmat != NULL, ("dmatag is NULL")); KASSERT(map != NULL, ("dmamap is NULL")); + map->callback = callback; + map->callback_arg = callback_arg; map->flags &= ~DMAMAP_TYPE_MASK; - map->flags |= DMAMAP_LINEAR|DMAMAP_COHERENT; + map->flags |= DMAMAP_LINEAR; map->buffer = buf; map->len = buflen; error = bus_dmamap_load_buffer(dmat, dm_segments, map, buf, buflen, kernel_pmap, flags, &lastaddr, &nsegs); - + if (error == EINPROGRESS) + return (error); if (error) (*callback)(callback_arg, NULL, 0, error); else @@ -613,8 +848,7 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_ CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d", __func__, dmat, dmat->flags, nsegs + 1, error); - return (0); - + return (error); } /* @@ -635,10 +869,9 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, M_ASSERTPKTHDR(m0); map->flags &= ~DMAMAP_TYPE_MASK; - map->flags |= DMAMAP_MBUF | DMAMAP_COHERENT; + map->flags |= DMAMAP_MBUF; map->buffer = m0; map->len = 0; - if (m0->m_pkthdr.len <= dmat->maxsize) { vm_offset_t lastaddr = 0; struct mbuf *m; @@ -676,16 +909,14 @@ bus_dmamap_load_mbuf_sg(bus_dma_tag_t dm int flags) { int error = 0; - M_ASSERTPKTHDR(m0); flags |= BUS_DMA_NOWAIT; *nsegs = -1; map->flags &= ~DMAMAP_TYPE_MASK; - map->flags |= DMAMAP_MBUF | DMAMAP_COHERENT; - map->buffer = m0; + map->flags |= DMAMAP_MBUF; + map->buffer = m0; map->len = 0; - if (m0->m_pkthdr.len <= dmat->maxsize) { vm_offset_t lastaddr = 0; struct mbuf *m; @@ -693,8 +924,9 @@ bus_dmamap_load_mbuf_sg(bus_dma_tag_t dm for (m = m0; m != NULL && error == 0; m = m->m_next) { if (m->m_len > 0) { error = bus_dmamap_load_buffer(dmat, segs, map, - m->m_data, m->m_len, - kernel_pmap, flags, &lastaddr, nsegs); + m->m_data, m->m_len, + kernel_pmap, flags, &lastaddr, + nsegs); map->len += m->m_len; } } @@ -702,12 +934,11 @@ bus_dmamap_load_mbuf_sg(bus_dma_tag_t dm error = EINVAL; } + /* XXX FIXME: Having to increment nsegs is really annoying */ ++*nsegs; CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d", __func__, dmat, dmat->flags, error, *nsegs); - return (error); - } /* @@ -718,9 +949,65 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_callback2_t *callback, void *callback_arg, int flags) { + vm_offset_t lastaddr = 0; +#ifdef __CC_SUPPORTS_DYNAMIC_ARRAY_INIT + bus_dma_segment_t dm_segments[dmat->nsegments]; +#else + bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; +#endif + int nsegs, i, error; + bus_size_t resid; + struct iovec *iov; + struct pmap *pmap; - panic("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); - return (0); + resid = uio->uio_resid; + iov = uio->uio_iov; + map->flags &= ~DMAMAP_TYPE_MASK; + map->flags |= DMAMAP_UIO; + map->buffer = uio; + map->len = 0; + + if (uio->uio_segflg == UIO_USERSPACE) { + KASSERT(uio->uio_td != NULL, + ("bus_dmamap_load_uio: USERSPACE but no proc")); + /* XXX: pmap = vmspace_pmap(uio->uio_td->td_proc->p_vmspace); */ + panic("can't do it yet"); + } else + pmap = kernel_pmap; + + error = 0; + nsegs = -1; + for (i = 0; i < uio->uio_iovcnt && resid != 0 && !error; i++) { + /* + * Now at the first iovec to load. Load each iovec + * until we have exhausted the residual count. + */ + bus_size_t minlen = + resid < iov[i].iov_len ? resid : iov[i].iov_len; + caddr_t addr = (caddr_t) iov[i].iov_base; + + if (minlen > 0) { + error = bus_dmamap_load_buffer(dmat, dm_segments, map, + addr, minlen, pmap, flags, &lastaddr, &nsegs); + + map->len += minlen; + resid -= minlen; + } + } + + if (error) { + /* + * force "no valid mappings" on error in callback. + */ + (*callback)(callback_arg, dm_segments, 0, 0, error); + } else { + (*callback)(callback_arg, dm_segments, nsegs+1, + uio->uio_resid, error); + } + + CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d", + __func__, dmat, dmat->flags, error, nsegs + 1); + return (error); } /* @@ -729,25 +1016,78 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, void _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) { + struct bounce_page *bpage; + map->flags &= ~DMAMAP_TYPE_MASK; + while ((bpage = STAILQ_FIRST(&map->bpages)) != NULL) { + STAILQ_REMOVE_HEAD(&map->bpages, links); + free_bounce_page(dmat, bpage); + } return; } -static __inline void +static void bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op) { + char tmp_cl[mips_pdcache_linesize], tmp_clend[mips_pdcache_linesize]; + vm_offset_t buf_cl, buf_clend; + vm_size_t size_cl, size_clend; + int cache_linesize_mask = mips_pdcache_linesize - 1; + + /* + * dcache invalidation operates on cache line aligned addresses + * and could modify areas of memory that share the same cache line + * at the beginning and the ending of the buffer. In order to + * prevent a data loss we save these chunks in temporary buffer + * before invalidation and restore them afer it + */ + buf_cl = (vm_offset_t)buf & ~cache_linesize_mask; + size_cl = (vm_offset_t)buf & cache_linesize_mask; + buf_clend = (vm_offset_t)buf + len; + size_clend = (mips_pdcache_linesize - + (buf_clend & cache_linesize_mask)) & cache_linesize_mask; switch (op) { + case BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE: + case BUS_DMASYNC_POSTREAD: + + /* + * Save buffers that might be modified by invalidation + */ + if (size_cl) + memcpy (tmp_cl, (void*)buf_cl, size_cl); + if (size_clend) + memcpy (tmp_clend, (void*)buf_clend, size_clend); + mips_dcache_inv_range((vm_offset_t)buf, len); + /* + * Restore them + */ + if (size_cl) + memcpy ((void*)buf_cl, tmp_cl, size_cl); + if (size_clend) + memcpy ((void*)buf_clend, tmp_clend, size_clend); + break; + case BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE: mips_dcache_wbinv_range((vm_offset_t)buf, len); break; case BUS_DMASYNC_PREREAD: -#if 1 - mips_dcache_wbinv_range((vm_offset_t)buf, len); -#else + /* + * Save buffers that might be modified by invalidation + */ + if (size_cl) + memcpy (tmp_cl, (void *)buf_cl, size_cl); + if (size_clend) + memcpy (tmp_clend, (void *)buf_clend, size_clend); mips_dcache_inv_range((vm_offset_t)buf, len); -#endif + /* + * Restore them + */ + if (size_cl) + memcpy ((void *)buf_cl, tmp_cl, size_cl); + if (size_clend) + memcpy ((void *)buf_clend, tmp_clend, size_clend); break; case BUS_DMASYNC_PREWRITE: @@ -756,6 +1096,51 @@ bus_dmamap_sync_buf(void *buf, int len, } } +static void +_bus_dmamap_sync_bp(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) +{ + struct bounce_page *bpage; + + STAILQ_FOREACH(bpage, &map->bpages, links) { + if (op & BUS_DMASYNC_PREWRITE) { + bcopy((void *)bpage->datavaddr, + (void *)(bpage->vaddr_nocache != 0 ? + bpage->vaddr_nocache : bpage->vaddr), + bpage->datacount); + if (bpage->vaddr_nocache == 0) { + mips_dcache_wb_range(bpage->vaddr, + bpage->datacount); + } + dmat->bounce_zone->total_bounced++; + } + if (op & BUS_DMASYNC_POSTREAD) { + if (bpage->vaddr_nocache == 0) { + mips_dcache_inv_range(bpage->vaddr, + bpage->datacount); + } + bcopy((void *)(bpage->vaddr_nocache != 0 ? + bpage->vaddr_nocache : bpage->vaddr), + (void *)bpage->datavaddr, bpage->datacount); + dmat->bounce_zone->total_bounced++; + } + } +} + +static __inline int +_bus_dma_buf_is_in_bp(bus_dmamap_t map, void *buf, int len) +{ + struct bounce_page *bpage; + + STAILQ_FOREACH(bpage, &map->bpages, links) { + if ((vm_offset_t)buf >= bpage->datavaddr && + (vm_offset_t)buf + len <= bpage->datavaddr + + bpage->datacount) + return (1); + } + return (0); + +} + void _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { @@ -764,51 +1149,23 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus int resid; struct iovec *iov; - - /* - * Mixing PRE and POST operations is not allowed. - */ - if ((op & (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)) != 0 && - (op & (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)) != 0) - panic("_bus_dmamap_sync: mix PRE and POST"); - - /* - * Since we're dealing with a virtually-indexed, write-back - * cache, we need to do the following things: - * - * PREREAD -- Invalidate D-cache. Note we might have - * to also write-back here if we have to use an Index - * op, or if the buffer start/end is not cache-line aligned. - * - * PREWRITE -- Write-back the D-cache. If we have to use - * an Index op, we also have to invalidate. Note that if - * we are doing PREREAD|PREWRITE, we can collapse everything *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 21:00:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 584A91065694; Sun, 10 Jan 2010 21:00:53 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 494508FC28; Sun, 10 Jan 2010 21:00:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AL0r8t039800; Sun, 10 Jan 2010 21:00:53 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AL0r3N039797; Sun, 10 Jan 2010 21:00:53 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001102100.o0AL0r3N039797@svn.freebsd.org> From: Alan Cox Date: Sun, 10 Jan 2010 21:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202047 - in head/sys: amd64/amd64 i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 21:00:53 -0000 Author: alc Date: Sun Jan 10 21:00:52 2010 New Revision: 202047 URL: http://svn.freebsd.org/changeset/base/202047 Log: Eliminate unused declarations. Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/i386/xen/xen_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Sun Jan 10 20:29:20 2010 (r202046) +++ head/sys/amd64/amd64/mp_machdep.c Sun Jan 10 21:00:52 2010 (r202047) @@ -98,12 +98,6 @@ char *doublefault_stack; char *nmi_stack; void *dpcpu; -/* Hotwire a 0->4MB V==P mapping */ -extern pt_entry_t *KPTphys; - -/* SMP page table page */ -extern pt_entry_t *SMPpt; - struct pcb stoppcbs[MAXCPU]; struct xpcb **stopxpcbs = NULL; Modified: head/sys/i386/xen/xen_machdep.c ============================================================================== --- head/sys/i386/xen/xen_machdep.c Sun Jan 10 20:29:20 2010 (r202046) +++ head/sys/i386/xen/xen_machdep.c Sun Jan 10 21:00:52 2010 (r202047) @@ -715,9 +715,6 @@ xen_destroy_contiguous_region(void *addr balloon_unlock(flags); } -extern unsigned long cpu0prvpage; -extern unsigned long *SMPpt; -extern struct user *proc0uarea; extern vm_offset_t proc0kstack; extern int vm86paddr, vm86phystk; char *bootmem_start, *bootmem_current, *bootmem_end; From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 21:25:51 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 649B3106566B; Sun, 10 Jan 2010 21:25:51 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 96EB38FC17; Sun, 10 Jan 2010 21:25:50 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0ALPnPB047475; Mon, 11 Jan 2010 00:25:49 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263158749; bh=AMUw04gd551RrKYslYeylXGMNVf2rYs9i8bLHzoqd7k=; l=984; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=F4e8VIqUgug0cUbTpBV87k86owrjSfJzg5WlQjtfU2oiEJUcK/lDQ080AYmpjOcaY J1wyRnn/GfbnJvMjbXSHFNVkX1zcJ9pcLQKp19I8oAUdhfH47tWLQmWgc9rAyV47tu 4G5AmMoNVDmzBzSEhvsyIWfd4sS4fSyTXm9aXOO8= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0ALPmbB047474; Mon, 11 Jan 2010 00:25:49 +0300 (MSK) (envelope-from ache) Date: Mon, 11 Jan 2010 00:25:48 +0300 From: Andrey Chernov To: Colin Percival Message-ID: <20100110212548.GA47331@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Colin Percival , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201001101430.o0AEUURS051917@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001101430.o0AEUURS051917@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r201999 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 21:25:51 -0000 On Sun, Jan 10, 2010 at 02:30:30PM +0000, Colin Percival wrote: > + * Check for integer overflow. As an optimization, first check that > + * at least one of {count, size} is at least 2^16, since if both > + * values are less than that, their product can't possible overflow > + * (size_t is always at least 32 bits on FreeBSD). > + */ > + if (((count | size) > 0xFFFF) && > + (count > SIZE_MAX / size)) { > + errno = EINVAL; > + fp->_flags |= __SERR; > + return (0); > + } 1) I don't think that this is good place of exact constants like 0xFFFF, usually we don't use such things in overflow checks (see all other ones). fread/fwrite are already slow as designed, so optimizing one time argument check looks strange. 2) fp->_flags |= __SERR; This flag is for errors in the file stream, not for errors in the arguments. Please back that line out. 3) errno should be EOVERFLOW, see other owerflow checks in the stdio. -- http://ache.pp.ru/ From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 21:41:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9821106566C; Sun, 10 Jan 2010 21:41:37 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99A478FC0C; Sun, 10 Jan 2010 21:41:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ALfbdN048934; Sun, 10 Jan 2010 21:41:37 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ALfbhR048931; Sun, 10 Jan 2010 21:41:37 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001102141.o0ALfbhR048931@svn.freebsd.org> From: Ed Schouten Date: Sun, 10 Jan 2010 21:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202048 - in head: etc share/termcap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 21:41:37 -0000 Author: ed Date: Sun Jan 10 21:41:37 2010 New Revision: 202048 URL: http://svn.freebsd.org/changeset/base/202048 Log: Properly make the end key work again for TERM=xterm. I've been so busy hacking on utmpx the last couple of days, out of reflex, I committed it to the wrong source tree. Note to myself: don't hack on FreeBSD while watching TV at the same time. PR: conf/142578 Submitted by: Yuri Pankov Reminded by: stefanf Modified: head/etc/termcap.small head/share/termcap/termcap.src Modified: head/etc/termcap.small ============================================================================== --- head/etc/termcap.small Sun Jan 10 21:00:52 2010 (r202047) +++ head/etc/termcap.small Sun Jan 10 21:41:37 2010 (r202048) @@ -294,9 +294,9 @@ pc3|ibmpc3|IBM PC 386BSD Console:\ # $XTermId: termcap,v 1.78 2009/11/09 00:24:26 tom Exp $ # xterm-new|modern xterm:\ - :*6=\EOF:@7=\EOF:F1=\E[23~:F2=\E[24~:K2=\EOE:Km=\E[M:\ + :@7=\EOF:@8=\EOM:F1=\E[23~:F2=\E[24~:K2=\EOE:Km=\E[M:\ :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ - :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kH=\EOF:kI=\E[2~:\ + :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kI=\E[2~:\ :kN=\E[6~:kP=\E[5~:kd=\EOB:kh=\EOH:kl=\EOD:kr=\EOC:ku=\EOA:\ :tc=xterm-basic: # Modified: head/share/termcap/termcap.src ============================================================================== --- head/share/termcap/termcap.src Sun Jan 10 21:00:52 2010 (r202047) +++ head/share/termcap/termcap.src Sun Jan 10 21:41:37 2010 (r202048) @@ -2807,9 +2807,9 @@ xterm-clear:\ :te=\E[?1049l:ti=\E[?1049h:\ :tc=xterm-new: xterm-new|modern xterm:\ - :*6=\EOF:@7=\EOF:F1=\E[23~:F2=\E[24~:K2=\EOE:Km=\E[M:\ + :@7=\EOF:@8=\EOM:F1=\E[23~:F2=\E[24~:K2=\EOE:Km=\E[M:\ :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ - :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kH=\EOF:kI=\E[2~:\ + :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kI=\E[2~:\ :kN=\E[6~:kP=\E[5~:kd=\EOB:kh=\EOH:kl=\EOD:kr=\EOC:ku=\EOA:\ :tc=xterm-basic: # From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 21:59:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C0B11065672; Sun, 10 Jan 2010 21:59:07 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B9408FC12; Sun, 10 Jan 2010 21:59:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ALx6PW052801; Sun, 10 Jan 2010 21:59:06 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ALx6EH052799; Sun, 10 Jan 2010 21:59:06 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001102159.o0ALx6EH052799@svn.freebsd.org> From: Ed Schouten Date: Sun, 10 Jan 2010 21:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202049 - head/usr.bin/lastcomm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 21:59:07 -0000 Author: ed Date: Sun Jan 10 21:59:06 2010 New Revision: 202049 URL: http://svn.freebsd.org/changeset/base/202049 Log: Let lastcomm(1) build without . Use MAXLOGNAME - 1 instead of UTNAMESIZE. There is no definition for TTY name sizes, at least not as low as 8, so hardcode it for now. Modified: head/usr.bin/lastcomm/lastcomm.c Modified: head/usr.bin/lastcomm/lastcomm.c ============================================================================== --- head/usr.bin/lastcomm/lastcomm.c Sun Jan 10 21:41:37 2010 (r202048) +++ head/usr.bin/lastcomm/lastcomm.c Sun Jan 10 21:59:06 2010 (r202049) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "pathnames.h" /*XXX*/#include @@ -154,11 +153,11 @@ main(int argc, char *argv[]) if (*argv && !requested(argv, &ab)) continue; - (void)printf("%-*.*s %-7s %-*s %-*s", + (void)printf("%-*.*s %-7s %-*s %-8s", AC_COMM_LEN, AC_COMM_LEN, ab.ac_comm, flagbits(ab.ac_flagx), - UT_NAMESIZE, user_from_uid(ab.ac_uid, 0), - UT_LINESIZE, getdev(ab.ac_tty)); + MAXLOGNAME - 1, user_from_uid(ab.ac_uid, 0), + getdev(ab.ac_tty)); /* user + system time */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 22:19:17 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id C01471065693 for ; Sun, 10 Jan 2010 22:19:17 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from xps.daemonology.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with SMTP id 45BC114E3B8 for ; Sun, 10 Jan 2010 22:18:59 +0000 (UTC) Received: (qmail 19135 invoked from network); 10 Jan 2010 22:18:58 -0000 Received: from unknown (HELO xps.daemonology.net) (127.0.0.1) by localhost with SMTP; 10 Jan 2010 22:18:58 -0000 Message-ID: <4B4A5252.9070205@freebsd.org> Date: Sun, 10 Jan 2010 14:18:58 -0800 From: Colin Percival User-Agent: Thunderbird 2.0.0.23 (X11/20091215) MIME-Version: 1.0 To: Andrey Chernov , Colin Percival , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201001101430.o0AEUURS051917@svn.freebsd.org> <20100110212548.GA47331@nagual.pp.ru> In-Reply-To: <20100110212548.GA47331@nagual.pp.ru> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r201999 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 22:19:17 -0000 Andrey Chernov wrote: > On Sun, Jan 10, 2010 at 02:30:30PM +0000, Colin Percival wrote: >> + if (((count | size) > 0xFFFF) && >> + (count > SIZE_MAX / size)) { >> + errno = EINVAL; >> + fp->_flags |= __SERR; >> + return (0); >> + } > > 1) I don't think that this is good place of exact constants like 0xFFFF, > usually we don't use such things in overflow checks (see all other ones). > fread/fwrite are already slow as designed, so optimizing one time argument > check looks strange. On my laptop, this optimization speeds up 1-byte fwrite calls by 27% compared to always doing the division. You can argue that people who care about code performance shouldn't be making millions of 1-byte fwrite calls, but I think it's a simple enough optimization and has enough of an impact to be worthwhile. > 2) fp->_flags |= __SERR; > This flag is for errors in the file stream, not for errors in > the arguments. Please back that line out. Quoting fread(3): The function fread() does not distinguish between end-of-file and error, and callers must use feof(3) and ferror(3) to determine which occurred. This would seem to imply that for any failed request, either feof or ferror should return a non-zero value. Removing this line would break the common while (fread(ptr, reclen, 1, f) == 1) { /* Do stuff here. */ } if (ferror(f)) { /* Die due to read error */ } /* No error? Ok, we must have hit EOF */ idiom. > 3) errno should be EOVERFLOW, see other owerflow checks in the stdio. I picked EINVAL because this is the code used by read(2) and write(2) if they are passed nbytes > INT_MAX. It would seem odd to use one error code for a number of bytes between INT_MAX and SIZE_MAX and then switch to a different error code for > SIZE_MAX bytes. -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 22:34:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 742731065670; Sun, 10 Jan 2010 22:34:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5768FC1B; Sun, 10 Jan 2010 22:34:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0AMYJ41060573; Sun, 10 Jan 2010 22:34:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0AMYJ8I060570; Sun, 10 Jan 2010 22:34:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001102234.o0AMYJ8I060570@svn.freebsd.org> From: Warner Losh Date: Sun, 10 Jan 2010 22:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202050 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 22:34:19 -0000 Author: imp Date: Sun Jan 10 22:34:18 2010 New Revision: 202050 URL: http://svn.freebsd.org/changeset/base/202050 Log: Merge change r198561 from projects/mips to head: r198561 | thompsa | 2009-10-28 15:25:22 -0600 (Wed, 28 Oct 2009) | 4 lines Allow a scratch buffer to be set in order to be able to use setenv() while booting, before dynamic kenv is running. A few platforms implement their own scratch+sprintf handling to save data from the boot environment. Modified: head/sys/kern/kern_environment.c head/sys/sys/systm.h Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Sun Jan 10 21:59:06 2010 (r202049) +++ head/sys/kern/kern_environment.c Sun Jan 10 22:34:18 2010 (r202050) @@ -60,6 +60,8 @@ static MALLOC_DEFINE(M_KENV, "kenv", "ke /* pointer to the static environment */ char *kern_envp; +static int env_len; +static int env_pos; static char *kernenv_next(char *); /* dynamic environment variables */ @@ -208,6 +210,14 @@ done: return (error); } +void +init_static_kenv(char *buf, size_t len) +{ + kern_envp = buf; + env_len = len; + env_pos = 0; +} + /* * Setup the dynamic kernel environment. */ @@ -336,6 +346,26 @@ testenv(const char *name) return (0); } +static int +setenv_static(const char *name, const char *value) +{ + int len; + + if (env_pos >= env_len) + return (-1); + + /* Check space for x=y and two nuls */ + len = strlen(name) + strlen(value); + if (len + 3 < env_len - env_pos) { + len = sprintf(&kern_envp[env_pos], "%s=%s", name, value); + env_pos += len+1; + kern_envp[env_pos] = '\0'; + return (0); + } else + return (-1); + +} + /* * Set an environment variable by name. */ @@ -345,6 +375,9 @@ setenv(const char *name, const char *val char *buf, *cp, *oldenv; int namelen, vallen, i; + if (dynamic_kenv == 0 && env_len > 0) + return (setenv_static(name, value)); + KENV_CHECK; namelen = strlen(name) + 1; Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Sun Jan 10 21:59:06 2010 (r202049) +++ head/sys/sys/systm.h Sun Jan 10 22:34:18 2010 (r202050) @@ -164,6 +164,7 @@ void critical_exit(void); void init_param1(void); void init_param2(long physpages); void init_param3(long kmempages); +void init_static_kenv(char *, size_t); void tablefull(const char *); int kvprintf(char const *, void (*)(int, void*), void *, int, __va_list) __printflike(1, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 23:06:20 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497F2106566B; Sun, 10 Jan 2010 23:06:20 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA848FC14; Sun, 10 Jan 2010 23:06:20 +0000 (UTC) Received: from toad.stack.nl (toad.stack.nl [IPv6:2001:610:1108:5010::135]) by mx1.stack.nl (Postfix) with ESMTP id EC08B359958; Mon, 11 Jan 2010 00:06:18 +0100 (CET) Received: by toad.stack.nl (Postfix, from userid 1677) id E150973F9D; Mon, 11 Jan 2010 00:06:18 +0100 (CET) Date: Mon, 11 Jan 2010 00:06:18 +0100 From: Jilles Tjoelker To: Colin Percival Message-ID: <20100110230618.GA6756@stack.nl> References: <201001101430.o0AEUURS051917@svn.freebsd.org> <20100110212548.GA47331@nagual.pp.ru> <4B4A5252.9070205@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B4A5252.9070205@freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@FreeBSD.ORG, Andrey Chernov , svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r201999 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 23:06:20 -0000 On Sun, Jan 10, 2010 at 02:18:58PM -0800, Colin Percival wrote: > Andrey Chernov wrote: > > On Sun, Jan 10, 2010 at 02:30:30PM +0000, Colin Percival wrote: > >> + if (((count | size) > 0xFFFF) && > >> + (count > SIZE_MAX / size)) { > >> + errno = EINVAL; > >> + fp->_flags |= __SERR; > >> + return (0); > >> + } > > 2) fp->_flags |= __SERR; > > This flag is for errors in the file stream, not for errors in > > the arguments. Please back that line out. > Quoting fread(3): > The function fread() does not distinguish between end-of-file and error, > and callers must use feof(3) and ferror(3) to determine which occurred. > This would seem to imply that for any failed request, either feof or ferror > should return a non-zero value. Removing this line would break the common > while (fread(ptr, reclen, 1, f) == 1) { > /* Do stuff here. */ > } > if (ferror(f)) { > /* Die due to read error */ > } > /* No error? Ok, we must have hit EOF */ > idiom. Agreed, this error should set the error indicator. > > 3) errno should be EOVERFLOW, see other owerflow checks in the stdio. > I picked EINVAL because this is the code used by read(2) and write(2) if they > are passed nbytes > INT_MAX. It would seem odd to use one error code for a > number of bytes between INT_MAX and SIZE_MAX and then switch to a different > error code for > SIZE_MAX bytes. I think the fact that you can only read(2)/write(2) INT_MAX at a time is a bug, so basing additional code on it seems inappropriate. Even then, fread()/fwrite() will not generate such large read(2)/write(2) requests as they always go through the buffer which is filled using smaller requests. Also, EOVERFLOW will give a more understandable error message for users. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 23:21:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A80F106566C; Sun, 10 Jan 2010 23:21:41 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 76A008FC12; Sun, 10 Jan 2010 23:21:40 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0ANLcKs048314; Mon, 11 Jan 2010 02:21:38 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263165698; bh=xwQWj0zqgZJ3YRlhbuxvZEFg58Cu+FeNGbNngIS5lXY=; l=844; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=I3N2BqolWHvKhTvH/3mvh+T648qZkeIclwsS7DvOesaPWnkCGJZ201rPa6a+yssZ+ T+vnvJscCkE3Xh+ODxFDb3e1kN/J2pFUzXDXwSZ0migFkgeGJe7UPJAf7Uzq94KTHd EHMQjNz3XTmDwFQI3bKRB7w3svcthYsnDS2MgyFU= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0ANLbDQ048313; Mon, 11 Jan 2010 02:21:38 +0300 (MSK) (envelope-from ache) Date: Mon, 11 Jan 2010 02:21:35 +0300 From: Andrey Chernov To: Jilles Tjoelker Message-ID: <20100110232134.GA48128@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Jilles Tjoelker , Colin Percival , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201001101430.o0AEUURS051917@svn.freebsd.org> <20100110212548.GA47331@nagual.pp.ru> <4B4A5252.9070205@freebsd.org> <20100110230618.GA6756@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100110230618.GA6756@stack.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival Subject: Re: svn commit: r201999 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 23:21:41 -0000 On Mon, Jan 11, 2010 at 12:06:18AM +0100, Jilles Tjoelker wrote: > > I picked EINVAL because this is the code used by read(2) and write(2) if they > > are passed nbytes > INT_MAX. It would seem odd to use one error code for a > > number of bytes between INT_MAX and SIZE_MAX and then switch to a different > > error code for > SIZE_MAX bytes. > > I think the fact that you can only read(2)/write(2) INT_MAX at a time is > a bug, so basing additional code on it seems inappropriate. > > Even then, fread()/fwrite() will not generate such large > read(2)/write(2) requests as they always go through the buffer which is > filled using smaller requests. > > Also, EOVERFLOW will give a more understandable error message for users. Agreed. F.e. POSIX limit for write(2) is {SSIZE_MAX}, not INT_MAX. -- http://ache.pp.ru/ From owner-svn-src-all@FreeBSD.ORG Sun Jan 10 23:51:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EB32106566C; Sun, 10 Jan 2010 23:51:03 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AB668FC0A; Sun, 10 Jan 2010 23:51:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ANp3Vt079564; Sun, 10 Jan 2010 23:51:03 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ANp2vJ079555; Sun, 10 Jan 2010 23:51:02 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001102351.o0ANp2vJ079555@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 10 Jan 2010 23:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202052 - in stable/8/sys: conf ia64/ia64 ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 23:51:03 -0000 Author: marcel Date: Sun Jan 10 23:51:02 2010 New Revision: 202052 URL: http://svn.freebsd.org/changeset/base/202052 Log: MFC rev 201269, 201373: o Revamp bus_space access functions (201269). o Change BUS_SPACE_MAXADDR from 2^32-1 to 2^64-1 (201373). Added: stable/8/sys/ia64/ia64/bus_machdep.c - copied unchanged from r201269, head/sys/ia64/ia64/bus_machdep.c Modified: stable/8/sys/conf/files.ia64 stable/8/sys/ia64/ia64/machdep.c stable/8/sys/ia64/ia64/mp_machdep.c stable/8/sys/ia64/ia64/nexus.c stable/8/sys/ia64/ia64/sys_machdep.c stable/8/sys/ia64/include/bus.h stable/8/sys/ia64/include/cpufunc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files.ia64 ============================================================================== --- stable/8/sys/conf/files.ia64 Sun Jan 10 23:37:04 2010 (r202051) +++ stable/8/sys/conf/files.ia64 Sun Jan 10 23:51:02 2010 (r202052) @@ -75,6 +75,7 @@ ia64/ia32/ia32_reg.c optional compat_ia ia64/ia32/ia32_signal.c optional compat_ia32 ia64/ia32/ia32_trap.c optional compat_ia32 ia64/ia64/autoconf.c standard +ia64/ia64/bus_machdep.c standard ia64/ia64/busdma_machdep.c standard ia64/ia64/clock.c standard ia64/ia64/context.S standard Copied: stable/8/sys/ia64/ia64/bus_machdep.c (from r201269, head/sys/ia64/ia64/bus_machdep.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/ia64/ia64/bus_machdep.c Sun Jan 10 23:51:02 2010 (r202052, copy of r201269, head/sys/ia64/ia64/bus_machdep.c) @@ -0,0 +1,356 @@ +/*- + * Copyright (c) 2009 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 + +extern u_long ia64_port_base; + +#define __PIO_ADDR(port) \ + (void *)(ia64_port_base | (((port) & 0xfffc) << 10) | ((port) & 0xFFF)) + +uint8_t +bus_space_read_io_1(u_long port) +{ + uint8_t v; + + ia64_mf(); + v = ia64_ld1(__PIO_ADDR(port)); + ia64_mf_a(); + ia64_mf(); + return (v); +} + +uint16_t +bus_space_read_io_2(u_long port) +{ + uint16_t v; + + ia64_mf(); + v = ia64_ld2(__PIO_ADDR(port)); + ia64_mf_a(); + ia64_mf(); + return (v); +} + +uint32_t +bus_space_read_io_4(u_long port) +{ + uint32_t v; + + ia64_mf(); + v = ia64_ld4(__PIO_ADDR(port)); + ia64_mf_a(); + ia64_mf(); + return (v); +} + +#if 0 +uint64_t +bus_space_read_io_8(u_long port) +{ +} +#endif + +void +bus_space_write_io_1(u_long port, uint8_t val) +{ + + ia64_mf(); + ia64_st1(__PIO_ADDR(port), val); + ia64_mf_a(); + ia64_mf(); +} + +void +bus_space_write_io_2(u_long port, uint16_t val) +{ + + ia64_mf(); + ia64_st2(__PIO_ADDR(port), val); + ia64_mf_a(); + ia64_mf(); +} + +void +bus_space_write_io_4(u_long port, uint32_t val) +{ + + ia64_mf(); + ia64_st4(__PIO_ADDR(port), val); + ia64_mf_a(); + ia64_mf(); +} + +#if 0 +void +bus_space_write_io_8(u_long port, uint64_t val) +{ +} +#endif + +void +bus_space_read_multi_io_1(u_long port, uint8_t *ptr, size_t count) +{ + + while (count-- > 0) + *ptr++ = bus_space_read_io_1(port); +} + +void +bus_space_read_multi_io_2(u_long port, uint16_t *ptr, size_t count) +{ + + while (count-- > 0) + *ptr++ = bus_space_read_io_2(port); +} + +void +bus_space_read_multi_io_4(u_long port, uint32_t *ptr, size_t count) +{ + + while (count-- > 0) + *ptr++ = bus_space_read_io_4(port); +} + +#if 0 +void +bus_space_read_multi_io_8(u_long port, uint64_t *ptr, size_t count) +{ +} +#endif + +void +bus_space_write_multi_io_1(u_long port, const uint8_t *ptr, size_t count) +{ + + while (count-- > 0) + bus_space_write_io_1(port, *ptr++); +} + +void +bus_space_write_multi_io_2(u_long port, const uint16_t *ptr, size_t count) +{ + + while (count-- > 0) + bus_space_write_io_2(port, *ptr++); +} + +void +bus_space_write_multi_io_4(u_long port, const uint32_t *ptr, size_t count) +{ + + while (count-- > 0) + bus_space_write_io_4(port, *ptr++); +} + +#if 0 +void +bus_space_write_multi_io_8(u_long port, const uint64_t *ptr, size_t count) +{ +} +#endif + +void +bus_space_read_region_io_1(u_long port, uint8_t *ptr, size_t count) +{ + + while (count-- > 0) { + *ptr++ = bus_space_read_io_1(port); + port += 1; + } +} + +void +bus_space_read_region_io_2(u_long port, uint16_t *ptr, size_t count) +{ + + while (count-- > 0) { + *ptr++ = bus_space_read_io_2(port); + port += 2; + } +} + +void +bus_space_read_region_io_4(u_long port, uint32_t *ptr, size_t count) +{ + + while (count-- > 0) { + *ptr++ = bus_space_read_io_4(port); + port += 4; + } +} + +#if 0 +void bus_space_read_region_io_8(u_long, uint64_t *, size_t); +#endif + +void +bus_space_write_region_io_1(u_long port, const uint8_t *ptr, size_t count) +{ + + while (count-- > 0) { + bus_space_write_io_1(port, *ptr++); + port += 1; + } +} + +void +bus_space_write_region_io_2(u_long port, const uint16_t *ptr, size_t count) +{ + + while (count-- > 0) { + bus_space_write_io_2(port, *ptr++); + port += 2; + } +} + +void +bus_space_write_region_io_4(u_long port, const uint32_t *ptr, size_t count) +{ + + while (count-- > 0) { + bus_space_write_io_4(port, *ptr++); + port += 4; + } +} + +#if 0 +void +bus_space_write_region_io_8(u_long port, const uint64_t *ptr, size_t count) +{ +} +#endif + +void +bus_space_set_region_io_1(u_long port, uint8_t val, size_t count) +{ + + while (count-- > 0) { + bus_space_write_io_1(port, val); + port += 1; + } +} + +void +bus_space_set_region_io_2(u_long port, uint16_t val, size_t count) +{ + + while (count-- > 0) { + bus_space_write_io_2(port, val); + port += 2; + } +} + +void +bus_space_set_region_io_4(u_long port, uint32_t val, size_t count) +{ + + while (count-- > 0) { + bus_space_write_io_4(port, val); + port += 4; + } +} + +#if 0 +void +bus_space_set_region_io_8(u_long port, uint64_t val, size_t count) +{ +} +#endif + +void +bus_space_copy_region_io_1(u_long src, u_long dst, size_t count) +{ + long delta; + uint8_t val; + + if (src < dst) { + src += count - 1; + dst += count - 1; + delta = -1; + } else + delta = 1; + + while (count-- > 0) { + val = bus_space_read_io_1(src); + bus_space_write_io_1(dst, val); + src += delta; + dst += delta; + } +} + +void +bus_space_copy_region_io_2(u_long src, u_long dst, size_t count) +{ + long delta; + uint16_t val; + + if (src < dst) { + src += 2 * (count - 1); + dst += 2 * (count - 1); + delta = -2; + } else + delta = 2; + + while (count-- > 0) { + val = bus_space_read_io_2(src); + bus_space_write_io_2(dst, val); + src += delta; + dst += delta; + } +} + +void +bus_space_copy_region_io_4(u_long src, u_long dst, size_t count) +{ + long delta; + uint32_t val; + + if (src < dst) { + src += 4 * (count - 1); + dst += 4 * (count - 1); + delta = -4; + } else + delta = 4; + + while (count-- > 0) { + val = bus_space_read_io_4(src); + bus_space_write_io_4(dst, val); + src += delta; + dst += delta; + } +} + +#if 0 +void +bus_space_copy_region_io_8(u_long src, u_long dst, size_t count) +{ +} +#endif Modified: stable/8/sys/ia64/ia64/machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/machdep.c Sun Jan 10 23:37:04 2010 (r202051) +++ stable/8/sys/ia64/ia64/machdep.c Sun Jan 10 23:51:02 2010 (r202052) @@ -930,16 +930,6 @@ ia64_init(void) return (ret); } -void * -ia64_ioport_address(u_int port) -{ - uint64_t addr; - - addr = (port > 0xffff) ? IA64_PHYS_TO_RR6((uint64_t)port) : - ia64_port_base | ((port & 0xfffc) << 10) | (port & 0xFFF); - return ((void *)addr); -} - uint64_t ia64_get_hcdp(void) { Modified: stable/8/sys/ia64/ia64/mp_machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/mp_machdep.c Sun Jan 10 23:37:04 2010 (r202051) +++ stable/8/sys/ia64/ia64/mp_machdep.c Sun Jan 10 23:51:02 2010 (r202052) @@ -366,7 +366,7 @@ ipi_send(struct pcpu *cpu, int ipi) volatile uint64_t *pipi; uint64_t vector; - pipi = __MEMIO_ADDR(ia64_lapic_address | + pipi = (void *)IA64_PHYS_TO_RR6(ia64_lapic_address | ((cpu->pc_md.lid & LID_SAPIC_MASK) >> 12)); vector = (uint64_t)(ipi_vector[ipi] & 0xff); KASSERT(vector != 0, ("IPI %d is not assigned a vector", ipi)); Modified: stable/8/sys/ia64/ia64/nexus.c ============================================================================== --- stable/8/sys/ia64/ia64/nexus.c Sun Jan 10 23:37:04 2010 (r202051) +++ stable/8/sys/ia64/ia64/nexus.c Sun Jan 10 23:51:02 2010 (r202052) @@ -389,26 +389,23 @@ nexus_alloc_resource(device_t bus, devic static int nexus_activate_resource(device_t bus, device_t child, int type, int rid, - struct resource *r) + struct resource *r) { - vm_paddr_t paddr, psize; + vm_paddr_t paddr; void *vaddr; - /* - * If this is a memory resource, map it into the kernel. - */ + paddr = rman_get_start(r); + switch (type) { case SYS_RES_IOPORT: rman_set_bustag(r, IA64_BUS_SPACE_IO); - rman_set_bushandle(r, rman_get_start(r)); + rman_set_bushandle(r, paddr); break; case SYS_RES_MEMORY: - paddr = rman_get_start(r); - psize = rman_get_size(r); - vaddr = pmap_mapdev(paddr, psize); - rman_set_virtual(r, vaddr); + vaddr = pmap_mapdev(paddr, rman_get_size(r)); rman_set_bustag(r, IA64_BUS_SPACE_MEM); - rman_set_bushandle(r, (bus_space_handle_t) paddr); + rman_set_bushandle(r, (bus_space_handle_t) vaddr); + rman_set_virtual(r, vaddr); break; } return (rman_activate_resource(r)); @@ -488,11 +485,27 @@ nexus_get_reslist(device_t dev, device_t } static int -nexus_set_resource(device_t dev, device_t child, int type, int rid, u_long start, u_long count) +nexus_set_resource(device_t dev, device_t child, int type, int rid, + u_long start, u_long count) { struct nexus_device *ndev = DEVTONX(child); struct resource_list *rl = &ndev->nx_resources; + if (type == SYS_RES_IOPORT && start > (0x10000 - count)) { + /* + * Work around a firmware bug in the HP rx2660, where in ACPI + * an I/O port is really a memory mapped I/O address. The bug + * is in the GAS that describes the address and in particular + * the SpaceId field. The field should not say the address is + * an I/O port when it is in fact an I/O memory address. + */ + if (bootverbose) + printf("%s: invalid port range (%#lx-%#lx); " + "assuming I/O memory range.\n", __func__, start, + start + count - 1); + type = SYS_RES_MEMORY; + } + /* XXX this should return a success/failure indicator */ resource_list_add(rl, type, rid, start, start + count - 1, count); return(0); Modified: stable/8/sys/ia64/ia64/sys_machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/sys_machdep.c Sun Jan 10 23:37:04 2010 (r202051) +++ stable/8/sys/ia64/ia64/sys_machdep.c Sun Jan 10 23:51:02 2010 (r202052) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: stable/8/sys/ia64/include/bus.h ============================================================================== --- stable/8/sys/ia64/include/bus.h Sun Jan 10 23:37:04 2010 (r202051) +++ stable/8/sys/ia64/include/bus.h Sun Jan 10 23:51:02 2010 (r202052) @@ -1,3 +1,29 @@ +/*- + * Copyright (c) 2009 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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. + */ + /* $NetBSD: bus.h,v 1.12 1997/10/01 08:25:15 fvdl Exp $ */ /*- @@ -76,38 +102,49 @@ #include /* + * I/O port reads with ia32 semantics. + */ +#define inb bus_space_read_io_1 +#define inw bus_space_read_io_2 +#define inl bus_space_read_io_4 + +#define outb bus_space_write_io_1 +#define outw bus_space_write_io_2 +#define outl bus_space_write_io_4 + +/* * Values for the ia64 bus space tag, not to be used directly by MI code. */ #define IA64_BUS_SPACE_IO 0 /* space is i/o space */ #define IA64_BUS_SPACE_MEM 1 /* space is mem space */ +#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ +#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ + #define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF #define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF #define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFF #define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF #define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXADDR 0xFFFFFFFF +#define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFF #define BUS_SPACE_UNRESTRICTED (~0) + /* * Map a region of device bus space into CPU virtual address space. */ - -static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr, - bus_size_t size, int flags, - bus_space_handle_t *bshp); - static __inline int -bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr, - bus_size_t size __unused, int flags __unused, - bus_space_handle_t *bshp) +bus_space_map(bus_space_tag_t bst, bus_addr_t addr, bus_size_t size __unused, + int flags __unused, bus_space_handle_t *bshp) { - *bshp = addr; + *bshp = (__predict_false(bst == IA64_BUS_SPACE_IO)) + ? addr : IA64_PHYS_TO_RR6(addr); return (0); } + /* * Unmap a region of device bus space. */ @@ -123,7 +160,7 @@ bus_space_unmap(bus_space_tag_t bst __un */ static __inline int bus_space_subregion(bus_space_tag_t bst, bus_space_handle_t bsh, - bus_size_t ofs, bus_size_t size, bus_space_handle_t *nbshp) + bus_size_t ofs, bus_size_t size __unused, bus_space_handle_t *nbshp) { *nbshp = bsh + ofs; return (0); @@ -149,12 +186,9 @@ bus_space_free(bus_space_tag_t bst, bus_ /* * Bus read/write barrier method. */ -#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ -#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ - static __inline void -bus_space_barrier(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, - bus_size_t size, int flags) +bus_space_barrier(bus_space_tag_t bst __unused, bus_space_handle_t bsh __unused, + bus_size_t ofs __unused, bus_size_t size __unused, int flags __unused) { ia64_mf_a(); ia64_mf(); @@ -166,40 +200,53 @@ bus_space_barrier(bus_space_tag_t bst, b * tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The * data is returned. */ +uint8_t bus_space_read_io_1(u_long); +uint16_t bus_space_read_io_2(u_long); +uint32_t bus_space_read_io_4(u_long); +uint64_t bus_space_read_io_8(u_long); + static __inline uint8_t bus_space_read_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs) { - uint8_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - return (ia64_ld1(bsp)); + uint8_t val; + + val = (__predict_false(bst == IA64_BUS_SPACE_IO)) + ? bus_space_read_io_1(bsh + ofs) + : ia64_ld1((void *)(bsh + ofs)); + return (val); } static __inline uint16_t bus_space_read_2(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs) { - uint16_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - return (ia64_ld2(bsp)); + uint16_t val; + + val = (__predict_false(bst == IA64_BUS_SPACE_IO)) + ? bus_space_read_io_2(bsh + ofs) + : ia64_ld2((void *)(bsh + ofs)); + return (val); } static __inline uint32_t bus_space_read_4(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs) { - uint32_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - return (ia64_ld4(bsp)); + uint32_t val; + + val = (__predict_false(bst == IA64_BUS_SPACE_IO)) + ? bus_space_read_io_4(bsh + ofs) + : ia64_ld4((void *)(bsh + ofs)); + return (val); } static __inline uint64_t bus_space_read_8(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs) { - uint64_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - return (ia64_ld8(bsp)); + uint64_t val; + + val = (__predict_false(bst == IA64_BUS_SPACE_IO)) + ? bus_space_read_io_8(bsh + ofs) + : ia64_ld8((void *)(bsh + ofs)); + return (val); } @@ -208,44 +255,53 @@ bus_space_read_8(bus_space_tag_t bst, bu * tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The * data is passed by value. */ +void bus_space_write_io_1(u_long, uint8_t); +void bus_space_write_io_2(u_long, uint16_t); +void bus_space_write_io_4(u_long, uint32_t); +void bus_space_write_io_8(u_long, uint64_t); + static __inline void bus_space_write_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint8_t val) { - uint8_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - ia64_st1(bsp, val); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_write_io_1(bsh + ofs, val); + else + ia64_st1((void *)(bsh + ofs), val); } static __inline void bus_space_write_2(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint16_t val) { - uint16_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - ia64_st2(bsp, val); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_write_io_2(bsh + ofs, val); + else + ia64_st2((void *)(bsh + ofs), val); } static __inline void bus_space_write_4(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint32_t val) { - uint32_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - ia64_st4(bsp, val); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_write_io_4(bsh + ofs, val); + else + ia64_st4((void *)(bsh + ofs), val); } static __inline void bus_space_write_8(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint64_t val) { - uint64_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - ia64_st8(bsp, val); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_write_io_8(bsh + ofs, val); + else + ia64_st8((void *)(bsh + ofs), val); } @@ -254,48 +310,61 @@ bus_space_write_8(bus_space_tag_t bst, b * ofs tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The * data is returned in the buffer passed by reference. */ +void bus_space_read_multi_io_1(u_long, uint8_t *, size_t); +void bus_space_read_multi_io_2(u_long, uint16_t *, size_t); +void bus_space_read_multi_io_4(u_long, uint32_t *, size_t); +void bus_space_read_multi_io_8(u_long, uint64_t *, size_t); + static __inline void bus_space_read_multi_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint8_t *bufp, size_t count) { - uint8_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - while (count-- > 0) - *bufp++ = ia64_ld1(bsp); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_read_multi_io_1(bsh + ofs, bufp, count); + else { + while (count-- > 0) + *bufp++ = ia64_ld1((void *)(bsh + ofs)); + } } static __inline void bus_space_read_multi_2(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint16_t *bufp, size_t count) { - uint16_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - while (count-- > 0) - *bufp++ = ia64_ld2(bsp); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_read_multi_io_2(bsh + ofs, bufp, count); + else { + while (count-- > 0) + *bufp++ = ia64_ld2((void *)(bsh + ofs)); + } } static __inline void bus_space_read_multi_4(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint32_t *bufp, size_t count) { - uint32_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - while (count-- > 0) - *bufp++ = ia64_ld4(bsp); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_read_multi_io_4(bsh + ofs, bufp, count); + else { + while (count-- > 0) + *bufp++ = ia64_ld4((void *)(bsh + ofs)); + } } static __inline void bus_space_read_multi_8(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint64_t *bufp, size_t count) { - uint64_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - while (count-- > 0) - *bufp++ = ia64_ld8(bsp); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_read_multi_io_8(bsh + ofs, bufp, count); + else { + while (count-- > 0) + *bufp++ = ia64_ld8((void *)(bsh + ofs)); + } } @@ -304,48 +373,61 @@ bus_space_read_multi_8(bus_space_tag_t b * ofs tuple. A unit of data can be 1 byte, 2 bytes, 4 bytes or 8 bytes. The * data is read from the buffer passed by reference. */ +void bus_space_write_multi_io_1(u_long, const uint8_t *, size_t); +void bus_space_write_multi_io_2(u_long, const uint16_t *, size_t); +void bus_space_write_multi_io_4(u_long, const uint32_t *, size_t); +void bus_space_write_multi_io_8(u_long, const uint64_t *, size_t); + static __inline void bus_space_write_multi_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, const uint8_t *bufp, size_t count) { - uint8_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - while (count-- > 0) - ia64_st1(bsp, *bufp++); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_write_multi_io_1(bsh + ofs, bufp, count); + else { + while (count-- > 0) + ia64_st1((void *)(bsh + ofs), *bufp++); + } } static __inline void bus_space_write_multi_2(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, const uint16_t *bufp, size_t count) { - uint16_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - while (count-- > 0) - ia64_st2(bsp, *bufp++); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_write_multi_io_2(bsh + ofs, bufp, count); + else { + while (count-- > 0) + ia64_st2((void *)(bsh + ofs), *bufp++); + } } static __inline void bus_space_write_multi_4(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, const uint32_t *bufp, size_t count) { - uint32_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - while (count-- > 0) - ia64_st4(bsp, *bufp++); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_write_multi_io_4(bsh + ofs, bufp, count); + else { + while (count-- > 0) + ia64_st4((void *)(bsh + ofs), *bufp++); + } } static __inline void bus_space_write_multi_8(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, const uint64_t *bufp, size_t count) { - uint64_t *bsp; - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - while (count-- > 0) - ia64_st8(bsp, *bufp++); + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_write_multi_io_8(bsh + ofs, bufp, count); + else { + while (count-- > 0) + ia64_st8((void *)(bsh + ofs), *bufp++); + } } @@ -355,16 +437,22 @@ bus_space_write_multi_8(bus_space_tag_t * data is written to the buffer passed by reference and read from successive * bus space addresses. Access is unordered. */ +void bus_space_read_region_io_1(u_long, uint8_t *, size_t); +void bus_space_read_region_io_2(u_long, uint16_t *, size_t); +void bus_space_read_region_io_4(u_long, uint32_t *, size_t); +void bus_space_read_region_io_8(u_long, uint64_t *, size_t); + static __inline void bus_space_read_region_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint8_t *bufp, size_t count) { - uint8_t *bsp; - while (count-- > 0) { - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - *bufp++ = ia64_ld1(bsp); - ofs += 1; + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_read_region_io_1(bsh + ofs, bufp, count); + else { + uint8_t *bsp = (void *)(bsh + ofs); + while (count-- > 0) + *bufp++ = ia64_ld1(bsp++); } } @@ -372,12 +460,13 @@ static __inline void bus_space_read_region_2(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint16_t *bufp, size_t count) { - uint16_t *bsp; - while (count-- > 0) { - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - *bufp++ = ia64_ld2(bsp); - ofs += 2; + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_read_region_io_2(bsh + ofs, bufp, count); + else { + uint16_t *bsp = (void *)(bsh + ofs); + while (count-- > 0) + *bufp++ = ia64_ld2(bsp++); } } @@ -385,12 +474,13 @@ static __inline void bus_space_read_region_4(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint32_t *bufp, size_t count) { - uint32_t *bsp; - while (count-- > 0) { - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - *bufp++ = ia64_ld4(bsp); - ofs += 4; + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_read_region_io_4(bsh + ofs, bufp, count); + else { + uint32_t *bsp = (void *)(bsh + ofs); + while (count-- > 0) + *bufp++ = ia64_ld4(bsp++); } } @@ -398,12 +488,13 @@ static __inline void bus_space_read_region_8(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, uint64_t *bufp, size_t count) { - uint64_t *bsp; - while (count-- > 0) { - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : - __MEMIO_ADDR(bsh + ofs); - *bufp++ = ia64_ld8(bsp); - ofs += 8; + + if (__predict_false(bst == IA64_BUS_SPACE_IO)) + bus_space_read_region_io_8(bsh + ofs, bufp, count); + else { + uint64_t *bsp = (void *)(bsh + ofs); + while (count-- > 0) + *bufp++ = ia64_ld8(bsp++); } } @@ -414,16 +505,22 @@ bus_space_read_region_8(bus_space_tag_t * data is read from the buffer passed by reference and written to successive * bus space addresses. Access is unordered. */ +void bus_space_write_region_io_1(u_long, const uint8_t *, size_t); +void bus_space_write_region_io_2(u_long, const uint16_t *, size_t); +void bus_space_write_region_io_4(u_long, const uint32_t *, size_t); +void bus_space_write_region_io_8(u_long, const uint64_t *, size_t); + static __inline void bus_space_write_region_1(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t ofs, const uint8_t *bufp, size_t count) { - uint8_t *bsp; - while (count-- > 0) { - bsp = (bst == IA64_BUS_SPACE_IO) ? __PIO_ADDR(bsh + ofs) : *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 00:18:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C1C8106566B; Mon, 11 Jan 2010 00:18:41 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42B928FC0A; Mon, 11 Jan 2010 00:18:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B0Ifam086274; Mon, 11 Jan 2010 00:18:41 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B0IfGr086271; Mon, 11 Jan 2010 00:18:41 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001110018.o0B0IfGr086271@svn.freebsd.org> From: Andrew Thompson Date: Mon, 11 Jan 2010 00:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202054 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 00:18:41 -0000 Author: thompsa Date: Mon Jan 11 00:18:40 2010 New Revision: 202054 URL: http://svn.freebsd.org/changeset/base/202054 Log: Add the Globetrotter GE40x. Submitted by: Mike Tancsa Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Mon Jan 11 00:11:16 2010 (r202053) +++ head/sys/dev/usb/serial/u3g.c Mon Jan 11 00:18:40 2010 (r202054) @@ -316,6 +316,7 @@ static const struct usb_device_id u3g_de U3G_DEV(OPTION, E7041, 0), U3G_DEV(OPTION, E7061, 0), U3G_DEV(OPTION, E7100, 0), + U3G_DEV(OPTION, GE40X, 0), U3G_DEV(OPTION, GT3G, 0), U3G_DEV(OPTION, GT3GPLUS, 0), U3G_DEV(OPTION, GT3GQUAD, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Jan 11 00:11:16 2010 (r202053) +++ head/sys/dev/usb/usbdevs Mon Jan 11 00:18:40 2010 (r202054) @@ -2099,6 +2099,7 @@ product OPTION E7041 0x7041 3G modem product OPTION E7061 0x7061 3G modem product OPTION E7100 0x7100 3G modem product OPTION GTM380 0x7201 3G modem +product OPTION GE40X 0x7601 Globetrotter HSUPA /* OQO */ product OQO WIFI01 0x0002 model 01 WiFi interface From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 00:40:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 071101065672; Mon, 11 Jan 2010 00:40:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E99F68FC0C; Mon, 11 Jan 2010 00:40:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B0eJwS091554; Mon, 11 Jan 2010 00:40:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B0eJ2c091552; Mon, 11 Jan 2010 00:40:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001110040.o0B0eJ2c091552@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 00:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202056 - in head/sys/dev/siba: . siba X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 00:40:20 -0000 Author: imp Date: Mon Jan 11 00:40:19 2010 New Revision: 202056 URL: http://svn.freebsd.org/changeset/base/202056 Log: Move this to the right location. Grump. Added: - copied unchanged from r202055, head/sys/dev/siba/siba/siba_cc.c Directory Properties: head/sys/dev/siba/siba_cc.c (props changed) Deleted: head/sys/dev/siba/siba/siba_cc.c Copied: head/sys/dev/siba/siba_cc.c (from r202055, head/sys/dev/siba/siba/siba_cc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/siba/siba_cc.c Mon Jan 11 00:40:19 2010 (r202056, copy of r202055, head/sys/dev/siba/siba/siba_cc.c) @@ -0,0 +1,154 @@ +/*- + * Copyright (c) 2007 Bruce M. Simpson. + * 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. + */ + +/* + * Child driver for ChipCommon core. + * This is not MI code at the moment. + * Two 16C550 compatible UARTs live here. On the WGT634U, uart1 is the + * system console, and uart0 is not pinned out. + * Because their presence is conditional, they should probably + * be attached from here. + * GPIO lives here. + * The hardware watchdog lives here. + * Clock control registers live here. + * You don't need to read them to determine the clock speed on the 5365, + * which is always 200MHz and thus may be hardcoded (for now). + * Flash config registers live here. There may or may not be system flash. + * The external interface bus lives here (conditionally). + * There is a JTAG interface here which may be used to attach probes to + * the SoC for debugging. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +static int siba_cc_attach(device_t); +static int siba_cc_probe(device_t); +static void siba_cc_intr(void *v); + +static int +siba_cc_probe(device_t dev) +{ + + if (siba_get_vendor(dev) == SIBA_VID_BROADCOM && + siba_get_device(dev) == SIBA_DEVID_CHIPCOMMON) { + device_set_desc(dev, "ChipCommon core"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +struct siba_cc_softc { + void *notused; +}; + +static int +siba_cc_attach(device_t dev) +{ + //struct siba_cc_softc *sc = device_get_softc(dev); + struct resource *mem; + struct resource *irq; + int rid; + + /* + * Allocate the resources which the parent bus has already + * determined for us. + * TODO: interrupt routing + */ +#define MIPS_MEM_RID 0x20 + rid = MIPS_MEM_RID; + mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (mem == NULL) { + device_printf(dev, "unable to allocate memory\n"); + return (ENXIO); + } + + rid = 0; + irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, 0); + if (irq == NULL) { + device_printf(dev, "unable to allocate irq\n"); + return (ENXIO); + } + + /* now setup the interrupt */ + /* may be fast, exclusive or mpsafe at a later date */ + + /* + * XXX is this interrupt line in ChipCommon used for anything + * other than the uart? in that case we shouldn't hog it ourselves + * and let uart claim it to avoid polled mode. + */ + int err; + void *cookie; + err = bus_setup_intr(dev, irq, INTR_TYPE_TTY, NULL, siba_cc_intr, NULL, + &cookie); + if (err != 0) { + device_printf(dev, "unable to setup intr\n"); + return (ENXIO); + } + + /* TODO: attach uart child */ + + return (0); +} + +static void +siba_cc_intr(void *v) +{ + +} + +static device_method_t siba_cc_methods[] = { + /* Device interface */ + DEVMETHOD(device_attach, siba_cc_attach), + DEVMETHOD(device_probe, siba_cc_probe), + + {0, 0}, +}; + +static driver_t siba_cc_driver = { + "siba_cc", + siba_cc_methods, + sizeof(struct siba_softc), +}; +static devclass_t siba_cc_devclass; + +DRIVER_MODULE(siba_cc, siba, siba_cc_driver, siba_cc_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 00:41:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 017B5106566B; Mon, 11 Jan 2010 00:41:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC1498FC0C; Mon, 11 Jan 2010 00:41:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B0fEA5091794; Mon, 11 Jan 2010 00:41:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B0fEUK091793; Mon, 11 Jan 2010 00:41:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001110041.o0B0fEUK091793@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 00:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202057 - head/sys/dev/siba/siba X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 00:41:15 -0000 Author: imp Date: Mon Jan 11 00:41:14 2010 New Revision: 202057 URL: http://svn.freebsd.org/changeset/base/202057 Log: This was somehow copied to the wrong place :(. Remove the spare copy. Deleted: head/sys/dev/siba/siba/ From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 02:16:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DD601065692 for ; Mon, 11 Jan 2010 02:16:33 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 12BC08FC1E for ; Mon, 11 Jan 2010 02:16:33 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-066-024-221.pools.arcor-ip.net [88.66.24.221]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MY28S-1NPsTf3rRg-00UuA8; Mon, 11 Jan 2010 03:16:32 +0100 Received: (qmail 52355 invoked from network); 11 Jan 2010 02:16:31 -0000 Received: from f8x64.laiers.local (192.168.4.188) by laiers.local with SMTP; 11 Jan 2010 02:16:31 -0000 From: Max Laier Organization: FreeBSD To: David Schultz Date: Mon, 11 Jan 2010 03:16:29 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-RELEASE; KDE/4.3.4; amd64; ; ) References: <200910041943.n94JhaDg083487@svn.freebsd.org> In-Reply-To: <200910041943.n94JhaDg083487@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201001110316.29816.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1/hgVnFg0r0RIbI6VYADb6UAvpj26CGvZhScW8 Bt0C4z5klYfjKvYEcDGZQD+6SYmMt8cS0uuUemjth0jNjQFnbZ PbthwsDTQTv3RMxbwo1Cw== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r197752 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 02:16:33 -0000 On Sunday 04 October 2009 21:43:36 David Schultz wrote: > Author: das > Date: Sun Oct 4 19:43:36 2009 > New Revision: 197752 > URL: http://svn.freebsd.org/changeset/base/197752 > > Log: > Better glibc compatibility for getline/getdelim: > > - Tolerate applications that pass a NULL pointer for the buffer and > claim that the capacity of the buffer is nonzero. > > - If an application passes in a non-NULL buffer pointer and claims the > buffer has zero capacity, we should free (well, realloc) it > anyway. It could have been obtained from malloc(0), so failing to > free it would be a small memory leak. > > MFC After: 2 weeks > Reported by: naddy > PR: ports/138320 > > Modified: > head/lib/libc/stdio/getdelim.c > > Modified: head/lib/libc/stdio/getdelim.c > =========================================================================== > === --- head/lib/libc/stdio/getdelim.c Sun Oct 4 19:03:32 2009 (r197751) > +++ head/lib/libc/stdio/getdelim.c Sun Oct 4 19:43:36 2009 (r197752) @@ > -120,8 +120,8 @@ getdelim(char ** __restrict linep, size_ > goto error; > } > > - if (*linecapp == 0) > - *linep = NULL; > + if (*linep == NULL) > + *linecapp = 0; > > if (fp->_r <= 0 && __srefill(fp)) { > /* If fp is at EOF already, we just need space for the NUL. */ I think we should have kept the original if case here, as well. Otherwise something like this might fail: char *line; /* note uninitialized */ size_t len = 0; getline(&line, &len, fd); and I think it is a reasonable thing to pass in an uninitialized pointer if you tell that there is no space associated with it, yet. I don't know if there are many (ab)uses of getline like this, but I was just bitten by it. -- Max From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 02:31:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE5BC1065670; Mon, 11 Jan 2010 02:31:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8F2D8FC12; Mon, 11 Jan 2010 02:31:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B2V0Oe019541; Mon, 11 Jan 2010 02:31:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B2V0Bm019533; Mon, 11 Jan 2010 02:31:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001110231.o0B2V0Bm019533@svn.freebsd.org> From: Xin LI Date: Mon, 11 Jan 2010 02:31:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202059 - in stable/8: cddl/contrib/opensolaris/cmd/zpool sys/cddl/boot/zfs sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opens... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 02:31:00 -0000 Author: delphij Date: Mon Jan 11 02:31:00 2010 New Revision: 202059 URL: http://svn.freebsd.org/changeset/base/202059 Log: MFC r201143: Apply OpenSolaris revision 8021:b8fe9660eb2d which brings our zpool to version 14, making it possible for zpools created on OpenSolaris 2009.06 be used on FreeBSD. PR: kern/141800 Submitted by: mm Reviewed by: pjd, trasz Obtained from: OpenSolaris onnv-gate Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/8/sys/cddl/boot/zfs/zfsimpl.h stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Jan 11 00:51:25 2010 (r202058) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Jan 11 02:31:00 2010 (r202059) @@ -3488,6 +3488,8 @@ zpool_do_upgrade(int argc, char **argv) (void) printf(gettext(" 11 Improved scrub performance\n")); (void) printf(gettext(" 12 Snapshot properties\n")); (void) printf(gettext(" 13 snapused property\n")); + (void) printf(gettext(" 14 passthrough-x aclinherit " + "support\n")); (void) printf(gettext("For more information on a particular " "version, including supported releases, see:\n\n")); (void) printf("http://www.opensolaris.org/os/community/zfs/" Modified: stable/8/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- stable/8/sys/cddl/boot/zfs/zfsimpl.h Mon Jan 11 00:51:25 2010 (r202058) +++ stable/8/sys/cddl/boot/zfs/zfsimpl.h Mon Jan 11 02:31:00 2010 (r202059) @@ -479,13 +479,14 @@ typedef enum { #define SPA_VERSION_11 11ULL #define SPA_VERSION_12 12ULL #define SPA_VERSION_13 13ULL +#define SPA_VERSION_14 14ULL /* * When bumping up SPA_VERSION, make sure GRUB ZFS understand the on-disk * format change. Go to usr/src/grub/grub-0.95/stage2/{zfs-include/, fsys_zfs*}, * and do the appropriate changes. */ -#define SPA_VERSION SPA_VERSION_13 -#define SPA_VERSION_STRING "13" +#define SPA_VERSION SPA_VERSION_14 +#define SPA_VERSION_STRING "14" /* * Symbolic names for the changes that caused a SPA_VERSION switch. @@ -520,6 +521,7 @@ typedef enum { #define SPA_VERSION_DSL_SCRUB SPA_VERSION_11 #define SPA_VERSION_SNAP_PROPS SPA_VERSION_12 #define SPA_VERSION_USED_BREAKDOWN SPA_VERSION_13 +#define SPA_VERSION_PASSTHROUGH_X SPA_VERSION_14 /* * The following are configuration names used in the nvlist describing a pool's Modified: stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Mon Jan 11 00:51:25 2010 (r202058) +++ stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Mon Jan 11 02:31:00 2010 (r202059) @@ -97,6 +97,7 @@ zfs_prop_init(void) { "restricted", ZFS_ACL_RESTRICTED }, { "passthrough", ZFS_ACL_PASSTHROUGH }, { "secure", ZFS_ACL_RESTRICTED }, /* bkwrd compatability */ + { "passthrough-x", ZFS_ACL_PASSTHROUGH_X }, { NULL } }; @@ -173,7 +174,7 @@ zfs_prop_init(void) "discard | groupmask | passthrough", "ACLMODE", acl_mode_table); register_index(ZFS_PROP_ACLINHERIT, "aclinherit", ZFS_ACL_RESTRICTED, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, - "discard | noallow | restricted | passthrough", + "discard | noallow | restricted | passthrough | passthrough-x", "ACLINHERIT", acl_inherit_table); register_index(ZFS_PROP_COPIES, "copies", 1, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h Mon Jan 11 00:51:25 2010 (r202058) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h Mon Jan 11 02:31:00 2010 (r202059) @@ -26,8 +26,6 @@ #ifndef _SYS_FS_ZFS_ACL_H #define _SYS_FS_ZFS_ACL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef _KERNEL #include #endif @@ -180,6 +178,7 @@ typedef struct zfs_acl { #define ZFS_ACL_GROUPMASK 2 #define ZFS_ACL_PASSTHROUGH 3 #define ZFS_ACL_RESTRICTED 4 +#define ZFS_ACL_PASSTHROUGH_X 5 struct znode; struct zfsvfs; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Mon Jan 11 00:51:25 2010 (r202058) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Mon Jan 11 02:31:00 2010 (r202059) @@ -1663,7 +1663,8 @@ zfs_ace_can_use(znode_t *zp, uint16_t ac * inherit inheritable ACEs from parent */ static zfs_acl_t * -zfs_acl_inherit(znode_t *zp, zfs_acl_t *paclp, boolean_t *need_chmod) +zfs_acl_inherit(znode_t *zp, zfs_acl_t *paclp, uint64_t mode, + boolean_t *need_chmod) { zfsvfs_t *zfsvfs = zp->z_zfsvfs; void *pacep; @@ -1676,112 +1677,123 @@ zfs_acl_inherit(znode_t *zp, zfs_acl_t * size_t ace_size; void *data1, *data2; size_t data1sz, data2sz; - enum vtype vntype = ZTOV(zp)->v_type; + boolean_t vdir = ZTOV(zp)->v_type == VDIR; + boolean_t vreg = ZTOV(zp)->v_type == VREG; + boolean_t passthrough, passthrough_x, noallow; + + passthrough_x = + zfsvfs->z_acl_inherit == ZFS_ACL_PASSTHROUGH_X; + passthrough = passthrough_x || + zfsvfs->z_acl_inherit == ZFS_ACL_PASSTHROUGH; + noallow = + zfsvfs->z_acl_inherit == ZFS_ACL_NOALLOW; *need_chmod = B_TRUE; pacep = NULL; aclp = zfs_acl_alloc(paclp->z_version); - if (zfsvfs->z_acl_inherit != ZFS_ACL_DISCARD) { - while (pacep = zfs_acl_next_ace(paclp, pacep, &who, - &access_mask, &iflags, &type)) { + if (zfsvfs->z_acl_inherit == ZFS_ACL_DISCARD) + return (aclp); + while (pacep = zfs_acl_next_ace(paclp, pacep, &who, + &access_mask, &iflags, &type)) { - /* - * don't inherit bogus ACEs - */ - if (!zfs_acl_valid_ace_type(type, iflags)) - continue; + /* + * don't inherit bogus ACEs + */ + if (!zfs_acl_valid_ace_type(type, iflags)) + continue; - if (zfsvfs->z_acl_inherit == ZFS_ACL_NOALLOW && - type == ALLOW) - continue; + if (noallow && type == ALLOW) + continue; - ace_size = aclp->z_ops.ace_size(pacep); + ace_size = aclp->z_ops.ace_size(pacep); - if (!zfs_ace_can_use(zp, iflags)) - continue; + if (!zfs_ace_can_use(zp, iflags)) + continue; - /* - * If owner@, group@, or everyone@ inheritable - * then zfs_acl_chmod() isn't needed. - */ - if (zfsvfs->z_acl_inherit == - ZFS_ACL_PASSTHROUGH && - ((iflags & (ACE_OWNER|ACE_EVERYONE)) || - ((iflags & OWNING_GROUP) == - OWNING_GROUP)) && (vntype == VREG || - (vntype == VDIR && - (iflags & ACE_DIRECTORY_INHERIT_ACE)))) - *need_chmod = B_FALSE; - - aclnode = zfs_acl_node_alloc(ace_size); - list_insert_tail(&aclp->z_acl, aclnode); - acep = aclnode->z_acldata; - zfs_set_ace(aclp, acep, access_mask, type, - who, iflags|ACE_INHERITED_ACE); + /* + * If owner@, group@, or everyone@ inheritable + * then zfs_acl_chmod() isn't needed. + */ + if (passthrough && + ((iflags & (ACE_OWNER|ACE_EVERYONE)) || + ((iflags & OWNING_GROUP) == + OWNING_GROUP)) && (vreg || (vdir && (iflags & + ACE_DIRECTORY_INHERIT_ACE)))) { + *need_chmod = B_FALSE; + + if (!vdir && passthrough_x && + ((mode & (S_IXUSR | S_IXGRP | S_IXOTH)) == 0)) { + access_mask &= ~ACE_EXECUTE; + } + } + + aclnode = zfs_acl_node_alloc(ace_size); + list_insert_tail(&aclp->z_acl, aclnode); + acep = aclnode->z_acldata; + + zfs_set_ace(aclp, acep, access_mask, type, + who, iflags|ACE_INHERITED_ACE); + + /* + * Copy special opaque data if any + */ + if ((data1sz = paclp->z_ops.ace_data(pacep, &data1)) != 0) { + VERIFY((data2sz = aclp->z_ops.ace_data(acep, + &data2)) == data1sz); + bcopy(data1, data2, data2sz); + } + aclp->z_acl_count++; + aclnode->z_ace_count++; + aclp->z_acl_bytes += aclnode->z_size; + newflags = aclp->z_ops.ace_flags_get(acep); + + if (vdir) + aclp->z_hints |= ZFS_INHERIT_ACE; + + if ((iflags & ACE_NO_PROPAGATE_INHERIT_ACE) || !vdir) { + newflags &= ~ALL_INHERIT; + aclp->z_ops.ace_flags_set(acep, + newflags|ACE_INHERITED_ACE); + zfs_restricted_update(zfsvfs, aclp, acep); + continue; + } + + ASSERT(vdir); + + newflags = aclp->z_ops.ace_flags_get(acep); + if ((iflags & (ACE_FILE_INHERIT_ACE | + ACE_DIRECTORY_INHERIT_ACE)) != + ACE_FILE_INHERIT_ACE) { + aclnode2 = zfs_acl_node_alloc(ace_size); + list_insert_tail(&aclp->z_acl, aclnode2); + acep2 = aclnode2->z_acldata; + zfs_set_ace(aclp, acep2, + access_mask, type, who, + iflags|ACE_INHERITED_ACE); + newflags |= ACE_INHERIT_ONLY_ACE; + aclp->z_ops.ace_flags_set(acep, newflags); + newflags &= ~ALL_INHERIT; + aclp->z_ops.ace_flags_set(acep2, + newflags|ACE_INHERITED_ACE); /* * Copy special opaque data if any */ - if ((data1sz = paclp->z_ops.ace_data(pacep, + if ((data1sz = aclp->z_ops.ace_data(acep, &data1)) != 0) { - VERIFY((data2sz = aclp->z_ops.ace_data(acep, + VERIFY((data2sz = + aclp->z_ops.ace_data(acep2, &data2)) == data1sz); - bcopy(data1, data2, data2sz); + bcopy(data1, data2, data1sz); } aclp->z_acl_count++; - aclnode->z_ace_count++; + aclnode2->z_ace_count++; aclp->z_acl_bytes += aclnode->z_size; - newflags = aclp->z_ops.ace_flags_get(acep); - - if (vntype == VDIR) - aclp->z_hints |= ZFS_INHERIT_ACE; - - if ((iflags & ACE_NO_PROPAGATE_INHERIT_ACE) || - (vntype != VDIR)) { - newflags &= ~ALL_INHERIT; - aclp->z_ops.ace_flags_set(acep, - newflags|ACE_INHERITED_ACE); - zfs_restricted_update(zfsvfs, aclp, acep); - continue; - } - - ASSERT(vntype == VDIR); - - newflags = aclp->z_ops.ace_flags_get(acep); - if ((iflags & (ACE_FILE_INHERIT_ACE | - ACE_DIRECTORY_INHERIT_ACE)) != - ACE_FILE_INHERIT_ACE) { - aclnode2 = zfs_acl_node_alloc(ace_size); - list_insert_tail(&aclp->z_acl, aclnode2); - acep2 = aclnode2->z_acldata; - zfs_set_ace(aclp, acep2, - access_mask, type, who, - iflags|ACE_INHERITED_ACE); - newflags |= ACE_INHERIT_ONLY_ACE; - aclp->z_ops.ace_flags_set(acep, newflags); - newflags &= ~ALL_INHERIT; - aclp->z_ops.ace_flags_set(acep2, - newflags|ACE_INHERITED_ACE); - - /* - * Copy special opaque data if any - */ - if ((data1sz = aclp->z_ops.ace_data(acep, - &data1)) != 0) { - VERIFY((data2sz = - aclp->z_ops.ace_data(acep2, - &data2)) == data1sz); - bcopy(data1, data2, data1sz); - } - aclp->z_acl_count++; - aclnode2->z_ace_count++; - aclp->z_acl_bytes += aclnode->z_size; - zfs_restricted_update(zfsvfs, aclp, acep2); - } else { - newflags |= ACE_INHERIT_ONLY_ACE; - aclp->z_ops.ace_flags_set(acep, - newflags|ACE_INHERITED_ACE); - } + zfs_restricted_update(zfsvfs, aclp, acep2); + } else { + newflags |= ACE_INHERIT_ONLY_ACE; + aclp->z_ops.ace_flags_set(acep, + newflags|ACE_INHERITED_ACE); } } return (aclp); @@ -1876,7 +1888,7 @@ zfs_perm_init(znode_t *zp, znode_t *pare mutex_enter(&parent->z_acl_lock); VERIFY(0 == zfs_acl_node_read(parent, &paclp, B_FALSE)); mutex_exit(&parent->z_acl_lock); - aclp = zfs_acl_inherit(zp, paclp, &need_chmod); + aclp = zfs_acl_inherit(zp, paclp, mode, &need_chmod); zfs_acl_free(paclp); } else { aclp = zfs_acl_alloc(zfs_acl_version_zp(zp)); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Jan 11 00:51:25 2010 (r202058) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Jan 11 02:31:00 2010 (r202059) @@ -1491,6 +1491,14 @@ zfs_set_prop_nvlist(const char *name, nv if (zpl_earlier_version(name, ZPL_VERSION_FUID)) return (ENOTSUP); break; + + case ZFS_PROP_ACLINHERIT: + if (nvpair_type(elem) == DATA_TYPE_UINT64 && + nvpair_value_uint64(elem, &intval) == 0) + if (intval == ZFS_ACL_PASSTHROUGH_X && + zfs_earlier_version(name, + SPA_VERSION_PASSTHROUGH_X)) + return (ENOTSUP); } } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Mon Jan 11 00:51:25 2010 (r202058) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Mon Jan 11 02:31:00 2010 (r202059) @@ -253,13 +253,14 @@ typedef enum zfs_cache_type { #define SPA_VERSION_11 11ULL #define SPA_VERSION_12 12ULL #define SPA_VERSION_13 13ULL +#define SPA_VERSION_14 14ULL /* * When bumping up SPA_VERSION, make sure GRUB ZFS understands the on-disk * format change. Go to usr/src/grub/grub-0.95/stage2/{zfs-include/, fsys_zfs*}, * and do the appropriate changes. */ -#define SPA_VERSION SPA_VERSION_13 -#define SPA_VERSION_STRING "13" +#define SPA_VERSION SPA_VERSION_14 +#define SPA_VERSION_STRING "14" /* * Symbolic names for the changes that caused a SPA_VERSION switch. @@ -294,6 +295,7 @@ typedef enum zfs_cache_type { #define SPA_VERSION_DSL_SCRUB SPA_VERSION_11 #define SPA_VERSION_SNAP_PROPS SPA_VERSION_12 #define SPA_VERSION_USED_BREAKDOWN SPA_VERSION_13 +#define SPA_VERSION_PASSTHROUGH_X SPA_VERSION_14 /* * ZPL version - rev'd whenever an incompatible on-disk format change From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 03:00:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BFB21065670; Mon, 11 Jan 2010 03:00:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A8F48FC14; Mon, 11 Jan 2010 03:00:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B30HC6026693; Mon, 11 Jan 2010 03:00:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B30Hrl026688; Mon, 11 Jan 2010 03:00:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001110300.o0B30Hrl026688@svn.freebsd.org> From: Xin LI Date: Mon, 11 Jan 2010 03:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202060 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 03:00:17 -0000 Author: delphij Date: Mon Jan 11 03:00:17 2010 New Revision: 202060 URL: http://svn.freebsd.org/changeset/base/202060 Log: Add a new option, -q howmany, which when used in conjuction with -w, exits netstat after _howmany_ outputs. Requested by: thomasa Reviewed by: freebsd-net (bms, old version in early 2007) MFC after: 1 month Modified: head/usr.bin/netstat/if.c head/usr.bin/netstat/main.c head/usr.bin/netstat/netstat.1 head/usr.bin/netstat/netstat.h Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Mon Jan 11 02:31:00 2010 (r202059) +++ head/usr.bin/netstat/if.c Mon Jan 11 03:00:17 2010 (r202060) @@ -679,6 +679,8 @@ loop: if (!first) putchar('\n'); fflush(stdout); + if ((noutputs != 0) && (--noutputs == 0)) + exit(0); oldmask = sigblock(sigmask(SIGALRM)); while (!signalled) sigpause(0); Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Mon Jan 11 02:31:00 2010 (r202059) +++ head/usr.bin/netstat/main.c Mon Jan 11 03:00:17 2010 (r202060) @@ -334,6 +334,7 @@ int hflag; /* show counters in human re int iflag; /* show interfaces */ int Lflag; /* show size of listen queues */ int mflag; /* show memory stats */ +int noutputs = 0; /* how much outputs before we exit */ int numeric_addr; /* show addresses numerically */ int numeric_port; /* show ports numerically */ static int pflag; /* show given protocol */ @@ -359,7 +360,7 @@ main(int argc, char *argv[]) af = AF_UNSPEC; - while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:rSsuWw:xz")) != -1) + while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:q:rSsuWw:xz")) != -1) switch(ch) { case 'A': Aflag = 1; @@ -445,6 +446,11 @@ main(int argc, char *argv[]) } pflag = 1; break; + case 'q': + noutputs = atoi(optarg); + if (noutputs != 0) + noutputs++; + break; case 'r': rflag = 1; break; @@ -779,7 +785,7 @@ usage(void) " [-M core] [-N system]", " netstat -i | -I interface [-abdhnW] [-f address_family]\n" " [-M core] [-N system]", -" netstat -w wait [-I interface] [-d] [-M core] [-N system]", +" netstat -w wait [-I interface] [-d] [-M core] [-N system] [-q howmany]", " netstat -s [-s] [-z] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -i | -I interface -s [-f protocol_family | -p protocol]\n" Modified: head/usr.bin/netstat/netstat.1 ============================================================================== --- head/usr.bin/netstat/netstat.1 Mon Jan 11 02:31:00 2010 (r202059) +++ head/usr.bin/netstat/netstat.1 Mon Jan 11 03:00:17 2010 (r202060) @@ -32,7 +32,7 @@ .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd July 9, 2009 +.Dd January 10, 2010 .Dt NETSTAT 1 .Os .Sh NAME @@ -133,6 +133,7 @@ is also present, print interface names u .Op Fl d .Op Fl M Ar core .Op Fl N Ar system +.Op Fl q Ar howmany .Ek .Xc At intervals of @@ -143,6 +144,11 @@ traffic on all configured network interf or a single .Ar interface . If +.Fl q +is also present, exit after +.Ar howmany +outputs. +If .Fl d is also present, show the number of dropped packets. .It Xo Modified: head/usr.bin/netstat/netstat.h ============================================================================== --- head/usr.bin/netstat/netstat.h Mon Jan 11 02:31:00 2010 (r202059) +++ head/usr.bin/netstat/netstat.h Mon Jan 11 03:00:17 2010 (r202060) @@ -45,6 +45,7 @@ extern int hflag; /* show counters in hu extern int iflag; /* show interfaces */ extern int Lflag; /* show size of listen queues */ extern int mflag; /* show memory stats */ +extern int noutputs; /* how much outputs before we exit */ extern int numeric_addr; /* show addresses numerically */ extern int numeric_port; /* show ports numerically */ extern int rflag; /* show routing tables (or routing stats) */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 03:03:54 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6DE71065670; Mon, 11 Jan 2010 03:03:54 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 81FD58FC0A; Mon, 11 Jan 2010 03:03:54 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id BD769A563EF; Mon, 11 Jan 2010 11:03:52 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id 0AtsvO5RSG+S; Mon, 11 Jan 2010 11:03:38 +0800 (CST) Received: from delta.delphij.net (c-69-181-136-105.hsd1.ca.comcast.net [69.181.136.105]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id BAC5CA563C2; Mon, 11 Jan 2010 11:03:36 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=VI67KHstWw4xmagTb95NJO65MyEQTm1/6wHvlXn+dsIPumKO4+wN5MHJcNQ11u0SZ QsT4MoVfob/8tfjlz/l2Q== Message-ID: <4B4A94FF.2070000@delphij.net> Date: Sun, 10 Jan 2010 19:03:27 -0800 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.5) Gecko/20091220 Thunderbird/3.0 ThunderBrowse/3.2.6.8 MIME-Version: 1.0 To: Xin LI References: <201001110231.o0B2V0Bm019533@svn.freebsd.org> In-Reply-To: <201001110231.o0B2V0Bm019533@svn.freebsd.org> X-Enigmail-Version: 1.0 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, svn-src-stable-8@FreeBSD.ORG Subject: Re: svn commit: r202059 - in stable/8: cddl/contrib/opensolaris/cmd/zpool sys/cddl/boot/zfs sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opens... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 03:03:55 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010/01/10 18:31, Xin LI wrote: > Author: delphij > Date: Mon Jan 11 02:31:00 2010 > New Revision: 202059 > URL: http://svn.freebsd.org/changeset/base/202059 > > Log: > MFC r201143: > > Apply OpenSolaris revision 8021:b8fe9660eb2d which brings our zpool > to version 14, making it possible for zpools created on OpenSolaris > 2009.06 be used on FreeBSD. Oh my... This should be 8053:271f44d3de11. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLSpT/AAoJEATO+BI/yjfBUEYH/0RbeYvoAaJJCWj9tDQjGsFf BNnZVkYTF9D2FjdUvSMF5xTGjVP1P9Tu9jfHjZUAw0LlVv03u7FtPEhuS1lPTQzz y82MpsqfJnzgGlqivP5BHOOcVMSzRR2vRxq3Ay4dHl5XGxq7pNK9w+49roTTjGeB fA6Gyhp6QGpDl/lnpydb+0oXL0ojEQcCfUgHQEAwGW3iW72igB3yhVw3PTzdRur4 11ifeu4C89WPVvSQhqw1AdQEmnZSuQ0LdF+5qBi7piKMmkU2I9szTqFgyUpBoT54 do8LkIvvHwSfclLaUusa8QdnHSFqB2lLzT4uzbMQQ4EKvXbanflR28XPeOw+TRg= =p+ve -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 03:29:07 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34073106568B; Mon, 11 Jan 2010 03:29:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id C02FE8FC14; Mon, 11 Jan 2010 03:29:06 +0000 (UTC) Received: from besplex.bde.org (c211-30-173-23.carlnfd1.nsw.optusnet.com.au [211.30.173.23]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0B3T3TY014278 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Jan 2010 14:29:04 +1100 Date: Mon, 11 Jan 2010 14:29:03 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Colin Percival In-Reply-To: <4B4A5252.9070205@freebsd.org> Message-ID: <20100111134429.F1302@besplex.bde.org> References: <201001101430.o0AEUURS051917@svn.freebsd.org> <20100110212548.GA47331@nagual.pp.ru> <4B4A5252.9070205@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, Andrey Chernov , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r201999 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 03:29:07 -0000 On Sun, 10 Jan 2010, Colin Percival wrote: > Andrey Chernov wrote: >> On Sun, Jan 10, 2010 at 02:30:30PM +0000, Colin Percival wrote: > ... >> 2) fp->_flags |= __SERR; >> This flag is for errors in the file stream, not for errors in >> the arguments. Please back that line out. I agree. > Quoting fread(3): > The function fread() does not distinguish between end-of-file and error, > and callers must use feof(3) and ferror(3) to determine which occurred. > This would seem to imply that for any failed request, either feof or ferror > should return a non-zero value. Removing this line would break the common It would seem to mean a physical i/o error. > while (fread(ptr, reclen, 1, f) == 1) { > /* Do stuff here. */ > } > if (ferror(f)) { > /* Die due to read error */ > } > /* No error? Ok, we must have hit EOF */ > idiom. Hmm. This case doesn't overflow (reclen * 1 == reclen :-). fread() could be finessed by returning a short read (of 1 with no error) for the silly case. Then only buggy code that doesn't understand short reads would fail. fwrite() hopefully knows that any write of 0 records is an error. But how about the folling from C99 (old draft n869.txt): %%% [#3] The fwrite function returns the number of elements successfully written, which will be less than nmemb only if a write error is encountered. %%% This doesn't allow any error if there was no write error, and again a write error would seem to mean a physical one (if it meant any error it would have said "a fwrite error"). This is unimplementable (except by not returning when nmemb is more than possible). >> 3) errno should be EOVERFLOW, see other owerflow checks in the stdio. There are none. I (we?) intentionally didn't set errno when the correct infinite-precision result would overflow in the printf family. C99 applications wouldn't know to check errno, and buggy ones might be surprised by unexpected (though permitted) clobbering of errno. POSIX didn't have EOVERFLOW when printf was fixed in FreeBSD, and no one has changed printf to set it, and this change risks breaking C99 applications. > I picked EINVAL because this is the code used by read(2) and write(2) if they > are passed nbytes > INT_MAX. It would seem odd to use one error code for a > number of bytes between INT_MAX and SIZE_MAX and then switch to a different > error code for > SIZE_MAX bytes. A bug in FreeBSD read and write (the result is implementation defined, but this misbehaviour isn't a result, so it probably isn't allowed when SSIZE_T == INT_MAX, and it certainly isn't defined when SSIZE_T > INT_MAX (64-bit arches). calloc() has the same overflow bug, if any. Standards seem to require fread and calloc to work even if the multiplication would occur, though they cannot work in most cases where the multiplication would occur, even if the overflow is avoided. Hmm, fread and fwrite can work, though calloc cannot: - fread: when the multiplication would overflow, reduce nmemb to the maximum that prevents overflow. Any more would give an invalid object size. Let the read proceed. If the file is smaller than the actual object size, then the fread will work, the same as if nmemb was reasonable to begin with. Otherwise, undefined behaviour occurs when the buffer overruns, the same as if nmemb is just 1 too large to begin with. There is no reason to guard against overrun for the silly case when it is impossible to guard against overrun for a common off-by-1 case. - fwrite: when the multiplication would overflow, the result of an infinitely precise multiplication is an invalid object size. Writing that many is sure to overrun the buffer. The behaviour is undefined. Reasonable behaviour is an i/o error with EFAULT, just like would happen for attempting to write beyond the end of the buffer, if you are lucky enough for the overrun to reach a page boundary and the next page is unmapped. You might also get SIGSEGV if the buffer is accessed in userland. - calloc: like fwrite. The object size is invalid so the behaviour is undefined. Could EFAULT/SIGSEGV or just return NULL. I sent private mail about parts of this and more. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 03:43:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D0BB106566C; Mon, 11 Jan 2010 03:43:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0237E8FC08; Mon, 11 Jan 2010 03:43:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B3hIdc037557; Mon, 11 Jan 2010 03:43:18 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B3hIq7037555; Mon, 11 Jan 2010 03:43:18 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001110343.o0B3hIq7037555@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 03:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202061 - head/sys/dev/cfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 03:43:19 -0000 Author: imp Date: Mon Jan 11 03:43:18 2010 New Revision: 202061 URL: http://svn.freebsd.org/changeset/base/202061 Log: Merge from projects/mips to head by hand: copy over cfe_env.c... Added: - copied unchanged from r202060, projects/mips/sys/dev/cfe/cfe_env.c Directory Properties: head/sys/dev/cfe/cfe_env.c (props changed) Copied: head/sys/dev/cfe/cfe_env.c (from r202060, projects/mips/sys/dev/cfe/cfe_env.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cfe/cfe_env.c Mon Jan 11 03:43:18 2010 (r202061, copy of r202060, projects/mips/sys/dev/cfe/cfe_env.c) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2009 Neelkanth Natu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include + +#include + +__FBSDID("$FreeBSD$"); + +#ifndef CFE_ENV_SIZE +#define CFE_ENV_SIZE PAGE_SIZE /* default is one page */ +#endif + +extern void cfe_env_init(void); + +static char cfe_env_buf[CFE_ENV_SIZE]; + +void +cfe_env_init(void) +{ + int idx, len; + char name[64], val[128], *cp, *cplim; + + cp = cfe_env_buf; + cplim = cp + CFE_ENV_SIZE; + + idx = 0; + while (1) { + if (cfe_enumenv(idx, name, sizeof(name), val, sizeof(val)) != 0) + break; + + if (bootverbose) + printf("Importing CFE env: \"%s=%s\"\n", name, val); + + /* + * name=val\0\0 + */ + len = strlen(name) + 1 + strlen(val) + 1 + 1; + if (cplim - cp < len) + printf("No space to store CFE env: \"%s=%s\"\n", + name, val); + else + cp += sprintf(cp, "%s=%s", name, val) + 1; + ++idx; + } + *cp++ = '\0'; + + kern_envp = cfe_env_buf; +} From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 03:50:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B4A71065692 for ; Mon, 11 Jan 2010 03:50:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 553E68FC1A for ; Mon, 11 Jan 2010 03:49:59 +0000 (UTC) Received: (qmail 25308 invoked by uid 399); 11 Jan 2010 03:49:58 -0000 Received: from localhost (HELO freefall.freebsd.org) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 11 Jan 2010 03:49:58 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Date: Mon, 11 Jan 2010 03:49:57 +0000 (UTC) From: Doug Barton To: Warner Losh In-Reply-To: <201001101744.o0AHiM2d095302@svn.freebsd.org> Message-ID: References: <201001101744.o0AHiM2d095302@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: Outlook -- Not just for spreading viruses anymore! X-OpenPGP-Key-ID: 0xD5B2F0FB Organization: http://www.FreeBSD.org/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202019 - in head/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 03:50:00 -0000 On Sun, 10 Jan 2010, Warner Losh wrote: > Author: imp > Date: Sun Jan 10 17:44:22 2010 > New Revision: 202019 > URL: http://svn.freebsd.org/changeset/base/202019 > > Log: > Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. Thanks for doing this, however the comment about how to include the whole file (including the comments) were not included. Do I need to do this part of it myself? No problem if so, I just want to be sure to get it done in time to MFC it before the freeze for 7.3-release. Doug From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 04:07:53 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2919106566B; Mon, 11 Jan 2010 04:07:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 71DF18FC15; Mon, 11 Jan 2010 04:07:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0B41Cna047204; Sun, 10 Jan 2010 21:01:12 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 10 Jan 2010 21:02:04 -0700 (MST) Message-Id: <20100110.210204.787670930858346133.imp@bsdimp.com> To: dougb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: References: <201001101744.o0AHiM2d095302@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202019 - in head/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 04:07:53 -0000 In message: Doug Barton writes: : On Sun, 10 Jan 2010, Warner Losh wrote: : : > Author: imp : > Date: Sun Jan 10 17:44:22 2010 : > New Revision: 202019 : > URL: http://svn.freebsd.org/changeset/base/202019 : > : > Log: : > Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. : : Thanks for doing this, however the comment about how to include the : whole file (including the comments) were not included. Do I need to do : this part of it myself? No problem if so, I just want to be sure to : get it done in time to MFC it before the freeze for 7.3-release. In general, we don't put big comments like that in the config files, preferring to leave them to NOTES. I was just following that convention... Warner From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 04:13:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6F861065670; Mon, 11 Jan 2010 04:13:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5FCE8FC19; Mon, 11 Jan 2010 04:13:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B4D6iG044795; Mon, 11 Jan 2010 04:13:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B4D6vW044793; Mon, 11 Jan 2010 04:13:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001110413.o0B4D6vW044793@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 04:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202062 - head/sys/dev/ic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 04:13:06 -0000 Author: imp Date: Mon Jan 11 04:13:06 2010 New Revision: 202062 URL: http://svn.freebsd.org/changeset/base/202062 Log: Merge from projects/mips to head by hand: Defintions for cavium uart (do they belong here?) Modified: head/sys/dev/ic/ns16550.h Modified: head/sys/dev/ic/ns16550.h ============================================================================== --- head/sys/dev/ic/ns16550.h Mon Jan 11 03:43:18 2010 (r202061) +++ head/sys/dev/ic/ns16550.h Mon Jan 11 04:13:06 2010 (r202062) @@ -52,6 +52,7 @@ #define REG_IIR com_iir #define IIR_IMASK 0xf #define IIR_RXTOUT 0xc +#define IIR_BUSY 0x7 #define IIR_RLS 0x6 #define IIR_RXRDY 0x4 #define IIR_TXRDY 0x2 @@ -181,6 +182,10 @@ #define com_xoff1 6 /* XOFF 1 character (R/W) */ #define com_xoff2 7 /* XOFF 2 character (R/W) */ +#define com_usr 39 /* Octeon 16750/16550 Uart Status Reg */ +#define REG_USR com_usr +#define USR_TXFIFO_NOTFULL 2 /* Uart TX FIFO Not full */ + /* 16950 register #1. Access enabled by ACR[7]. Also requires !LCR[7]. */ #define com_asr 1 /* additional status register (R[0-7]/W[0-1]) */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 04:29:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05C8A106566C; Mon, 11 Jan 2010 04:29:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E669F8FC08; Mon, 11 Jan 2010 04:29:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B4TQYD048938; Mon, 11 Jan 2010 04:29:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B4TQ6Z048924; Mon, 11 Jan 2010 04:29:26 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001110429.o0B4TQ6Z048924@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 04:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202063 - in head/sys/mips/cavium: . dev/rgmii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 04:29:27 -0000 Author: imp Date: Mon Jan 11 04:29:26 2010 New Revision: 202063 URL: http://svn.freebsd.org/changeset/base/202063 Log: Cope with the move and if_timer going way. Modified: head/sys/mips/cavium/dev/rgmii/octeon_fau.c head/sys/mips/cavium/dev/rgmii/octeon_fpa.c head/sys/mips/cavium/dev/rgmii/octeon_ipd.c head/sys/mips/cavium/dev/rgmii/octeon_pko.c head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c head/sys/mips/cavium/files.octeon1 (contents, props changed) head/sys/mips/cavium/obio.c head/sys/mips/cavium/octeon_ebt3000_cf.c head/sys/mips/cavium/octeon_machdep.c head/sys/mips/cavium/std.octeon1 (contents, props changed) head/sys/mips/cavium/uart_bus_octeonusart.c head/sys/mips/cavium/uart_cpu_octeonusart.c head/sys/mips/cavium/uart_dev_oct16550.c Modified: head/sys/mips/cavium/dev/rgmii/octeon_fau.c ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_fau.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/dev/rgmii/octeon_fau.c Mon Jan 11 04:29:26 2010 (r202063) @@ -4,10 +4,13 @@ *------------------------------------------------------------------ */ +#include +__FBSDID("$FreeBSD$"); + #include #include -#include +#include #include "octeon_fau.h" /* Modified: head/sys/mips/cavium/dev/rgmii/octeon_fpa.c ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_fpa.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/dev/rgmii/octeon_fpa.c Mon Jan 11 04:29:26 2010 (r202063) @@ -4,6 +4,9 @@ *------------------------------------------------------------------ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -11,7 +14,7 @@ #include -#include +#include #include "octeon_fpa.h" Modified: head/sys/mips/cavium/dev/rgmii/octeon_ipd.c ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_ipd.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/dev/rgmii/octeon_ipd.c Mon Jan 11 04:29:26 2010 (r202063) @@ -4,10 +4,13 @@ *------------------------------------------------------------------ */ +#include +__FBSDID("$FreeBSD$"); + #include #include -#include +#include #include "octeon_ipd.h" /* Modified: head/sys/mips/cavium/dev/rgmii/octeon_pko.c ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_pko.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/dev/rgmii/octeon_pko.c Mon Jan 11 04:29:26 2010 (r202063) @@ -4,12 +4,15 @@ *------------------------------------------------------------------ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include #include -#include +#include #include "octeon_fau.h" #include "octeon_fpa.h" #include "octeon_pko.h" Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c Mon Jan 11 04:29:26 2010 (r202063) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "octeon_fau.h" #include "octeon_fpa.h" @@ -1058,7 +1058,6 @@ static void octeon_rgmx_xmit_mark_buffer * Reset output active flag and watchdog timer. */ sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - sc->ifp->if_timer = 0; } @@ -1574,7 +1573,6 @@ static void octeon_rgmx_stop (struct rgm /* Reset transmitter variables and interface flags. */ sc->ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - sc->ifp->if_timer = 0; sc->txb_count = 0; sc->txb_sched = 0; } Modified: head/sys/mips/cavium/files.octeon1 ============================================================================== --- head/sys/mips/cavium/files.octeon1 Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/files.octeon1 Mon Jan 11 04:29:26 2010 (r202063) @@ -2,16 +2,16 @@ # Octeon Support Files # mips/mips/mp_machdep.c optional smp -mips/octeon1/dev/rgmii/octeon_fau.c optional rgmii -mips/octeon1/dev/rgmii/octeon_fpa.c optional rgmii -mips/octeon1/dev/rgmii/octeon_ipd.c optional rgmii -mips/octeon1/dev/rgmii/octeon_pko.c optional rgmii -mips/octeon1/dev/rgmii/octeon_rgmx.c optional rgmii -mips/octeon1/obio.c optional uart -mips/octeon1/octeon_ebt3000_cf.c optional cf -mips/octeon1/octeon_machdep.c standard -mips/octeon1/uart_bus_octeonusart.c optional uart -mips/octeon1/uart_cpu_octeonusart.c optional uart -mips/octeon1/uart_dev_oct16550.c optional uart +mips/cavium/dev/rgmii/octeon_fau.c optional rgmii +mips/cavium/dev/rgmii/octeon_fpa.c optional rgmii +mips/cavium/dev/rgmii/octeon_ipd.c optional rgmii +mips/cavium/dev/rgmii/octeon_pko.c optional rgmii +mips/cavium/dev/rgmii/octeon_rgmx.c optional rgmii +mips/cavium/obio.c optional uart +mips/cavium/octeon_ebt3000_cf.c optional cf +mips/cavium/octeon_machdep.c standard +mips/cavium/uart_bus_octeonusart.c optional uart +mips/cavium/uart_cpu_octeonusart.c optional uart +mips/cavium/uart_dev_oct16550.c optional uart mips/mips/intr_machdep.c standard mips/mips/tick.c standard Modified: head/sys/mips/cavium/obio.c ============================================================================== --- head/sys/mips/cavium/obio.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/obio.c Mon Jan 11 04:29:26 2010 (r202063) @@ -53,8 +53,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include int obio_probe(device_t); int obio_attach(device_t); Modified: head/sys/mips/cavium/octeon_ebt3000_cf.c ============================================================================== --- head/sys/mips/cavium/octeon_ebt3000_cf.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/octeon_ebt3000_cf.c Mon Jan 11 04:29:26 2010 (r202063) @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$"); #include "octeon_ebt3000_cf.h" #include "driveid.h" -#include +#include /* ATA Commands */ #define CMD_READ_SECTOR 0x20 Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/octeon_machdep.c Mon Jan 11 04:29:26 2010 (r202063) @@ -60,8 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include +#include +#include #include #include #include Modified: head/sys/mips/cavium/std.octeon1 ============================================================================== --- head/sys/mips/cavium/std.octeon1 Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/std.octeon1 Mon Jan 11 04:29:26 2010 (r202063) @@ -4,7 +4,7 @@ # */ # $FreeBSD$ # -files "../octeon1/files.octeon1" +files "../cavium/files.octeon1" # # Modified: head/sys/mips/cavium/uart_bus_octeonusart.c ============================================================================== --- head/sys/mips/cavium/uart_bus_octeonusart.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/uart_bus_octeonusart.c Mon Jan 11 04:29:26 2010 (r202063) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); /* * XXXMIPS: */ -#include +#include #include "uart_if.h" Modified: head/sys/mips/cavium/uart_cpu_octeonusart.c ============================================================================== --- head/sys/mips/cavium/uart_cpu_octeonusart.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/uart_cpu_octeonusart.c Mon Jan 11 04:29:26 2010 (r202063) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include +#include bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; Modified: head/sys/mips/cavium/uart_dev_oct16550.c ============================================================================== --- head/sys/mips/cavium/uart_dev_oct16550.c Mon Jan 11 04:13:06 2010 (r202062) +++ head/sys/mips/cavium/uart_dev_oct16550.c Mon Jan 11 04:29:26 2010 (r202063) @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include "uart_if.h" From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 04:38:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0C96106566B; Mon, 11 Jan 2010 04:38:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF4AE8FC16; Mon, 11 Jan 2010 04:38:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B4cbLF051176; Mon, 11 Jan 2010 04:38:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B4cbRE051174; Mon, 11 Jan 2010 04:38:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001110438.o0B4cbRE051174@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 04:38:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202064 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 04:38:38 -0000 Author: imp Date: Mon Jan 11 04:38:37 2010 New Revision: 202064 URL: http://svn.freebsd.org/changeset/base/202064 Log: Cope with the octeon1->cavium move. Note: none of this junk belongs here. Modified: head/sys/mips/mips/bus_space_generic.c (contents, props changed) Modified: head/sys/mips/mips/bus_space_generic.c ============================================================================== --- head/sys/mips/mips/bus_space_generic.c Mon Jan 11 04:29:26 2010 (r202063) +++ head/sys/mips/mips/bus_space_generic.c Mon Jan 11 04:38:37 2010 (r202064) @@ -199,7 +199,7 @@ static struct bus_space generic_space = /* Ultra-gross kludge */ #include "opt_cputype.h" #if defined(TARGET_OCTEON) && defined(ISA_MIPS32) -#include +#include #define rd8(a) oct_read8(a) #define rd16(a) oct_read16(a) #define rd32(a) oct_read32(a) From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 04:40:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B172106568B; Mon, 11 Jan 2010 04:40:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A1018FC14; Mon, 11 Jan 2010 04:40:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B4ecjc051767; Mon, 11 Jan 2010 04:40:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B4ecAV051764; Mon, 11 Jan 2010 04:40:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001110440.o0B4ecAV051764@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 04:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202065 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 04:40:38 -0000 Author: imp Date: Mon Jan 11 04:40:38 2010 New Revision: 202065 URL: http://svn.freebsd.org/changeset/base/202065 Log: Cope with the octeon1->cavium move. Modified: head/sys/mips/conf/OCTEON1 (contents, props changed) head/sys/mips/conf/OCTEON1-32 (contents, props changed) Directory Properties: head/sys/mips/conf/OCTEON1.hints (props changed) Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Mon Jan 11 04:38:37 2010 (r202064) +++ head/sys/mips/conf/OCTEON1 Mon Jan 11 04:40:38 2010 (r202065) @@ -31,7 +31,7 @@ makeoptions TARGET_64BIT=defined makeoptions KERNLOADADDR=0xffffffff80100000 options KERNVIRTADDR=0xffffffff80100000 -include "../octeon1/std.octeon1" +include "../cavium/std.octeon1" hints "OCTEON1.hints" #Default places to look for devices. Modified: head/sys/mips/conf/OCTEON1-32 ============================================================================== --- head/sys/mips/conf/OCTEON1-32 Mon Jan 11 04:38:37 2010 (r202064) +++ head/sys/mips/conf/OCTEON1-32 Mon Jan 11 04:40:38 2010 (r202065) @@ -32,7 +32,7 @@ makeoptions LDSCRIPT_NAME=ldscript.m options KERNVIRTADDR=0x80100000 makeoptions KERNLOADADDR=0x80100000 -include "../octeon1/std.octeon1" +include "../cavium/std.octeon1" hints "OCTEON1.hints" #Default places to look for devices. From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 04:49:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17CC4106566C; Mon, 11 Jan 2010 04:49:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 058FB8FC13; Mon, 11 Jan 2010 04:49:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B4niAZ054083; Mon, 11 Jan 2010 04:49:44 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B4nimU054076; Mon, 11 Jan 2010 04:49:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001110449.o0B4nimU054076@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 04:49:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202066 - in head/sys/mips/rmi: . dev/sec dev/xlr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 04:49:45 -0000 Author: imp Date: Mon Jan 11 04:49:44 2010 New Revision: 202066 URL: http://svn.freebsd.org/changeset/base/202066 Log: Attempt to cope with the dev/rmi -> mips/rmi/dev move. Modified: head/sys/mips/rmi/dev/sec/rmilib.c (contents, props changed) head/sys/mips/rmi/dev/sec/rmilib.h (contents, props changed) head/sys/mips/rmi/dev/sec/rmisec.c (contents, props changed) head/sys/mips/rmi/dev/xlr/rge.c (contents, props changed) head/sys/mips/rmi/files.xlr (contents, props changed) head/sys/mips/rmi/iodi.c (contents, props changed) Directory Properties: head/sys/mips/rmi/Makefile.msgring (props changed) head/sys/mips/rmi/board.c (props changed) head/sys/mips/rmi/board.h (props changed) head/sys/mips/rmi/bus_space_rmi.c (props changed) head/sys/mips/rmi/clock.c (props changed) head/sys/mips/rmi/clock.h (props changed) head/sys/mips/rmi/debug.h (props changed) head/sys/mips/rmi/dev/sec/desc.h (props changed) head/sys/mips/rmi/dev/sec/stats.h (props changed) head/sys/mips/rmi/dev/xlr/atx_cpld.h (props changed) head/sys/mips/rmi/dev/xlr/rge.h (props changed) head/sys/mips/rmi/dev/xlr/xgmac_mdio.h (props changed) Modified: head/sys/mips/rmi/dev/sec/rmilib.c ============================================================================== --- head/sys/mips/rmi/dev/sec/rmilib.c Mon Jan 11 04:40:38 2010 (r202065) +++ head/sys/mips/rmi/dev/sec/rmilib.c Mon Jan 11 04:49:44 2010 (r202066) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * RMI_BSD */ + * RMI_BSD + */ #include +__FBSDID("$FreeBSD$"); #include #include @@ -54,8 +56,8 @@ #include #include #include -#include -#include +#include +#include // static int msgrng_stnid_pk0 = MSGRNG_STNID_PK0; Modified: head/sys/mips/rmi/dev/sec/rmilib.h ============================================================================== --- head/sys/mips/rmi/dev/sec/rmilib.h Mon Jan 11 04:40:38 2010 (r202065) +++ head/sys/mips/rmi/dev/sec/rmilib.h Mon Jan 11 04:49:44 2010 (r202066) @@ -26,12 +26,16 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * RMI_BSD */ + * RMI_BSD + */ #ifndef _RMILIB_H_ #define _RMILIB_H_ -#include +#include +__FBSDID("$FreeBSD$"); + +#include #include /*#define XLR_SEC_CMD_DEBUG*/ Modified: head/sys/mips/rmi/dev/sec/rmisec.c ============================================================================== --- head/sys/mips/rmi/dev/sec/rmisec.c Mon Jan 11 04:40:38 2010 (r202065) +++ head/sys/mips/rmi/dev/sec/rmisec.c Mon Jan 11 04:49:44 2010 (r202066) @@ -26,8 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * RMI_BSD */ + * RMI_BSD + */ +#include +__FBSDID("$FreeBSD$"); #include #include @@ -52,7 +55,7 @@ #include #include -#include +#include /*#define RMI_SEC_DEBUG */ Modified: head/sys/mips/rmi/dev/xlr/rge.c ============================================================================== --- head/sys/mips/rmi/dev/xlr/rge.c Mon Jan 11 04:40:38 2010 (r202065) +++ head/sys/mips/rmi/dev/xlr/rge.c Mon Jan 11 04:49:44 2010 (r202066) @@ -26,7 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * RMI_BSD */ + * RMI_BSD + */ + +#include +__FBSDID("$FreeBSD$"); #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -90,10 +94,8 @@ #include #include -#include -#include - - +#include +#include #include #include Modified: head/sys/mips/rmi/files.xlr ============================================================================== --- head/sys/mips/rmi/files.xlr Mon Jan 11 04:40:38 2010 (r202065) +++ head/sys/mips/rmi/files.xlr Mon Jan 11 04:49:44 2010 (r202066) @@ -17,10 +17,10 @@ mips/rmi/perfmon_percpu.c optional xlr #mips/rmi/pcibus.c optional pci #mips/rmi/xlr_pci.c optional pci #mips/rmi/xls_ehci.c optional usb ehci -dev/rmi/xlr/rge.c optional rge mips/rmi/bus_space_rmi.c standard +mips/rmi/dev/sec/rmisec.c optional rmisec +mips/rmi/dev/sec/rmilib.c optional rmisec +mips/rmi/dev/xlr/rge.c optional rge dev/iicbus/xlr_rtc.c optional xlr_rtc dev/iicbus/xlr_temperature.c optional xlr_temperature dev/iicbus/xlr_eeprom.c optional xlr_eeprom -dev/rmi/sec/rmisec.c optional rmisec -dev/rmi/sec/rmilib.c optional rmisec Modified: head/sys/mips/rmi/iodi.c ============================================================================== --- head/sys/mips/rmi/iodi.c Mon Jan 11 04:40:38 2010 (r202065) +++ head/sys/mips/rmi/iodi.c Mon Jan 11 04:49:44 2010 (r202066) @@ -26,7 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * RMI_BSD */ + * RMI_BSD + */ + +#include +__FBSDID("$FreeBSD$"); #define __RMAN_RESOURCE_VISIBLE #include @@ -67,8 +71,8 @@ #include #include -#include -#include +#include +#include extern void iodi_activateirqs(void); From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 05:19:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19962106566C; Mon, 11 Jan 2010 05:19:52 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F22338FC14; Mon, 11 Jan 2010 05:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B5Jp63060800; Mon, 11 Jan 2010 05:19:51 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B5Jpvw060795; Mon, 11 Jan 2010 05:19:51 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001110519.o0B5Jpvw060795@svn.freebsd.org> From: Christian Brueffer Date: Mon, 11 Jan 2010 05:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202068 - in stable/8/share/man: man7 man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 05:19:52 -0000 Author: brueffer Date: Mon Jan 11 05:19:51 2010 New Revision: 202068 URL: http://svn.freebsd.org/changeset/base/202068 Log: MFC: r201538, r201539 Catch up with the VFS_VPTOFH(9) -> VOP_VPTOFH(9) repocopy that happened almost three years ago in r166794. Add a missing word. Modified: stable/8/share/man/man7/security.7 stable/8/share/man/man9/VFS.9 stable/8/share/man/man9/VFS_CHECKEXP.9 stable/8/share/man/man9/VFS_FHTOVP.9 Directory Properties: stable/8/share/man/man7/ (props changed) stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man7/security.7 ============================================================================== --- stable/8/share/man/man7/security.7 Mon Jan 11 05:05:28 2010 (r202067) +++ stable/8/share/man/man7/security.7 Mon Jan 11 05:19:51 2010 (r202068) @@ -88,7 +88,7 @@ incur on the system under adverse condit Brute-force network attacks are harder to deal with. A spoofed-packet attack, for example, is nearly impossible to stop short of cutting your system off from the Internet. -It may not be able to take your machine down, but it can fill up Internet +It may not be able to take your machine down, but it can fill up your Internet pipe. .Pp A user account compromise is even more common than a DoS attack. Modified: stable/8/share/man/man9/VFS.9 ============================================================================== --- stable/8/share/man/man9/VFS.9 Mon Jan 11 05:05:28 2010 (r202067) +++ stable/8/share/man/man9/VFS.9 Mon Jan 11 05:19:51 2010 (r202068) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 1996 +.Dd January 4, 2010 .Os .Dt VFS 9 .Sh NAME @@ -53,7 +53,7 @@ rather than implementing empty functions .Xr VFS_SYNC 9 , .Xr VFS_UNMOUNT 9 , .Xr VFS_VGET 9 , -.Xr VFS_VPTOFH 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by Modified: stable/8/share/man/man9/VFS_CHECKEXP.9 ============================================================================== --- stable/8/share/man/man9/VFS_CHECKEXP.9 Mon Jan 11 05:05:28 2010 (r202067) +++ stable/8/share/man/man9/VFS_CHECKEXP.9 Mon Jan 11 05:19:51 2010 (r202068) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2005 +.Dd January 4, 2010 .Os .Dt VFS_CHECKEXP 9 .Sh NAME @@ -81,7 +81,7 @@ and .Sh SEE ALSO .Xr VFS 9 , .Xr VFS_FHTOVP 9 , -.Xr VFS_VPTOFH 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by Modified: stable/8/share/man/man9/VFS_FHTOVP.9 ============================================================================== --- stable/8/share/man/man9/VFS_FHTOVP.9 Mon Jan 11 05:05:28 2010 (r202067) +++ stable/8/share/man/man9/VFS_FHTOVP.9 Mon Jan 11 05:19:51 2010 (r202068) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2005 +.Dd January 4, 2010 .Os .Dt VFS_FHTOVP 9 .Sh NAME @@ -76,7 +76,7 @@ The locked vnode for the file will be re .Sh SEE ALSO .Xr VFS 9 , .Xr VFS_CHECKEXP 9 , -.Xr VFS_VPTOFH 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 05:26:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 192DA106568D; Mon, 11 Jan 2010 05:26:19 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F16408FC16; Mon, 11 Jan 2010 05:26:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B5QIHW062288; Mon, 11 Jan 2010 05:26:18 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B5QI4a062283; Mon, 11 Jan 2010 05:26:18 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001110526.o0B5QI4a062283@svn.freebsd.org> From: Christian Brueffer Date: Mon, 11 Jan 2010 05:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202069 - in stable/7/share/man: man7 man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 05:26:19 -0000 Author: brueffer Date: Mon Jan 11 05:26:18 2010 New Revision: 202069 URL: http://svn.freebsd.org/changeset/base/202069 Log: MFC: r201538, r201539 Catch up with the VFS_VPTOFH(9) -> VOP_VPTOFH(9) repocopy that happened almost three years ago in r166794. Add a missing word. Modified: stable/7/share/man/man7/security.7 stable/7/share/man/man9/VFS.9 stable/7/share/man/man9/VFS_CHECKEXP.9 stable/7/share/man/man9/VFS_FHTOVP.9 Directory Properties: stable/7/share/man/man7/ (props changed) stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man7/security.7 ============================================================================== --- stable/7/share/man/man7/security.7 Mon Jan 11 05:19:51 2010 (r202068) +++ stable/7/share/man/man7/security.7 Mon Jan 11 05:26:18 2010 (r202069) @@ -88,7 +88,7 @@ incur on the system under adverse condit Brute-force network attacks are harder to deal with. A spoofed-packet attack, for example, is nearly impossible to stop short of cutting your system off from the Internet. -It may not be able to take your machine down, but it can fill up Internet +It may not be able to take your machine down, but it can fill up your Internet pipe. .Pp A user account compromise is even more common than a DoS attack. Modified: stable/7/share/man/man9/VFS.9 ============================================================================== --- stable/7/share/man/man9/VFS.9 Mon Jan 11 05:19:51 2010 (r202068) +++ stable/7/share/man/man9/VFS.9 Mon Jan 11 05:26:18 2010 (r202069) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 1996 +.Dd January 4, 2010 .Os .Dt VFS 9 .Sh NAME @@ -53,7 +53,7 @@ rather than implementing empty functions .Xr VFS_SYNC 9 , .Xr VFS_UNMOUNT 9 , .Xr VFS_VGET 9 , -.Xr VFS_VPTOFH 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by Modified: stable/7/share/man/man9/VFS_CHECKEXP.9 ============================================================================== --- stable/7/share/man/man9/VFS_CHECKEXP.9 Mon Jan 11 05:19:51 2010 (r202068) +++ stable/7/share/man/man9/VFS_CHECKEXP.9 Mon Jan 11 05:26:18 2010 (r202069) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2005 +.Dd January 4, 2010 .Os .Dt VFS_CHECKEXP 9 .Sh NAME @@ -81,7 +81,7 @@ and .Sh SEE ALSO .Xr VFS 9 , .Xr VFS_FHTOVP 9 , -.Xr VFS_VPTOFH 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by Modified: stable/7/share/man/man9/VFS_FHTOVP.9 ============================================================================== --- stable/7/share/man/man9/VFS_FHTOVP.9 Mon Jan 11 05:19:51 2010 (r202068) +++ stable/7/share/man/man9/VFS_FHTOVP.9 Mon Jan 11 05:26:18 2010 (r202069) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2005 +.Dd January 4, 2010 .Os .Dt VFS_FHTOVP 9 .Sh NAME @@ -76,7 +76,7 @@ The locked vnode for the file will be re .Sh SEE ALSO .Xr VFS 9 , .Xr VFS_CHECKEXP 9 , -.Xr VFS_VPTOFH 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 09:16:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EDB8106566B; Mon, 11 Jan 2010 09:16:43 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DEFA8FC0A; Mon, 11 Jan 2010 09:16:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0B9Gg65012735; Mon, 11 Jan 2010 09:16:42 GMT (envelope-from harti@svn.freebsd.org) Received: (from harti@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0B9Gg1A012733; Mon, 11 Jan 2010 09:16:42 GMT (envelope-from harti@svn.freebsd.org) Message-Id: <201001110916.o0B9Gg1A012733@svn.freebsd.org> From: Hartmut Brandt Date: Mon, 11 Jan 2010 09:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202070 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 09:16:43 -0000 Author: harti Date: Mon Jan 11 09:16:42 2010 New Revision: 202070 URL: http://svn.freebsd.org/changeset/base/202070 Log: Fix the previous commit (still not used to svn vs. cvs). Use the define from paths.h for the default temporary directory and remove and unneccessary getenv call. Modified: head/usr.bin/make/job.c Modified: head/usr.bin/make/job.c ============================================================================== --- head/usr.bin/make/job.c Mon Jan 11 05:26:18 2010 (r202069) +++ head/usr.bin/make/job.c Mon Jan 11 09:16:42 2010 (r202070) @@ -115,6 +115,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -139,7 +140,6 @@ __FBSDID("$FreeBSD$"); #include "var.h" #define TMPPAT "makeXXXXXXXXXX" -#define TMPDIR "/tmp" #ifndef USE_KQUEUE /* @@ -1611,7 +1611,7 @@ JobStart(GNode *gn, int flags, Job *prev } if ((tdir = getenv("TMPDIR")) == NULL) - tdir = TMPDIR; + tdir = _PATH_TMP; /* * If the -n flag wasn't given, we open up OUR (not the child's) @@ -1807,8 +1807,6 @@ JobStart(GNode *gn, int flags, Job *prev } else { fprintf(stdout, "Remaking `%s'\n", gn->name); fflush(stdout); - if ((tdir = getenv("TMPDIR")) == NULL) - tdir = TMPDIR; snprintf(job->outFile, sizeof(job->outFile), "%s/%s", tdir, TMPPAT); if ((job->outFd = mkstemp(job->outFile)) == -1) From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 12:19:45 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA95F1065672; Mon, 11 Jan 2010 12:19:45 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id E6D5B8FC17; Mon, 11 Jan 2010 12:19:44 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0BCJfCQ057583; Mon, 11 Jan 2010 15:19:41 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263212382; bh=ZlQLnLzJDeDKYx+eEuk2LIuA0SMakdBizeDeiir2S9Y=; l=1013; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=NCt6BIr/aJiYw+ytKji4U/sOBD6aFZVUsyfwR0fWjEDiiXMNERXVp6RDfouylAnUq NdMx9/WrbuWipU71KfjcGQtNXdbh9lYXwBcqmXVKrl7CTFEJLDxFT0T5vMVDfRH5pe ONhS+LTKEH5C57ck5E6+gEQPfNbyh4NLnbOmyZp0= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0BCJenO057582; Mon, 11 Jan 2010 15:19:40 +0300 (MSK) (envelope-from ache) Date: Mon, 11 Jan 2010 15:19:39 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100111121938.GA57442@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , Colin Percival , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001101430.o0AEUURS051917@svn.freebsd.org> <20100110212548.GA47331@nagual.pp.ru> <4B4A5252.9070205@freebsd.org> <20100111134429.F1302@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100111134429.F1302@besplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Colin Percival Subject: Re: svn commit: r201999 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 12:19:46 -0000 On Mon, Jan 11, 2010 at 02:29:03PM +1100, Bruce Evans wrote: > >> 3) errno should be EOVERFLOW, see other owerflow checks in the stdio. > > There are none. I (we?) intentionally didn't set errno when the correct F.e. see fseek()/fseeko() stdio checks, as POSIX says: [EOVERFLOW] For fseek(), the resulting file offset would be a value which cannot be represented correctly in an object of type long. [EOVERFLOW] For fseeko(), the resulting file offset would be a value which cannot be represented correctly in an object of type off_t. Moreover, POSIX tends to introduce EOVERFLOW now in many places like old system calls too, see read()/pread(): [EOVERFLOW] The file is a regular file, nbyte is greater than 0, the starting position is before the end-of-file, and the starting position is greater than or equal to the offset maximum established in the open file description associated with fildes. (IEEE P1003.1 Draft 5.1 Issue 7 quoted in both cases) -- http://ache.pp.ru/ From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 12:32:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BDB81065679; Mon, 11 Jan 2010 12:32:06 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AEF68FC15; Mon, 11 Jan 2010 12:32:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BCW6GX060810; Mon, 11 Jan 2010 12:32:06 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BCW6P9060807; Mon, 11 Jan 2010 12:32:06 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001111232.o0BCW6P9060807@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 11 Jan 2010 12:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202081 - in stable/8: share/man/man4 sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 12:32:06 -0000 Author: ru Date: Mon Jan 11 12:32:06 2010 New Revision: 202081 URL: http://svn.freebsd.org/changeset/base/202081 Log: MFC: r200026,201801: Swap carp(4) log levels. Modified: stable/8/share/man/man4/carp.4 stable/8/sys/netinet/ip_carp.c Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/carp.4 ============================================================================== --- stable/8/share/man/man4/carp.4 Mon Jan 11 12:31:36 2010 (r202080) +++ stable/8/share/man/man4/carp.4 Mon Jan 11 12:32:06 2010 (r202081) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2006 +.Dd January 5, 2010 .Dt CARP 4 .Os .Sh NAME @@ -118,12 +118,12 @@ See also the first example. Disabled by default. .It Va net.inet.carp.log Value of 0 disables any logging. -Value of 1 enables logging of bad -.Nm -packets. -Values above 1 enable logging state changes of +Value of 1 enables logging state changes of .Nm interfaces. +Values above 1 enable logging of bad +.Nm +packets. Default value is 1. .It Va net.inet.carp.arpbalance Balance local traffic using ARP (see below). Modified: stable/8/sys/netinet/ip_carp.c ============================================================================== --- stable/8/sys/netinet/ip_carp.c Mon Jan 11 12:31:36 2010 (r202080) +++ stable/8/sys/netinet/ip_carp.c Mon Jan 11 12:32:06 2010 (r202081) @@ -550,7 +550,7 @@ carp_input(struct mbuf *m, int hlen) /* check if received on a valid carp interface */ if (m->m_pkthdr.rcvif->if_carp == NULL) { CARPSTATS_INC(carps_badif); - CARP_LOG("carp_input: packet received on non-carp " + CARP_DEBUG("carp_input: packet received on non-carp " "interface: %s\n", m->m_pkthdr.rcvif->if_xname); m_freem(m); @@ -560,7 +560,7 @@ carp_input(struct mbuf *m, int hlen) /* verify that the IP TTL is 255. */ if (ip->ip_ttl != CARP_DFLTTL) { CARPSTATS_INC(carps_badttl); - CARP_LOG("carp_input: received ttl %d != 255i on %s\n", + CARP_DEBUG("carp_input: received ttl %d != 255 on %s\n", ip->ip_ttl, m->m_pkthdr.rcvif->if_xname); m_freem(m); @@ -571,7 +571,7 @@ carp_input(struct mbuf *m, int hlen) if (m->m_pkthdr.len < iplen + sizeof(*ch)) { CARPSTATS_INC(carps_badlen); - CARP_LOG("carp_input: received len %zd < " + CARP_DEBUG("carp_input: received len %zd < " "sizeof(struct carp_header) on %s\n", m->m_len - sizeof(struct ip), m->m_pkthdr.rcvif->if_xname); @@ -582,7 +582,7 @@ carp_input(struct mbuf *m, int hlen) if (iplen + sizeof(*ch) < m->m_len) { if ((m = m_pullup(m, iplen + sizeof(*ch))) == NULL) { CARPSTATS_INC(carps_hdrops); - CARP_LOG("carp_input: pullup failed\n"); + CARP_DEBUG("carp_input: pullup failed\n"); return; } ip = mtod(m, struct ip *); @@ -596,7 +596,7 @@ carp_input(struct mbuf *m, int hlen) len = iplen + sizeof(*ch); if (len > m->m_pkthdr.len) { CARPSTATS_INC(carps_badlen); - CARP_LOG("carp_input: packet too short %d on %s\n", + CARP_DEBUG("carp_input: packet too short %d on %s\n", m->m_pkthdr.len, m->m_pkthdr.rcvif->if_xname); m_freem(m); @@ -614,7 +614,7 @@ carp_input(struct mbuf *m, int hlen) m->m_data += iplen; if (carp_cksum(m, len - iplen)) { CARPSTATS_INC(carps_badsum); - CARP_LOG("carp_input: checksum failed on %s\n", + CARP_DEBUG("carp_input: checksum failed on %s\n", m->m_pkthdr.rcvif->if_xname); m_freem(m); return; @@ -643,7 +643,7 @@ carp6_input(struct mbuf **mp, int *offp, /* check if received on a valid carp interface */ if (m->m_pkthdr.rcvif->if_carp == NULL) { CARPSTATS_INC(carps_badif); - CARP_LOG("carp6_input: packet received on non-carp " + CARP_DEBUG("carp6_input: packet received on non-carp " "interface: %s\n", m->m_pkthdr.rcvif->if_xname); m_freem(m); @@ -653,7 +653,7 @@ carp6_input(struct mbuf **mp, int *offp, /* verify that the IP TTL is 255 */ if (ip6->ip6_hlim != CARP_DFLTTL) { CARPSTATS_INC(carps_badttl); - CARP_LOG("carp6_input: received ttl %d != 255 on %s\n", + CARP_DEBUG("carp6_input: received ttl %d != 255 on %s\n", ip6->ip6_hlim, m->m_pkthdr.rcvif->if_xname); m_freem(m); @@ -665,7 +665,7 @@ carp6_input(struct mbuf **mp, int *offp, IP6_EXTHDR_GET(ch, struct carp_header *, m, *offp, sizeof(*ch)); if (ch == NULL) { CARPSTATS_INC(carps_badlen); - CARP_LOG("carp6_input: packet size %u too small\n", len); + CARP_DEBUG("carp6_input: packet size %u too small\n", len); return (IPPROTO_DONE); } @@ -674,7 +674,7 @@ carp6_input(struct mbuf **mp, int *offp, m->m_data += *offp; if (carp_cksum(m, sizeof(*ch))) { CARPSTATS_INC(carps_badsum); - CARP_LOG("carp6_input: checksum failed, on %s\n", + CARP_DEBUG("carp6_input: checksum failed, on %s\n", m->m_pkthdr.rcvif->if_xname); m_freem(m); return (IPPROTO_DONE); @@ -727,7 +727,7 @@ carp_input_c(struct mbuf *m, struct carp CARPSTATS_INC(carps_badver); SC2IFP(sc)->if_ierrors++; CARP_UNLOCK(ifp->if_carp); - CARP_LOG("%s; invalid version %d\n", + CARP_DEBUG("%s; invalid version %d\n", SC2IFP(sc)->if_xname, ch->carp_version); m_freem(m); @@ -739,7 +739,7 @@ carp_input_c(struct mbuf *m, struct carp CARPSTATS_INC(carps_badauth); SC2IFP(sc)->if_ierrors++; CARP_UNLOCK(ifp->if_carp); - CARP_LOG("%s: incorrect hash\n", SC2IFP(sc)->if_xname); + CARP_DEBUG("%s: incorrect hash\n", SC2IFP(sc)->if_xname); m_freem(m); return; } @@ -772,7 +772,7 @@ carp_input_c(struct mbuf *m, struct carp if (timevalcmp(&sc_tv, &ch_tv, >) || timevalcmp(&sc_tv, &ch_tv, ==)) { callout_stop(&sc->sc_ad_tmo); - CARP_DEBUG("%s: MASTER -> BACKUP " + CARP_LOG("%s: MASTER -> BACKUP " "(more frequent advertisement received)\n", SC2IFP(sc)->if_xname); carp_set_state(sc, BACKUP); @@ -787,7 +787,7 @@ carp_input_c(struct mbuf *m, struct carp */ if (carp_opts[CARPCTL_PREEMPT] && timevalcmp(&sc_tv, &ch_tv, <)) { - CARP_DEBUG("%s: BACKUP -> MASTER " + CARP_LOG("%s: BACKUP -> MASTER " "(preempting a slower master)\n", SC2IFP(sc)->if_xname); carp_master_down_locked(sc); @@ -801,7 +801,7 @@ carp_input_c(struct mbuf *m, struct carp */ sc_tv.tv_sec = sc->sc_advbase * 3; if (timevalcmp(&sc_tv, &ch_tv, <)) { - CARP_DEBUG("%s: BACKUP -> MASTER " + CARP_LOG("%s: BACKUP -> MASTER " "(master timed out)\n", SC2IFP(sc)->if_xname); carp_master_down_locked(sc); @@ -1024,7 +1024,7 @@ carp_send_ad_locked(struct carp_softc *s if (in6_setscope(&ip6->ip6_dst, sc->sc_carpdev, NULL) != 0) { SC2IFP(sc)->if_oerrors++; m_freem(m); - CARP_LOG("%s: in6_setscope failed\n", __func__); + CARP_DEBUG("%s: in6_setscope failed\n", __func__); return; } @@ -1385,12 +1385,12 @@ carp_setrun(struct carp_softc *sc, sa_fa #ifdef INET6 carp_send_na(sc); #endif /* INET6 */ - CARP_DEBUG("%s: INIT -> MASTER (preempting)\n", + CARP_LOG("%s: INIT -> MASTER (preempting)\n", SC2IFP(sc)->if_xname); carp_set_state(sc, MASTER); carp_setroute(sc, RTM_ADD); } else { - CARP_DEBUG("%s: INIT -> BACKUP\n", SC2IFP(sc)->if_xname); + CARP_LOG("%s: INIT -> BACKUP\n", SC2IFP(sc)->if_xname); carp_set_state(sc, BACKUP); carp_setroute(sc, RTM_DELETE); carp_setrun(sc, 0); From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 12:35:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C707106566C; Mon, 11 Jan 2010 12:35:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B60F8FC08; Mon, 11 Jan 2010 12:35:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BCZHen061570; Mon, 11 Jan 2010 12:35:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BCZHlj061564; Mon, 11 Jan 2010 12:35:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001111235.o0BCZHlj061564@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 11 Jan 2010 12:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202082 - in stable/8/sys: kern sys ufs/ffs vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 12:35:17 -0000 Author: kib Date: Mon Jan 11 12:35:16 2010 New Revision: 202082 URL: http://svn.freebsd.org/changeset/base/202082 Log: MFC r200770: Remove VI_OBJDIRTY and make sure that OBJ_MIGHTBEDIRTY is set only for vnode-backed vm objects. Modified: stable/8/sys/kern/vfs_subr.c stable/8/sys/sys/vnode.h stable/8/sys/ufs/ffs/ffs_rawread.c stable/8/sys/vm/vm_object.c stable/8/sys/vm/vm_object.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Mon Jan 11 12:32:06 2010 (r202081) +++ stable/8/sys/kern/vfs_subr.c Mon Jan 11 12:35:16 2010 (r202082) @@ -2697,14 +2697,12 @@ vn_printf(struct vnode *vp, const char * strlcat(buf, "|VI_DOOMED", sizeof(buf)); if (vp->v_iflag & VI_FREE) strlcat(buf, "|VI_FREE", sizeof(buf)); - if (vp->v_iflag & VI_OBJDIRTY) - strlcat(buf, "|VI_OBJDIRTY", sizeof(buf)); if (vp->v_iflag & VI_DOINGINACT) strlcat(buf, "|VI_DOINGINACT", sizeof(buf)); if (vp->v_iflag & VI_OWEINACT) strlcat(buf, "|VI_OWEINACT", sizeof(buf)); flags = vp->v_iflag & ~(VI_MOUNT | VI_AGE | VI_DOOMED | VI_FREE | - VI_OBJDIRTY | VI_DOINGINACT | VI_OWEINACT); + VI_DOINGINACT | VI_OWEINACT); if (flags != 0) { snprintf(buf2, sizeof(buf2), "|VI(0x%lx)", flags); strlcat(buf, buf2, sizeof(buf)); @@ -3198,7 +3196,8 @@ vfs_msync(struct mount *mp, int flags) MNT_ILOCK(mp); MNT_VNODE_FOREACH(vp, mp, mvp) { VI_LOCK(vp); - if ((vp->v_iflag & VI_OBJDIRTY) && + obj = vp->v_object; + if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0 && (flags == MNT_WAIT || VOP_ISLOCKED(vp) == 0)) { MNT_IUNLOCK(mp); if (!vget(vp, Modified: stable/8/sys/sys/vnode.h ============================================================================== --- stable/8/sys/sys/vnode.h Mon Jan 11 12:32:06 2010 (r202081) +++ stable/8/sys/sys/vnode.h Mon Jan 11 12:35:16 2010 (r202082) @@ -237,7 +237,6 @@ struct xvnode { #define VI_AGE 0x0040 /* Insert vnode at head of free list */ #define VI_DOOMED 0x0080 /* This vnode is being recycled */ #define VI_FREE 0x0100 /* This vnode is on the freelist */ -#define VI_OBJDIRTY 0x0400 /* object might be dirty */ #define VI_DOINGINACT 0x0800 /* VOP_INACTIVE is in progress */ #define VI_OWEINACT 0x1000 /* Need to call inactive */ Modified: stable/8/sys/ufs/ffs/ffs_rawread.c ============================================================================== --- stable/8/sys/ufs/ffs/ffs_rawread.c Mon Jan 11 12:32:06 2010 (r202081) +++ stable/8/sys/ufs/ffs/ffs_rawread.c Mon Jan 11 12:35:16 2010 (r202082) @@ -101,6 +101,7 @@ ffs_rawread_sync(struct vnode *vp) int upgraded; struct bufobj *bo; struct mount *mp; + vm_object_t obj; /* Check for dirty mmap, pending writes and dirty buffers */ bo = &vp->v_bufobj; @@ -108,7 +109,8 @@ ffs_rawread_sync(struct vnode *vp) VI_LOCK(vp); if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0 || - (vp->v_iflag & VI_OBJDIRTY) != 0) { + ((obj = vp->v_object) != NULL && + (obj->flags & OBJ_MIGHTBEDIRTY) != 0)) { VI_UNLOCK(vp); BO_UNLOCK(bo); @@ -138,13 +140,12 @@ ffs_rawread_sync(struct vnode *vp) return (EIO); } /* Attempt to msync mmap() regions to clean dirty mmap */ - if ((vp->v_iflag & VI_OBJDIRTY) != 0) { + if ((obj = vp->v_object) != NULL && + (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { VI_UNLOCK(vp); - if (vp->v_object != NULL) { - VM_OBJECT_LOCK(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_UNLOCK(vp->v_object); - } + VM_OBJECT_LOCK(obj); + vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); + VM_OBJECT_UNLOCK(obj); } else VI_UNLOCK(vp); Modified: stable/8/sys/vm/vm_object.c ============================================================================== --- stable/8/sys/vm/vm_object.c Mon Jan 11 12:32:06 2010 (r202081) +++ stable/8/sys/vm/vm_object.c Mon Jan 11 12:35:16 2010 (r202082) @@ -773,9 +773,9 @@ vm_object_page_clean(vm_object_t object, int curgeneration; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); - if (object->type != OBJT_VNODE || - (object->flags & OBJ_MIGHTBEDIRTY) == 0) + if ((object->flags & OBJ_MIGHTBEDIRTY) == 0) return; + KASSERT(object->type == OBJT_VNODE, ("Not a vnode object")); pagerflags = (flags & (OBJPC_SYNC | OBJPC_INVAL)) ? VM_PAGER_PUT_SYNC : VM_PAGER_CLUSTER_OK; pagerflags |= (flags & OBJPC_INVAL) ? VM_PAGER_PUT_INVAL : 0; @@ -875,18 +875,8 @@ vm_object_page_clean(vm_object_t object, pmap_remove_write(p); } - if (clearobjflags && (tstart == 0) && (tend == object->size)) { - struct vnode *vp; - + if (clearobjflags && (tstart == 0) && (tend == object->size)) vm_object_clear_flag(object, OBJ_MIGHTBEDIRTY); - if (object->type == OBJT_VNODE && - (vp = (struct vnode *)object->handle) != NULL) { - VI_LOCK(vp); - if (vp->v_iflag & VI_OBJDIRTY) - vp->v_iflag &= ~VI_OBJDIRTY; - VI_UNLOCK(vp); - } - } rescan: curgeneration = object->generation; @@ -2148,18 +2138,12 @@ vm_object_coalesce(vm_object_t prev_obje void vm_object_set_writeable_dirty(vm_object_t object) { - struct vnode *vp; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); - if ((object->flags & OBJ_MIGHTBEDIRTY) != 0) + if (object->type != OBJT_VNODE || + (object->flags & OBJ_MIGHTBEDIRTY) != 0) return; vm_object_set_flag(object, OBJ_MIGHTBEDIRTY); - if (object->type == OBJT_VNODE && - (vp = (struct vnode *)object->handle) != NULL) { - VI_LOCK(vp); - vp->v_iflag |= VI_OBJDIRTY; - VI_UNLOCK(vp); - } } #include "opt_ddb.h" Modified: stable/8/sys/vm/vm_object.h ============================================================================== --- stable/8/sys/vm/vm_object.h Mon Jan 11 12:32:06 2010 (r202081) +++ stable/8/sys/vm/vm_object.h Mon Jan 11 12:35:16 2010 (r202082) @@ -154,7 +154,7 @@ struct vm_object { #define OBJ_DEAD 0x0008 /* dead objects (during rundown) */ #define OBJ_NOSPLIT 0x0010 /* dont split this object */ #define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ -#define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty */ +#define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ #define OBJ_CLEANING 0x0200 #define OBJ_COLORED 0x1000 /* pg_color is defined */ #define OBJ_ONEMAPPING 0x2000 /* One USE (a single, non-forked) mapping flag */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 12:41:03 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2E641065676; Mon, 11 Jan 2010 12:41:03 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 018048FC0A; Mon, 11 Jan 2010 12:41:02 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0BCf1sA057772; Mon, 11 Jan 2010 15:41:01 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263213661; bh=iJwpkNQl2/zWy2Dg8zkXIsa8dJLRNOXuUVQtdU2r3ck=; l=609; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=mrjzAqv//Gos2FynXlKfvgh7ThxHhcwtem1xMrEC6grOn5JKtw7EhDBCgeZEUnWTD hntzagF3+pDbki2fPD4eiWe4D2nF7gTwM7lIyu/AwPrqPEHccKRDgPeXui7jUzTifD NCAqthnhkfaWhUjK/rPBgOZuM8eqgUcpinsr1mX8= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0BCf0i6057771; Mon, 11 Jan 2010 15:41:00 +0300 (MSK) (envelope-from ache) Date: Mon, 11 Jan 2010 15:40:59 +0300 From: Andrey Chernov To: Hartmut Brandt Message-ID: <20100111124059.GA57742@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Hartmut Brandt , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201001110916.o0B9Gg1A012733@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001110916.o0B9Gg1A012733@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r202070 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 12:41:03 -0000 On Mon, Jan 11, 2010 at 09:16:42AM +0000, Hartmut Brandt wrote: > @@ -1807,8 +1807,6 @@ JobStart(GNode *gn, int flags, Job *prev > } else { > fprintf(stdout, "Remaking `%s'\n", gn->name); > fflush(stdout); > - if ((tdir = getenv("TMPDIR")) == NULL) > - tdir = TMPDIR; > snprintf(job->outFile, sizeof(job->outFile), "%s/%s", > tdir, TMPPAT); > if ((job->outFd = mkstemp(job->outFile)) == -1) With the presence of .EXPORTVAR directive (setenv() called) TMPDIR environment can be changed on the fly, so perhaps this lines are for reason. -- http://ache.pp.ru/ From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 13:44:13 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBBF2106566B; Mon, 11 Jan 2010 13:44:13 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 552828FC0A; Mon, 11 Jan 2010 13:44:12 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id F19FE1FFC22; Mon, 11 Jan 2010 13:44:11 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id C1E3A844CC; Mon, 11 Jan 2010 14:44:11 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bruce Evans References: <201001081544.o08FinVh015359@svn.freebsd.org> <20100109073716.E57804@delplex.bde.org> Date: Mon, 11 Jan 2010 14:44:11 +0100 In-Reply-To: <20100109073716.E57804@delplex.bde.org> (Bruce Evans's message of "Sat, 9 Jan 2010 07:56:10 +1100 (EST)") Message-ID: <86aawkzrh0.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Edward Tomasz Napierala Subject: Re: svn commit: r201794 - in head/sys: ddb dev/ep dev/ex netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 13:44:13 -0000 Bruce Evans writes: > All of these bugs should have been avoided by using normal style. KNF > doesn't even use the "!" operator for testing simple booleans! Older > KNF code in kern uses comparisions with 0 fairly consistently for testing > flags in a bitmap being 0. Even the not-so-old KNF code in kern that > tests the not-so-old flag TDF_SINTR does this (there is only one instance, > in kern_sig.c, where the above is spelled correctly as > ((td->td_flags & TDF_SINTR) =3D=3D 0). I like to use ! for testing even = sets > of flags so I prefer the above, but this is not KNF. > > Spelling for testing the opposite sense is more mixed. Omitting the > !=3D 0 seems to be most common. ISTR that 1) the rule is "don't use it as a predicate unless the name clearly marks it as such" and 2) it isn't actually written down anywhere... TD_IS_SLEEPING(td) is clearly a predicate, so it's OK not to compare it explicitly with 0; (td->td_flags & TDF_SINTR) may well be a predicate, but this is not obvious from a quick glance at the code, so there should be an explicit comparison. The canonical example is strcmp(), which is *not* a predicate, but is often used (and easily misused) as one. It almost makes me want to add the following to : #define streq(s1, s1) (strcmp((s1), (s2)) =3D=3D 0) #define strlt(s1, s1) (strcmp((s1), (s2)) < 0) #define strgt(s1, s1) (strcmp((s1), (s2)) > 0) (or the equivalent static inline functions to avoid double expansion issues) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 14:27:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7A84106566B for ; Mon, 11 Jan 2010 14:27:40 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id 85B768FC13 for ; Mon, 11 Jan 2010 14:27:40 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id DB4C9667DF for ; Mon, 11 Jan 2010 15:11:40 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id A6DB115C51; Mon, 11 Jan 2010 15:12:35 +0100 (CET) Date: Mon, 11 Jan 2010 15:12:35 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20100111141235.GE12281@britannica.bec.de> References: <201001101430.o0AEUURS051917@svn.freebsd.org> <20100110212548.GA47331@nagual.pp.ru> <4B4A5252.9070205@freebsd.org> <20100111134429.F1302@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100111134429.F1302@besplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: svn commit: r201999 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 14:27:40 -0000 On Mon, Jan 11, 2010 at 02:29:03PM +1100, Bruce Evans wrote: > calloc() has the same overflow bug, if any. Standards seem to require > fread and calloc to work even if the multiplication would occur, though > they cannot work in most cases where the multiplication would occur, > even if the overflow is avoided. Well, calloc on any BSD supported architecture can not allocate more than SIZE_MAX (or SIZE_MAX itself). There is an error defined for that. fread and fwrite will access invalid addressses, so doing nothing would be a correct implementation of "undefined". Cutting it off at SIZE_MAX/size seems silly as it would give the same behavior. Frankly, I would just back this out and let the application hit the wall... Joerg From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 15:51:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35ABE106566B; Mon, 11 Jan 2010 15:51:14 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2492E8FC14; Mon, 11 Jan 2010 15:51:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BFpEF1004966; Mon, 11 Jan 2010 15:51:14 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BFpE9X004964; Mon, 11 Jan 2010 15:51:14 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001111551.o0BFpE9X004964@svn.freebsd.org> From: Alan Cox Date: Mon, 11 Jan 2010 15:51:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202084 - head/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 15:51:14 -0000 Author: alc Date: Mon Jan 11 15:51:13 2010 New Revision: 202084 URL: http://svn.freebsd.org/changeset/base/202084 Log: Eliminate an unused declaration. Modified: head/sys/i386/xen/mp_machdep.c Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Mon Jan 11 15:12:13 2010 (r202083) +++ head/sys/i386/xen/mp_machdep.c Mon Jan 11 15:51:13 2010 (r202084) @@ -105,9 +105,6 @@ static char callfunc_name[NR_CPUS][15]; /* Free these after use */ void *bootstacks[MAXCPU]; -/* Hotwire a 0->4MB V==P mapping */ -extern pt_entry_t *KPTphys; - struct pcb stoppcbs[MAXCPU]; /* Variables needed for SMP tlb shootdown. */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 16:01:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 265F61065679; Mon, 11 Jan 2010 16:01:21 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 151768FC22; Mon, 11 Jan 2010 16:01:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BG1Kal007253; Mon, 11 Jan 2010 16:01:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BG1KhU007249; Mon, 11 Jan 2010 16:01:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001111601.o0BG1KhU007249@svn.freebsd.org> From: Alan Cox Date: Mon, 11 Jan 2010 16:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202085 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 16:01:21 -0000 Author: alc Date: Mon Jan 11 16:01:20 2010 New Revision: 202085 URL: http://svn.freebsd.org/changeset/base/202085 Log: Simplify pmap_init(). Additionally, correct a harmless misbehavior on i386. Specifically, where locore had created large page mappings for the kernel, the wrong vm page array entries were being initialized. The vm page array entries for the pages containing the kernel were being initialized instead of the vm page array entries for page table pages. MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/locore.s head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Jan 11 15:51:13 2010 (r202084) +++ head/sys/amd64/amd64/pmap.c Mon Jan 11 16:01:20 2010 (r202085) @@ -664,7 +664,6 @@ pmap_page_init(vm_page_t m) void pmap_init(void) { - pd_entry_t *pd; vm_page_t mpte; vm_size_t s; int i, pv_npg; @@ -673,18 +672,13 @@ pmap_init(void) * Initialize the vm page array entries for the kernel pmap's * page table pages. */ - pd = pmap_pde(kernel_pmap, KERNBASE); for (i = 0; i < NKPT; i++) { - if ((pd[i] & (PG_PS | PG_V)) == (PG_PS | PG_V)) - continue; - KASSERT((pd[i] & PG_V) != 0, - ("pmap_init: page table page is missing")); - mpte = PHYS_TO_VM_PAGE(pd[i] & PG_FRAME); + mpte = PHYS_TO_VM_PAGE(KPTphys + (i << PAGE_SHIFT)); KASSERT(mpte >= vm_page_array && mpte < &vm_page_array[vm_page_array_size], ("pmap_init: page table page is out of range")); mpte->pindex = pmap_pde_pindex(KERNBASE) + i; - mpte->phys_addr = pd[i] & PG_FRAME; + mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); } /* Modified: head/sys/i386/i386/locore.s ============================================================================== --- head/sys/i386/i386/locore.s Mon Jan 11 15:51:13 2010 (r202084) +++ head/sys/i386/i386/locore.s Mon Jan 11 16:01:20 2010 (r202085) @@ -104,9 +104,7 @@ IdlePTD: .long 0 /* phys addr of kernel IdlePDPT: .long 0 /* phys addr of kernel PDPT */ #endif -#ifdef SMP .globl KPTphys -#endif KPTphys: .long 0 /* phys addr of kernel page tables */ .globl proc0kstack Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Jan 11 15:51:13 2010 (r202084) +++ head/sys/i386/i386/pmap.c Mon Jan 11 16:01:20 2010 (r202085) @@ -206,6 +206,7 @@ int pseflag = 0; /* PG_PS or-in */ static int nkpt; vm_offset_t kernel_vm_end; extern u_int32_t KERNend; +extern u_int32_t KPTphys; #ifdef PAE pt_entry_t pg_nx; @@ -659,13 +660,13 @@ pmap_init(void) * Initialize the vm page array entries for the kernel pmap's * page table pages. */ - for (i = 0; i < nkpt; i++) { - mpte = PHYS_TO_VM_PAGE(PTD[i + KPTDI] & PG_FRAME); + for (i = 0; i < NKPT; i++) { + mpte = PHYS_TO_VM_PAGE(KPTphys + (i << PAGE_SHIFT)); KASSERT(mpte >= vm_page_array && mpte < &vm_page_array[vm_page_array_size], ("pmap_init: page table page is out of range")); mpte->pindex = i + KPTDI; - mpte->phys_addr = PTD[i + KPTDI] & PG_FRAME; + mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); } /* From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 16:27:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D81031065679; Mon, 11 Jan 2010 16:27:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD4368FC14; Mon, 11 Jan 2010 16:27:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BGRuhk013183; Mon, 11 Jan 2010 16:27:56 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BGRuov013179; Mon, 11 Jan 2010 16:27:56 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001111627.o0BGRuov013179@svn.freebsd.org> From: Ed Schouten Date: Mon, 11 Jan 2010 16:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202086 - head/contrib/opie/libopie X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 16:27:56 -0000 Author: ed Date: Mon Jan 11 16:27:56 2010 New Revision: 202086 URL: http://svn.freebsd.org/changeset/base/202086 Log: Don't include when using . libopie includes both and in this case and uses some #defines to let the code use struct utmpx and its utility functions. We'd better not include here, because maybe it will not be present in the future. Modified: head/contrib/opie/libopie/getutmpentry.c head/contrib/opie/libopie/insecure.c head/contrib/opie/libopie/login.c Modified: head/contrib/opie/libopie/getutmpentry.c ============================================================================== --- head/contrib/opie/libopie/getutmpentry.c Mon Jan 11 16:01:20 2010 (r202085) +++ head/contrib/opie/libopie/getutmpentry.c Mon Jan 11 16:27:56 2010 (r202086) @@ -15,13 +15,14 @@ you didn't get a copy, you may request o #include "opie_cfg.h" #include #include -#include #if DOUTMPX #include #define setutent setutxent #define getutline(x) getutxline(x) #define utmp utmpx +#else +#include #endif /* DOUTMPX */ #if HAVE_STRING_H Modified: head/contrib/opie/libopie/insecure.c ============================================================================== --- head/contrib/opie/libopie/insecure.c Mon Jan 11 16:01:20 2010 (r202085) +++ head/contrib/opie/libopie/insecure.c Mon Jan 11 16:27:56 2010 (r202086) @@ -39,11 +39,12 @@ $FreeBSD$ #include #include -#include #if DOUTMPX #include #define utmp utmpx #define endutent endutxent +#else +#include #endif /* DOUTMPX */ #if HAVE_SYS_UTSNAME_H Modified: head/contrib/opie/libopie/login.c ============================================================================== --- head/contrib/opie/libopie/login.c Mon Jan 11 16:01:20 2010 (r202085) +++ head/contrib/opie/libopie/login.c Mon Jan 11 16:27:56 2010 (r202086) @@ -21,13 +21,14 @@ you didn't get a copy, you may request o #include "opie_cfg.h" #include #include -#include #if DOUTMPX #include #define pututline(x) pututxline(x) #define endutent endutxent #define utmp utmpx +#else +#include #endif /* DOUTMPX */ #if HAVE_STRING_H From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 17:14:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C928E1065672; Mon, 11 Jan 2010 17:14:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B80698FC14; Mon, 11 Jan 2010 17:14:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BHEACP023477; Mon, 11 Jan 2010 17:14:10 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BHEAoO023475; Mon, 11 Jan 2010 17:14:10 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001111714.o0BHEAoO023475@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 17:14:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202089 - head/sys/mips/sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 17:14:10 -0000 Author: imp Date: Mon Jan 11 17:14:10 2010 New Revision: 202089 URL: http://svn.freebsd.org/changeset/base/202089 Log: Get sb_zbpci.c compiling again after the macros PCI_BUSMAX, PCI_SLOTMAX and PCI_FUNCMAX were moved to pcireg.h. Submitted by: neel@ Modified: head/sys/mips/sibyte/sb_zbpci.c Modified: head/sys/mips/sibyte/sb_zbpci.c ============================================================================== --- head/sys/mips/sibyte/sb_zbpci.c Mon Jan 11 16:31:29 2010 (r202088) +++ head/sys/mips/sibyte/sb_zbpci.c Mon Jan 11 17:14:10 2010 (r202089) @@ -39,6 +39,7 @@ #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 17:14:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75E6110656AC; Mon, 11 Jan 2010 17:14:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6460A8FC18; Mon, 11 Jan 2010 17:14:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BHEkth023643; Mon, 11 Jan 2010 17:14:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BHEkdb023641; Mon, 11 Jan 2010 17:14:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001111714.o0BHEkdb023641@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 17:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202090 - head/sys/mips/sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 17:14:46 -0000 Author: imp Date: Mon Jan 11 17:14:46 2010 New Revision: 202090 URL: http://svn.freebsd.org/changeset/base/202090 Log: Remove redundant interrupt mapper code. We don't need to disable the interrupt sources feeding into a hardintr anymore. The mips_mask_hard_irq() function does that for us while an interrupt is being processed. Submitted by: neel@ Modified: head/sys/mips/sibyte/sb_zbbus.c Modified: head/sys/mips/sibyte/sb_zbbus.c ============================================================================== --- head/sys/mips/sibyte/sb_zbbus.c Mon Jan 11 17:14:10 2010 (r202089) +++ head/sys/mips/sibyte/sb_zbbus.c Mon Jan 11 17:14:46 2010 (r202090) @@ -45,7 +45,7 @@ static MALLOC_DEFINE(M_INTMAP, "sb1250 i struct sb_intmap { int intsrc; /* interrupt mapper register number (0 - 63) */ - int active; /* Does this source generate interrupts? */ + int hardint; /* cpu interrupt from 0 to NUM_HARD_IRQS - 1 */ /* * The device that the interrupt belongs to. Note that multiple @@ -60,36 +60,23 @@ struct sb_intmap { SLIST_ENTRY(sb_intmap) next; }; -/* - * We register 'sb_intsrc.isrc' using cpu_register_hard_intsrc() for each - * hard interrupt source [0-5]. - * - * The mask/unmask callbacks use the information in 'sb_intmap' to figure - * out the corresponding interrupt sources to mask/unmask. - */ -struct sb_intsrc { - struct intsrc isrc; - SLIST_HEAD(, sb_intmap) sb_intmap_head; -}; - -static struct sb_intsrc sb_intsrc[NUM_HARD_IRQS]; +static SLIST_HEAD(, sb_intmap) sb_intmap_head; static struct sb_intmap * sb_intmap_lookup(int intrnum, device_t dev, int rid) { - struct sb_intsrc *isrc; struct sb_intmap *map; - isrc = &sb_intsrc[intrnum]; - SLIST_FOREACH(map, &isrc->sb_intmap_head, next) { - if (dev == map->dev && rid == map->rid) + SLIST_FOREACH(map, &sb_intmap_head, next) { + if (dev == map->dev && rid == map->rid && + intrnum == map->hardint) break; } return (map); } /* - * Keep track of which (dev,rid) tuple is using the interrupt source. + * Keep track of which (dev,rid,hardint) tuple is using the interrupt source. * * We don't actually unmask the interrupt source until the device calls * a bus_setup_intr() on the resource. @@ -97,14 +84,11 @@ sb_intmap_lookup(int intrnum, device_t d static void sb_intmap_add(int intrnum, device_t dev, int rid, int intsrc) { - struct sb_intsrc *isrc; struct sb_intmap *map; - register_t sr; KASSERT(intrnum >= 0 && intrnum < NUM_HARD_IRQS, ("intrnum is out of range: %d", intrnum)); - isrc = &sb_intsrc[intrnum]; map = sb_intmap_lookup(intrnum, dev, rid); if (map) { KASSERT(intsrc == map->intsrc, @@ -117,32 +101,24 @@ sb_intmap_add(int intrnum, device_t dev, map = malloc(sizeof(*map), M_INTMAP, M_WAITOK | M_ZERO); map->intsrc = intsrc; + map->hardint = intrnum; map->dev = dev; map->rid = rid; - sr = intr_disable(); - SLIST_INSERT_HEAD(&isrc->sb_intmap_head, map, next); - intr_restore(sr); + SLIST_INSERT_HEAD(&sb_intmap_head, map, next); } static void sb_intmap_activate(int intrnum, device_t dev, int rid) { struct sb_intmap *map; - register_t sr; KASSERT(intrnum >= 0 && intrnum < NUM_HARD_IRQS, ("intrnum is out of range: %d", intrnum)); map = sb_intmap_lookup(intrnum, dev, rid); if (map) { - /* - * See comments in sb_unmask_func() about disabling cpu intr - */ - sr = intr_disable(); - map->active = 1; sb_enable_intsrc(map->intsrc); - intr_restore(sr); } else { /* * In zbbus_setup_intr() we blindly call sb_intmap_activate() @@ -157,75 +133,6 @@ sb_intmap_activate(int intrnum, device_t } } -static void -sb_mask_func(struct intsrc *arg) -{ - struct sb_intmap *map; - struct sb_intsrc *isrc; - uint64_t isrc_bitmap; - - isrc_bitmap = 0; - isrc = (struct sb_intsrc *)arg; - SLIST_FOREACH(map, &isrc->sb_intmap_head, next) { - if (map->active == 0) - continue; - /* - * If we have already disabled this interrupt source then don't - * do it again. This can happen when multiple devices share - * an interrupt source (e.g. PCI_INT_x). - */ - if (isrc_bitmap & (1ULL << map->intsrc)) - continue; - sb_disable_intsrc(map->intsrc); - isrc_bitmap |= 1ULL << map->intsrc; - } -} - -static void -sb_unmask_func(struct intsrc *arg) -{ - struct sb_intmap *map; - struct sb_intsrc *sb_isrc; - uint64_t isrc_bitmap; - register_t sr; - - isrc_bitmap = 0; - sb_isrc = (struct sb_intsrc *)arg; - - /* - * Make sure we disable the cpu interrupts when enabling the - * interrupt sources. - * - * This is to prevent a condition where some interrupt sources have - * been enabled (but not all) and one of those interrupt sources - * triggers an interrupt. - * - * If any of the interrupt handlers executes in an ithread then - * cpu_intr() will return with all interrupt sources feeding into - * that cpu irq masked. But when the loop below picks up where it - * left off it will enable the remaining interrupt sources!!! - * - * If the disable the cpu interrupts then this race does not happen. - */ - sr = intr_disable(); - - SLIST_FOREACH(map, &sb_isrc->sb_intmap_head, next) { - if (map->active == 0) - continue; - /* - * If we have already enabled this interrupt source then don't - * do it again. This can happen when multiple devices share - * an interrupt source (e.g. PCI_INT_x). - */ - if (isrc_bitmap & (1ULL << map->intsrc)) - continue; - sb_enable_intsrc(map->intsrc); - isrc_bitmap |= 1ULL << map->intsrc; - } - - intr_restore(sr); -} - struct zbbus_devinfo { struct resource_list resources; }; @@ -243,23 +150,11 @@ zbbus_probe(device_t dev) static int zbbus_attach(device_t dev) { - int i, error; - struct intsrc *isrc; if (bootverbose) { device_printf(dev, "attached.\n"); } - for (i = 0; i < NUM_HARD_IRQS; ++i) { - isrc = &sb_intsrc[i].isrc; - isrc->intrnum = i; - isrc->mask_func = sb_mask_func; - isrc->unmask_func = sb_unmask_func; - error = cpu_register_hard_intsrc(isrc); - if (error) - panic("Error %d registering intsrc %d", error, i); - } - bus_generic_probe(dev); bus_enumerate_hinted_children(dev); bus_generic_attach(dev); From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 17:16:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EDE910656A3; Mon, 11 Jan 2010 17:16:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D9C28FC15; Mon, 11 Jan 2010 17:16:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BHG6EO024000; Mon, 11 Jan 2010 17:16:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BHG6dc023998; Mon, 11 Jan 2010 17:16:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001111716.o0BHG6dc023998@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 17:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202091 - head/sys/dev/cfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 17:16:06 -0000 Author: imp Date: Mon Jan 11 17:16:06 2010 New Revision: 202091 URL: http://svn.freebsd.org/changeset/base/202091 Log: Fix bug in cfe_enumenv(). The CFE API to invoke is CFE_CMD_ENV_ENUM and not CFE_CMD_ENV_SET. Submitted by: neel@ Modified: head/sys/dev/cfe/cfe_api.c Modified: head/sys/dev/cfe/cfe_api.c ============================================================================== --- head/sys/dev/cfe/cfe_api.c Mon Jan 11 17:14:46 2010 (r202090) +++ head/sys/dev/cfe/cfe_api.c Mon Jan 11 17:16:06 2010 (r202091) @@ -160,7 +160,7 @@ cfe_enumenv(int idx, char *name, int nam { cfe_xiocb_t xiocb; - xiocb.xiocb_fcode = CFE_CMD_ENV_SET; + xiocb.xiocb_fcode = CFE_CMD_ENV_ENUM; xiocb.xiocb_status = 0; xiocb.xiocb_handle = 0; xiocb.xiocb_flags = 0; From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 17:29:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 953471065670; Mon, 11 Jan 2010 17:29:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 840A08FC16; Mon, 11 Jan 2010 17:29:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BHTKuf026945; Mon, 11 Jan 2010 17:29:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BHTKKT026943; Mon, 11 Jan 2010 17:29:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001111729.o0BHTKKT026943@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 17:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202092 - head/sys/mips/rmi/dev/xlr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 17:29:20 -0000 Author: imp Date: Mon Jan 11 17:29:20 2010 New Revision: 202092 URL: http://svn.freebsd.org/changeset/base/202092 Log: Correct a path in an include I missed earlier Remove references to if_watchdog. The rge_watchdog routine was empty anyway. Modified: head/sys/mips/rmi/dev/xlr/rge.c Modified: head/sys/mips/rmi/dev/xlr/rge.c ============================================================================== --- head/sys/mips/rmi/dev/xlr/rge.c Mon Jan 11 17:16:06 2010 (r202091) +++ head/sys/mips/rmi/dev/xlr/rge.c Mon Jan 11 17:29:20 2010 (r202092) @@ -102,7 +102,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include /* #include "opt_rge.h" */ @@ -245,7 +245,6 @@ static void rge_start(struct ifnet *); static int rge_ioctl(struct ifnet *, u_long, caddr_t); static void rge_init(void *); static void rge_stop(struct rge_softc *); -static void rge_watchdog(struct ifnet *); static int rge_shutdown(device_t); static void rge_reset(struct rge_softc *); @@ -1936,7 +1935,6 @@ rge_attach(device_t dev) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = rge_ioctl; ifp->if_start = rge_start; - ifp->if_watchdog = rge_watchdog; ifp->if_init = rge_init; ifp->if_mtu = ETHERMTU; ifp->if_snd.ifq_drv_maxlen = RGE_TX_Q_SIZE; @@ -2404,11 +2402,6 @@ rge_stop(struct rge_softc *sc) rmi_xlr_mac_close(sc); } -static void -rge_watchdog(struct ifnet *sc) -{ -} - static int rge_shutdown(device_t dev) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 17:31:08 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6AD11065672; Mon, 11 Jan 2010 17:31:08 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp1.dlr.de (smtp1.dlr.de [129.247.252.32]) by mx1.freebsd.org (Postfix) with ESMTP id 67B978FC15; Mon, 11 Jan 2010 17:31:08 +0000 (UTC) Received: from beagle.kn.op.dlr.de ([129.247.178.136]) by smtp1.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 11 Jan 2010 18:19:03 +0100 Date: Mon, 11 Jan 2010 18:18:59 +0100 (CET) From: Harti Brandt X-X-Sender: brandt_h@beagle.kn.op.dlr.de To: Andrey Chernov In-Reply-To: <20100111124059.GA57742@nagual.pp.ru> Message-ID: <20100111181634.H12211@beagle.kn.op.dlr.de> References: <201001110916.o0B9Gg1A012733@svn.freebsd.org> <20100111124059.GA57742@nagual.pp.ru> X-OpenPGP-Key: harti@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 11 Jan 2010 17:19:03.0236 (UTC) FILETIME=[2C066040:01CA92E2] Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r202070 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 17:31:08 -0000 Hi, On Mon, 11 Jan 2010, Andrey Chernov wrote: AC>On Mon, Jan 11, 2010 at 09:16:42AM +0000, Hartmut Brandt wrote: AC>> @@ -1807,8 +1807,6 @@ JobStart(GNode *gn, int flags, Job *prev AC>> } else { AC>> fprintf(stdout, "Remaking `%s'\n", gn->name); AC>> fflush(stdout); AC>> - if ((tdir = getenv("TMPDIR")) == NULL) AC>> - tdir = TMPDIR; AC>> snprintf(job->outFile, sizeof(job->outFile), "%s/%s", AC>> tdir, TMPPAT); AC>> if ((job->outFd = mkstemp(job->outFile)) == -1) AC> AC>With the presence of .EXPORTVAR directive (setenv() called) TMPDIR AC>environment can be changed on the fly, so perhaps this lines are for reason. There is the same getenv() just a couple of lines above of all the if()s so that it covers both uses of tdir. I just though that doing the getenv() in both places is slightly more performing that do it all the time. But decided that this gain would be clearly below noise level. The I forgot to remove the now unneeded second getenv. harti From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 17:58:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 280201065672; Mon, 11 Jan 2010 17:58:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1713B8FC1C; Mon, 11 Jan 2010 17:58:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BHwFgJ033426; Mon, 11 Jan 2010 17:58:15 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BHwFGb033424; Mon, 11 Jan 2010 17:58:15 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001111758.o0BHwFGb033424@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 11 Jan 2010 17:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202095 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 17:58:16 -0000 Author: bz Date: Mon Jan 11 17:58:15 2010 New Revision: 202095 URL: http://svn.freebsd.org/changeset/base/202095 Log: Rather than using an extra variable, only call uname if really needed and then directly assign the result. Submitted by: jmallett MFC after: 24 days X-MFC with: r201815 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Mon Jan 11 17:35:34 2010 (r202094) +++ head/Makefile Mon Jan 11 17:58:15 2010 (r202095) @@ -321,8 +321,9 @@ universe_${target}: @echo ">> ${target} completed on `LC_ALL=C date`" .endfor universe_kernels: universe_kernconfs -XMACHINE!= uname -m -TARGET?= ${XMACHINE} +.if !defined(TARGET) +TARGET!= uname -m +.endif KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \ find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ ! -name DEFAULTS ! -name NOTES From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 18:10:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 582C91065676; Mon, 11 Jan 2010 18:10:14 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43F838FC18; Mon, 11 Jan 2010 18:10:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BIAEsq036118; Mon, 11 Jan 2010 18:10:14 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BIAEmm036106; Mon, 11 Jan 2010 18:10:14 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001111810.o0BIAEmm036106@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 11 Jan 2010 18:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202097 - in head/sys: amd64/amd64 amd64/include conf dev/io i386/i386 i386/include ia64/conf ia64/ia64 ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 18:10:14 -0000 Author: marcel Date: Mon Jan 11 18:10:13 2010 New Revision: 202097 URL: http://svn.freebsd.org/changeset/base/202097 Log: Use io(4) for I/O port access on ia64, rather than through sysarch(2). I/O port access is implemented on Itanium by reading and writing to a special region in memory. To hide details and avoid misaligned memory accesses, a process did I/O port reads and writes by making a MD system call. There's one fatal problem with this approach: unprivileged access was not being prevented. /dev/io serves that purpose on amd64/i386, so employ it on ia64 as well. Use an ioctl for doing the actual I/O and remove the sysarch(2) interface. Backward compatibility is not being considered. The sysarch(2) approach was added to support X11, but support for FreeBSD/ia64 was never fully implemented in X11. Thus, nothing gets broken that didn't need more work to begin with. MFC after: 1 week Added: head/sys/ia64/ia64/iodev_machdep.c (contents, props changed) head/sys/ia64/include/iodev.h (contents, props changed) Modified: head/sys/amd64/amd64/io.c head/sys/amd64/include/iodev.h head/sys/conf/files.ia64 head/sys/dev/io/iodev.c head/sys/i386/i386/io.c head/sys/i386/include/iodev.h head/sys/ia64/conf/DEFAULTS head/sys/ia64/ia64/sys_machdep.c head/sys/ia64/include/sysarch.h Modified: head/sys/amd64/amd64/io.c ============================================================================== --- head/sys/amd64/amd64/io.c Mon Jan 11 18:08:39 2010 (r202096) +++ head/sys/amd64/amd64/io.c Mon Jan 11 18:10:13 2010 (r202097) @@ -76,3 +76,12 @@ ioclose(struct cdev *dev __unused, int f return (0); } + +/* ARGSUSED */ +int +ioioctl(struct cdev *dev __unused, u_long cmd __unused, caddr_t data __unused, + int fflag __unused, struct thread *td __unused) +{ + + return (ENXIO); +} Modified: head/sys/amd64/include/iodev.h ============================================================================== --- head/sys/amd64/include/iodev.h Mon Jan 11 18:08:39 2010 (r202096) +++ head/sys/amd64/include/iodev.h Mon Jan 11 18:10:13 2010 (r202097) @@ -28,3 +28,4 @@ d_open_t ioopen; d_close_t ioclose; +d_ioctl_t ioioctl; Modified: head/sys/conf/files.ia64 ============================================================================== --- head/sys/conf/files.ia64 Mon Jan 11 18:08:39 2010 (r202096) +++ head/sys/conf/files.ia64 Mon Jan 11 18:10:13 2010 (r202097) @@ -54,6 +54,7 @@ dev/atkbdc/psm.c optional psm atkbdc dev/fb/fb.c optional fb | vga dev/fb/vga.c optional vga dev/hwpmc/hwpmc_ia64.c optional hwpmc +dev/io/iodev.c optional io dev/kbd/kbd.c optional atkbd | sc | ukbd | usb2_input_kbd dev/syscons/scterm-teken.c optional sc dev/syscons/scvgarndr.c optional sc vga @@ -86,6 +87,7 @@ ia64/ia64/gdb_machdep.c optional gdb ia64/ia64/highfp.c standard ia64/ia64/in_cksum.c optional inet ia64/ia64/interrupt.c standard +ia64/ia64/iodev_machdep.c optional io ia64/ia64/locore.S standard no-obj ia64/ia64/machdep.c standard ia64/ia64/mca.c standard Modified: head/sys/dev/io/iodev.c ============================================================================== --- head/sys/dev/io/iodev.c Mon Jan 11 18:08:39 2010 (r202096) +++ head/sys/dev/io/iodev.c Mon Jan 11 18:10:13 2010 (r202097) @@ -41,8 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include @@ -54,6 +52,7 @@ static struct cdevsw io_cdevsw = { .d_version = D_VERSION, .d_open = ioopen, .d_close = ioclose, + .d_ioctl = ioioctl, .d_name = "io", }; Modified: head/sys/i386/i386/io.c ============================================================================== --- head/sys/i386/i386/io.c Mon Jan 11 18:08:39 2010 (r202096) +++ head/sys/i386/i386/io.c Mon Jan 11 18:10:13 2010 (r202097) @@ -76,3 +76,12 @@ ioclose(struct cdev *dev __unused, int f return (0); } + +/* ARGSUSED */ +int +ioioctl(struct cdev *dev __unused, u_long cmd __unused, caddr_t data __unused, + int fflag __unused, struct thread *td __unused) +{ + + return (ENXIO); +} Modified: head/sys/i386/include/iodev.h ============================================================================== --- head/sys/i386/include/iodev.h Mon Jan 11 18:08:39 2010 (r202096) +++ head/sys/i386/include/iodev.h Mon Jan 11 18:10:13 2010 (r202097) @@ -28,3 +28,4 @@ d_open_t ioopen; d_close_t ioclose; +d_ioctl_t ioioctl; Modified: head/sys/ia64/conf/DEFAULTS ============================================================================== --- head/sys/ia64/conf/DEFAULTS Mon Jan 11 18:08:39 2010 (r202096) +++ head/sys/ia64/conf/DEFAULTS Mon Jan 11 18:10:13 2010 (r202097) @@ -9,6 +9,7 @@ machine ia64 device acpi # ACPI support # Pseudo devices. +device io # I/O & EFI runtime device device mem # Memory and kernel memory devices # UART chips on this platform Added: head/sys/ia64/ia64/iodev_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ia64/ia64/iodev_machdep.c Mon Jan 11 18:10:13 2010 (r202097) @@ -0,0 +1,160 @@ +/*- + * Copyright (c) 2010 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +static int iodev_pio_read(struct iodev_pio_req *req); +static int iodev_pio_write(struct iodev_pio_req *req); + +/* ARGSUSED */ +int +ioopen(struct cdev *dev __unused, int flags __unused, int fmt __unused, + struct thread *td) +{ + int error; + + error = priv_check(td, PRIV_IO); + if (error == 0) + error = securelevel_gt(td->td_ucred, 0); + + return (error); +} + +/* ARGSUSED */ +int +ioclose(struct cdev *dev __unused, int flags __unused, int fmt __unused, + struct thread *td __unused) +{ + + return (0); +} + +/* ARGSUSED */ +int +ioioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, + int fflag __unused, struct thread *td __unused) +{ + struct iodev_pio_req *pio_req; + int error; + + error = ENOIOCTL; + switch (cmd) { + case IODEV_PIO: + pio_req = (struct iodev_pio_req *)data; + switch (pio_req->access) { + case IODEV_PIO_READ: + error = iodev_pio_read(pio_req); + break; + case IODEV_PIO_WRITE: + error = iodev_pio_write(pio_req); + break; + default: + error = EINVAL; + break; + } + break; + } + + return (error); +} + +static int +iodev_pio_read(struct iodev_pio_req *req) +{ + + switch (req->width) { + case 1: + req->val = bus_space_read_io_1(req->port); + break; + case 2: + if (req->port & 1) { + req->val = bus_space_read_io_1(req->port); + req->val |= bus_space_read_io_1(req->port + 1) << 8; + } else + req->val = bus_space_read_io_2(req->port); + break; + case 4: + if (req->port & 1) { + req->val = bus_space_read_io_1(req->port); + req->val |= bus_space_read_io_2(req->port + 1) << 8; + req->val |= bus_space_read_io_1(req->port + 3) << 24; + } else if (req->port & 2) { + req->val = bus_space_read_io_2(req->port); + req->val |= bus_space_read_io_2(req->port + 2) << 16; + } else + req->val = bus_space_read_io_4(req->port); + break; + default: + return (EINVAL); + } + + return (0); +} + +static int +iodev_pio_write(struct iodev_pio_req *req) +{ + + switch (req->width) { + case 1: + bus_space_write_io_1(req->port, req->val); + break; + case 2: + if (req->port & 1) { + bus_space_write_io_1(req->port, req->val); + bus_space_write_io_1(req->port + 1, req->val >> 8); + } else + bus_space_write_io_2(req->port, req->val); + break; + case 4: + if (req->port & 1) { + bus_space_write_io_1(req->port, req->val); + bus_space_write_io_2(req->port + 1, req->val >> 8); + bus_space_write_io_1(req->port + 3, req->val >> 24); + } else if (req->port & 2) { + bus_space_write_io_2(req->port, req->val); + bus_space_write_io_2(req->port + 2, req->val >> 16); + } else + bus_space_write_io_4(req->port, req->val); + break; + default: + return (EINVAL); + } + + return (0); +} Modified: head/sys/ia64/ia64/sys_machdep.c ============================================================================== --- head/sys/ia64/ia64/sys_machdep.c Mon Jan 11 18:08:39 2010 (r202096) +++ head/sys/ia64/ia64/sys_machdep.c Mon Jan 11 18:10:13 2010 (r202097) @@ -49,72 +49,9 @@ struct sysarch_args { int sysarch(struct thread *td, struct sysarch_args *uap) { - struct ia64_iodesc iod; int error; - error = 0; switch(uap->op) { - case IA64_IORD: - copyin(uap->parms, &iod, sizeof(iod)); - switch (iod.width) { - case 1: - iod.val = inb(iod.port); - break; - case 2: - if (iod.port & 1) { - iod.val = inb(iod.port); - iod.val |= inb(iod.port + 1) << 8; - } else - iod.val = inw(iod.port); - break; - case 4: - if (iod.port & 3) { - if (iod.port & 1) { - iod.val = inb(iod.port); - iod.val |= inw(iod.port + 1) << 8; - iod.val |= inb(iod.port + 3) << 24; - } else { - iod.val = inw(iod.port); - iod.val |= inw(iod.port + 2) << 16; - } - } else - iod.val = inl(iod.port); - break; - default: - error = EINVAL; - } - copyout(&iod, uap->parms, sizeof(iod)); - break; - case IA64_IOWR: - copyin(uap->parms, &iod, sizeof(iod)); - switch (iod.width) { - case 1: - outb(iod.port, iod.val); - break; - case 2: - if (iod.port & 1) { - outb(iod.port, iod.val); - outb(iod.port + 1, iod.val >> 8); - } else - outw(iod.port, iod.val); - break; - case 4: - if (iod.port & 3) { - if (iod.port & 1) { - outb(iod.port, iod.val); - outw(iod.port + 1, iod.val >> 8); - outb(iod.port + 3, iod.val >> 24); - } else { - outw(iod.port, iod.val); - outw(iod.port + 2, iod.val >> 16); - } - } else - outl(iod.port, iod.val); - break; - default: - error = EINVAL; - } - break; default: error = EINVAL; break; Added: head/sys/ia64/include/iodev.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ia64/include/iodev.h Mon Jan 11 18:10:13 2010 (r202097) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2010 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_IODEV_H_ +#define _MACHINE_IODEV_H_ + +struct iodev_pio_req { + u_int access; +#define IODEV_PIO_READ 0 +#define IODEV_PIO_WRITE 1 + u_int port; + u_int width; + u_int val; +}; + +#define IODEV_PIO _IOWR('I', 0, struct iodev_pio_req) + +#ifdef _KERNEL + +d_open_t ioopen; +d_close_t ioclose; +d_ioctl_t ioioctl; + +#endif + +#endif /* _MACHINE_IODEV_H_ */ Modified: head/sys/ia64/include/sysarch.h ============================================================================== --- head/sys/ia64/include/sysarch.h Mon Jan 11 18:08:39 2010 (r202096) +++ head/sys/ia64/include/sysarch.h Mon Jan 11 18:10:13 2010 (r202097) @@ -32,15 +32,6 @@ #ifndef _MACHINE_SYSARCH_H_ #define _MACHINE_SYSARCH_H_ -#define IA64_IORD 0 -#define IA64_IOWR 1 - -struct ia64_iodesc { - int port; - int width; - unsigned long val; -}; - #ifndef _KERNEL #include From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 18:42:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A85E5106568B; Mon, 11 Jan 2010 18:42:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 967CD8FC29; Mon, 11 Jan 2010 18:42:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BIgT0v043545; Mon, 11 Jan 2010 18:42:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BIgTvr043543; Mon, 11 Jan 2010 18:42:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001111842.o0BIgTvr043543@svn.freebsd.org> From: John Baldwin Date: Mon, 11 Jan 2010 18:42:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202100 - stable/8/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 18:42:29 -0000 Author: jhb Date: Mon Jan 11 18:42:29 2010 New Revision: 202100 URL: http://svn.freebsd.org/changeset/base/202100 Log: MFC 201522: Expose the upper 256 ptys in the default devfs rules. I should have updated this when expanding the old pty(4) driver to use 512 ptys by default. This is more important for 7.x. Modified: stable/8/etc/defaults/devfs.rules Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/defaults/devfs.rules ============================================================================== --- stable/8/etc/defaults/devfs.rules Mon Jan 11 18:39:11 2010 (r202099) +++ stable/8/etc/defaults/devfs.rules Mon Jan 11 18:42:29 2010 (r202100) @@ -44,6 +44,14 @@ add path 'ptyP*' unhide add path 'ptyQ*' unhide add path 'ptyR*' unhide add path 'ptyS*' unhide +add path 'ptyl*' unhide +add path 'ptym*' unhide +add path 'ptyn*' unhide +add path 'ptyo*' unhide +add path 'ptyL*' unhide +add path 'ptyM*' unhide +add path 'ptyN*' unhide +add path 'ptyO*' unhide add path 'ttyp*' unhide add path 'ttyq*' unhide add path 'ttyr*' unhide @@ -52,6 +60,14 @@ add path 'ttyP*' unhide add path 'ttyQ*' unhide add path 'ttyR*' unhide add path 'ttyS*' unhide +add path 'ttyl*' unhide +add path 'ttym*' unhide +add path 'ttyn*' unhide +add path 'ttyo*' unhide +add path 'ttyL*' unhide +add path 'ttyM*' unhide +add path 'ttyN*' unhide +add path 'ttyO*' unhide add path ptmx unhide add path pts unhide add path 'pts/*' unhide From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 18:44:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 166E5106568B; Mon, 11 Jan 2010 18:44:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04A658FC1C; Mon, 11 Jan 2010 18:44:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BIif21044074; Mon, 11 Jan 2010 18:44:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BIifA8044072; Mon, 11 Jan 2010 18:44:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001111844.o0BIifA8044072@svn.freebsd.org> From: John Baldwin Date: Mon, 11 Jan 2010 18:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202101 - stable/7/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 18:44:42 -0000 Author: jhb Date: Mon Jan 11 18:44:41 2010 New Revision: 202101 URL: http://svn.freebsd.org/changeset/base/202101 Log: MFC 201522: Expose the upper 256 ptys in the default devfs rules. I should have updated this when expanding the old pty(4) driver to use 512 ptys by default. This is more important for 7.x. Modified: stable/7/etc/defaults/devfs.rules Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/defaults/devfs.rules ============================================================================== --- stable/7/etc/defaults/devfs.rules Mon Jan 11 18:42:29 2010 (r202100) +++ stable/7/etc/defaults/devfs.rules Mon Jan 11 18:44:41 2010 (r202101) @@ -44,6 +44,14 @@ add path 'ptyP*' unhide add path 'ptyQ*' unhide add path 'ptyR*' unhide add path 'ptyS*' unhide +add path 'ptyl*' unhide +add path 'ptym*' unhide +add path 'ptyn*' unhide +add path 'ptyo*' unhide +add path 'ptyL*' unhide +add path 'ptyM*' unhide +add path 'ptyN*' unhide +add path 'ptyO*' unhide add path 'ttyp*' unhide add path 'ttyq*' unhide add path 'ttyr*' unhide @@ -52,6 +60,14 @@ add path 'ttyP*' unhide add path 'ttyQ*' unhide add path 'ttyR*' unhide add path 'ttyS*' unhide +add path 'ttyl*' unhide +add path 'ttym*' unhide +add path 'ttyn*' unhide +add path 'ttyo*' unhide +add path 'ttyL*' unhide +add path 'ttyM*' unhide +add path 'ttyN*' unhide +add path 'ttyO*' unhide add path 'pts/*' unhide add path 'pty/*' unhide add path fd unhide From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 19:04:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B69610656A3; Mon, 11 Jan 2010 19:04:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A7E68FC0A; Mon, 11 Jan 2010 19:04:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BJ4PYG048531; Mon, 11 Jan 2010 19:04:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BJ4P84048530; Mon, 11 Jan 2010 19:04:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001111904.o0BJ4P84048530@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 19:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202103 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 19:04:25 -0000 Author: imp Date: Mon Jan 11 19:04:24 2010 New Revision: 202103 URL: http://svn.freebsd.org/changeset/base/202103 Log: Using svn cp rather than cp to copy these files over had the benefit of preserving their history. It had the problem that it also copied over mergeinfo data. Since we're retiring the projects/mips branch, I'm removing the svn:mergeinfo property from them all. Submitted by: jhb Modified: Directory Properties: head/sys/conf/ldscript.mips.mips64 (props changed) head/sys/conf/ldscript.mips.octeon1.32 (props changed) head/sys/conf/ldscript.mips.octeon1.64 (props changed) head/sys/conf/ldscript.mips.octeon1.n32 (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 19:21:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDB021065692; Mon, 11 Jan 2010 19:21:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBF318FC14; Mon, 11 Jan 2010 19:21:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BJLq7T052532; Mon, 11 Jan 2010 19:21:52 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BJLq8F052531; Mon, 11 Jan 2010 19:21:52 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001111921.o0BJLq8F052531@svn.freebsd.org> From: Warner Losh Date: Mon, 11 Jan 2010 19:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202105 - in head/sys: dev/cfe dev/flash dev/siba mips/conf mips/include mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 19:21:53 -0000 Author: imp Date: Mon Jan 11 19:21:52 2010 New Revision: 202105 URL: http://svn.freebsd.org/changeset/base/202105 Log: Using svn cp rather than cp to copy these files over had the benefit of preserving their history. It had the problem that it also copied over mergeinfo data. Since we're retiring the projects/mips branch, I'm removing the svn:mergeinfo property from them all. Submitted by: jhb Modified: Directory Properties: head/sys/dev/cfe/cfe_env.c (props changed) head/sys/dev/flash/mx25l.c (props changed) head/sys/dev/flash/mx25lreg.h (props changed) head/sys/dev/siba/siba_cc.c (props changed) head/sys/mips/alchemy/ (props changed) head/sys/mips/atheros/ (props changed) head/sys/mips/cavium/ (props changed) head/sys/mips/conf/ALCHEMY (props changed) head/sys/mips/conf/AR71XX (props changed) head/sys/mips/conf/AR71XX.hints (props changed) head/sys/mips/conf/MALTA64 (props changed) head/sys/mips/conf/OCTEON1 (props changed) head/sys/mips/conf/OCTEON1-32 (props changed) head/sys/mips/conf/OCTEON1.hints (props changed) head/sys/mips/conf/SWARM (props changed) head/sys/mips/conf/SWARM.hints (props changed) head/sys/mips/conf/XLR (props changed) head/sys/mips/include/cdefs.h (props changed) head/sys/mips/include/fls64.h (props changed) head/sys/mips/mips/bus_space_generic.c (props changed) head/sys/mips/mips/elf_trampoline.c (props changed) head/sys/mips/mips/inckern.S (props changed) head/sys/mips/mips/ptrace_machdep.c (props changed) head/sys/mips/mips/sys_machdep.c (props changed) head/sys/mips/rmi/ (props changed) head/sys/mips/rmi/dev/ (props changed) head/sys/mips/sibyte/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 19:30:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 093441065694; Mon, 11 Jan 2010 19:30:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAB1F8FC12; Mon, 11 Jan 2010 19:30:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BJUN2M054509; Mon, 11 Jan 2010 19:30:23 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BJUNkR054505; Mon, 11 Jan 2010 19:30:23 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001111930.o0BJUNkR054505@svn.freebsd.org> From: Rick Macklem Date: Mon, 11 Jan 2010 19:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202106 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 19:30:24 -0000 Author: rmacklem Date: Mon Jan 11 19:30:23 2010 New Revision: 202106 URL: http://svn.freebsd.org/changeset/base/202106 Log: MFC: r201029 When porting the experimental nfs subsystem to the FreeBSD8 krpc, I added 3 functions that were already in the experimental client under different names. This patch deletes the functions in the experimental client and renames the calls to use the other set. (This is just removal of duplicated code and does not fix any bug.) Modified: stable/8/sys/fs/nfsclient/nfs.h stable/8/sys/fs/nfsclient/nfs_clbio.c stable/8/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs.h ============================================================================== --- stable/8/sys/fs/nfsclient/nfs.h Mon Jan 11 19:21:52 2010 (r202105) +++ stable/8/sys/fs/nfsclient/nfs.h Mon Jan 11 19:30:23 2010 (r202106) @@ -67,7 +67,6 @@ int ncl_vinvalbuf(struct vnode *, int, s int ncl_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *); int ncl_doio(struct vnode *, struct buf *, struct ucred *, struct thread *); -int ncl_msleep(struct thread *, void *, struct mtx *, int, char *, int); void ncl_nhinit(void); void ncl_nhuninit(void); void ncl_nodelock(struct nfsnode *); Modified: stable/8/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clbio.c Mon Jan 11 19:21:52 2010 (r202105) +++ stable/8/sys/fs/nfsclient/nfs_clbio.c Mon Jan 11 19:30:23 2010 (r202106) @@ -75,101 +75,6 @@ static int nfs_directio_write(struct vno struct ucred *cred, int ioflag); /* - * Any signal that can interrupt an NFS operation in an intr mount - * should be added to this set. SIGSTOP and SIGKILL cannot be masked. - */ -static int nfs_sig_set[] = { - SIGINT, - SIGTERM, - SIGHUP, - SIGKILL, - SIGSTOP, - SIGQUIT -}; - -#ifdef notnow -/* - * Check to see if one of the signals in our subset is pending on - * the process (in an intr mount). - */ -int -ncl_sig_pending(sigset_t set) -{ - int i; - - for (i = 0 ; i < sizeof(nfs_sig_set)/sizeof(int) ; i++) - if (SIGISMEMBER(set, nfs_sig_set[i])) - return (1); - return (0); -} -#endif - -/* - * The set/restore sigmask functions are used to (temporarily) overwrite - * the process p_sigmask during an RPC call (for example). These are also - * used in other places in the NFS client that might tsleep(). - */ -static void -ncl_set_sigmask(struct thread *td, sigset_t *oldset) -{ - sigset_t newset; - int i; - struct proc *p; - - SIGFILLSET(newset); - if (td == NULL) - td = curthread; /* XXX */ - p = td->td_proc; - /* Remove the NFS set of signals from newset */ - PROC_LOCK(p); - mtx_lock(&p->p_sigacts->ps_mtx); - for (i = 0 ; i < sizeof(nfs_sig_set)/sizeof(int) ; i++) { - /* - * But make sure we leave the ones already masked - * by the process, ie. remove the signal from the - * temporary signalmask only if it wasn't already - * in p_sigmask. - */ - if (!SIGISMEMBER(td->td_sigmask, nfs_sig_set[i]) && - !SIGISMEMBER(p->p_sigacts->ps_sigignore, nfs_sig_set[i])) - SIGDELSET(newset, nfs_sig_set[i]); - } - mtx_unlock(&p->p_sigacts->ps_mtx); - PROC_UNLOCK(p); - kern_sigprocmask(td, SIG_SETMASK, &newset, oldset, 0); -} - -static void -ncl_restore_sigmask(struct thread *td, sigset_t *set) -{ - if (td == NULL) - td = curthread; /* XXX */ - kern_sigprocmask(td, SIG_SETMASK, set, NULL, 0); -} - -/* - * NFS wrapper to msleep(), that shoves a new p_sigmask and restores the - * old one after msleep() returns. - */ -int -ncl_msleep(struct thread *td, void *ident, struct mtx *mtx, int priority, char *wmesg, int timo) -{ - sigset_t oldset; - int error; - struct proc *p; - - if ((priority & PCATCH) == 0) - return msleep(ident, mtx, priority, wmesg, timo); - if (td == NULL) - td = curthread; /* XXX */ - ncl_set_sigmask(td, &oldset); - error = msleep(ident, mtx, priority, wmesg, timo); - ncl_restore_sigmask(td, &oldset); - p = td->td_proc; - return (error); -} - -/* * Vnode op for VM getpages. */ int @@ -1356,9 +1261,9 @@ nfs_getcacheblk(struct vnode *vp, daddr_ if (nmp->nm_flag & NFSMNT_INT) { sigset_t oldset; - ncl_set_sigmask(td, &oldset); + newnfs_set_sigmask(td, &oldset); bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0); - ncl_restore_sigmask(td, &oldset); + newnfs_restore_sigmask(td, &oldset); while (bp == NULL) { if (newnfs_sigintr(nmp, td)) return (NULL); @@ -1544,9 +1449,9 @@ again: NFS_DPF(ASYNCIO, ("ncl_asyncio: waiting for mount %p queue to drain\n", nmp)); nmp->nm_bufqwant = TRUE; - error = ncl_msleep(td, &nmp->nm_bufq, &ncl_iod_mutex, - slpflag | PRIBIO, - "nfsaio", slptimeo); + error = newnfs_msleep(td, &nmp->nm_bufq, + &ncl_iod_mutex, slpflag | PRIBIO, "nfsaio", + slptimeo); if (error) { error2 = newnfs_sigintr(nmp, td); if (error2) { Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Mon Jan 11 19:21:52 2010 (r202105) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Mon Jan 11 19:30:23 2010 (r202106) @@ -2708,9 +2708,9 @@ loop: mtx_lock(&np->n_mtx); while (np->n_directio_asyncwr > 0) { np->n_flag |= NFSYNCWAIT; - error = ncl_msleep(td, (caddr_t)&np->n_directio_asyncwr, - &np->n_mtx, slpflag | (PRIBIO + 1), - "nfsfsync", 0); + error = newnfs_msleep(td, &np->n_directio_asyncwr, + &np->n_mtx, slpflag | (PRIBIO + 1), + "nfsfsync", 0); if (error) { if (newnfs_sigintr(nmp, td)) { mtx_unlock(&np->n_mtx); From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 19:48:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9593C106566C; Mon, 11 Jan 2010 19:48:09 +0000 (UTC) (envelope-from bogorodskiy@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 90DA28FC08; Mon, 11 Jan 2010 19:48:08 +0000 (UTC) Received: by bwz5 with SMTP id 5so14048307bwz.3 for ; Mon, 11 Jan 2010 11:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=et6fr3MRLdyRMmjaK7fsO9Vz4Rq1NRRIuR0mQAJHXrQ=; b=oVO0PrfLnLpLdkTSYgy8MGCRjSi220YOCAJMVO6R9OHiURZQVwY5hvGYlbxzhW6QXe WE8J2vm3V4R0YCVkItmJxsx21xkGrCYvxq0iE9alYGQwl6tV/TSOh5W4G1kujElxjy8S 0j7A2y6w7QJhKE55hH03PCPzFrLTMV4TauhEU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=YU4v7KEfyYqXgxwmUx/wxHa/0HF0MaKKKP9eMlQ6J2J8UUyAz3X0/HOwvHQlycH1MH 2Vzila4RjND1ZvOdyCStIGMeRTsopGMxJbGsXDtuRZrSoMK/xO6M1/YsM4mht0aXSmIQ 45VcSD+s7mPuS1mXpcFYuBm+cdDGo1OzK76SM= Received: by 10.204.33.147 with SMTP id h19mr3976091bkd.156.1263237604693; Mon, 11 Jan 2010 11:20:04 -0800 (PST) Received: from underworld.novel.ru (PPPoE-78-29-97-92.san.ru [78.29.97.92]) by mx.google.com with ESMTPS id 16sm9021529bwz.7.2010.01.11.11.20.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 11 Jan 2010 11:20:02 -0800 (PST) Sender: Roman Bogorodskiy Date: Mon, 11 Jan 2010 22:16:36 +0300 From: Roman Bogorodskiy To: Qing Li Message-ID: <20100111191631.GA1709@underworld.novel.ru> References: <201001081749.o08HnONs046798@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: <201001081749.o08HnONs046798@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201811 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 19:48:09 -0000 --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Qing Li wrote: > Author: qingli > Date: Fri Jan 8 17:49:24 2010 > New Revision: 201811 > URL: http://svn.freebsd.org/changeset/base/201811 >=20 > Log: > Ensure an address is removed from the interface address > list when the installation of that address fails. > =20 > PR: 139559 After this change it's indeed impossible to create a tunnel with the same peer address - file exists error raises and new tun device appears without any address assigned. However, after several attempts to do it I have almost the same behavior as described in the PR. However, I cannot provide an easy way to reproduce it after this commit. Roman Bogorodskiy --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iJwEAQECAAYFAktLeQ8ACgkQgHRbOB2qykaoQAP/dIvPKIQh+PPkd3oRipSEizP9 WhLM+OomfydNctG1zSxb+Ho+3O7ZInFrE+dYM1T6GXHgxXgaxNrIbGETA8RGl9zg TGX1b5jhsUh8okK+MGclH3vAagYI3ysYeASu7sLstx3pYcorGT2aVDf+Xlpv6jgp 0ZhPiNagNemWKnLR9pQ= =DXGG -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 19:52:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25A28106566B; Mon, 11 Jan 2010 19:52:41 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13F548FC17; Mon, 11 Jan 2010 19:52:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BJqeDp059406; Mon, 11 Jan 2010 19:52:40 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BJqe5U059404; Mon, 11 Jan 2010 19:52:40 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201001111952.o0BJqe5U059404@svn.freebsd.org> From: Kirk McKusick Date: Mon, 11 Jan 2010 19:52:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202107 - head/sbin/fsck_ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 19:52:41 -0000 Author: mckusick Date: Mon Jan 11 19:52:40 2010 New Revision: 202107 URL: http://svn.freebsd.org/changeset/base/202107 Log: When renaming a directory it passes through several intermediate states. First its new name will be created causing it to have two names (from possibly different parents). Next, if it has different parents, its value of ".." will be changed from pointing to the old parent to pointing to the new parent. Concurrently, its old name will be removed bringing it back into a consistent state. When fsck encounters an extra name for a directory, it offers to remove the "extraneous hard link"; when it finds that the names have been changed but the update to ".." has not happened, it offers to rewrite ".." to point at the correct parent. Both of these changes were considered unexpected so would cause fsck in preen mode or fsck in background mode to fail with the need to run fsck manually to fix these problems. This update changes these errors to be expected so that in preen mode fsck will simply fix these transitional errors. For now, background fsck will note these errors, but will need additional kernel support to fix them, so will simply ignore them rather than fail. A future update will allow background fsck to fix these problems. Reported by: jeff Modified: head/sbin/fsck_ffs/pass2.c Modified: head/sbin/fsck_ffs/pass2.c ============================================================================== --- head/sbin/fsck_ffs/pass2.c Mon Jan 11 19:30:23 2010 (r202106) +++ head/sbin/fsck_ffs/pass2.c Mon Jan 11 19:52:40 2010 (r202107) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #define MINDIRSIZE (sizeof (struct dirtemplate)) +static int fix_extraneous(struct inoinfo *, struct inodesc *); +static int deleteentry(struct inodesc *); static int blksort(const void *, const void *); static int pass2check(struct inodesc *); @@ -236,8 +238,6 @@ pass2check(struct inodesc *idesc) union dinode *dp; const char *errmsg; struct direct proto; - char namebuf[MAXPATHLEN + 1]; - char pathbuf[MAXPATHLEN + 1]; /* * check for "." @@ -416,27 +416,12 @@ again: case DFOUND: inp = getinoinfo(dirp->d_ino); - if (inp->i_parent != 0 && idesc->id_entryno > 2) { - getpathname(pathbuf, idesc->id_number, - idesc->id_number); - getpathname(namebuf, dirp->d_ino, dirp->d_ino); - pwarn("%s%s%s %s %s\n", pathbuf, - (strcmp(pathbuf, "/") == 0 ? "" : "/"), - dirp->d_name, - "IS AN EXTRANEOUS HARD LINK TO DIRECTORY", - namebuf); - if (cursnapshot != 0) - break; - if (preen) { - printf(" (REMOVED)\n"); - n = 1; - break; - } - if ((n = reply("REMOVE")) == 1) + if (idesc->id_entryno > 2) { + if (inp->i_parent == 0) + inp->i_parent = idesc->id_number; + else if ((n = fix_extraneous(inp, idesc)) == 1) break; } - if (idesc->id_entryno > 2) - inp->i_parent = idesc->id_number; /* FALLTHROUGH */ case FSTATE: @@ -462,6 +447,109 @@ again: return (ret|KEEPON|ALTERED); } +static int +fix_extraneous(struct inoinfo *inp, struct inodesc *idesc) +{ + struct inodesc dotdesc; + char oldname[MAXPATHLEN + 1]; + char newname[MAXPATHLEN + 1]; + + /* + * If we have not yet found "..", look it up now so we know + * which inode the directory itself believes is its parent. + */ + if (inp->i_dotdot == 0) { + memset(&dotdesc, 0, sizeof(struct inodesc)); + dotdesc.id_type = DATA; + dotdesc.id_number = idesc->id_dirp->d_ino; + dotdesc.id_func = findino; + dotdesc.id_name = strdup(".."); + if ((ckinode(ginode(dotdesc.id_number), &dotdesc) & FOUND)) + inp->i_dotdot = dotdesc.id_parent; + } + /* + * We have the previously found old name (inp->i_parent) and the + * just found new name (idesc->id_number). We have five cases: + * 1) ".." is missing - can remove either name, choose to delete + * new one and let fsck create ".." pointing to old name. + * 2) Both new and old are in same directory, choose to delete + * the new name and let fsck fix ".." if it is wrong. + * 3) ".." does not point to the new name, so delete it and let + * fsck fix ".." to point to the old one if it is wrong. + * 4) ".." points to the old name only, so delete the new one. + * 5) ".." points to the new name only, so delete the old one. + * + * For cases 1-4 we eliminate the new name; + * for case 5 we eliminate the old name. + */ + if (inp->i_dotdot == 0 || /* Case 1 */ + idesc->id_number == inp->i_parent || /* Case 2 */ + inp->i_dotdot != idesc->id_number || /* Case 3 */ + inp->i_dotdot == inp->i_parent) { /* Case 4 */ + getpathname(newname, idesc->id_number, idesc->id_number); + if (strcmp(newname, "/") != 0) + strcat (newname, "/"); + strcat(newname, idesc->id_dirp->d_name); + getpathname(oldname, inp->i_number, inp->i_number); + pwarn("%s IS AN EXTRANEOUS HARD LINK TO DIRECTORY %s\n", + newname, oldname); + if (cursnapshot != 0) { + /* + * We need to + * setcwd(idesc->id_number); + * unlink(idesc->id_dirp->d_name); + */ + printf(" (IGNORED)\n"); + return (0); + } + if (preen) { + printf(" (REMOVED)\n"); + return (1); + } + return (reply("REMOVE")); + } + /* + * None of the first four cases above, so must be case (5). + * Eliminate the old name and make the new the name the parent. + */ + getpathname(oldname, inp->i_parent, inp->i_number); + getpathname(newname, inp->i_number, inp->i_number); + pwarn("%s IS AN EXTRANEOUS HARD LINK TO DIRECTORY %s\n", oldname, + newname); + if (cursnapshot != 0) { + /* + * We need to + * setcwd(inp->i_parent); + * unlink(last component of oldname pathname); + */ + printf(" (IGNORED)\n"); + return (0); + } + if (!preen && !reply("REMOVE")) + return (0); + memset(&dotdesc, 0, sizeof(struct inodesc)); + dotdesc.id_type = DATA; + dotdesc.id_number = inp->i_parent; /* directory in which name appears */ + dotdesc.id_parent = inp->i_number; /* inode number in entry to delete */ + dotdesc.id_func = deleteentry; + if ((ckinode(ginode(dotdesc.id_number), &dotdesc) & FOUND) && preen) + printf(" (REMOVED)\n"); + inp->i_parent = idesc->id_number; /* reparent to correct directory */ + inoinfo(inp->i_number)->ino_linkcnt++; /* name gone, return reference */ + return (0); +} + +static int +deleteentry(struct inodesc *idesc) +{ + struct direct *dirp = idesc->id_dirp; + + if (idesc->id_entryno++ < 2 || dirp->d_ino != idesc->id_parent) + return (KEEPON); + dirp->d_ino = 0; + return (ALTERED|STOP|FOUND); +} + /* * Routine to sort disk blocks. */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 20:05:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4931B106566B; Mon, 11 Jan 2010 20:05:39 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379D18FC0C; Mon, 11 Jan 2010 20:05:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BK5dKM062428; Mon, 11 Jan 2010 20:05:39 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BK5dCQ062426; Mon, 11 Jan 2010 20:05:39 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201001112005.o0BK5dCQ062426@svn.freebsd.org> From: Kirk McKusick Date: Mon, 11 Jan 2010 20:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202109 - head/sbin/fsck_ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 20:05:39 -0000 Author: mckusick Date: Mon Jan 11 20:05:38 2010 New Revision: 202109 URL: http://svn.freebsd.org/changeset/base/202109 Log: This update utilizes new fsck sysctl commands that allow fsck running in background mode to correct expected inconsistencies that arise during directory rename (see immediately previous update to this file for details). If run on a kernel without the new functionality, background fsck will simply ignore these inconsistencies rather than fail. Reported by: jeff Modified: head/sbin/fsck_ffs/pass2.c Modified: head/sbin/fsck_ffs/pass2.c ============================================================================== --- head/sbin/fsck_ffs/pass2.c Mon Jan 11 19:59:12 2010 (r202108) +++ head/sbin/fsck_ffs/pass2.c Mon Jan 11 20:05:38 2010 (r202109) @@ -36,12 +36,14 @@ static const char sccsid[] = "@(#)pass2. __FBSDID("$FreeBSD$"); #include +#include #include #include #include #include +#include #include #include @@ -214,9 +216,48 @@ pass2(void) inoinfo(inp->i_parent)->ino_linkcnt--; continue; } - fileerror(inp->i_parent, inp->i_number, - "BAD INODE NUMBER FOR '..'"); - if (reply("FIX") == 0) + /* + * Here we have: + * inp->i_number is directory with bad ".." in it. + * inp->i_dotdot is current value of "..". + * inp->i_parent is directory to which ".." should point. + */ + getpathname(pathbuf, inp->i_parent, inp->i_number); + printf("BAD INODE NUMBER FOR '..' in DIR I=%d (%s)\n", + inp->i_number, pathbuf); + getpathname(pathbuf, inp->i_dotdot, inp->i_dotdot); + printf("CURRENTLY POINTS TO I=%d (%s), ", inp->i_dotdot, + pathbuf); + getpathname(pathbuf, inp->i_parent, inp->i_parent); + printf("SHOULD POINT TO I=%d (%s)", inp->i_parent, pathbuf); + if (cursnapshot != 0) { + /* + * We need to: + * setcwd(inp->i_number); + * setdotdot(inp->i_dotdot, inp->i_parent); + */ + cmd.value = inp->i_number; + if (sysctlbyname("vfs.ffs.setcwd", 0, 0, + &cmd, sizeof cmd) == -1) { + /* kernel lacks support for these functions */ + printf(" (IGNORED)\n"); + continue; + } + cmd.value = inp->i_dotdot; /* verify same value */ + cmd.size = inp->i_parent; /* new parent */ + if (sysctlbyname("vfs.ffs.setdotdot", 0, 0, + &cmd, sizeof cmd) == -1) { + printf(" (FIX FAILED: %s)\n", strerror(errno)); + continue; + } + printf(" (FIXED)\n"); + inoinfo(inp->i_parent)->ino_linkcnt--; + inp->i_dotdot = inp->i_parent; + continue; + } + if (preen) + printf(" (FIXED)\n"); + else if (reply("FIX") == 0) continue; inoinfo(inp->i_dotdot)->ino_linkcnt++; inoinfo(inp->i_parent)->ino_linkcnt--; @@ -450,6 +491,7 @@ again: static int fix_extraneous(struct inoinfo *inp, struct inodesc *idesc) { + char *cp; struct inodesc dotdesc; char oldname[MAXPATHLEN + 1]; char newname[MAXPATHLEN + 1]; @@ -491,7 +533,7 @@ fix_extraneous(struct inoinfo *inp, stru strcat (newname, "/"); strcat(newname, idesc->id_dirp->d_name); getpathname(oldname, inp->i_number, inp->i_number); - pwarn("%s IS AN EXTRANEOUS HARD LINK TO DIRECTORY %s\n", + pwarn("%s IS AN EXTRANEOUS HARD LINK TO DIRECTORY %s", newname, oldname); if (cursnapshot != 0) { /* @@ -499,7 +541,21 @@ fix_extraneous(struct inoinfo *inp, stru * setcwd(idesc->id_number); * unlink(idesc->id_dirp->d_name); */ - printf(" (IGNORED)\n"); + cmd.value = idesc->id_number; + if (sysctlbyname("vfs.ffs.setcwd", 0, 0, + &cmd, sizeof cmd) == -1) { + printf(" (IGNORED)\n"); + return (0); + } + cmd.value = (int)idesc->id_dirp->d_name; + cmd.size = inp->i_number; /* verify same name */ + if (sysctlbyname("vfs.ffs.unlink", 0, 0, + &cmd, sizeof cmd) == -1) { + printf(" (UNLINK FAILED: %s)\n", + strerror(errno)); + return (0); + } + printf(" (REMOVED)\n"); return (0); } if (preen) { @@ -514,7 +570,7 @@ fix_extraneous(struct inoinfo *inp, stru */ getpathname(oldname, inp->i_parent, inp->i_number); getpathname(newname, inp->i_number, inp->i_number); - pwarn("%s IS AN EXTRANEOUS HARD LINK TO DIRECTORY %s\n", oldname, + pwarn("%s IS AN EXTRANEOUS HARD LINK TO DIRECTORY %s", oldname, newname); if (cursnapshot != 0) { /* @@ -522,7 +578,26 @@ fix_extraneous(struct inoinfo *inp, stru * setcwd(inp->i_parent); * unlink(last component of oldname pathname); */ - printf(" (IGNORED)\n"); + cmd.value = inp->i_parent; + if (sysctlbyname("vfs.ffs.setcwd", 0, 0, + &cmd, sizeof cmd) == -1) { + printf(" (IGNORED)\n"); + return (0); + } + if ((cp = rindex(oldname, '/')) == NULL) { + printf(" (IGNORED)\n"); + return (0); + } + cmd.value = (int)(cp + 1); + cmd.size = inp->i_number; /* verify same name */ + if (sysctlbyname("vfs.ffs.unlink", 0, 0, + &cmd, sizeof cmd) == -1) { + printf(" (UNLINK FAILED: %s)\n", + strerror(errno)); + return (0); + } + printf(" (REMOVED)\n"); + inp->i_parent = idesc->id_number; /* reparent to correct dir */ return (0); } if (!preen && !reply("REMOVE")) From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 20:23:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54CC1106568F; Mon, 11 Jan 2010 20:23:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 257A98FC14; Mon, 11 Jan 2010 20:23:37 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CA72446B35; Mon, 11 Jan 2010 15:23:36 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 2D9988A01F; Mon, 11 Jan 2010 15:23:22 -0500 (EST) From: John Baldwin To: Warner Losh Date: Mon, 11 Jan 2010 14:51:14 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091231; KDE/4.3.1; amd64; ; ) References: <201001111921.o0BJLq8F052531@svn.freebsd.org> In-Reply-To: <201001111921.o0BJLq8F052531@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201001111451.14694.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 11 Jan 2010 15:23:36 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202105 - in head/sys: dev/cfe dev/flash dev/siba mips/conf mips/include mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 20:23:37 -0000 On Monday 11 January 2010 2:21:52 pm Warner Losh wrote: > Author: imp > Date: Mon Jan 11 19:21:52 2010 > New Revision: 202105 > URL: http://svn.freebsd.org/changeset/base/202105 > > Log: > Using svn cp rather than cp to copy these files over had the benefit > of preserving their history. It had the problem that it also copied > over mergeinfo data. Since we're retiring the projects/mips branch, > I'm removing the svn:mergeinfo property from them all. > > Submitted by: jhb Thanks. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 20:32:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F0451065672; Mon, 11 Jan 2010 20:32:51 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C7828FC18; Mon, 11 Jan 2010 20:32:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BKWpat068677; Mon, 11 Jan 2010 20:32:51 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BKWpV6068674; Mon, 11 Jan 2010 20:32:51 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001112032.o0BKWpV6068674@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 11 Jan 2010 20:32:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202112 - stable/8/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 20:32:51 -0000 Author: gallatin Date: Mon Jan 11 20:32:51 2010 New Revision: 202112 URL: http://svn.freebsd.org/changeset/base/202112 Log: Sync mxge(4) with head: r197391: Add support for TX throttling r198250: Move mxge(4)'s NIC watchdog reset handler from a callout to a taskqueue r198303: Make mxge do a better job recovering from NIC h/w faults r200845: Don't take the driver mutex in mxge_tick() r201758: Remove extraneous semicolons Modified: stable/8/sys/dev/mxge/if_mxge.c stable/8/sys/dev/mxge/if_mxge_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/8/sys/dev/mxge/if_mxge.c Mon Jan 11 20:23:17 2010 (r202111) +++ stable/8/sys/dev/mxge/if_mxge.c Mon Jan 11 20:32:51 2010 (r202112) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* count xmits ourselves, rather than via drbr */ #define NO_SLOW_STATS @@ -106,6 +107,7 @@ static int mxge_max_slices = 1; static int mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; static int mxge_always_promisc = 0; static int mxge_initial_mtu = ETHERMTU_JUMBO; +static int mxge_throttle = 0; static char *mxge_fw_unaligned = "mxge_ethp_z8e"; static char *mxge_fw_aligned = "mxge_eth_z8e"; static char *mxge_fw_rss_aligned = "mxge_rss_eth_z8e"; @@ -596,10 +598,13 @@ static int mxge_select_firmware(mxge_softc_t *sc) { int aligned = 0; + int force_firmware = mxge_force_firmware; + if (sc->throttle) + force_firmware = sc->throttle; - if (mxge_force_firmware != 0) { - if (mxge_force_firmware == 1) + if (force_firmware != 0) { + if (force_firmware == 1) aligned = 1; else aligned = 0; @@ -1313,10 +1318,48 @@ mxge_reset(mxge_softc_t *sc, int interru mxge_change_promisc(sc, sc->ifp->if_flags & IFF_PROMISC); mxge_change_pause(sc, sc->pause); mxge_set_multicast_list(sc); + if (sc->throttle) { + cmd.data0 = sc->throttle; + if (mxge_send_cmd(sc, MXGEFW_CMD_SET_THROTTLE_FACTOR, + &cmd)) { + device_printf(sc->dev, + "can't enable throttle\n"); + } + } return status; } static int +mxge_change_throttle(SYSCTL_HANDLER_ARGS) +{ + mxge_cmd_t cmd; + mxge_softc_t *sc; + int err; + unsigned int throttle; + + sc = arg1; + throttle = sc->throttle; + err = sysctl_handle_int(oidp, &throttle, arg2, req); + if (err != 0) { + return err; + } + + if (throttle == sc->throttle) + return 0; + + if (throttle < MXGE_MIN_THROTTLE || throttle > MXGE_MAX_THROTTLE) + return EINVAL; + + mtx_lock(&sc->driver_mtx); + cmd.data0 = throttle; + err = mxge_send_cmd(sc, MXGEFW_CMD_SET_THROTTLE_FACTOR, &cmd); + if (err == 0) + sc->throttle = throttle; + mtx_unlock(&sc->driver_mtx); + return err; +} + +static int mxge_change_intr_coal(SYSCTL_HANDLER_ARGS) { mxge_softc_t *sc; @@ -1508,6 +1551,12 @@ mxge_add_sysctls(mxge_softc_t *sc) "I", "interrupt coalescing delay in usecs"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, + "throttle", + CTLTYPE_INT|CTLFLAG_RW, sc, + 0, mxge_change_throttle, + "I", "transmit throttling"); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "flow_control_enabled", CTLTYPE_INT|CTLFLAG_RW, sc, 0, mxge_change_flow_control, @@ -3591,7 +3640,6 @@ mxge_open(mxge_softc_t *sc) #endif sc->ifp->if_drv_flags |= IFF_DRV_RUNNING; sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); return 0; @@ -3612,7 +3660,6 @@ mxge_close(mxge_softc_t *sc, int down) int slice; #endif - callout_stop(&sc->co_hdl); #ifdef IFNET_BUF_RING for (slice = 0; slice < sc->num_slices; slice++) { ss = &sc->ss[slice]; @@ -3691,12 +3738,11 @@ mxge_read_reboot(mxge_softc_t *sc) return (pci_read_config(dev, vs + 0x14, 4)); } -static int -mxge_watchdog_reset(mxge_softc_t *sc, int slice) +static void +mxge_watchdog_reset(mxge_softc_t *sc) { struct pci_devinfo *dinfo; struct mxge_slice_state *ss; - mxge_tx_ring_t *tx; int err, running, s, num_tx_slices = 1; uint32_t reboot; uint16_t cmd; @@ -3723,7 +3769,6 @@ mxge_watchdog_reset(mxge_softc_t *sc, in cmd = pci_read_config(sc->dev, PCIR_COMMAND, 2); if (cmd == 0xffff) { device_printf(sc->dev, "NIC disappeared!\n"); - return (err); } } if ((cmd & PCIM_CMD_BUSMASTEREN) == 0) { @@ -3782,24 +3827,43 @@ mxge_watchdog_reset(mxge_softc_t *sc, in } sc->watchdog_resets++; } else { - tx = &sc->ss[slice].tx; device_printf(sc->dev, - "NIC did not reboot, slice %d ring state:\n", - slice); - device_printf(sc->dev, - "tx.req=%d tx.done=%d, tx.queue_active=%d\n", - tx->req, tx->done, tx->queue_active); - device_printf(sc->dev, "tx.activate=%d tx.deactivate=%d\n", - tx->activate, tx->deactivate); - device_printf(sc->dev, "pkt_done=%d fw=%d\n", - tx->pkt_done, - be32toh(sc->ss->fw_stats->send_done_count)); - device_printf(sc->dev, "not resetting\n"); + "NIC did not reboot, not resetting\n"); + err = 0; } - if (err) + if (err) { device_printf(sc->dev, "watchdog reset failed\n"); + } else { + if (sc->dying == 2) + sc->dying = 0; + callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); + } +} - return (err); +static void +mxge_watchdog_task(void *arg, int pending) +{ + mxge_softc_t *sc = arg; + + + mtx_lock(&sc->driver_mtx); + mxge_watchdog_reset(sc); + mtx_unlock(&sc->driver_mtx); +} + +static void +mxge_warn_stuck(mxge_softc_t *sc, mxge_tx_ring_t *tx, int slice) +{ + tx = &sc->ss[slice].tx; + device_printf(sc->dev, "slice %d struck? ring state:\n", slice); + device_printf(sc->dev, + "tx.req=%d tx.done=%d, tx.queue_active=%d\n", + tx->req, tx->done, tx->queue_active); + device_printf(sc->dev, "tx.activate=%d tx.deactivate=%d\n", + tx->activate, tx->deactivate); + device_printf(sc->dev, "pkt_done=%d fw=%d\n", + tx->pkt_done, + be32toh(sc->ss->fw_stats->send_done_count)); } static int @@ -3823,8 +3887,11 @@ mxge_watchdog(mxge_softc_t *sc) tx->watchdog_req != tx->watchdog_done && tx->done == tx->watchdog_done) { /* check for pause blocking before resetting */ - if (tx->watchdog_rx_pause == rx_pause) - err = mxge_watchdog_reset(sc, i); + if (tx->watchdog_rx_pause == rx_pause) { + mxge_warn_stuck(sc, tx, i); + taskqueue_enqueue(sc->tq, &sc->watchdog_task); + return (ENXIO); + } else device_printf(sc->dev, "Flow control blocking " "xmits, check link partner\n"); @@ -3840,10 +3907,11 @@ mxge_watchdog(mxge_softc_t *sc) return (err); } -static void +static u_long mxge_update_stats(mxge_softc_t *sc) { struct mxge_slice_state *ss; + u_long pkts = 0; u_long ipackets = 0; u_long opackets = 0; #ifdef IFNET_BUF_RING @@ -3865,6 +3933,8 @@ mxge_update_stats(mxge_softc_t *sc) #endif oerrors += ss->oerrors; } + pkts = (ipackets - sc->ifp->if_ipackets); + pkts += (opackets - sc->ifp->if_opackets); sc->ifp->if_ipackets = ipackets; sc->ifp->if_opackets = opackets; #ifdef IFNET_BUF_RING @@ -3873,23 +3943,43 @@ mxge_update_stats(mxge_softc_t *sc) sc->ifp->if_snd.ifq_drops = odrops; #endif sc->ifp->if_oerrors = oerrors; + return pkts; } static void mxge_tick(void *arg) { mxge_softc_t *sc = arg; + u_long pkts = 0; int err = 0; + int running, ticks; + uint16_t cmd; - /* aggregate stats from different slices */ - mxge_update_stats(sc); - if (!sc->watchdog_countdown) { - err = mxge_watchdog(sc); - sc->watchdog_countdown = 4; + ticks = mxge_ticks; + running = sc->ifp->if_drv_flags & IFF_DRV_RUNNING; + if (running) { + /* aggregate stats from different slices */ + pkts = mxge_update_stats(sc); + if (!sc->watchdog_countdown) { + err = mxge_watchdog(sc); + sc->watchdog_countdown = 4; + } + sc->watchdog_countdown--; + } + if (pkts == 0) { + /* ensure NIC did not suffer h/w fault while idle */ + cmd = pci_read_config(sc->dev, PCIR_COMMAND, 2); + if ((cmd & PCIM_CMD_BUSMASTEREN) == 0) { + sc->dying = 2; + taskqueue_enqueue(sc->tq, &sc->watchdog_task); + err = ENXIO; + } + /* look less often if NIC is idle */ + ticks *= 4; } - sc->watchdog_countdown--; + if (err == 0) - callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); + callout_reset(&sc->co_hdl, ticks, mxge_tick, sc); } @@ -4044,6 +4134,7 @@ mxge_ioctl(struct ifnet *ifp, u_long com default: err = ENOTTY; } + return err; } @@ -4070,6 +4161,7 @@ mxge_fetch_tunables(mxge_softc_t *sc) TUNABLE_INT_FETCH("hw.mxge.rss_hash_type", &mxge_rss_hash_type); TUNABLE_INT_FETCH("hw.mxge.rss_hashtype", &mxge_rss_hash_type); TUNABLE_INT_FETCH("hw.mxge.initial_mtu", &mxge_initial_mtu); + TUNABLE_INT_FETCH("hw.mxge.throttle", &mxge_throttle); if (sc->lro_cnt != 0) mxge_lro_cnt = sc->lro_cnt; @@ -4087,6 +4179,12 @@ mxge_fetch_tunables(mxge_softc_t *sc) if (mxge_initial_mtu > ETHERMTU_JUMBO || mxge_initial_mtu < ETHER_MIN_LEN) mxge_initial_mtu = ETHERMTU_JUMBO; + + if (mxge_throttle && mxge_throttle > MXGE_MAX_THROTTLE) + mxge_throttle = MXGE_MAX_THROTTLE; + if (mxge_throttle && mxge_throttle < MXGE_MIN_THROTTLE) + mxge_throttle = MXGE_MIN_THROTTLE; + sc->throttle = mxge_throttle; } @@ -4503,6 +4601,17 @@ mxge_attach(device_t dev) sc->dev = dev; mxge_fetch_tunables(sc); + TASK_INIT(&sc->watchdog_task, 1, mxge_watchdog_task, sc); + sc->tq = taskqueue_create_fast("mxge_taskq", M_WAITOK, + taskqueue_thread_enqueue, + &sc->tq); + if (sc->tq == NULL) { + err = ENOMEM; + goto abort_with_nothing; + } + taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", + device_get_nameunit(sc->dev)); + err = bus_dma_tag_create(NULL, /* parent */ 1, /* alignment */ 0, /* boundary */ @@ -4519,7 +4628,7 @@ mxge_attach(device_t dev) if (err != 0) { device_printf(sc->dev, "Err %d allocating parent dmat\n", err); - goto abort_with_nothing; + goto abort_with_tq; } ifp = sc->ifp = if_alloc(IFT_ETHER); @@ -4660,6 +4769,7 @@ mxge_attach(device_t dev) ifp->if_transmit = mxge_transmit; ifp->if_qflush = mxge_qflush; #endif + callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); return 0; abort_with_rings: @@ -4681,7 +4791,12 @@ abort_with_lock: if_free(ifp); abort_with_parent_dmat: bus_dma_tag_destroy(sc->parent_dmat); - +abort_with_tq: + if (sc->tq != NULL) { + taskqueue_drain(sc->tq, &sc->watchdog_task); + taskqueue_free(sc->tq); + sc->tq = NULL; + } abort_with_nothing: return err; } @@ -4702,6 +4817,11 @@ mxge_detach(device_t dev) mxge_close(sc, 0); mtx_unlock(&sc->driver_mtx); ether_ifdetach(sc->ifp); + if (sc->tq != NULL) { + taskqueue_drain(sc->tq, &sc->watchdog_task); + taskqueue_free(sc->tq); + sc->tq = NULL; + } callout_drain(&sc->co_hdl); ifmedia_removeall(&sc->media); mxge_dummy_rdma(sc, 0); Modified: stable/8/sys/dev/mxge/if_mxge_var.h ============================================================================== --- stable/8/sys/dev/mxge/if_mxge_var.h Mon Jan 11 20:23:17 2010 (r202111) +++ stable/8/sys/dev/mxge/if_mxge_var.h Mon Jan 11 20:32:51 2010 (r202112) @@ -261,6 +261,7 @@ struct mxge_softc { int fw_multicast_support; int link_width; int max_mtu; + int throttle; int tx_defrag; int media_flags; int need_media_probe; @@ -269,6 +270,8 @@ struct mxge_softc { int dying; mxge_dma_t dmabench_dma; struct callout co_hdl; + struct taskqueue *tq; + struct task watchdog_task; struct sysctl_oid *slice_sysctl_tree; struct sysctl_ctx_list slice_sysctl_ctx; char *mac_addr_string; @@ -287,6 +290,8 @@ struct mxge_softc { #define MXGE_PCI_REV_Z8ES 1 #define MXGE_XFP_COMPLIANCE_BYTE 131 #define MXGE_SFP_COMPLIANCE_BYTE 3 +#define MXGE_MIN_THROTTLE 416 +#define MXGE_MAX_THROTTLE 4096 #define MXGE_HIGHPART_TO_U32(X) \ (sizeof (X) == 8) ? ((uint32_t)((uint64_t)(X) >> 32)) : (0) From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 20:44:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D641E106566C; Mon, 11 Jan 2010 20:44:05 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C38328FC08; Mon, 11 Jan 2010 20:44:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BKi5iY071241; Mon, 11 Jan 2010 20:44:05 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BKi5s3071234; Mon, 11 Jan 2010 20:44:05 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201001112044.o0BKi5s3071234@svn.freebsd.org> From: Kirk McKusick Date: Mon, 11 Jan 2010 20:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202113 - in head/sys: compat/linux kern sys ufs/ffs ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 20:44:05 -0000 Author: mckusick Date: Mon Jan 11 20:44:05 2010 New Revision: 202113 URL: http://svn.freebsd.org/changeset/base/202113 Log: Background: When renaming a directory it passes through several intermediate states. First its new name will be created causing it to have two names (from possibly different parents). Next, if it has different parents, its value of ".." will be changed from pointing to the old parent to pointing to the new parent. Concurrently, its old name will be removed bringing it back into a consistent state. When fsck encounters an extra name for a directory, it offers to remove the "extraneous hard link"; when it finds that the names have been changed but the update to ".." has not happened, it offers to rewrite ".." to point at the correct parent. Both of these changes were considered unexpected so would cause fsck in preen mode or fsck in background mode to fail with the need to run fsck manually to fix these problems. Fsck running in preen mode or background mode now corrects these expected inconsistencies that arise during directory rename. The functionality added with this update is used by fsck running in background mode to make these fixes. Solution: This update adds three new fsck sysctl commands to support background fsck in correcting expected inconsistencies that arise from incomplete directory rename operations. They are: setcwd(dirinode) - set the current directory to dirinode in the filesystem associated with the snapshot. setdotdot(oldvalue, newvalue) - Verify that the inode number for ".." in the current directory is oldvalue then change it to newvalue. unlink(nameptr, oldvalue) - Verify that the inode number associated with nameptr in the current directory is oldvalue then unlink it. As with all other fsck sysctls, these new ones may only be used by processes with appropriate priviledge. Reported by: jeff Security issues: rwatson Modified: head/sys/compat/linux/linux_file.c head/sys/kern/vfs_syscalls.c head/sys/sys/syscallsubr.h head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/fs.h head/sys/ufs/ufs/ufs_lookup.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Mon Jan 11 20:32:51 2010 (r202112) +++ head/sys/compat/linux/linux_file.c Mon Jan 11 20:44:05 2010 (r202113) @@ -652,7 +652,7 @@ linux_unlinkat(struct thread *td, struct if (args->flag & LINUX_AT_REMOVEDIR) error = kern_rmdirat(td, dfd, path, UIO_SYSSPACE); else - error = kern_unlinkat(td, dfd, path, UIO_SYSSPACE); + error = kern_unlinkat(td, dfd, path, UIO_SYSSPACE, 0); if (error == EPERM && !(args->flag & LINUX_AT_REMOVEDIR)) { /* Introduce POSIX noncompliant behaviour of Linux */ if (kern_statat(td, AT_SYMLINK_NOFOLLOW, dfd, path, Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Jan 11 20:32:51 2010 (r202112) +++ head/sys/kern/vfs_syscalls.c Mon Jan 11 20:44:05 2010 (r202113) @@ -1815,23 +1815,25 @@ unlinkat(struct thread *td, struct unlin if (flag & AT_REMOVEDIR) return (kern_rmdirat(td, fd, path, UIO_USERSPACE)); else - return (kern_unlinkat(td, fd, path, UIO_USERSPACE)); + return (kern_unlinkat(td, fd, path, UIO_USERSPACE, 0)); } int kern_unlink(struct thread *td, char *path, enum uio_seg pathseg) { - return (kern_unlinkat(td, AT_FDCWD, path, pathseg)); + return (kern_unlinkat(td, AT_FDCWD, path, pathseg, 0)); } int -kern_unlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg) +kern_unlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, + ino_t oldinum) { struct mount *mp; struct vnode *vp; int error; struct nameidata nd; + struct stat sb; int vfslocked; restart: @@ -1842,9 +1844,13 @@ restart: return (error == EINVAL ? EPERM : error); vfslocked = NDHASGIANT(&nd); vp = nd.ni_vp; - if (vp->v_type == VDIR) + if (vp->v_type == VDIR && oldinum == 0) { error = EPERM; /* POSIX */ - else { + } else if (oldinum != 0 && + ((error = vn_stat(vp, &sb, td->td_ucred, NOCRED, td)) == 0) && + sb.st_ino != oldinum) { + error = EIDRM; /* Identifier removed */ + } else { /* * The root of a mounted filesystem cannot be deleted. * Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Mon Jan 11 20:32:51 2010 (r202112) +++ head/sys/sys/syscallsubr.h Mon Jan 11 20:44:05 2010 (r202113) @@ -212,7 +212,7 @@ int kern_truncate(struct thread *td, cha off_t length); int kern_unlink(struct thread *td, char *path, enum uio_seg pathseg); int kern_unlinkat(struct thread *td, int fd, char *path, - enum uio_seg pathseg); + enum uio_seg pathseg, ino_t oldinum); int kern_utimes(struct thread *td, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); int kern_utimesat(struct thread *td, int fd, char *path, Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Mon Jan 11 20:32:51 2010 (r202112) +++ head/sys/ufs/ffs/ffs_alloc.c Mon Jan 11 20:44:05 2010 (r202113) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -76,9 +77,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include + +#include #include #include #include @@ -2328,7 +2333,7 @@ ffs_fserr(fs, inum, cp) /* * This function provides the capability for the fsck program to - * update an active filesystem. Eleven operations are provided: + * update an active filesystem. Fourteen operations are provided: * * adjrefcnt(inode, amt) - adjusts the reference count on the * specified inode by the specified amount. Under normal @@ -2349,6 +2354,12 @@ ffs_fserr(fs, inum, cp) * as in use. * setflags(flags, set/clear) - the fs_flags field has the specified * flags set (second parameter +1) or cleared (second parameter -1). + * setcwd(dirinode) - set the current directory to dirinode in the + * filesystem associated with the snapshot. + * setdotdot(oldvalue, newvalue) - Verify that the inode number for ".." + * in the current directory is oldvalue then change it to newvalue. + * unlink(nameptr, oldvalue) - Verify that the inode number associated + * with nameptr in the current directory is oldvalue then unlink it. */ static int sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS); @@ -2386,6 +2397,15 @@ static SYSCTL_NODE(_vfs_ffs, FFS_BLK_FRE static SYSCTL_NODE(_vfs_ffs, FFS_SET_FLAGS, setflags, CTLFLAG_WR, sysctl_ffs_fsck, "Change Filesystem Flags"); +static SYSCTL_NODE(_vfs_ffs, FFS_SET_CWD, setcwd, CTLFLAG_WR, + sysctl_ffs_fsck, "Set Current Working Directory"); + +static SYSCTL_NODE(_vfs_ffs, FFS_SET_DOTDOT, setdotdot, CTLFLAG_WR, + sysctl_ffs_fsck, "Change Value of .. Entry"); + +static SYSCTL_NODE(_vfs_ffs, FFS_UNLINK, unlink, CTLFLAG_WR, + sysctl_ffs_fsck, "Unlink a Duplicate Name"); + #ifdef DEBUG static int fsckcmds = 0; SYSCTL_INT(_debug, OID_AUTO, fsckcmds, CTLFLAG_RW, &fsckcmds, 0, ""); @@ -2394,16 +2414,18 @@ SYSCTL_INT(_debug, OID_AUTO, fsckcmds, C static int sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) { + struct thread *td = curthread; struct fsck_cmd cmd; struct ufsmount *ump; - struct vnode *vp; - struct inode *ip; + struct vnode *vp, *vpold, *dvp, *fdvp; + struct inode *ip, *dp; struct mount *mp; struct fs *fs; ufs2_daddr_t blkno; long blkcnt, blksize; + struct filedesc *fdp; struct file *fp; - int filetype, error; + int vfslocked, filetype, error; if (req->newlen > sizeof cmd) return (EBADRPC); @@ -2413,15 +2435,20 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) return (ERPCMISMATCH); if ((error = getvnode(curproc->p_fd, cmd.handle, &fp)) != 0) return (error); - vn_start_write(fp->f_data, &mp, V_WAIT); + vp = fp->f_data; + if (vp->v_type != VREG && vp->v_type != VDIR) { + fdrop(fp, td); + return (EINVAL); + } + vn_start_write(vp, &mp, V_WAIT); if (mp == 0 || strncmp(mp->mnt_stat.f_fstypename, "ufs", MFSNAMELEN)) { vn_finished_write(mp); - fdrop(fp, curthread); + fdrop(fp, td); return (EINVAL); } if (mp->mnt_flag & MNT_RDONLY) { vn_finished_write(mp); - fdrop(fp, curthread); + fdrop(fp, td); return (EROFS); } ump = VFSTOUFS(mp); @@ -2553,6 +2580,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) #endif /* DEBUG */ fs->fs_cstotal.cs_ndir += cmd.value; break; + case FFS_ADJ_NBFREE: #ifdef DEBUG if (fsckcmds) { @@ -2562,6 +2590,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) #endif /* DEBUG */ fs->fs_cstotal.cs_nbfree += cmd.value; break; + case FFS_ADJ_NIFREE: #ifdef DEBUG if (fsckcmds) { @@ -2571,6 +2600,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) #endif /* DEBUG */ fs->fs_cstotal.cs_nifree += cmd.value; break; + case FFS_ADJ_NFFREE: #ifdef DEBUG if (fsckcmds) { @@ -2580,6 +2610,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) #endif /* DEBUG */ fs->fs_cstotal.cs_nffree += cmd.value; break; + case FFS_ADJ_NUMCLUSTERS: #ifdef DEBUG if (fsckcmds) { @@ -2590,6 +2621,91 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) fs->fs_cstotal.cs_numclusters += cmd.value; break; + case FFS_SET_CWD: +#ifdef DEBUG + if (fsckcmds) { + printf("%s: set current directory to inode %jd\n", + mp->mnt_stat.f_mntonname, (intmax_t)cmd.value); + } +#endif /* DEBUG */ + if ((error = ffs_vget(mp, (ino_t)cmd.value, LK_SHARED, &vp))) + break; + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + AUDIT_ARG_VNODE1(vp); + if ((error = change_dir(vp, td)) != 0) { + vput(vp); + VFS_UNLOCK_GIANT(vfslocked); + break; + } + VOP_UNLOCK(vp, 0); + VFS_UNLOCK_GIANT(vfslocked); + fdp = td->td_proc->p_fd; + FILEDESC_XLOCK(fdp); + vpold = fdp->fd_cdir; + fdp->fd_cdir = vp; + FILEDESC_XUNLOCK(fdp); + vfslocked = VFS_LOCK_GIANT(vpold->v_mount); + vrele(vpold); + VFS_UNLOCK_GIANT(vfslocked); + break; + + case FFS_SET_DOTDOT: +#ifdef DEBUG + if (fsckcmds) { + printf("%s: change .. in cwd from %jd to %jd\n", + mp->mnt_stat.f_mntonname, (intmax_t)cmd.value, + (intmax_t)cmd.size); + } +#endif /* DEBUG */ + /* + * First we have to get and lock the parent directory + * to which ".." points. + */ + error = ffs_vget(mp, (ino_t)cmd.value, LK_EXCLUSIVE, &fdvp); + if (error) + break; + /* + * Now we get and lock the child directory containing "..". + */ + FILEDESC_SLOCK(td->td_proc->p_fd); + dvp = td->td_proc->p_fd->fd_cdir; + FILEDESC_SUNLOCK(td->td_proc->p_fd); + if ((error = vget(dvp, LK_EXCLUSIVE, td)) != 0) { + vput(fdvp); + break; + } + dp = VTOI(dvp); + dp->i_offset = 12; /* XXX mastertemplate.dot_reclen */ + error = ufs_dirrewrite(dp, VTOI(fdvp), (ino_t)cmd.size, + DT_DIR, 0); + cache_purge(fdvp); + cache_purge(dvp); + vput(dvp); + vput(fdvp); + break; + + case FFS_UNLINK: +#ifdef DEBUG + if (fsckcmds) { + char buf[32]; + + if (copyinstr((char *)(int)cmd.value, buf, 32, NULL)) + strncpy(buf, "Name_too_long", 32); + printf("%s: unlink %s (inode %jd)\n", + mp->mnt_stat.f_mntonname, buf, (intmax_t)cmd.size); + } +#endif /* DEBUG */ + /* + * kern_unlinkat will do its own start/finish writes and + * they do not nest, so drop ours here. Setting mp == NULL + * indicates that vn_finished_write is not needed down below. + */ + vn_finished_write(mp); + mp = NULL; + error = kern_unlinkat(td, AT_FDCWD, (char *)(int)cmd.value, + UIO_USERSPACE, (ino_t)cmd.size); + break; + default: #ifdef DEBUG if (fsckcmds) { @@ -2601,7 +2717,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) break; } - fdrop(fp, curthread); + fdrop(fp, td); vn_finished_write(mp); return (error); } Modified: head/sys/ufs/ffs/fs.h ============================================================================== --- head/sys/ufs/ffs/fs.h Mon Jan 11 20:32:51 2010 (r202112) +++ head/sys/ufs/ffs/fs.h Mon Jan 11 20:44:05 2010 (r202113) @@ -211,7 +211,10 @@ #define FFS_ADJ_NIFREE 9 /* adjust number of free inodes */ #define FFS_ADJ_NFFREE 10 /* adjust number of free frags */ #define FFS_ADJ_NUMCLUSTERS 11 /* adjust number of free clusters */ -#define FFS_MAXID 12 /* number of valid ffs ids */ +#define FFS_SET_CWD 12 /* set current directory */ +#define FFS_SET_DOTDOT 13 /* set inode number for ".." */ +#define FFS_UNLINK 14 /* remove a name in the filesystem */ +#define FFS_MAXID 15 /* number of valid ffs ids */ /* * Command structure passed in to the filesystem to adjust filesystem values. Modified: head/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- head/sys/ufs/ufs/ufs_lookup.c Mon Jan 11 20:32:51 2010 (r202112) +++ head/sys/ufs/ufs/ufs_lookup.c Mon Jan 11 20:44:05 2010 (r202113) @@ -1224,6 +1224,11 @@ ufs_dirrewrite(dp, oip, newinum, newtype error = UFS_BLKATOFF(vdp, (off_t)dp->i_offset, (char **)&ep, &bp); if (error) return (error); + if (ep->d_namlen == 2 && ep->d_name[1] == '.' && ep->d_name[0] == '.' && + ep->d_ino != oip->i_number) { + brelse(bp); + return (EIDRM); + } ep->d_ino = newinum; if (!OFSFMT(vdp)) ep->d_type = newtype; From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 21:17:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 721221065692; Mon, 11 Jan 2010 21:17:49 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61E528FC19; Mon, 11 Jan 2010 21:17:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BLHnbn078867; Mon, 11 Jan 2010 21:17:49 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BLHnFn078865; Mon, 11 Jan 2010 21:17:49 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001112117.o0BLHnFn078865@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 11 Jan 2010 21:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202115 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 21:17:49 -0000 Author: gavin Date: Mon Jan 11 21:17:49 2010 New Revision: 202115 URL: http://svn.freebsd.org/changeset/base/202115 Log: Our standard "xterm" termcap entry supports colour, so this tip is redundant. As it happens, "xterm-color" has just been an alias for "xterm" since src/share/termcap/termcap.src 1.131 in September 2002. PR: docs/132959 Approved by: ed (mentor) Modified: head/games/fortune/datfiles/freebsd-tips Modified: head/games/fortune/datfiles/freebsd-tips ============================================================================== --- head/games/fortune/datfiles/freebsd-tips Mon Jan 11 21:01:35 2010 (r202114) +++ head/games/fortune/datfiles/freebsd-tips Mon Jan 11 21:17:49 2010 (r202115) @@ -50,18 +50,6 @@ If you are in the C shell and have just be able to run it unless you first type "rehash". -- Dru % -If you are running xterm, the default TERM variable will be 'xterm'. If you -set this environment variable to 'xterm-color' instead, a lot of programs will -use colors. You can do this by - - TERM=xterm-color; export TERM - -in Bourne-derived shells, and - - setenv TERM xterm-color - -in csh-derived shells. -% If you do not want to get beeps in X11 (X Windows), you can turn them off with xset b off From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 21:21:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B22C106566B; Mon, 11 Jan 2010 21:21:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0038FC59; Mon, 11 Jan 2010 21:21:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BLLU7D079723; Mon, 11 Jan 2010 21:21:30 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BLLUx0079721; Mon, 11 Jan 2010 21:21:30 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001112121.o0BLLUx0079721@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 11 Jan 2010 21:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202116 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 21:21:30 -0000 Author: bz Date: Mon Jan 11 21:21:30 2010 New Revision: 202116 URL: http://svn.freebsd.org/changeset/base/202116 Log: Adjust a comment to reflect reality, as we have proper source address selection, even for IPv4, since r183571. Pointed out by: Jase Thew (bazerka beardz.net) MFC after: 3 days Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Mon Jan 11 21:17:49 2010 (r202115) +++ head/sys/kern/kern_jail.c Mon Jan 11 21:21:30 2010 (r202116) @@ -753,7 +753,9 @@ kern_jail_set(struct thread *td, struct * IP addresses are all sorted but ip[0] to preserve * the primary IP address as given from userland. * This special IP is used for unbound outgoing - * connections as well for "loopback" traffic. + * connections as well for "loopback" traffic in case + * source address selection cannot find any more fitting + * address to connect from. */ if (ip4s > 1) qsort(ip4 + 1, ip4s - 1, sizeof(*ip4), qcmp_v4); From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 21:23:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E92A9106568B; Mon, 11 Jan 2010 21:23:59 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7B268FC16; Mon, 11 Jan 2010 21:23:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BLNx4C080341; Mon, 11 Jan 2010 21:23:59 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BLNxgM080338; Mon, 11 Jan 2010 21:23:59 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001112123.o0BLNxgM080338@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 11 Jan 2010 21:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202117 - stable/7/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 21:24:00 -0000 Author: gallatin Date: Mon Jan 11 21:23:59 2010 New Revision: 202117 URL: http://svn.freebsd.org/changeset/base/202117 Log: MFC: Merge older mxge(4) fixes/improvements from head: r193250: Set an rx jumbo cluster to the correct size for bus_dmamap_load_mbuf_sg() r194836: Initial mtu r195818: Rename hw.mxge.rss_hash_type -> hw.mxge.rss_hashtype r197391: Add support for TX throttling Modified: stable/7/sys/dev/mxge/if_mxge.c stable/7/sys/dev/mxge/if_mxge_var.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/7/sys/dev/mxge/if_mxge.c Mon Jan 11 21:21:30 2010 (r202116) +++ stable/7/sys/dev/mxge/if_mxge.c Mon Jan 11 21:23:59 2010 (r202117) @@ -99,6 +99,8 @@ static int mxge_ticks; static int mxge_max_slices = 1; static int mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; static int mxge_always_promisc = 0; +static int mxge_initial_mtu = ETHERMTU_JUMBO; +static int mxge_throttle = 0; static char *mxge_fw_unaligned = "mxge_ethp_z8e"; static char *mxge_fw_aligned = "mxge_eth_z8e"; static char *mxge_fw_rss_aligned = "mxge_rss_eth_z8e"; @@ -589,10 +591,13 @@ static int mxge_select_firmware(mxge_softc_t *sc) { int aligned = 0; + int force_firmware = mxge_force_firmware; + if (sc->throttle) + force_firmware = sc->throttle; - if (mxge_force_firmware != 0) { - if (mxge_force_firmware == 1) + if (force_firmware != 0) { + if (force_firmware == 1) aligned = 1; else aligned = 0; @@ -1300,10 +1305,48 @@ mxge_reset(mxge_softc_t *sc, int interru mxge_change_promisc(sc, sc->ifp->if_flags & IFF_PROMISC); mxge_change_pause(sc, sc->pause); mxge_set_multicast_list(sc); + if (sc->throttle) { + cmd.data0 = sc->throttle; + if (mxge_send_cmd(sc, MXGEFW_CMD_SET_THROTTLE_FACTOR, + &cmd)) { + device_printf(sc->dev, + "can't enable throttle\n"); + } + } return status; } static int +mxge_change_throttle(SYSCTL_HANDLER_ARGS) +{ + mxge_cmd_t cmd; + mxge_softc_t *sc; + int err; + unsigned int throttle; + + sc = arg1; + throttle = sc->throttle; + err = sysctl_handle_int(oidp, &throttle, arg2, req); + if (err != 0) { + return err; + } + + if (throttle == sc->throttle) + return 0; + + if (throttle < MXGE_MIN_THROTTLE || throttle > MXGE_MAX_THROTTLE) + return EINVAL; + + mtx_lock(&sc->driver_mtx); + cmd.data0 = throttle; + err = mxge_send_cmd(sc, MXGEFW_CMD_SET_THROTTLE_FACTOR, &cmd); + if (err == 0) + sc->throttle = throttle; + mtx_unlock(&sc->driver_mtx); + return err; +} + +static int mxge_change_intr_coal(SYSCTL_HANDLER_ARGS) { mxge_softc_t *sc; @@ -1495,6 +1538,12 @@ mxge_add_sysctls(mxge_softc_t *sc) "I", "interrupt coalescing delay in usecs"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, + "throttle", + CTLTYPE_INT|CTLFLAG_RW, sc, + 0, mxge_change_throttle, + "I", "transmit throttling"); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "flow_control_enabled", CTLTYPE_INT|CTLFLAG_RW, sc, 0, mxge_change_flow_control, @@ -2206,7 +2255,7 @@ mxge_get_buf_big(struct mxge_slice_state err = ENOBUFS; goto done; } - m->m_len = rx->cl_size; + m->m_len = rx->mlen; err = bus_dmamap_load_mbuf_sg(rx->dmat, map, m, seg, &cnt, BUS_DMA_NOWAIT); if (err != 0) { @@ -3240,6 +3289,8 @@ mxge_slice_open(struct mxge_slice_state } ss->rx_big.nbufs = nbufs; ss->rx_big.cl_size = cl_size; + ss->rx_big.mlen = ss->sc->ifp->if_mtu + ETHER_HDR_LEN + + ETHER_VLAN_ENCAP_LEN + MXGEFW_PAD; for (i = 0; i <= ss->rx_big.mask; i += ss->rx_big.nbufs) { map = ss->rx_big.info[i].map; err = mxge_get_buf_big(ss, map, i); @@ -3840,6 +3891,9 @@ mxge_fetch_tunables(mxge_softc_t *sc) TUNABLE_INT_FETCH("hw.mxge.lro_cnt", &sc->lro_cnt); TUNABLE_INT_FETCH("hw.mxge.always_promisc", &mxge_always_promisc); TUNABLE_INT_FETCH("hw.mxge.rss_hash_type", &mxge_rss_hash_type); + TUNABLE_INT_FETCH("hw.mxge.rss_hashtype", &mxge_rss_hash_type); + TUNABLE_INT_FETCH("hw.mxge.initial_mtu", &mxge_initial_mtu); + TUNABLE_INT_FETCH("hw.mxge.throttle", &mxge_throttle); if (sc->lro_cnt != 0) mxge_lro_cnt = sc->lro_cnt; @@ -3854,6 +3908,15 @@ mxge_fetch_tunables(mxge_softc_t *sc) || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_MAX) { mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; } + if (mxge_initial_mtu > ETHERMTU_JUMBO || + mxge_initial_mtu < ETHER_MIN_LEN) + mxge_initial_mtu = ETHERMTU_JUMBO; + + if (mxge_throttle && mxge_throttle > MXGE_MAX_THROTTLE) + mxge_throttle = MXGE_MAX_THROTTLE; + if (mxge_throttle && mxge_throttle < MXGE_MIN_THROTTLE) + mxge_throttle = MXGE_MIN_THROTTLE; + sc->throttle = mxge_throttle; } @@ -4414,9 +4477,9 @@ mxge_attach(device_t dev) mxge_media_probe(sc); sc->dying = 0; ether_ifattach(ifp, sc->mac_addr); - /* ether_ifattach sets mtu to 1500 */ - if (ifp->if_capabilities & IFCAP_JUMBO_MTU) - ifp->if_mtu = 9000; + /* ether_ifattach sets mtu to ETHERMTU */ + if (mxge_initial_mtu != ETHERMTU) + mxge_change_mtu(sc, mxge_initial_mtu); mxge_add_sysctls(sc); callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); Modified: stable/7/sys/dev/mxge/if_mxge_var.h ============================================================================== --- stable/7/sys/dev/mxge/if_mxge_var.h Mon Jan 11 21:21:30 2010 (r202116) +++ stable/7/sys/dev/mxge/if_mxge_var.h Mon Jan 11 21:23:59 2010 (r202117) @@ -120,6 +120,7 @@ typedef struct int cl_size; int alloc_fail; int mask; /* number of rx slots -1 */ + int mlen; } mxge_rx_ring_t; typedef struct @@ -243,6 +244,7 @@ struct mxge_softc { int fw_multicast_support; int link_width; int max_mtu; + int throttle; int tx_defrag; int media_flags; int need_media_probe; @@ -271,6 +273,8 @@ struct mxge_softc { #define MXGE_PCI_REV_Z8ES 1 #define MXGE_XFP_COMPLIANCE_BYTE 131 #define MXGE_SFP_COMPLIANCE_BYTE 3 +#define MXGE_MIN_THROTTLE 416 +#define MXGE_MAX_THROTTLE 4096 #define MXGE_HIGHPART_TO_U32(X) \ (sizeof (X) == 8) ? ((uint32_t)((uint64_t)(X) >> 32)) : (0) From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 21:32:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFBB31065670; Mon, 11 Jan 2010 21:32:39 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2518FC1D; Mon, 11 Jan 2010 21:32:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BLWd3M082284; Mon, 11 Jan 2010 21:32:39 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BLWdcr082281; Mon, 11 Jan 2010 21:32:39 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001112132.o0BLWdcr082281@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 11 Jan 2010 21:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202118 - stable/6/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 21:32:39 -0000 Author: gallatin Date: Mon Jan 11 21:32:39 2010 New Revision: 202118 URL: http://svn.freebsd.org/changeset/base/202118 Log: MFC: Merge older mxge(4) fixes/improvements from head: r193250: Set an rx jumbo cluster to the correct size for bus_dmamap_load_mbuf_sg() r194836: Initial mtu r195818: Rename hw.mxge.rss_hash_type -> hw.mxge.rss_hashtype r197391: Add support for TX throttling. Modified: stable/6/sys/dev/mxge/if_mxge.c stable/6/sys/dev/mxge/if_mxge_var.h Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/6/sys/dev/mxge/if_mxge.c Mon Jan 11 21:23:59 2010 (r202117) +++ stable/6/sys/dev/mxge/if_mxge.c Mon Jan 11 21:32:39 2010 (r202118) @@ -99,6 +99,8 @@ static int mxge_ticks; static int mxge_max_slices = 1; static int mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; static int mxge_always_promisc = 0; +static int mxge_initial_mtu = ETHERMTU_JUMBO; +static int mxge_throttle = 0; static char *mxge_fw_unaligned = "mxge_ethp_z8e"; static char *mxge_fw_aligned = "mxge_eth_z8e"; static char *mxge_fw_rss_aligned = "mxge_rss_eth_z8e"; @@ -589,10 +591,13 @@ static int mxge_select_firmware(mxge_softc_t *sc) { int aligned = 0; + int force_firmware = mxge_force_firmware; + if (sc->throttle) + force_firmware = sc->throttle; - if (mxge_force_firmware != 0) { - if (mxge_force_firmware == 1) + if (force_firmware != 0) { + if (force_firmware == 1) aligned = 1; else aligned = 0; @@ -1300,10 +1305,48 @@ mxge_reset(mxge_softc_t *sc, int interru mxge_change_promisc(sc, sc->ifp->if_flags & IFF_PROMISC); mxge_change_pause(sc, sc->pause); mxge_set_multicast_list(sc); + if (sc->throttle) { + cmd.data0 = sc->throttle; + if (mxge_send_cmd(sc, MXGEFW_CMD_SET_THROTTLE_FACTOR, + &cmd)) { + device_printf(sc->dev, + "can't enable throttle\n"); + } + } return status; } static int +mxge_change_throttle(SYSCTL_HANDLER_ARGS) +{ + mxge_cmd_t cmd; + mxge_softc_t *sc; + int err; + unsigned int throttle; + + sc = arg1; + throttle = sc->throttle; + err = sysctl_handle_int(oidp, &throttle, arg2, req); + if (err != 0) { + return err; + } + + if (throttle == sc->throttle) + return 0; + + if (throttle < MXGE_MIN_THROTTLE || throttle > MXGE_MAX_THROTTLE) + return EINVAL; + + mtx_lock(&sc->driver_mtx); + cmd.data0 = throttle; + err = mxge_send_cmd(sc, MXGEFW_CMD_SET_THROTTLE_FACTOR, &cmd); + if (err == 0) + sc->throttle = throttle; + mtx_unlock(&sc->driver_mtx); + return err; +} + +static int mxge_change_intr_coal(SYSCTL_HANDLER_ARGS) { mxge_softc_t *sc; @@ -1495,6 +1538,12 @@ mxge_add_sysctls(mxge_softc_t *sc) "I", "interrupt coalescing delay in usecs"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, + "throttle", + CTLTYPE_INT|CTLFLAG_RW, sc, + 0, mxge_change_throttle, + "I", "transmit throttling"); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "flow_control_enabled", CTLTYPE_INT|CTLFLAG_RW, sc, 0, mxge_change_flow_control, @@ -2206,7 +2255,7 @@ mxge_get_buf_big(struct mxge_slice_state err = ENOBUFS; goto done; } - m->m_len = rx->cl_size; + m->m_len = rx->mlen; err = bus_dmamap_load_mbuf_sg(rx->dmat, map, m, seg, &cnt, BUS_DMA_NOWAIT); if (err != 0) { @@ -3240,6 +3289,8 @@ mxge_slice_open(struct mxge_slice_state } ss->rx_big.nbufs = nbufs; ss->rx_big.cl_size = cl_size; + ss->rx_big.mlen = ss->sc->ifp->if_mtu + ETHER_HDR_LEN + + ETHER_VLAN_ENCAP_LEN + MXGEFW_PAD; for (i = 0; i <= ss->rx_big.mask; i += ss->rx_big.nbufs) { map = ss->rx_big.info[i].map; err = mxge_get_buf_big(ss, map, i); @@ -3840,6 +3891,9 @@ mxge_fetch_tunables(mxge_softc_t *sc) TUNABLE_INT_FETCH("hw.mxge.lro_cnt", &sc->lro_cnt); TUNABLE_INT_FETCH("hw.mxge.always_promisc", &mxge_always_promisc); TUNABLE_INT_FETCH("hw.mxge.rss_hash_type", &mxge_rss_hash_type); + TUNABLE_INT_FETCH("hw.mxge.rss_hashtype", &mxge_rss_hash_type); + TUNABLE_INT_FETCH("hw.mxge.initial_mtu", &mxge_initial_mtu); + TUNABLE_INT_FETCH("hw.mxge.throttle", &mxge_throttle); if (sc->lro_cnt != 0) mxge_lro_cnt = sc->lro_cnt; @@ -3854,6 +3908,15 @@ mxge_fetch_tunables(mxge_softc_t *sc) || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_MAX) { mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; } + if (mxge_initial_mtu > ETHERMTU_JUMBO || + mxge_initial_mtu < ETHER_MIN_LEN) + mxge_initial_mtu = ETHERMTU_JUMBO; + + if (mxge_throttle && mxge_throttle > MXGE_MAX_THROTTLE) + mxge_throttle = MXGE_MAX_THROTTLE; + if (mxge_throttle && mxge_throttle < MXGE_MIN_THROTTLE) + mxge_throttle = MXGE_MIN_THROTTLE; + sc->throttle = mxge_throttle; } @@ -4414,9 +4477,9 @@ mxge_attach(device_t dev) mxge_media_probe(sc); sc->dying = 0; ether_ifattach(ifp, sc->mac_addr); - /* ether_ifattach sets mtu to 1500 */ - if (ifp->if_capabilities & IFCAP_JUMBO_MTU) - ifp->if_mtu = 9000; + /* ether_ifattach sets mtu to ETHERMTU */ + if (mxge_initial_mtu != ETHERMTU) + mxge_change_mtu(sc, mxge_initial_mtu); mxge_add_sysctls(sc); callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); Modified: stable/6/sys/dev/mxge/if_mxge_var.h ============================================================================== --- stable/6/sys/dev/mxge/if_mxge_var.h Mon Jan 11 21:23:59 2010 (r202117) +++ stable/6/sys/dev/mxge/if_mxge_var.h Mon Jan 11 21:32:39 2010 (r202118) @@ -119,6 +119,7 @@ typedef struct int cl_size; int alloc_fail; int mask; /* number of rx slots -1 */ + int mlen; } mxge_rx_ring_t; typedef struct @@ -242,6 +243,7 @@ struct mxge_softc { int fw_multicast_support; int link_width; int max_mtu; + int throttle; int tx_defrag; int media_flags; int need_media_probe; @@ -270,6 +272,8 @@ struct mxge_softc { #define MXGE_PCI_REV_Z8ES 1 #define MXGE_XFP_COMPLIANCE_BYTE 131 #define MXGE_SFP_COMPLIANCE_BYTE 3 +#define MXGE_MIN_THROTTLE 416 +#define MXGE_MAX_THROTTLE 4096 #define MXGE_HIGHPART_TO_U32(X) \ (sizeof (X) == 8) ? ((uint32_t)((uint64_t)(X) >> 32)) : (0) From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 21:35:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C72851065670; Mon, 11 Jan 2010 21:35:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 48FA58FC0C; Mon, 11 Jan 2010 21:35:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 21E1441C750; Mon, 11 Jan 2010 22:35:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id lyzbZYtEftxa; Mon, 11 Jan 2010 22:35:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 8A29941C75D; Mon, 11 Jan 2010 22:35:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 4EDF94448EC; Mon, 11 Jan 2010 21:31:28 +0000 (UTC) Date: Mon, 11 Jan 2010 21:31:28 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Kirk McKusick In-Reply-To: <201001112044.o0BKi5s3071234@svn.freebsd.org> Message-ID: <20100111213038.I50938@maildrop.int.zabbadoz.net> References: <201001112044.o0BKi5s3071234@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202113 - in head/sys: compat/linux kern sys ufs/ffs ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 21:35:07 -0000 On Mon, 11 Jan 2010, Kirk McKusick wrote: > Author: mckusick > Date: Mon Jan 11 20:44:05 2010 > New Revision: 202113 > URL: http://svn.freebsd.org/changeset/base/202113 > > Log: > Background: > > When renaming a directory it passes through several intermediate > states. First its new name will be created causing it to have two > names (from possibly different parents). Next, if it has different ... > Modified: > head/sys/compat/linux/linux_file.c > head/sys/kern/vfs_syscalls.c > head/sys/sys/syscallsubr.h > head/sys/ufs/ffs/ffs_alloc.c > head/sys/ufs/ffs/fs.h > head/sys/ufs/ufs/ufs_lookup.c it seesm this broke the build on amd64: 34 /scratch/tmp/bz/HEAD.commit/sys/ufs/ffs/ffs_alloc.c: In function 'sysctl_ffs_fsck': 35 /scratch/tmp/bz/HEAD.commit/sys/ufs/ffs/ffs_alloc.c:2705: warning: cast to pointer from integer of different size -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 22:08:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ACCE106566C; Mon, 11 Jan 2010 22:08:59 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A8B88FC18; Mon, 11 Jan 2010 22:08:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BM8xfw090454; Mon, 11 Jan 2010 22:08:59 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BM8xJs090452; Mon, 11 Jan 2010 22:08:59 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001112208.o0BM8xJs090452@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 11 Jan 2010 22:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202119 - head/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 22:08:59 -0000 Author: gallatin Date: Mon Jan 11 22:08:59 2010 New Revision: 202119 URL: http://svn.freebsd.org/changeset/base/202119 Log: Fix reporting of 10G Twinax media Reported by: mjacob MFC after: 3 days Modified: head/sys/dev/mxge/if_mxge.c Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Mon Jan 11 21:32:39 2010 (r202118) +++ head/sys/dev/mxge/if_mxge.c Mon Jan 11 22:08:59 2010 (r202119) @@ -2774,6 +2774,7 @@ static struct mxge_media_type mxge_xfp_m }; static struct mxge_media_type mxge_sfp_media_types[] = { + {IFM_10G_TWINAX, 0, "10GBASE-Twinax"}, {0, (1 << 7), "Reserved"}, {IFM_10G_LRM, (1 << 6), "10GBASE-LRM"}, {IFM_10G_LR, (1 << 5), "10GBASE-LR"}, @@ -2908,7 +2909,7 @@ mxge_media_probe(mxge_softc_t *sc) if (mxge_verbose) device_printf(sc->dev, "%s:%s\n", cage_type, mxge_media_types[0].name); - mxge_set_media(sc, IFM_10G_CX4); + mxge_set_media(sc, mxge_media_types[0].flag); return; } for (i = 1; i < mxge_media_type_entries; i++) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 22:25:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F415B106566B; Mon, 11 Jan 2010 22:25:09 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE3F88FC12; Mon, 11 Jan 2010 22:25:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BMP92T094011; Mon, 11 Jan 2010 22:25:09 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BMP90X094008; Mon, 11 Jan 2010 22:25:09 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001112225.o0BMP90X094008@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 11 Jan 2010 22:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202120 - head/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 22:25:10 -0000 Author: gallatin Date: Mon Jan 11 22:25:09 2010 New Revision: 202120 URL: http://svn.freebsd.org/changeset/base/202120 Log: Update mxge(4) firmware to 1.4.48b (latest available) from Myricom. Pertinant highlights from Myricom CHANGES file include: - Make sure invalid external smbus activity cannot affect performance - Fix to avoid a bug where the link could sometimes stay reported as up on after unplugging the cable. - For 8B NIC, make smbus connection passive at init to avoid possible address conflicts - Increase number of slices to 17 for multi-slice fw - Fix a bug where packets dropped because of link_overflow could be occasionally reported as bad_crc32 - Add selectable failover strategy for dual-port chip: symmetric or primary/backup - On failover, send RARP broadcast to make the change immediately known to the network - Change endianess for PCI Device Serial Number - For dual-port NICs, time to failover is now a few microsecs instead of a few millisecs. MFC after: 3 days Modified: head/sys/dev/mxge/eth_z8e.h head/sys/dev/mxge/ethp_z8e.h head/sys/dev/mxge/rss_eth_z8e.h head/sys/dev/mxge/rss_ethp_z8e.h Modified: head/sys/dev/mxge/eth_z8e.h ============================================================================== --- head/sys/dev/mxge/eth_z8e.h Mon Jan 11 22:08:59 2010 (r202119) +++ head/sys/dev/mxge/eth_z8e.h Mon Jan 11 22:25:09 2010 (r202120) @@ -28,7033 +28,7255 @@ POSSIBILITY OF SUCH DAMAGE. $FreeBSD$ ***************************************************************************/ -static unsigned int eth_z8e_uncompressed_length = 359956 ; -static unsigned int eth_z8e_length = 112403 ; -static unsigned char eth_z8e[112403 + 1] = - "\x78\x9c\xec\xbd\x7f\x7c\x54\xd5\xb5\x37\xbc\x72\x32\xc0\x24\x8d" - "\x4c\xc4\x48\x47\x44\x1d\x14\xda\xa8\x41\xa2\x62\x8b\x16\x24\x4a" - "\xb4\xd0\xcb\x8f\xa8\x60\xd3\x8a\x26\x68\x82\x41\x23\x44\x88\x10" - "\x30\x64\xc2\x80\x36\xa1\x40\x52\x49\x21\x40\x48\x62\x8b\x82\x2d" - "\x48\x04\xda\xe6\xf6\xa2\x8e\x25\xbe\x1f\x7a\x9b\x64\x62\x5f\xfa" - "\x1a\x7d\xb0\x1d\xb8\x91\xa6\x3c\x01\x46\x32\x90\x31\x99\x99\xfd" - "\x7c\xd7\xde\xe7\x24\x33\xc3\x04\xe5\xf6\x7e\xde\xe7\x9f\xe6\xf3" - "\x99\x9c\x73\xf6\xd9\x7b\xed\xb5\xd7\x5e\x7b\xed\xb5\xf6\x5e\x7b" - "\x1d\xa2\x7f\xe2\x4f\xdb\xd7\xf8\xcf\x14\xff\xd7\xdf\xbf\xfe\xfe" - "\xf5\xf7\xaf\xbf\x7f\xfd\xfd\xeb\xef\x5f\x7f\xff\x77\xfe\xce\x6b" - "\x26\xfa\x43\x25\x51\x8f\xc3\x6c\x75\xd3\xb9\xe2\xad\x9b\x85\x1f" - "\xc9\x31\x6e\x32\x5b\xf9\xaa\xff\xe8\x35\xa4\x6b\x95\x64\xbe\x39" - "\x91\x12\xa6\xed\x24\xaa\x1a\x29\xba\x36\x6f\x11\x9e\xb5\x5b\x44" - "\x57\xfa\x1b\x44\x4d\x63\x89\x36\x8f\x14\x5e\xc0\x99\xef\xa6\x1f" - "\x75\x30\x9c\xb5\x78\xe6\xf7\xeb\x46\x0a\x0f\xd2\x0b\xdd\xf4\xe3" - "\xf9\x9c\xbe\x66\x24\x60\x25\x11\x39\xb6\x08\x5f\x08\x5c\x33\x97" - "\x67\x98\xe9\x63\x24\x3e\xbb\x22\xe0\x30\x8c\x46\xc0\x38\x76\x19" - "\x18\x09\x06\x5e\x5e\x8d\x62\x18\x5e\xb7\x83\xac\x5e\x87\xf3\x5a" - "\x94\xf5\xa2\x4d\xc9\x5c\xb6\x02\x79\x84\x83\x62\x9b\x8a\xfc\x64" - "\xbb\x99\x62\x4e\x51\xdc\x3f\x70\xd5\x70\xfd\x8c\xdb\xbb\x56\x95" - "\x1b\xcb\x30\x50\x36\xa6\xc7\x11\x97\xda\x5f\x16\xb0\x6d\x25\x64" - "\x42\xde\x77\xbc\x9a\x53\x53\x79\x13\xe3\xf4\xbc\x1a\xf2\xce\x37" - "\xf2\xaa\x77\xda\x0c\xfd\xdd\x37\xf0\xae\x28\xfc\x9d\xe9\x35\xfd" - "\x5d\x02\xde\x55\x45\xe0\x67\x72\xf5\xfa\x09\xf5\x30\x2e\x36\x37" - "\xae\x47\xd0\x33\x3a\x6e\x8c\x53\x13\xf2\x97\x72\xfe\x74\x9b\xf0" - "\xcf\xb5\x91\xc4\x85\x69\x87\xbc\xd3\x8f\xd4\xab\xbc\xb8\x1f\xcd" - "\xe5\xf5\x7b\x1b\xee\x65\xba\x5e\xef\xd5\x3d\x8e\xf8\x84\x70\x9c" - "\x88\xf4\x77\x23\xf0\x2e\x39\xfc\xdd\x7b\xa9\xfa\xbb\x6f\xe2\x5d" - "\x7a\xf8\xbb\x18\xa3\x9c\x15\xef\xb2\x8d\x77\xa1\xfd\xa4\x38\xce" - "\x84\xdf\x10\x33\xd1\x50\xfc\x86\x99\x8d\xbe\x5b\x66\x15\x41\xfb" - "\x75\x64\x12\xeb\xb7\x94\x05\x1d\x82\x5c\x45\x3e\xb2\x8d\x22\xfb" - "\x49\x8a\x6f\x03\x5c\xda\xb4\x8a\xcc\xf6\x02\xe1\x73\x15\x75\x51" - "\xab\xa7\x8b\xec\x1e\xd1\xe9\xf2\x5f\xa0\x92\x0b\x64\x76\xf9\xcf" - "\x50\xc9\x8b\x64\x6d\x2a\xfe\x9c\xa2\xf1\x45\x50\x13\x64\x1f\xcd" - "\x65\x3b\xa8\xb5\xa6\x83\xec\x35\xe1\x65\xed\x37\x90\xb5\x05\xcf" - "\xa0\xb9\x85\xf1\x68\xb2\xf9\xc9\x1f\xbf\xa5\xac\x78\x1b\x99\xec" - "\x63\x48\x6b\xc9\x71\xea\xb8\x7c\xa3\x9a\x71\x59\x77\x9a\xcc\xbf" - "\x5c\x88\xbe\x3f\xcd\xf8\xd6\x96\xed\x5f\xe5\xd3\x8e\x58\x67\xd2" - "\x11\xeb\x71\x6a\xb2\x4e\xa1\xa6\xa2\x74\xda\x74\x9a\x12\x8e\xf8" - "\x26\x53\x93\xe9\x61\x8c\x8d\x74\x72\x75\xe1\xde\x16\x40\x1e\x2f" - "\xd9\x96\x13\xfa\xf5\x1b\x65\x55\xcf\x91\xd9\xad\x60\xa2\x3f\xbf" - "\x51\xf5\x41\x21\x11\xd3\x8c\x9f\xa3\xb5\x63\xd9\x75\x64\x05\x7e" - "\x9d\xc0\xe5\x5e\xe0\xd2\x32\xd6\x4a\xa9\xc0\x79\x98\xab\xda\x4f" - "\xa6\x62\x8a\x1b\x64\x4c\x24\x05\x1d\x72\x6c\x76\xd5\x6e\x11\x9d" - "\xcc\x5b\xdd\x2f\x67\x62\x7c\x25\x98\x50\xf7\x2e\xae\x6f\x13\xc6" - "\xa8\xfd\x75\x32\x75\xaf\xc8\x8c\xa9\xdb\x22\x3a\xf0\xce\x66\xbc" - "\x03\xbf\x77\xe0\x7d\xe7\x84\x24\x4a\x74\xf9\xd3\xe8\xfd\xde\x4e" - "\x13\xc3\x18\xee\xa5\x18\x86\x67\x29\xa2\x58\xb4\x67\x08\xf0\xf9" - "\xa2\x0e\xe9\xb7\x20\x1f\xca\xa3\xff\xd7\xef\xe1\xf2\xe2\x9b\x4f" - "\x78\x83\xdf\x7c\xe2\x42\x70\xeb\x13\xdd\x62\xeb\x13\xe7\x03\x5b" - "\x9f\xf8\xc2\xbe\x92\xcc\x81\x6f\x3e\xe1\x69\x2d\x90\x7d\x90\xd8" - "\x5a\x80\x3e\x08\x90\x79\xf5\x19\x4a\x7c\xea\x45\xf4\xbd\xff\x33" - "\x5a\xbd\x88\xac\xc1\xb8\x9d\x69\x2e\xff\x5f\xe8\xa9\x62\x12\xb8" - "\xcf\x88\xd6\xbe\xee\xf8\xda\xa3\x8a\x67\xcd\xdc\xa6\x76\xb7\xf6" - "\x73\x39\x26\x3c\x71\x6f\x1e\xc5\xaf\x19\xbf\x36\xfc\x8e\x89\xf8" - "\xda\x63\xa0\x95\x7d\xf8\x9a\x18\xaa\xed\x25\x9a\x10\xa4\x18\x74" - "\x91\x17\xf8\x27\x0e\x42\xb7\xd1\xc1\xf5\xef\x54\x7e\xbb\x94\x4a" - "\x7a\x7a\xf2\x88\x65\x0a\xcb\x13\x96\x2f\x3d\x8e\xab\xd2\x50\x8f" - "\x53\xf2\xfe\x16\xe1\x15\xf1\xef\x54\x22\xbd\xd3\xfb\x72\x5e\x8c" - "\xe7\xe5\x3c\xad\x3b\xfe\x9d\xcd\xc8\x93\x83\x3c\x3e\x9d\x86\x9d" - "\x0c\x0b\xe3\xc4\x73\x95\x9f\x62\x01\xb3\xe0\x77\x17\xdb\x4d\x3b" - "\xb7\x88\xe3\xc8\xb7\xa1\x1f\x16\x60\x03\x0e\xe8\x7f\x55\xbd\x91" - "\x06\x5a\x77\x6c\x44\x3e\x2e\xef\xf2\xa5\xb1\xdc\x75\xbb\xf2\x3b" - "\xc9\xe2\xa7\x78\xd1\xa7\xea\x43\x9e\x4e\x96\x8f\x57\xf9\x68\x68" - "\x8f\x83\x32\x18\x36\x97\x73\x75\x75\x12\xca\x6d\x16\xf6\x3c\xc8" - "\x25\x9a\xdd\x23\xf2\x62\x20\x8b\x3b\x8e\xa0\xbc\xaa\x7b\xb8\xd9" - "\xc0\x91\xeb\xe0\xbe\x96\x78\x82\x1f\x8e\xe4\xfb\xe8\xaa\x6a\x8a" - "\x45\xb9\xc7\x18\x1e\xc3\x02\x1f\xb8\xd1\xd6\xcd\x47\xf2\x3d\x14" - "\x14\x61\x30\xdd\x3a\xbc\xcc\x30\x78\x48\x17\x80\xc7\xfc\xd7\x84" - "\x32\x57\xd5\x4b\x78\x8f\xfe\x2e\xc8\xf0\x7c\x64\xb2\x49\x7c\x1f" - "\x67\x18\x3d\x2c\xd3\x00\xd3\xb9\xfc\x41\xea\xa2\xe1\x4e\x8f\x3d" - "\x2f\xb6\xb5\x98\x88\xcb\xef\x2f\xe9\x1c\x22\xba\x33\x63\x99\xe7" - "\xf8\xbd\xcb\x7f\x9e\xf3\xbc\x2e\xba\xf3\x62\xaf\xea\x22\x13\xe3" - "\x8c\xf2\x45\x8c\x67\x68\x5f\x3e\xfa\xd0\xe3\x53\xe8\xf1\xf4\x19" - "\xe9\x53\x68\xd6\x03\xd3\xa6\x50\xea\xbd\xe3\x53\xef\xfe\xee\xa4" - "\xbb\x29\xe3\x87\x8f\x4e\xa1\x8c\xd9\x53\xe8\x31\xfc\x32\x1f\x9e" - "\x81\x87\x69\x53\xee\x4c\xfd\xfe\xf8\x8c\x69\x33\x1e\xa2\x47\xe6" - "\xde\x95\x7a\xd7\x5d\xf4\xc0\x43\x33\xef\x4c\x4d\xd5\xaf\x77\xa6" - "\x72\x96\x1f\x4f\x7a\xe8\xb1\xf1\x19\x4b\x97\x14\x2e\x19\x3f\x7b" - "\xc6\xb4\xd0\x39\x31\x39\x70\x31\xc8\x34\xf5\x8a\x73\xd3\x29\x08" - "\x19\x51\x8b\xbe\xc6\xaf\xcb\x59\x72\x12\x63\x3d\x71\x75\x2d\xf7" - "\x91\x94\x93\xc3\x8f\x63\x7c\x9b\x7a\x1c\x96\x75\x6e\x6d\xcb\x24" - "\xa6\x15\xe6\x1e\xe4\xb9\x76\x01\xde\x9d\xd0\x65\xf3\x10\xbc\xdf" - "\x15\xfe\xfe\xea\x22\xbc\xff\x7b\xab\x8d\xc8\x85\x1f\xe8\xeb\x85" - "\xcc\x03\x1d\x3d\xd4\x6d\xcf\x1c\x02\x3e\x8e\x41\x1d\x1d\x18\x83" - "\x6d\x28\xeb\x0e\x19\xdb\x1d\xe8\x87\x36\xdb\x2a\x8a\x3d\x4b\x96" - "\x7f\x6f\x2d\x4c\x23\xee\x0f\x57\xa1\x0e\xe3\x42\x3f\x8c\x78\x09" - "\x03\x7d\x0c\x38\xc7\x14\x9c\xc4\xe4\x10\x39\xe0\x66\x38\x9b\xf0" - "\x4e\x87\x15\x68\x85\x3c\x80\xbc\x7e\x2d\x68\x4f\x26\x11\xbf\xa5" - "\x32\xd8\x97\x2c\xe7\x16\x94\xcb\x36\xf8\x17\xf9\xbd\x4d\x05\xc8" - "\xf7\xcb\xe9\x31\xe8\xef\x18\xcc\x9d\x68\x8b\x25\x1f\x7c\xec\x0d" - "\xae\x7f\xb3\x5d\xf4\x64\x92\x4a\x4b\xdc\x2b\xe2\xf1\xbc\xfe\xcd" - "\x4f\x84\x1d\x69\xab\x64\xda\x3e\x4e\x43\xdf\xc6\xf2\x18\x14\x2f" - "\xcb\xf4\x58\xd0\x62\x0c\xf0\x6b\x0f\x70\xf9\x73\xb2\xfc\x30\xa4" - "\xc5\x20\xef\x27\xc1\xf8\x37\x3f\x05\xaf\x70\x1a\xe6\xf3\x6b\x4b" - "\x01\xef\x7f\x05\x45\x26\x09\xf3\xf9\x46\xdc\x1f\x77\xae\xea\xa2" - "\x53\x05\xa4\xb9\xf1\x2e\x68\x07\xcc\xbe\xfe\xfa\xdb\xb8\x2c\xea" - "\x32\xf5\xf4\xe5\x61\x0e\x4d\x3c\xc6\xba\x40\x80\xf1\x39\xd7\x9f" - "\xc7\xc9\x75\xf2\x38\x46\x5f\x74\xa1\x9f\xe2\x7a\x1c\x57\xcf\x8c" - "\xe8\xa7\x1c\xc0\xf9\x04\x74\x6f\x07\x8c\xc3\xc1\x6e\xd4\x81\x67" - "\xc0\xd5\x74\xb8\x06\x0c\xaf\xe2\x83\xab\x37\x44\xf0\xc1\x43\x80" - "\x7d\x21\xe4\xfd\xde\x88\xf7\xb7\xe2\x7d\xaf\xfe\x1e\xe3\xe9\xea" - "\xe6\x88\xfa\x3b\xf1\x3e\x88\xfa\xbd\x18\x2f\xb1\xa8\x2f\xa3\x96" - "\xf5\xb4\x81\xfc\xfe\xf0\xfc\x23\xac\xdd\x0e\x0b\xcb\x10\x96\x85" - "\x32\x7f\x9d\xce\xab\xaa\xfe\x11\x29\x11\xf9\xc1\xc3\x96\x61\xe0" - "\x07\xbe\x5e\x83\x3c\xc3\x20\x8b\x4c\x98\x37\x8e\x1f\x29\x66\xbd" - "\x6d\xc4\xfc\x88\xfc\xc5\xc8\x37\x8a\xe9\x28\x69\x70\x4e\xd2\x20" - "\x43\xd7\xb3\x78\x2c\x98\x51\xa6\x32\xa2\x4c\x03\xca\xdc\x1c\x54" - "\x74\x8b\xed\xe9\x8e\x5a\xa6\x29\xa2\x4c\x87\xec\x7f\x55\x8f\x89" - "\xf9\xc5\x28\x23\x65\x4b\x5f\x18\x0c\x6e\x1b\xf4\xb1\x6b\xcc\xe1" - "\x30\x92\x3a\x50\xef\x6d\x1b\xd5\x38\xfe\x06\xfa\xfc\x2e\xa4\xfd" - "\x05\x70\x3f\x63\x3e\x61\x5e\x76\x79\x7c\x90\x7d\xd3\x13\xd4\x1c" - "\x7e\xcd\x22\x4b\x31\xf1\xfd\x78\xbe\x67\xd8\xa2\x6f\xa6\xce\xe3" - "\xd7\x2c\xc2\x95\xd3\x65\x9d\x3c\xb6\x44\xdf\xbf\x05\x15\xcc\x6b" - "\x36\x62\x0c\x6a\x78\x0e\xe8\x75\xb4\xe0\x39\x06\xfc\xf9\x29\xe4" - "\x2a\x78\x72\x3a\xf3\xdb\x44\xa4\x7f\xa8\xbf\x7f\x97\xf3\xe3\xfe" - "\x4e\xfd\x9e\xf9\xf2\x53\x9d\x2f\xc1\xe7\x49\xbf\x91\x75\x4b\x5e" - "\x57\xe5\x83\x8a\xaf\xa7\xe1\xdd\xeb\xb8\xce\xc0\x75\x23\xae\x8f" - "\xe0\xba\xc8\x7e\x81\xac\xf6\x00\xf4\x08\xf5\x3c\x0f\xd7\x47\x71" - "\x7d\x00\xd7\xc7\x70\x1d\xcf\xe3\xd2\xb3\x22\x8f\x22\x78\xa2\x2b" - "\xa8\xc6\xe2\x30\xd5\x1f\x49\xa3\xf5\xf1\xa1\xc6\xe7\xb9\x81\x34" - "\xa1\xd2\x34\xc8\xf3\x81\xb4\xbe\xe9\x4c\x97\x0c\xb4\xdd\xc7\xf5" - "\xeb\xe3\x7a\x88\xea\x17\x95\x27\xa8\xca\xe9\x7d\xa7\xa7\xa9\x7c" - "\x31\xa1\x75\xba\xe9\x9a\xe6\x12\xaf\x10\xb8\x36\x32\x5d\x91\x7e" - "\x18\x34\x81\x3e\x73\xcd\x06\xa6\xd3\x40\x7f\x5f\x93\x1c\xd2\xdf" - "\xd0\x67\x93\x7c\xe1\xfd\x9d\x98\xc1\x34\xe3\xfe\x36\xf0\x65\xdc" - "\x31\xa7\xf0\x3c\x35\x54\xe1\x9f\x98\x01\xb9\xde\xc5\x7d\x1f\x5b" - "\xc0\xe3\xe1\xda\xc9\x6e\xda\x25\x65\x22\xbf\xf3\xc6\x1d\x48\xe4" - "\xf2\xb1\xf9\xf2\x5d\x26\xe4\x65\xbb\xf1\x8e\xeb\xe6\x71\x18\x5b" - "\x28\xdf\x15\x1a\xe5\x20\x33\x1b\x64\x59\xcc\x71\x3c\xe7\xf3\xdc" - "\x8d\x39\xb4\x13\x79\xaa\xdd\x74\x55\xe2\x60\xf6\x8d\x28\xdb\x52" - "\x3f\xbe\x94\xb4\x5b\x4a\x69\x88\xcb\x7f\x9c\xe6\xf8\x45\x60\x3c" - "\x51\x9c\xcb\x3f\x99\x6e\x25\xba\xda\xe5\x3f\x46\x68\xf0\x18\x97" - "\xbf\x0a\x73\xe4\x3a\x7e\xff\xfe\x6d\x14\x13\x83\xab\xfd\x76\xd2" - "\x62\x5c\xfe\x5d\x48\x3f\x44\xb7\x90\x29\xe6\xfb\x43\x44\x8f\xcb" - "\x3f\x11\xcf\x85\xf4\xf0\x10\xf1\xb7\xac\x00\x25\xce\x7c\x45\xd8" - "\x5d\xfe\x1c\x7a\xf8\x95\xa0\x70\xf9\x9b\xf1\x2e\x9f\xe6\x04\xbe" - "\x14\x73\x02\x3d\x42\x98\xb7\x34\xcc\x09\x9c\xc3\xfd\xdf\x04\x68" - "\x89\xeb\xfb\xf8\xd9\x85\x0b\xba\xae\x28\xdf\x52\x9f\xb5\x52\xa3" - "\x3e\xcc\x2b\x22\x6e\x4b\x03\xda\xe7\xec\x13\x79\xb1\x98\x13\xde" - "\xef\xeb\xc3\x75\xfd\x96\xf7\xe4\x73\xd9\x96\x36\xc0\x71\xde\x01" - "\xc5\x9f\xf1\x77\xf9\x3b\x28\x0b\xb2\x63\xce\x4a\x8f\x60\xdc\x87" - "\xaf\x11\x34\x67\xe5\xfb\x02\x72\xcb\x32\x67\xa5\x5d\xe0\x9d\x19" - "\xf0\x9c\x2e\x7f\x17\xd7\xd1\x06\x78\x2d\x12\x5e\xd9\x16\x0f\xf2" - "\x7a\x38\x5f\x28\x1c\x86\xc1\x79\xe7\x04\xc8\x82\xfc\x9e\xbe\xf2" - "\x2d\xee\xbe\xf2\xad\x84\x5f\xaa\x88\xdf\xfa\x60\xd0\x91\xf4\x01" - "\xcf\x51\xa2\x6c\x6b\x06\x9e\xb3\xbf\x04\x9f\x48\x3a\x06\x68\x98" - "\x28\xdf\x9a\x81\x3e\x4f\xef\x91\xf8\x6e\x2d\x95\xf8\xae\xdf\x6a" - "\xff\x52\xb6\x63\x6b\x89\x6a\xc7\xd6\xd5\x9c\xee\x05\xdf\xe2\xbe" - "\xde\xab\xde\xd5\xa1\xdc\x5c\x59\xae\x6c\x6b\xbd\x30\x6f\x6d\x00" - "\x0f\xc6\xce\x09\x88\x52\xa6\x21\xe8\x5a\xca\x74\x64\xbb\x05\x75" - "\xd4\x8b\xb8\xad\x0d\xc0\xc7\x89\xf2\x7f\xee\x13\x3c\x6f\x6e\x75" - "\x7f\xa9\x60\xff\x0d\x70\xe6\xf7\x30\x4c\xf3\x56\x37\x60\x79\xfc" - "\x9a\x0d\xf4\x10\xbe\x39\xfe\x35\xfe\xac\x95\x14\xeb\xf2\x7f\x48" - "\xc9\xa5\xa5\x31\xae\xa2\x42\xb4\x73\x03\x60\xe6\xe0\x3d\x5d\x83" - "\xba\xde\x07\x5c\x37\xd7\x87\x3a\x3c\x80\x79\x06\xb0\x72\x18\xa7" - "\x5e\x07\x25\x8a\xf8\x6a\xea\x95\xf8\x55\xdb\x82\x65\xd5\x69\x41" - "\x73\x75\xaa\xc1\x3f\xcc\x3b\x8a\x6e\xcc\x33\xfb\x38\x2d\xd1\xe0" - "\x93\x40\x59\x75\xe2\xed\x44\x89\xb3\xbd\xc2\xcf\xbc\x32\x81\x0a" - "\x62\x5a\xbd\xc7\x40\x6b\x33\xb5\x16\x1c\xa2\xdb\x88\xed\x27\x2f" - "\xb5\x7a\xab\xf0\xbc\x93\x18\xbf\x56\xef\x3a\x6a\xe9\xda\x45\xb3" - "\x0b\xbc\x6b\x02\xe6\xea\xca\x96\xae\x59\x84\xf2\xef\x03\xc7\xe0" - "\x53\x05\xa6\xd2\xd6\x02\x2f\x3f\xdb\x5b\xba\xc0\x9f\x01\x11\xf0" - "\x97\x55\x93\xdf\x5c\x5d\x3f\xfb\x82\xf0\xcc\xea\x2a\x1d\x82\xb4" - "\x3e\x4b\x8c\xf0\x5b\x8a\xec\xa2\xa5\x6b\x03\x3d\x75\x81\x62\x5a" - "\xf2\x0e\x49\x3e\x7d\xaa\xa0\x80\x64\xf9\x0b\x7e\xcb\x93\x5d\xa5" - "\xf4\x64\x1e\x0d\x47\xfe\x73\xcc\xb3\x62\x78\x29\x35\x77\xe4\xd3" - "\xac\x33\xfe\xd8\xd9\x17\xfa\x44\x73\x76\x15\xb5\xe4\x55\x81\x1e" - "\xd5\x36\xb6\x33\x66\x9d\xe9\x16\xb3\x2f\xf4\x88\x96\xbc\x7d\xd4" - "\x9c\x7d\x88\x66\x7e\xee\xb4\x04\xca\xab\x13\x83\x71\xd5\xa9\xc1" - "\xf2\xea\xb4\x40\x5c\x75\xa5\xbf\x1c\xb8\xc4\x55\xd7\x8b\xf5\xdb" - "\x60\xc3\x60\x6e\x97\xfd\xbb\x6d\x38\xee\x6d\xb2\x7f\xcd\xdb\x6c" - "\xa2\x6c\x5b\x5a\x5f\xf9\xb6\x54\xc9\xf7\x71\xdb\x6c\x2e\x3f\xf3" - "\xff\xb6\x34\xe4\x4b\x53\x3c\xb2\x2d\x43\xf1\xfe\xb6\x39\xdc\xaf" - "\xc8\x9b\x8d\x5f\x01\x7e\xd0\x45\xb6\x41\xa7\xa2\xab\x19\x6e\xb0" - "\x6c\x9b\x3b\x68\xde\x86\xf1\xb0\xcd\x03\xbb\x44\x6b\xf5\xee\xa2" - "\x00\x64\x6b\xab\x37\x40\xb3\x5f\xf4\xa1\x6f\xd1\x07\x45\x01\xd0" - "\xf3\x38\x3d\xf5\x22\xd9\x5d\x45\xc7\x49\xbc\x57\xc9\xf4\xb0\xcc" - "\x7e\xf1\x7d\x11\x2c\xdf\xe6\xe6\xf7\xb3\x5f\xb4\xc3\x36\x02\x9c" - "\xb8\x6d\x9e\xe0\xfa\xed\x89\xba\xae\x04\x3c\xb6\x5b\x18\x8f\xbe" - "\x1e\xf0\x18\xe6\x71\x11\xb7\xdd\x86\xb4\xd7\x78\xee\x08\x32\xdf" - "\x95\x6d\xaf\x14\xe6\xed\x9e\x59\x43\x84\x27\xf0\x2a\x49\x1e\x08" - "\xde\x2f\x04\xdb\x5e\x59\x45\x54\x2f\xc7\x54\x60\x54\x29\xca\x79" - "\x44\xf9\xf6\xca\xe0\xfa\x9d\x77\x01\x4e\xac\x58\xc1\x65\x77\xa6" - "\x2a\x9e\xf9\x4c\x8e\x3d\x51\xbe\x33\xf5\xeb\xda\xf9\x3d\x8e\x51" - "\xc5\x6e\x7a\x3b\x93\x65\x1c\xee\xcb\xdc\xb4\x3f\x45\xbf\xaf\x72" - "\x53\xd5\x71\x29\x1f\x21\xe7\x0a\x4a\xe8\xda\xd3\x74\xfd\x74\xd0" - "\x84\x70\x9f\x80\xfb\x99\x73\x6e\x45\xbb\xcb\x3e\xeb\x44\x9f\xf7" - "\xb0\xcc\x11\x8e\x89\xd0\x37\x28\x0d\xed\x35\x8b\x9e\xe4\x04\x11" - "\xbf\x7b\xa1\xe8\xb3\xb2\x2d\x69\xc1\xf3\x70\xd0\x75\x2c\xae\x23" - "\x76\x5e\xa4\x24\xfc\xac\x3b\x1d\xc1\x52\x96\xc9\xb8\x4f\x15\x2b" - "\xac\xf1\x9b\x96\x53\x8a\xc5\x4b\xe6\x3a\x47\x30\xd3\xb2\x26\x91" - "\x6d\xaa\x24\xbe\x17\x8e\x6d\x54\x77\x91\x4c\x3c\xb7\x04\xe3\x50" - "\x5f\x91\x45\x88\x65\xc9\x54\xb7\x14\xf2\xc8\x41\xd6\x3a\x87\x68" - "\x08\xf4\x24\x6b\x8c\xa7\x81\x0b\xe3\x06\x3c\x6f\x00\x9e\xf3\xe7" - "\xad\x4c\xa3\x0f\x8b\x28\xea\x5a\x44\x8f\xe3\xfa\xfe\xf6\x0f\xf2" - "\xbe\xc6\xa0\xc9\x20\xef\x0f\x1b\x74\x1a\xcc\xde\xe7\x71\x1e\xb8" - "\x28\x3c\x15\x8b\x89\x69\x61\xb5\xfb\xc5\x7f\xc1\x26\x29\x2d\x09" - "\xd0\x0d\x73\x56\xde\x24\x5c\x1e\xe1\x74\x15\x9d\x91\xeb\x75\x75" - "\xc8\x53\xe2\x17\x41\xb6\x6f\xd9\xb6\xad\x62\x5b\xb5\x7c\xf7\x74" - "\x51\xbe\x3b\xbd\x7b\xb9\xf0\xd7\x4a\x7b\x74\x74\xaa\x9b\xee\x29" - "\x50\x7d\x53\x6d\xc3\x5c\xd8\xd1\x6d\xde\x9d\x0e\xd8\x57\x33\xec" - "\xd6\x02\xe1\x0c\xc6\xed\x9e\x89\x7c\x98\xff\x7e\x5f\x19\xba\x66" - "\x87\x79\xad\x6b\xdd\x16\x9e\xdb\x46\x63\xfe\xbb\x69\xee\x25\x6b" - "\x42\x72\x75\x91\xd0\x2f\xb6\x81\x45\xc9\x18\x9d\x7d\x8c\xbf\x44" - "\xfc\xd2\xa2\xbf\x1e\x98\x1b\xab\xeb\xbb\x61\x77\xd9\x57\xd3\x68" - "\xf4\xc3\xf5\xa7\x69\xf4\x3f\xec\x45\xe2\x94\x70\x8c\x2e\xfd\xe5" - "\x2a\x1f\x74\x82\xd1\x5e\x37\xad\xc9\x1b\x7c\x6e\x85\x5c\xbc\x28" - "\x3a\x2b\x96\xf7\xd3\xec\xc4\x9c\x95\x41\xc1\xf7\x3c\xce\xea\x90" - "\xce\xf4\xe8\x71\xdc\x30\xd9\xa0\xc5\x20\xf4\x37\x89\xb2\xdd\x99" - "\x4a\x07\xbc\xa1\x46\x38\x04\x39\x6f\xe4\x75\xbc\x1b\x76\x4a\x3d" - "\xa8\x6c\x5b\x6a\x37\xe4\x08\xaf\x77\x40\x67\xf6\x2e\xb3\x0a\x1f" - "\x60\x56\xba\x69\x9c\x5b\xb7\xb3\xbc\x2e\xff\x43\x2c\x53\x52\x07" - "\x5b\x27\x1d\x80\x7f\xe3\xe1\x56\x68\x44\x2c\x93\x84\xf9\xc0\xdc" - "\x12\x85\xb7\x8f\xe1\x3a\x4b\xce\x53\x07\xde\x2f\xf3\x8a\x4e\x51" - "\x76\x60\x3a\xeb\x21\xce\xe5\xbd\x9c\xf6\x2e\x78\x58\x38\x97\x32" - "\x4e\x37\xbe\xeb\xbc\xb1\x97\x4e\x41\xc7\x83\x7e\xe7\x51\x36\xd7" - "\x8d\x7b\x8e\x14\x92\x6e\xc7\xdd\x08\xfb\xef\xdb\x7b\x0c\xbc\x20" - "\x3b\x04\xe8\x8b\xfa\x59\xee\x75\x11\xaf\xa1\x2d\x2b\x16\x3e\xe0" - "\x6a\x43\xde\xb9\x46\x1b\xb8\x7d\xaa\x5d\x37\xe6\x85\xb6\x0b\x38" - "\x78\xa0\x2f\x4b\x1a\x2c\x5b\x49\x66\x9b\xa2\xb5\x99\xdb\xcb\x6d" - "\xe1\x36\xcb\xb6\x40\xbf\xe0\x79\xc5\xe5\xbf\x07\xfa\x97\x4c\x4f" - "\x03\xac\x43\x6e\xfa\x56\xba\xd2\xad\x6e\x94\x7a\x5d\xd4\x7e\x34" - "\x6f\xf5\xd8\xbf\xa4\x1b\xed\x41\x71\xf2\x14\xdd\xc4\x3a\x6d\x2c" - "\x5f\xe5\x9c\xec\x03\xff\x9a\xf7\x8d\xe5\xb9\xd8\x55\x7c\x01\xf2" - "\x5b\xe6\xbd\x06\x79\x3b\x90\xe7\x4e\x3d\xef\x9d\x6a\x7d\x57\x5e" - "\x87\xf1\x15\x73\xf3\x19\xf0\xee\x74\x5e\x93\x00\x9d\x13\x8d\x67" - "\x81\x67\x5c\xd1\x57\xfb\xc6\x46\xc7\x65\xbb\x27\xa8\xc6\x62\x17" - "\xea\xf9\x26\xf3\x94\x7d\x25\x5d\x07\xbe\x3c\x51\xb2\x9a\xae\x61" - "\x7e\x12\x71\xbb\x73\x14\xdd\x6f\xaa\x12\x8e\x52\x72\x41\x7a\x16" - "\x2c\xa7\xeb\x31\xfe\xe6\x9f\xa6\x9b\xde\xca\x2a\xb6\x01\x57\xa2" - "\x8a\xb3\x44\x52\xd6\xc4\xed\xce\x76\xf9\x3f\xa7\xba\xb3\x6c\x6b" - "\xdd\x74\xd4\xe0\x45\xdc\x1f\xbb\x9c\x5c\x00\x5d\x0b\x94\xad\x60" - "\x7b\x80\xd7\xcb\x4e\x92\x2d\x85\xdb\x8b\x5f\x0c\xd2\x6e\x10\x17" - "\xc5\x7c\xc1\xfa\x1b\xe6\x2b\x37\xd9\x32\x71\x2d\x90\x3f\x07\x19" - "\xcf\xd9\xc8\x97\x20\x2e\x06\x39\x4f\x01\xd2\xc6\x0a\x47\x0c\x8f" - "\x89\xc3\x3d\x0e\x5b\x86\x9b\x26\x95\xa9\xbe\xb1\x8d\x66\x58\x83" - "\xe0\x90\x8d\xbe\x25\xe6\x4d\xc0\xfa\x77\x5b\x49\x0c\xe3\xb1\x51" - "\x8e\x0b\xc0\xaa\xd3\x94\x7c\xc6\xdc\x58\x50\xeb\x08\xe6\x41\x16" - "\xe7\x05\xd7\xef\x2f\x95\xf7\xfa\x3b\xc6\x03\x73\x5f\x41\x74\xf8" - "\x07\xe6\x3a\x47\x31\x8f\x8f\x49\x52\x70\x0e\x4c\x77\x8e\x3a\xcd" - "\xcf\xd7\xf2\xb3\xd7\xdc\x50\xea\xaa\x4e\x43\xfd\xa7\x51\xef\x98" - "\x24\x65\x03\x8c\xb9\xb6\x1b\x75\xf4\x38\xc6\x24\xb9\x29\xf9\x90" - "\x5a\x3b\x6c\x28\x1d\x64\xec\x25\xf2\xd8\x69\xa9\x21\x7d\x4c\xdf" - "\xfc\xef\xbc\x8e\x81\x76\x65\x04\xcc\xdb\x0a\x74\xb9\xc1\x76\xd5" - "\x37\x4e\xd2\xcd\x8d\xad\x79\x92\xbf\x35\xa1\x8d\x29\x7c\x3b\xe8" - "\xd1\x78\x7d\x57\x89\xaf\x9b\x1b\x2f\xfd\x8d\xd9\x85\xdf\x21\xfc" - "\x9c\xfa\x73\x33\x7e\x6e\xdc\xa7\x4a\xba\x75\xe7\xc0\xce\xb9\xb9" - "\x11\x73\x7d\x01\x3f\xbb\x69\xcc\x5e\xd1\x3d\x56\x0b\xea\xf7\xb5" - "\x5f\xb0\x8d\x31\xa6\x1d\xf4\xcf\x51\xfd\xc0\x30\x28\x06\x63\x91" - "\x69\x2e\xec\xd5\xc2\xd7\x54\xe2\x65\x9c\xcd\x4d\xd5\x5e\xb2\x7d" - "\x8b\xdb\x7e\x73\xc2\xb2\x6a\xe1\xf1\x82\xf6\x7c\xe5\xb6\x1d\xa9" - "\xf1\x13\xaf\x31\xf7\x38\x6e\x1e\xeb\xa6\xa7\xab\xa4\xcc\x8f\x3f" - "\x50\xc0\xf0\x44\x9c\xe4\x07\x61\xb4\x5d\xc9\xb3\x86\x52\xee\x47" - "\x3c\xff\x08\xed\xb6\x9c\xa5\x9b\x65\x7f\x1e\x41\xdb\x77\x42\xa6" - "\xb0\xed\x54\x27\xe5\xff\xcd\x90\xff\xb6\x26\x63\x3d\x74\x23\xde" - "\xc1\x6e\xea\x6a\xc9\xf3\x11\xc3\x08\x00\x76\x85\x5c\x13\xda\x5f" - "\xba\xba\x4b\xf8\xde\x2f\xe9\x34\x61\x3e\x46\x7f\x37\x94\x72\x9d" - "\x76\xe8\xc1\xce\xc5\xb2\xde\x34\xc8\x2a\x6f\xd4\xfe\xef\xc7\xed" - "\x96\x77\x8f\x8c\x95\x72\x31\x03\x3a\x56\x76\x78\xbf\xdc\x72\x58" - "\xf5\xc9\x2d\xe6\xf0\x3e\xb9\xe5\x30\x7e\x33\xf1\xcb\xc1\xaf\x50" - "\x7f\x0e\xfd\x4d\x0a\xb9\x5f\xd7\xe3\xb8\x25\x1d\x63\xdf\xad\x68" - "\xcd\x69\xc0\x95\x79\xe0\x0b\x32\xb3\xed\xcd\xfb\x0a\x9c\xce\xfc" - "\xca\xe9\x41\xe8\x25\x78\xce\xc4\xfb\x44\x1e\x8b\x15\x41\x0a\x7b" - "\xef\x5a\x07\x9e\x5a\xd5\xcb\xb8\xbf\x25\xd7\x0b\xd6\x94\x95\x31" - "\x1f\x22\xcf\x7c\x8b\xbf\xac\x0c\xf5\x1d\x32\xe8\x87\xb4\x1a\x7e" - "\x1f\x5d\x3f\xb8\xe5\x78\xbf\x1e\x05\xfd\x92\x65\x4b\x17\x8d\xed" - "\x84\xfc\x41\x5f\xed\x2f\x52\xf3\xc6\xd8\x7f\xf0\x33\xe4\xde\x09" - "\xdc\x77\xb4\x40\xbe\xf4\xae\x7f\xf3\x68\x9f\x46\xc3\x7a\x35\x4a" - "\xf3\xaf\xff\x6b\x82\x3f\xbe\xf6\x98\xab\xf3\x10\xb5\xfa\x0f\x90" - "\xed\x39\x09\xe3\x33\x17\xf3\xf3\x4a\x11\xd8\xdf\xbb\x07\xb6\xd6" - "\x39\x27\xe6\xd9\x9b\x4e\xd3\x58\xd9\xf6\x9f\x9e\xc4\x0c\xfe\x94" - "\x84\xad\xd3\xe2\xb3\xce\x4d\x0b\x85\x7f\xd3\x29\x8c\x8f\x3e\x6b" - "\xfc\xc6\x5e\x4a\xd9\xbe\x8a\x52\x6b\x7a\x69\x6c\x6d\x2f\x25\x8b" - "\xbf\x27\x6b\x35\xd0\xb5\x9e\xba\x90\x48\x18\xdf\x99\xc3\x0b\xc8" - "\x5c\xbb\x8a\x64\x9f\x07\xca\xa1\x73\xf9\xa1\x73\x9d\x4b\x66\x39" - "\xd7\xaf\x73\xf5\xf5\xb1\xce\xb5\xfb\xa8\xe2\x8b\xdd\x47\xaf\xca" - "\xa3\x98\x84\x6c\x4a\x04\x7e\xf6\xb3\x34\xf6\x86\x84\x0e\xe8\x7b" - "\x68\xb3\x5b\x6f\x2f\xae\xa9\x96\x3c\x1a\x26\xdb\x0a\xd9\x2b\xca" - "\xf7\x17\x0d\x3a\xa7\x6a\xcc\x3b\x5e\xde\x03\x42\x1b\xc6\xdd\xc3" - "\xfb\x18\x87\x46\xf9\x4c\xcb\x6a\xc0\x77\x48\x2f\x1c\x23\x7c\x48" - "\x1f\xcd\x75\x37\x20\xbd\xc7\x31\x2e\xdd\xad\xbd\xb6\x6b\x30\x79" - "\x6b\x59\x63\xcc\xfb\xe3\x3e\x14\x5a\x29\xeb\xdb\x89\xab\xfd\xc2" - "\xe3\x3a\xcb\x63\x70\x5c\xd3\x9c\x7c\xe1\xb7\x2d\xe6\x3d\xa5\x71" - "\x87\x78\xbf\x8b\xd7\xb9\xdf\x86\x9e\xf2\x55\x7b\x5c\x2c\xfb\xa1" - "\x8f\xdb\x2c\xf9\x80\x09\x7d\x5f\xd8\x93\x29\x5c\xf7\x8e\xae\x77" - "\xf3\xde\xe8\x66\xb9\x0f\x3b\x0e\xfc\xf3\xb0\xd4\xc3\x58\xdf\x63" - "\x19\x08\xbd\xe9\x9a\x53\xf4\xad\x49\x6c\xd7\xf7\x38\xbe\x35\xda" - "\x4d\xd3\x8c\x7d\x3d\xb9\xbf\x8b\x34\xe8\x7f\xe9\xf9\x9c\x56\x38" - "\x86\xac\x85\x36\xd1\x39\x98\xee\x23\xf7\x5c\x35\xfa\x26\xca\xe4" - "\x18\x70\x30\xdf\xfc\xaa\x5b\x9b\x37\x0f\x69\x45\x06\x1c\xe4\xb9" - "\x16\xcf\x65\xfd\x79\x54\x99\xea\x90\x32\xf3\xba\xb5\xdb\x7e\x85" - "\xb4\xbd\x11\x65\x0e\x47\x94\x69\x0e\x29\x53\xaa\xd7\xe3\x8e\x28" - "\xe3\x09\x2f\xf3\x6d\xba\x14\xb7\x6f\x27\x85\x97\xf9\xf6\xd8\x88" - "\x32\x13\x2f\xc5\xed\xdb\xd3\x23\xca\x64\x46\x94\xc9\x0b\xa1\x25" - "\xef\xad\xa6\x22\xad\x38\xa2\xcc\x86\x88\x32\x35\xc6\xf3\x60\x7b" - "\xdc\xcb\x76\x92\x15\x7c\xd9\xc9\xfd\x09\xbd\xbd\xab\x7b\xeb\xf3" - "\x3d\x7a\xd9\xf6\x28\xed\xea\x8a\xa8\xcf\x1f\x5e\x5f\x72\xc2\xa5" - "\xed\x4a\xb6\x85\x97\x49\x4e\x8d\x28\x93\x16\x52\xa6\x5e\xd5\x93" - "\x3c\x37\xa2\x4c\x4e\x44\x99\xc2\x4b\xf9\x2a\xb9\x2c\xa2\x4c\x75" - "\x44\x99\x3d\x5f\x41\x0b\x9e\x8f\x95\x2f\xc2\x48\xd6\x79\x1f\xc4" - "\x5c\x7f\xeb\xd5\x6c\xcb\x60\x2e\xf1\xfc\xb2\xd7\x37\x84\xe7\x14" - "\x9e\x7f\x8e\x14\xf9\xa0\x2f\x25\xfb\xdc\x74\x47\x81\x31\x07\xf1" - "\x3e\x26\x8f\x67\xa5\x2b\x27\xb7\x0f\xa6\x53\x72\x3d\x86\x6f\x02" - "\xd7\x75\x64\x34\xeb\x5e\xb7\xa6\xf7\xeb\xb6\x6a\xbf\x9e\x14\x9c" - "\x5b\xb7\x31\x1c\xae\xbf\x4e\xed\x8f\xc6\xb0\x6e\x7d\xa4\x48\x96" - "\x29\x0a\xd1\x87\xb9\x7e\xef\xa1\x55\x3e\x53\x38\x1e\xb7\x66\x5e" - "\x06\x8f\x04\xe8\x38\x93\x5a\xa1\x7f\xf0\x3e\x50\x4b\x0d\x74\x19" - "\xe8\xef\x8c\xdb\x49\xba\xd5\x2d\x75\xab\xc5\xbd\xc4\xf7\xae\xe2" - "\xfb\xe4\x3e\x91\xd2\x2d\x6f\xb3\x36\xa1\x7e\xd6\xc1\x9b\x0a\xce" - "\x53\xb7\xd4\xff\x59\x07\xbb\xed\xa1\x23\xc5\x1e\xe0\x75\x5b\xa2" - "\xb1\x6f\xea\xa6\xdb\xd2\xa5\xde\x50\x76\x20\x95\xf7\xb0\x78\xdd" - "\xf7\x88\x77\x12\xe7\x01\xff\xdf\x3a\xda\x68\x2f\x6c\x40\x8c\xa9" - "\x5b\xbb\x2e\x47\x33\xd5\x87\xb7\xe5\x87\xf3\xe4\x10\xf0\xca\x6d" - "\xa5\xe1\xfd\x7e\x5b\x65\x78\xbf\xdf\x56\x1f\xce\x93\x1a\x78\xf2" - "\xb6\x43\x11\x65\x9a\x22\xca\x1c\x0b\x29\x53\xa9\xd7\xd3\x19\x51" - "\xc6\x17\x5e\xe6\x76\x73\xc8\x33\xda\x78\xbb\xb5\xdf\x86\x91\x7b" - "\xf2\xb7\x27\x87\x3c\x6b\x55\x52\x7e\xde\x3e\xd9\x48\xe3\x7d\xb4" - "\xda\x2d\x6a\x4f\x58\x87\x97\x19\x31\xde\x39\x7f\x7e\x38\x0e\xb7" - "\x17\x47\xe0\xd0\x3f\xfe\x2b\x94\x0d\xf6\x87\x53\x94\x92\x23\x79" - "\x08\x63\x04\xf3\xf5\x1c\x7e\x06\xac\x6a\xe4\x07\x1d\x6e\x3f\x1c" - "\x01\xaf\x39\x02\xde\xf1\x90\xe7\x44\x3c\x77\x85\xb4\x21\x31\xd6" - "\x2a\xfd\x62\xa0\x8f\xa5\x98\x8c\x74\xb6\x0d\x81\x6f\xa7\x5d\xce" - "\x33\x69\xec\xeb\x30\xe2\x24\xdd\xfe\x05\xdb\x91\x0a\x66\x4a\xe8" - "\xf8\x27\xd5\xae\x94\xf4\x70\x3c\x52\xe6\x86\xe3\x91\x92\x13\xd2" - "\x2e\xaf\x65\x0d\x3d\x62\xf1\x3f\xfa\x23\xd6\x71\xd8\x87\x46\xfa" - "\x1c\xac\x86\x5e\x76\x81\x12\xd9\xd7\xe3\x54\x21\xc5\xba\x8a\x3a" - "\x61\x93\xed\x6e\x1a\x94\x9f\xe2\x0f\xa4\xe9\xfe\x29\xb0\x37\x53" - "\x9a\x0c\x7e\x0c\xae\x3f\x90\x16\x2c\x7f\x3b\x1f\x69\x90\x7f\xb7" - "\x65\xa8\x35\xf6\x7d\x8d\xc2\x9e\x59\x0d\x7a\xc2\xbe\x19\xff\xa1" - "\x6e\x0f\xcc\x65\x9f\x05\xc8\x9e\x4e\xcc\xef\x09\x6a\x7f\x6b\x7c" - "\x42\x08\x5f\x7b\x6d\xab\xa6\x8a\x93\x34\xfe\x23\x9e\xff\x79\x8c" - "\xb2\xef\xc3\x11\xbf\x87\xd8\x86\x76\xf9\x4f\x4b\x1d\x0d\xef\xdb" - "\xf4\xb2\xd3\x43\xca\x7a\x74\x1b\xb7\x93\xdf\x4d\xf0\x93\xe9\x88" - "\xd7\x43\x80\x93\xa4\xf4\xba\xf1\x1f\x1d\xc1\x78\x45\x99\x62\xa3" - "\x0c\xdb\xc3\x5c\xc6\x52\x48\xa6\x3b\x8a\xc9\xe4\x5c\x75\x52\xc2" - "\xd6\xfb\xbe\x93\xf5\x63\x57\x71\x27\xb9\xbc\xed\xbc\x36\x65\x52" - "\x7b\xc9\xe3\xdb\x62\x7d\x64\xee\x2e\x3f\x80\x3e\x19\xdf\x16\x28" - "\x3f\x30\x09\xb8\xc1\xfe\x4a\x91\x72\x2e\x94\x76\x0f\x3d\x94\xf1" - "\xe8\x9c\x59\xe3\x7f\xf8\xe8\x8c\xb9\x0f\xdd\x67\x9b\xbb\xe8\x85" - "\xdc\x9c\xf1\x4b\x5e\x2a\xb4\xad\x58\xba\xa8\x70\xd1\xe2\x67\x6d" - "\xa9\x45\xe3\x8a\x6c\x0b\x0a\xd5\x35\x39\x7f\xc1\xb2\xc2\x29\x7c" - "\x9b\x62\x2b\x58\x9a\xbb\x5c\xde\xde\x1a\x4f\xe1\x40\x16\x15\xe6" - "\x2e\xb5\x8d\xcb\x49\xb1\x3d\xbc\x60\x51\xfe\x4b\x4b\x73\xa3\xc2" - "\xba\xcf\xb6\x34\x77\x69\xee\x82\x1c\xdb\x14\x5b\x2a\x43\x0e\x05" - "\x17\xd2\x9f\xa9\xc6\x3c\xc6\xf3\x57\x85\x43\xb4\xe9\xf3\x99\x5b" - "\xf1\xcf\x1d\xbb\x2e\x9d\xcb\xee\x68\x0c\xe7\xb9\x3b\x8e\x86\xf3" - "\xdc\x1d\xed\x97\xce\x65\x77\x44\xcc\x7f\x77\x44\xcc\x7f\x13\x12" - "\x2e\x9d\xcb\x26\x44\xcc\x7f\x13\x22\xe6\xbf\x09\xfd\xf3\x1f\x78" - "\xc9\xbd\x56\xca\x85\x09\x11\xf3\xdf\x84\x88\xf9\x6f\x42\x61\xc4" - "\xf3\xba\x90\xe7\x6b\xf0\x5c\x15\x3a\x3f\xe2\x79\x97\x31\x3e\x07" - "\xe4\xcb\x84\x46\x23\x0f\xcb\x7a\xc8\xe6\x0e\x3d\x6f\x5b\x48\xde" - "\x4e\x3d\x6f\x47\xff\xf8\x03\x1f\xb1\x8f\x88\xb2\xbb\x53\x67\xb0" - "\x4c\x67\xff\x10\x9e\x9b\x30\x3e\x6e\x3a\x4b\x13\x3e\x60\x58\xcc" - "\xc3\x72\xfd\x70\xeb\x13\x3d\x75\x23\xc8\xcc\x65\xea\x5e\x23\x93" - "\x70\x8c\x3f\x8e\x2b\x21\x2d\x01\x3f\xc8\x94\xd4\x34\xb7\xb6\xb9" - "\x50\xcd\x17\xa9\x95\x52\xdf\x47\x19\x1d\xfe\xcf\xf8\x19\x70\xac" - "\x28\x63\xae\x50\x73\x71\x07\xee\x13\x98\xa7\x51\xde\x24\xb4\x3b" - "\xc6\xe0\x4a\x48\x4b\xc4\x2f\x09\xf0\x2a\x0d\x78\xbc\x0f\x16\x6d" - "\xfc\x47\xae\x2f\xf7\xdb\x7c\x1a\x59\x2a\x1c\xc1\x76\x57\x90\xf5" - "\xea\xd4\x26\xb5\x46\xf0\x66\xa7\x70\xbc\x9f\x59\x87\xf4\xe8\x36" - "\xd2\x9d\xd0\xff\x52\x1b\xd5\xba\xc9\x9d\xe8\xff\x87\x3b\xd4\xda" - "\xe6\x9b\x6c\x23\xf6\x9e\xa2\x3b\xdf\xc0\xb5\x0f\xd7\x72\x03\xbe" - "\x53\xda\xce\x77\xf2\x9a\xc7\x63\x0c\x37\x22\x7d\x32\xe4\x5b\xaf" - "\xc5\x5f\x9a\x19\xe5\x5d\xa6\x70\xc4\x3e\x1a\x25\x9d\x6d\xe9\x5e" - "\x37\xdd\xb9\x8b\xf1\x0d\x49\x2f\x13\x8e\xe1\x73\x39\xbf\x9b\xeb" - "\x43\x99\xc1\x74\x6d\xc3\x1f\x4c\xf9\x5d\xde\x79\x2c\xa2\x1d\x5f" - "\x9e\xa2\xbb\x1e\x51\xed\xb8\x6b\x5f\x44\xdd\x5d\xd1\xdb\x71\x97" - "\x09\xed\xf8\x32\x7a\x3b\xee\xb2\x49\xda\x6a\x68\x8b\x76\xc9\xbb" - "\xc9\x68\xcb\x97\x92\xee\xe1\xe9\x73\x75\x5d\xc8\x0b\x1b\x2c\x11" - "\xef\x64\xd9\xc7\x8a\x07\xfa\x4d\xcf\x57\x6c\xa9\xa6\x8c\x28\x75" - "\x56\x09\xc7\xb0\xc7\xdc\x74\x57\xb3\x84\x33\x90\xbe\x57\xe1\x02" - "\x3a\x69\x92\x4e\x5d\x5c\x6e\xb0\xfe\x36\xec\x12\xb5\xae\x71\x17" - "\x78\xf6\xce\x06\x63\x4d\x72\x59\xb1\xf0\x18\x74\xec\x71\xdc\x6d" - "\x8d\x78\xe7\x0b\x79\x37\x31\xec\xdd\xea\xfe\xf4\x99\x46\xfa\xd7" - "\xeb\xa7\xbb\x8b\x23\xfa\x09\xfd\x33\xf1\xaa\xf0\x76\xdf\xbd\x41" - "\xb5\x0f\x7d\x74\x09\xad\xef\xde\x83\x3e\xea\x8b\xde\x47\x77\x37" - "\x45\xe7\xb5\xbb\x8f\x4b\x78\x23\x28\x1a\x3c\x1f\xfa\xae\x4f\xf2" - "\xa0\xde\x4f\x97\xf6\xcf\xc4\xd1\x46\xff\x7c\xbd\x36\x4e\xcc\x8e" - "\x68\x63\x00\x30\x3e\x53\x6d\xbd\x67\x7c\x04\xec\xa2\xe8\xbc\x38" - "\xb1\x12\xed\x0c\x44\x6f\xe7\xc4\xbd\x83\xf3\xe2\xc4\xa3\x68\x4f" - "\xe0\x52\x5e\x44\xf7\xc9\x32\x14\xad\x8c\x5f\x38\xa2\xd5\x73\x4f" - "\x92\xdd\xcf\x7a\xee\x3d\x33\x79\x0d\x29\x24\x3d\x25\x9c\xff\xd0" - "\x06\x2e\xc7\xf4\xf3\x2b\x39\xcb\xfd\x70\xca\x46\xda\x57\xf1\x64" - "\x8f\xe3\x9e\x0d\x11\xb4\x3a\x77\x8a\xbe\x73\x55\xb7\x16\xb3\x4b" - "\xd1\xeb\x3b\x1f\x45\xe0\xb4\x27\x3a\xbd\xee\x71\x82\x5e\xe7\xa2" - "\xd3\xeb\x9e\xe3\x83\xd3\xeb\x1e\xee\xff\x73\x97\xd2\xeb\x3b\x89" - "\xa1\xf4\x82\xae\x2b\xdb\x77\x8b\x15\xbc\xd1\x97\x25\x78\x0d\x0e" - "\x34\x49\xb4\x80\x57\x54\x99\x2e\x2e\x93\x6e\xf1\x29\x3e\x81\x0e" - "\x69\x3e\x4b\xdf\x49\x31\xc6\xff\xf0\x6a\x1a\x26\xfa\x9e\x10\x80" - "\x17\xc3\xe5\x5c\x45\xe7\x9c\x2e\x7f\x2a\xb1\xfd\x11\x51\x6f\x59" - "\x74\x59\xf0\x9d\x7a\xd0\xf4\xb5\x28\xe9\x8d\xca\x27\xe4\x3b\x9e" - "\x70\x19\xf1\x9d\xb6\xf0\x3e\x02\xdd\x50\x8e\x06\x7c\xda\x2f\xfb" - "\xbb\x7c\x9f\x7d\x37\xed\xd2\x3e\xfb\xee\x09\xd5\x5f\xdf\xfd\x20" - "\x1c\xbf\xef\x66\x46\xef\xaf\xef\x16\x0c\xde\x5f\xdf\xdd\x30\x78" - "\x7f\x7d\x77\x0f\xf7\x97\x9b\xbe\xeb\x0e\x9f\x37\xbe\xeb\x0c\x6f" - "\x2f\xea\x45\x39\xa1\x0d\xbd\x86\x9f\xbf\x6e\xbb\x8d\x1f\xcb\x38" - "\xee\xab\xba\x12\x02\x2f\xc7\x8c\x61\x1c\xaf\x14\xc6\xa0\xb0\x41" - "\xc3\xca\x55\xd1\xf7\x47\xd9\xc6\x6d\xad\x26\xde\x0b\x27\xdb\x8d" - "\xac\xbb\x4f\xfa\x4d\x50\xa3\x76\xdc\x6b\xa7\xe8\xbe\x35\x41\x4d" - "\x2b\x66\x3f\x4b\xe9\x5f\x29\xd7\x10\x26\x35\x87\xf6\x05\xfb\xe2" - "\xb0\x6d\xba\x49\xd9\x4e\x7f\x3b\x45\xf7\xce\x53\xfd\x72\xdf\x82" - "\x70\x3a\x4e\xf2\x44\xef\x97\x7b\xcd\xe8\x97\xbf\x45\xef\x97\x7b" - "\xc7\x0e\xde\x2f\xf7\xa6\xa1\x5f\xfe\x76\xe9\x38\xba\x37\x53\x1f" - "\x47\x6b\xb9\x8c\x6d\x31\xdb\xe3\xf7\xfe\x91\xf3\xe0\x1e\x63\xe4" - "\xde\x77\xf8\xfd\xf8\x2e\x63\x1c\xc9\x32\x1b\x00\x4b\xd6\xaf\xe7" - "\x29\xd3\x61\x84\xc2\x6d\xb0\x74\x45\x1b\x27\xf7\x1e\xe5\xbc\x77" - "\x14\x90\x19\x34\xcc\xdc\xc9\x30\x96\x12\x9d\xa5\xfb\x6e\xe0\x7c" - "\x9c\x7e\x87\x37\x74\x9c\xdc\xeb\x33\xf2\xb1\xac\x53\x79\xef\xf5" - "\x88\x9e\x3c\xe2\x7c\xe1\xb0\xef\xd3\xdb\x3f\x4c\xce\x23\x9c\x9f" - "\xf3\x45\xe4\x99\xae\xc6\xe3\x7d\x1b\xc2\xc7\xe3\x7d\xd9\xe1\xfc" - "\x09\xfa\xa3\x5c\x10\x72\x0e\xf7\x87\x80\xc3\xd7\xe6\xaf\xcb\x8f" - "\xcd\xfb\x8e\x47\x8c\x4d\xf0\xc0\xf7\x56\x2b\x1e\xf8\xde\x93\x11" - "\xb8\x7a\xa3\xf3\xc0\xf7\x12\x06\xe7\x81\xef\x25\x0f\xce\x03\xdf" - "\x4b\x67\x1e\x70\xd3\xf7\x8a\xc3\xc7\xe6\xf7\xe6\x87\xb7\xfd\x3e" - "\xaf\x1a\x9b\x74\xf5\x95\x8c\x4d\xe8\x42\xd7\x0c\x36\x0e\x79\x4c" - "\xa1\xee\x98\xba\x5e\x63\x3f\xe3\x6b\xd1\xcc\x8c\x71\x05\xfc\x26" - "\x27\xf2\x9a\x12\x64\xfc\x24\xa6\x61\xad\x3c\x6b\x33\x79\x6c\x28" - "\x1d\x37\xa9\x73\x2f\x76\xe4\x7d\x8b\xf7\x87\x15\x3d\xa7\xbc\x18" - "\xde\xfe\xc9\xe9\xd1\xe9\x39\x79\x3e\xe8\x69\x8f\x4e\xcf\xc9\x45" - "\x83\xd3\x73\x72\x15\xfb\xec\x5f\x3a\xa6\x26\xef\xb5\x2d\x97\x3a" - "\x8a\x2c\x73\x96\xa6\x0c\xf9\x7a\xf3\xd3\xe4\x8e\xf0\xf9\x69\x72" - "\xf3\x95\xcf\x4f\x53\x92\xa3\xcf\x4f\x53\xd2\xa2\xcf\x4f\x53\x32" - "\xd5\x78\x98\x52\x19\x3e\x1e\xa6\x14\x84\xf3\x04\x68\xf7\x3f\x36" - "\x3f\x4d\x71\x47\x8c\x81\x8a\x53\x74\xff\x02\xe8\x14\xa5\xaa\xdf" - "\xa6\x8e\x8b\xc0\xd1\x1f\xbd\xdf\xee\x4f\x42\xbf\x55\x44\xef\xb7" - "\xfb\x53\x07\xef\xb7\xfb\x67\xa2\xdf\x2a\x2e\xed\xb7\xfb\x73\xae" - "\x5c\xa7\xb8\xbf\x3a\xbc\xcf\xee\x2f\xbd\xf2\x3e\xbb\xff\x78\xf4" - "\x3e\xbb\xdf\x1b\xbd\xcf\xa6\x26\xa8\x3e\x9b\x9a\x1e\xde\x67\x53" - "\xc7\x86\xf7\xd9\x14\xff\x3f\xdb\x67\xe8\x9f\x2e\xe5\x67\x30\xf5" - "\x0d\xd8\xed\xc3\x7a\x1c\x53\x6b\xdc\x94\xa6\xef\xe1\xa6\xa9\xb9" - "\x43\xf5\xe1\x7e\xe4\xa9\xbc\x74\x1e\x98\xda\xa8\xa7\xfd\xf0\xd2" - "\x7e\x98\x7a\x0c\x32\xba\xab\xa9\x58\xee\x6b\xa9\x3e\x64\x9a\x23" - "\x9f\x73\x15\xef\x4d\x4d\xf5\x72\x59\xf4\xb1\x70\xf9\xfc\xc4\x72" - "\x1d\xf9\xbd\x0c\x87\xcf\x2a\x85\xc3\x4a\xb3\x5d\xc9\x1c\x3f\xb8" - "\x6f\xcc\x9b\x5d\xce\x92\xbb\x00\xef\x81\x7b\x14\xaf\xa6\x45\xea" - "\xbf\x75\x78\x17\xa7\xf8\xf4\xc1\xbf\x44\xe0\xb0\x2b\x3a\x9f\xa6" - "\x1d\x46\x1b\xea\xa2\xf3\x69\x5a\xfb\xe0\x7c\x9a\xc6\x32\xb3\x2e" - "\xc4\xf6\x19\xf1\x94\xdf\x1d\x61\xfb\x3c\x60\xb5\x78\x15\xef\x48" - "\x9d\xa8\xfc\x4d\xe8\x1c\x0f\x44\xea\x7f\xe8\x9b\x07\xde\xd5\x71" - "\xfe\x4d\x44\xf9\x41\xf4\xbf\x07\x58\xff\xdb\x1f\x1d\xe7\x07\x2e" - "\xa3\xff\x3d\xc0\xfa\xdf\xfe\x4b\xc7\xd6\x03\xba\xfe\x17\xcd\xc6" - "\x7b\xe0\x78\xf4\xfe\x7f\x20\xa2\xff\x29\xb3\x10\xf6\xb0\x2c\x1f" - "\x96\xef\xc1\xd1\xa1\xf9\xd8\xc7\x88\xf3\x32\x8f\x44\xc9\x3b\x3d" - "\x12\xe6\x20\xf9\x0a\x2e\xe1\x3d\xf6\x89\x8a\xca\x7b\x0f\xd6\xa8" - "\xf1\xf8\xa0\x37\x7c\x3c\x3e\x78\x28\x7c\x3c\x3e\x90\x19\x51\xee" - "\x58\xf8\x7b\xf0\xcf\xff\x98\x8c\x9d\x96\x1e\xc1\x03\xef\x9f\xa2" - "\x69\x1f\x28\x1e\x48\xbf\x2e\x1c\x8f\x69\xf3\xa3\xf3\xc0\xb4\x42" - "\xb4\xff\xfd\xe8\x3c\x30\xad\x72\x70\x1e\x98\xb6\x17\xb4\x7c\x3f" - "\x94\x6f\x1f\x2b\x4e\x1b\x16\x91\xa7\x2d\xba\xcc\x9b\xd6\x19\x7d" - "\x8d\x20\x9d\x14\x8d\xd3\x27\x85\xd3\x38\xdd\x1a\x4e\x43\xb4\xe5" - "\x9f\xa7\x61\xff\x59\xdf\x1e\x47\x7a\xe4\xf8\x77\x9d\xa2\x87\xf4" - "\xf1\xff\x70\x84\xac\x4b\xdf\xa5\x70\x89\xb6\x2e\x92\xce\xf6\xaf" - "\x2b\x3a\x2d\xd3\x8f\x0f\xd2\x66\xf6\x69\x73\x05\x2f\x19\x4b\x0f" - "\x25\x20\xfd\x31\x5e\x0f\xe5\xf5\x90\x5a\xa4\x3f\xe6\x27\xb3\x9c" - "\xaf\xfa\xe7\xa5\x87\xf8\xec\xa5\x60\xfa\x33\xff\x5a\x46\x53\x06" - "\xcf\x41\x8c\x57\x56\xb1\xf4\x59\xb0\xac\x63\x5e\xbf\x99\x79\xfd" - "\x21\xa9\xff\xf1\x3e\x0b\xfb\x03\x5a\x8a\x28\xc3\xe5\xf5\x93\xc1" - "\xef\x9c\x3f\x02\xf6\x06\x1e\x17\x9c\xdf\xc8\xab\xd6\xcd\x4a\x23" - "\x64\xd3\x43\x87\xa2\xf7\xf1\x43\xcd\x83\xf3\xce\x43\x9d\xaa\x9f" - "\x1f\x1e\x1d\xde\xcf\x0f\x43\xff\x1b\x3e\x97\xdb\x0a\x1e\xb8\xa2" - "\x71\x52\x68\x13\x9e\x41\xe5\xfd\xda\x27\xda\x0b\x4a\xe8\xc6\xd3" - "\xf4\xf0\x3a\x59\x9f\x26\x7c\x96\x35\x31\xd4\x24\x65\xc0\xc3\x9f" - "\x48\x3c\x91\x27\xcb\x4f\x9a\x58\xfb\x7c\x3b\xbf\xab\x73\x08\x1f" - "\xf2\xb5\xf1\x9e\x00\x9f\xf5\x03\x2f\x5c\x73\x92\x1e\xde\x19\x56" - "\xde\x44\xe4\x52\x30\xda\xeb\xe4\x78\x7c\xf8\x98\xb1\xa6\xbb\x6e" - "\x10\xff\x20\xe4\xf1\x19\xbe\x0f\xca\xf7\xeb\xe1\x41\xf7\x2f\x19" - "\x27\xf6\x8f\x67\x9c\x2e\x2f\x07\xbe\x3f\xd3\xe0\x5f\xe5\x33\xf9" - "\xfd\xf9\x03\x3e\x79\xdf\xcf\x73\xd3\xf7\x07\x3d\xcf\x11\x3e\x0e" - "\xbe\x5f\x15\x0a\x47\x9d\x77\xff\xfe\x1e\xc3\xaf\x0e\xf7\x87\xbe" - "\x02\x96\x81\xcf\xf1\x08\x7c\xba\xa0\xa7\x34\xe9\x30\x7c\x97\x83" - "\xc1\x7d\xae\x78\x96\xf9\x61\x7a\xe2\xe5\xd6\xfc\x62\xad\x94\xb1" - "\xf9\x12\xde\x9a\x2e\xf5\x25\x86\x71\x79\x1c\xa7\x97\x86\xd9\x16" - "\x72\xef\x9e\xf7\xb6\x66\xcc\x52\xe3\x7e\x46\xc4\x1a\xe1\xf4\x1a" - "\xe9\x37\xa5\x8f\xfb\xa7\xfc\x91\xe3\x60\xfa\x61\x63\x8e\x8e\x48" - "\x3f\x66\x8c\x7b\xd8\xb5\x0c\x37\x62\x9d\x75\xba\x57\x8d\x85\x19" - "\x33\x83\x71\xa1\xf6\xda\x0c\xa9\xff\x19\xeb\xa5\x6e\xe4\x0b\x2f" - "\x37\x23\x62\xfd\x6f\x7a\x8d\x18\x7c\x9d\x3e\x01\xfd\xeb\xe5\xbd" - "\x2d\x75\x76\x78\x46\x71\xc4\x7a\x85\x67\x93\x3c\x27\xfa\x29\xe0" - "\xfe\x40\x97\x7b\x3f\xf8\x22\xa2\xbe\x1a\xfb\x99\xcb\xb5\x7f\xc6" - "\x20\xed\x9f\x31\xd0\xfe\xc5\x12\x6e\xc4\x5a\xe2\x0c\xd9\xfe\xc0" - "\x25\xf2\xef\x07\x09\x90\x5f\x06\xdd\xa0\x73\xff\x20\xd7\xd0\xd5" - "\x79\xfd\x60\x70\x5d\xfd\x07\x03\xeb\x7f\xaa\xdc\xc0\xfa\x9f\x27" - "\x9a\xae\xee\x26\xb9\xb7\x1a\x5e\x77\x99\xa5\x26\x5a\x5b\x7e\x30" - "\xc8\xfa\xdf\x0f\xf4\xf5\xbf\x7f\x4b\x0c\x97\x67\x3f\x68\x0b\xef" - "\xc3\x19\x11\x7d\xf8\x03\x4f\x78\x1f\xce\xa8\xf9\xef\xce\x6b\x3c" - "\x71\xc6\xc6\xc6\x6a\xb1\x31\x5a\x4c\x2c\x5e\xa3\x89\x34\x2c\xd6" - "\x14\x3b\x04\xbf\xa1\xfa\x75\x98\x16\xab\x99\xf0\x1b\xa2\x5f\x87" - "\x46\x3c\x0f\xe3\xb2\xf8\x99\xf4\xeb\x90\x88\xe7\xa1\x5f\xf1\x7e" - "\x98\x5e\xaf\x51\xbf\x29\xe2\x79\xc8\x57\xbc\x1f\xfa\x4f\x96\xa7" - "\x4b\x9e\xc3\xfd\xd0\x66\x2c\x5e\xbe\x20\x7f\x51\x8e\xdc\x2f\xce" - "\xb5\x2d\x78\xe6\x99\xdc\x65\xcb\x6c\x85\x4b\x6c\x0f\x3e\xf0\xe8" - "\x5d\xf7\xd9\xd4\xb6\x73\xfe\x94\x71\x39\xf1\x34\x6b\xc5\x52\x7e" - "\x31\xeb\xb1\x19\x99\xb6\x8c\x07\x1f\x08\x7f\x69\x80\x91\xdb\xcb" - "\x97\x83\x12\x32\xfe\xd2\xca\x47\x12\x6d\x18\x29\x65\x4f\x47\x4b" - "\x3d\x91\x5a\xf3\x78\x64\x41\x33\xb4\x09\xd1\x6b\x17\xce\x9b\x79" - "\x4f\x7f\x96\xf4\x11\x1e\x5f\x5f\x4a\x05\x0b\xf9\xbc\xc9\xac\x3b" - "\xc5\x7b\x1e\xb2\xfd\x80\xb4\x93\xf4\xf8\x8b\x4d\xd0\x6a\xf9\xd9" - "\xd5\xe1\x27\x9b\x9d\xcc\x28\x7f\x35\xde\xc5\x88\xfb\x83\x48\xf3" - "\xea\x3e\xcd\x19\x63\x64\xda\x7b\xa5\x46\x3e\xcb\x29\x9a\xf5\x17" - "\xf1\x9e\x90\xcf\xe2\xfe\x4a\x3d\xdf\xac\xb7\x82\x8e\x99\x79\x2c" - "\x1b\x6a\x5e\x23\x53\xed\x6b\x44\xdb\x46\x90\x79\xdb\x48\x3e\x43" - "\x3f\xab\xc6\xd8\x0b\x2d\xc7\xb3\x9b\x1e\x2f\xe0\xba\x39\x6f\x50" - "\x9b\xf9\x9a\xcc\x3f\x22\x2c\x7f\xf3\xc0\x5e\xec\xac\x1a\x0d\xf9" - "\xe6\x7c\x4e\x16\x5f\x7c\xed\x51\x57\x71\x29\x59\x02\xe2\x8b\x3b" - "\xa6\x53\x4c\x2b\x66\xdf\x95\x7e\xe1\x77\x2e\x3d\x8d\xfa\x67\x5f" - "\x67\x59\x29\xbe\x70\x61\xf4\xcf\xea\xb2\x8b\x4d\x67\xc8\x84\x71" - "\x1d\xe3\x5c\xca\x7e\x0a\xb3\xa9\xf6\x4b\x32\x81\x06\xa3\x4f\xd3" - "\x9c\xd4\xe2\x59\x22\x60\x9f\x45\xa6\xff\x2c\x62\x7f\xc3\xdd\x0b" - "\x37\xfd\x99\x4c\xbf\xee\x2d\xd5\x7a\x85\x95\x8a\x0b\x05\xe4\x86" - "\x20\xbb\x57\xf8\xd8\x5f\xbf\x39\x3b\xc0\x79\x1e\xef\xb1\x5b\xa9" - "\xb5\xd0\x4b\xab\x8f\x0b\x5f\xd9\x9f\x95\x9f\x7f\x4b\x97\x97\xfd" - "\x17\xcd\xab\x67\x51\xec\xa9\x4c\xd2\x5a\xf2\xaa\xc9\x35\xdf\x4b" - "\xc5\xc7\x45\x67\x73\xf6\xe7\xd4\x9a\xd7\x40\x59\xed\xa4\x35\x77" - "\x7c\x46\x32\x3e\xc4\xfa\xbf\xb2\xdf\xa3\x75\xf5\x22\x4e\xbb\x40" - "\xab\x56\xd3\x55\xab\xfe\x42\x16\x57\x67\x3b\xea\x39\x43\x3f\x3e" - "\x46\x31\x80\xa7\xbd\xfc\x19\x59\x5f\xfe\x11\xfb\xf3\xa6\x51\x4d" - "\x09\x59\x85\x3d\x39\xa1\xd7\x9e\x9c\xd8\x2b\x92\x47\xf4\xd8\x93" - "\x93\x5a\x0b\x90\xbf\xe3\x5d\x1a\xde\x4e\x49\xef\x9d\x6e\xd7\xaa" - "\xcf\xd3\x68\xdb\x6c\xee\xff\x39\x29\x35\xe7\x91\x7f\xfd\xc1\xd2" - "\x20\xca\x86\x96\xf1\xc7\x1d\xac\x76\x65\xfa\x28\x08\x58\xd5\xbd" - "\x34\xba\xa6\x97\xac\xc1\xf2\x83\xa5\x4c\x8b\xbe\xf5\x6f\x1e\x85" - "\x2c\x1c\xb6\xff\xe9\x46\x93\xab\xb9\x8b\x5a\xbc\xbd\xd4\x4a\x9f" - "\x92\xab\xe8\xef\xce\x5f\x3f\xdd\x38\x24\x08\xe6\x77\xae\xea\x00" - "\x7c\xc5\x33\xf6\x16\x3e\x97\x58\x4a\x15\x25\x94\x50\xb0\x8a\x86" - "\x9d\x46\xba\xb2\xe9\xb7\x41\xb7\xf9\xbb\x73\x95\xf4\xc1\x7d\xbc" - "\xa0\xa4\x85\x62\x5b\xbd\xd5\xdc\x66\x2d\x10\xff\x57\x72\x79\xdb" - "\xc8\x55\xf0\x37\x67\xd0\xfc\x59\xe7\x86\x20\x99\xf7\x5d\x6c\xd3" - "\x5c\xa6\x8b\xe4\xca\xf4\xd2\xfb\xa8\x5b\xac\xff\x6b\x02\xe4\x55" - "\x5a\xab\xd7\xc7\xe7\x92\x52\x45\xb7\x35\xbe\x62\x29\xa5\xd4\x9e" - "\xa7\xb1\x3b\xcf\x53\xb2\xe8\x49\xd6\xd8\xaf\xf6\xc9\x33\x89\xb4" - "\x13\xd7\x84\x0e\x32\xa3\xbd\xca\xa7\x3a\x4e\xf7\xaf\xed\x4b\xa6" - "\xba\xde\x01\xff\xda\xde\xee\x01\xff\x5a\xf0\x52\x3d\xfb\xd8\x62" - "\x5c\x64\x32\x3f\x57\x9c\x25\xd3\xda\xb3\x44\x77\x94\x6a\x64\x7b" - "\x9a\xcf\x47\x3c\x32\xc4\x95\x73\x46\xde\x9f\xa4\x8c\xc3\xb8\x26" - "\xe0\x17\x83\x31\x20\xd7\xb3\x3b\x74\xbe\x45\x9a\x86\xb4\x37\x70" - "\x8d\xc5\x75\xa7\xbd\x46\x78\x44\xd9\x9e\xd1\xdd\x1a\xc5\x33\xff" - "\x2a\x5f\xde\x3d\xa3\x7b\x1c\x19\xd0\x7f\x72\x93\x0c\x3e\x56\x32" - "\x7d\x56\xfd\xfb\xa7\xce\x70\xbc\x16\x8f\xc4\xa7\x2f\x2f\x86\x63" - "\xb7\xe8\xe9\xc0\x21\x23\xc0\xf5\xa2\x7e\x37\xae\x16\xfc\x30\x2e" - "\x33\x0a\x8d\xb2\xdd\x7d\x79\x5c\xe7\x05\xa4\x0b\x23\x1d\xed\x35" - "\xf1\xbb\x83\xa7\xce\x68\x2a\x4f\xb2\x06\x98\x3e\x1d\x3e\xc6\xfa" - "\xac\x74\x1e\xd3\xdd\x9a\x45\x1c\xc9\x99\x48\x35\x23\x45\xdb\xce" - "\x2d\xa2\x49\x8d\xb5\x47\x26\xb9\x69\xa1\x8d\x71\xc4\xbc\xdd\xb4" - "\x01\xef\x8e\xd8\x88\x98\x2e\x4d\xd9\xec\x3f\xf6\x48\xa6\x9b\xe2" - "\x8f\x87\xb6\x41\x38\xfe\x6d\x3a\xcf\x9d\x6f\x97\x38\x87\x08\x6d" - "\xe6\xf4\x56\x77\x17\xfd\xba\xb7\x73\x88\xfd\x8f\xa4\xb9\xfc\x27" - "\x69\x42\x12\x59\x59\xff\xab\xdb\x22\xdc\xb8\x76\xb2\x3f\x27\xf8" - "\xe4\x86\xd3\xf4\xc8\x1b\xb7\x27\x51\xd2\x9f\x8a\x48\x97\x47\x8f" - "\xbc\x1b\x22\x8f\x1e\x6a\xe9\x68\x0c\x91\x45\xf3\x2e\x5c\x2a\x8b" - "\xe6\x7e\xa1\x64\x91\xf0\x2b\xd9\x13\x70\xeb\xe9\x9f\x45\xa4\xeb" - "\x7e\x21\x73\x3f\x88\x48\xf7\xe9\xe9\xfb\x22\xd2\x3d\x2a\xfd\xb1" - "\x33\x86\xac\x6b\x65\x3c\x56\xb0\xac\x7b\xec\x23\x96\x75\xad\x39" - "\xba\xac\x93\x3e\x86\x8f\xfd\x46\xfc\xa2\x94\xf8\xec\x11\xee\x37" - "\x32\xfe\xe2\x3d\x32\x70\x8f\x43\xda\x2c\x4e\xab\xfc\x94\x4c\xf8" - "\x49\x39\x27\x1c\x33\xf7\xb3\x9c\x63\x19\xc7\x7e\x27\x3b\x46\x8a" - "\xf6\x1d\x5b\xc4\xb1\x9a\x2d\xa2\xb9\xc7\xf1\xe8\x61\x43\xde\xfd" - "\x14\x69\x1b\x90\xf6\x53\xbc\x67\xb9\xc7\x34\x69\xc9\x6c\xe4\x73" - "\xfa\x1d\xe0\xe3\x1c\x4b\x0c\x15\x6c\x02\xcf\xf3\x79\xc0\x75\xa0" - "\xaf\x0b\x32\x89\xcf\x72\xc9\x38\x27\x5a\x2a\x64\x54\x07\x8f\xb7" - "\x91\x6b\x31\xbe\x5c\x45\x9f\x53\x89\x57\x9c\xe6\x73\x71\x8c\x43" - "\xd6\xca\x1f\x70\x1c\x8f\x98\xa6\x3c\x22\xf6\x01\x67\x7f\x15\xc8" - "\x5d\x53\x25\x70\x3a\x92\xcf\x7d\xfd\x18\xec\xff\x6d\xfa\x79\xa4" - "\xc7\x0b\x38\x2e\xd0\x49\x7a\xb4\x0c\xf6\x9d\x8f\xdb\x66\x09\x94" - "\x12\x9f\x5f\xc1\x18\x65\x1b\x2f\x6f\x07\x7e\x95\xc6\x19\x16\x8e" - "\xed\x84\x3c\xae\x76\x1f\x31\xce\x6e\x7a\xf4\x58\x4b\x71\x23\x97" - "\x2f\x62\xda\x08\x87\xdd\x80\x11\x23\xcf\xc0\x38\xc8\xcc\x67\x60" - "\xdc\xf4\x58\x9e\x2c\x1f\xff\xe6\xd1\x96\xf9\x1e\x62\x39\xef\xea" - "\x04\x8c\xe2\x93\x0a\x06\x60\x09\xc8\xfd\xb0\x77\x3a\xfc\xab\x56" - "\x8b\x2f\x00\x3f\x9d\xfb\x8b\xcf\x2d\xf2\xfe\x1a\xe8\x92\xc0\x7e" - "\xf1\x4a\xf7\x7c\xb4\xa5\xee\x53\x22\xfd\xec\x25\xf8\xed\xd1\x66" - "\x3e\x6f\xc4\xe7\x2d\xe5\x59\x4b\x6d\x22\x89\x15\xc9\x09\xfd\xe7" - "\x2d\xff\x7f\x38\x6b\x09\xfa\x5b\x6b\x35\xd1\x00\xfc\x9b\xf9\xbc" - "\x25\xf0\x4f\x61\x3e\xd4\xdb\xd4\xf6\xf3\x1f\x4b\x9a\x27\x71\x1a" - "\x6c\xc5\xa3\x46\xff\x73\x7b\xb9\x2d\x27\xe9\x11\x9f\xd2\x09\x45" - "\x9b\x9b\xe6\xb6\xf1\x7b\xa4\x75\x70\xfe\x09\x90\x63\xae\x9c\x00" - "\xed\x3f\x15\xd0\x2a\x56\x91\x49\xc9\xb4\x79\xff\xe0\xf2\x4a\xa6" - "\xcd\xab\x1f\x90\x69\xf3\x7e\xae\x64\x9a\xa2\xb1\x92\x69\xf3\xca" - "\x95\x4c\x9b\xb7\x46\xee\x83\x41\xa6\xf1\x3b\x96\x6b\x86\x4c\xdb" - "\x39\x52\x1c\x65\xd9\xd1\xe3\x98\x57\x60\xc8\xb6\x8d\x48\x63\xd9" - "\xc1\x38\x2a\x39\xf5\xd8\x51\xf1\xbf\x92\x49\xf9\x19\xf0\x7d\x1e" - "\x9f\x55\xe8\xd4\xef\xd1\x2f\xf3\x4e\x28\x19\x37\xaf\x69\x40\xc6" - "\xcd\x9b\x3e\x50\x96\x65\xdc\xbc\x4f\x94\x8c\x53\xe9\x75\x3f\x66" - "\x19\xf7\xd8\x51\xa6\x81\x0e\x5f\xe3\x35\x3b\x3d\x3f\xe8\xf8\x48" - "\x5b\xa8\x8c\x0b\x1f\x5f\x8f\x8f\x36\x64\x1c\xcb\x36\x3c\xa7\x40" - "\xa6\x49\xdf\x60\x1e\x67\x55\xa0\xb9\x31\xee\xb8\x0f\xb8\xcd\x1c" - "\xff\x87\xe9\x36\xed\x0c\x0d\xd3\xcf\xfd\xe8\xed\x7e\x3c\xcf\xf0" - "\x75\x74\xd3\xbc\x82\x68\x7a\xb3\xa1\xa7\x81\x1f\x6f\x0a\x60\xbc" - "\xb9\x4a\x31\x97\x56\x8b\xd2\x56\xff\x31\x7a\xaa\x90\xb4\x60\xec" - "\xf3\x27\xb8\x6f\x61\x67\x0c\xe5\x2b\xcb\x1e\xcc\xa1\xfb\xb2\xbc" - "\x34\x14\xb6\xf9\x89\x0a\x0d\xef\x8a\xe8\x7b\x21\xef\xfe\xc8\xf5" - "\x84\x94\x1b\x1f\xf2\xee\x73\xa9\xe3\x9d\xe5\xd8\x4f\x8f\x57\x0e" - "\x66\xfb\x5f\x19\x2e\x3f\xbc\x77\x70\x5c\x7e\x38\x6f\x70\x5c\x7e" - "\x28\xf5\x80\xf1\x5d\x14\x03\xdb\xec\xea\xb3\xf4\x43\xb9\x1e\x23" - "\x63\x57\xac\x8d\x5a\xcf\xeb\xfa\xfb\x21\x21\xef\x43\xeb\xfa\x20" - "\x4a\xf9\xd0\xfa\x4e\x5c\x1e\x7e\x66\xcc\xe5\xe1\x67\x8e\xb9\x3c" - "\xfc\xcc\x07\x58\x06\x82\x76\x96\xa0\x16\x9e\xef\x0e\xbf\x1c\x83" - "\x47\xf9\xdc\x1d\xf2\x2d\xd2\xd7\x7c\x4e\xd8\xc7\x48\x5b\x50\x9e" - "\xcd\xda\x84\xf7\x7c\x96\x9c\xe5\x73\xfa\x4a\x22\xb5\x47\xdd\x5f" - "\x66\x67\x24\x6e\xc3\xfd\x06\x6e\xf2\xfd\xbb\x91\xb8\xe1\xfd\xf8" - "\x90\xf7\x9f\x0d\xf4\x7b\xe6\x65\xfd\xeb\x5d\xd5\x44\x1c\x43\xef" - "\x08\xcc\x17\xcc\xc9\x1c\x8f\x4b\x5f\x9f\xf9\xd1\x44\xc8\xf9\xd2" - "\x10\xbf\x5d\xf6\x39\xbb\xa9\xd5\xcb\xe7\x54\xbd\x32\x56\x0a\xda" - "\xf2\x4d\xcc\x27\x23\xf8\xac\x0e\x9f\xdb\xc9\x0a\x64\x68\x2a\x26" - "\xce\x8f\x0a\x8c\xb2\x83\xad\x03\x71\xbd\x7a\x9d\xec\x03\xeb\x45" - "\x99\x5d\x46\x19\x86\xcd\x7e\x94\x98\x07\x6e\x92\x67\x57\xfd\x5d" - "\x2c\x77\xbf\x09\x3d\x79\x84\xaa\x27\x9b\xf4\x7a\x60\xc7\xfe\x30" - "\xe1\x72\x67\x47\x06\x6f\xdf\x8f\x93\xae\xbc\x7d\xa4\xb7\xef\xc7" - "\x19\x5f\xd1\xbe\xcb\xd5\xbb\xe1\xca\xeb\x4d\x34\xea\x3d\x7a\xe5" - "\x74\xfd\xb1\xff\xeb\xd3\x35\x55\xa7\xeb\x13\xa9\x5f\x41\xd7\x28" - "\xf5\x3c\x91\xf3\xf5\xeb\xb1\x19\xf5\x54\x47\xab\x87\xe4\xdf\xa0" - "\xe7\xba\xcc\x46\x6c\x3a\x8e\x0b\xa9\x62\x52\x3d\xe1\x0e\x8d\x9d" - "\xa9\xe2\x45\x3e\xe1\x35\x62\x67\xea\x31\x2c\x31\xb7\xcc\xbf\x3a" - "\xab\x9e\xf5\x11\x11\x74\xd3\xfc\x24\x8e\x7b\x98\xbe\x3a\x34\xc6" - "\xe4\xfc\xe4\xcb\xc5\xec\xe4\x58\x39\x42\x64\xd2\x91\x6a\xe9\x0f" - "\x80\x79\x68\xfe\x02\x3e\x1f\xa0\xf6\x33\xe7\xe7\xab\x31\x39\x3f" - "\xdf\x4d\x4f\x34\x0e\x0e\xe3\x40\xc1\xae\x92\xd4\x21\x83\xf9\xfc" - "\xa3\xfc\x5e\x37\x3d\x2b\xd7\x2f\x03\xeb\x1b\x2a\xc5\x39\xab\x1e" - "\x8b\x2b\x2b\x2e\x24\x56\x18\xe6\xee\xa7\xee\xd5\xcf\x26\x80\x06" - "\xa5\xa0\xe5\xfc\x0e\x83\x06\x46\x3a\xd2\x7c\x06\x0d\xa0\xaf\x24" - "\xb8\xea\xfd\x7c\x76\xc8\xab\xce\x7b\x3f\x79\x83\x28\x3f\x90\xad" - "\x60\x3f\xa9\xf6\x19\xe2\x1b\x2a\xbd\x2f\x5b\x35\xa3\xfc\x58\x9b" - "\xfd\x4b\xe6\x61\x4f\xdc\x81\xec\x1e\xc7\x93\xe9\x06\x7c\xc1\x78" - "\x89\x81\x7c\x75\xd2\x2f\xe9\x49\xf4\xff\x13\x93\x25\x5f\xa3\x0e" - "\x89\xbb\x46\xb1\x41\xe0\x8f\x36\x68\xae\x02\x2f\xeb\xa9\x5d\x01" - "\xb4\x9f\x65\xdd\xa1\xc5\x6e\x13\xe7\x91\xba\xc3\xb9\x64\x4d\xc5" - "\x39\x7b\xf2\xdd\xe0\x39\x8e\xb7\x21\xf1\x4a\x40\x9b\xcd\x8c\x93" - "\x1b\x57\xcf\xcb\xc9\x34\xe7\x02\xe9\xb4\x78\xf2\x8d\x20\xd2\x83" - "\xcb\x06\x70\xa8\x95\x67\x3c\x9e\xec\x34\x70\x08\x72\xfd\x3d\x56" - "\x0d\xba\x18\xd7\xdb\x29\xcf\x59\xa2\xee\x09\x1c\x97\x8a\x63\x59" - "\xac\x48\x26\xc6\xa1\xc7\xf1\xd4\x68\x83\xde\x7a\x19\xa3\x8e\xe6" - "\xa0\xac\x5b\xd1\x46\xd1\xf9\x08\xf4\xc1\xa7\x66\x5e\x4a\xe7\xa7" - "\xb2\x43\xe8\x1c\xcb\x7c\xc5\x6b\x2c\xe8\xa3\x00\xd3\x9b\xf7\x35" - "\x6c\xcb\x59\xaf\x7a\xea\x67\x47\xbc\xd2\xef\x24\x81\xe1\x06\x41" - "\x7f\x86\x01\xb8\xdf\x50\x34\x7e\x6a\x4f\x3f\x8d\x51\xb7\x40\x5f" - "\xac\x55\x67\x52\xd8\xf7\x1d\xb2\xe3\xa9\xa3\xfd\xf5\x30\xae\x76" - "\xab\x16\x14\x56\x8e\x6b\xe7\x61\x5c\x0b\x6d\xc2\xc7\x7a\xa5\xf4" - "\x63\x42\x5b\x0f\x95\xb4\x9b\xa0\x5b\x6a\xb2\xae\xee\x64\xd6\xef" - "\xcd\xf2\x1e\x75\x0d\xc2\xdf\x9f\x70\xec\x38\xa3\x5d\x68\x8b\x99" - "\x79\x0b\xb8\x43\xff\xcb\xbe\x4a\xf2\xcb\x72\xee\xa7\xac\x2f\x38" - "\xcd\xc8\x87\xe7\x0f\x39\x9f\xf1\x8c\x77\xe0\xaf\xac\x57\xd0\xae" - "\x78\xc6\xd3\xc3\xf1\xf2\x64\x9b\xb3\x93\x19\x46\x8f\x23\xab\x32" - "\xac\x9d\x7d\x99\x26\x83\xef\x78\x8f\xa8\xc9\xe6\x93\xb2\x53\xd1" - "\x36\xeb\xb0\x31\x26\xb9\xbc\x1a\x63\x59\x6d\xa1\xbc\xe8\xb5\x0f" - "\xf0\x41\xe1\x18\x32\x9b\x6c\x1c\xef\x2e\xab\x41\xc5\xd5\xcd\xf2" - "\x47\xf6\x17\xbf\xe3\xd8\x70\x3a\x0d\x79\x3c\x25\x9e\xa4\x2c\x0f" - "\xb7\x0d\xef\xd2\x2f\x37\x5f\x72\x8c\x36\x8e\xb7\xb7\x59\x8d\x23" - "\xd0\x65\xc1\xa2\xcd\xea\x7c\x8f\x57\xc5\x48\xcb\x7e\x41\x68\xaf" - "\xcb\xfe\x62\xbf\x3c\x19\x0f\x43\xc6\x9e\xc8\x66\x1f\x37\x31\xbc" - "\xe0\x75\x19\x2b\x51\xf7\xd9\xf3\x34\x15\xf8\x65\x9c\x35\x7b\x21" - "\x9f\x83\xf5\xb3\x4d\x26\x7d\xd2\x8e\x14\xfa\xe9\x31\x1f\xd3\x36" - "\xfb\x30\x9f\x57\xf7\x4a\x5a\x64\x1f\x35\xce\xa8\x73\xdc\x37\x8e" - "\x25\x38\xc1\x4f\xb1\xac\x53\xd8\xec\x1c\x5b\x60\x41\x3d\xeb\x24" - "\x8a\xa6\xe0\x7b\x4d\xb4\x29\x5e\x5e\x70\x35\xc7\x66\x54\xfb\x4b" - "\x27\xc1\xdf\xb1\x7f\x47\xde\x5b\xd5\xba\x8c\x31\xd6\x16\xbc\xce" - "\x7b\x4c\x6e\x1d\x46\x8f\x63\x01\xe6\xff\xf9\x55\x97\x8e\x8b\x05" - "\x57\x1b\x36\x06\x9f\x8b\x53\xfb\x55\x03\xf0\x50\x5e\xae\x4b\x0f" - "\xc8\xa6\x3f\x30\xac\xd2\x4b\xc7\xcc\x82\x2a\x83\x97\x0b\x6e\xe6" - "\x73\xd5\xd9\x99\x5c\xff\x60\x32\x53\xd8\x7f\xc4\xfd\x64\x3e\x65" - "\xa3\xd8\xaf\x3a\x2f\x31\xb0\xff\xb5\xc0\x67\xb4\xc1\xa0\x89\x6a" - "\xc3\xd3\x8f\x74\xc7\xbf\xe9\x19\x68\xfb\xd3\x8f\x48\x5a\x0c\xbc" - "\x2f\x0f\xa1\x0d\x3f\x97\x29\xbe\x7b\x7a\x3a\xf8\x43\x5f\xb3\x51" - "\x69\x22\xfe\xc0\x33\x1c\xa7\x51\xe1\xb8\x88\x0c\x7e\x47\xde\x42" - "\x37\x9d\x4a\x56\xfb\x50\x4f\xa3\xfd\x0b\xda\xf4\x72\xa3\x19\x97" - "\xa8\xed\x0c\xc3\xf1\x19\xe2\x39\x56\xc5\x2d\x78\x26\x86\xf1\xb5" - "\x7d\x8b\xfb\xf8\xe9\x16\xae\x97\x79\x42\xf4\xe5\x0d\xf1\xf6\x25" - "\x53\x77\x5f\x1e\xc6\x4f\xb2\x86\x7a\x20\xff\x3e\x37\xe9\x75\x7a" - "\x0d\x5c\x19\x37\xe8\x8a\xe6\x1e\xb1\x28\x3a\x7d\xb9\x5e\x1e\xef" - "\x7d\x79\xc3\xf0\x33\xe3\x37\xf4\xeb\xce\xc7\xd0\x6b\x3b\x3d\xe5" - "\xfb\xe6\x07\x97\x8b\xa3\x73\xfc\x22\x08\xbb\xa0\xb3\x02\xfc\x3b" - "\x7c\x8d\x93\x86\x7b\x9f\xd4\xb2\x56\x52\x1a\x6c\x5b\x12\x17\xc5" - "\xa4\xda\x20\xae\xcb\xc5\x44\x8e\x47\x8b\xe7\x54\xfd\x39\x85\x9f" - "\xbb\x97\x8b\xf9\x3d\x8e\x67\xf6\x18\x7b\x77\x2a\xf6\xcc\x33\x8d" - "\xfd\x71\x78\x62\x9f\xe0\x73\x3e\x34\xa7\x08\x75\xc4\x3e\xdf\xc9" - "\xf5\x66\xf1\xdc\x81\xfa\x90\x0f\xf3\xff\xfc\x89\x9c\xcf\x13\x7b" - "\xdb\x08\xfc\x92\x07\xd9\xe3\xec\x64\xbc\xba\xe3\xf6\xcd\x37\x70" - "\x1d\xee\x4d\xd3\xbe\x1e\x6e\x39\xe9\x06\x6e\x48\x3f\x5a\xa1\xd2" - "\xfd\x1c\x8b\x8c\x7d\x10\xf1\x3e\xc7\xc0\xd5\xc0\x81\xeb\xe3\x73" - "\x95\x22\x7e\xb7\x8c\xed\xc2\xf5\x79\x5e\xce\xe3\xbc\x95\x06\xbe" - "\x5f\x7d\xf6\x27\x3a\xdd\xdd\x94\x73\x5c\xf1\x64\xce\x71\x63\xfe" - "\xc2\x7d\x67\xf8\x7e\x6f\x4e\x5b\xa4\x2c\x7b\x7a\xc9\x92\xc2\xac" - "\xa5\xb9\x7c\x49\x1e\xf7\xd2\xad\xf1\xa1\x36\x29\xcb\x37\x15\x1b" - "\x20\x97\xcf\x3e\xd1\xe6\x11\xc6\xfe\x65\x6e\xff\xf9\x27\xdd\x4f" - "\x7a\x2a\xeb\xaa\xac\xd3\xe1\xdd\xfc\x0f\x8a\x57\x33\x98\x98\x13" - "\x66\xd2\x06\x93\x9d\x2c\x2f\xba\xe3\x3e\x49\x95\xf4\x28\xf7\xd4" - "\xa3\x5c\xff\xfa\x67\x74\x3f\xb1\xdd\x69\x81\xf5\x07\x9d\xb6\x51" - "\x32\xc6\x91\x76\x70\x55\xbb\xc6\x73\x78\x09\xee\xd9\x76\x92\x7a" - "\x83\x1e\x37\xe7\xbd\xf3\xed\x90\xc3\xb9\x9d\xa2\x7c\x77\x1a\x60" - "\xba\x07\xc5\x21\x64\x8f\x9d\x7d\xb2\x3a\x68\x21\x0d\xba\x1f\x5e" - "\xd6\x50\xaf\xc6\xe1\xc2\x79\x4d\x56\xe2\x33\xa2\x3f\x39\x49\x0b" - "\x1f\x31\x59\x21\x6b\x47\xd1\x6e\xdc\x4b\x5b\x97\xdf\x85\xf5\xd7" - "\x0d\x67\xea\x4d\xb1\x42\x13\x42\xc4\x08\xf5\x47\x26\xfd\x26\x16" - "\x3f\x4d\xc4\xc8\xdd\xa2\x58\x50\x6a\xd8\x50\x13\x59\x86\x27\x98" - "\x6f\xba\x71\xb4\x75\xea\xfd\x93\x27\xd9\x4b\x8a\xc1\xdd\x7e\x9f" - "\x45\x84\xc6\x79\x6a\x6f\x9b\x77\x6b\x29\x49\x7f\x81\xf2\xf6\xb6" - "\x68\xb8\x6e\x74\x88\x02\x3e\x9b\x1b\x8c\xf7\x24\xda\x5f\x22\x6d" - "\x7f\xaf\x5b\xe3\xd8\xc1\x3c\x47\x73\xcc\x32\xe0\x7a\xe2\x7d\xa4" - "\xa1\xfd\x45\xa2\xcc\x93\xa8\xf6\x03\x9f\x1d\x13\x5c\xef\x49\x1c" - "\x80\x6f\x22\x86\x6f\xdf\x46\xda\xae\x92\x4e\xcd\x65\xba\x9f\x5c" - "\x36\x2f\xbd\x8f\xfb\x41\xfa\xb3\x00\xf4\x27\x86\x51\xe7\x08\x96" - "\xd9\xbf\x24\x4d\x3f\x5f\xa7\x9d\xa5\x67\x7f\xd4\x30\x48\x39\x3e" - "\xcf\xda\x1d\xbf\xef\xe6\x1e\xc7\xb3\xe8\xff\xef\x79\xf5\x39\x01" - "\xb2\xeb\x59\xd8\x7f\xb9\xea\x39\x7e\xdf\x98\x6e\x19\xd7\xf2\xd9" - "\x46\x23\x4f\xf4\x79\x81\xd7\x1c\x85\x93\xfb\x55\x5c\xfc\x47\x27" - "\xfb\xee\x0f\xb2\xcf\x3f\xcc\x55\x74\x17\xef\xb3\x0c\x19\xee\xa3" - "\x04\xfb\x05\xd1\x07\xbb\x3d\x09\x6c\xab\x05\x60\x7b\xf9\x2f\x8a" - "\xcc\x96\xae\xf3\xc4\xb1\xfe\x78\xbf\xf6\xed\x85\x7f\xd0\x5c\xbe" - "\x73\x4e\xd7\xba\x20\xb5\x62\x7e\x76\xd5\x9c\x73\xb6\x74\x1d\xc3" - "\x7d\x80\x5a\xe8\x53\x6a\x29\xfa\xb8\x54\xae\x95\xd4\x88\x52\xa6" - "\x73\xdf\x45\x31\xd7\x65\xfa\xff\x88\xe3\xd5\xb3\xac\x00\xdd\x6d" - "\x67\x29\x6f\xcd\x7b\x80\xb3\xff\xaf\x80\x25\x63\x3b\x4d\xa1\xf7" - "\x71\xdf\xe3\xc8\xdb\x60\xc8\x91\xa8\x71\x34\x62\x9c\x1b\x2d\x45" - "\x4f\x6a\x41\xc8\x24\x8e\xc1\x05\x59\x34\x91\xdb\x85\xe7\x54\x7e" - "\xc6\x35\x85\xaf\x96\x35\xce\x9d\x16\xff\x93\x2c\xa3\x32\x59\xfe" - "\x20\x7d\x6e\xdd\x45\x29\xb3\x32\xf4\xe7\x99\xfa\xf3\x74\xfd\x39" - "\x5d\x7f\x4e\xd3\x9f\x27\xf3\xb3\x92\x6d\x8b\x6c\xfd\x72\x57\x1b" - "\xd6\x86\xe7\x54\xa3\x2f\x80\xcf\x55\x96\xa2\xd5\x52\x46\xea\x78" - "\x4c\xd4\xf1\x4a\xd5\x9f\x0d\x7c\x6e\xb0\xf8\x57\xff\x4f\xe1\xd3" - "\x10\x81\x8f\x33\x04\x1f\xb2\x14\xa5\x7d\x1d\x7c\x12\x2d\x1c\xaf" - "\xf9\x9f\xc0\x87\x71\xe1\xb4\x1e\xc7\x73\x69\xe1\xf8\x3c\x97\x61" - "\xe0\x13\x95\xdf\x96\x8b\x4e\x9e\x1f\x96\x5d\x27\x63\x55\x0e\x63" - "\xd9\x5f\xd7\x6b\xc4\x53\x7b\x6e\xc3\xe5\xe2\xa9\x61\x2c\x58\x91" - "\x07\xed\x7f\x6e\xbe\x3e\x0f\x1e\x56\xfa\xd2\x73\x4d\x86\x6f\x0c" - "\xda\xba\xa7\x42\xb5\x75\xef\x3a\x8e\x29\xb6\x92\xae\xb7\x17\x89" - "\x4e\xe8\xff\xff\xd5\x64\xf3\x84\x8d\x81\xfc\xc2\x65\xcb\x5e\xb8" - "\xcf\x96\xbf\x60\x71\xae\x6d\x5c\x8e\x6d\x59\xde\xa2\x85\x85\xb9" - "\xe1\xfb\xc5\x89\x7a\xbc\x7c\xe9\x07\xcf\x3a\x29\x8f\x01\xe6\x7f" - "\xb6\xe3\x95\xef\xe2\xf3\xaf\x08\xc7\x73\x7c\x56\xd6\x5c\xfb\x1a" - "\x99\x78\x8f\xa2\xc7\xf1\xfc\x5c\x63\x4e\x50\xf1\xa1\x29\x46\x4b" - "\x64\x9d\xeb\x79\xd8\xbf\xcf\x76\x85\xa4\x73\xde\x52\x23\x8d\xe1" - "\xeb\xb2\x69\xd8\x49\x7a\x7e\x0c\xd7\x19\x95\x86\x17\x45\x3d\x6c" - "\xdd\x18\xd8\x23\x6c\x1b\x0a\x8e\x1f\xc4\xe7\xcb\x50\x4e\x00\x9f" - "\x8f\x58\xf6\xf2\x37\x20\x94\xee\x2b\x18\xc7\xcf\x51\x66\x17\xd2" - "\x4c\x9b\x90\x17\xfa\x74\x27\x97\x43\x7a\x80\xcf\xf9\x23\xdd\xac" - "\xc7\x44\x42\x5a\xfe\xd5\x7c\x0e\x1f\x69\x89\x21\x69\xe3\x38\x4e" - "\x2f\xd2\x6c\x0a\x5e\xfe\x3d\x4c\x67\x3c\xa7\xe9\x36\x37\xe7\x99" - "\xa1\xd7\x1b\x16\x2f\x8b\xa3\xa8\xdf\x75\x47\xaa\x6d\xee\x63\xdf" - "\x99\x72\xff\x33\x4b\x16\x2f\x8c\x27\x49\xf6\xe4\xd4\xa2\x71\xa9" - "\x77\x15\xdd\x7a\x9f\xad\x20\x37\x77\xa9\x6d\x45\xee\xe2\x42\xdb" - "\x82\x15\x0b\x56\xc6\xd3\xc2\x25\x4b\x9f\xe1\x53\xe4\xdc\x2d\xcb" - "\xb2\x9e\x59\xf8\x2c\x6f\xea\xab\xdc\xf1\x61\xf3\xf1\x5c\x96\x6d" - "\x7a\xdc\x85\xa3\x90\xb9\x3e\x11\xf7\x4e\x36\xee\x39\x16\x91\x15" - "\xd7\x26\xfc\x0e\xe3\xd7\x88\xdf\x31\xfc\xda\x4e\xd3\xd2\x24\x5c" - "\x0f\xf5\x38\xf2\xbd\x86\x5e\x30\xc0\x43\x2f\x98\x0d\x1e\xc2\x3c" - "\x7e\x48\xcd\x6f\x2f\x4c\x6a\xf5\xcb\xf1\xd3\xcf\x53\x15\x17\x07" - "\x78\x4a\xc6\x3b\x64\x9f\x95\xe5\x78\x0f\x1e\x66\x3b\x16\x34\x8f" - "\x63\xba\x9d\xa2\x82\xf1\xb0\xfd\x9b\x39\x16\x08\xae\x4d\xe0\x97" - "\x66\x15\x7f\xe3\x85\x43\xc8\x37\x06\x75\x1c\xd6\xeb\x50\xcf\x23" - "\xc5\x51\xb6\xf3\x4f\xea\xcf\xca\x26\x5e\xf2\x21\xdf\xf3\x55\xdf" - "\x2b\xb2\xb0\xff\x9f\xb2\xad\x8c\x77\x8b\x9f\xd4\xeb\x70\x82\x16" - "\xa5\xb5\x0e\xd1\xbf\xcf\xc1\x6b\x4c\x96\x98\xa9\x02\xf8\x9c\x0b" - "\xc6\x3e\xd1\x2e\xe3\xf4\x95\xf6\x42\x46\xdc\x7d\xb7\xab\x48\xe6" - "\x8f\xe1\x35\xa8\xd9\x05\x22\xc8\x71\x51\x83\xb1\xcf\xb7\x73\x39" - "\x61\x7e\x27\x3b\xb8\xe9\xaa\x34\xa5\x0b\x70\x7c\xb4\xc5\xba\x1f" - "\xa8\xf0\x31\x6d\x4f\x53\xfe\x3f\x94\x3d\xb3\x34\x49\xe9\x59\x8b" - "\xd3\x0d\x5f\x32\x8c\xd1\x64\x3c\xcf\x35\x64\x80\x9b\x16\xdb\x74" - "\xbf\x1f\xa7\x6a\xff\xe2\x0d\xfa\x73\xa3\x8e\x63\x0c\xc7\x7a\x00" - "\xfe\x6d\xdc\x77\xb0\x0d\x1b\x71\x7f\x0c\xf4\x69\x56\xf4\x59\x2c" - "\xd7\x18\xa0\xd7\xf0\xfb\x63\x1c\x77\x1e\xef\x8e\xa9\x38\x0a\x2f" - "\x34\x71\x9b\x07\x7c\x03\x6b\xd2\x40\xbf\x0f\x79\x4f\x0d\x63\xa9" - "\xd1\x75\x91\xc7\xe7\x0b\x4e\xc0\x6b\x30\xe4\x0e\xcb\x99\xac\x00" - "\xc6\xa9\xd4\x4b\x17\xfb\x0d\x79\x33\xc0\x07\x4b\x12\xa3\xc9\x92" - "\x68\xfd\xae\xf7\xcd\x4a\xe1\xc8\x9f\x0b\x9c\x1a\x64\x1f\x70\xdc" - "\xc8\x8b\xfd\xfa\x6f\x9f\x92\x91\x4b\xfa\xf5\x5f\x03\x0f\x8e\x77" - "\xeb\x66\xdc\x7a\xe5\x3e\xa7\x2e\x37\x96\x6c\x30\xe4\x86\x01\xc7" - "\x12\x23\x82\x96\x22\xfc\x2b\xdb\x7d\x9c\xd7\x58\x79\xbe\x94\xfa" - "\x08\xe0\x0c\xbf\xa0\xce\xf8\x04\xcb\x77\x43\xcf\x5d\x92\x0e\x19" - "\x63\x92\x3a\xaa\x23\xff\xd9\x01\x59\xb4\xc4\x1d\x0a\x53\x98\x77" - "\x1f\x67\xb8\x2c\x8f\x58\x27\xc9\x0a\x98\x38\xce\xc6\x71\x7d\x7e" - "\x81\x0c\x2e\x48\x34\x70\x05\x0d\x8f\x1a\xf8\xea\xdf\xf8\x80\x8d" - "\xbd\xa4\x60\x4e\xa0\x8f\x7d\x5d\x9b\x54\x7f\xbe\x28\xe5\x0d\xde" - "\xed\x45\xd9\x99\x6e\x7a\xbe\x5e\x1f\x43\xcd\x28\xbf\xf7\x48\x49" - "\x3a\xf2\x14\xe4\xe9\xfe\x9a\x6d\xe8\xdf\x63\x21\xbc\xff\x64\x88" - "\xbd\x7c\x4c\xf5\xe1\xfd\xa5\x27\xa9\x60\x4f\x48\xba\xde\xb7\x47" - "\x32\x4e\xd2\x8b\x4f\x2a\xdb\x73\x77\x8d\x2a\x5f\x20\x7d\x36\x0d" - "\x1c\x59\x16\xf0\x79\x24\x1e\xe3\x92\xf6\xb2\x8f\x0b\xdc\xc6\x7c" - "\x01\x58\x87\x24\xcd\x47\x8a\xc3\x4c\x27\x15\xcf\x20\xff\x55\x45" - "\xa7\x17\xcd\x61\xb4\xe7\x79\x13\xf5\x30\x9d\x86\xaf\x11\xc1\xe1" - "\xde\x18\x91\xb5\xd2\x24\x63\x37\xf3\x18\xe7\xbd\x09\xf0\x87\xd4" - "\xab\x14\xdd\x5e\x9c\x6e\xd0\xcd\xe8\x3b\xa6\x93\x9b\x0a\x1a\x99" - "\xb6\xe1\x6d\x1c\xd6\x76\xd2\x68\x3b\x68\xca\xeb\xa5\x78\x9e\xaf" - "\x8f\x8b\x66\xe7\x28\xde\x2b\x7f\x61\xc1\x11\xd3\x77\xe8\x48\xd1" - "\x44\x52\xb4\x7d\x11\xf6\xdf\xf3\x66\xd9\x0e\x05\xeb\x28\xd3\x97" - "\xc7\x0a\xf0\x6c\xd7\x63\x0b\xe9\xfe\x1a\x2f\xcc\x87\xbe\xaf\xc6" - "\xf2\x72\x19\x03\x82\xe3\x8b\xb6\x31\x8d\x58\x2e\xf2\x58\xe2\x31" - "\xc0\xe3\x49\xd1\x68\xa9\x29\x84\x46\x4d\x4c\x1f\x9d\x4e\x87\x22" - "\x64\x79\xae\x2d\x7f\x8a\x92\xc5\xb6\xe4\x71\x39\x13\x64\x20\x0f" - "\xdb\xc3\xd3\xee\xb3\x65\x4c\x19\x57\x94\x97\x32\x5b\x5d\xa6\x65" - "\xcc\xe4\x6b\x7c\xb8\xfd\x64\x43\x3d\xf9\xe1\x36\xd8\x8a\x2e\x25" - "\x3f\x96\xae\x73\x93\x5f\xf2\x0d\x6c\xe5\xae\x8a\xf3\x44\x01\xa6" - "\xe1\x62\xf4\x69\xd9\xee\xa2\x39\x90\xc1\x73\x56\x8a\x2f\xeb\x90" - "\xce\x31\x6a\x99\x17\xc1\xf3\x45\x6c\xf3\x7a\xe2\xda\xdb\xf0\xab" - "\xf4\xc4\xed\x9b\xf8\xd0\xad\x76\x01\x58\x6d\x46\x5b\xd8\x2e\x16" - "\x5c\xbe\x48\x04\x98\x2e\x59\x45\xe8\x6f\x94\x63\x1b\x19\xf9\x7c" - "\x98\x03\xd2\x94\x6d\xb8\x0c\xed\xcf\xdf\xa5\xcb\xaf\x0c\x3c\x27" - "\xb9\x29\x55\xe1\xe3\xb0\xf2\xfa\x9c\x29\xb8\xf6\xb6\x47\x61\x03" - "\x54\x1a\x30\x01\x6b\xa8\x1e\x7b\x4e\xc2\xfb\xba\xbe\x82\xc1\xf5" - "\x7b\x0a\x2c\x31\x2a\xce\x1d\xc6\x75\x69\x9d\x16\xcc\xec\xf7\x05" - "\xc0\xbb\xe1\x6b\x12\xd9\x57\x20\x13\xfc\xc6\xb1\x2e\xfb\xdf\x55" - "\x38\x82\xee\x0a\x2d\xe8\x43\xdf\x25\x2a\x9d\xb9\x8b\x65\x26\xec" - "\xcf\x65\x4e\x63\x2e\x93\x73\xa0\x46\xa5\xca\x86\x59\x26\xf7\xf8" - "\xce\x3b\x4c\x04\x39\x3d\xff\xe6\x24\x69\x97\xf8\x82\x8e\x18\x52" - "\xfe\x99\xcb\x7e\x63\xc8\x55\xde\x63\xb1\xac\x11\x1e\x5e\x5f\xb3" - "\xf8\x85\x87\xf7\x5b\xe4\x7c\x41\xa7\xc9\x55\xdc\x53\xca\x71\x48" - "\xa5\xde\x83\x7a\xd5\x5c\x11\x50\x73\x05\xea\x87\x2d\x9f\x8d\x39" - "\x21\xe6\x34\x2d\x5b\xc7\xf8\x33\x6d\x78\x0d\x37\x08\x5a\xb9\x78" - "\x6e\x64\xfa\xc4\xbf\xe5\xe1\x7d\x7e\x6e\xab\xc5\x8f\x36\x87\xb6" - "\x4b\x0b\xba\x37\x39\xd0\x2e\x0d\xed\x2a\x3a\xc3\xe3\xc4\xc7\xfe" - "\x17\x18\x63\x23\x65\xac\x5d\x69\x63\x17\xee\x0a\x6d\x23\xcb\x7c" - "\xd5\x86\xc2\x0f\xa3\xb5\x51\x68\xdc\x46\xa6\x41\xe1\x36\x7d\x8c" - "\x49\x3c\x59\x66\x74\x51\x61\xe6\xf0\x35\xec\xf7\xb0\xbb\x08\x7c" - "\x34\x8d\xfb\x10\x73\x66\x25\xe3\x19\xad\xbf\x18\x9e\x82\xf5\x52" - "\x8e\x65\x4d\x69\x76\x8f\xe3\xa5\xd4\xe8\xf4\x7e\xe9\x91\xcb\xd3" - "\xfb\xa5\x71\x5c\x9e\xf1\x60\x3f\x10\x8b\x1f\x06\x3a\xf8\x16\x36" - "\x5a\x59\xb4\x7a\x87\xaf\xa9\x67\xbc\xa2\xbe\x83\xdc\xe9\xaa\xd0" - "\xe5\x0e\xf8\x50\xcc\xc1\x8f\xe5\x10\x70\x6b\x36\x64\x90\x25\xc6" - "\x16\x2b\x65\x82\x26\x2a\xa3\xc1\xb0\xac\xa9\x64\xbf\x8b\x69\xa8" - "\x3f\xea\x7b\xd0\xd8\x06\x1a\xe5\x05\xd7\xde\x7e\xb3\x25\x86\xa6" - "\x7a\x62\x6f\x8f\xb7\x14\xf9\xc7\x32\x0d\x01\xb3\x08\x63\xf7\x13" - "\xb6\x4d\x55\x6c\xac\xe5\x98\xff\x5f\x95\xeb\x79\x9e\xb8\xdd\x79" - "\x2a\x7e\xd6\xf2\x4c\x37\x6d\x38\x6e\xac\x6b\xe2\x39\xcf\x4d\x9f" - "\xea\xeb\x55\xd7\x6f\x17\xeb\xf7\x41\x5e\x5b\x84\x6d\x95\x05\xba" - "\xe3\x0a\x8e\x43\xae\x89\xf8\x7d\x34\xc0\x27\xca\x27\xc4\xe0\x13" - "\x94\xdf\x13\x9d\x07\x96\xff\xf1\xf2\x3c\xb0\x5c\xee\x17\x33\xdd" - "\x95\x7d\xb2\xdc\x63\xe8\x26\x62\xed\xf5\xdb\x6d\x25\x5c\xff\xf2" - "\x75\xaa\x6e\xa6\x49\x1a\xaf\xd5\xcf\x04\x5d\x4a\x7b\x1c\x2b\x46" - "\x1b\x72\x80\xf9\xc5\x12\xa0\x18\x96\x45\xcc\x2b\x78\x37\x09\x72" - "\xa6\x5a\xad\x21\xee\x6b\x94\xdf\x88\x72\x2c\xb5\x79\xec\x79\x3b" - "\xd8\x87\xd3\x1b\xb7\xdb\x8d\x3c\xf3\xdd\xf4\xdb\xb1\x32\x8f\x79" - "\x77\x3b\x60\x1c\xaf\x1a\x81\x79\x59\xf9\x32\x25\xf0\x98\xe6\xb8" - "\x37\x3c\xae\x91\x96\x04\xbc\x39\x06\x0e\x6c\x9c\x15\x55\xfd\x73" - "\x91\x23\x0d\xb2\x42\xc8\xf9\x10\x73\xd1\xe8\x6e\xd0\xee\xe7\x5a" - "\x70\xcf\xc5\x09\x56\xe2\x36\x5f\x5c\x3b\x6a\xcf\x4f\xee\x20\xd3" - "\xff\x63\x7d\x9a\x0a\xee\xa2\xa4\x35\xdf\x31\xd1\xff\x9e\x44\x1a" - "\xd3\xc1\x4d\x2b\x76\x29\xda\xad\xe8\x30\xfa\xc7\x4d\xcb\x67\x72" - "\x7f\xf0\xfa\xdb\x1c\xbf\xf8\x52\xad\x11\x16\x41\xfe\xe5\x38\xd5" - "\xfb\xa5\x45\x91\xeb\x3e\xac\xc3\xdb\x16\x2d\xb3\xe5\x2c\x59\xb1" - "\x78\xcc\x98\x30\xfb\xc8\x24\xcf\x75\x38\x8a\xac\x6a\x0e\x2d\x9a" - "\x69\xe0\xcd\xba\x08\x9e\xd1\xfe\xa5\x97\xc4\xf9\x9e\x99\xa5\xbb" - "\xee\x66\xa5\xd2\xc0\xfd\x9d\x34\xf3\xce\x90\xc7\xbb\x69\xe6\x5d" - "\x77\x67\x3d\x9a\xbb\x20\x67\x65\x48\xea\x3d\xa1\x6b\x72\x15\xdb" - "\x51\x77\xec\xa8\x07\x21\x2b\x62\x66\xbf\xcc\xf3\xc9\xca\x07\x4a" - "\xfc\xe2\xef\x90\xd7\x93\x30\xc6\xb2\x5a\x0a\xfd\xd4\x02\x59\x26" - "\xae\x67\x19\x3e\x4c\x9d\x57\x83\x0e\x05\xde\xb2\xa0\xed\x1e\xe8" - "\x72\x17\x78\x4d\x06\xe5\x72\x5b\xab\x39\xf6\xec\xbe\xc9\x4a\xaf" - "\x58\x69\x43\xfa\xd5\xb8\xce\xc0\x75\x28\xae\xb3\x6c\x8b\x61\xeb" - "\xb0\x7f\xf0\x72\xf6\x0f\x5e\xc9\x78\xc4\xdc\xe1\x2d\xa5\x3b\x96" - "\xb2\x9e\x5e\xd4\xce\x7a\x87\x9b\x56\x96\xf1\xfe\x00\xe7\x45\x99" - "\x31\xb6\xe7\x28\x95\xaf\x42\xee\xab\xac\xb4\x89\xf2\x7d\x93\xc5" - "\x8e\x4c\xfe\x76\xcb\x58\xa4\xbf\x12\x1b\x73\x82\x62\xad\xc3\xbe" - "\xdf\xe3\x58\x89\xf9\x2f\x57\x8e\x8d\xc1\xbe\xf7\xc6\xba\x06\x8f" - "\xf9\x01\x5d\x04\xba\x20\x74\x91\xac\xa2\xf5\x84\x7b\xd3\x80\x1e" - "\xb2\xb2\xad\x5f\xa7\xd5\x28\x1e\xcf\x6e\x83\xdf\x71\xdf\x65\xf0" - "\x63\x58\x6c\xb0\xc5\x85\xb9\x4b\x73\x73\x6c\xe3\x96\xc5\x53\x48" - "\x64\xb0\xbc\xdc\xc5\xb6\xa5\xb9\x2f\xbe\x94\xbb\x4c\x46\xf5\xe2" - "\xb7\x61\xf3\x79\x92\x88\xff\x75\x81\x71\x66\xc5\x36\x8a\xe9\xb8" - "\xea\x11\x8e\x27\x25\xd6\xff\x9a\x7d\x18\xbb\x94\x2d\xe1\x49\x0e" - "\xb7\x25\x5e\xee\x50\x3a\xdc\xbe\x14\x65\xc7\xbc\xbc\x92\x9f\x4f" - "\xd2\x2a\xff\x40\x0c\xea\x55\xfb\xf8\x3b\x08\x3a\x7d\xda\x7b\x1c" - "\xab\x76\x19\xf4\x71\x53\xb1\x71\x8e\xa0\x4b\xca\x09\xcc\xa5\x90" - "\x73\x61\xf3\xa8\xfa\x9e\xdb\xaa\xbd\xbc\xc7\x2a\xd7\x64\xe3\xf6" - "\xa5\x72\x5d\x0c\xf3\x14\xca\xa3\x1f\x52\x20\x1f\x59\x8e\x95\x19" - "\xf0\x50\x67\x15\xd7\xa7\xdb\x38\xdf\x3c\x4d\x2f\xcb\x3d\xeb\x60" - "\xd9\xbe\x54\x96\x1d\x77\x48\x9d\x03\x70\xe4\x3e\x56\x71\x0a\xeb" - "\x8f\x32\x0e\x3a\x60\xf1\x1a\x2c\x64\x40\x1a\x7f\xfb\x8f\xd3\x54" - "\x5c\xab\x95\xd2\x4f\x10\x75\xc1\x1e\x7a\x39\x67\xc0\x2f\xbb\x38" - "\x85\x75\x4a\x86\xeb\xa6\x97\x93\x19\x9e\x8a\xdb\xf5\x32\x70\x29" - "\xda\x33\xa0\x1b\xbd\xdc\x1c\x62\x73\x01\x1f\x85\xa7\x17\xb8\xc8" - "\x18\x91\xca\x6f\x4e\xb6\x9b\xe5\x64\x95\xde\x76\xa3\x3d\x80\xd7" - "\x0e\x9e\xab\x32\xf6\x5d\xdd\x7a\xbb\x19\x3f\xc6\x3d\x14\x67\x85" - "\xef\x2a\x96\x4b\x18\xc3\xc5\x89\x21\x63\x98\xd7\x5c\x86\x20\x6d" - "\xec\x80\x3f\xee\xaa\xfc\x48\xf9\xf0\xe0\x82\x67\x9e\x67\x23\x7d" - "\x66\x6a\x8a\x8d\x65\x45\xd6\xa3\x0f\x4d\x7b\x3c\x6b\xda\x9c\x79" - "\xb3\xe7\x4a\xff\xfb\xfe\xf7\xe9\x8b\xa3\x67\x08\xe7\xab\x44\xf0" - "\x46\x32\xfa\x6b\xc8\x49\x2a\x71\xab\xf8\xcc\xc5\x7b\xc2\xe3\x33" - "\x17\x3b\xf1\x3b\x8e\x1f\x34\x93\xd5\x6e\xfc\xa0\x47\x96\x1c\xd3" - "\xf9\xa5\x0b\xf8\x1e\x1b\xe0\x97\x12\xb9\xe6\xcd\x7e\x09\x6a\x2d" - "\xb5\x18\xf2\x7f\xd5\xd8\xd0\x77\x03\xb6\xdf\xea\x84\x7e\xdb\xaf" - "\x5f\x16\xac\x9e\x64\xd8\x81\x48\x9b\x08\x1b\x30\x8e\x6d\x40\xb5" - "\xf6\x53\x22\x75\xac\x48\x5b\x6d\xc0\x4e\x33\x93\x61\x03\x72\x6c" - "\x48\xde\xf7\x54\x63\x74\x75\x61\x88\x8d\xe5\x95\xf1\x02\x2f\x2a" - "\x9b\x90\xcb\xc9\xb5\x36\xb3\x27\x89\xd7\x9f\xa1\xd7\x26\x63\x8e" - "\xc7\xbc\xd3\x23\x44\x9c\x27\x49\xc7\xe9\x10\xaf\x47\xb3\xbe\xab" - "\xec\xbd\xe2\x49\x2c\x7f\xc5\xda\x51\x0f\xce\x09\xc8\x58\x6a\x90" - "\xbd\xab\xdb\x07\x78\xae\xc4\xcd\x7d\xc9\x34\x00\x1f\x74\x80\x0e" - "\xa6\x81\x36\x97\x50\x7f\x9b\xf5\x75\x0c\x63\x0d\x43\xd5\x55\x72" - "\x62\xb0\xf6\x45\x6f\x5b\x49\xc6\x57\xb6\x8d\xbf\x99\x83\x71\x61" - "\xb4\xf1\xd2\xf6\x95\x54\x45\xb4\x2f\xf3\xd2\xf6\x95\x34\xf6\xef" - "\xbb\xf4\xaf\x4b\x94\x9c\xe0\x76\x32\x1f\xa0\x9d\x47\x63\xad\xe6" - "\x6f\x85\xdc\xa7\x44\x93\xab\xc3\xd7\x68\xfa\x19\x10\xfb\x3d\x4d" - "\xa3\xa5\x9d\xe6\xdb\xac\x05\xf3\x36\x3b\xf0\xc3\x95\xf5\xec\x01" - "\x5d\x55\xf8\x14\x7e\xf6\x89\x4d\x90\xbd\xbc\xd6\x32\xd8\xd9\x36" - "\xd0\xec\xb8\xb1\x0e\x80\xfb\x76\xb6\x27\xe7\x04\xa6\x0a\x4e\x67" - "\x1a\xc0\x26\xf1\x80\xaf\xda\x95\xde\x66\x5f\xd7\x2f\xb3\xbf\x35" - "\x35\x3b\x76\x0d\xd9\x8e\xd4\xdc\xc5\xe9\x35\xe8\x3b\xb9\x36\x28" - "\xbf\x91\x37\x08\xcc\xac\x40\x1a\x0d\x02\xf7\xb8\x01\x77\xb0\x73" - "\x90\xa1\x69\x4b\x16\xdb\xf2\x16\x2c\xce\x59\xb2\x70\x61\x8a\xed" - "\xa5\xc5\x4f\xe7\x2f\x79\xe6\x79\x16\xfc\xcb\x0a\x5f\xc2\xf8\x95" - "\xe3\x36\x7d\xe6\xcc\xac\x07\xe7\x3d\xf6\xa3\x30\x1d\xc0\x5c\xe9" - "\x08\x96\xc9\x6f\x64\xad\x7d\x6e\x55\x8f\xa3\x14\xfd\xff\x6c\x91" - "\x9a\x6f\x4a\x31\xff\x3f\x93\xa0\x74\xad\x27\x3a\xd5\xd9\xcf\xd2" - "\xc6\x10\xb9\x36\x1c\xcf\x4d\xfc\xad\x83\x81\x35\x90\xd2\xca\x50" - "\x1d\xa2\x5b\x7e\xa7\xae\x74\x97\x11\x07\xa1\x70\x0c\x69\xa6\x31" - "\x95\x54\xa5\x89\x52\x37\x95\x1e\x85\xbd\x78\x1c\xef\x9b\xdc\x94" - "\x57\xad\xdb\x8f\xc7\x79\x8f\x95\xed\xc7\x00\x6c\xc9\x39\x2b\x9d" - "\x53\xb3\x56\xc6\xb0\x0f\xb1\xfc\x6e\x82\xff\xa2\xe8\xe0\x7d\x4e" - "\xde\x33\xe2\xef\x26\x54\x3c\x27\xed\xc9\x58\x99\x07\xf7\x15\xa7" - "\x48\xda\x56\x78\x6f\xab\x3b\x25\xbf\xdd\x08\xfb\x63\xcd\x58\x43" - "\xf7\xb4\xac\xb1\xc9\x33\xa9\x9b\x54\x7f\xb4\x73\x5f\x70\x7d\x59" - "\x2b\x9d\xaa\x0e\xf4\x01\xca\x5a\xd4\xba\xcf\x9a\xf9\x97\x5d\xcf" - "\x8e\x6b\x6f\x1c\x34\x06\xb9\xa3\x74\xd8\x66\x15\xaf\x98\xfd\xe0" - "\x3c\x86\x1f\x16\xfb\x64\x01\xee\xa1\x48\x9f\x2e\xe5\x97\xb0\xa6" - "\xd9\xf0\x07\xc1\x7d\x7b\xbf\xbe\xcc\xdf\xda\x80\x9d\x63\x2b\x59" - "\x33\xf4\x2c\xad\xd9\x56\x37\xc8\xba\xb2\x71\x06\x55\xf7\x9b\x1a" - "\xd6\xe3\x70\x8c\xee\xf7\x25\xc1\x33\x8f\xf1\x01\x7f\x30\xc7\x24" - "\xc3\x9f\x48\xfa\x90\x61\xce\xe2\xef\x79\x9c\x22\xc7\x8f\xe4\xf7" - "\x43\x6e\xe6\x35\x61\x47\x51\x93\xf4\x65\x73\xe4\x84\xe2\xa2\xf0" - "\x70\x8c\xe3\x75\x4b\x7e\x1f\x8a\x4b\xd1\x82\x97\x16\x4d\x28\x5a" - "\xb8\xc8\xf6\x4c\xde\xa2\x82\xac\x45\x32\x6e\xa8\x0c\x49\x5a\xb8" - "\xb2\x80\x57\xe9\x6f\x8d\x8f\x98\x2b\x74\xbf\xb3\x7e\xff\x1a\xe9" - "\x7b\xe6\xf8\x0c\xf4\xd0\x94\xef\xd9\xda\x36\x35\x1f\x3a\x3a\x2f" - "\xf5\xb3\x70\xf8\x0d\x3f\x0b\xf0\x55\x62\x95\x8a\x57\xae\xfb\x66" - "\x30\xdf\xad\x1d\x7d\x69\x99\xb5\xa9\xfd\x7e\x46\xec\xef\xd2\x97" - "\x29\xcf\x08\xc8\xd8\xd2\xaf\x71\xbf\x39\xd6\xb9\x8a\x1e\xe2\x3d" - "\x62\x9d\x9f\xd7\x66\x1b\xfc\x6c\xf8\xa8\x31\x2c\x3e\xa3\x30\xc1" - "\x17\xea\x9f\xb2\xf6\x43\xcc\x2d\xd6\xfe\x76\xbc\xac\x11\xe3\xee" - "\xd5\x9c\x8c\xc7\xae\x48\x3c\x80\xdf\x18\xa4\x87\xf8\xff\x18\xed" - "\x5c\x0b\xfd\x6f\xdd\x25\x3a\xde\x03\x0f\xcd\x84\x32\xb7\x2c\xb7" - "\x30\x9e\xa6\x2d\xc8\xcf\xe7\x71\xbd\x20\x37\xff\xa5\xa5\x4b\x96" - "\x65\x2d\x5a\xbc\x08\xa9\x0f\x2c\xe4\x70\xae\x32\xcb\x7d\xfa\x1b" - "\xdb\xe2\xdc\xdc\x1c\x95\xa4\x77\x43\xf8\xde\x88\xda\xff\x5e\x97" - "\xe6\xa6\x35\xbe\x01\xbd\x65\x5d\xb5\xd0\xd6\x1e\xc7\xef\xef\x72" - "\x4c\x4b\x9d\x62\x5d\x4e\xb8\x5d\xb0\xae\xd0\xe0\x07\xd9\x7f\x76" - "\xf6\x11\x79\xf3\x93\x6e\x21\xf7\x12\xd0\x67\xaf\xfc\x91\xbf\x7b" - "\xea\xa6\x57\x8e\xb2\x3e\x1c\x02\x67\x6f\x3f\x2d\xd7\x3e\x21\xbf" - "\x9b\xc9\xf0\xf8\x7b\x6f\x7c\x36\x1b\xef\xc1\xff\x6b\x4a\x15\xff" - "\xaf\xeb\xe7\xff\x6e\x2d\x16\x36\xce\xba\x4e\x43\x0f\x0e\x1f\x33" - "\xaf\xd0\xa5\x63\x89\x7d\x06\x5f\xb1\x1a\xb4\x35\xfa\x59\xf1\xd6" - "\x2b\xbf\x31\xd6\x26\xeb\xf4\xd8\xe2\x7c\xcf\x65\x59\xc7\x15\xc3" - "\xaf\x9a\xca\x3e\xd0\x27\xe9\x95\x75\x8a\x5f\x5e\xc9\x0e\xf1\xe5" - "\x49\x3c\x4d\xaf\xe8\xf6\xec\x2b\x45\x06\x7e\x68\xe7\x44\x4e\x63" - "\x18\x6a\xec\xaf\x0d\x28\xde\x79\xa5\xc6\xa0\x2d\xdb\x8d\x78\xde" - "\x3b\x30\xa7\xaf\x9b\xc9\x73\x9d\x7e\x36\xbd\x8f\xdb\x0f\x38\x29" - "\x06\x1c\xe4\xc5\xb3\xb9\xc9\xa0\x95\x91\x27\x94\x27\xa6\x2d\x28" - "\x80\x51\xb7\x68\xe1\xc2\xdc\xa5\xcb\x8c\x78\xbd\xc9\x4b\xf2\x73" - "\x54\x7c\xde\xfb\xd0\xfd\x2b\x30\x02\xa7\x70\x88\x5f\xa4\xaa\xdb" - "\x08\x1b\x20\x85\xed\x70\xe9\xef\x25\xf5\xff\xf5\xf7\xd4\xea\xb6" - "\xc0\x49\xfa\xc9\x44\x5c\x21\x0f\x5e\xbd\xa0\xf4\xb2\xb8\x73\x3d" - "\x8e\x57\xf3\x0d\xbd\xac\x7b\xe8\x24\xd8\xd7\xaf\x16\x1b\xdf\x61" - "\x32\x74\x05\x3e\x8b\xe2\x5c\xcc\xb1\xcf\xd7\x6f\x0b\x96\xef\xce" - "\x14\xf1\x5b\xca\xa0\x93\x24\x30\xdf\x5f\xd5\xc5\x71\xd1\x39\x5e" - "\xcc\xab\x47\x59\x97\x61\x59\xc2\x31\xce\x3b\xe8\xd5\x6a\xfe\x76" - "\xb3\x9b\xd6\xd7\x78\xe2\x76\x67\xae\x5b\x45\xe6\x9d\x5b\xe4\xf7" - "\x6f\xdd\x4d\xf5\x4c\xc7\x57\x3b\x3e\x28\x56\xdf\xd3\xe6\xef\x10" - "\x6f\xc4\x3b\xd8\xc3\x0d\xfa\x5a\x72\xbe\xbe\x8e\x97\xdf\xe3\xf8" - "\x09\xf4\xbf\x84\x46\xc5\x97\x5b\xc5\xb7\x4b\xa9\x88\xbf\xcf\xa6" - "\x62\xbd\x34\xd4\x8b\xb2\x6a\xd6\x63\x3c\xd0\x7f\xa0\x67\xbf\x9a" - "\x2f\xca\xab\x49\xc5\x89\x66\xbe\x78\x75\x3e\xb7\x13\xf0\x0a\x79" - "\x7d\x87\xd7\x76\x74\xb8\x85\x6c\xff\x41\x8f\x1b\xcb\xba\x1c\x9e" - "\x33\x82\x17\xcf\xd4\x63\xee\x36\x63\xae\xf2\xe8\xdf\xfd\x99\xcb" - "\x6b\x9e\xc3\xd7\xb8\x31\x17\xdd\x24\xb2\xfc\x89\xbc\xd7\x70\x95" - "\xf1\x5d\x25\x5e\xf7\x04\x6e\x7b\x06\xf6\x10\x50\x1e\x34\x01\x3f" - "\x96\x76\xd0\x4f\xa4\xaf\x3f\xf3\x22\xd3\xae\x17\xf4\xe2\xef\xef" - "\x8a\x8b\x67\x1a\x60\x87\x5e\x75\x8a\x7e\xf2\x39\xd3\x8d\xf7\xfd" - "\xd8\x5f\x07\x69\x16\x8e\x1f\x8d\xfe\xf9\x88\x69\xc6\xb8\x88\xb2" - "\xad\xd9\xfe\x9e\xcc\xef\xf3\x19\x42\x96\x47\xab\x8b\xa1\xfb\x2d" - "\xe4\xb1\x5c\x3e\x8f\xed\x39\xfe\xe6\x07\xdf\xdb\x73\x44\x50\xd2" - "\x7c\x15\xd3\xbc\x7c\xde\xea\x4e\x11\xfc\xd2\x41\xe2\xa8\x97\xe8" - "\x4b\x8d\xfc\x3e\x2d\x86\xf1\xd6\xec\x67\xf8\x9c\x63\x3d\xb9\x8a" - "\xca\x08\xf5\x9a\x37\xad\xa2\x44\x3e\x17\xca\xdf\xb3\x68\xf5\xd6" - "\x50\x6b\x41\x0d\xfd\xa7\xbf\x8a\x9c\xcb\xf9\x9c\x7f\xb9\xff\x4f" - "\x45\x55\xbc\x97\x12\x87\xfb\x77\x6d\x8f\x73\x5d\x65\x55\x7f\x3a" - "\xf6\x67\xfa\x93\xf3\xcf\x64\xfb\xb1\x7c\xde\xd5\x9c\xf9\x9f\xd4" - "\x9c\xf6\x9f\x64\xef\x10\x41\xb6\x09\x4a\x5e\xe0\x3a\xca\x00\xab" - "\x9e\xcf\x53\x26\x06\xbb\xad\xf1\x68\xbf\x69\x4e\x11\x51\xab\xd7" - "\x03\x1e\xfa\x3d\xe3\x38\xae\xf6\x3c\x99\x9d\x8b\xff\x20\xef\x95" - "\xae\x7e\xa6\xde\x95\xd3\xce\x7a\x92\x9f\xcf\x8f\xf2\xde\x13\x74" - "\xdd\x60\x05\xe3\x18\x50\x78\xf3\x77\xa4\x8d\xf2\xd0\xa3\xf4\xf2" - "\x65\x72\x8d\x77\x27\xd3\x03\x38\xb5\xcc\x55\x34\x69\x6e\x07\x4d" - "\x1f\xd7\xe9\x93\x19\x4a\x9f\xb2\x74\xa6\x0f\xc7\x1e\x0c\xa2\xbf" - "\x80\x5b\x1a\x68\x10\x34\xea\x00\xce\x66\x7d\xdd\xce\xbc\xe9\x3c" - "\x25\x38\x17\xf3\xb7\x89\xca\xdf\xb2\x64\x98\xcc\xc1\x8b\x67\x1b" - "\x2a\x2e\x90\x89\xfb\x8d\xd7\xe7\x2b\xe4\x7b\x49\xf3\x0d\xdc\x67" - "\xa1\xdf\x33\x67\x3e\xe4\x6f\x9a\xa3\xbf\xca\x80\xc3\x58\xf4\x55" - "\x3d\x5f\x15\x6f\x57\xb3\x2e\x6f\xec\xe3\x0e\xa4\x83\xb7\xfd\xfc" - "\xdd\x41\xb9\x2e\x51\x3e\x36\x08\xde\x66\x7b\xbe\xf6\x35\x4a\x08" - "\x3a\x5e\xf1\xec\x84\xac\xa9\xc1\x5c\x56\x3b\x82\x12\x79\x2d\x6b" - "\xbb\xf4\x1f\x5e\x9f\x6c\xc8\x9e\xf5\x23\xf9\x4c\x52\xf9\x5c\x4d" - "\x7e\x5f\x6e\x77\x81\xce\xe7\x05\xc8\x33\xd3\x4d\xd7\xee\x52\xf2" - "\x77\x7d\xa6\x31\x96\xa0\x27\x79\x0c\xfe\xc7\xf8\xcc\xf0\x30\xbf" - "\x4b\x3f\x04\x37\x6c\x58\x8b\x60\xdf\xce\x81\x6f\xaa\xad\xaf\x34" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 22:28:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38310106566B; Mon, 11 Jan 2010 22:28:41 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 280A38FC08; Mon, 11 Jan 2010 22:28:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BMSfiw094823; Mon, 11 Jan 2010 22:28:41 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BMSf7x094821; Mon, 11 Jan 2010 22:28:41 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001112228.o0BMSf7x094821@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 11 Jan 2010 22:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202121 - head/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 22:28:41 -0000 Author: gallatin Date: Mon Jan 11 22:28:40 2010 New Revision: 202121 URL: http://svn.freebsd.org/changeset/base/202121 Log: Use better default RSS hash (src + dst, rather than just src port) MFC after:3 days Modified: head/sys/dev/mxge/if_mxge.c Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Mon Jan 11 22:25:09 2010 (r202120) +++ head/sys/dev/mxge/if_mxge.c Mon Jan 11 22:28:40 2010 (r202121) @@ -104,7 +104,7 @@ static int mxge_verbose = 0; static int mxge_lro_cnt = 8; static int mxge_ticks; static int mxge_max_slices = 1; -static int mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; +static int mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_DST_PORT; static int mxge_always_promisc = 0; static int mxge_initial_mtu = ETHERMTU_JUMBO; static int mxge_throttle = 0; @@ -4174,7 +4174,7 @@ mxge_fetch_tunables(mxge_softc_t *sc) sc->pause = mxge_flow_control; if (mxge_rss_hash_type < MXGEFW_RSS_HASH_TYPE_IPV4 || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_MAX) { - mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; + mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_DST_PORT; } if (mxge_initial_mtu > ETHERMTU_JUMBO || mxge_initial_mtu < ETHER_MIN_LEN) From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 22:34:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E808106568D; Mon, 11 Jan 2010 22:34:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 659628FC16; Mon, 11 Jan 2010 22:34:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BMYPxA096162; Mon, 11 Jan 2010 22:34:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BMYPTn096160; Mon, 11 Jan 2010 22:34:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001112234.o0BMYPTn096160@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 11 Jan 2010 22:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202123 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 22:34:25 -0000 Author: bz Date: Mon Jan 11 22:34:25 2010 New Revision: 202123 URL: http://svn.freebsd.org/changeset/base/202123 Log: Change DDB show prison: - name some columns more closely to the user space variables, as we do for host.* or allow.* (in the listing) already. - print pr_childmax (children.max). - prefix hex values with 0x. MFC after: 3 weeks Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Mon Jan 11 22:31:47 2010 (r202122) +++ head/sys/kern/kern_jail.c Mon Jan 11 22:34:25 2010 (r202123) @@ -4169,10 +4169,11 @@ db_show_prison(struct prison *pr) #endif db_printf(" root = %p\n", pr->pr_root); db_printf(" securelevel = %d\n", pr->pr_securelevel); - db_printf(" childcount = %d\n", pr->pr_childcount); + db_printf(" children.max = %d\n", pr->pr_childmax); + db_printf(" children.cur = %d\n", pr->pr_childcount); db_printf(" child = %p\n", LIST_FIRST(&pr->pr_children)); db_printf(" sibling = %p\n", LIST_NEXT(pr, pr_sibling)); - db_printf(" flags = %x", pr->pr_flags); + db_printf(" flags = 0x%x", pr->pr_flags); for (fi = 0; fi < sizeof(pr_flag_names) / sizeof(pr_flag_names[0]); fi++) if (pr_flag_names[fi] != NULL && (pr->pr_flags & (1 << fi))) @@ -4187,7 +4188,7 @@ db_show_prison(struct prison *pr) : (jsf == pr_flag_jailsys[fi].new) ? "new" : "inherit"); } - db_printf(" allow = %x", pr->pr_allow); + db_printf(" allow = 0x%x", pr->pr_allow); for (fi = 0; fi < sizeof(pr_allow_names) / sizeof(pr_allow_names[0]); fi++) if (pr_allow_names[fi] != NULL && (pr->pr_allow & (1 << fi))) @@ -4202,14 +4203,14 @@ db_show_prison(struct prison *pr) db_printf(" ip4s = %d\n", pr->pr_ip4s); for (ii = 0; ii < pr->pr_ip4s; ii++) db_printf(" %s %s\n", - ii == 0 ? "ip4 =" : " ", + ii == 0 ? "ip4.addr =" : " ", inet_ntoa(pr->pr_ip4[ii])); #endif #ifdef INET6 db_printf(" ip6s = %d\n", pr->pr_ip6s); for (ii = 0; ii < pr->pr_ip6s; ii++) db_printf(" %s %s\n", - ii == 0 ? "ip6 =" : " ", + ii == 0 ? "ip6.addr =" : " ", ip6_sprintf(ip6buf, &pr->pr_ip6[ii])); #endif } From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 22:42:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41DAF106568B; Mon, 11 Jan 2010 22:42:07 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 314488FC12; Mon, 11 Jan 2010 22:42:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BMg73j097918; Mon, 11 Jan 2010 22:42:07 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BMg7ob097916; Mon, 11 Jan 2010 22:42:07 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201001112242.o0BMg7ob097916@svn.freebsd.org> From: Kirk McKusick Date: Mon, 11 Jan 2010 22:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202125 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 22:42:07 -0000 Author: mckusick Date: Mon Jan 11 22:42:06 2010 New Revision: 202125 URL: http://svn.freebsd.org/changeset/base/202125 Log: Cast 64-bit quantity to intptr_t rather than int so as to work properly with 64-bit architectures (such as amd64). Reported by: bz Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Mon Jan 11 22:35:19 2010 (r202124) +++ head/sys/ufs/ffs/ffs_alloc.c Mon Jan 11 22:42:06 2010 (r202125) @@ -2689,7 +2689,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) if (fsckcmds) { char buf[32]; - if (copyinstr((char *)(int)cmd.value, buf, 32, NULL)) + if (copyinstr((char *)(intptr_t)cmd.value, buf,32,NULL)) strncpy(buf, "Name_too_long", 32); printf("%s: unlink %s (inode %jd)\n", mp->mnt_stat.f_mntonname, buf, (intmax_t)cmd.size); @@ -2702,7 +2702,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) */ vn_finished_write(mp); mp = NULL; - error = kern_unlinkat(td, AT_FDCWD, (char *)(int)cmd.value, + error = kern_unlinkat(td, AT_FDCWD, (char *)(intptr_t)cmd.value, UIO_USERSPACE, (ino_t)cmd.size); break; From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 22:57:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91195106566B; Mon, 11 Jan 2010 22:57:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 801798FC0A; Mon, 11 Jan 2010 22:57:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BMvqD2001619; Mon, 11 Jan 2010 22:57:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BMvq4n001616; Mon, 11 Jan 2010 22:57:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001112257.o0BMvq4n001616@svn.freebsd.org> From: Alexander Motin Date: Mon, 11 Jan 2010 22:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202127 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 22:57:52 -0000 Author: mav Date: Mon Jan 11 22:57:52 2010 New Revision: 202127 URL: http://svn.freebsd.org/changeset/base/202127 Log: Add multichannel (4.0 and 7.1) playback support. 5.1 mode support blocked now due to unidentified synchonization problem. For 7.1 soundcards 5.1 support handled correctly via software upmix done by sound(4). Stereo stream is no more duplicated to all ports. If you loose sound, check you are using right connectors. Front speakers connector is usually green, center/LFE - orange, rear - black, side - gray. Modified: head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/sound/pci/hda/hdac_private.h Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Mon Jan 11 22:46:24 2010 (r202126) +++ head/sys/dev/sound/pci/hda/hdac.c Mon Jan 11 22:57:52 2010 (r202127) @@ -86,7 +86,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20091113_0138" +#define HDA_DRV_TEST_REV "20100111_0139" SND_DECLARE_FILE("$FreeBSD$"); @@ -3455,7 +3455,11 @@ hdac_stream_setup(struct hdac_chan *ch) int i, chn, totalchn, c; nid_t cad = ch->devinfo->codec->cad; uint16_t fmt, dfmt; + uint16_t chmap[2][5] = {{ 0x0010, 0x0001, 0x0201, 0x0231, 0x0231 }, /* 5.1 */ + { 0x0010, 0x0001, 0x2001, 0x2031, 0x2431 }};/* 7.1 */ + int map = -1; + totalchn = AFMT_CHANNEL(ch->fmt); HDA_BOOTHVERBOSE( device_printf(ch->pdevinfo->dev, "PCMDIR_%s: Stream setup fmt=%08x speed=%d\n", @@ -3469,7 +3473,6 @@ hdac_stream_setup(struct hdac_chan *ch) fmt |= ch->bit32 << 4; else fmt |= 1 << 4; - for (i = 0; i < HDA_RATE_TAB_LEN; i++) { if (hda_rate_tab[i].valid && ch->spd == hda_rate_tab[i].rate) { fmt |= hda_rate_tab[i].base; @@ -3478,10 +3481,13 @@ hdac_stream_setup(struct hdac_chan *ch) break; } } + fmt |= (totalchn - 1); - totalchn = AFMT_CHANNEL(ch->fmt); - if (totalchn > 1) - fmt |= 1; + /* Set channel mapping for known speaker setups. */ + if (as->pinset == 0x0007 || as->pinset == 0x0013) /* Standard 5.1 */ + map = 0; + else if (as->pinset == 0x0017) /* Standard 7.1 */ + map = 1; HDAC_WRITE_2(&sc->mem, ch->off + HDAC_SDFMT, fmt); @@ -3495,14 +3501,26 @@ hdac_stream_setup(struct hdac_chan *ch) if (w == NULL) continue; - if (as->hpredir >= 0 && i == as->pincnt) - chn = 0; + /* If HP redirection is enabled, but failed to use same + DAC, make last DAC to duplicate first one. */ + if (as->hpredir >= 0 && i == as->pincnt) { + c = (ch->sid << 4); + } else { + if (map >= 0) /* Map known speaker setups. */ + chn = (((chmap[map][totalchn / 2] >> i * 4) & + 0xf) - 1) * 2; + if (chn < 0 || chn >= totalchn) { + c = 0; + } else { + c = (ch->sid << 4) | chn; + } + } HDA_BOOTHVERBOSE( device_printf(ch->pdevinfo->dev, "PCMDIR_%s: Stream setup nid=%d: " - "fmt=0x%04x, dfmt=0x%04x\n", + "fmt=0x%04x, dfmt=0x%04x, chan=0x%04x\n", (ch->dir == PCMDIR_PLAY) ? "PLAY" : "REC", - ch->io[i], fmt, dfmt); + ch->io[i], fmt, dfmt, c); ); hdac_command(sc, HDA_CMD_SET_CONV_FMT(cad, ch->io[i], fmt), cad); @@ -3511,17 +3529,6 @@ hdac_stream_setup(struct hdac_chan *ch) HDA_CMD_SET_DIGITAL_CONV_FMT1(cad, ch->io[i], dfmt), cad); } - /* If HP redirection is enabled, but failed to use same - DAC make last DAC one to duplicate first one. */ - if (as->hpredir >= 0 && i == as->pincnt) { - c = (ch->sid << 4); - } else if (chn >= totalchn) { - /* This is until OSS will support multichannel. - Should be: c = 0; to disable unused DAC */ - c = (ch->sid << 4); - }else { - c = (ch->sid << 4) | chn; - } hdac_command(sc, HDA_CMD_SET_CONV_STREAM_CHAN(cad, ch->io[i], c), cad); #if 0 @@ -3532,9 +3539,7 @@ hdac_stream_setup(struct hdac_chan *ch) hdac_command(sc, HDA_CMD_SET_HDMI_CHAN_SLOT(cad, ch->io[i], 0x11), cad); #endif - chn += - HDA_PARAM_AUDIO_WIDGET_CAP_STEREO(w->param.widget_cap) ? - 2 : 1; + chn += HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) + 1; } } @@ -6436,7 +6441,8 @@ hdac_pcmchannel_setup(struct hdac_chan * struct hdac_audio_as *as = devinfo->function.audio.as; struct hdac_widget *w; uint32_t cap, fmtcap, pcmcap; - int i, j, ret, max; + int i, j, ret, channels, onlystereo; + uint16_t pinset; ch->caps = hdac_caps; ch->caps.fmtlist = ch->fmtlist; @@ -6446,11 +6452,13 @@ hdac_pcmchannel_setup(struct hdac_chan * ch->pcmrates[1] = 0; ret = 0; + channels = 0; + onlystereo = 1; + pinset = 0; fmtcap = devinfo->function.audio.supp_stream_formats; pcmcap = devinfo->function.audio.supp_pcm_size_rate; - max = (sizeof(ch->io) / sizeof(ch->io[0])) - 1; - for (i = 0; i < 16 && ret < max; i++) { + for (i = 0; i < 16; i++) { /* Check as is correct */ if (ch->as < 0) break; @@ -6468,15 +6476,11 @@ hdac_pcmchannel_setup(struct hdac_chan * w = hdac_widget_get(devinfo, as[ch->as].dacs[i]); if (w == NULL || w->enable == 0) continue; - if (!HDA_PARAM_AUDIO_WIDGET_CAP_STEREO(w->param.widget_cap)) - continue; cap = w->param.supp_stream_formats; - /*if (HDA_PARAM_SUPP_STREAM_FORMATS_FLOAT32(cap)) { - }*/ if (!HDA_PARAM_SUPP_STREAM_FORMATS_PCM(cap) && !HDA_PARAM_SUPP_STREAM_FORMATS_AC3(cap)) continue; - /* Many codec does not declare AC3 support on SPDIF. + /* Many CODECs does not declare AC3 support on SPDIF. I don't beleave that they doesn't support it! */ if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) cap |= HDA_PARAM_SUPP_STREAM_FORMATS_AC3_MASK; @@ -6488,9 +6492,24 @@ hdac_pcmchannel_setup(struct hdac_chan * pcmcap &= w->param.supp_pcm_size_rate; } ch->io[ret++] = as[ch->as].dacs[i]; + /* Do not count redirection pin/dac channels. */ + if (i == 15 && as[ch->as].hpredir >= 0) + continue; + channels += HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) + 1; + if (HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) != 1) + onlystereo = 0; + pinset |= (1 << i); } ch->io[ret] = -1; + if (as[ch->as].fakeredir) + ret--; + /* Standard speaks only about stereo pins and playback, ... */ + if ((!onlystereo) || as[ch->as].dir != HDA_CTL_OUT) + pinset = 0; + /* ..., but there it gives us info about speakers layout. */ + as[ch->as].pinset = pinset; + ch->supp_stream_formats = fmtcap; ch->supp_pcm_size_rate = pcmcap; @@ -6514,17 +6533,36 @@ hdac_pcmchannel_setup(struct hdac_chan * ch->bit32 = 3; else if (HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT(pcmcap)) ch->bit32 = 2; - if (!(devinfo->function.audio.quirks & HDA_QUIRK_FORCESTEREO)) - ch->fmtlist[i++] = - SND_FORMAT(AFMT_S16_LE, 1, 0); - ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 2, 0); - if (ch->bit32 > 0) { - if (!(devinfo->function.audio.quirks & - HDA_QUIRK_FORCESTEREO)) - ch->fmtlist[i++] = - SND_FORMAT(AFMT_S32_LE, 1, 0); - ch->fmtlist[i++] = - SND_FORMAT(AFMT_S32_LE, 2, 0); + if (!(devinfo->function.audio.quirks & HDA_QUIRK_FORCESTEREO)) { + ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 1, 0); + if (ch->bit32) + ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 1, 0); + } + if (channels >= 2) { + ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 2, 0); + if (ch->bit32) + ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 2, 0); + } + if (channels == 4 || /* Any 4-channel */ + pinset == 0x0007 || /* 5.1 */ + pinset == 0x0013 || /* 5.1 */ + pinset == 0x0017) { /* 7.1 */ + ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 4, 0); + if (ch->bit32) + ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 4, 0); + } +#ifdef notyet + if (channels == 6 || /* Any 6-channel */ + pinset == 0x0017) { /* 7.1 */ + ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 6, 1); + if (ch->bit32) + ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 6, 1); + } +#endif + if (channels == 8) { /* Any 8-channel */ + ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 8, 1); + if (ch->bit32) + ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 8, 1); } } if (HDA_PARAM_SUPP_STREAM_FORMATS_AC3(fmtcap)) { Modified: head/sys/dev/sound/pci/hda/hdac_private.h ============================================================================== --- head/sys/dev/sound/pci/hda/hdac_private.h Mon Jan 11 22:46:24 2010 (r202126) +++ head/sys/dev/sound/pci/hda/hdac_private.h Mon Jan 11 22:57:52 2010 (r202127) @@ -221,6 +221,7 @@ struct hdac_audio_as { u_char pincnt; u_char fakeredir; u_char digital; + uint16_t pinset; nid_t hpredir; nid_t pins[16]; nid_t dacs[16]; @@ -281,7 +282,7 @@ struct hdac_chan { struct hdac_devinfo *devinfo; struct hdac_pcm_devinfo *pdevinfo; struct hdac_dma bdl_dma; - uint32_t spd, fmt, fmtlist[8], pcmrates[16]; + uint32_t spd, fmt, fmtlist[16], pcmrates[16]; uint32_t supp_stream_formats, supp_pcm_size_rate; uint32_t ptr, prevptr, blkcnt, blksz; uint32_t *dmapos; From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 23:15:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C35810656A8; Mon, 11 Jan 2010 23:15:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BC5D8FC0C; Mon, 11 Jan 2010 23:15:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BNFCFi005643; Mon, 11 Jan 2010 23:15:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BNFCpY005641; Mon, 11 Jan 2010 23:15:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001112315.o0BNFCpY005641@svn.freebsd.org> From: Xin LI Date: Mon, 11 Jan 2010 23:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202129 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 23:15:12 -0000 Author: delphij Date: Mon Jan 11 23:15:11 2010 New Revision: 202129 URL: http://svn.freebsd.org/changeset/base/202129 Log: Report ZFS filesystem version instead of the zpool version when we say it. Reported by: Yuri Pankov (on -fs@) Submitted by: delphij Approved by: pjd MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Jan 11 23:00:17 2010 (r202128) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Jan 11 23:15:11 2010 (r202129) @@ -1388,7 +1388,7 @@ void zfs_init(void) { - printf("ZFS filesystem version " SPA_VERSION_STRING "\n"); + printf("ZFS filesystem version " ZPL_VERSION_STRING "\n"); /* * Initialize znode cache, vnode ops, etc... From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 23:32:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81BC0106566C; Mon, 11 Jan 2010 23:32:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 590308FC0A; Mon, 11 Jan 2010 23:32:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BNWago009513; Mon, 11 Jan 2010 23:32:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BNWaLF009497; Mon, 11 Jan 2010 23:32:36 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001112332.o0BNWaLF009497@svn.freebsd.org> From: Xin LI Date: Mon, 11 Jan 2010 23:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202130 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 23:32:36 -0000 Author: delphij Date: Mon Jan 11 23:32:36 2010 New Revision: 202130 URL: http://svn.freebsd.org/changeset/base/202130 Log: Set svn:executable to *. MFC after: 1 month Modified: Directory Properties: head/etc/rc.d/static_arp (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 23:33:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4149106568D; Mon, 11 Jan 2010 23:33:30 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 942418FC16; Mon, 11 Jan 2010 23:33:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0BNXUjR009763; Mon, 11 Jan 2010 23:33:30 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0BNXUGn009761; Mon, 11 Jan 2010 23:33:30 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201001112333.o0BNXUGn009761@svn.freebsd.org> From: Kirk McKusick Date: Mon, 11 Jan 2010 23:33:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202131 - head/sbin/fsck_ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 23:33:30 -0000 Author: mckusick Date: Mon Jan 11 23:33:30 2010 New Revision: 202131 URL: http://svn.freebsd.org/changeset/base/202131 Log: Cast 64-bit quantity to intptr_t rather than int so as to work properly with 64-bit architectures (such as amd64). Reported by: Xin LI and Josh Paetzel Modified: head/sbin/fsck_ffs/pass2.c Modified: head/sbin/fsck_ffs/pass2.c ============================================================================== --- head/sbin/fsck_ffs/pass2.c Mon Jan 11 23:32:36 2010 (r202130) +++ head/sbin/fsck_ffs/pass2.c Mon Jan 11 23:33:30 2010 (r202131) @@ -547,7 +547,7 @@ fix_extraneous(struct inoinfo *inp, stru printf(" (IGNORED)\n"); return (0); } - cmd.value = (int)idesc->id_dirp->d_name; + cmd.value = (intptr_t)idesc->id_dirp->d_name; cmd.size = inp->i_number; /* verify same name */ if (sysctlbyname("vfs.ffs.unlink", 0, 0, &cmd, sizeof cmd) == -1) { @@ -588,7 +588,7 @@ fix_extraneous(struct inoinfo *inp, stru printf(" (IGNORED)\n"); return (0); } - cmd.value = (int)(cp + 1); + cmd.value = (intptr_t)(cp + 1); cmd.size = inp->i_number; /* verify same name */ if (sysctlbyname("vfs.ffs.unlink", 0, 0, &cmd, sizeof cmd) == -1) { From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 00:04:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B3E71065698; Tue, 12 Jan 2010 00:04:14 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D58AC8FC17; Tue, 12 Jan 2010 00:04:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0C04D3b016643; Tue, 12 Jan 2010 00:04:13 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0C04D2X016641; Tue, 12 Jan 2010 00:04:13 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201001120004.o0C04D2X016641@svn.freebsd.org> From: Qing Li Date: Tue, 12 Jan 2010 00:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202132 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 00:04:14 -0000 Author: qingli Date: Tue Jan 12 00:04:13 2010 New Revision: 202132 URL: http://svn.freebsd.org/changeset/base/202132 Log: MFC r201544 An existing incomplete ARP entry would expire a subsequent statically configured entry of the same host. This bug was due to the expiration timer was not cancelled when installing the static entry. Since there exist a potential race condition with respect to timer cancellation, simply check for the LLE_STATIC bit inside the expiration function instead of cancelling the active timer. Modified: stable/8/sys/netinet/if_ether.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/if_ether.c ============================================================================== --- stable/8/sys/netinet/if_ether.c Mon Jan 11 23:33:30 2010 (r202131) +++ stable/8/sys/netinet/if_ether.c Tue Jan 12 00:04:13 2010 (r202132) @@ -168,17 +168,23 @@ arptimer(void *arg) ifp = lle->lle_tbl->llt_ifp; IF_AFDATA_LOCK(ifp); LLE_WLOCK(lle); - if ((!callout_pending(&lle->la_timer) && - callout_active(&lle->la_timer))) { - (void) llentry_free(lle); - } -#ifdef DIAGNOSTIC + if (lle->la_flags & LLE_STATIC) + LLE_WUNLOCK(lle); else { - struct sockaddr *l3addr = L3_ADDR(lle); - log(LOG_INFO, "arptimer issue: %p, IPv4 address: \"%s\"\n", lle, - inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr)); - } + if (!callout_pending(&lle->la_timer) && + callout_active(&lle->la_timer)) { + (void) llentry_free(lle); + } +#ifdef DIAGNOSTIC + else { + struct sockaddr *l3addr = L3_ADDR(lle); + log(LOG_INFO, + "arptimer issue: %p, IPv4 address: \"%s\"\n", lle, + inet_ntoa( + ((const struct sockaddr_in *)l3addr)->sin_addr)); + } #endif + } IF_AFDATA_UNLOCK(ifp); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 00:40:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0821F1065672; Tue, 12 Jan 2010 00:40:09 +0000 (UTC) (envelope-from das@freebsd.org) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id A46558FC20; Tue, 12 Jan 2010 00:40:08 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o0C0e7eG087774; Mon, 11 Jan 2010 19:40:07 -0500 (EST) (envelope-from das@freebsd.org) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o0C0e71S087773; Mon, 11 Jan 2010 19:40:07 -0500 (EST) (envelope-from das@freebsd.org) Date: Mon, 11 Jan 2010 19:40:07 -0500 From: David Schultz To: Max Laier Message-ID: <20100112004007.GA87632@zim.MIT.EDU> Mail-Followup-To: Max Laier , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <200910041943.n94JhaDg083487@svn.freebsd.org> <201001110316.29816.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001110316.29816.max@love2party.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r197752 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 00:40:09 -0000 On Mon, Jan 11, 2010, Max Laier wrote: > On Sunday 04 October 2009 21:43:36 David Schultz wrote: > > Author: das > > Date: Sun Oct 4 19:43:36 2009 > > New Revision: 197752 > > URL: http://svn.freebsd.org/changeset/base/197752 > > > > Log: > > Better glibc compatibility for getline/getdelim: > > > > - Tolerate applications that pass a NULL pointer for the buffer and > > claim that the capacity of the buffer is nonzero. > > > > - If an application passes in a non-NULL buffer pointer and claims the > > buffer has zero capacity, we should free (well, realloc) it > > anyway. It could have been obtained from malloc(0), so failing to > > free it would be a small memory leak. > > > > MFC After: 2 weeks > > Reported by: naddy > > PR: ports/138320 > > > > Modified: > > head/lib/libc/stdio/getdelim.c > > > > Modified: head/lib/libc/stdio/getdelim.c > > =========================================================================== > > === --- head/lib/libc/stdio/getdelim.c Sun Oct 4 19:03:32 2009 (r197751) > > +++ head/lib/libc/stdio/getdelim.c Sun Oct 4 19:43:36 2009 (r197752) @@ > > -120,8 +120,8 @@ getdelim(char ** __restrict linep, size_ > > goto error; > > } > > > > - if (*linecapp == 0) > > - *linep = NULL; > > + if (*linep == NULL) > > + *linecapp = 0; > > > > if (fp->_r <= 0 && __srefill(fp)) { > > /* If fp is at EOF already, we just need space for the NUL. */ > > I think we should have kept the original if case here, as well. Otherwise > something like this might fail: > > char *line; /* note uninitialized */ > size_t len = 0; > getline(&line, &len, fd); > > and I think it is a reasonable thing to pass in an uninitialized pointer if > you tell that there is no space associated with it, yet. > > I don't know if there are many (ab)uses of getline like this, but I was just > bitten by it. The trouble is that in many malloc() implementations, including ours, malloc(0) actually makes a small allocation instead of returning NULL. Hence, with your proposed change, code such as the following would result in a memory leak: size_t len = 0; char *line = malloc(len); getline(&line, &len, fd); POSIX says that *linep has to be a valid argument to the free(), but it's allowed to point to a buffer that's larger than advertised (e.g., a 128-byte buffer when *linecapp is 0.) It's a bad API; what's missing is a "line buffer" ADT that hides the details of its implementation. But it's still a bit better than fgetln() and way better than something hand-rolled. From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 01:30:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CFBD1065670; Tue, 12 Jan 2010 01:30:06 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C6638FC18; Tue, 12 Jan 2010 01:30:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0C1U67r035667; Tue, 12 Jan 2010 01:30:06 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0C1U66t035665; Tue, 12 Jan 2010 01:30:06 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001120130.o0C1U66t035665@svn.freebsd.org> From: David Xu Date: Tue, 12 Jan 2010 01:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202133 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 01:30:06 -0000 Author: davidxu Date: Tue Jan 12 01:30:05 2010 New Revision: 202133 URL: http://svn.freebsd.org/changeset/base/202133 Log: Update manuals of sem_open and sem_init. Submitted by: ru Modified: head/lib/libc/gen/sem_init.3 head/lib/libc/gen/sem_open.3 Modified: head/lib/libc/gen/sem_init.3 ============================================================================== --- head/lib/libc/gen/sem_init.3 Tue Jan 12 00:04:13 2010 (r202132) +++ head/lib/libc/gen/sem_init.3 Tue Jan 12 01:30:05 2010 (r202133) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2010 +.Dd January 9, 2010 .Dt SEM_INIT 3 .Os .Sh NAME @@ -52,7 +52,7 @@ A non-zero value for specifies a shared semaphore that can be used by multiple processes, the semaphore should be located in shared memory region (see .Xr mmap 2 , -.Xr shm_open 2 , +.Xr shm_open 2 , and .Xr shmget 2 ) , any process having read and write access to address Modified: head/lib/libc/gen/sem_open.3 ============================================================================== --- head/lib/libc/gen/sem_open.3 Tue Jan 12 00:04:13 2010 (r202132) +++ head/lib/libc/gen/sem_open.3 Tue Jan 12 01:30:05 2010 (r202133) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2003 +.Dd January 9, 2010 .Dt SEM_OPEN 3 .Os .Sh NAME @@ -61,8 +61,8 @@ and This implementation places strict requirements on the value of .Fa name : it must begin with a slash -.Pq Ql / , -contain no other slash characters. +.Pq Ql / +and contain no other slash characters. .Pp The following bits may be set in the .Fa oflag From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 06:00:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37DBB106566B; Tue, 12 Jan 2010 06:00:57 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2496F8FC13; Tue, 12 Jan 2010 06:00:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0C60vFM095121; Tue, 12 Jan 2010 06:00:57 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0C60uRI095113; Tue, 12 Jan 2010 06:00:56 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001120600.o0C60uRI095113@svn.freebsd.org> From: Brooks Davis Date: Tue, 12 Jan 2010 06:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202134 - in stable/8/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 06:00:57 -0000 Author: brooks Date: Tue Jan 12 06:00:56 2010 New Revision: 202134 URL: http://svn.freebsd.org/changeset/base/202134 Log: MFC r201443: Add vlan(4) to all GENERIC kernels. Modified: stable/8/sys/amd64/conf/GENERIC stable/8/sys/i386/conf/GENERIC stable/8/sys/ia64/conf/GENERIC stable/8/sys/pc98/conf/GENERIC stable/8/sys/powerpc/conf/GENERIC stable/8/sys/sparc64/conf/GENERIC stable/8/sys/sun4v/conf/GENERIC Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Tue Jan 12 01:30:05 2010 (r202133) +++ stable/8/sys/amd64/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) @@ -265,6 +265,7 @@ device wi # WaveLAN/Intersil/Symbol 80 device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" Modified: stable/8/sys/i386/conf/GENERIC ============================================================================== --- stable/8/sys/i386/conf/GENERIC Tue Jan 12 01:30:05 2010 (r202133) +++ stable/8/sys/i386/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) @@ -278,6 +278,7 @@ device wi # WaveLAN/Intersil/Symbol 80 device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" Modified: stable/8/sys/ia64/conf/GENERIC ============================================================================== --- stable/8/sys/ia64/conf/GENERIC Tue Jan 12 01:30:05 2010 (r202133) +++ stable/8/sys/ia64/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) @@ -144,6 +144,7 @@ device kue # Kawasaki LSI USB Ethernet # Various (pseudo) devices device ether # Ethernet support +device vlan # 802.1Q VLAN support device faith # IPv6-to-IPv4 relaying (translation) device gif # IPv6 and IPv4 tunneling device loop # Network loopback Modified: stable/8/sys/pc98/conf/GENERIC ============================================================================== --- stable/8/sys/pc98/conf/GENERIC Tue Jan 12 01:30:05 2010 (r202133) +++ stable/8/sys/pc98/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) @@ -232,6 +232,7 @@ device xe # Xircom pccard Ethernet device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" Modified: stable/8/sys/powerpc/conf/GENERIC ============================================================================== --- stable/8/sys/powerpc/conf/GENERIC Tue Jan 12 01:30:05 2010 (r202133) +++ stable/8/sys/powerpc/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) @@ -123,6 +123,7 @@ device fxp # Intel EtherExpress PRO/10 device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" Modified: stable/8/sys/sparc64/conf/GENERIC ============================================================================== --- stable/8/sys/sparc64/conf/GENERIC Tue Jan 12 01:30:05 2010 (r202133) +++ stable/8/sys/sparc64/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) @@ -207,6 +207,7 @@ device ath_rate_sample # SampleRate tx device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" Modified: stable/8/sys/sun4v/conf/GENERIC ============================================================================== --- stable/8/sys/sun4v/conf/GENERIC Tue Jan 12 01:30:05 2010 (r202133) +++ stable/8/sys/sun4v/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) @@ -169,6 +169,7 @@ device bge # Broadcom BCM570xx Gigabit device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 06:04:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F396A106566C; Tue, 12 Jan 2010 06:04:32 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E02BA8FC17; Tue, 12 Jan 2010 06:04:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0C64Wro095957; Tue, 12 Jan 2010 06:04:32 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0C64WmX095949; Tue, 12 Jan 2010 06:04:32 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001120604.o0C64WmX095949@svn.freebsd.org> From: Brooks Davis Date: Tue, 12 Jan 2010 06:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202135 - in stable/7/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 06:04:33 -0000 Author: brooks Date: Tue Jan 12 06:04:32 2010 New Revision: 202135 URL: http://svn.freebsd.org/changeset/base/202135 Log: MFC r201443: Add vlan(4) to all GENERIC kernels. Modified: stable/7/sys/amd64/conf/GENERIC stable/7/sys/i386/conf/GENERIC stable/7/sys/ia64/conf/GENERIC stable/7/sys/pc98/conf/GENERIC stable/7/sys/powerpc/conf/GENERIC stable/7/sys/sparc64/conf/GENERIC stable/7/sys/sun4v/conf/GENERIC Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/conf/GENERIC ============================================================================== --- stable/7/sys/amd64/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) +++ stable/7/sys/amd64/conf/GENERIC Tue Jan 12 06:04:32 2010 (r202135) @@ -254,6 +254,7 @@ device wi # WaveLAN/Intersil/Symbol 80 device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. Modified: stable/7/sys/i386/conf/GENERIC ============================================================================== --- stable/7/sys/i386/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) +++ stable/7/sys/i386/conf/GENERIC Tue Jan 12 06:04:32 2010 (r202135) @@ -268,6 +268,7 @@ device wi # WaveLAN/Intersil/Symbol 80 device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. Modified: stable/7/sys/ia64/conf/GENERIC ============================================================================== --- stable/7/sys/ia64/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) +++ stable/7/sys/ia64/conf/GENERIC Tue Jan 12 06:04:32 2010 (r202135) @@ -143,6 +143,7 @@ device sbp # SCSI over FireWire (need # Various (pseudo) devices device ether # Ethernet support +device vlan # 802.1Q VLAN support device faith # IPv6-to-IPv4 relaying (translation) device gif # IPv6 and IPv4 tunneling device loop # Network loopback Modified: stable/7/sys/pc98/conf/GENERIC ============================================================================== --- stable/7/sys/pc98/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) +++ stable/7/sys/pc98/conf/GENERIC Tue Jan 12 06:04:32 2010 (r202135) @@ -222,6 +222,7 @@ device xe # Xircom pccard Ethernet device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. Modified: stable/7/sys/powerpc/conf/GENERIC ============================================================================== --- stable/7/sys/powerpc/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) +++ stable/7/sys/powerpc/conf/GENERIC Tue Jan 12 06:04:32 2010 (r202135) @@ -107,6 +107,7 @@ device fxp # Intel EtherExpress PRO/10 device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. Modified: stable/7/sys/sparc64/conf/GENERIC ============================================================================== --- stable/7/sys/sparc64/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) +++ stable/7/sys/sparc64/conf/GENERIC Tue Jan 12 06:04:32 2010 (r202135) @@ -201,6 +201,7 @@ device ath_rate_sample # SampleRate tx device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. Modified: stable/7/sys/sun4v/conf/GENERIC ============================================================================== --- stable/7/sys/sun4v/conf/GENERIC Tue Jan 12 06:00:56 2010 (r202134) +++ stable/7/sys/sun4v/conf/GENERIC Tue Jan 12 06:04:32 2010 (r202135) @@ -156,6 +156,7 @@ device bge # Broadcom BCM570xx Gigabit device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 06:09:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EB7E1065670; Tue, 12 Jan 2010 06:09:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CEA98FC13; Tue, 12 Jan 2010 06:09:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0C69upZ097191; Tue, 12 Jan 2010 06:09:56 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0C69uvs097189; Tue, 12 Jan 2010 06:09:56 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001120609.o0C69uvs097189@svn.freebsd.org> From: Brooks Davis Date: Tue, 12 Jan 2010 06:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202136 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 06:09:56 -0000 Author: brooks Date: Tue Jan 12 06:09:56 2010 New Revision: 202136 URL: http://svn.freebsd.org/changeset/base/202136 Log: MFC r201953: Correct the explination text for the kern.ngroups. It reflects the number of supplemental groups, not the total number of groups. Modified: stable/8/sys/kern/kern_mib.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_mib.c ============================================================================== --- stable/8/sys/kern/kern_mib.c Tue Jan 12 06:04:32 2010 (r202135) +++ stable/8/sys/kern/kern_mib.c Tue Jan 12 06:09:56 2010 (r202136) @@ -125,7 +125,8 @@ SYSCTL_INT(_kern, KERN_POSIX1, posix1ver 0, _POSIX_VERSION, "Version of POSIX attempting to comply to"); SYSCTL_INT(_kern, KERN_NGROUPS, ngroups, CTLFLAG_RD, - 0, NGROUPS_MAX, "Maximum number of groups a user can belong to"); + 0, NGROUPS_MAX, + "Maximum number of supplemental groups a user can belong to"); SYSCTL_INT(_kern, KERN_JOB_CONTROL, job_control, CTLFLAG_RD, 0, 1, "Whether job control is available"); From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 06:11:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29A1B106566B; Tue, 12 Jan 2010 06:11:37 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17EA58FC08; Tue, 12 Jan 2010 06:11:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0C6BaGh097681; Tue, 12 Jan 2010 06:11:36 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0C6BaEi097679; Tue, 12 Jan 2010 06:11:36 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001120611.o0C6BaEi097679@svn.freebsd.org> From: Brooks Davis Date: Tue, 12 Jan 2010 06:11:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202137 - stable/8/sys/fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 06:11:37 -0000 Author: brooks Date: Tue Jan 12 06:11:36 2010 New Revision: 202137 URL: http://svn.freebsd.org/changeset/base/202137 Log: MFC r201954: Update the comment on printing group membership to reflect that fact that each group the process is a member of is printed rather than an entry for each group the user could be a member of. Modified: stable/8/sys/fs/procfs/procfs_status.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/procfs/procfs_status.c ============================================================================== --- stable/8/sys/fs/procfs/procfs_status.c Tue Jan 12 06:09:56 2010 (r202136) +++ stable/8/sys/fs/procfs/procfs_status.c Tue Jan 12 06:11:36 2010 (r202137) @@ -82,7 +82,7 @@ procfs_doprocstatus(PFS_FILL_ARGS) sid = sess->s_leader ? sess->s_leader->p_pid : 0; /* comm pid ppid pgid sid tty ctty,sldr start ut st wmsg - euid ruid rgid,egid,groups[1 .. NGROUPS] + euid ruid rgid,egid,groups[1 .. ngroups] */ pc = p->p_comm; From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 06:14:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50D0B106566B; Tue, 12 Jan 2010 06:14:25 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3ECD28FC0A; Tue, 12 Jan 2010 06:14:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0C6EPEC098360; Tue, 12 Jan 2010 06:14:25 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0C6EP68098358; Tue, 12 Jan 2010 06:14:25 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001120614.o0C6EP68098358@svn.freebsd.org> From: Brooks Davis Date: Tue, 12 Jan 2010 06:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202138 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 06:14:25 -0000 Author: brooks Date: Tue Jan 12 06:14:24 2010 New Revision: 202138 URL: http://svn.freebsd.org/changeset/base/202138 Log: MFC r201955: Improve the comment about CMGROUP_MAX. Modified: stable/8/sys/sys/socket.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/socket.h ============================================================================== --- stable/8/sys/sys/socket.h Tue Jan 12 06:11:36 2010 (r202137) +++ stable/8/sys/sys/socket.h Tue Jan 12 06:14:24 2010 (r202138) @@ -483,8 +483,8 @@ struct cmsghdr { #if __BSD_VISIBLE /* * While we may have more groups than this, the cmsgcred struct must - * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow - * this. + * be able to fit in an mbuf and we have historically supported a + * maximum of 16 groups. */ #define CMGROUP_MAX 16 From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 07:33:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6981B106568D; Tue, 12 Jan 2010 07:33:33 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57F0F8FC17; Tue, 12 Jan 2010 07:33:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0C7XXTf015987; Tue, 12 Jan 2010 07:33:33 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0C7XXTN015985; Tue, 12 Jan 2010 07:33:33 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001120733.o0C7XXTN015985@svn.freebsd.org> From: Brooks Davis Date: Tue, 12 Jan 2010 07:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202140 - stable/8/crypto/heimdal/kcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 07:33:33 -0000 Author: brooks Date: Tue Jan 12 07:33:33 2010 New Revision: 202140 URL: http://svn.freebsd.org/changeset/base/202140 Log: MFC r201444: The size of credential messages is limited by CMGROUP_MAX rather than NGROUPS. Modified: stable/8/crypto/heimdal/kcm/connect.c Directory Properties: stable/8/crypto/heimdal/ (props changed) Modified: stable/8/crypto/heimdal/kcm/connect.c ============================================================================== --- stable/8/crypto/heimdal/kcm/connect.c Tue Jan 12 07:02:54 2010 (r202139) +++ stable/8/crypto/heimdal/kcm/connect.c Tue Jan 12 07:33:33 2010 (r202140) @@ -149,7 +149,7 @@ update_client_creds(int s, kcm_client *p struct sockcred *sc; memset(&msg, 0, sizeof(msg)); - crmsgsize = CMSG_SPACE(SOCKCREDSIZE(NGROUPS)); + crmsgsize = CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)); if (crmsgsize == 0) return 1 ; From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 07:49:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E85810656B6; Tue, 12 Jan 2010 07:49:35 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B55E8FC12; Tue, 12 Jan 2010 07:49:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0C7nZZx019666; Tue, 12 Jan 2010 07:49:35 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0C7nZ7j019654; Tue, 12 Jan 2010 07:49:35 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001120749.o0C7nZ7j019654@svn.freebsd.org> From: Brooks Davis Date: Tue, 12 Jan 2010 07:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202143 - in head/sys: boot/forth compat/linux compat/svr4 i386/ibcs2 kern rpc security/audit sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 07:49:35 -0000 Author: brooks Date: Tue Jan 12 07:49:34 2010 New Revision: 202143 URL: http://svn.freebsd.org/changeset/base/202143 Log: Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic kern.ngroups+1. kern.ngroups can range from NGROUPS_MAX=1023 to INT_MAX-1. Given that the Windows group limit is 1024, this range should be sufficient for most applications. MFC after: 1 month Modified: head/sys/boot/forth/loader.conf head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_uid16.c head/sys/compat/svr4/svr4_misc.c head/sys/i386/ibcs2/ibcs2_misc.c head/sys/kern/kern_mib.c head/sys/kern/kern_prot.c head/sys/kern/subr_param.c head/sys/rpc/authunix_prot.c head/sys/security/audit/audit_arg.c head/sys/sys/systm.h Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/boot/forth/loader.conf Tue Jan 12 07:49:34 2010 (r202143) @@ -101,6 +101,7 @@ module_path="/boot/modules" # Set the mo #kern.maxusers="32" # Set size of various static tables #kern.nbuf="" # Set the number of buffer headers #kern.ncallout="" # Set the maximum # of timer events +#kern.ngroups="1023" # Set the maximum # of supplemental groups #kern.sgrowsiz="" # Set the amount to grow stack #kern.cam.scsi_delay="2000" # Delay (in ms) before probing SCSI #kern.ipc.maxsockets="" # Set the maximum number of sockets avaliable Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/compat/linux/linux_misc.c Tue Jan 12 07:49:34 2010 (r202143) @@ -1138,7 +1138,7 @@ linux_setgroups(struct thread *td, struc struct proc *p; ngrp = args->gidsetsize; - if (ngrp < 0 || ngrp >= NGROUPS) + if (ngrp < 0 || ngrp > ngroups_max) return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error = copyin(args->grouplist, linux_gidset, ngrp * sizeof(l_gid_t)); Modified: head/sys/compat/linux/linux_uid16.c ============================================================================== --- head/sys/compat/linux/linux_uid16.c Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/compat/linux/linux_uid16.c Tue Jan 12 07:49:34 2010 (r202143) @@ -109,7 +109,7 @@ linux_setgroups16(struct thread *td, str #endif ngrp = args->gidsetsize; - if (ngrp < 0 || ngrp >= NGROUPS) + if (ngrp < 0 || ngrp > ngroups_max) return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); Modified: head/sys/compat/svr4/svr4_misc.c ============================================================================== --- head/sys/compat/svr4/svr4_misc.c Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/compat/svr4/svr4_misc.c Tue Jan 12 07:49:34 2010 (r202143) @@ -708,7 +708,7 @@ svr4_sys_sysconfig(td, uap) switch (uap->name) { case SVR4_CONFIG_NGROUPS: - *retval = NGROUPS_MAX; + *retval = ngroups_max; break; case SVR4_CONFIG_CHILD_MAX: *retval = maxproc; Modified: head/sys/i386/ibcs2/ibcs2_misc.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_misc.c Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/i386/ibcs2/ibcs2_misc.c Tue Jan 12 07:49:34 2010 (r202143) @@ -665,7 +665,7 @@ ibcs2_getgroups(td, uap) if (uap->gidsetsize < 0) return (EINVAL); - ngrp = MIN(uap->gidsetsize, NGROUPS); + ngrp = MIN(uap->gidsetsize, ngroups_max + 1); gp = malloc(ngrp * sizeof(*gp), M_TEMP, M_WAITOK); error = kern_getgroups(td, &ngrp, gp); if (error) @@ -693,7 +693,7 @@ ibcs2_setgroups(td, uap) gid_t *gp; int error, i; - if (uap->gidsetsize < 0 || uap->gidsetsize > NGROUPS) + if (uap->gidsetsize < 0 || uap->gidsetsize > ngroups_max + 1) return (EINVAL); if (uap->gidsetsize && uap->gidset == NULL) return (EINVAL); Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/kern/kern_mib.c Tue Jan 12 07:49:34 2010 (r202143) @@ -125,7 +125,7 @@ SYSCTL_INT(_kern, KERN_POSIX1, posix1ver 0, _POSIX_VERSION, "Version of POSIX attempting to comply to"); SYSCTL_INT(_kern, KERN_NGROUPS, ngroups, CTLFLAG_RD, - 0, NGROUPS_MAX, + &ngroups_max, 0, "Maximum number of supplemental groups a user can belong to"); SYSCTL_INT(_kern, KERN_JOB_CONTROL, job_control, CTLFLAG_RD, Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/kern/kern_prot.c Tue Jan 12 07:49:34 2010 (r202143) @@ -283,7 +283,7 @@ getgroups(struct thread *td, register st u_int ngrp; int error; - ngrp = MIN(uap->gidsetsize, NGROUPS); + ngrp = MIN(uap->gidsetsize, ngroups_max + 1); groups = malloc(ngrp * sizeof(*groups), M_TEMP, M_WAITOK); error = kern_getgroups(td, &ngrp, groups); if (error) @@ -796,7 +796,7 @@ setgroups(struct thread *td, struct setg gid_t *groups = NULL; int error; - if (uap->gidsetsize > NGROUPS) + if (uap->gidsetsize > ngroups_max + 1) return (EINVAL); groups = malloc(uap->gidsetsize * sizeof(gid_t), M_TEMP, M_WAITOK); error = copyin(uap->gidset, groups, uap->gidsetsize * sizeof(gid_t)); @@ -815,7 +815,7 @@ kern_setgroups(struct thread *td, u_int struct ucred *newcred, *oldcred; int error; - if (ngrp > NGROUPS) + if (ngrp > ngroups_max + 1) return (EINVAL); AUDIT_ARG_GROUPSET(groups, ngrp); newcred = crget(); @@ -2022,14 +2022,14 @@ crsetgroups_locked(struct ucred *cr, int /* * Copy groups in to a credential after expanding it if required. - * Truncate the list to NGROUPS if it is too large. + * Truncate the list to (ngroups_max + 1) if it is too large. */ void crsetgroups(struct ucred *cr, int ngrp, gid_t *groups) { - if (ngrp > NGROUPS) - ngrp = NGROUPS; + if (ngrp > ngroups_max + 1) + ngrp = ngroups_max + 1; crextend(cr, ngrp); crsetgroups_locked(cr, ngrp, groups); Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/kern/subr_param.c Tue Jan 12 07:49:34 2010 (r202143) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_param.h" #include "opt_maxusers.h" +#include #include #include #include @@ -88,6 +89,7 @@ int maxfiles; /* sys. wide open files int maxfilesperproc; /* per-proc open files limit */ int ncallout; /* maximum # of timer events */ int nbuf; +int ngroups_max; /* max # groups per process */ int nswbuf; long maxswzone; /* max swmeta KVA storage */ long maxbcache; /* max buffer cache KVA storage */ @@ -228,6 +230,18 @@ init_param1(void) TUNABLE_ULONG_FETCH("kern.maxssiz", &maxssiz); sgrowsiz = SGROWSIZ; TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz); + + /* + * Let the administrator set {NGROUPS_MAX}, but disallow values + * less than NGROUPS_MAX which would violate POSIX.1-2008 or + * greater than INT_MAX-1 which would result in overflow. + */ + ngroups_max = NGROUPS_MAX; + TUNABLE_INT_FETCH("kern.ngroups", &ngroups_max); + if (ngroups_max < NGROUPS_MAX) + ngroups_max = NGROUPS_MAX; + if (ngroups_max > INT_MAX - 1) + ngroups_max = INT_MAX - 1; } /* Modified: head/sys/rpc/authunix_prot.c ============================================================================== --- head/sys/rpc/authunix_prot.c Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/rpc/authunix_prot.c Tue Jan 12 07:49:34 2010 (r202143) @@ -110,7 +110,7 @@ xdr_authunix_parms(XDR *xdrs, uint32_t * if (!xdr_uint32_t(xdrs, &ngroups)) return (FALSE); for (i = 0; i < ngroups; i++) { - if (i + 1 < NGROUPS) { + if (i + 1 < ngroups_max + 1) { if (!xdr_uint32_t(xdrs, &cred->cr_groups[i + 1])) return (FALSE); } else { @@ -120,8 +120,8 @@ xdr_authunix_parms(XDR *xdrs, uint32_t * } if (xdrs->x_op == XDR_DECODE) { - if (ngroups + 1 > NGROUPS) - cred->cr_ngroups = NGROUPS; + if (ngroups + 1 > ngroups_max + 1) + cred->cr_ngroups = ngroups_max + 1; else cred->cr_ngroups = ngroups + 1; } Modified: head/sys/security/audit/audit_arg.c ============================================================================== --- head/sys/security/audit/audit_arg.c Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/security/audit/audit_arg.c Tue Jan 12 07:49:34 2010 (r202143) @@ -262,8 +262,8 @@ audit_arg_groupset(gid_t *gidset, u_int u_int i; struct kaudit_record *ar; - KASSERT(gidset_size <= NGROUPS, - ("audit_arg_groupset: gidset_size > NGROUPS")); + KASSERT(gidset_size <= ngroups_max + 1, + ("audit_arg_groupset: gidset_size > (kern.ngroups + 1)")); ar = currecord(); if (ar == NULL) Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Tue Jan 12 07:40:58 2010 (r202142) +++ head/sys/sys/systm.h Tue Jan 12 07:49:34 2010 (r202143) @@ -64,6 +64,7 @@ extern int boothowto; /* reboot flags, extern int bootverbose; /* nonzero to print verbose messages */ extern int maxusers; /* system tune hint */ +extern int ngroups_max; /* max # of supplemental groups */ #ifdef INVARIANTS /* The option is always available */ #define KASSERT(exp,msg) do { \ From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 08:05:07 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C53581065676; Tue, 12 Jan 2010 08:05:07 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 5F1CE8FC1B; Tue, 12 Jan 2010 08:05:07 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id o0C83oit003242; Tue, 12 Jan 2010 02:03:50 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id o0C83oph003241; Tue, 12 Jan 2010 02:03:50 -0600 (CST) (envelope-from brooks) Date: Tue, 12 Jan 2010 02:03:50 -0600 From: Brooks Davis To: Brooks Davis Message-ID: <20100112080350.GA3193@lor.one-eyed-alien.net> References: <201001120749.o0C7nZ7j019654@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: <201001120749.o0C7nZ7j019654@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Tue, 12 Jan 2010 02:03:50 -0600 (CST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202143 - in head/sys: boot/forth compat/linux compat/svr4 i386/ibcs2 kern rpc security/audit sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 08:05:07 -0000 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 12, 2010 at 07:49:35AM +0000, Brooks Davis wrote: > Author: brooks > Date: Tue Jan 12 07:49:34 2010 > New Revision: 202143 > URL: http://svn.freebsd.org/changeset/base/202143 >=20 > Log: > Replace the static NGROUPS=3DNGROUPS_MAX+1=3D1024 with a dynamic > kern.ngroups+1. kern.ngroups can range from NGROUPS_MAX=3D1023 to > INT_MAX-1. Given that the Windows group limit is 1024, this range > should be sufficient for most applications. With the commit, the only remaining delta to my projects/ngroups branch is: --- ../../head/sys/sys/param.h 2010-01-12 01:39:50.000000000 -0600 +++ ./sys/sys/param.h 2010-01-08 16:31:03.000000000 -0600 @@ -78,7 +78,6 @@ #define MAXLOGNAME 17 /* max login name length (i= ncl. NUL) */ #define MAXUPRC CHILD_MAX /* max simultaneous process= es */ #define NCARGS ARG_MAX /* max bytes for an exec fu= nction */ -#define NGROUPS (NGROUPS_MAX+1) /* max number groups */ #define NOFILE OPEN_MAX /* max open files per proce= ss */ #define NOGROUP 65535 /* marker for empty group s= et member */ #define MAXHOSTNAMELEN 256 /* max hostname size */ which would remove the NGROUPS definition entirely. Overall I think this would be a good thing as applications should not be written with NGROUPS or NGROUPS_MAX hard coded in, but I have not yet asked portmgr@ for a run to see how many ports this would break. I do not believe that NGROUPS is defined in any standard so removing it should only break non-portable code. -- Brooks --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFLTCzlXY6L6fI4GtQRAi5LAJ9cPeF18egS/iY129BK6lGpqptevwCgrQXm svo4yujw5cuUi4iOG3dxMdI= =OIEM -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 09:33:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBE5D106566B; Tue, 12 Jan 2010 09:33:02 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 70E758FC14; Tue, 12 Jan 2010 09:33:01 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA25407; Tue, 12 Jan 2010 11:32:58 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1NUd7S-0009Vq-Lj; Tue, 12 Jan 2010 11:32:58 +0200 Message-ID: <4B4C4181.3070408@freebsd.org> Date: Tue, 12 Jan 2010 11:31:45 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091128) MIME-Version: 1.0 To: Alexander Motin References: <201001112257.o0BMvq4n001616@svn.freebsd.org> In-Reply-To: <201001112257.o0BMvq4n001616@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202127 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 09:33:02 -0000 on 12/01/2010 00:57 Alexander Motin said the following: > Author: mav > Date: Mon Jan 11 22:57:52 2010 > New Revision: 202127 > URL: http://svn.freebsd.org/changeset/base/202127 > > Log: > Add multichannel (4.0 and 7.1) playback support. 5.1 mode support blocked > now due to unidentified synchonization problem. For 7.1 soundcards 5.1 > support handled correctly via software upmix done by sound(4). > > Stereo stream is no more duplicated to all ports. If you loose sound, check > you are using right connectors. Front speakers connector is usually green, > center/LFE - orange, rear - black, side - gray. Yay! -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 11:11:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A7A5106566B; Tue, 12 Jan 2010 11:11:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0956C8FC08; Tue, 12 Jan 2010 11:11:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CBBPh4068488; Tue, 12 Jan 2010 11:11:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CBBPTw068485; Tue, 12 Jan 2010 11:11:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001121111.o0CBBPTw068485@svn.freebsd.org> From: Alexander Motin Date: Tue, 12 Jan 2010 11:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202150 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 11:11:26 -0000 Author: mav Date: Tue Jan 12 11:11:25 2010 New Revision: 202150 URL: http://svn.freebsd.org/changeset/base/202150 Log: Make OSS_GETVERSION ioctl really work. It has 'M' group, not 'P', as different nearby ones, and was grabbed by MIXER_xxx() handler. While there, replace '(cmd & MIXER_xxx(0)) == MIXER_xxx(0)' expressions with more correct '(cmd & ~0xff) == MIXER_READ(0)'. Use of bit operations to compare numeric fields doesn't looks sane. MFC after: 1 month Modified: head/sys/dev/sound/pcm/dsp.c head/sys/dev/sound/pcm/mixer.c Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Tue Jan 12 10:13:09 2010 (r202149) +++ head/sys/dev/sound/pcm/dsp.c Tue Jan 12 11:11:25 2010 (r202150) @@ -1003,7 +1003,7 @@ dsp_ioctl_channel(struct cdev *dev, stru if (volch != NULL && ((j == SOUND_MIXER_PCM && volch->direction == PCMDIR_PLAY) || (j == SOUND_MIXER_RECLEV && volch->direction == PCMDIR_REC))) { - if ((cmd & MIXER_WRITE(0)) == MIXER_WRITE(0)) { + if ((cmd & ~0xff) == MIXER_WRITE(0)) { int left, right, center; left = *(int *)arg & 0x7f; @@ -1011,7 +1011,7 @@ dsp_ioctl_channel(struct cdev *dev, stru center = (left + right) >> 1; chn_setvolume_multi(volch, SND_VOL_C_PCM, left, right, center); - } else if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) { + } else if ((cmd & ~0xff) == MIXER_READ(0)) { *(int *)arg = CHN_GETVOLUME(volch, SND_VOL_C_PCM, SND_CHN_T_FL); *(int *)arg |= CHN_GETVOLUME(volch, @@ -1023,7 +1023,7 @@ dsp_ioctl_channel(struct cdev *dev, stru case SOUND_MIXER_DEVMASK: case SOUND_MIXER_CAPS: case SOUND_MIXER_STEREODEVS: - if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) { + if ((cmd & ~0xff) == MIXER_READ(0)) { *(int *)arg = 0; if (rdch != NULL) *(int *)arg |= SOUND_MASK_RECLEV; @@ -1034,7 +1034,7 @@ dsp_ioctl_channel(struct cdev *dev, stru break; case SOUND_MIXER_RECMASK: case SOUND_MIXER_RECSRC: - if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) + if ((cmd & ~0xff) == MIXER_READ(0)) *(int *)arg = 0; ret = 0; break; Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Tue Jan 12 10:13:09 2010 (r202149) +++ head/sys/dev/sound/pcm/mixer.c Tue Jan 12 11:11:25 2010 (r202150) @@ -1130,7 +1130,7 @@ mixer_ioctl_channel(struct cdev *dev, u_ if ((j == SOUND_MIXER_DEVMASK || j == SOUND_MIXER_CAPS || j == SOUND_MIXER_STEREODEVS) && - (cmd & MIXER_READ(0)) == MIXER_READ(0)) { + (cmd & ~0xff) == MIXER_READ(0)) { snd_mtxlock(m->lock); *(int *)arg = mix_getdevs(m); snd_mtxunlock(m->lock); @@ -1148,14 +1148,14 @@ mixer_ioctl_channel_proc: KASSERT(c != NULL, ("%s(): NULL channel", __func__)); CHN_LOCKASSERT(c); - if ((cmd & MIXER_WRITE(0)) == MIXER_WRITE(0)) { + if ((cmd & ~0xff) == MIXER_WRITE(0)) { int left, right, center; left = *(int *)arg & 0x7f; right = (*(int *)arg >> 8) & 0x7f; center = (left + right) >> 1; chn_setvolume_multi(c, SND_VOL_C_PCM, left, right, center); - } else if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) { + } else if ((cmd & ~0xff) == MIXER_READ(0)) { *(int *)arg = CHN_GETVOLUME(c, SND_VOL_C_PCM, SND_CHN_T_FL); *(int *)arg |= CHN_GETVOLUME(c, SND_VOL_C_PCM, SND_CHN_T_FR) << 8; @@ -1208,7 +1208,7 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo struct thread *td, int from) { struct snd_mixer *m; - int ret, *arg_i = (int *)arg; + int ret = EINVAL, *arg_i = (int *)arg; int v = -1, j = cmd & 0xff; /* @@ -1242,8 +1242,23 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo snd_mtxunlock(m->lock); return (EBADF); } - - if ((cmd & MIXER_WRITE(0)) == MIXER_WRITE(0)) { + switch (cmd) { + case SNDCTL_DSP_GET_RECSRC_NAMES: + bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); + ret = 0; + goto done; + case SNDCTL_DSP_GET_RECSRC: + ret = mixer_get_recroute(m, arg_i); + goto done; + case SNDCTL_DSP_SET_RECSRC: + ret = mixer_set_recroute(m, *arg_i); + goto done; + case OSS_GETVERSION: + *arg_i = SOUND_VERSION; + ret = 0; + goto done; + } + if ((cmd & ~0xff) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) ret = mixer_setrecsrc(m, *arg_i); else @@ -1251,23 +1266,19 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo snd_mtxunlock(m->lock); return ((ret == 0) ? 0 : ENXIO); } - - if ((cmd & MIXER_READ(0)) == MIXER_READ(0)) { + if ((cmd & ~0xff) == MIXER_READ(0)) { switch (j) { - case SOUND_MIXER_DEVMASK: - case SOUND_MIXER_CAPS: - case SOUND_MIXER_STEREODEVS: + case SOUND_MIXER_DEVMASK: + case SOUND_MIXER_CAPS: + case SOUND_MIXER_STEREODEVS: v = mix_getdevs(m); break; - - case SOUND_MIXER_RECMASK: + case SOUND_MIXER_RECMASK: v = mix_getrecdevs(m); break; - - case SOUND_MIXER_RECSRC: + case SOUND_MIXER_RECSRC: v = mixer_getrecsrc(m); break; - default: v = mixer_get(m, j); } @@ -1275,29 +1286,8 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo snd_mtxunlock(m->lock); return ((v != -1) ? 0 : ENXIO); } - - ret = 0; - - switch (cmd) { - case SNDCTL_DSP_GET_RECSRC_NAMES: - bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); - break; - case SNDCTL_DSP_GET_RECSRC: - ret = mixer_get_recroute(m, arg_i); - break; - case SNDCTL_DSP_SET_RECSRC: - ret = mixer_set_recroute(m, *arg_i); - break; - case OSS_GETVERSION: - *arg_i = SOUND_VERSION; - break; - default: - ret = EINVAL; - break; - } - +done: snd_mtxunlock(m->lock); - return (ret); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 16:40:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40B681065698; Tue, 12 Jan 2010 16:40:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 154508FC20; Tue, 12 Jan 2010 16:40:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CGeDVJ040977; Tue, 12 Jan 2010 16:40:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CGeDGg040975; Tue, 12 Jan 2010 16:40:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001121640.o0CGeDGg040975@svn.freebsd.org> From: Alexander Motin Date: Tue, 12 Jan 2010 16:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202156 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 16:40:14 -0000 Author: mav Date: Tue Jan 12 16:40:13 2010 New Revision: 202156 URL: http://svn.freebsd.org/changeset/base/202156 Log: Align buffer size to LCM of 128bytes, required by hardware, and alignment of current format. This fixes problems with non-power-of-2 number of channels. Enable 5.1 formats support, as they are working fine now. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Tue Jan 12 16:33:55 2010 (r202155) +++ head/sys/dev/sound/pci/hda/hdac.c Tue Jan 12 16:40:13 2010 (r202156) @@ -86,7 +86,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20100111_0139" +#define HDA_DRV_TEST_REV "20100112_0140" SND_DECLARE_FILE("$FreeBSD$"); @@ -3543,6 +3543,32 @@ hdac_stream_setup(struct hdac_chan *ch) } } +/* + * Greatest Common Divisor. + */ +static unsigned +gcd(unsigned a, unsigned b) +{ + u_int c; + + while (b != 0) { + c = a; + a = b; + b = (c % b); + } + return (a); +} + +/* + * Least Common Multiple. + */ +static unsigned +lcm(unsigned a, unsigned b) +{ + + return ((a * b) / gcd(a, b)); +} + static int hdac_channel_setfragments(kobj_t obj, void *data, uint32_t blksz, uint32_t blkcnt) @@ -3550,7 +3576,7 @@ hdac_channel_setfragments(kobj_t obj, vo struct hdac_chan *ch = data; struct hdac_softc *sc = ch->devinfo->codec->sc; - blksz &= HDA_BLK_ALIGN; + blksz -= blksz % lcm(HDAC_DMA_ALIGNMENT, sndbuf_getalign(ch->b)); if (blksz > (sndbuf_getmaxsize(ch->b) / HDA_BDL_MIN)) blksz = sndbuf_getmaxsize(ch->b) / HDA_BDL_MIN; @@ -6551,14 +6577,12 @@ hdac_pcmchannel_setup(struct hdac_chan * if (ch->bit32) ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 4, 0); } -#ifdef notyet if (channels == 6 || /* Any 6-channel */ pinset == 0x0017) { /* 7.1 */ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 6, 1); if (ch->bit32) ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 6, 1); } -#endif if (channels == 8) { /* Any 8-channel */ ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 8, 1); if (ch->bit32) From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 17:03:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE2691065670; Tue, 12 Jan 2010 17:03:55 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC5FE8FC0C; Tue, 12 Jan 2010 17:03:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CH3tue046322; Tue, 12 Jan 2010 17:03:55 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CH3tDV046320; Tue, 12 Jan 2010 17:03:55 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <201001121703.o0CH3tDV046320@svn.freebsd.org> From: Joseph Koshy Date: Tue, 12 Jan 2010 17:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202157 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 17:03:55 -0000 Author: jkoshy Date: Tue Jan 12 17:03:55 2010 New Revision: 202157 URL: http://svn.freebsd.org/changeset/base/202157 Log: Bug fix: add a missing initializer. Submitted by: Luca Pizzamiglio PR: i386/142742 Modified: head/lib/libpmc/libpmc.c Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Tue Jan 12 16:40:13 2010 (r202156) +++ head/lib/libpmc/libpmc.c Tue Jan 12 17:03:55 2010 (r202157) @@ -2543,6 +2543,7 @@ pmc_init(void) break; case PMC_CPU_INTEL_CORE: PMC_MDEP_INIT(core); + pmc_class_table[n] = &core_class_table_descr; break; case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 17:38:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 343291065693; Tue, 12 Jan 2010 17:38:24 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2272B8FC18; Tue, 12 Jan 2010 17:38:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CHcOGl054009; Tue, 12 Jan 2010 17:38:24 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CHcOE3054007; Tue, 12 Jan 2010 17:38:24 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001121738.o0CHcOE3054007@svn.freebsd.org> From: Christian Brueffer Date: Tue, 12 Jan 2010 17:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202159 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 17:38:24 -0000 Author: brueffer Date: Tue Jan 12 17:38:23 2010 New Revision: 202159 URL: http://svn.freebsd.org/changeset/base/202159 Log: Remove useless .TE groff macro. Submitted by: Joerg Sonnenberger MFC after: 3 days Modified: head/lib/libelf/elf.3 Modified: head/lib/libelf/elf.3 ============================================================================== --- head/lib/libelf/elf.3 Tue Jan 12 17:34:10 2010 (r202158) +++ head/lib/libelf/elf.3 Tue Jan 12 17:38:23 2010 (r202159) @@ -379,7 +379,6 @@ See .It Dv SHT_SUNW_move Ta Dv ELF_T_MOVE Ta ELF move records. .It Dv SHT_SUNW_syminfo Ta Dv ELF_T_SYMINFO Ta Additional symbol flags. .El -.TE .Ss Functional Grouping This section contains a brief overview of the available functionality in the ELF library. From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 17:50:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2596106566B; Tue, 12 Jan 2010 17:50:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 908FF8FC14; Tue, 12 Jan 2010 17:50:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CHoQ0I056678; Tue, 12 Jan 2010 17:50:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CHoQUV056676; Tue, 12 Jan 2010 17:50:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001121750.o0CHoQUV056676@svn.freebsd.org> From: Alexander Motin Date: Tue, 12 Jan 2010 17:50:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202160 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 17:50:26 -0000 Author: mav Date: Tue Jan 12 17:50:26 2010 New Revision: 202160 URL: http://svn.freebsd.org/changeset/base/202160 Log: Update, reflecting added multichannel playback support. Modified: head/share/man/man4/snd_hda.4 Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Tue Jan 12 17:38:23 2010 (r202159) +++ head/share/man/man4/snd_hda.4 Tue Jan 12 17:50:26 2010 (r202160) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 13, 2009 +.Dd January 12, 2010 .Dt SND_HDA 4 .Os .Sh NAME @@ -125,12 +125,14 @@ such as .Dq Li nofixedrate , will do the opposite and takes precedence. Options can be separated by whitespace and commas. +.Pp .Dq Li GPIO Ns s are a codec's General Purpose I/O pins which system integrators sometimes use to control external muters, amplifiers and so on. If you have no sound, or sound volume is not adequate, you may have to experiment a bit with the GPIO setup to find the optimal setup for your system. +.Pp The .Dq Li ivref Ns Ar X and @@ -178,6 +180,11 @@ A unique, per-association number used to particular association. Sequence numbers can be specified as numeric values from 0 to 15. .Pp +For output assotiations sequence numbers encode speaker pairs positions: +0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side. +Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro; +(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1. +.Pp The sequence number 15 has a special meaning for output associations. Output pins with this number and device type .Dq Ar Headphones @@ -639,6 +646,3 @@ to control external amplifiers. In some GPIO bits may be needed to make sound work on specific device. .Pp HDMI and DisplayPort audio may also require support from video driver. -.Pp -Due to OSS limitation multichannel (not multidevice) playback is not -supported. From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 17:59:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9227C106566B; Tue, 12 Jan 2010 17:59:59 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D0F38FC15; Tue, 12 Jan 2010 17:59:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CHxxv2058800; Tue, 12 Jan 2010 17:59:59 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CHxxja058787; Tue, 12 Jan 2010 17:59:59 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001121759.o0CHxxja058787@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 12 Jan 2010 17:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202161 - in head: sbin/ifconfig share/man/man4 sys/amd64/amd64 sys/dev/aic7xxx sys/dev/ath sys/dev/ath/ath_hal/ar5210 sys/dev/ct sys/dev/mly sys/i386/i386 tools/tools/ath/athdecode X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 17:59:59 -0000 Author: gavin Date: Tue Jan 12 17:59:58 2010 New Revision: 202161 URL: http://svn.freebsd.org/changeset/base/202161 Log: Spell "Hz" correctly wherever it is user-visible. PR: bin/142566 Submitted by: N.J. Mann njm njm.me.uk Approved by: ed (mentor) MFC after: 2 weeks Modified: head/sbin/ifconfig/ifieee80211.c head/share/man/man4/ath.4 head/share/man/man4/cpufreq.4 head/share/man/man4/vge.4 head/sys/amd64/amd64/local_apic.c head/sys/dev/aic7xxx/aic79xx_pci.c head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c head/sys/dev/ath/if_ath.c head/sys/dev/ct/ct_isa.c head/sys/dev/mly/mly.c head/sys/i386/i386/local_apic.c head/tools/tools/ath/athdecode/main.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Tue Jan 12 17:50:26 2010 (r202160) +++ head/sbin/ifconfig/ifieee80211.c Tue Jan 12 17:59:58 2010 (r202161) @@ -3429,9 +3429,9 @@ get_chaninfo(const struct ieee80211_chan else if (IEEE80211_IS_CHAN_B(c)) strlcat(buf, " 11b", bsize); if (IEEE80211_IS_CHAN_HALF(c)) - strlcat(buf, "/10Mhz", bsize); + strlcat(buf, "/10MHz", bsize); if (IEEE80211_IS_CHAN_QUARTER(c)) - strlcat(buf, "/5Mhz", bsize); + strlcat(buf, "/5MHz", bsize); if (IEEE80211_IS_CHAN_TURBO(c)) strlcat(buf, " Turbo", bsize); if (precise) { @@ -3453,7 +3453,7 @@ print_chaninfo(const struct ieee80211_ch { char buf[14]; - printf("Channel %3u : %u%c Mhz%-14.14s", + printf("Channel %3u : %u%c MHz%-14.14s", ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq, IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ', get_chaninfo(c, verb, buf, sizeof(buf))); @@ -3562,7 +3562,7 @@ list_channels(int s, int allchans) static void print_txpow(const struct ieee80211_channel *c) { - printf("Channel %3u : %u Mhz %3.1f reg %2d ", + printf("Channel %3u : %u MHz %3.1f reg %2d ", c->ic_ieee, c->ic_freq, c->ic_maxpower/2., c->ic_maxregpower); } @@ -4244,7 +4244,7 @@ ieee80211_status(int s) c = getcurchan(s); if (c->ic_freq != IEEE80211_CHAN_ANY) { char buf[14]; - printf(" channel %d (%u Mhz%s)", c->ic_ieee, c->ic_freq, + printf(" channel %d (%u MHz%s)", c->ic_ieee, c->ic_freq, get_chaninfo(c, 1, buf, sizeof(buf))); } else if (verbose) printf(" channel UNDEF"); Modified: head/share/man/man4/ath.4 ============================================================================== --- head/share/man/man4/ath.4 Tue Jan 12 17:50:26 2010 (r202160) +++ head/share/man/man4/ath.4 Tue Jan 12 17:59:58 2010 (r202161) @@ -249,7 +249,7 @@ This should not happen. An invalid transmit rate was specified for an outgoing frame. The frame is discarded. This should not happen. -.It "ath%d: ath_chan_set: unable to reset channel %u (%u Mhz)" +.It "ath%d: ath_chan_set: unable to reset channel %u (%u MHz)" The Atheros Hardware Access Layer was unable to reset the hardware when switching channels during scanning. This should not happen. Modified: head/share/man/man4/cpufreq.4 ============================================================================== --- head/share/man/man4/cpufreq.4 Tue Jan 12 17:50:26 2010 (r202160) +++ head/share/man/man4/cpufreq.4 Tue Jan 12 17:59:58 2010 (r202161) @@ -234,7 +234,7 @@ The driver should set unknown or irrelev All the following elements for each setting should be returned: .Bd -literal struct cf_setting { - int freq; /* CPU clock in Mhz or 100ths of a percent. */ + int freq; /* CPU clock in MHz or 100ths of a percent. */ int volts; /* Voltage in mV. */ int power; /* Power consumed in mW. */ int lat; /* Transition latency in us. */ Modified: head/share/man/man4/vge.4 ============================================================================== --- head/share/man/man4/vge.4 Tue Jan 12 17:50:26 2010 (r202160) +++ head/share/man/man4/vge.4 Tue Jan 12 17:59:58 2010 (r202161) @@ -58,7 +58,7 @@ driver provides support for various NICs based on the VIA Technologies VT6120, VT6122, VT6130 and VT6132 Velocity Family Gigabit Ethernet controller chips. .Pp -The VT6120/VT6122 is a 33/66Mhz 64-bit PCI device which combines a tri-speed +The VT6120/VT6122 is a 33/66MHz 64-bit PCI device which combines a tri-speed MAC with an integrated 10/100/1000 copper PHY. (Some older cards use an external PHY.) The VT6130/VT6132 is the PCI express version of Velocity family. Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Tue Jan 12 17:50:26 2010 (r202160) +++ head/sys/amd64/amd64/local_apic.c Tue Jan 12 17:59:58 2010 (r202161) @@ -448,7 +448,7 @@ lapic_setup_clock(void) panic("lapic: Divisor too big"); value /= 2; if (bootverbose) - printf("lapic: Divisor %lu, Frequency %lu hz\n", + printf("lapic: Divisor %lu, Frequency %lu Hz\n", lapic_timer_divisor, value); /* Modified: head/sys/dev/aic7xxx/aic79xx_pci.c ============================================================================== --- head/sys/dev/aic7xxx/aic79xx_pci.c Tue Jan 12 17:50:26 2010 (r202160) +++ head/sys/dev/aic7xxx/aic79xx_pci.c Tue Jan 12 17:59:58 2010 (r202161) @@ -248,10 +248,10 @@ static const char *pci_bus_modes[] = "PCI bus mode unknown", "PCI bus mode unknown", "PCI bus mode unknown", - "PCI-X 101-133Mhz", - "PCI-X 67-100Mhz", - "PCI-X 50-66Mhz", - "PCI 33 or 66Mhz" + "PCI-X 101-133MHz", + "PCI-X 67-100MHz", + "PCI-X 50-66MHz", + "PCI 33 or 66MHz" }; #define TESTMODE 0x00000800ul Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Tue Jan 12 17:50:26 2010 (r202160) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Tue Jan 12 17:59:58 2010 (r202161) @@ -87,7 +87,7 @@ ar5210Reset(struct ath_hal *ah, HAL_OPMO if (!IEEE80211_IS_CHAN_5GHZ(chan)) { /* Only 11a mode */ - HALDEBUG(ah, HAL_DEBUG_ANY, "%s: channel not 5Ghz\n", __func__); + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: channel not 5GHz\n", __func__); FAIL(HAL_EINVAL); } /* Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Jan 12 17:50:26 2010 (r202160) +++ head/sys/dev/ath/if_ath.c Tue Jan 12 17:59:58 2010 (r202161) @@ -5351,7 +5351,7 @@ ath_chan_set(struct ath_softc *sc, struc ath_stoprecv(sc); /* turn off frame recv */ if (!ath_hal_reset(ah, sc->sc_opmode, chan, AH_TRUE, &status)) { if_printf(ifp, "%s: unable to reset " - "channel %u (%u Mhz, flags 0x%x), hal status %u\n", + "channel %u (%u MHz, flags 0x%x), hal status %u\n", __func__, ieee80211_chan2ieee(ic, chan), chan->ic_freq, chan->ic_flags, status); return EIO; Modified: head/sys/dev/ct/ct_isa.c ============================================================================== --- head/sys/dev/ct/ct_isa.c Tue Jan 12 17:50:26 2010 (r202160) +++ head/sys/dev/ct/ct_isa.c Tue Jan 12 17:59:58 2010 (r202161) @@ -316,7 +316,7 @@ ct_isa_attach(device_t dev) break; } #if 0 - printf("%s: chiprev %s chipclk %d Mhz\n", + printf("%s: chiprev %s chipclk %d MHz\n", slp->sl_dev.dv_xname, s, ct->sc_chipclk); #endif Modified: head/sys/dev/mly/mly.c ============================================================================== --- head/sys/dev/mly/mly.c Tue Jan 12 17:50:26 2010 (r202160) +++ head/sys/dev/mly/mly.c Tue Jan 12 17:59:58 2010 (r202161) @@ -2528,7 +2528,7 @@ mly_describe_controller(struct mly_softc mly_describe_code(mly_table_memorytype, mi->memory_type), mi->memory_parity ? "+parity": "",mi->memory_ecc ? "+ECC": "", mi->cache_size); - mly_printf(sc, "CPU: %s @ %dMHZ\n", + mly_printf(sc, "CPU: %s @ %dMHz\n", mly_describe_code(mly_table_cputype, mi->cpu[0].type), mi->cpu[0].speed); if (mi->l2cache_size != 0) mly_printf(sc, "%dKB L2 cache\n", mi->l2cache_size); Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Tue Jan 12 17:50:26 2010 (r202160) +++ head/sys/i386/i386/local_apic.c Tue Jan 12 17:59:58 2010 (r202161) @@ -450,7 +450,7 @@ lapic_setup_clock(void) panic("lapic: Divisor too big"); value /= 2; if (bootverbose) - printf("lapic: Divisor %lu, Frequency %lu hz\n", + printf("lapic: Divisor %lu, Frequency %lu Hz\n", lapic_timer_divisor, value); /* Modified: head/tools/tools/ath/athdecode/main.c ============================================================================== --- head/tools/tools/ath/athdecode/main.c Tue Jan 12 17:50:26 2010 (r202160) +++ head/tools/tools/ath/athdecode/main.c Tue Jan 12 17:59:58 2010 (r202161) @@ -125,13 +125,13 @@ opmark(FILE *fd, int i, const struct ath fprintf(fd, "ar%uReset (done), OK", state.chipnum); break; case AH_MARK_CHIPRESET: - fprintf(fd, "ar%uChipReset, channel %u Mhz", state.chipnum, r->val); + fprintf(fd, "ar%uChipReset, channel %u MHz", state.chipnum, r->val); break; case AH_MARK_PERCAL: - fprintf(fd, "ar%uPerCalibration, channel %u Mhz", state.chipnum, r->val); + fprintf(fd, "ar%uPerCalibration, channel %u MHz", state.chipnum, r->val); break; case AH_MARK_SETCHANNEL: - fprintf(fd, "ar%uSetChannel, channel %u Mhz", state.chipnum, r->val); + fprintf(fd, "ar%uSetChannel, channel %u MHz", state.chipnum, r->val); break; case AH_MARK_ANI_RESET: switch (r->val) { From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 18:07:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A4961065672; Tue, 12 Jan 2010 18:07:13 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC6498FC12; Tue, 12 Jan 2010 18:07:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CI7CMN060432; Tue, 12 Jan 2010 18:07:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CI7CQ5060429; Tue, 12 Jan 2010 18:07:12 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001121807.o0CI7CQ5060429@svn.freebsd.org> From: Christian Brueffer Date: Tue, 12 Jan 2010 18:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202162 - head/share/man/man3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 18:07:13 -0000 Author: brueffer Date: Tue Jan 12 18:07:12 2010 New Revision: 202162 URL: http://svn.freebsd.org/changeset/base/202162 Log: Various fixes. Modified: head/share/man/man3/pthread_affinity_np.3 head/share/man/man3/pthread_attr_affinity_np.3 Modified: head/share/man/man3/pthread_affinity_np.3 ============================================================================== --- head/share/man/man3/pthread_affinity_np.3 Tue Jan 12 17:59:58 2010 (r202161) +++ head/share/man/man3/pthread_affinity_np.3 Tue Jan 12 18:07:12 2010 (r202162) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd January 12, 2010 .Dt PTHREAD_AFFINITY_NP 3 .Os .Sh NAME @@ -44,17 +44,17 @@ .Fn pthread_getaffinity_np and .Fn pthread_setaffinity_np -allow the manipulation of sets of CPUs available to specified thread. +allow the manipulation of sets of CPUs available to the specified thread. .Pp Masks of type .Ft cpuset_t are composed using the -.Xr CPU_SET 2 +.Xr CPU_SET 3 macros. The kernel tolerates large sets as long as all CPUs specified in the set exist. Sets smaller than the kernel uses generate an error on calls to -.Fn pthread_getaffinity_np +.Fn pthread_getaffinity_np even if the result set would fit within the user supplied set. Calls to .Fn pthread_setaffinity_np @@ -75,14 +75,13 @@ retrieves the mask from the thread specified by .Fa td , and stores it in the space provided by -.Fa cpumaskp . +.Fa cpusetp . .Pp .Fn pthread_setaffinity_np attempts to set the mask for the thread specified by .Fa td to the value in -.Fa cpumaskp . -.Pp +.Fa cpusetp . .Sh RETURN VALUES If successful, the .Fn pthread_getaffinity_np @@ -105,7 +104,7 @@ call would leave a thread without a vali does not overlap with the thread's anonymous mask. .It Bq Er EFAULT The -.Fa cpumaskp +.Fa cpusetp pointer passed was invalid. .It Bq Er ESRCH The thread specified by the @@ -127,7 +126,7 @@ operation. .Xr CPU_SET 3 , .Xr pthread 3 , .Xr pthread_attr_get_affinity_np 3 , -.Xr pthread_attr_set_affinity_np 3 . +.Xr pthread_attr_set_affinity_np 3 .Sh STANDARDS The .Nm pthread_getaffinity_np Modified: head/share/man/man3/pthread_attr_affinity_np.3 ============================================================================== --- head/share/man/man3/pthread_attr_affinity_np.3 Tue Jan 12 17:59:58 2010 (r202161) +++ head/share/man/man3/pthread_attr_affinity_np.3 Tue Jan 12 18:07:12 2010 (r202162) @@ -31,7 +31,7 @@ .Sh NAME .Nm pthread_attr_getaffinity_np , .Nm pthread_attr_setaffinity_np -.Nd manage CPU affinity in thread attribute object +.Nd manage CPU affinity in thread attribute objects .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS @@ -41,20 +41,21 @@ .Ft int .Fn pthread_attr_setaffinity_np "pthread_attr_t *pattr" "size_t cpusetsize" "const cpuset_t *cpusetp" .Sh DESCRIPTION +The .Fn pthread_attr_getaffinity_np and .Fn pthread_attr_setaffinity_np -allow the manipulation of sets of CPUs available to specified thread attribute object. +functions allow the manipulation of sets of CPUs available to the specified thread attribute object. .Pp Masks of type .Ft cpuset_t are composed using the -.Xr CPU_SET 2 +.Xr CPU_SET 3 macros. The kernel tolerates large sets as long as all CPUs specified in the set exist. Sets smaller than the kernel uses generate an error on calls to -.Fn pthread_attr_getaffinity_np +.Fn pthread_attr_getaffinity_np even if the result set would fit within the user supplied set. Calls to .Fn pthread_attr_setaffinity_np @@ -75,14 +76,13 @@ retrieves the mask from the thread attribute object specified by .Fa pattr , and stores it in the space provided by -.Fa cpumaskp . +.Fa cpusetp . .Pp .Fn pthread_attr_setaffinity_np -set the mask for the thread attribute object specified by +sets the mask for the thread attribute object specified by .Fa pattr to the value in -.Fa cpumaskp . -.Pp +.Fa cpusetp . .Sh RETURN VALUES If successful, the .Fn pthread_attr_getaffinity_np @@ -101,7 +101,8 @@ functions will fail if: .It Bq Er EINVAL The .Fa pattr -or the attribute specified by it is NULL. +or the attribute specified by it is +.Dv NULL . .El .Pp The @@ -111,7 +112,8 @@ function will fail if: .It Bq Er EINVAL The .Fa pattr -or the attribute specified by it is NULL. +or the attribute specified by it is +.Dv NULL . .It Bq Er ENOMEM Insufficient memory exists to store the cpuset mask. .El @@ -122,7 +124,7 @@ Insufficient memory exists to store the .Xr cpuset_setid 2 , .Xr CPU_SET 3 , .Xr pthread_get_affinity_np 3 , -.Xr pthread_set_affinity_np 3 . +.Xr pthread_set_affinity_np 3 .Sh STANDARDS The .Nm pthread_attr_getaffinity_np From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 18:20:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC7721065692; Tue, 12 Jan 2010 18:20:20 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBCB78FC19; Tue, 12 Jan 2010 18:20:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CIKKqA063408; Tue, 12 Jan 2010 18:20:20 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CIKKlL063406; Tue, 12 Jan 2010 18:20:20 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001121820.o0CIKKlL063406@svn.freebsd.org> From: Brooks Davis Date: Tue, 12 Jan 2010 18:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202163 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 18:20:21 -0000 Author: brooks Date: Tue Jan 12 18:20:20 2010 New Revision: 202163 URL: http://svn.freebsd.org/changeset/base/202163 Log: Declare the kern.ngroups sysctl to be read-only, but tunable at boot for better error reporting. Submitted by: Matthew Fleming MFC After: 1 month Modified: head/sys/kern/kern_mib.c Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Tue Jan 12 18:07:12 2010 (r202162) +++ head/sys/kern/kern_mib.c Tue Jan 12 18:20:20 2010 (r202163) @@ -124,7 +124,7 @@ SYSCTL_INT(_kern, KERN_ARGMAX, argmax, C SYSCTL_INT(_kern, KERN_POSIX1, posix1version, CTLFLAG_RD, 0, _POSIX_VERSION, "Version of POSIX attempting to comply to"); -SYSCTL_INT(_kern, KERN_NGROUPS, ngroups, CTLFLAG_RD, +SYSCTL_INT(_kern, KERN_NGROUPS, ngroups, CTLFLAG_RDTUN, &ngroups_max, 0, "Maximum number of supplemental groups a user can belong to"); From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 18:47:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F8871065672; Tue, 12 Jan 2010 18:47:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E1318FC14; Tue, 12 Jan 2010 18:47:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CIleCO069478; Tue, 12 Jan 2010 18:47:40 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CIlewX069476; Tue, 12 Jan 2010 18:47:40 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001121847.o0CIlewX069476@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Jan 2010 18:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202164 - stable/8/usr.sbin/arp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 18:47:41 -0000 Author: jhb Date: Tue Jan 12 18:47:40 2010 New Revision: 202164 URL: http://svn.freebsd.org/changeset/base/202164 Log: MFC 201202: Use reallocf() to simplify some logic. Modified: stable/8/usr.sbin/arp/arp.c Directory Properties: stable/8/usr.sbin/arp/ (props changed) Modified: stable/8/usr.sbin/arp/arp.c ============================================================================== --- stable/8/usr.sbin/arp/arp.c Tue Jan 12 18:20:20 2010 (r202163) +++ stable/8/usr.sbin/arp/arp.c Tue Jan 12 18:47:40 2010 (r202164) @@ -499,7 +499,7 @@ search(u_long addr, action_fn *action) { int mib[6]; size_t needed; - char *lim, *buf, *newbuf, *next; + char *lim, *buf, *next; struct rt_msghdr *rtm; struct sockaddr_inarp *sin2; struct sockaddr_dl *sdl; @@ -522,13 +522,9 @@ search(u_long addr, action_fn *action) return 0; buf = NULL; for (;;) { - newbuf = realloc(buf, needed); - if (newbuf == NULL) { - if (buf != NULL) - free(buf); + buf = reallocf(buf, needed); + if (buf == NULL) errx(1, "could not reallocate memory"); - } - buf = newbuf; st = sysctl(mib, 6, buf, &needed, NULL, 0); if (st == 0 || errno != ENOMEM) break; From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 18:47:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9774110656C0; Tue, 12 Jan 2010 18:47:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85ED28FC08; Tue, 12 Jan 2010 18:47:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CIlq25069548; Tue, 12 Jan 2010 18:47:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CIlqw6069546; Tue, 12 Jan 2010 18:47:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001121847.o0CIlqw6069546@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Jan 2010 18:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202165 - stable/7/usr.sbin/arp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 18:47:52 -0000 Author: jhb Date: Tue Jan 12 18:47:52 2010 New Revision: 202165 URL: http://svn.freebsd.org/changeset/base/202165 Log: MFC 201202: Use reallocf() to simplify some logic. Modified: stable/7/usr.sbin/arp/arp.c Directory Properties: stable/7/usr.sbin/arp/ (props changed) Modified: stable/7/usr.sbin/arp/arp.c ============================================================================== --- stable/7/usr.sbin/arp/arp.c Tue Jan 12 18:47:40 2010 (r202164) +++ stable/7/usr.sbin/arp/arp.c Tue Jan 12 18:47:52 2010 (r202165) @@ -472,7 +472,7 @@ search(u_long addr, action_fn *action) { int mib[6]; size_t needed; - char *lim, *buf, *newbuf, *next; + char *lim, *buf, *next; struct rt_msghdr *rtm; struct sockaddr_inarp *sin2; struct sockaddr_dl *sdl; @@ -491,13 +491,9 @@ search(u_long addr, action_fn *action) return 0; buf = NULL; for (;;) { - newbuf = realloc(buf, needed); - if (newbuf == NULL) { - if (buf != NULL) - free(buf); + buf = reallocf(buf, needed); + if (buf == NULL) errx(1, "could not reallocate memory"); - } - buf = newbuf; st = sysctl(mib, 6, buf, &needed, NULL, 0); if (st == 0 || errno != ENOMEM) break; From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 19:41:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66F9810656A3; Tue, 12 Jan 2010 19:41:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5645D8FC17; Tue, 12 Jan 2010 19:41:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CJf7Tb081418; Tue, 12 Jan 2010 19:41:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CJf7qm081416; Tue, 12 Jan 2010 19:41:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001121941.o0CJf7qm081416@svn.freebsd.org> From: Alexander Motin Date: Tue, 12 Jan 2010 19:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202166 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 19:41:09 -0000 Author: mav Date: Tue Jan 12 19:41:07 2010 New Revision: 202166 URL: http://svn.freebsd.org/changeset/base/202166 Log: Make default recording source choosing more intelligent. Change default recording level from 0 to 75. It should increase chances for things to work just out of the box. Modified: head/sys/dev/sound/pcm/mixer.c Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Tue Jan 12 18:47:52 2010 (r202165) +++ head/sys/dev/sound/pcm/mixer.c Tue Jan 12 19:41:07 2010 (r202166) @@ -87,7 +87,7 @@ static u_int16_t snd_mixerdefaults[SOUND [SOUND_MIXER_IGAIN] = 0, [SOUND_MIXER_LINE1] = 75, [SOUND_MIXER_VIDEO] = 75, - [SOUND_MIXER_RECLEV] = 0, + [SOUND_MIXER_RECLEV] = 75, [SOUND_MIXER_OGAIN] = 50, [SOUND_MIXER_MONITOR] = 75, }; @@ -352,7 +352,13 @@ mixer_setrecsrc(struct snd_mixer *mixer, dropmtx = 0; src &= mixer->recdevs; if (src == 0) - src = SOUND_MASK_MIC; + src = mixer->recdevs & SOUND_MASK_MIC; + if (src == 0) + src = mixer->recdevs & SOUND_MASK_MONITOR; + if (src == 0) + src = mixer->recdevs & SOUND_MASK_LINE; + if (src == 0 && mixer->recdevs != 0) + src = (1 << (ffs(mixer->recdevs) - 1)); /* It is safe to drop this mutex due to Giant. */ MIXER_SET_UNLOCK(mixer, dropmtx); recsrc = MIXER_SETRECSRC(mixer, src); @@ -716,7 +722,7 @@ mixer_init(device_t dev, kobj_class_t cl mixer_set(m, i, v | (v << 8)); } - mixer_setrecsrc(m, SOUND_MASK_MIC); + mixer_setrecsrc(m, 0); /* Set default input. */ unit = device_get_unit(dev); devunit = snd_mkunit(unit, SND_DEV_CTL, 0); From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 19:55:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8D6B106566C; Tue, 12 Jan 2010 19:55:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 964128FC18; Tue, 12 Jan 2010 19:55:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CJt7T7084551; Tue, 12 Jan 2010 19:55:07 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CJt7Ym084546; Tue, 12 Jan 2010 19:55:07 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001121955.o0CJt7Ym084546@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Jan 2010 19:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202167 - in stable/8: etc etc/defaults share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 19:55:07 -0000 Author: jhb Date: Tue Jan 12 19:55:07 2010 New Revision: 202167 URL: http://svn.freebsd.org/changeset/base/202167 Log: MFC 201215: Add support for configuring vlan(4) interfaces as child devices similar to wlan(4) interfaces. vlan(4) interfaces are listed via a new 'vlans_' variable. If a vlan interface is a number, then that number is treated as the vlan tag for the interface and the interface will be named '.'. Otherwise, the vlan tag must be provided via a vlan parameter in a 'create_args_' variable. While I'm here, fix a few nits in rc.conf(5) and mention create_args_ in the description of cloned_interfaces. Modified: stable/8/etc/defaults/rc.conf stable/8/etc/network.subr stable/8/share/man/man5/rc.conf.5 Directory Properties: stable/8/etc/ (props changed) stable/8/share/man/man5/ (props changed) Modified: stable/8/etc/defaults/rc.conf ============================================================================== --- stable/8/etc/defaults/rc.conf Tue Jan 12 19:41:07 2010 (r202166) +++ stable/8/etc/defaults/rc.conf Tue Jan 12 19:55:07 2010 (r202167) @@ -198,6 +198,8 @@ ifconfig_lo0="inet 127.0.0.1" # default #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry. #ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry. #ifconfig_fxp0_name="net0" # Change interface name from fxp0 to net0. +#vlans_fxp0="101 vlan0" # vlan(4) interfaces for fxp0 device +#create_arg_vlan0="vlan 102" # vlan tag for vlan0 device #wlans_ath0="wlan0" # wlan(4) interfaces for ath0 device #wlandebug_wlan0="scan+auth+assoc" # Set debug flags with wlanddebug(8) #ipv4_addrs_fxp0="192.168.0.1/24 192.168.1.1-5/28" # example IPv4 address entry. Modified: stable/8/etc/network.subr ============================================================================== --- stable/8/etc/network.subr Tue Jan 12 19:41:07 2010 (r202166) +++ stable/8/etc/network.subr Tue Jan 12 19:55:07 2010 (r202167) @@ -46,7 +46,7 @@ ifn_start() ifconfig_up ${ifn} && cfg=0 ipv4_up ${ifn} && cfg=0 ipx_up ${ifn} && cfg=0 - childif_create ${ifn} + childif_create ${ifn} && cfg=0 return $cfg } @@ -67,7 +67,7 @@ ifn_stop() ipv4_down ${ifn} && cfg=0 ifconfig_down ${ifn} && cfg=0 ifscript_down ${ifn} && cfg=0 - childif_destroy ${ifn} + childif_destroy ${ifn} && cfg=0 return $cfg } @@ -530,7 +530,7 @@ clone_down() # childif_create() { - local cfg child child_wlans create_args debug_flags ifn i + local cfg child child_vlans child_wlans create_args debug_flags ifn i cfg=1 ifn=$1 @@ -559,6 +559,32 @@ childif_create() fi done + # Create vlan interfaces + child_vlans=`get_if_var $ifn vlans_IF` + + if [ -n "${child_vlans}" ]; then + load_kld if_vlan + fi + + for child in ${child_vlans}; do + if expr $child : '[1-9][0-9]*$' >/dev/null 2>&1; then + child="${ifn}.${child}" + create_args=`get_if_var $child create_args_IF` + ifconfig $child create ${create_args} && cfg=0 + else + create_args="vlandev $ifn `get_if_var $child create_args_IF`" + if expr $child : 'vlan[0-9][0-9]*$' >/dev/null 2>&1; then + ifconfig $child create ${create_args} && cfg=0 + else + i=`ifconfig vlan create ${create_args}` + ifconfig $i name $child && cfg=0 + fi + fi + if autoif $child; then + ifn_start $child + fi + done + return ${cfg} } @@ -566,12 +592,34 @@ childif_create() # childif_destroy() { - local cfg child child_wlans ifn + local cfg child child_vlans child_wlans ifn child_wlans=`get_if_var $ifn wlans_IF` for child in ${child_wlans}; do + if ! ifexists $child; then + continue + fi + if autoif $child; then + ifn_stop $child + fi ifconfig $child destroy && cfg=0 done + + child_vlans=`get_if_var $ifn vlans_IF` + for child in ${child_vlans}; do + if expr $child : '[1-9][0-9]*$' >/dev/null 2>&1; then + child="${ifn}.${child}" + fi + if ! ifexists $child; then + continue + fi + if autoif $child; then + ifn_stop $child + fi + ifconfig $child destroy && cfg=0 + done + + return ${cfg} } # Create netgraph nodes. Modified: stable/8/share/man/man5/rc.conf.5 ============================================================================== --- stable/8/share/man/man5/rc.conf.5 Tue Jan 12 19:41:07 2010 (r202166) +++ stable/8/share/man/man5/rc.conf.5 Tue Jan 12 19:55:07 2010 (r202167) @@ -1161,6 +1161,45 @@ and variables. .Pp If a +.Va vlans_ Ns Aq Ar interface +variable is set, +a +.Xr vlan 4 +interface will be created for each item in the list with the +.Ar vlandev +argument set to +.Ar interface . +If a vlan interface's name is a number, +then that number is used as the vlan tag and the new vlan interface is +named +.Ar interface . Ns Ar tag . +Otherwise, +the vlan tag must be specified via a +.Va vlan +parameter in the +.Va create_args_ Ns Aq Ar interface +variable. +.Pp +To create a vlan device named +.Li em0.101 +on +.Li em0 +with the vlan tag 101: +.Bd -literal +vlans_em0="101" +.Ed +.Pp +To create a vlan device named +.Li myvlan +on +.Li em0 +with the vlan tag 102: +.Bd -literal +vlans_em0="myvlan" +create_args_myvlan="vlan 102" +.Ed +.Pp +If a .Va wlans_ Ns Aq Ar interface variable is set, an @@ -1227,7 +1266,7 @@ Finally, you can add options in this variable, in addition to the .Pa /etc/start_if. Ns Aq Ar interface file. -For instance, configure an +For instance, to configure an .Xr ath 4 wireless device in station mode with an address obtained via DHCP, using WPA authentication and 802.11b mode, it is @@ -1249,7 +1288,7 @@ This is intended to replace the no longe .Va pccard_ifconfig variable. .Pp -It is also possible to rename interface by doing: +It is also possible to rename an interface by doing: .Bd -literal ifconfig_ed0_name="net0" ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00" @@ -1286,6 +1325,12 @@ Now this works only for IPv6 link local .It Va cloned_interfaces .Pq Vt str Set to the list of clonable network interfaces to create on this host. +Further cloning arguments may be passed to the +.Xr ifconfig 8 +.Cm create +command for each interface by setting the +.Va create_args_ Ns Aq Ar interface +variable. Entries in .Va cloned_interfaces are automatically appended to From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 20:06:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 667DB10656A4; Tue, 12 Jan 2010 20:06:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53E458FC13; Tue, 12 Jan 2010 20:06:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CK64Ov087060; Tue, 12 Jan 2010 20:06:04 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CK64Jm087055; Tue, 12 Jan 2010 20:06:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001122006.o0CK64Jm087055@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Jan 2010 20:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202169 - in stable/7: etc etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 20:06:04 -0000 Author: jhb Date: Tue Jan 12 20:06:04 2010 New Revision: 202169 URL: http://svn.freebsd.org/changeset/base/202169 Log: MFC 201215: Add support for configuring vlan(4) interfaces as child devices similar to wlan(4) interfaces. vlan(4) interfaces are listed via a new 'vlans_' variable. If a vlan interface is a number, then that number is treated as the vlan tag for the interface and the interface will be named '.'. Otherwise, the vlan tag must be provided via a vlan parameter in a 'create_args_' variable. While I'm here, fix a few nits in rc.conf(5) and mention create_args_ in the description of cloned_interfaces. The changes for 7.x are a bit larger as they introduce childif_create() and childif_destroy() and move ifn_start() and ifn_stop() from rc.d/netif to network.subr. Modified: stable/7/etc/defaults/rc.conf stable/7/etc/network.subr stable/7/etc/rc.d/netif stable/7/share/man/man5/rc.conf.5 (contents, props changed) Directory Properties: stable/7/etc/ (props changed) stable/7/share/man/man5/ (props changed) Modified: stable/7/etc/defaults/rc.conf ============================================================================== --- stable/7/etc/defaults/rc.conf Tue Jan 12 19:59:54 2010 (r202168) +++ stable/7/etc/defaults/rc.conf Tue Jan 12 20:06:04 2010 (r202169) @@ -192,6 +192,8 @@ ifconfig_lo0="inet 127.0.0.1" # default #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry. #ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry. #ifconfig_fxp0_name="net0" # Change interface name from fxp0 to net0. +#vlans_fxp0="101 vlan0" # vlan(4) interfaces for fxp0 device +#create_arg_vlan0="vlan 102" # vlan tag for vlan0 device #ipv4_addrs_fxp0="192.168.0.1/24 192.168.1.1-5/28" # example IPv4 address entry. # #autobridge_interfaces="bridge0" # List of bridges to check Modified: stable/7/etc/network.subr ============================================================================== --- stable/7/etc/network.subr Tue Jan 12 19:59:54 2010 (r202168) +++ stable/7/etc/network.subr Tue Jan 12 20:06:04 2010 (r202169) @@ -30,6 +30,48 @@ # Requires that rc.conf be loaded first. # +# ifn_start ifn +# Bring up and configure an interface. If some configuration is +# applied print the interface configuration. +# +ifn_start() +{ + local ifn cfg + ifn="$1" + cfg=1 + + [ -z "$ifn" ] && err 1 "ifn_start called without an interface" + + ifscript_up ${ifn} && cfg=0 + ifconfig_up ${ifn} && cfg=0 + ipv4_up ${ifn} && cfg=0 + ipx_up ${ifn} && cfg=0 + childif_create ${ifn} && cfg=0 + + return $cfg +} + +# ifn_stop ifn +# Shutdown and de-configure an interface. If action is taken +# print the interface name. +# +ifn_stop() +{ + local ifn cfg + ifn="$1" + cfg=1 + + [ -z "$ifn" ] && err 1 "ifn_stop called without an interface" + + ipx_down ${ifn} && cfg=0 + ipv4_down ${ifn} && cfg=0 + ifconfig_down ${ifn} && cfg=0 + ifscript_down ${ifn} && cfg=0 + childif_destroy ${ifn} && cfg=0 + + return $cfg +} + # ifconfig_up if # Evaluate ifconfig(8) arguments for interface $if and # run ifconfig(8) with those arguments. It returns 0 if @@ -452,6 +494,70 @@ clone_down() debug "Destroyed clones: ${_list}" } +# childif_create +# Create and configure child interfaces. Return 0 if child +# interfaces are created. +# +childif_create() +{ + local cfg child child_vlans create_args ifn i + cfg=1 + ifn=$1 + + # Create vlan interfaces + child_vlans=`get_if_var $ifn vlans_IF` + + if [ -n "${child_vlans}" ]; then + load_kld if_vlan + fi + + for child in ${child_vlans}; do + if expr $child : '[1-9][0-9]*$' >/dev/null 2>&1; then + child="${ifn}.${child}" + create_args=`get_if_var $child create_args_IF` + ifconfig $child create ${create_args} && cfg=0 + else + create_args="vlandev $ifn `get_if_var $child create_args_IF`" + if expr $child : 'vlan[0-9][0-9]*$' >/dev/null 2>&1; then + ifconfig $child create ${create_args} && cfg=0 + else + i=`ifconfig vlan create ${create_args}` + ifconfig $i name $child && cfg=0 + fi + fi + if autoif $child; then + ifn_start $child + fi + done + + return ${cfg} +} + +# childif_destroy +# Destroy child interfaces. +# +childif_destroy() +{ + local cfg child child_vlans ifn + cfg=1 + + child_vlans=`get_if_var $ifn vlans_IF` + for child in ${child_vlans}; do + if expr $child : '[1-9][0-9]*$' >/dev/null 2>&1; then + child="${ifn}.${child}" + fi + if ! ifexists $child; then + continue + fi + if autoif $child; then + ifn_stop $child + fi + ifconfig $child destroy && cfg=0 + done + + return ${cfg} +} + # Create netgraph nodes. # ng_mkpeer() { Modified: stable/7/etc/rc.d/netif ============================================================================== --- stable/7/etc/rc.d/netif Tue Jan 12 19:59:54 2010 (r202168) +++ stable/7/etc/rc.d/netif Tue Jan 12 20:06:04 2010 (r202169) @@ -149,37 +149,5 @@ network_common() debug "The following interfaces were not configured: $_fail" } -ifn_start() -{ - local ifn cfg - ifn="$1" - cfg=1 - - [ -z "$ifn" ] && return 1 - - ifscript_up ${ifn} && cfg=0 - ifconfig_up ${ifn} && cfg=0 - ipv4_up ${ifn} && cfg=0 - ipx_up ${ifn} && cfg=0 - - return $cfg -} - -ifn_stop() -{ - local ifn cfg - ifn="$1" - cfg=1 - - [ -z "$ifn" ] && return 1 - - ipx_down ${ifn} && cfg=0 - ipv4_down ${ifn} && cfg=0 - ifconfig_down ${ifn} && cfg=0 - ifscript_down ${ifn} && cfg=0 - - return $cfg -} - load_rc_config $name run_rc_command $* Modified: stable/7/share/man/man5/rc.conf.5 ============================================================================== --- stable/7/share/man/man5/rc.conf.5 Tue Jan 12 19:59:54 2010 (r202168) +++ stable/7/share/man/man5/rc.conf.5 Tue Jan 12 20:06:04 2010 (r202169) @@ -1149,6 +1149,45 @@ and .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n variables. .Pp +If a +.Va vlans_ Ns Aq Ar interface +variable is set, +a +.Xr vlan 4 +interface will be created for each item in the list with the +.Ar vlandev +argument set to +.Ar interface . +If a vlan interface's name is a number, +then that number is used as the vlan tag and the new vlan interface is +named +.Ar interface . Ns Ar tag . +Otherwise, +the vlan tag must be specified via a +.Va vlan +parameter in the +.Va create_args_ Ns Aq Ar interface +variable. +.Pp +To create a vlan device named +.Li em0.101 +on +.Li em0 +with the vlan tag 101: +.Bd -literal +vlans_em0="101" +.Ed +.Pp +To create a vlan device named +.Li myvlan +on +.Li em0 +with the vlan tag 102: +.Bd -literal +vlans_em0="myvlan" +create_args_myvlan="vlan 102" +.Ed +.Pp If the .Va ifconfig_ Ns Aq Ar interface contains the keyword @@ -1205,7 +1244,7 @@ This is intended to replace the no longe .Va pccard_ifconfig variable. .Pp -It is also possible to rename interface by doing: +It is also possible to rename an interface by doing: .Bd -literal ifconfig_ed0_name="net0" ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00" @@ -1242,6 +1281,12 @@ Now this works only for IPv6 link local .It Va cloned_interfaces .Pq Vt str Set to the list of clonable network interfaces to create on this host. +Further cloning arguments may be passed to the +.Xr ifconfig 8 +.Cm create +command for each interface by setting the +.Va create_args_ Ns Aq Ar interface +variable. Entries in .Va cloned_interfaces are automatically appended to From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 20:10:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6C9B106566C; Tue, 12 Jan 2010 20:10:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9609A8FC13; Tue, 12 Jan 2010 20:10:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CKAeif088102; Tue, 12 Jan 2010 20:10:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CKAedA088100; Tue, 12 Jan 2010 20:10:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001122010.o0CKAedA088100@svn.freebsd.org> From: Alexander Motin Date: Tue, 12 Jan 2010 20:10:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202170 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 20:10:40 -0000 Author: mav Date: Tue Jan 12 20:10:40 2010 New Revision: 202170 URL: http://svn.freebsd.org/changeset/base/202170 Log: Make OSS_GETVERSION ioctl supported also for DSP devices, same as 4Front and Linux do. MFC after: 1 month Modified: head/sys/dev/sound/pcm/dsp.c Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Tue Jan 12 20:06:04 2010 (r202169) +++ head/sys/dev/sound/pcm/dsp.c Tue Jan 12 20:10:40 2010 (r202170) @@ -1069,6 +1069,10 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd chn = NULL; if (IOCGROUP(cmd) == 'M') { + if (cmd == OSS_GETVERSION) { + *arg_i = SOUND_VERSION; + return (0); + } ret = dsp_ioctl_channel(i_dev, PCM_VOLCH(i_dev), cmd, arg); if (ret != -1) { PCM_GIANT_EXIT(d); From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 20:52:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3400E1065670; Tue, 12 Jan 2010 20:52:42 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22CCE8FC31; Tue, 12 Jan 2010 20:52:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CKqgdA097385; Tue, 12 Jan 2010 20:52:42 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CKqgUJ097383; Tue, 12 Jan 2010 20:52:42 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001122052.o0CKqgUJ097383@svn.freebsd.org> From: Rui Paulo Date: Tue, 12 Jan 2010 20:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202171 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 20:52:42 -0000 Author: rpaulo Date: Tue Jan 12 20:52:41 2010 New Revision: 202171 URL: http://svn.freebsd.org/changeset/base/202171 Log: Fix svn properties and remove a P4 keyword. Modified: head/sys/mips/conf/SWARM (contents, props changed) Directory Properties: head/sys/mips/conf/ALCHEMY (props changed) head/sys/mips/conf/AR71XX (props changed) head/sys/mips/conf/AR71XX.hints (props changed) head/sys/mips/conf/SWARM.hints (props changed) head/sys/mips/conf/XLR (props changed) Modified: head/sys/mips/conf/SWARM ============================================================================== --- head/sys/mips/conf/SWARM Tue Jan 12 20:10:40 2010 (r202170) +++ head/sys/mips/conf/SWARM Tue Jan 12 20:52:41 2010 (r202171) @@ -1,5 +1,5 @@ # -# $Id: //depot/user/neelnatu/freebsd_sibyte/src/sys/mips/conf/SWARM#7 $ +# $FreeBSD$ # ident SWARM From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 20:55:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAEBC1065672; Tue, 12 Jan 2010 20:55:12 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90D758FC19; Tue, 12 Jan 2010 20:55:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CKtCaZ097983; Tue, 12 Jan 2010 20:55:12 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CKtCPp097981; Tue, 12 Jan 2010 20:55:12 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001122055.o0CKtCPp097981@svn.freebsd.org> From: Rui Paulo Date: Tue, 12 Jan 2010 20:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202172 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 20:55:12 -0000 Author: rpaulo Date: Tue Jan 12 20:55:12 2010 New Revision: 202172 URL: http://svn.freebsd.org/changeset/base/202172 Log: Add a regular comment explaining what this file is. Modified: head/sys/mips/conf/AR71XX Modified: head/sys/mips/conf/AR71XX ============================================================================== --- head/sys/mips/conf/AR71XX Tue Jan 12 20:52:41 2010 (r202171) +++ head/sys/mips/conf/AR71XX Tue Jan 12 20:55:12 2010 (r202172) @@ -1,4 +1,6 @@ # +# AR71XX -- Kernel configuration file for FreeBSD/mips for Atheros 71xx systems +# # $FreeBSD$ # From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 21:17:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF9C41065676; Tue, 12 Jan 2010 21:17:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCD9D8FC22; Tue, 12 Jan 2010 21:17:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CLHaKe003073; Tue, 12 Jan 2010 21:17:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CLHaLn003064; Tue, 12 Jan 2010 21:17:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001122117.o0CLHaLn003064@svn.freebsd.org> From: Warner Losh Date: Tue, 12 Jan 2010 21:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202173 - in head/sys/mips: alchemy atheros conf include mips rmi sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 21:17:36 -0000 Author: imp Date: Tue Jan 12 21:17:36 2010 New Revision: 202173 URL: http://svn.freebsd.org/changeset/base/202173 Log: Place proper svn:keywords tag on all these files. They were created somehow without them on projects/mips, and that mistake was propigated over to head. Submitted by: rpaulo@ Modified: head/sys/mips/conf/MALTA64 (contents, props changed) head/sys/mips/rmi/ehcireg.h (contents, props changed) head/sys/mips/rmi/ehcivar.h (contents, props changed) head/sys/mips/rmi/pcibus.c (contents, props changed) head/sys/mips/rmi/pcibus.h (contents, props changed) head/sys/mips/rmi/uart_bus_xlr_iodi.c (contents, props changed) head/sys/mips/rmi/xlr_i2c.c (contents, props changed) head/sys/mips/rmi/xls_ehci.c (contents, props changed) Directory Properties: head/sys/mips/alchemy/files.alchemy (props changed) head/sys/mips/alchemy/std.alchemy (props changed) head/sys/mips/atheros/apb.c (props changed) head/sys/mips/atheros/apbvar.h (props changed) head/sys/mips/atheros/ar71xx_bus_space_reversed.c (props changed) head/sys/mips/atheros/ar71xx_bus_space_reversed.h (props changed) head/sys/mips/atheros/ar71xx_ehci.c (props changed) head/sys/mips/atheros/ar71xx_machdep.c (props changed) head/sys/mips/atheros/ar71xx_ohci.c (props changed) head/sys/mips/atheros/ar71xx_pci.c (props changed) head/sys/mips/atheros/ar71xx_pci_bus_space.c (props changed) head/sys/mips/atheros/ar71xx_pci_bus_space.h (props changed) head/sys/mips/atheros/ar71xx_spi.c (props changed) head/sys/mips/atheros/ar71xx_wdog.c (props changed) head/sys/mips/atheros/ar71xxreg.h (props changed) head/sys/mips/atheros/files.ar71xx (props changed) head/sys/mips/atheros/if_arge.c (props changed) head/sys/mips/atheros/if_argevar.h (props changed) head/sys/mips/atheros/uart_bus_ar71xx.c (props changed) head/sys/mips/atheros/uart_cpu_ar71xx.c (props changed) head/sys/mips/conf/.cvsignore (props changed) head/sys/mips/include/fls64.h (props changed) head/sys/mips/mips/elf_trampoline.c (props changed) head/sys/mips/mips/inckern.S (props changed) head/sys/mips/mips/sys_machdep.c (props changed) head/sys/mips/rmi/interrupt.h (props changed) head/sys/mips/rmi/intr_machdep.c (props changed) head/sys/mips/rmi/iomap.h (props changed) head/sys/mips/rmi/msgring.c (props changed) head/sys/mips/rmi/msgring.cfg (props changed) head/sys/mips/rmi/msgring.h (props changed) head/sys/mips/rmi/msgring_xls.c (props changed) head/sys/mips/rmi/msgring_xls.cfg (props changed) head/sys/mips/rmi/on_chip.c (props changed) head/sys/mips/rmi/perfmon.h (props changed) head/sys/mips/rmi/perfmon_kern.c (props changed) head/sys/mips/rmi/perfmon_percpu.c (props changed) head/sys/mips/rmi/perfmon_utils.h (props changed) head/sys/mips/rmi/perfmon_xlrconfig.h (props changed) head/sys/mips/rmi/pic.h (props changed) head/sys/mips/rmi/rmi_mips_exts.h (props changed) head/sys/mips/rmi/rootfs_list.txt (props changed) head/sys/mips/rmi/shared_structs.h (props changed) head/sys/mips/rmi/shared_structs_func.h (props changed) head/sys/mips/rmi/shared_structs_offsets.h (props changed) head/sys/mips/rmi/std.xlr (props changed) head/sys/mips/rmi/tick.c (props changed) head/sys/mips/rmi/uart_cpu_mips_xlr.c (props changed) head/sys/mips/rmi/xlr_boot1_console.c (props changed) head/sys/mips/rmi/xlr_csum_nocopy.S (props changed) head/sys/mips/rmi/xlr_machdep.c (props changed) head/sys/mips/rmi/xlr_pci.c (props changed) head/sys/mips/rmi/xlrconfig.h (props changed) head/sys/mips/sibyte/files.sibyte (props changed) Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Tue Jan 12 20:55:12 2010 (r202172) +++ head/sys/mips/conf/MALTA64 Tue Jan 12 21:17:36 2010 (r202173) @@ -15,7 +15,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: projects/mips/sys/mips/conf/MALTA 192819 2009-05-26 17:01:12Z gonzo $ +# $FreeBSD$ ident MALTA Modified: head/sys/mips/rmi/ehcireg.h ============================================================================== --- head/sys/mips/rmi/ehcireg.h Tue Jan 12 20:55:12 2010 (r202172) +++ head/sys/mips/rmi/ehcireg.h Tue Jan 12 21:17:36 2010 (r202173) @@ -1,5 +1,5 @@ /* $NetBSD: ehcireg.h,v 1.18 2004/10/22 10:38:17 augustss Exp $ */ -/* $FreeBSD: src/sys/dev/usb/ehcireg.h,v 1.7.2.2.2.1 2008/10/02 02:57:24 kensmith Exp $ */ +/* $FreeBSD$ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. Modified: head/sys/mips/rmi/ehcivar.h ============================================================================== --- head/sys/mips/rmi/ehcivar.h Tue Jan 12 20:55:12 2010 (r202172) +++ head/sys/mips/rmi/ehcivar.h Tue Jan 12 21:17:36 2010 (r202173) @@ -1,5 +1,5 @@ /* $NetBSD: ehcivar.h,v 1.19 2005/04/29 15:04:29 augustss Exp $ */ -/* $FreeBSD: src/sys/dev/usb/ehcivar.h,v 1.9.2.1.8.1 2008/10/02 02:57:24 kensmith Exp $ */ +/* $FreeBSD$ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. Modified: head/sys/mips/rmi/pcibus.c ============================================================================== --- head/sys/mips/rmi/pcibus.c Tue Jan 12 20:55:12 2010 (r202172) +++ head/sys/mips/rmi/pcibus.c Tue Jan 12 21:17:36 2010 (r202173) @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.36 2005/01/05 20:05:52 imp Exp $"); +__FBSDID("$FreeBSD$"); #include "opt_isa.h" Modified: head/sys/mips/rmi/pcibus.h ============================================================================== --- head/sys/mips/rmi/pcibus.h Tue Jan 12 20:55:12 2010 (r202172) +++ head/sys/mips/rmi/pcibus.h Tue Jan 12 21:17:36 2010 (r202173) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/pci/pcibus.h,v 1.5 2002/02/28 18:18:41 gallatin Exp $ + * $FreeBSD$ */ #define DEFAULT_PCI_CONFIG_BASE 0x18000000 Modified: head/sys/mips/rmi/uart_bus_xlr_iodi.c ============================================================================== --- head/sys/mips/rmi/uart_bus_xlr_iodi.c Tue Jan 12 20:55:12 2010 (r202172) +++ head/sys/mips/rmi/uart_bus_xlr_iodi.c Tue Jan 12 21:17:36 2010 (r202173) @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/uart/uart_bus_iodi.c,v 1.6.2.5 2006/02/15 09:16:01 marius Exp $"); +__FBSDID("$FreeBSD$"); #include #include Modified: head/sys/mips/rmi/xlr_i2c.c ============================================================================== --- head/sys/mips/rmi/xlr_i2c.c Tue Jan 12 20:55:12 2010 (r202172) +++ head/sys/mips/rmi/xlr_i2c.c Tue Jan 12 21:17:36 2010 (r202173) @@ -29,7 +29,7 @@ * RMI_BSD */ #include -__FBSDID("$FreeBSD: src/sys/mips/xlr/xlr_i2c.c,v 1.20.8.1 2008/08/25 23:17:51 cognet Exp $"); +__FBSDID("$FreeBSD$"); /* * I2C driver for the Palm-BK3220 I2C Host adapter on the RMI XLR. Modified: head/sys/mips/rmi/xls_ehci.c ============================================================================== --- head/sys/mips/rmi/xls_ehci.c Tue Jan 12 20:55:12 2010 (r202172) +++ head/sys/mips/rmi/xls_ehci.c Tue Jan 12 21:17:36 2010 (r202173) @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.18.2.4 2008/04/23 18:54:51 jhb Exp $"); +__FBSDID("$FreeBSD$"); /* * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller. From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 21:36:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B74F31065695; Tue, 12 Jan 2010 21:36:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A31F78FC0C; Tue, 12 Jan 2010 21:36:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CLa89Y007215; Tue, 12 Jan 2010 21:36:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CLa8C6007214; Tue, 12 Jan 2010 21:36:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001122136.o0CLa8C6007214@svn.freebsd.org> From: Warner Losh Date: Tue, 12 Jan 2010 21:36:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202175 - in head/sys/mips: adm5120 alchemy atheros cavium conf idt include malta mips rmi rmi/dev/sec rmi/dev/xlr sentry5 sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 21:36:08 -0000 Author: imp Date: Tue Jan 12 21:36:08 2010 New Revision: 202175 URL: http://svn.freebsd.org/changeset/base/202175 Log: Set the svn:eol-style = native and svn:mime-type = text/plain properties on all files in this tree. Submitted by: rpaulo@ Modified: Directory Properties: head/sys/mips/adm5120/adm5120_machdep.c (props changed) head/sys/mips/adm5120/adm5120reg.h (props changed) head/sys/mips/adm5120/admpci.c (props changed) head/sys/mips/adm5120/console.c (props changed) head/sys/mips/adm5120/files.adm5120 (props changed) head/sys/mips/adm5120/if_admsw.c (props changed) head/sys/mips/adm5120/if_admswreg.h (props changed) head/sys/mips/adm5120/if_admswvar.h (props changed) head/sys/mips/adm5120/obio.c (props changed) head/sys/mips/adm5120/obiovar.h (props changed) head/sys/mips/adm5120/std.adm5120 (props changed) head/sys/mips/adm5120/uart_bus_adm5120.c (props changed) head/sys/mips/adm5120/uart_cpu_adm5120.c (props changed) head/sys/mips/adm5120/uart_dev_adm5120.c (props changed) head/sys/mips/adm5120/uart_dev_adm5120.h (props changed) head/sys/mips/alchemy/files.alchemy (props changed) head/sys/mips/alchemy/std.alchemy (props changed) head/sys/mips/atheros/apb.c (props changed) head/sys/mips/atheros/apbvar.h (props changed) head/sys/mips/atheros/ar71xx_bus_space_reversed.c (props changed) head/sys/mips/atheros/ar71xx_bus_space_reversed.h (props changed) head/sys/mips/atheros/ar71xx_ehci.c (props changed) head/sys/mips/atheros/ar71xx_machdep.c (props changed) head/sys/mips/atheros/ar71xx_ohci.c (props changed) head/sys/mips/atheros/ar71xx_pci.c (props changed) head/sys/mips/atheros/ar71xx_pci_bus_space.c (props changed) head/sys/mips/atheros/ar71xx_pci_bus_space.h (props changed) head/sys/mips/atheros/ar71xx_spi.c (props changed) head/sys/mips/atheros/ar71xx_wdog.c (props changed) head/sys/mips/atheros/ar71xxreg.h (props changed) head/sys/mips/atheros/files.ar71xx (props changed) head/sys/mips/atheros/if_arge.c (props changed) head/sys/mips/atheros/if_argevar.h (props changed) head/sys/mips/atheros/uart_bus_ar71xx.c (props changed) head/sys/mips/atheros/uart_cpu_ar71xx.c (props changed) head/sys/mips/cavium/files.octeon1 (props changed) head/sys/mips/cavium/std.octeon1 (props changed) head/sys/mips/conf/.cvsignore (props changed) head/sys/mips/conf/ADM5120 (props changed) head/sys/mips/conf/ADM5120.hints (props changed) head/sys/mips/conf/DEFAULTS (props changed) head/sys/mips/conf/IDT (props changed) head/sys/mips/conf/IDT.hints (props changed) head/sys/mips/conf/MALTA (props changed) head/sys/mips/conf/MALTA.hints (props changed) head/sys/mips/conf/MALTA64 (props changed) head/sys/mips/conf/OCTEON1 (props changed) head/sys/mips/conf/OCTEON1-32 (props changed) head/sys/mips/conf/OCTEON1.hints (props changed) head/sys/mips/conf/QEMU (props changed) head/sys/mips/conf/SENTRY5 (props changed) head/sys/mips/conf/SENTRY5.hints (props changed) head/sys/mips/idt/files.idt (props changed) head/sys/mips/idt/idt_machdep.c (props changed) head/sys/mips/idt/idtpci.c (props changed) head/sys/mips/idt/idtreg.h (props changed) head/sys/mips/idt/if_kr.c (props changed) head/sys/mips/idt/if_krreg.h (props changed) head/sys/mips/idt/obio.c (props changed) head/sys/mips/idt/obiovar.h (props changed) head/sys/mips/idt/std.idt (props changed) head/sys/mips/idt/uart_bus_rc32434.c (props changed) head/sys/mips/idt/uart_cpu_rc32434.c (props changed) head/sys/mips/include/_align.h (props changed) head/sys/mips/include/_bus.h (props changed) head/sys/mips/include/_bus_octeon.h (props changed) head/sys/mips/include/_inttypes.h (props changed) head/sys/mips/include/_limits.h (props changed) head/sys/mips/include/_stdint.h (props changed) head/sys/mips/include/_types.h (props changed) head/sys/mips/include/archtype.h (props changed) head/sys/mips/include/asm.h (props changed) head/sys/mips/include/asmacros.h (props changed) head/sys/mips/include/atomic.h (props changed) head/sys/mips/include/bootinfo.h (props changed) head/sys/mips/include/bswap.h (props changed) head/sys/mips/include/bus.h (props changed) head/sys/mips/include/bus_dma.h (props changed) head/sys/mips/include/cache.h (props changed) head/sys/mips/include/cache_mipsNN.h (props changed) head/sys/mips/include/cache_r4k.h (props changed) head/sys/mips/include/clock.h (props changed) head/sys/mips/include/clockvar.h (props changed) head/sys/mips/include/cpu.h (props changed) head/sys/mips/include/cpufunc.h (props changed) head/sys/mips/include/cpuinfo.h (props changed) head/sys/mips/include/cpuregs.h (props changed) head/sys/mips/include/cputypes.h (props changed) head/sys/mips/include/db_machdep.h (props changed) head/sys/mips/include/defs.h (props changed) head/sys/mips/include/elf.h (props changed) head/sys/mips/include/endian.h (props changed) head/sys/mips/include/exec.h (props changed) head/sys/mips/include/float.h (props changed) head/sys/mips/include/floatingpoint.h (props changed) head/sys/mips/include/fls64.h (props changed) head/sys/mips/include/fpu.h (props changed) head/sys/mips/include/frame.h (props changed) head/sys/mips/include/gdb_machdep.h (props changed) head/sys/mips/include/hwfunc.h (props changed) head/sys/mips/include/ieee.h (props changed) head/sys/mips/include/ieeefp.h (props changed) head/sys/mips/include/in_cksum.h (props changed) head/sys/mips/include/intr_machdep.h (props changed) head/sys/mips/include/iodev.h (props changed) head/sys/mips/include/kdb.h (props changed) head/sys/mips/include/limits.h (props changed) head/sys/mips/include/locore.h (props changed) head/sys/mips/include/md_var.h (props changed) head/sys/mips/include/memdev.h (props changed) head/sys/mips/include/metadata.h (props changed) head/sys/mips/include/minidump.h (props changed) head/sys/mips/include/mips_opcode.h (props changed) head/sys/mips/include/mp_watchdog.h (props changed) head/sys/mips/include/mutex.h (props changed) head/sys/mips/include/param.h (props changed) head/sys/mips/include/pcb.h (props changed) head/sys/mips/include/pci_cfgreg.h (props changed) head/sys/mips/include/pcpu.h (props changed) head/sys/mips/include/pmap.h (props changed) head/sys/mips/include/pmc_mdep.h (props changed) head/sys/mips/include/ppireg.h (props changed) head/sys/mips/include/proc.h (props changed) head/sys/mips/include/profile.h (props changed) head/sys/mips/include/psl.h (props changed) head/sys/mips/include/pte.h (props changed) head/sys/mips/include/ptrace.h (props changed) head/sys/mips/include/queue.h (props changed) head/sys/mips/include/reg.h (props changed) head/sys/mips/include/regdef.h (props changed) head/sys/mips/include/regnum.h (props changed) head/sys/mips/include/reloc.h (props changed) head/sys/mips/include/resource.h (props changed) head/sys/mips/include/rm7000.h (props changed) head/sys/mips/include/runq.h (props changed) head/sys/mips/include/segments.h (props changed) head/sys/mips/include/setjmp.h (props changed) head/sys/mips/include/sf_buf.h (props changed) head/sys/mips/include/sigframe.h (props changed) head/sys/mips/include/signal.h (props changed) head/sys/mips/include/smp.h (props changed) head/sys/mips/include/stdarg.h (props changed) head/sys/mips/include/sysarch.h (props changed) head/sys/mips/include/timerreg.h (props changed) head/sys/mips/include/trap.h (props changed) head/sys/mips/include/ucontext.h (props changed) head/sys/mips/include/varargs.h (props changed) head/sys/mips/include/vmparam.h (props changed) head/sys/mips/malta/files.malta (props changed) head/sys/mips/malta/gt.c (props changed) head/sys/mips/malta/gt_pci.c (props changed) head/sys/mips/malta/gtreg.h (props changed) head/sys/mips/malta/gtvar.h (props changed) head/sys/mips/malta/malta_machdep.c (props changed) head/sys/mips/malta/maltareg.h (props changed) head/sys/mips/malta/obio.c (props changed) head/sys/mips/malta/obiovar.h (props changed) head/sys/mips/malta/std.malta (props changed) head/sys/mips/malta/uart_bus_maltausart.c (props changed) head/sys/mips/malta/uart_cpu_maltausart.c (props changed) head/sys/mips/malta/yamon.c (props changed) head/sys/mips/malta/yamon.h (props changed) head/sys/mips/mips/autoconf.c (props changed) head/sys/mips/mips/bus_space_generic.c (props changed) head/sys/mips/mips/busdma_machdep.c (props changed) head/sys/mips/mips/cache.c (props changed) head/sys/mips/mips/cache_mipsNN.c (props changed) head/sys/mips/mips/copystr.S (props changed) head/sys/mips/mips/cpu.c (props changed) head/sys/mips/mips/db_disasm.c (props changed) head/sys/mips/mips/db_interface.c (props changed) head/sys/mips/mips/db_trace.c (props changed) head/sys/mips/mips/dump_machdep.c (props changed) head/sys/mips/mips/elf64_machdep.c (props changed) head/sys/mips/mips/elf_machdep.c (props changed) head/sys/mips/mips/elf_trampoline.c (props changed) head/sys/mips/mips/exception.S (props changed) head/sys/mips/mips/fp.S (props changed) head/sys/mips/mips/gdb_machdep.c (props changed) head/sys/mips/mips/genassym.c (props changed) head/sys/mips/mips/in_cksum.c (props changed) head/sys/mips/mips/inckern.S (props changed) head/sys/mips/mips/intr_machdep.c (props changed) head/sys/mips/mips/locore.S (props changed) head/sys/mips/mips/machdep.c (props changed) head/sys/mips/mips/mainbus.c (props changed) head/sys/mips/mips/mem.c (props changed) head/sys/mips/mips/mp_machdep.c (props changed) head/sys/mips/mips/nexus.c (props changed) head/sys/mips/mips/pm_machdep.c (props changed) head/sys/mips/mips/pmap.c (props changed) head/sys/mips/mips/psraccess.S (props changed) head/sys/mips/mips/stack_machdep.c (props changed) head/sys/mips/mips/support.S (props changed) head/sys/mips/mips/swtch.S (props changed) head/sys/mips/mips/sys_machdep.c (props changed) head/sys/mips/mips/tick.c (props changed) head/sys/mips/mips/tlb.S (props changed) head/sys/mips/mips/trap.c (props changed) head/sys/mips/mips/uio_machdep.c (props changed) head/sys/mips/mips/vm_machdep.c (props changed) head/sys/mips/rmi/Makefile.msgring (props changed) head/sys/mips/rmi/board.c (props changed) head/sys/mips/rmi/board.h (props changed) head/sys/mips/rmi/bus_space_rmi.c (props changed) head/sys/mips/rmi/clock.c (props changed) head/sys/mips/rmi/clock.h (props changed) head/sys/mips/rmi/debug.h (props changed) head/sys/mips/rmi/dev/sec/desc.h (props changed) head/sys/mips/rmi/dev/sec/rmilib.c (props changed) head/sys/mips/rmi/dev/sec/rmilib.h (props changed) head/sys/mips/rmi/dev/sec/rmisec.c (props changed) head/sys/mips/rmi/dev/sec/stats.h (props changed) head/sys/mips/rmi/dev/xlr/atx_cpld.h (props changed) head/sys/mips/rmi/dev/xlr/rge.c (props changed) head/sys/mips/rmi/dev/xlr/rge.h (props changed) head/sys/mips/rmi/dev/xlr/xgmac_mdio.h (props changed) head/sys/mips/rmi/ehcireg.h (props changed) head/sys/mips/rmi/ehcivar.h (props changed) head/sys/mips/rmi/files.xlr (props changed) head/sys/mips/rmi/interrupt.h (props changed) head/sys/mips/rmi/intr_machdep.c (props changed) head/sys/mips/rmi/iodi.c (props changed) head/sys/mips/rmi/iomap.h (props changed) head/sys/mips/rmi/msgring.c (props changed) head/sys/mips/rmi/msgring.cfg (props changed) head/sys/mips/rmi/msgring.h (props changed) head/sys/mips/rmi/msgring_xls.c (props changed) head/sys/mips/rmi/msgring_xls.cfg (props changed) head/sys/mips/rmi/on_chip.c (props changed) head/sys/mips/rmi/pcibus.c (props changed) head/sys/mips/rmi/pcibus.h (props changed) head/sys/mips/rmi/perfmon.h (props changed) head/sys/mips/rmi/perfmon_kern.c (props changed) head/sys/mips/rmi/perfmon_percpu.c (props changed) head/sys/mips/rmi/perfmon_utils.h (props changed) head/sys/mips/rmi/perfmon_xlrconfig.h (props changed) head/sys/mips/rmi/pic.h (props changed) head/sys/mips/rmi/rmi_mips_exts.h (props changed) head/sys/mips/rmi/rootfs_list.txt (props changed) head/sys/mips/rmi/shared_structs.h (props changed) head/sys/mips/rmi/shared_structs_func.h (props changed) head/sys/mips/rmi/shared_structs_offsets.h (props changed) head/sys/mips/rmi/std.xlr (props changed) head/sys/mips/rmi/tick.c (props changed) head/sys/mips/rmi/uart_bus_xlr_iodi.c (props changed) head/sys/mips/rmi/uart_cpu_mips_xlr.c (props changed) head/sys/mips/rmi/xlr_boot1_console.c (props changed) head/sys/mips/rmi/xlr_csum_nocopy.S (props changed) head/sys/mips/rmi/xlr_i2c.c (props changed) head/sys/mips/rmi/xlr_machdep.c (props changed) head/sys/mips/rmi/xlr_pci.c (props changed) head/sys/mips/rmi/xlrconfig.h (props changed) head/sys/mips/rmi/xls_ehci.c (props changed) head/sys/mips/sentry5/files.sentry5 (props changed) head/sys/mips/sentry5/obio.c (props changed) head/sys/mips/sentry5/obiovar.h (props changed) head/sys/mips/sentry5/s5_machdep.c (props changed) head/sys/mips/sentry5/s5reg.h (props changed) head/sys/mips/sentry5/uart_bus_sbusart.c (props changed) head/sys/mips/sentry5/uart_cpu_sbusart.c (props changed) head/sys/mips/sibyte/files.sibyte (props changed) From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 21:45:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 426C7106566B; Tue, 12 Jan 2010 21:45:04 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 300138FC1B; Tue, 12 Jan 2010 21:45:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CLj4Wa009227; Tue, 12 Jan 2010 21:45:04 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CLj3EX009214; Tue, 12 Jan 2010 21:45:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001122145.o0CLj3EX009214@svn.freebsd.org> From: Christian Brueffer Date: Tue, 12 Jan 2010 21:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202176 - in head/lib/libc: net sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 21:45:04 -0000 Author: brueffer Date: Tue Jan 12 21:45:03 2010 New Revision: 202176 URL: http://svn.freebsd.org/changeset/base/202176 Log: Miscellaneous mdoc, spelling and inconsistency fixes. PR: 142573, 142576 (mostly) Submitted by: brucec MFC after: 1 week Modified: head/lib/libc/net/sctp_bindx.3 head/lib/libc/net/sctp_connectx.3 head/lib/libc/net/sctp_getaddrlen.3 head/lib/libc/net/sctp_getassocid.3 head/lib/libc/net/sctp_getpaddrs.3 head/lib/libc/net/sctp_opt_info.3 head/lib/libc/net/sctp_recvmsg.3 head/lib/libc/net/sctp_send.3 head/lib/libc/net/sctp_sendmsg.3 head/lib/libc/sys/sctp_generic_recvmsg.2 head/lib/libc/sys/sctp_generic_sendmsg.2 head/lib/libc/sys/sctp_peeloff.2 Modified: head/lib/libc/net/sctp_bindx.3 ============================================================================== --- head/lib/libc/net/sctp_bindx.3 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/net/sctp_bindx.3 Tue Jan 12 21:45:03 2010 (r202176) @@ -90,7 +90,7 @@ The call returns 0 on success and -1 upo .Sh ERRORS The .Fn sctp_bindx -can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL This value is returned if the Modified: head/lib/libc/net/sctp_connectx.3 ============================================================================== --- head/lib/libc/net/sctp_connectx.3 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/net/sctp_connectx.3 Tue Jan 12 21:45:03 2010 (r202176) @@ -44,7 +44,7 @@ .In sys/socket.h .In netinet/sctp.h .Ft int -.Fn sctp_connectx "int s" "struct sockaddr *" "int addrcnt" "sctp_assoc_t *" +.Fn sctp_connectx "int sd" "struct sockaddr *addrs" "int addrcnt" "sctp_assoc_t *id" .Sh DESCRIPTION The .Fn sctp_connectx @@ -75,7 +75,7 @@ the extra addresses sent in the call will be silently discarded from the association. On successful completion the provided -.Fa "sctp_assoc_t *" +.Fa id will be filled in with the association identification of the newly forming association. @@ -84,7 +84,7 @@ The call returns 0 on success and -1 upo .Sh ERRORS The .Fn sctp_connectx -can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL An address listed has an invalid family or no Modified: head/lib/libc/net/sctp_getaddrlen.3 ============================================================================== --- head/lib/libc/net/sctp_getaddrlen.3 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/net/sctp_getaddrlen.3 Tue Jan 12 21:45:03 2010 (r202176) @@ -76,7 +76,7 @@ system expects for the specific address .Sh ERRORS The .Fn sctp_getaddrlen -function can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL The address family specified does NOT exist. Modified: head/lib/libc/net/sctp_getassocid.3 ============================================================================== --- head/lib/libc/net/sctp_getassocid.3 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/net/sctp_getassocid.3 Tue Jan 12 21:45:03 2010 (r202176) @@ -58,7 +58,7 @@ The call returns the association id upon .Sh ERRORS The .Fn sctp_getassocid -function can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er ENOENT The address does not have an association setup to it. Modified: head/lib/libc/net/sctp_getpaddrs.3 ============================================================================== --- head/lib/libc/net/sctp_getpaddrs.3 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/net/sctp_getpaddrs.3 Tue Jan 12 21:45:03 2010 (r202176) @@ -33,7 +33,7 @@ .\" $FreeBSD$ .\" .Dd December 15, 2006 -.Dt SCTP_GETPADDR 3 +.Dt SCTP_GETPADDRS 3 .Os .Sh NAME .Nm sctp_getpaddrs , @@ -64,7 +64,7 @@ array of socket addresses returned in th .Fa addrs upon success. .Pp -After the caller is through the function +After the caller is finished, the function .Fn sctp_freepaddrs or .Fn sctp_freeladdrs @@ -76,7 +76,7 @@ the number of addresses returned in .Fa addrs upon success. .Sh ERRORS -The functions can return the following errors. +The functions can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL An address listed has an invalid family or no Modified: head/lib/libc/net/sctp_opt_info.3 ============================================================================== --- head/lib/libc/net/sctp_opt_info.3 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/net/sctp_opt_info.3 Tue Jan 12 21:45:03 2010 (r202176) @@ -45,7 +45,7 @@ .In sys/socket.h .In netinet/sctp.h .Ft int -.Fn sctp_opt_info "int s" "sctp_assoc_t" "int opt" "void *arg" "socklen_t *size" +.Fn sctp_opt_info "int sd" "sctp_assoc_t id" "int opt" "void *arg" "socklen_t *size" .Sh DESCRIPTION The .Fn sctp_opt_info @@ -90,7 +90,7 @@ socket options. .Sh ERRORS The .Fn sctp_opt_info -function can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL The argument Modified: head/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- head/lib/libc/net/sctp_recvmsg.3 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/net/sctp_recvmsg.3 Tue Jan 12 21:45:03 2010 (r202176) @@ -160,7 +160,7 @@ struct sctp_sndrcvinfo { .Pp The .Fa sinfo->sinfo_ppid -is an opaque 32 bit value that is passed transparently +field is an opaque 32 bit value that is passed transparently through the stack from the peer endpoint. Note that the stack passes this value without regard to byte order. @@ -180,12 +180,13 @@ as soon as possible. When this flag is absent the message was delivered in order within the stream it was received. .Pp +The .Fa sinfo->sinfo_stream -is the SCTP stream that the message was received on. +field is the SCTP stream that the message was received on. Streams in SCTP are reliable (or partially reliable) flows of ordered messages. .Pp -The +The .Fa sinfo->sinfo_context field is used only if the local application set an association level context with the @@ -197,7 +198,7 @@ association. .Pp The .Fa sinfo->sinfo_ssn -will hold the stream sequence number assigned +field will hold the stream sequence number assigned by the peer endpoint if the message is .Em not unordered. @@ -205,7 +206,7 @@ For unordered messages this field holds .Pp The .Fa sinfo->sinfo_tsn -holds a transport sequence number (TSN) that was assigned +field holds a transport sequence number (TSN) that was assigned to this message by the peer endpoint. For messages that fit in or less than the path MTU this will be the only TSN assigned. @@ -215,12 +216,12 @@ message. .Pp The .Fa sinfo->sinfo_cumtsn -holds the current cumulative acknowledgment point of +field holds the current cumulative acknowledgment point of the transport association. Note that this may be larger or smaller than the TSN assigned to the message itself. .Pp -The +The .Fa sinfo->sinfo_assoc_id is the unique association identification that was assigned to the association. @@ -232,10 +233,10 @@ setting various socket options on the sp (see .Xr sctp 4 ) . .Pp -The +The .Fa sinfo->info_timetolive field is not used by -.Fa sctp_recvmsg . +.Fn sctp_recvmsg . .Sh RETURN VALUES The call returns the number of characters sent, or -1 if an error occurred. Modified: head/lib/libc/net/sctp_send.3 ============================================================================== --- head/lib/libc/net/sctp_send.3 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/net/sctp_send.3 Tue Jan 12 21:45:03 2010 (r202176) @@ -294,7 +294,7 @@ if an error occurred. The .Fn sctp_send system call -fail if: +fails if: .Bl -tag -width Er .It Bq Er EBADF An invalid descriptor was specified. Modified: head/lib/libc/net/sctp_sendmsg.3 ============================================================================== --- head/lib/libc/net/sctp_sendmsg.3 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/net/sctp_sendmsg.3 Tue Jan 12 21:45:03 2010 (r202176) @@ -271,7 +271,7 @@ if an error occurred. The .Fn sctp_sendmsg system call -fail if: +fails if: .Bl -tag -width Er .It Bq Er EBADF An invalid descriptor was specified. @@ -324,7 +324,7 @@ is not connected and is a one-to-one sty .Xr sendmsg 3 , .Xr sctp 4 .Sh BUGS -Because in the one-to-many style socket the +Because in the one-to-many style socket .Fn sctp_sendmsg or .Fn sctp_sendmsgx Modified: head/lib/libc/sys/sctp_generic_recvmsg.2 ============================================================================== --- head/lib/libc/sys/sctp_generic_recvmsg.2 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/sys/sctp_generic_recvmsg.2 Tue Jan 12 21:45:03 2010 (r202176) @@ -36,7 +36,7 @@ .Os .Sh NAME .Nm sctp_generic_recvmsg -.Nd receive data from a peer. +.Nd receive data from a peer .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -46,16 +46,20 @@ .Ft int .Fn sctp_generic_recvmsg "int s" "struct iovec *iov" "int iovlen" "struct sockaddr *from" "socklen_t *fromlen" "struct sctp_sndrcvinfo *sinfo" "int *msgflags" .Sh DESCRIPTION -The .Fn sctp_generic_recvmsg -is the true system calls used by the -.Fn sctp_recvmsg -function call. This call is more efficient since it is a -true system calls but it is specific to FreeBSD and -can be expected NOT to be present on any other Operating -System. For detailed useage please see either the -.Fn sctp_recvmsg -function call. +is the true system call used by the +.Xr sctp_recvmsg 3 +function call. +This call is more efficient since it is a +true system call but it is specific to +.Fx +and can be expected +.Em not +to be present on any other operating +system. +For detailed usage please see the +.Xr sctp_recvmsg 3 +function call. .Sh RETURN VALUES The call returns the number of bytes read on success and -1 upon failure. .Sh ERRORS Modified: head/lib/libc/sys/sctp_generic_sendmsg.2 ============================================================================== --- head/lib/libc/sys/sctp_generic_sendmsg.2 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/sys/sctp_generic_sendmsg.2 Tue Jan 12 21:45:03 2010 (r202176) @@ -37,7 +37,7 @@ .Sh NAME .Nm sctp_generic_sendmsg .Nm sctp_generic_sendmsg_iov -.Nd send data to a peer. +.Nd send data to a peer .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -49,21 +49,25 @@ .Ft int .Fn sctp_generic_sendmsg_iov "int s" "struct iovec *iov" "int iovlen" "struct sockaddr *to" "struct sctp_sndrcvinfo *sinfo" "int flags" .Sh DESCRIPTION -The .Fn sctp_generic_sendmsg and .Fn sctp_generic_sendmsg_iov are the true system calls used by the -.Fn sctp_sendmsg +.Xr sctp_sendmsg 3 and -.Fn sctp_send -function calls. These are more efficient since they are -true system calls but they are specific to FreeBSD and -can be expected NOT to be present on any other Operating -System. For detailed useage please see either the -.Fn sctp_send +.Xr sctp_send 3 +function calls. +These are more efficient since they are +true system calls but they are specific to +.Fx +and can be expected +.Em not +to be present on any other operating +system. +For detailed usage please see either the +.Xr sctp_send 3 or -.Fn sctp_sendmsg +.Xr sctp_sendmsg 3 function calls. .Sh RETURN VALUES The call returns the number of bytes written on success and -1 upon failure. Modified: head/lib/libc/sys/sctp_peeloff.2 ============================================================================== --- head/lib/libc/sys/sctp_peeloff.2 Tue Jan 12 21:36:08 2010 (r202175) +++ head/lib/libc/sys/sctp_peeloff.2 Tue Jan 12 21:45:03 2010 (r202176) @@ -36,7 +36,7 @@ .Os .Sh NAME .Nm sctp_peeloff -.Nd detach an association from a one-to-many socket to its on fd +.Nd detach an association from a one-to-many socket to its own fd .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -58,7 +58,7 @@ upon success. .Sh ERRORS The .Fn sctp_peeloff -can return the following errors. +system call can return the following errors: .Bl -tag -width Er .It Bq Er ENOTCONN The From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 22:22:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 948401065696; Tue, 12 Jan 2010 22:22:27 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 663E08FC1D; Tue, 12 Jan 2010 22:22:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CMMRAO017535; Tue, 12 Jan 2010 22:22:27 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CMMRZ6017532; Tue, 12 Jan 2010 22:22:27 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001122222.o0CMMRZ6017532@svn.freebsd.org> From: Rui Paulo Date: Tue, 12 Jan 2010 22:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202178 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 22:22:27 -0000 Author: rpaulo Date: Tue Jan 12 22:22:27 2010 New Revision: 202178 URL: http://svn.freebsd.org/changeset/base/202178 Log: Update mesh code to to D4.0. Modified: head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_mesh.h Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Tue Jan 12 22:06:53 2010 (r202177) +++ head/sys/net80211/ieee80211_mesh.c Tue Jan 12 22:22:27 2010 (r202178) @@ -2381,6 +2381,7 @@ uint8_t * ieee80211_add_meshconf(uint8_t *frm, struct ieee80211vap *vap) { const struct ieee80211_mesh_state *ms = vap->iv_mesh; + uint16_t caps; KASSERT(vap->iv_opmode == IEEE80211_M_MBSS, ("not a MBSS vap")); @@ -2396,11 +2397,12 @@ ieee80211_add_meshconf(uint8_t *frm, str if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL) *frm |= IEEE80211_MESHCONF_FORM_MP; frm += 1; - *frm = 0; + caps = 0; if (ms->ms_flags & IEEE80211_MESHFLAGS_AP) - *frm |= IEEE80211_MESHCONF_CAP_AP; + caps |= IEEE80211_MESHCONF_CAP_AP; if (ms->ms_flags & IEEE80211_MESHFLAGS_FWD) - *frm |= IEEE80211_MESHCONF_CAP_FWRD; + caps |= IEEE80211_MESHCONF_CAP_FWRD; + ADDSHORT(frm, caps); frm += 1; return frm; } Modified: head/sys/net80211/ieee80211_mesh.h ============================================================================== --- head/sys/net80211/ieee80211_mesh.h Tue Jan 12 22:06:53 2010 (r202177) +++ head/sys/net80211/ieee80211_mesh.h Tue Jan 12 22:22:27 2010 (r202178) @@ -49,7 +49,7 @@ struct ieee80211_meshconf_ie { uint8_t conf_syncid; /* Sync. Protocol ID */ uint8_t conf_authid; /* Auth. Protocol ID */ uint8_t conf_form; /* Formation Information */ - uint8_t conf_cap; + uint16_t conf_cap; } __packed; /* Hybrid Wireless Mesh Protocol */ @@ -72,7 +72,8 @@ struct ieee80211_meshconf_ie { #define IEEE80211_MESHCONF_CAP_FWRD 0x08 /* forwarding enabled */ #define IEEE80211_MESHCONF_CAP_BTR 0x10 /* Beacon Timing Report Enab */ #define IEEE80211_MESHCONF_CAP_TBTTA 0x20 /* TBTT Adj. Enabled */ -#define IEEE80211_MESHCONF_CAP_PSL 0x40 /* Power Save Level */ +#define IEEE80211_MESHCONF_CAP_TBTT 0x40 /* TBTT Adjusting */ +#define IEEE80211_MESHCONF_CAP_PSL 0x80 /* Power Save Level */ /* Mesh Identifier */ struct ieee80211_meshid_ie { From owner-svn-src-all@FreeBSD.ORG Tue Jan 12 22:28:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89CDF1065670; Tue, 12 Jan 2010 22:28:59 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77DE58FC17; Tue, 12 Jan 2010 22:28:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CMSx18019024; Tue, 12 Jan 2010 22:28:59 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0CMSxxe019022; Tue, 12 Jan 2010 22:28:59 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001122228.o0CMSxxe019022@svn.freebsd.org> From: Christian Brueffer Date: Tue, 12 Jan 2010 22:28:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202179 - stable/7/share/man/man4/man4.i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 22:28:59 -0000 Author: brueffer Date: Tue Jan 12 22:28:59 2010 New Revision: 202179 URL: http://svn.freebsd.org/changeset/base/202179 Log: MFC: r197276 Correct a sysctl name. Modified: stable/7/share/man/man4/man4.i386/acpi_panasonic.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/man4.i386/acpi_panasonic.4 ============================================================================== --- stable/7/share/man/man4/man4.i386/acpi_panasonic.4 Tue Jan 12 22:22:27 2010 (r202178) +++ stable/7/share/man/man4/man4.i386/acpi_panasonic.4 Tue Jan 12 22:28:59 2010 (r202179) @@ -144,7 +144,7 @@ The following MIBs are available: The maximum level of brightness. The value is read only and automatically set according to hardware model. -.It Va hw.acpi.panasonic.lcd_brightness_max +.It Va hw.acpi.panasonic.lcd_brightness_min The minimum level of brightness. The value is read only and automatically set according to hardware model. From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 00:15:21 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 919371065676 for ; Wed, 13 Jan 2010 00:15:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 0520B8FC15 for ; Wed, 13 Jan 2010 00:15:20 +0000 (UTC) Received: (qmail 24428 invoked by uid 399); 13 Jan 2010 00:15:20 -0000 Received: from localhost (HELO ?192.168.0.110?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 13 Jan 2010 00:15:20 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B4D109A.5060500@FreeBSD.org> Date: Tue, 12 Jan 2010 16:15:22 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: "M. Warner Losh" References: <201001101744.o0AHiM2d095302@svn.freebsd.org> <20100110.210204.787670930858346133.imp@bsdimp.com> In-Reply-To: <20100110.210204.787670930858346133.imp@bsdimp.com> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, freebsd-arch@FreeBSD.org Subject: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 00:15:21 -0000 On 1/10/2010 8:02 PM, M. Warner Losh wrote: > In message: > Doug Barton writes: > : On Sun, 10 Jan 2010, Warner Losh wrote: > : > : > Author: imp > : > Date: Sun Jan 10 17:44:22 2010 > : > New Revision: 202019 > : > URL: http://svn.freebsd.org/changeset/base/202019 > : > > : > Log: > : > Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. > : > : Thanks for doing this, however the comment about how to include the > : whole file (including the comments) were not included. Do I need to do > : this part of it myself? No problem if so, I just want to be sure to > : get it done in time to MFC it before the freeze for 7.3-release. > > In general, we don't put big comments like that in the config files, > preferring to leave them to NOTES. I was just following that > convention... Understood, however given that there is plenty of room for confusion on this point because the default is NOT to include the comments I think that some explanation is justified. My original text was: # Store the plain version of the configuration file in the kernel itself. # To store the entire file, including comments, put this in /etc/src.conf: # CONFIGARGS= -C # See config(8) for more details. I'm open to suggestions on shrinking it, but I do think some sort of explanation is warranted. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 00:49:58 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40B6F106566C; Wed, 13 Jan 2010 00:49:58 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id F343A8FC0A; Wed, 13 Jan 2010 00:49:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0D0gVUc081359; Tue, 12 Jan 2010 17:42:31 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 12 Jan 2010 17:43:26 -0700 (MST) Message-Id: <20100112.174326.337739863389869251.imp@bsdimp.com> To: dougb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <4B4D109A.5060500@FreeBSD.org> References: <20100110.210204.787670930858346133.imp@bsdimp.com> <4B4D109A.5060500@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, freebsd-arch@FreeBSD.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 00:49:58 -0000 In message: <4B4D109A.5060500@FreeBSD.org> Doug Barton writes: : On 1/10/2010 8:02 PM, M. Warner Losh wrote: : > In message: : > Doug Barton writes: : > : On Sun, 10 Jan 2010, Warner Losh wrote: : > : : > : > Author: imp : > : > Date: Sun Jan 10 17:44:22 2010 : > : > New Revision: 202019 : > : > URL: http://svn.freebsd.org/changeset/base/202019 : > : > : > : > Log: : > : > Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. : > : : > : Thanks for doing this, however the comment about how to include the : > : whole file (including the comments) were not included. Do I need to do : > : this part of it myself? No problem if so, I just want to be sure to : > : get it done in time to MFC it before the freeze for 7.3-release. : > : > In general, we don't put big comments like that in the config files, : > preferring to leave them to NOTES. I was just following that : > convention... : : Understood, however given that there is plenty of room for confusion on : this point because the default is NOT to include the comments I think : that some explanation is justified. My original text was: : : # Store the plain version of the configuration file in the kernel itself. : # To store the entire file, including comments, put this in /etc/src.conf: : # CONFIGARGS= -C : # See config(8) for more details. : : I'm open to suggestions on shrinking it, but I do think some sort of : explanation is warranted. I'm not sure I see where there's confusion possible here, let alone plenty of room for it. Do you think you can describe what confusion is possible here? Warner From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 03:16:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F1D8106568F; Wed, 13 Jan 2010 03:16:31 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69F928FC1A; Wed, 13 Jan 2010 03:16:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0D3GVvu082303; Wed, 13 Jan 2010 03:16:31 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0D3GVkA082296; Wed, 13 Jan 2010 03:16:31 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001130316.o0D3GVkA082296@svn.freebsd.org> From: Andrew Thompson Date: Wed, 13 Jan 2010 03:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202181 - in head: share/man/man4 sys/conf sys/dev/usb sys/dev/usb/net sys/modules/usb sys/modules/usb/uhso usr.sbin usr.sbin/uhsoctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 03:16:31 -0000 Author: thompsa Date: Wed Jan 13 03:16:31 2010 New Revision: 202181 URL: http://svn.freebsd.org/changeset/base/202181 Log: Add a driver by Fredrik Lindberg for Option HSDPA USB devices. These differ from standard 3G wireless units by supplying a raw IP/IPv6 endpoint rather than using PPP over serial. uhsoctl(1) is used to initiate and close the WAN connection. Obtained from: Fredrik Lindberg Added: head/share/man/man4/uhso.4 (contents, props changed) head/sys/dev/usb/net/uhso.c (contents, props changed) head/sys/modules/usb/uhso/ head/sys/modules/usb/uhso/Makefile (contents, props changed) head/usr.sbin/uhsoctl/ head/usr.sbin/uhsoctl/Makefile (contents, props changed) head/usr.sbin/uhsoctl/uhsoctl.1 (contents, props changed) head/usr.sbin/uhsoctl/uhsoctl.c (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/conf/NOTES head/sys/conf/files head/sys/dev/usb/usbdevs head/sys/modules/usb/Makefile head/usr.sbin/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Jan 12 23:33:14 2010 (r202180) +++ head/share/man/man4/Makefile Wed Jan 13 03:16:31 2010 (r202181) @@ -424,6 +424,7 @@ MAN= aac.4 \ ugen.4 \ uhci.4 \ uhid.4 \ + uhso.4 \ uipaq.4 \ ukbd.4 \ ulpt.4 \ Added: head/share/man/man4/uhso.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/uhso.4 Wed Jan 13 03:16:31 2010 (r202181) @@ -0,0 +1,115 @@ +.\" Copyright (c) 2009 Fredrik Lindberg +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd Aug 12, 2009 +.Os +.Dt UHSO 4 +.Sh NAME +.Nm hso +.Nd support for several HSxPA devices from Option N.V. +.Sh SYNOPSIS +The module can be loaded at boot time by placing the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +uhso_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for several HSxPA devices from Option N.V. that are +based on their packet interface. +Each device has a set of serial ports and a raw IP packet interface. +The serial ports of the device are accessed through the +.Xr ucom 4 +driver which makes them behave like a +.Xr tty 4 . +The packet interface is exposed as a network interface. +.Pp +To establish a connection on the packet interface the use of the proprietary +AT commands +.Dq Li AT_OWANCALL +and +.Dq Li AT_OWANDATA +are required on any of the serial ports. +.Pp +The network interface must be configured manually using the data obtain from +these calls. +.Pp +Each device usually have at least two or more serial ports, their individual purpose +can be identified through +.Xr sysctl 8 . +.Sh HARDWARE +The +.Nm +driver supports at least the following cards +.Pp +.Bl -bullet -compact +.It +Option GlobeSurfer iCON 7.2 (new firmware) +.It +Option iCON 225 +.El +.Pp +The device features a mass storage device referred to as +.Dq Zero-CD +which contains drivers for Microsoft Windows. +The driver automatically switches the device to modem mode. +.Sh EXAMPLES +Establishing a packet interface connection +.Bd -literal -offset indent +AT+CGDCONT=1,,"apn.provider" +AT_OWANCALL=1,1,1 +OK +_OWANCALL=1,1 + +AT_OWANDATA=1 +_OWANDATA: 1, 10.11.12.13, 0.0.0.0, 10.2.3.4, 10.2.3.5, \e + 0.0.0.0, 0.0.0.0, 72000 +.Ed +.Pp +Configuring the interface +.Bd -literal -offset indent +ifconfig uhso0 10.11.12.13 up +route add default -interface uhso0 +echo "nameserver 10.2.3.4" > /etc/resolv.conf +echo "nameserver 10.2.3.5" >> /etc/resolv.conf +.Ed +.Pp +The connection can be terminated with +.Bd -literal -offset indent +AT_OWANCALL=1,0,1 +.Ed +.Sh FILES +.Bl -tag -width "XXXXXX" +.It Pa /dev/cuaU?.? +.El +.Sh SEE ALSO +.Xr ucom 4 , +.Xr usb 4 +.Sh AUTHORS +The +.Nm +driver was written by +.An Fredrik Lindberg Aq fli@shapeshifter.se . Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Jan 12 23:33:14 2010 (r202180) +++ head/sys/conf/NOTES Wed Jan 13 03:16:31 2010 (r202181) @@ -2652,6 +2652,9 @@ device rue # # Davicom DM9601E USB to fast ethernet. Supports the Corega FEther USB-TXC. device udav +# +# HSxPA devices from Option N.V +device uhso # # Ralink Technology RT2501USB/RT2601USB wireless driver Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jan 12 23:33:14 2010 (r202180) +++ head/sys/conf/files Wed Jan 13 03:16:31 2010 (r202181) @@ -1676,7 +1676,7 @@ dev/usb/usb_request.c optional usb dev/usb/usb_transfer.c optional usb dev/usb/usb_util.c optional usb # -# USB ethernet drivers +# USB network drivers # dev/usb/net/if_aue.c optional aue dev/usb/net/if_axe.c optional axe @@ -1687,6 +1687,7 @@ dev/usb/net/if_rue.c optional rue dev/usb/net/if_udav.c optional udav dev/usb/net/usb_ethernet.c optional aue | axe | cdce | cue | kue | rue | \ udav +dev/usb/net/uhso.c optional uhso # # USB WLAN drivers # Added: head/sys/dev/usb/net/uhso.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/net/uhso.c Wed Jan 13 03:16:31 2010 (r202181) @@ -0,0 +1,1754 @@ +/*- + * Copyright (c) 2009 Fredrik Lindberg + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "usbdevs.h" +#define USB_DEBUG_VAR uhso_debug +#include +#include +#include +#include +#include +#include + +struct uhso_tty { + struct uhso_softc *ht_sc; + struct usb_xfer *ht_xfer[3]; + int ht_muxport; + int ht_open; + char ht_name[32]; +}; + +struct uhso_softc { + device_t sc_dev; + struct usb_device *sc_udev; + struct mtx sc_mtx; + uint32_t sc_type; + + struct usb_xfer *sc_xfer[3]; + uint8_t sc_iface_no; + uint8_t sc_iface_index; + + /* Control pipe */ + struct usb_xfer * sc_ctrl_xfer[2]; + uint8_t sc_ctrl_iface_no; + + /* Network */ + struct usb_xfer *sc_if_xfer[2]; + struct ifnet *sc_ifp; + struct mbuf *sc_mwait; /* partial packet */ + size_t sc_waitlen; /* no. of outstanding bytes */ + struct ifqueue sc_rxq; + struct callout sc_c; + + /* TTY related structures */ + struct ucom_super_softc sc_super_ucom; + int sc_ttys; + struct uhso_tty *sc_tty; + struct ucom_softc *sc_ucom; + int sc_msr; + int sc_lsr; + int sc_line; +}; + + +#define UHSO_MAX_MTU 2048 + +/* + * There are mainly two type of cards floating around. + * The first one has 2,3 or 4 interfaces with a multiplexed serial port + * and packet interface on the first interface and bulk serial ports + * on the others. + * The second type of card has several other interfaces, their purpose + * can be detected during run-time. + */ +#define UHSO_IFACE_SPEC(usb_type, port, port_type) \ + (((usb_type) << 24) | ((port) << 16) | (port_type)) + +#define UHSO_IFACE_USB_TYPE(x) ((x >> 24) & 0xff) +#define UHSO_IFACE_PORT(x) ((x >> 16) & 0xff) +#define UHSO_IFACE_PORT_TYPE(x) (x & 0xff) + +/* + * USB interface types + */ +#define UHSO_IF_NET 0x01 /* Network packet interface */ +#define UHSO_IF_MUX 0x02 /* Multiplexed serial port */ +#define UHSO_IF_BULK 0x04 /* Bulk interface */ + +/* + * Port types + */ +#define UHSO_PORT_UNKNOWN 0x00 +#define UHSO_PORT_SERIAL 0x01 /* Serial port */ +#define UHSO_PORT_NETWORK 0x02 /* Network packet interface */ + +/* + * Multiplexed serial port destination sub-port names + */ +#define UHSO_MPORT_TYPE_CTL 0x00 /* Control port */ +#define UHSO_MPORT_TYPE_APP 0x01 /* Application */ +#define UHSO_MPORT_TYPE_PCSC 0x02 +#define UHSO_MPORT_TYPE_GPS 0x03 +#define UHSO_MPORT_TYPE_APP2 0x04 +#define UHSO_MPORT_TYPE_MAX UHSO_MPORT_TYPE_APP2 +#define UHSO_MPORT_TYPE_NOMAX 8 /* Max number of mux ports */ + +/* + * Port definitions + */ +#define UHSO_PORT_TYPE_CTL 0x01 +#define UHSO_PORT_TYPE_APP 0x02 +#define UHSO_PORT_TYPE_APP2 0x03 +#define UHSO_PORT_TYPE_MODEM 0x04 +#define UHSO_PORT_TYPE_NETWORK 0x05 +#define UHSO_PORT_TYPE_DIAG 0x06 +#define UHSO_PORT_TYPE_DIAG2 0x07 +#define UHSO_PORT_TYPE_GPS 0x08 +#define UHSO_PORT_TYPE_GPSCTL 0x09 +#define UHSO_PORT_TYPE_PCSC 0x0a +#define UHSO_PORT_TYPE_MSD 0x0b +#define UHSO_PORT_TYPE_VOICE 0x0c +#define UHSO_PORT_TYPE_MAX 0x0c + +static eventhandler_tag uhso_etag; + +/* Overall port type */ +static char *uhso_port[] = { + "Unknown", + "Serial", + "Network", + "Network/Serial" +}; + +/* Map between interface port type read from device and description type */ +static char uhso_port_map[] = { + 0, + UHSO_PORT_TYPE_DIAG, + UHSO_PORT_TYPE_GPS, + UHSO_PORT_TYPE_GPSCTL, + UHSO_PORT_TYPE_APP, + UHSO_PORT_TYPE_APP2, + UHSO_PORT_TYPE_CTL, + UHSO_PORT_TYPE_NETWORK, + UHSO_PORT_TYPE_MODEM, + UHSO_PORT_TYPE_MSD, + UHSO_PORT_TYPE_PCSC, + UHSO_PORT_TYPE_VOICE +}; +static char uhso_port_map_max = sizeof(uhso_port_map) / sizeof(char); + +static char uhso_mux_port_map[] = { + UHSO_PORT_TYPE_CTL, + UHSO_PORT_TYPE_APP, + UHSO_PORT_TYPE_PCSC, + UHSO_PORT_TYPE_GPS, + UHSO_PORT_TYPE_APP2 +}; + +static char *uhso_port_type[] = { + "Unknown", + "Control", + "Application", + "Application (Secondary)", + "Modem", + "Network", + "Diagnostic", + "Diagnostic (Secondary)", + "GPS", + "GPS Control", + "PC Smartcard", + "MSD", + "Voice", +}; + +static char *uhso_port_type_sysctl[] = { + "unknown", + "control", + "application", + "application", + "modem", + "network", + "diagnostic", + "diagnostic", + "gps", + "gps_control", + "pcsc", + "msd", + "voice", +}; + + +#define UHSO_STATIC_IFACE 0x01 +#define UHSO_AUTO_IFACE 0x02 + +static const struct usb_device_id uhso_devs[] = { +#define UHSO_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } + /* Option GlobeSurfer iCON 7.2 */ + UHSO_DEV(OPTION, GSICON72, UHSO_STATIC_IFACE), + /* Option iCON 225 */ + UHSO_DEV(OPTION, GTHSDPA, UHSO_STATIC_IFACE), + /* Option GlobeSurfer iCON HSUPA */ + UHSO_DEV(OPTION, GSICONHSUPA, UHSO_STATIC_IFACE), + /* Option GlobeTrotter HSUPA */ + UHSO_DEV(OPTION, GTHSUPA, UHSO_STATIC_IFACE), + /* GE40x */ + UHSO_DEV(OPTION, GE40X, UHSO_AUTO_IFACE), + UHSO_DEV(OPTION, GE40X_1, UHSO_AUTO_IFACE), + UHSO_DEV(OPTION, GE40X_2, UHSO_AUTO_IFACE), + UHSO_DEV(OPTION, GE40X_3, UHSO_AUTO_IFACE), + /* Option GlobeSurfer iCON 401 */ + UHSO_DEV(OPTION, ICON401, UHSO_AUTO_IFACE), + /* Option GlobeTrotter Module 382 */ + UHSO_DEV(OPTION, GMT382, UHSO_AUTO_IFACE), + /* Option iCON EDGE */ + UHSO_DEV(OPTION, ICONEDGE, UHSO_STATIC_IFACE), + /* Option Module HSxPA */ + UHSO_DEV(OPTION, MODHSXPA, UHSO_STATIC_IFACE), + /* Option iCON 321 */ + UHSO_DEV(OPTION, ICON321, UHSO_STATIC_IFACE), + /* Option iCON 322 */ + UHSO_DEV(OPTION, GTICON322, UHSO_STATIC_IFACE) +#undef UHSO_DEV +}; + +SYSCTL_NODE(_hw_usb, OID_AUTO, uhso, CTLFLAG_RW, 0, "USB uhso"); + +#ifdef USB_DEBUG +#ifdef UHSO_DEBUG +static int uhso_debug = UHSO_DEBUG; +#else +static int uhso_debug = -1; +#endif + +SYSCTL_INT(_hw_usb_uhso, OID_AUTO, debug, CTLFLAG_RW, + &uhso_debug, 0, "Debug level"); + +#define UHSO_DPRINTF(n, x, ...) {\ + if (uhso_debug >= n) {\ + printf("%s: " x, __func__, ##__VA_ARGS__);\ + }\ +} +#else +#define UHSO_DPRINTF(n, x, ...) +#endif + +#ifdef UHSO_DEBUG_HEXDUMP +# define UHSO_HEXDUMP(_buf, _len) do { \ + { \ + size_t __tmp; \ + const char *__buf = (const char *)_buf; \ + for (__tmp = 0; __tmp < _len; __tmp++) \ + printf("%02hhx ", *__buf++); \ + printf("\n"); \ + } \ +} while(0) +#else +# define UHSO_HEXDUMP(_buf, _len) +#endif + +enum { + UHSO_MUX_ENDPT_INTR = 0, + UHSO_MUX_ENDPT_MAX +}; + +enum { + UHSO_CTRL_READ = 0, + UHSO_CTRL_WRITE, + UHSO_CTRL_MAX +}; + +enum { + UHSO_IFNET_READ = 0, + UHSO_IFNET_WRITE, + UHSO_IFNET_MAX +}; + +enum { + UHSO_BULK_ENDPT_READ = 0, + UHSO_BULK_ENDPT_WRITE, + UHSO_BULK_ENDPT_INTR, + UHSO_BULK_ENDPT_MAX +}; + +static usb_callback_t uhso_mux_intr_callback; +static usb_callback_t uhso_mux_read_callback; +static usb_callback_t uhso_mux_write_callback; +static usb_callback_t uhso_bs_read_callback; +static usb_callback_t uhso_bs_write_callback; +static usb_callback_t uhso_bs_intr_callback; +static usb_callback_t uhso_ifnet_read_callback; +static usb_callback_t uhso_ifnet_write_callback; + +static const struct usb_config uhso_ctrl_config[UHSO_CTRL_MAX] = { + [UHSO_CTRL_READ] = { + .type = UE_CONTROL, + .endpoint = 0x00, + .direction = UE_DIR_ANY, + .flags = { .pipe_bof = 1, .short_xfer_ok = 1 }, + .bufsize = sizeof(struct usb_device_request) + 1024, + .callback = &uhso_mux_read_callback + }, + + [UHSO_CTRL_WRITE] = { + .type = UE_CONTROL, + .endpoint = 0x00, + .direction = UE_DIR_ANY, + .flags = { .pipe_bof = 1, .force_short_xfer = 1 }, + .bufsize = sizeof(struct usb_device_request) + 1024, + .timeout = 1000, + .callback = &uhso_mux_write_callback + } +}; + +static const struct usb_config uhso_mux_config[UHSO_MUX_ENDPT_MAX] = { + [UHSO_MUX_ENDPT_INTR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .flags = { .short_xfer_ok = 1 }, + .bufsize = 0, + .callback = &uhso_mux_intr_callback, + } +}; + +static const struct usb_config uhso_ifnet_config[UHSO_IFNET_MAX] = { + [UHSO_IFNET_READ] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .flags = { .pipe_bof = 1, .short_xfer_ok = 1 }, + .bufsize = MCLBYTES, + .callback = &uhso_ifnet_read_callback + }, + [UHSO_IFNET_WRITE] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .flags = { .pipe_bof = 1, .force_short_xfer = 1 }, + .bufsize = MCLBYTES, + .timeout = 5 * USB_MS_HZ, + .callback = &uhso_ifnet_write_callback + } +}; + +static const struct usb_config uhso_bs_config[UHSO_BULK_ENDPT_MAX] = { + [UHSO_BULK_ENDPT_READ] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .flags = { .pipe_bof = 1, .short_xfer_ok = 1 }, + .bufsize = 4096, + .callback = &uhso_bs_read_callback + }, + + [UHSO_BULK_ENDPT_WRITE] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .flags = { .pipe_bof = 1, .force_short_xfer = 1 }, + .bufsize = 8192, + .callback = &uhso_bs_write_callback + }, + + [UHSO_BULK_ENDPT_INTR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .flags = { .short_xfer_ok = 1 }, + .bufsize = 0, + .callback = &uhso_bs_intr_callback, + } +}; + +static int uhso_probe_iface(struct uhso_softc *, int, + int (*probe)(struct uhso_softc *, int)); +static int uhso_probe_iface_auto(struct uhso_softc *, int); +static int uhso_probe_iface_static(struct uhso_softc *, int); + +static int uhso_attach_muxserial(struct uhso_softc *, struct usb_interface *, + int type); +static int uhso_attach_bulkserial(struct uhso_softc *, struct usb_interface *, + int type); +static int uhso_attach_ifnet(struct uhso_softc *, struct usb_interface *, + int type); +static void uhso_test_autoinst(void *, struct usb_device *, + struct usb_attach_arg *); +static int uhso_driver_loaded(struct module *, int, void *); + +static void uhso_ucom_start_read(struct ucom_softc *); +static void uhso_ucom_stop_read(struct ucom_softc *); +static void uhso_ucom_start_write(struct ucom_softc *); +static void uhso_ucom_stop_write(struct ucom_softc *); +static void uhso_ucom_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); +static void uhso_ucom_cfg_set_dtr(struct ucom_softc *, uint8_t); +static void uhso_ucom_cfg_set_rts(struct ucom_softc *, uint8_t); + +static void uhso_if_init(void *); +static void uhso_if_start(struct ifnet *); +static void uhso_if_stop(struct uhso_softc *); +static int uhso_if_ioctl(struct ifnet *, u_long, caddr_t); +static int uhso_if_output(struct ifnet *, struct mbuf *, struct sockaddr *, + struct route *); +static void uhso_if_rxflush(void *); + +static device_probe_t uhso_probe; +static device_attach_t uhso_attach; +static device_detach_t uhso_detach; + +static device_method_t uhso_methods[] = { + DEVMETHOD(device_probe, uhso_probe), + DEVMETHOD(device_attach, uhso_attach), + DEVMETHOD(device_detach, uhso_detach), + { 0, 0 } +}; + +static driver_t uhso_driver = { + "uhso", + uhso_methods, + sizeof(struct uhso_softc) +}; + +static devclass_t uhso_devclass; +DRIVER_MODULE(uhso, uhub, uhso_driver, uhso_devclass, uhso_driver_loaded, 0); +MODULE_DEPEND(uhso, ucom, 1, 1, 1); +MODULE_DEPEND(uhso, usb, 1, 1, 1); +MODULE_VERSION(uhso, 1); + +static struct ucom_callback uhso_ucom_callback = { + .ucom_cfg_get_status = &uhso_ucom_cfg_get_status, + .ucom_cfg_set_dtr = &uhso_ucom_cfg_set_dtr, + .ucom_cfg_set_rts = &uhso_ucom_cfg_set_rts, + .ucom_start_read = uhso_ucom_start_read, + .ucom_stop_read = uhso_ucom_stop_read, + .ucom_start_write = uhso_ucom_start_write, + .ucom_stop_write = uhso_ucom_stop_write +}; + +static int +uhso_probe(device_t self) +{ + struct usb_attach_arg *uaa = device_get_ivars(self); + + if (uaa->usb_mode != USB_MODE_HOST) + return (ENXIO); + if (uaa->info.bConfigIndex != 0) + return (ENXIO); + if (uaa->device->ddesc.bDeviceClass != 0xff) + return (ENXIO); + + return (usbd_lookup_id_by_uaa(uhso_devs, sizeof(uhso_devs), uaa)); +} + +static int +uhso_attach(device_t self) +{ + struct uhso_softc *sc = device_get_softc(self); + struct usb_attach_arg *uaa = device_get_ivars(self); + struct usb_config_descriptor *cd; + struct usb_interface_descriptor *id; + struct sysctl_ctx_list *sctx; + struct sysctl_oid *soid; + struct sysctl_oid *tree, *tty_node; + struct ucom_softc *ucom; + struct uhso_tty *ht; + int i, error, port; + void *probe_f; + usb_error_t uerr; + char *desc; + + device_set_usb_desc(self); + + UHSO_DPRINTF(0, "Device is in modem mode, devClass=%x\n", + uaa->device->ddesc.bDeviceClass); + + sc->sc_dev = self; + sc->sc_udev = uaa->device; + mtx_init(&sc->sc_mtx, "uhso", NULL, MTX_DEF); + + sc->sc_ucom = NULL; + sc->sc_ttys = 0; + + cd = usbd_get_config_descriptor(uaa->device); + id = usbd_get_interface_descriptor(uaa->iface); + sc->sc_ctrl_iface_no = id->bInterfaceNumber; + + sc->sc_iface_no = uaa->info.bIfaceNum; + sc->sc_iface_index = uaa->info.bIfaceIndex; + + /* Setup control pipe */ + uerr = usbd_transfer_setup(uaa->device, + &sc->sc_iface_index, sc->sc_ctrl_xfer, + uhso_ctrl_config, UHSO_CTRL_MAX, sc, &sc->sc_mtx); + if (uerr) { + device_printf(self, "Failed to setup control pipe: %s\n", + usbd_errstr(uerr)); + goto out; + } + + if (USB_GET_DRIVER_INFO(uaa) == UHSO_STATIC_IFACE) + probe_f = uhso_probe_iface_static; + else if (USB_GET_DRIVER_INFO(uaa) == UHSO_AUTO_IFACE) + probe_f = uhso_probe_iface_auto; + else + goto out; + + error = uhso_probe_iface(sc, uaa->info.bIfaceNum, probe_f); + if (error != 0) + goto out; + + + sctx = device_get_sysctl_ctx(sc->sc_dev); + soid = device_get_sysctl_tree(sc->sc_dev); + + SYSCTL_ADD_STRING(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "type", + CTLFLAG_RD, uhso_port[UHSO_IFACE_PORT(sc->sc_type)], 0, + "Port available at this interface"); + + if (sc->sc_ttys > 0) { + SYSCTL_ADD_INT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "ports", + CTLFLAG_RD, &sc->sc_ttys, 0, "Number of attached serial ports"); + + tree = SYSCTL_ADD_NODE(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, + "port", CTLFLAG_RD, NULL, "Serial ports"); + } + + for (i = 0; i < sc->sc_ttys; i++) { + ht = &sc->sc_tty[i]; + ucom = &sc->sc_ucom[i]; + + + if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_MUX) + port = uhso_mux_port_map[ht->ht_muxport]; + else + port = UHSO_IFACE_PORT_TYPE(sc->sc_type); + + desc = uhso_port_type_sysctl[port]; + + tty_node = SYSCTL_ADD_NODE(sctx, SYSCTL_CHILDREN(tree), OID_AUTO, + desc, CTLFLAG_RD, NULL, ""); + + ht->ht_name[0] = 0; + if (sc->sc_ttys == 1) + snprintf(ht->ht_name, 32, "cuaU%d", ucom->sc_unit); + else { + snprintf(ht->ht_name, 32, "cuaU%d.%d", + ucom->sc_unit - ucom->sc_local_unit, + ucom->sc_local_unit); + } + + desc = uhso_port_type[port]; + SYSCTL_ADD_STRING(sctx, SYSCTL_CHILDREN(tty_node), OID_AUTO, + "tty", CTLFLAG_RD, ht->ht_name, 0, ""); + SYSCTL_ADD_STRING(sctx, SYSCTL_CHILDREN(tty_node), OID_AUTO, + "desc", CTLFLAG_RD, desc, 0, ""); + + if (bootverbose) + device_printf(sc->sc_dev, + "\"%s\" port at %s\n", desc, ht->ht_name); + } + + return (0); +out: + uhso_detach(sc->sc_dev); + return (ENXIO); + +} + +static int +uhso_detach(device_t self) +{ + struct uhso_softc *sc = device_get_softc(self); + int i; + + usbd_transfer_unsetup(sc->sc_xfer, 3); + usbd_transfer_unsetup(sc->sc_ctrl_xfer, UHSO_CTRL_MAX); + if (sc->sc_ttys > 0) { + ucom_detach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_ttys); + + for (i = 0; i < sc->sc_ttys; i++) { + if (sc->sc_tty[i].ht_muxport != -1) { + usbd_transfer_unsetup(sc->sc_tty[i].ht_xfer, + UHSO_CTRL_MAX); + } + } + + free(sc->sc_tty, M_USBDEV); + free(sc->sc_ucom, M_USBDEV); + } + + if (sc->sc_ifp != NULL) { + + callout_drain(&sc->sc_c); + + mtx_lock(&sc->sc_mtx); + uhso_if_stop(sc); + bpfdetach(sc->sc_ifp); + if_detach(sc->sc_ifp); + if_free(sc->sc_ifp); + mtx_unlock(&sc->sc_mtx); + + usbd_transfer_unsetup(sc->sc_if_xfer, UHSO_IFNET_MAX); + } + + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +static void +uhso_test_autoinst(void *arg, struct usb_device *udev, + struct usb_attach_arg *uaa) +{ + struct usb_interface *iface; + struct usb_interface_descriptor *id; + + if (uaa->dev_state != UAA_DEV_READY) + return; + + iface = usbd_get_iface(udev, 0); + if (iface == NULL) + return; + id = iface->idesc; + if (id == NULL || id->bInterfaceClass != UICLASS_MASS) + return; + if (usbd_lookup_id_by_uaa(uhso_devs, sizeof(uhso_devs), uaa)) + return; /* no device match */ + + if (usb_msc_eject(udev, 0, MSC_EJECT_REZERO) == 0) { + /* success, mark the udev as disappearing */ + uaa->dev_state = UAA_DEV_EJECTING; + } +} + +static int +uhso_driver_loaded(struct module *mod, int what, void *arg) +{ + switch (what) { + case MOD_LOAD: + /* register our autoinstall handler */ + uhso_etag = EVENTHANDLER_REGISTER(usb_dev_configured, + uhso_test_autoinst, NULL, EVENTHANDLER_PRI_ANY); + break; + case MOD_UNLOAD: + EVENTHANDLER_DEREGISTER(usb_dev_configured, uhso_etag); + break; + default: + return (EOPNOTSUPP); + } + return (0); +} + +static int uhso_probe_iface_auto(struct uhso_softc *sc, int index) +{ + struct usb_device_request req; + usb_error_t uerr; + uint16_t actlen = 0; + char port; + char buf[17] = {0}; + + req.bmRequestType = UT_READ_VENDOR_DEVICE; + req.bRequest = 0x86; + USETW(req.wValue, 0); + USETW(req.wIndex, 0); + USETW(req.wLength, 17); + + uerr = usbd_do_request_flags(sc->sc_udev, NULL, &req, buf, + 0, &actlen, USB_MS_HZ); + if (uerr != 0) { + device_printf(sc->sc_dev, "usbd_do_request_flags failed: %s\n", + usbd_errstr(uerr)); + return (0); + } + + UHSO_DPRINTF(3, "actlen=%d\n", actlen); + UHSO_HEXDUMP(buf, 17); + + if (index < 0 || index > 16) { + UHSO_DPRINTF(0, "Index %d out of range\n", index); + return (0); + } + + UHSO_DPRINTF(3, "index=%d, type=%x\n", index, buf[index]); + + if (buf[index] >= uhso_port_map_max) + port = 0; + else + port = uhso_port_map[(int)buf[index]]; + + if (port == UHSO_PORT_TYPE_NETWORK) + return (UHSO_IFACE_SPEC(UHSO_IF_BULK, + UHSO_PORT_NETWORK, port)); + else if (port == UHSO_PORT_TYPE_VOICE) + return (0); + else + return (UHSO_IFACE_SPEC(UHSO_IF_BULK, + UHSO_PORT_SERIAL, port)); + + return (0); +} + +static int +uhso_probe_iface_static(struct uhso_softc *sc, int index) +{ + struct usb_config_descriptor *cd; + + cd = usbd_get_config_descriptor(sc->sc_udev); + if (cd->bNumInterface <= 3) { + switch (index) { + case 0: + return UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, + UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, 0); + case 1: + return UHSO_IFACE_SPEC(UHSO_IF_BULK, + UHSO_PORT_SERIAL, UHSO_PORT_TYPE_DIAG); + case 2: + return UHSO_IFACE_SPEC(UHSO_IF_BULK, + UHSO_PORT_SERIAL, UHSO_PORT_TYPE_MODEM); + } + } + else { + switch (index) { + case 0: + return UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, + UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, 0); + case 1: + return UHSO_IFACE_SPEC(UHSO_IF_BULK, + UHSO_PORT_SERIAL, UHSO_PORT_TYPE_DIAG2); + case 2: + return UHSO_IFACE_SPEC(UHSO_IF_BULK, + UHSO_PORT_SERIAL, UHSO_PORT_TYPE_MODEM); + case 3: + return UHSO_IFACE_SPEC(UHSO_IF_BULK, + UHSO_PORT_SERIAL, UHSO_PORT_TYPE_DIAG); + } + } + return (0); +} + +static int +uhso_probe_iface(struct uhso_softc *sc, int index, + int (*probe)(struct uhso_softc *, int)) +{ + struct usb_interface *iface; + int type, error, error0; + + UHSO_DPRINTF(1, "Probing for interface %d, cb=%p\n", index, probe); + + type = probe(sc, index); + UHSO_DPRINTF(1, "Probe result %x\n", type); + if (type <= 0) + return (ENXIO); + + sc->sc_type = type; + iface = usbd_get_iface(sc->sc_udev, index); + + if (UHSO_IFACE_USB_TYPE(type) & (UHSO_IF_MUX | UHSO_IF_NET)) { + error0 = uhso_attach_muxserial(sc, iface, type); + error = uhso_attach_ifnet(sc, iface, type); + + if (error0 && error) + return (ENXIO); + + if (sc->sc_ttys > 0) { + error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom, + sc->sc_ttys, sc, &uhso_ucom_callback, &sc->sc_mtx); + if (error) { + device_printf(sc->sc_dev, "ucom_attach failed\n"); + return (ENXIO); + } + } + + mtx_lock(&sc->sc_mtx); + usbd_transfer_start(sc->sc_xfer[UHSO_MUX_ENDPT_INTR]); + mtx_unlock(&sc->sc_mtx); + } + else if ((UHSO_IFACE_USB_TYPE(type) & UHSO_IF_BULK) && + UHSO_IFACE_PORT(type) & UHSO_PORT_SERIAL) { + + error = uhso_attach_bulkserial(sc, iface, type); + if (error) + return (ENXIO); + + error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom, + sc->sc_ttys, sc, &uhso_ucom_callback, &sc->sc_mtx); + if (error) { + device_printf(sc->sc_dev, "ucom_attach failed\n"); + return (ENXIO); + } + } + else { + return (ENXIO); + } + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 04:20:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9399A1065695; Wed, 13 Jan 2010 04:20:33 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 26BA68FC23; Wed, 13 Jan 2010 04:20:32 +0000 (UTC) Received: from c122-106-161-214.carlnfd1.nsw.optusnet.com.au (c122-106-161-214.carlnfd1.nsw.optusnet.com.au [122.106.161.214]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0D4KTiV020895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Jan 2010 15:20:30 +1100 Date: Wed, 13 Jan 2010 15:20:29 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Brooks Davis In-Reply-To: <201001120749.o0C7nZ7j019654@svn.freebsd.org> Message-ID: <20100113140806.O61578@delplex.bde.org> References: <201001120749.o0C7nZ7j019654@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202143 - in head/sys: boot/forth compat/linux compat/svr4 i386/ibcs2 kern rpc security/audit sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 04:20:33 -0000 On Tue, 12 Jan 2010, Brooks Davis wrote: > Log: > Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic > kern.ngroups+1. kern.ngroups can range from NGROUPS_MAX=1023 to > INT_MAX-1. Given that the Windows group limit is 1024, this range > should be sufficient for most applications. INT_MAX-1 is a bogus limit, since many overflows still occur long before that limit is reached. > Modified: head/sys/compat/linux/linux_misc.c > ============================================================================== > --- head/sys/compat/linux/linux_misc.c Tue Jan 12 07:40:58 2010 (r202142) > +++ head/sys/compat/linux/linux_misc.c Tue Jan 12 07:49:34 2010 (r202143) > @@ -1138,7 +1138,7 @@ linux_setgroups(struct thread *td, struc > struct proc *p; > > ngrp = args->gidsetsize; > - if (ngrp < 0 || ngrp >= NGROUPS) > + if (ngrp < 0 || ngrp > ngroups_max) > return (EINVAL); This seems to have an off-by-1 error, since elsewhere ngrps can be ngroups_max + 1. > linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); > error = copyin(args->grouplist, linux_gidset, ngrp * sizeof(l_gid_t)); > > Modified: head/sys/compat/linux/linux_uid16.c > ============================================================================== > --- head/sys/compat/linux/linux_uid16.c Tue Jan 12 07:40:58 2010 (r202142) > +++ head/sys/compat/linux/linux_uid16.c Tue Jan 12 07:49:34 2010 (r202143) > @@ -109,7 +109,7 @@ linux_setgroups16(struct thread *td, str > #endif > > ngrp = args->gidsetsize; > - if (ngrp < 0 || ngrp >= NGROUPS) > + if (ngrp < 0 || ngrp > ngroups_max) > return (EINVAL); > linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); > error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); Here the multiplication overflows on 32-bit machines when ngroups_max is only about INT_MAX/2. The overflow when ngroups_max equals its bogus limit (INT_MAX - 1) can occur even if no more than 16 groups are ever allocated, since the user can pass in a proposterously large ngrp in places like here. The behaviour is then undefined. In most cases the overflow gives a value so large that the malloc() should fail, but it's an M_WAITOK malloc so it must hang or panic. The overflow can also be to a small value (e.g., 0x40000001 * (size_t)4 = 4. Then the malloc() should succeed, and it is possible for the user buffer to have 1 element although not 0x40000001, so the copyin() and the syscall will succeed too, but the syscall should fail. Even a not so large value of ngroups_max like INT_MAX/2 gives an effectively-unbounded malloc() service. Similarly for other setgroups(), except overflow occurs at INT_MAX/4 with 32-bit gid_t. > Modified: head/sys/kern/kern_prot.c > ============================================================================== > --- head/sys/kern/kern_prot.c Tue Jan 12 07:40:58 2010 (r202142) > +++ head/sys/kern/kern_prot.c Tue Jan 12 07:49:34 2010 (r202143) > @@ -283,7 +283,7 @@ getgroups(struct thread *td, register st > u_int ngrp; > int error; > > - ngrp = MIN(uap->gidsetsize, NGROUPS); > + ngrp = MIN(uap->gidsetsize, ngroups_max + 1); > groups = malloc(ngrp * sizeof(*groups), M_TEMP, M_WAITOK); > error = kern_getgroups(td, &ngrp, groups); > if (error) Use of the MIN() and MAX() macros in the kernel are style bugs. They were removed in 4.4BSD and brought back by FreeBSD. It is a shame to see them used even in kern. Large ngroups_max gives an unbounded malloc() service via getgroups() too. Here the user can pass in an enormous uap->gidsetsize and have it all malloced, subject only to the ngroups_max limit, despite kern_ngroups() only using an array of size precisely cred->cr_ngroups elements. The malloc() is also wasteful (unused) when uap->gidsetsize < cred->cr_ngroups. kern_getgroups() API gets in the way of cleaning this up. > Modified: head/sys/kern/subr_param.c > ============================================================================== > --- head/sys/kern/subr_param.c Tue Jan 12 07:40:58 2010 (r202142) > +++ head/sys/kern/subr_param.c Tue Jan 12 07:49:34 2010 (r202143) > @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); > #include "opt_param.h" > #include "opt_maxusers.h" > > +#include > #include > #include > #include Style bug (unsorting). > @@ -228,6 +230,18 @@ init_param1(void) > TUNABLE_ULONG_FETCH("kern.maxssiz", &maxssiz); > sgrowsiz = SGROWSIZ; > TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz); > + > + /* > + * Let the administrator set {NGROUPS_MAX}, but disallow values > + * less than NGROUPS_MAX which would violate POSIX.1-2008 or > + * greater than INT_MAX-1 which would result in overflow. > + */ > + ngroups_max = NGROUPS_MAX; > + TUNABLE_INT_FETCH("kern.ngroups", &ngroups_max); > + if (ngroups_max < NGROUPS_MAX) > + ngroups_max = NGROUPS_MAX; > + if (ngroups_max > INT_MAX - 1) > + ngroups_max = INT_MAX - 1; > } Limiting parameters is a waste of time and space, especially when it doesn't work. Anyone wanting an unusuable system can easily get it by misconfiguring one of the many unlimited parameters, or by selecting a combination of parameters that requires too man resources to work. It is very difficult to limit all combinations of parameters without excessively limiting individual parameters. Here we could impose some arbitrary reasonable limit like 64K, but that wouldn't do anything except annoy users wanting to test or even use > 64K. A much larger arbitrary limit like 1M wouldn't provide much protection against the unbounded malloc() service, at least when it is unprivileged. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 08:53:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C951A1065672; Wed, 13 Jan 2010 08:53:23 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8B648FC17; Wed, 13 Jan 2010 08:53:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0D8rNvT056532; Wed, 13 Jan 2010 08:53:23 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0D8rN5R056530; Wed, 13 Jan 2010 08:53:23 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001130853.o0D8rN5R056530@svn.freebsd.org> From: David Xu Date: Wed, 13 Jan 2010 08:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202185 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 08:53:23 -0000 Author: davidxu Date: Wed Jan 13 08:53:23 2010 New Revision: 202185 URL: http://svn.freebsd.org/changeset/base/202185 Log: Return SEM_FAILED instead of NULL, though there are same, but the SEM_FAILED is more suitable name. In function, sem_close(), always set errno on error. Modified: head/lib/libc/gen/sem_new.c Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Wed Jan 13 08:21:19 2010 (r202184) +++ head/lib/libc/gen/sem_new.c Wed Jan 13 08:53:23 2010 (r202185) @@ -147,13 +147,13 @@ _sem_open(const char *name, int flags, . if (name[0] != '/') { errno = EINVAL; - return (NULL); + return (SEM_FAILED); } name++; if (flags & ~(O_CREAT|O_EXCL)) { errno = EINVAL; - return (NULL); + return (SEM_FAILED); } _pthread_once(&once, sem_module_init); @@ -275,6 +275,7 @@ _sem_close(sem_t *sem) return (0); } _pthread_mutex_unlock(&sem_llock); + errno = EINVAL; return (-1); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 14:17:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A1811065670; Wed, 13 Jan 2010 14:17:22 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 28D128FC18; Wed, 13 Jan 2010 14:17:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DEHM08030885; Wed, 13 Jan 2010 14:17:22 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DEHMUc030882; Wed, 13 Jan 2010 14:17:22 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001131417.o0DEHMUc030882@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 13 Jan 2010 14:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202187 - head/sys/fs/tmpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 14:17:22 -0000 Author: jh Date: Wed Jan 13 14:17:21 2010 New Revision: 202187 URL: http://svn.freebsd.org/changeset/base/202187 Log: - Fix some style bugs in tmpfs_mount(). [1] - Remove a stale comment about tmpfs_mem_info() 'total' argument. Reported by: bde [1] Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Wed Jan 13 12:21:58 2010 (r202186) +++ head/sys/fs/tmpfs/tmpfs.h Wed Jan 13 14:17:21 2010 (r202187) @@ -493,10 +493,6 @@ int tmpfs_truncate(struct vnode *, off_t * Returns information about the number of available memory pages, * including physical and virtual ones. * - * If 'total' is TRUE, the value returned is the total amount of memory - * pages configured for the system (either in use or free). - * If it is FALSE, the value returned is the amount of free memory pages. - * * Remember to remove TMPFS_PAGES_RESERVED from the returned value to avoid * excessive memory usage. * Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 13 12:21:58 2010 (r202186) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 13 14:17:21 2010 (r202187) @@ -185,15 +185,15 @@ tmpfs_mount(struct mount *mp) ino_t nodes; int error; /* Size counters. */ - ino_t nodes_max; - u_quad_t size_max; + ino_t nodes_max; + u_quad_t size_max; /* Root node attributes. */ - uid_t root_uid; - gid_t root_gid; - mode_t root_mode; + uid_t root_uid; + gid_t root_gid; + mode_t root_mode; - struct vattr va; + struct vattr va; if (vfs_filteropt(mp->mnt_optnew, tmpfs_opts)) return (EINVAL); @@ -239,7 +239,7 @@ tmpfs_mount(struct mount *mp) * allowed to use, based on the maximum size the user passed in * the mount structure. A value of zero is treated as if the * maximum available space was requested. */ - if (size_max < PAGE_SIZE || size_max > (SIZE_MAX - PAGE_SIZE)) + if (size_max < PAGE_SIZE || size_max > SIZE_MAX - PAGE_SIZE) pages = SIZE_MAX; else pages = howmany(size_max, PAGE_SIZE); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 14:22:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F3B41065676; Wed, 13 Jan 2010 14:22:04 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx1.freebsd.org (Postfix) with ESMTP id 3E01F8FC18; Wed, 13 Jan 2010 14:22:04 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw02.mail.saunalahti.fi (Postfix) with SMTP id F05E013994B; Wed, 13 Jan 2010 16:21:59 +0200 (EET) Date: Wed, 13 Jan 2010 16:21:59 +0200 From: Jaakko Heinonen To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100113142159.GA3044@a91-153-117-195.elisa-laajakaista.fi> References: <201001131417.o0DEHMUc030882@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001131417.o0DEHMUc030882@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r202187 - head/sys/fs/tmpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 14:22:04 -0000 On 2010-01-13, Jaakko Heinonen wrote: > Author: jh > Date: Wed Jan 13 14:17:21 2010 > New Revision: 202187 > URL: http://svn.freebsd.org/changeset/base/202187 > > Log: > - Fix some style bugs in tmpfs_mount(). [1] > - Remove a stale comment about tmpfs_mem_info() 'total' argument. > > Reported by: bde [1] Approved by: trasz (mentor) -- Jaakko From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 16:05:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D7AC106568B; Wed, 13 Jan 2010 16:05:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 59B958FC1C; Wed, 13 Jan 2010 16:05:35 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id DAD3746B39; Wed, 13 Jan 2010 11:05:34 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 2E9A98A01F; Wed, 13 Jan 2010 11:05:22 -0500 (EST) From: John Baldwin To: Doug Barton Date: Wed, 13 Jan 2010 08:44:21 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091231; KDE/4.3.1; amd64; ; ) References: <201001101744.o0AHiM2d095302@svn.freebsd.org> <20100110.210204.787670930858346133.imp@bsdimp.com> <4B4D109A.5060500@FreeBSD.org> In-Reply-To: <4B4D109A.5060500@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001130844.21241.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 13 Jan 2010 11:05:22 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "M. Warner Losh" , freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 16:05:35 -0000 On Tuesday 12 January 2010 7:15:22 pm Doug Barton wrote: > On 1/10/2010 8:02 PM, M. Warner Losh wrote: > > In message: > > Doug Barton writes: > > : On Sun, 10 Jan 2010, Warner Losh wrote: > > : > > : > Author: imp > > : > Date: Sun Jan 10 17:44:22 2010 > > : > New Revision: 202019 > > : > URL: http://svn.freebsd.org/changeset/base/202019 > > : > > > : > Log: > > : > Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. > > : > > : Thanks for doing this, however the comment about how to include the > > : whole file (including the comments) were not included. Do I need to do > > : this part of it myself? No problem if so, I just want to be sure to > > : get it done in time to MFC it before the freeze for 7.3-release. > > > > In general, we don't put big comments like that in the config files, > > preferring to leave them to NOTES. I was just following that > > convention... > > Understood, however given that there is plenty of room for confusion on > this point because the default is NOT to include the comments I think > that some explanation is justified. My original text was: > > # Store the plain version of the configuration file in the kernel itself. > # To store the entire file, including comments, put this in /etc/src.conf: > # CONFIGARGS= -C > # See config(8) for more details. Just put this in sys/conf/NOTES. Users already know to look in NOTES for further details about kernel options. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 16:24:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 732561065692; Wed, 13 Jan 2010 16:24:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 21D868FC1E; Wed, 13 Jan 2010 16:24:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0DGIHht092123; Wed, 13 Jan 2010 09:18:17 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 13 Jan 2010 09:19:13 -0700 (MST) Message-Id: <20100113.091913.1023414010414027273.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <201001130844.21241.jhb@freebsd.org> References: <20100110.210204.787670930858346133.imp@bsdimp.com> <4B4D109A.5060500@FreeBSD.org> <201001130844.21241.jhb@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, dougb@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 16:24:06 -0000 In message: <201001130844.21241.jhb@freebsd.org> John Baldwin writes: : On Tuesday 12 January 2010 7:15:22 pm Doug Barton wrote: : > On 1/10/2010 8:02 PM, M. Warner Losh wrote: : > > In message: : > > Doug Barton writes: : > > : On Sun, 10 Jan 2010, Warner Losh wrote: : > > : : > > : > Author: imp : > > : > Date: Sun Jan 10 17:44:22 2010 : > > : > New Revision: 202019 : > > : > URL: http://svn.freebsd.org/changeset/base/202019 : > > : > : > > : > Log: : > > : > Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. : > > : : > > : Thanks for doing this, however the comment about how to include the : > > : whole file (including the comments) were not included. Do I need to do : > > : this part of it myself? No problem if so, I just want to be sure to : > > : get it done in time to MFC it before the freeze for 7.3-release. : > > : > > In general, we don't put big comments like that in the config files, : > > preferring to leave them to NOTES. I was just following that : > > convention... : > : > Understood, however given that there is plenty of room for confusion on : > this point because the default is NOT to include the comments I think : > that some explanation is justified. My original text was: : > : > # Store the plain version of the configuration file in the kernel itself. : > # To store the entire file, including comments, put this in /etc/src.conf: : > # CONFIGARGS= -C : > # See config(8) for more details. : : Just put this in sys/conf/NOTES. Users already know to look in NOTES for : further details about kernel options. This exact comment already is in NOTES. Warner From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 17:29:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E156106566C; Wed, 13 Jan 2010 17:29:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF5D58FC14; Wed, 13 Jan 2010 17:29:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DHTt6j073333; Wed, 13 Jan 2010 17:29:55 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DHTt0M073326; Wed, 13 Jan 2010 17:29:55 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131729.o0DHTt0M073326@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 17:29:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202188 - in head: include lib/libc/gen lib/libulog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 17:29:56 -0000 Author: ed Date: Wed Jan 13 17:29:55 2010 New Revision: 202188 URL: http://svn.freebsd.org/changeset/base/202188 Log: Implement . The utmpx interface is the standardized interface of the user accounting database. The standard only defines a subset of the functions that were present in System V-like systems. I'd like to highlight some of the traits my implementation has: - The standard allows the on-disk format to be different than the in-memory representation (struct utmpx). Most operating systems don't do this, but we do. This allows us to keep our ABI more stable, while giving us the opportunity to modify the on-disk format. It also allows us to use a common file format across different architectures (i.e. byte ordering). - Our implementation of pututxline() also updates wtmp and lastlog (now called utx.log and utx.lastlogin). This means the databases are more likely to be in sync. - Care must be taken that our implementation discard any fields that are not applicable. For example, our DEAD_PROCESS records do not hold a TTY name. Just a time stamp, a record identifier and a process identifier. It also guarantees that strings (ut_host, ut_line and ut_user) are null terminated. ut_id is obviously not null terminated, because it's not a string. - The API and its behaviour should be conformant to POSIX, but there may be things that slightly deviate from the standard. This implementation uses separate file descriptors when writing to the log files. It also doesn't use getutxid() to search for a field to overwrite. It uses an allocation strategy similar to getutxid(), but prevents DEAD_PROCESS records from accumulating. Make sure libulog doesn't overwrite the manpages shipped with our C library. Also keep the symbol list in Symbol.map sorted. I'll bump __FreeBSD_version later this evening. I first want to convert everything to and get rid of . Added: head/include/utmpx.h (contents, props changed) head/lib/libc/gen/getutxent.3 (contents, props changed) head/lib/libc/gen/getutxent.c (contents, props changed) head/lib/libc/gen/pututxline.c (contents, props changed) head/lib/libc/gen/utxdb.c (contents, props changed) head/lib/libc/gen/utxdb.h (contents, props changed) Modified: head/include/Makefile head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libulog/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Wed Jan 13 14:17:21 2010 (r202187) +++ head/include/Makefile Wed Jan 13 17:29:55 2010 (r202188) @@ -23,8 +23,8 @@ INCS= a.out.h ar.h assert.h bitstring.h stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \ strings.h sysexits.h tar.h termios.h tgmath.h \ time.h timeconv.h timers.h ttyent.h \ - ulimit.h unistd.h utime.h utmp.h uuid.h varargs.h vis.h wchar.h \ - wctype.h wordexp.h + ulimit.h unistd.h utime.h utmp.h utmpx.h uuid.h varargs.h vis.h \ + wchar.h wctype.h wordexp.h MHDRS= float.h floatingpoint.h stdarg.h Added: head/include/utmpx.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/include/utmpx.h Wed Jan 13 17:29:55 2010 (r202188) @@ -0,0 +1,88 @@ +/*- + * Copyright (c) 2010 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _UTMPX_H_ +#define _UTMPX_H_ + +#include +#include +#include + +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; +#define _PID_T_DECLARED +#endif + +struct utmpx { + short ut_type; /* Type of entry. */ + struct timeval ut_tv; /* Time entry was made. */ + char ut_id[8]; /* Record identifier. */ + pid_t ut_pid; /* Process ID. */ + char ut_user[32]; /* User login name. */ + char ut_line[16]; /* Device name. */ +#if __BSD_VISIBLE + char ut_host[128]; /* Remote hostname. */ +#else + char __ut_host[128]; +#endif + char __ut_spare[64]; +}; + +#define EMPTY 0 /* No valid user accounting information. */ +#define BOOT_TIME 1 /* Time of system boot. */ +#define OLD_TIME 2 /* Time when system clock changed. */ +#define NEW_TIME 3 /* Time after system clock changed. */ +#define USER_PROCESS 4 /* A process. */ +#define INIT_PROCESS 5 /* A process spawned by the init process. */ +#define LOGIN_PROCESS 6 /* The session leader of a logged-in user. */ +#define DEAD_PROCESS 7 /* A session leader who has exited. */ +#if __BSD_VISIBLE +#define SHUTDOWN_TIME 8 /* Time of system shutdown. */ +#endif + +#if __BSD_VISIBLE +#define UTXDB_ACTIVE 0 /* Active login sessions. */ +#define UTXDB_LASTLOGIN 1 /* Last login sessions. */ +#define UTXDB_LOG 2 /* Log indexed by time. */ +#endif + +__BEGIN_DECLS +void endutxent(void); +struct utmpx *getutxent(void); +struct utmpx *getutxid(const struct utmpx *); +struct utmpx *getutxline(const struct utmpx *); +struct utmpx *pututxline(const struct utmpx *); +void setutxent(void); + +#if __BSD_VISIBLE +struct utmpx *getutxuser(const char *); +int setutxdb(int, const char *); +#endif +__END_DECLS + +#endif /* !_UTMPX_H_ */ Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Wed Jan 13 14:17:21 2010 (r202187) +++ head/lib/libc/gen/Makefile.inc Wed Jan 13 17:29:55 2010 (r202188) @@ -18,12 +18,12 @@ SRCS+= __getosreldate.c __xuname.c \ gethostname.c getloadavg.c getlogin.c getmntinfo.c getnetgrent.c \ getosreldate.c getpagesize.c getpagesizes.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ - getusershell.c getvfsbyname.c glob.c \ + getusershell.c getutxent.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posix_spawn.c \ - psignal.c pw_scan.c pwcache.c \ + psignal.c pututxline.c pw_scan.c pwcache.c \ raise.c readdir.c readpassphrase.c rewinddir.c \ scandir.c seed48.c seekdir.c sem.c sem_new.c semctl.c \ setdomainname.c sethostname.c setjmperr.c setmode.c \ @@ -32,7 +32,7 @@ SRCS+= __getosreldate.c __xuname.c \ sysconf.c sysctl.c sysctlbyname.c sysctlnametomib.c \ syslog.c telldir.c termios.c time.c times.c timezone.c tls.c \ ttyname.c ttyslot.c ualarm.c ulimit.c uname.c unvis.c \ - usleep.c utime.c valloc.c vis.c wait.c wait3.c waitpid.c \ + usleep.c utime.c utxdb.c valloc.c vis.c wait.c wait3.c waitpid.c \ wordexp.c SYM_MAPS+=${.CURDIR}/gen/Symbol.map @@ -54,7 +54,7 @@ MAN+= alarm.3 arc4random.3 \ getgrent.3 getgrouplist.3 gethostname.3 getloadavg.3 \ getmntinfo.3 getnetgrent.3 getosreldate.3 getpagesize.3 \ getpagesizes.3 getpass.3 getpeereid.3 getprogname.3 getpwent.3 \ - getttyent.3 getusershell.3 getvfsbyname.3 \ + getttyent.3 getusershell.3 getutxent.3 getvfsbyname.3 \ glob.3 initgroups.3 isgreater.3 ldexp.3 lockf.3 makecontext.3 \ modf.3 \ nice.3 nlist.3 pause.3 popen.3 \ @@ -126,6 +126,10 @@ MLINKS+=getttyent.3 endttyent.3 getttyen getttyent.3 isdialuptty.3 getttyent.3 isnettty.3 \ getttyent.3 setttyent.3 MLINKS+=getusershell.3 endusershell.3 getusershell.3 setusershell.3 +MLINKS+=getutxent.3 endutxent.3 getutxent.3 getutxid.3 \ + getutxent.3 getutxline.3 getutxent.3 getutxuser.3 \ + getutxent.3 pututxline.3 getutxent.3 setutxdb.3 \ + getutxent.3 setutxent.3 MLINKS+=glob.3 globfree.3 MLINKS+=isgreater.3 isgreaterequal.3 isgreater.3 isless.3 \ isgreater.3 islessequal.3 isgreater.3 islessgreater.3 \ Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Wed Jan 13 14:17:21 2010 (r202187) +++ head/lib/libc/gen/Symbol.map Wed Jan 13 17:29:55 2010 (r202188) @@ -359,17 +359,25 @@ FBSD_1.1 { FBSD_1.2 { basename_r; + endutxent; getpagesizes; + getutxent; + getutxid; + getutxline; + getutxuser; + pututxline; sem_close; sem_destroy; sem_getvalue; sem_init; sem_open; + sem_post; sem_timedwait; sem_trywait; - sem_post; - sem_wait; sem_unlink; + sem_wait; + setutxdb; + setutxent; }; FBSDprivate_1.0 { Added: head/lib/libc/gen/getutxent.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/getutxent.3 Wed Jan 13 17:29:55 2010 (r202188) @@ -0,0 +1,440 @@ +.\" Copyright (c) 2010 Ed Schouten +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 8, 2010 +.Os +.Dt GETUTXENT 3 +.Sh NAME +.Nm endutxent , +.Nm getutxent , +.Nm getutxid , +.Nm getutxline , +.Nm getutxuser , +.Nm pututxline , +.Nm setutxdb , +.Nm setutxent +.Nd user accounting database functions +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In utmpx.h +.Ft void +.Fn endutxent "void" +.Ft struct utmpx * +.Fn getutxent "void" +.Ft struct utmpx * +.Fn getutxid "const struct utmpx *id" +.Ft struct utmpx * +.Fn getutxline "const struct utmpx *line" +.Ft struct utmpx * +.Fn getutxuser "const char *user" +.Ft struct utmpx * +.Fn pututxline "const struct utmpx *utmpx" +.Ft int +.Fn setutxdb "int type" "const char *file" +.Ft void +.Fn setutxent "void" +.Sh DESCRIPTION +These functions operate on the user accounting database which stores +records of various system activities, such as user login and logouts, +but also system startups and shutdowns and modifications to the system's +clock. +The system stores these records in three databases, each having a +different purpose: +.Bl -tag -width indent +.It Pa /var/run/utx.active +Log of currently active user login sessions. +This file is similar to the traditional +.Pa utmp +file. +This file only contains process related entries, such as user login and +logout records. +.It Pa /var/log/utx.lastlogin +Log of last user login entries per user. +This file is similar to the traditional +.Pa lastlog +file. +This file only contains user login records for users who have at least +logged in once. +.It Pa /var/log/utx.log +Log of all entries, sorted by date of addition. +This file is similar to the traditional +.Pa wtmp +file. +This file may contain any type of record described below. +.El +.Pp +Each entry in these databases is defined by the structure +.Vt utmpx +found in the include file +.In utmpx.h : +.Bd -literal -offset indent +struct utmpx { + short ut_type; /* Type of entry. */ + struct timeval ut_tv; /* Time entry was made. */ + char ut_id[]; /* Record identifier. */ + pid_t ut_pid; /* Process ID. */ + char ut_user[]; /* User login name. */ + char ut_line[]; /* Device name. */ + char ut_host[]; /* Remote hostname. */ +}; +.Ed +.Pp +The +.Fa ut_type +field indicates the type of the log entry, which can have one of the +following values: +.Bl -tag -width LOGIN_PROCESS +.It Dv EMPTY +No valid user accounting information. +.It Dv BOOT_TIME +Identifies time of system boot. +.It Dv SHUTDOWN_TIME +Identifies time of system shutdown. +.It Dv OLD_TIME +Identifies time when system clock changed. +.It Dv NEW_TIME +Identifies time after system clock changed. +.It Dv USER_PROCESS +Identifies a process. +.It Dv INIT_PROCESS +Identifies a process spawned by the init process. +.It Dv LOGIN_PROCESS +Identifies the session leader of a logged-in user. +.It Dv DEAD_PROCESS +Identifies a session leader who has exited. +.El +.Pp +Entries of type +.Dv INIT_PROCESS +and +.Dv LOGIN_PROCESS +are not processed by this implementation. +.Pp +Other fields inside the structure are: +.Bl -tag -width ut_user +.It Fa ut_tv +The time the event occured. +This field is used for all types of entries. +.It Fa ut_id +An identifier that is used to refer to the entry. +This identifier can be used to remove or replace a login entry by +writing a new entry to the database containing the same value for +.Fa ut_id . +This field is only applicable to entries of type +.Dv USER_PROCESS , +.Dv INIT_PROCESS , +.Dv LOGIN_PROCESS +and +.Dv DEAD_PROCESS . +.It Fa ut_pid +The process identifier of the session leader of the login session. +This field is only applicable to entries of type +.Dv USER_PROCESS , +.Dv INIT_PROCESS , +.Dv LOGIN_PROCESS +and +.Dv DEAD_PROCESS . +.It Fa ut_user +The user login name corresponding with the login session. +This field is only applicable to entries of type +.Dv USER_PROCESS +and +.Dv INIT_PROCESS . +For +.Dv INIT_PROCESS +entries this entry typically contains the name of the login process. +.It Fa ut_line +The name of the TTY character device, without the leading +.Pa /dev/ +prefix, corresponding with the device used to facilitate the user login +session. +If no TTY character device is used, this field is left blank. +This field is only applicable to entries of type +.Dv USER_PROCESS . +.It Fa ut_host +The network hostname of the remote system, connecting to perform a user +login. +If the user login session is not performed across a network, this field +is left blank. +This field is only applicable to entries of type +.Dv USER_PROCESS . +.El +.Pp +This implementation guarantees all inapplicable fields are discarded. +The +.Fa ut_user , +.Fa ut_line +and +.Fa ut_host +fields of the structure returned by the library functions are also +guaranteed to be null-terminated in this implementation. +.Pp +The +.Fn getutxent +function can be used to read the next entry from the user accounting +database. +.Pp +The +.Fn getutxid +function searches for the next entry in the database of which the +behaviour is based on the +.Fa ut_type +field of +.Fa id . +If +.Fa ut_type +has a value of +.Dv BOOT_TIME , +.Dv SHUTDOWN_TIME , +.Dv OLD_TIME +or +.Dv NEW_TIME , +it will return the next entry whose +.Fa ut_type +has an equal value. +If +.Fa ut_type +has a value of +.Dv USER_PROCESS , +.Dv INIT_PROCESS , +.Dv LOGIN_PROCESS +or +.Dv DEAD_PROCESS , +it will return the next entry whose +.Fa ut_type +has one of the previously mentioned values and whose +.Fa ut_id +is equal. +.Pp +The +.Fn getutxline +function searches for the next entry in the database whose +.Fa ut_type +has a value of +.Dv USER_PROCESS +or +.Dv LOGIN_PROCESS +and whose +.Fa ut_line +is equal to the the same field in +.Fa line . +.Pp +The +.Fn getutxuser +function searches for the next entry in the database whose +.Fa ut_type +has a value of +.Dv USER_PROCESS +and whose +.Fa ut_user +is equal to +.Fa user . +.Pp +The previously mentioned functions will automatically try to open the +user accounting database if not already done so. +The +.Fn setutxdb +and +.Fn setutxent +functions allow the database to be opened manually, causing the offset +within the user accounting database to be rewound. +The +.Fn endutxent +function closes the database. +.Pp +The +.Fn setutxent +database always opens the active sessions database. +The +.Fn setutxdb +function opens the database identified by +.Fa type , +whose value is either +.Dv UTXDB_ACTIVE , +.Dv UTXDB_LASTLOGIN +or +.Dv UTXDB_LOG . +It will open a custom file with filename +.Fa file +instead of the system-default if +.Fa file +is not null. +Care must be taken that when using a custom filename, +.Fa type +still has to match with the actual format, since each database may use +its own file format. +.Pp +The +.Fn pututxline +function writes record +.Fa utmpx +to the system-default user accounting databases. +The value of +.Fa ut_type +determines which databases are modified. +.Pp +Entries of type +.Dv BOOT_TIME , +.Dv SHUTDOWN_TIME , +.Dv OLD_TIME +and +.Dv NEW_TIME +will only be written to +.Pa /var/log/utx.log . +.Pp +Entries of type +.Dv USER_PROCESS +will also be written to +.Pa /var/run/utx.active . +It will only be written to +.Pa /var/log/utx.lastlogin +if +.Fa ut_tv +for that user has a greater value than the existing entry or when no +entry for the user has been found. +.Pp +Entries of type +.Dv DEAD_PROCESS +will only be written to +.Pa /var/log/utx.log +and +.Pa /var/run/utx.active +if a corresponding +.Dv USER_PROCESS , +.Dv INIT_PROCESS +or +.Dv LOGIN_PROCESS +entry whose +.Fa ut_id +is equal has been found in the latter. +.Pp +In addition, entries of type +.Dv BOOT_TIME +and +.Dv SHUTDOWN_TIME +will cause all entries in +.Pa /var/run/utx.active +to be discarded. +.Pp +All entries whose type has not been mentioned previously, are discarded +by this implementation of +.Fn pututxline . +.Sh RETURN VALUES +The +.Fn getutxent , +.Fn getutxid , +.Fn getutxline , +and +.Fn getutxuser +functions return a pointer to an +.Vt utmpx +structure that matches the mentioned constraints on success or +.Dv NULL +when reaching the end-of-file or when an error occurs. +.Pp +The +.Fn pututxline +function returns a pointer to an +.Vt utmpx +structure containing a copy of the structure written to disk upon +success. +It returns +.Dv NULL +when the provided +.Vt utmpx +is invalid. +This may be because +.Fa ut_type +is invalid or +.Fa ut_type +has a value of +.Dv DEAD_PROCESS +and an entry with an identifier with a value equal to the field +.Fa ut_id +was not found. +.Pp +The +.Fn setutxdb +function returns 0 if the user accounting database was opened +successfully. +Otherwise, -1 is returned and the global variable +.Va errno +is set to indicate the error. +.Sh ERRORS +In addition to the error conditions described in +.Xr fopen 3 , +the +.Fn setutxdb +function can generate the following errors: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa type +argument contains a value not supported by this implementation. +.It Bq Er EFTYPE +The file format is invalid. +.El +.Sh SEE ALSO +.Xr last 1 , +.Xr write 1 , +.Xr getpid 2 , +.Xr gettimeofday 2 , +.Xr tty 4 , +.Xr ac 8 , +.Xr newsyslog 8 +.Sh STANDARDS +The +.Fn endutxent , +.Fn getutxent , +.Fn getutxid , +.Fn getutxline , +.Fn pututxline +and +.Fn setutxent +functions are expected to conform to +.St -p1003.1-2008 . +.Pp +The +.Fn getutxuser +and +.Fn setutxdb +functions, +the +.Fa ut_host +field of the +.Vt utmpx +structure and +.Dv SHUTDOWN_TIME +are extensions. +.Sh HISTORY +These functions appeared in +.Fx 9.0 . +They replaced the +.In utmp.h +interface. +.Sh AUTHORS +.An Ed Schouten Aq ed@FreeBSD.org Added: head/lib/libc/gen/getutxent.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/getutxent.c Wed Jan 13 17:29:55 2010 (r202188) @@ -0,0 +1,232 @@ +/*- + * Copyright (c) 2010 Ed Schouten + * 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 "namespace.h" +#include +#include +#include +#include +#include +#include +#include +#include "utxdb.h" +#include "un-namespace.h" + +static FILE *uf = NULL; +static int udb; +static struct utmpx utx; + +int +setutxdb(int db, const char *file) +{ + struct stat sb; + + switch (db) { + case UTXDB_ACTIVE: + if (file == NULL) + file = _PATH_UTX_ACTIVE; + break; + case UTXDB_LASTLOGIN: + if (file == NULL) + file = _PATH_UTX_LASTLOGIN; + break; + case UTXDB_LOG: + if (file == NULL) + file = _PATH_UTX_LOG; + break; + default: + errno = EINVAL; + return (-1); + } + + if (uf != NULL) + fclose(uf); + uf = fopen(file, "r"); + if (uf == NULL) + return (-1); + + /* Safety check: never use broken files. */ + if (db != UTXDB_LOG && _fstat(fileno(uf), &sb) != -1 && + sb.st_size % sizeof(struct futx) != 0) { + fclose(uf); + uf = NULL; + errno = EFTYPE; + return (-1); + } + + udb = db; + return (0); +} + +void +setutxent(void) +{ + + setutxdb(UTXDB_ACTIVE, NULL); +} + +void +endutxent(void) +{ + + if (uf != NULL) { + fclose(uf); + uf = NULL; + } +} + +static struct futx * +getfutxent(void) +{ + static struct futx fu; + + if (uf == NULL) + setutxent(); + if (uf == NULL) + return (NULL); + + if (udb == UTXDB_LOG) { + uint16_t len; + + if (fread(&len, sizeof len, 1, uf) != 1) + return (NULL); + len = be16toh(len); + if (len > sizeof fu) { + /* Forward compatibility. */ + if (fread(&fu, sizeof fu, 1, uf) != 1) + return (NULL); + fseek(uf, len - sizeof fu, SEEK_CUR); + } else { + /* Partial record. */ + memset(&fu, 0, sizeof fu); + if (fread(&fu, len, 1, uf) != 1) + return (NULL); + } + } else { + if (fread(&fu, sizeof fu, 1, uf) != 1) + return (NULL); + } + return (&fu); +} + +struct utmpx * +getutxent(void) +{ + struct futx *fu; + + fu = getfutxent(); + if (fu == NULL) + return (NULL); + futx_to_utx(fu, &utx); + return (&utx); +} + +struct utmpx * +getutxid(const struct utmpx *id) +{ + struct futx *fu; + + for (;;) { + fu = getfutxent(); + if (fu == NULL) + return (NULL); + + switch (fu->fu_type) { + case BOOT_TIME: + case OLD_TIME: + case NEW_TIME: + case SHUTDOWN_TIME: + if (fu->fu_type == id->ut_type) + goto found; + case USER_PROCESS: + case INIT_PROCESS: + case LOGIN_PROCESS: + case DEAD_PROCESS: + switch (id->ut_type) { + case USER_PROCESS: + case INIT_PROCESS: + case LOGIN_PROCESS: + case DEAD_PROCESS: + if (memcmp(fu->fu_id, id->ut_id, + MIN(sizeof fu->fu_id, sizeof id->ut_id)) == 0) + goto found; + } + } + } + +found: + futx_to_utx(fu, &utx); + return (&utx); +} + +struct utmpx * +getutxline(const struct utmpx *line) +{ + struct futx *fu; + + for (;;) { + fu = getfutxent(); + if (fu == NULL) + return (NULL); + + switch (fu->fu_type) { + case USER_PROCESS: + case LOGIN_PROCESS: + if (strncmp(fu->fu_line, line->ut_line, + MIN(sizeof fu->fu_line, sizeof line->ut_line)) == 0) + goto found; + } + } + +found: + futx_to_utx(fu, &utx); + return (&utx); +} + +struct utmpx * +getutxuser(const char *user) +{ + struct futx *fu; + + for (;;) { + fu = getfutxent(); + if (fu == NULL) + return (NULL); + + switch (fu->fu_type) { + case USER_PROCESS: + if (strncmp(fu->fu_user, user, sizeof fu->fu_user) == 0) + goto found; + } + } + +found: + futx_to_utx(fu, &utx); + return (&utx); +} Added: head/lib/libc/gen/pututxline.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/pututxline.c Wed Jan 13 17:29:55 2010 (r202188) @@ -0,0 +1,277 @@ +/*- + * Copyright (c) 2010 Ed Schouten + * 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 "namespace.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "utxdb.h" +#include "un-namespace.h" + +static FILE * +futx_open(const char *file) +{ + int fd; + FILE *fp; + struct stat sb; + + fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK, 0644); + if (fd < 0) + return (NULL); + + /* Safety check: never use broken files. */ + if (_fstat(fd, &sb) != -1 && sb.st_size % sizeof(struct futx) != 0) { + _close(fd); + return (NULL); + } + + fp = fdopen(fd, "r+"); + if (fp == NULL) { + _close(fd); + return (NULL); + } + + return (fp); +} + +static void +utx_active_add(const struct futx *fu) +{ + FILE *fp; + struct futx fe; + off_t partial = -1; + + /* + * Register user login sessions. Overwrite entries of sessions + * that have already been terminated. + */ + fp = futx_open(_PATH_UTX_ACTIVE); + if (fp == NULL) + return; + while (fread(&fe, sizeof fe, 1, fp) == 1) { + switch (fe.fu_type) { + case USER_PROCESS: + case INIT_PROCESS: + case LOGIN_PROCESS: + case DEAD_PROCESS: + /* Overwrite when ut_id matches. */ + if (memcmp(fu->fu_id, fe.fu_id, sizeof fe.fu_id) == 0) { + fseeko(fp, -sizeof fe, SEEK_CUR); + goto exact; + } + if (fe.fu_type != DEAD_PROCESS) + break; + /* FALLTHROUGH */ + default: + /* Allow us to overwrite unused records. */ + if (partial == -1) + partial = fseeko(fp, 0, SEEK_CUR) - sizeof fe; + break; + } + } + + /* + * No exact match found. Use the partial match. If no partial + * match was found, just append a new record. + */ + if (partial != -1) + fseeko(fp, partial, SEEK_SET); +exact: + fwrite(fu, sizeof *fu, 1, fp); + fclose(fp); +} + +static int +utx_active_remove(struct futx *fu) +{ + FILE *fp; + struct futx fe; + + /* + * Remove user login sessions, having the same ut_id. + */ + fp = futx_open(_PATH_UTX_ACTIVE); + if (fp == NULL) + return (0); + while (fread(&fe, sizeof fe, 1, fp) == 1) { + switch (fe.fu_type) { + case USER_PROCESS: + case INIT_PROCESS: + case LOGIN_PROCESS: + if (memcmp(fu->fu_id, fe.fu_id, sizeof fe.fu_id) != 0) + continue; + + /* + * Prevent login sessions from having a negative + * timespan. + */ + if (be64toh(fu->fu_tv) < be64toh(fe.fu_tv)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 17:49:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8E2A1065670; Wed, 13 Jan 2010 17:49:35 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 746F78FC19; Wed, 13 Jan 2010 17:49:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DHnZ8N077829; Wed, 13 Jan 2010 17:49:35 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DHnZ6O077826; Wed, 13 Jan 2010 17:49:35 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131749.o0DHnZ6O077826@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 17:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202190 - head/bin/csh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 17:49:36 -0000 Author: ed Date: Wed Jan 13 17:49:35 2010 New Revision: 202190 URL: http://svn.freebsd.org/changeset/base/202190 Log: Let csh(1) use utmpx instead of utmp. csh allows you to monitor the utmp(x) file to monitor certain user logins. Unfortunately it needs to directly stat() this file. I don't want to break this module , but eventually it shouldn't do that. The idea of the getutxent(3) API is to hide file access. Approved by: mp Modified: head/bin/csh/config.h head/bin/csh/config_p.h Modified: head/bin/csh/config.h ============================================================================== --- head/bin/csh/config.h Wed Jan 13 17:45:39 2010 (r202189) +++ head/bin/csh/config.h Wed Jan 13 17:49:35 2010 (r202190) @@ -54,7 +54,7 @@ #define HAVE_GETPWENT 1 /* Define to 1 if you have the `getutent' function. */ -/* #undef HAVE_GETUTENT */ +#define HAVE_GETUTENT 1 /* Define if you have the iconv() function. */ /* #undef HAVE_ICONV */ @@ -130,10 +130,10 @@ #define HAVE_STRUCT_UTMP_UT_HOST 1 /* Define to 1 if `ut_tv' is member of `struct utmp'. */ -/* #undef HAVE_STRUCT_UTMP_UT_TV */ +#define HAVE_STRUCT_UTMP_UT_TV 1 /* Define to 1 if `ut_user' is member of `struct utmp'. */ -/* #undef HAVE_STRUCT_UTMP_UT_USER */ +#define HAVE_STRUCT_UTMP_UT_USER 1 /* Define to 1 if `ut_xtime' is member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_XTIME */ @@ -159,10 +159,10 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the header file. */ -/* #undef HAVE_UTMPX_H */ +#define HAVE_UTMPX_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_UTMP_H 1 +/* #undef HAVE_UTMP_H */ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 Modified: head/bin/csh/config_p.h ============================================================================== --- head/bin/csh/config_p.h Wed Jan 13 17:45:39 2010 (r202189) +++ head/bin/csh/config_p.h Wed Jan 13 17:49:35 2010 (r202190) @@ -85,6 +85,7 @@ /* Use LC_MESSAGES locale category to open the message catalog */ #define MCLoadBySet NL_CAT_LOCALE #define BUFSIZE 8192 +#define UTMPX_FILE "/var/run/utx.active" #endif #if defined(__bsdi__) From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 17:50:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69F6C106568D; Wed, 13 Jan 2010 17:50:58 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 595428FC13; Wed, 13 Jan 2010 17:50:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DHowil078172; Wed, 13 Jan 2010 17:50:58 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DHowEf078165; Wed, 13 Jan 2010 17:50:58 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131750.o0DHowEf078165@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 17:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202191 - head/usr.bin/finger X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 17:50:58 -0000 Author: ed Date: Wed Jan 13 17:50:58 2010 New Revision: 202191 URL: http://svn.freebsd.org/changeset/base/202191 Log: Migrate finger(1) towards utmpx. It was already ported to use libulog, which makes it simpler now. Be sure to catch the error returned by setutxdb(). Otherwise it may perform a lookup on the utx.active database. Modified: head/usr.bin/finger/Makefile head/usr.bin/finger/finger.c head/usr.bin/finger/lprint.c head/usr.bin/finger/net.c head/usr.bin/finger/sprint.c head/usr.bin/finger/util.c Modified: head/usr.bin/finger/Makefile ============================================================================== --- head/usr.bin/finger/Makefile Wed Jan 13 17:49:35 2010 (r202190) +++ head/usr.bin/finger/Makefile Wed Jan 13 17:50:58 2010 (r202191) @@ -7,7 +7,4 @@ MAN= finger.1 finger.conf.5 WARNS?= 2 -DPADD= ${LIBULOG} -LDADD= -lulog - .include Modified: head/usr.bin/finger/finger.c ============================================================================== --- head/usr.bin/finger/finger.c Wed Jan 13 17:49:35 2010 (r202190) +++ head/usr.bin/finger/finger.c Wed Jan 13 17:50:58 2010 (r202191) @@ -82,9 +82,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include #include #include "finger.h" Modified: head/usr.bin/finger/lprint.c ============================================================================== --- head/usr.bin/finger/lprint.c Wed Jan 13 17:49:35 2010 (r202190) +++ head/usr.bin/finger/lprint.c Wed Jan 13 17:50:58 2010 (r202191) @@ -56,9 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include #include "finger.h" #include "pathnames.h" Modified: head/usr.bin/finger/net.c ============================================================================== --- head/usr.bin/finger/net.c Wed Jan 13 17:49:35 2010 (r202190) +++ head/usr.bin/finger/net.c Wed Jan 13 17:50:58 2010 (r202191) @@ -54,9 +54,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include #include "finger.h" static void cleanup(int sig); Modified: head/usr.bin/finger/sprint.c ============================================================================== --- head/usr.bin/finger/sprint.c Wed Jan 13 17:49:35 2010 (r202190) +++ head/usr.bin/finger/sprint.c Wed Jan 13 17:50:58 2010 (r202191) @@ -53,8 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include +#include #include "finger.h" static void stimeprint(WHERE *); Modified: head/usr.bin/finger/util.c ============================================================================== --- head/usr.bin/finger/util.c Wed Jan 13 17:49:35 2010 (r202190) +++ head/usr.bin/finger/util.c Wed Jan 13 17:50:58 2010 (r202191) @@ -56,9 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include #include "finger.h" #include "pathnames.h" @@ -110,11 +109,11 @@ void enter_lastlog(PERSON *pn) { WHERE *w; - struct ulog_utmpx *ut; + struct utmpx *ut = NULL; char doit = 0; - ulog_setutxfile(UTXI_USER, NULL); - ut = ulog_getutxuser(pn->name); + if (setutxdb(UTXDB_LASTLOGIN, NULL) == 0) + ut = getutxuser(pn->name); if ((w = pn->whead) == NULL) doit = 1; else if (ut != NULL && ut->ut_type == USER_PROCESS) { @@ -140,7 +139,7 @@ enter_lastlog(PERSON *pn) strcpy(w->host, ut->ut_host); w->loginat = ut->ut_tv.tv_sec; } - ulog_endutxent(); + endutxent(); } void From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 17:54:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A06DB1065672; Wed, 13 Jan 2010 17:54:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2178FC15; Wed, 13 Jan 2010 17:54:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DHsWGw079006; Wed, 13 Jan 2010 17:54:32 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DHsWId079001; Wed, 13 Jan 2010 17:54:32 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131754.o0DHsWId079001@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 17:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202192 - head/usr.sbin/ppp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 17:54:32 -0000 Author: ed Date: Wed Jan 13 17:54:32 2010 New Revision: 202192 URL: http://svn.freebsd.org/changeset/base/202192 Log: Port ppp(8) to utmpx. A nice thing about utmpx is that it makes it very easy to log sessions that don't use TTYs. This is because the file is not indexed by TTY slots anymore. Silence from: brian Modified: head/usr.sbin/ppp/id.c head/usr.sbin/ppp/id.h head/usr.sbin/ppp/physical.c head/usr.sbin/ppp/physical.h Modified: head/usr.sbin/ppp/id.c ============================================================================== --- head/usr.sbin/ppp/id.c Wed Jan 13 17:50:58 2010 (r202191) +++ head/usr.sbin/ppp/id.c Wed Jan 13 17:54:32 2010 (r202192) @@ -49,7 +49,7 @@ #else #include #endif -#include +#include #include "log.h" #include "main.h" @@ -202,36 +202,25 @@ ID0uu_unlock(const char *basettyname) } void -ID0login(struct utmp *ut) +ID0login(const struct utmpx *ut) { ID0set0(); - if (logout(ut->ut_line)) { - log_Printf(LogID0, "logout(\"%s\")\n", ut->ut_line); - logwtmp(ut->ut_line, "", ""); - log_Printf(LogID0, "logwtmp(\"%s\", \"\", \"\")\n", ut->ut_line); - } - login(ut); - log_Printf(LogID0, "login(\"%s\", \"%.*s\")\n", - ut->ut_line, (int)(sizeof ut->ut_name), ut->ut_name); + pututxline(ut); + log_Printf(LogID0, "pututxline(\"%.*s\", \"%.*s\", \"%.*s\", \"%.*s\")\n", + (int)sizeof ut->ut_id, ut->ut_id, + (int)sizeof ut->ut_user, ut->ut_user, + (int)sizeof ut->ut_line, ut->ut_line, + (int)sizeof ut->ut_host, ut->ut_host); ID0setuser(); } void -ID0logout(const char *device, int nologout) +ID0logout(const struct utmpx *ut) { - struct utmp ut; - char ut_line[sizeof ut.ut_line + 1]; - - strncpy(ut_line, device, sizeof ut_line - 1); - ut_line[sizeof ut_line - 1] = '\0'; - ID0set0(); - if (nologout || logout(ut_line)) { - log_Printf(LogID0, "logout(\"%s\")\n", ut_line); - logwtmp(ut_line, "", ""); - log_Printf(LogID0, "logwtmp(\"%s\", \"\", \"\")\n", ut_line); - } else - log_Printf(LogERROR, "ID0logout: No longer logged in on %s\n", ut_line); + pututxline(ut); + log_Printf(LogID0, "pututxline(\"%.*s\")\n", + (int)sizeof ut->ut_id, ut->ut_id); ID0setuser(); } Modified: head/usr.sbin/ppp/id.h ============================================================================== --- head/usr.sbin/ppp/id.h Wed Jan 13 17:50:58 2010 (r202191) +++ head/usr.sbin/ppp/id.h Wed Jan 13 17:54:32 2010 (r202192) @@ -27,7 +27,7 @@ */ #ifndef NOSUID -struct utmp; +struct utmpx; struct sockaddr_un; extern void ID0init(void); @@ -41,8 +41,8 @@ extern int ID0write(int, const void *, s extern int ID0uu_lock(const char *); extern int ID0uu_lock_txfr(const char *, pid_t); extern int ID0uu_unlock(const char *); -extern void ID0login(struct utmp *); -extern void ID0logout(const char *, int); +extern void ID0login(const struct utmpx *); +extern void ID0logout(const struct utmpx *); extern int ID0bind_un(int, const struct sockaddr_un *); extern int ID0connect_un(int, const struct sockaddr_un *); extern int ID0kill(pid_t, int); @@ -64,20 +64,8 @@ extern int ID0NgMkSockNode(const char *, #define ID0uu_lock uu_lock #define ID0uu_lock_txfr uu_lock_txfr #define ID0uu_unlock uu_unlock -#define ID0login(u) \ - do { \ - if (logout((u)->ut_line)) \ - logwtmp((u)->ut_line, "", ""); \ - login(u); \ - } while (0) -#define ID0logout(dev, no) \ - do { \ - struct utmp ut; \ - strncpy(ut.ut_line, dev, sizeof ut.ut_line - 1); \ - ut.ut_line[sizeof ut.ut_line - 1] = '\0'; \ - if (no || logout(ut.ut_line)) \ - logwtmp(ut.ut_line, "", ""); \ - } while (0) +#define ID0login pututxline +#define ID0logout pututxline #define ID0bind_un(s, n) bind(s, (const struct sockaddr *)(n), sizeof *(n)) #define ID0connect_un(s, n) \ connect(s, (const struct sockaddr *)(n), sizeof *(n)) Modified: head/usr.sbin/ppp/physical.c ============================================================================== --- head/usr.sbin/ppp/physical.c Wed Jan 13 17:50:58 2010 (r202191) +++ head/usr.sbin/ppp/physical.c Wed Jan 13 17:54:32 2010 (r202192) @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -42,7 +43,7 @@ #include #include #include -#include +#include #if defined(__OpenBSD__) || defined(__NetBSD__) #include #include @@ -106,8 +107,6 @@ #endif #include "tcpmss.h" -#define PPPOTCPLINE "ppp" - static int physical_DescriptorWrite(struct fdescriptor *, struct bundle *, const fd_set *); @@ -333,6 +332,7 @@ physical_Close(struct physical *p) { int newsid; char fn[PATH_MAX]; + struct utmpx ut; if (p->fd < 0) return; @@ -344,12 +344,11 @@ physical_Close(struct physical *p) physical_StopDeviceTimer(p); if (p->Utmp) { - if (p->handler && (p->handler->type == TCP_DEVICE || - p->handler->type == UDP_DEVICE)) - /* Careful - we logged in on line ``ppp'' with IP as our host */ - ID0logout(PPPOTCPLINE, 1); - else - ID0logout(p->name.base, 0); + memset(&ut, 0, sizeof ut); + ut.ut_type = DEAD_PROCESS; + gettimeofday(&ut.ut_tv, NULL); + snprintf(ut.ut_id, sizeof ut.ut_id, "%xppp", (int)getpid()); + ID0logout(&ut); p->Utmp = 0; } newsid = tcgetpgrp(p->fd) == getpgrp(); @@ -911,16 +910,17 @@ void physical_Login(struct physical *p, const char *name) { if (p->type == PHYS_DIRECT && *p->name.base && !p->Utmp) { - struct utmp ut; + struct utmpx ut; const char *connstr; char *colon; memset(&ut, 0, sizeof ut); - ut.ut_time = time(NULL); - strncpy(ut.ut_name, name, sizeof ut.ut_name); + ut.ut_type = USER_PROCESS; + gettimeofday(&ut.ut_tv, NULL); + snprintf(ut.ut_id, sizeof ut.ut_id, "%xppp", (int)getpid()); + strncpy(ut.ut_user, name, sizeof ut.ut_user); if (p->handler && (p->handler->type == TCP_DEVICE || p->handler->type == UDP_DEVICE)) { - strncpy(ut.ut_line, PPPOTCPLINE, sizeof ut.ut_line); strncpy(ut.ut_host, p->name.base, sizeof ut.ut_host); colon = memchr(ut.ut_host, ':', sizeof ut.ut_host); if (colon) @@ -931,7 +931,7 @@ physical_Login(struct physical *p, const /* mgetty sets this to the connection speed */ strncpy(ut.ut_host, connstr, sizeof ut.ut_host); ID0login(&ut); - p->Utmp = ut.ut_time; + p->Utmp = 1; } } Modified: head/usr.sbin/ppp/physical.h ============================================================================== --- head/usr.sbin/ppp/physical.h Wed Jan 13 17:50:58 2010 (r202191) +++ head/usr.sbin/ppp/physical.h Wed Jan 13 17:54:32 2010 (r202192) @@ -97,7 +97,7 @@ struct physical { char *base; } name; - time_t Utmp; /* Are we in utmp ? */ + int Utmp; /* Are we in utmp ? */ pid_t session_owner; /* HUP this when closing the link */ struct device *handler; /* device specific handler */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 17:56:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84F0310656B3; Wed, 13 Jan 2010 17:56:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B2AA8FC1D; Wed, 13 Jan 2010 17:56:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DHusAS079555; Wed, 13 Jan 2010 17:56:54 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DHusvb079551; Wed, 13 Jan 2010 17:56:54 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131756.o0DHusvb079551@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 17:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202193 - in head/bin: date pax X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 17:56:54 -0000 Author: ed Date: Wed Jan 13 17:56:54 2010 New Revision: 202193 URL: http://svn.freebsd.org/changeset/base/202193 Log: Port everything in bin/ from utmp to utmpx. date: use libc utmpx routines instead of the ones provided by libulog. pax: don't depend on Modified: head/bin/date/Makefile head/bin/date/date.c head/bin/pax/gen_subs.c Modified: head/bin/date/Makefile ============================================================================== --- head/bin/date/Makefile Wed Jan 13 17:54:32 2010 (r202192) +++ head/bin/date/Makefile Wed Jan 13 17:56:54 2010 (r202193) @@ -3,7 +3,5 @@ PROG= date SRCS= date.c netdate.c vary.c -DPADD= ${LIBULOG} -LDADD= -lulog .include Modified: head/bin/date/date.c ============================================================================== --- head/bin/date/date.c Wed Jan 13 17:54:32 2010 (r202192) +++ head/bin/date/date.c Wed Jan 13 17:56:54 2010 (r202193) @@ -52,9 +52,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include #include "extern.h" #include "vary.h" Modified: head/bin/pax/gen_subs.c ============================================================================== --- head/bin/pax/gen_subs.c Wed Jan 13 17:54:32 2010 (r202192) +++ head/bin/pax/gen_subs.c Wed Jan 13 17:56:54 2010 (r202193) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -66,10 +65,6 @@ __FBSDID("$FreeBSD$"); #define OLDFRMTM "%b %e %Y" #define CURFRMTD "%e %b %H:%M" #define OLDFRMTD "%e %b %Y" -#ifndef UT_NAMESIZE -#define UT_NAMESIZE 8 -#endif -#define UT_GRPSIZE 6 static int d_first = -1; @@ -116,9 +111,8 @@ ls_list(ARCHD *arcn, time_t now, FILE *f */ if (strftime(f_date,DATELEN,timefrmt,localtime(&(sbp->st_mtime))) == 0) f_date[0] = '\0'; - (void)fprintf(fp, "%s%2u %-*s %-*s ", f_mode, sbp->st_nlink, - UT_NAMESIZE, name_uid(sbp->st_uid, 1), UT_GRPSIZE, - name_gid(sbp->st_gid, 1)); + (void)fprintf(fp, "%s%2u %-12s %-12s ", f_mode, sbp->st_nlink, + name_uid(sbp->st_uid, 1), name_gid(sbp->st_gid, 1)); /* * print device id's for devices, or sizes for other nodes From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 17:58:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E25F5106566C; Wed, 13 Jan 2010 17:58:49 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D21468FC19; Wed, 13 Jan 2010 17:58:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DHwnEP080017; Wed, 13 Jan 2010 17:58:49 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DHwnkK080014; Wed, 13 Jan 2010 17:58:49 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131758.o0DHwnkK080014@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 17:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202194 - head/sbin/init X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 17:58:50 -0000 Author: ed Date: Wed Jan 13 17:58:49 2010 New Revision: 202194 URL: http://svn.freebsd.org/changeset/base/202194 Log: Migrate init(8) towards utmpx. According to a comment, we cannot safely remove utmpx entries here anymore. This is because the libc routines may block on file locking. In an ideal world login(1) should just remove the entries, which is why I'm disabling this code for now. If it turns out we get lots of stale entries here, we should figure out a way to deal with that. Modified: head/sbin/init/Makefile head/sbin/init/init.c Modified: head/sbin/init/Makefile ============================================================================== --- head/sbin/init/Makefile Wed Jan 13 17:56:54 2010 (r202193) +++ head/sbin/init/Makefile Wed Jan 13 17:58:49 2010 (r202194) @@ -6,8 +6,8 @@ MAN= init.8 PRECIOUSPROG= INSTALLFLAGS=-b -B.bak CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT -DPADD= ${LIBUTIL} ${LIBULOG} ${LIBCRYPT} -LDADD= -lutil -lulog -lcrypt +DPADD= ${LIBUTIL} ${LIBCRYPT} +LDADD= -lutil -lcrypt NO_SHARED?= YES Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Wed Jan 13 17:56:54 2010 (r202193) +++ head/sbin/init/init.c Wed Jan 13 17:58:49 2010 (r202194) @@ -65,9 +65,9 @@ static const char rcsid[] = #include #include #include -#define _ULOG_POSIX_NAMES #include #include +#include #include #include @@ -569,10 +569,13 @@ transition(state_t s) * NB: should send a message to the session logger to avoid blocking. */ static void -clear_session_logs(session_t *sp) +clear_session_logs(session_t *sp __unused) { - ulog_logout(sp->se_device); + /* + * XXX: Use getutxline() and call pututxline() for each entry. + * Is this safe to do this here? Is it really required anyway? + */ } /* From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 17:59:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1326C1065676; Wed, 13 Jan 2010 17:59:24 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02EC98FC18; Wed, 13 Jan 2010 17:59:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DHxNVv080185; Wed, 13 Jan 2010 17:59:23 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DHxNlg080182; Wed, 13 Jan 2010 17:59:23 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131759.o0DHxNlg080182@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 17:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202195 - head/sbin/reboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 17:59:24 -0000 Author: ed Date: Wed Jan 13 17:59:23 2010 New Revision: 202195 URL: http://svn.freebsd.org/changeset/base/202195 Log: Port the remaining apps in sbin/ to utmpx; only reboot(8). Modified: head/sbin/reboot/Makefile head/sbin/reboot/reboot.c Modified: head/sbin/reboot/Makefile ============================================================================== --- head/sbin/reboot/Makefile Wed Jan 13 17:58:49 2010 (r202194) +++ head/sbin/reboot/Makefile Wed Jan 13 17:59:23 2010 (r202195) @@ -2,8 +2,6 @@ # $FreeBSD$ PROG= reboot -DPADD= ${LIBULOG} -LDADD= -lulog MAN= reboot.8 nextboot.8 MLINKS= reboot.8 halt.8 reboot.8 fastboot.8 reboot.8 fasthalt.8 Modified: head/sbin/reboot/reboot.c ============================================================================== --- head/sbin/reboot/reboot.c Wed Jan 13 17:58:49 2010 (r202194) +++ head/sbin/reboot/reboot.c Wed Jan 13 17:59:23 2010 (r202195) @@ -54,9 +54,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include static void usage(void); static u_int get_pageins(void); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:02:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D0111065672; Wed, 13 Jan 2010 18:02:30 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C8488FC22; Wed, 13 Jan 2010 18:02:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DI2UCc080955; Wed, 13 Jan 2010 18:02:30 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DI2Ue5080952; Wed, 13 Jan 2010 18:02:30 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131802.o0DI2Ue5080952@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202196 - head/lib/libopie X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:02:30 -0000 Author: ed Date: Wed Jan 13 18:02:30 2010 New Revision: 202196 URL: http://svn.freebsd.org/changeset/base/202196 Log: Let libopie use utmpx instead of utmp. Modified: head/lib/libopie/Makefile head/lib/libopie/config.h Modified: head/lib/libopie/Makefile ============================================================================== --- head/lib/libopie/Makefile Wed Jan 13 17:59:23 2010 (r202195) +++ head/lib/libopie/Makefile Wed Jan 13 18:02:30 2010 (r202196) @@ -8,15 +8,14 @@ SHLIB_MAJOR= 6 KEYFILE?= \"/etc/opiekeys\" -.PATH: ${DIST_DIR} ${OPIE_DIST}/libmissing +.PATH: ${DIST_DIR} LIB= opie SRCS= atob8.c btoa8.c btoh.c challenge.c getsequence.c hash.c hashlen.c \ keycrunch.c lock.c lookup.c newseed.c parsechallenge.c passcheck.c \ passwd.c randomchallenge.c readpass.c unlock.c verify.c version.c \ btoe.c accessfile.c generator.c insecure.c getutmpentry.c \ - readrec.c writerec.c open.c \ - getutline.c pututline.c endutent.c setutent.c # from libmissing + readrec.c writerec.c open.c SRCS+= opieextra.c INCS= ${OPIE_DIST}/opie.h Modified: head/lib/libopie/config.h ============================================================================== --- head/lib/libopie/config.h Wed Jan 13 17:59:23 2010 (r202195) +++ head/lib/libopie/config.h Wed Jan 13 18:02:30 2010 (r202196) @@ -216,7 +216,7 @@ #define HAVE_GETUSERSHELL 1 /* Define if you have the getutxline function. */ -/* #undef HAVE_GETUTXLINE */ +#define HAVE_GETUTXLINE 1 /* Define if you have the getwd function. */ /* #undef HAVE_GETWD */ @@ -231,7 +231,7 @@ /* #undef HAVE_ON_EXIT */ /* Define if you have the pututxline function. */ -/* #undef HAVE_PUTUTXLINE */ +#define HAVE_PUTUTXLINE 1 /* Define if you have the rindex function. */ /* #undef HAVE_RINDEX */ @@ -366,7 +366,7 @@ #define HAVE_UNISTD_H 1 /* Define if you have the header file. */ -/* #undef HAVE_UTMPX_H */ +#define HAVE_UTMPX_H 1 /* Define if you have the crypt library (-lcrypt). */ #define HAVE_LIBCRYPT 1 From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:06:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94CCC10656A4; Wed, 13 Jan 2010 18:06:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 832E78FC0C; Wed, 13 Jan 2010 18:06:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DI6VdM081854; Wed, 13 Jan 2010 18:06:31 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DI6Vce081852; Wed, 13 Jan 2010 18:06:31 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131806.o0DI6Vce081852@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:06:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202197 - head/usr.bin/last X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:06:31 -0000 Author: ed Date: Wed Jan 13 18:06:31 2010 New Revision: 202197 URL: http://svn.freebsd.org/changeset/base/202197 Log: Port last(1) to use utmpx. Basically there are three major things I changed about last(1): - It should use ut_type instead of determining by hand what type of record was given. - It should now keep track of ut_id's instead of TTYs. This means the ttylist has been renamed to the idlist, storing all the ut_id's it has processed until the next reboot. - I've removed the signal handler. Because our wtmp is rotated so often, it makes little sense. Even on a simple piece of hardware it should be capable of grinding through megabytes of logs in a second. Modified: head/usr.bin/last/last.c Modified: head/usr.bin/last/last.c ============================================================================== --- head/usr.bin/last/last.c Wed Jan 13 18:02:30 2010 (r202196) +++ head/usr.bin/last/last.c Wed Jan 13 18:06:31 2010 (r202197) @@ -59,15 +59,13 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #define NO 0 /* false/no */ #define YES 1 /* true/yes */ #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; -static struct utmp buf[1024]; /* utmp read buffer */ - typedef struct arg { char *name; /* argument */ #define HOST_TYPE -2 @@ -78,18 +76,18 @@ typedef struct arg { } ARG; ARG *arglist; /* head of linked list */ -LIST_HEAD(ttylisthead, ttytab) ttylist; +LIST_HEAD(idlisthead, idtab) idlist; -struct ttytab { +struct idtab { time_t logout; /* log out time */ - char tty[UT_LINESIZE + 1]; /* terminal name */ - LIST_ENTRY(ttytab) list; + char id[sizeof ((struct utmpx *)0)->ut_id]; /* identifier */ + LIST_ENTRY(idtab) list; }; static const char *crmsg; /* cause of last reboot */ -static long currentout, /* current logout value */ - maxrec; /* records to display */ -static const char *file = _PATH_WTMP; /* wtmp file */ +static time_t currentout; /* current logout value */ +static long maxrec; /* records to display */ +static const char *file = NULL; /* wtmp file */ static int sflag = 0; /* show delta in seconds */ static int width = 5; /* show seconds in delta */ static int yflag; /* show year */ @@ -102,12 +100,11 @@ static time_t snaptime; /* if != 0, we void addarg(int, char *); time_t dateconv(char *); -void doentry(struct utmp *); +void doentry(struct utmpx *); void hostconv(char *); -void onintr(int); -void printentry(struct utmp *, struct ttytab *); +void printentry(struct utmpx *, struct idtab *); char *ttyconv(char *); -int want(struct utmp *); +int want(struct utmpx *); void usage(void); void wtmp(void); @@ -199,6 +196,8 @@ main(int argc, char *argv[]) exit(0); } +#define MAXUTXENTRIES 1024 + /* * wtmp -- * read through the wtmp file @@ -206,33 +205,34 @@ main(int argc, char *argv[]) void wtmp(void) { - struct utmp *bp; /* current structure */ - struct stat stb; /* stat of file for size */ - long bl; - int bytes, wfd; + struct utmpx buf[MAXUTXENTRIES]; + struct utmpx *ut; + static unsigned int first = 0, amount = 0; + time_t t; char ct[80]; struct tm *tm; - time_t t; - LIST_INIT(&ttylist); + LIST_INIT(&idlist); + (void)time(&t); - if ((wfd = open(file, O_RDONLY, 0)) < 0 || fstat(wfd, &stb) == -1) + /* Load the last entries from the file. */ + if (setutxdb(UTXDB_LOG, file) != 0) err(1, "%s", file); - bl = (stb.st_size + sizeof(buf) - 1) / sizeof(buf); + while ((ut = getutxent()) != NULL) { + memcpy(&buf[(first + amount) % MAXUTXENTRIES], ut, sizeof *ut); + if (amount == MAXUTXENTRIES) + first++; + else + amount++; + if (t > ut->ut_tv.tv_sec) + t = ut->ut_tv.tv_sec; + } + endutxent(); + + /* Display them in reverse order. */ + while (amount > 0) + doentry(&buf[(first + amount--) % MAXUTXENTRIES]); - (void)time(&t); - buf[0].ut_time = _time_to_int(t); - (void)signal(SIGINT, onintr); - (void)signal(SIGQUIT, onintr); - - while (--bl >= 0) { - if (lseek(wfd, (off_t)(bl * sizeof(buf)), L_SET) == -1 || - (bytes = read(wfd, buf, sizeof(buf))) == -1) - err(1, "%s", file); - for (bp = &buf[bytes / sizeof(buf[0]) - 1]; bp >= buf; --bp) - doentry(bp); - } - t = _int_to_time(buf[0].ut_time); tm = localtime(&t); (void) strftime(ct, sizeof(ct), "\nwtmp begins %+\n", tm); printf("%s", ct); @@ -243,24 +243,21 @@ wtmp(void) * process a single wtmp entry */ void -doentry(struct utmp *bp) +doentry(struct utmpx *bp) { - struct ttytab *tt, *ttx; /* ttylist entry */ + struct idtab *tt, *ttx; /* idlist entry */ - /* - * if the terminal line is '~', the machine stopped. - * see utmp(5) for more info. - */ - if (bp->ut_line[0] == '~' && !bp->ut_line[1]) { + /* the machine stopped */ + if (bp->ut_type == BOOT_TIME || bp->ut_type == SHUTDOWN_TIME) { /* everybody just logged out */ - for (tt = LIST_FIRST(&ttylist); tt;) { + for (tt = LIST_FIRST(&idlist); tt;) { LIST_REMOVE(tt, list); ttx = tt; tt = LIST_NEXT(tt, list); free(ttx); } - currentout = -bp->ut_time; - crmsg = strncmp(bp->ut_name, "shutdown", UT_NAMESIZE) ? + currentout = -bp->ut_tv.tv_sec; + crmsg = bp->ut_type != SHUTDOWN_TIME ? "crash" : "shutdown"; /* * if we're in snapshot mode, we want to exit if this @@ -276,50 +273,42 @@ doentry(struct utmp *bp) printentry(bp, NULL); return; } - /* - * if the line is '{' or '|', date got set; see - * utmp(5) for more info. - */ - if ((bp->ut_line[0] == '{' || bp->ut_line[0] == '|') && - !bp->ut_line[1]) { + /* date got set */ + if (bp->ut_type == OLD_TIME || bp->ut_type == NEW_TIME) { if (want(bp) && !snaptime) printentry(bp, NULL); return; } - /* find associated tty */ - LIST_FOREACH(tt, &ttylist, list) - if (!strncmp(tt->tty, bp->ut_line, UT_LINESIZE)) + + if (bp->ut_type != USER_PROCESS && bp->ut_type != DEAD_PROCESS) + return; + + /* find associated identifier */ + LIST_FOREACH(tt, &idlist, list) + if (!memcmp(tt->id, bp->ut_id, sizeof bp->ut_id)) break; if (tt == NULL) { /* add new one */ - tt = malloc(sizeof(struct ttytab)); + tt = malloc(sizeof(struct idtab)); if (tt == NULL) errx(1, "malloc failure"); tt->logout = currentout; - strncpy(tt->tty, bp->ut_line, UT_LINESIZE); - LIST_INSERT_HEAD(&ttylist, tt, list); + memcpy(tt->id, bp->ut_id, sizeof bp->ut_id); + LIST_INSERT_HEAD(&idlist, tt, list); } /* * print record if not in snapshot mode and wanted * or in snapshot mode and in snapshot range */ - if (bp->ut_name[0] && (want(bp) || (bp->ut_time < snaptime && + if (bp->ut_type == USER_PROCESS && (want(bp) || + (bp->ut_tv.tv_sec < snaptime && (tt->logout > snaptime || tt->logout < 1)))) { snapfound = 1; - /* - * when uucp and ftp log in over a network, the entry in - * the utmp file is the name plus their process id. See - * etc/ftpd.c and usr.bin/uucp/uucpd.c for more information. - */ - if (!strncmp(bp->ut_line, "ftp", sizeof("ftp") - 1)) - bp->ut_line[3] = '\0'; - else if (!strncmp(bp->ut_line, "uucp", sizeof("uucp") - 1)) - bp->ut_line[4] = '\0'; printentry(bp, tt); } - tt->logout = bp->ut_time; + tt->logout = bp->ut_tv.tv_sec; } /* @@ -330,7 +319,7 @@ doentry(struct utmp *bp) * logout type (crash/shutdown) as appropriate. */ void -printentry(struct utmp *bp, struct ttytab *tt) +printentry(struct utmpx *bp, struct idtab *tt) { char ct[80]; struct tm *tm; @@ -339,16 +328,30 @@ printentry(struct utmp *bp, struct ttyta if (maxrec != -1 && !maxrec--) exit(0); - t = _int_to_time(bp->ut_time); + t = bp->ut_tv.tv_sec; tm = localtime(&t); (void) strftime(ct, sizeof(ct), d_first ? (yflag ? "%a %e %b %Y %R" : "%a %e %b %R") : (yflag ? "%a %b %e %Y %R" : "%a %b %e %R"), tm); - printf("%-*.*s %-*.*s %-*.*s %s%c", - UT_NAMESIZE, UT_NAMESIZE, bp->ut_name, - UT_LINESIZE, UT_LINESIZE, bp->ut_line, - UT_HOSTSIZE, UT_HOSTSIZE, bp->ut_host, - ct, tt == NULL ? '\n' : ' '); + switch (bp->ut_type) { + case BOOT_TIME: + printf("%-42s", "boot time"); + break; + case SHUTDOWN_TIME: + printf("%-42s", "shutdown time"); + break; + case OLD_TIME: + printf("%-42s", "old time"); + break; + case NEW_TIME: + printf("%-42s", "new time"); + break; + case USER_PROCESS: + printf("%-10s %-8s %-22.22s", + bp->ut_user, bp->ut_line, bp->ut_host); + break; + } + printf(" %s%c", ct, tt == NULL ? '\n' : ' '); if (tt == NULL) return; if (!tt->logout) { @@ -363,7 +366,7 @@ printentry(struct utmp *bp, struct ttyta (void) strftime(ct, sizeof(ct), "%R", tm); printf("- %s", ct); } - delta = tt->logout - bp->ut_time; + delta = tt->logout - bp->ut_tv.tv_sec; if (sflag) { printf(" (%8ld)\n", (long)delta); } else { @@ -381,7 +384,7 @@ printentry(struct utmp *bp, struct ttyta * see if want this entry */ int -want(struct utmp *bp) +want(struct utmpx *bp) { ARG *step; @@ -394,15 +397,15 @@ want(struct utmp *bp) for (step = arglist; step; step = step->next) switch(step->type) { case HOST_TYPE: - if (!strncasecmp(step->name, bp->ut_host, UT_HOSTSIZE)) + if (!strcasecmp(step->name, bp->ut_host)) return (YES); break; case TTY_TYPE: - if (!strncmp(step->name, bp->ut_line, UT_LINESIZE)) + if (!strcmp(step->name, bp->ut_line)) return (YES); break; case USER_TYPE: - if (!strncmp(step->name, bp->ut_name, UT_NAMESIZE)) + if (!strcmp(step->name, bp->ut_user)) return (YES); break; } @@ -552,25 +555,3 @@ terr: errx(1, "out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS]"); return timet; } - - -/* - * onintr -- - * on interrupt, we inform the user how far we've gotten - */ -void -onintr(int signo) -{ - char ct[80]; - struct tm *tm; - time_t t = _int_to_time(buf[0].ut_time); - - tm = localtime(&t); - (void) strftime(ct, sizeof(ct), - d_first ? "%a %e %b %R" : "%a %b %e %R", - tm); - printf("\ninterrupted %s\n", ct); - if (signo == SIGINT) - exit(1); - (void)fflush(stdout); /* fix required for rsh */ -} From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:08:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ED05106566C; Wed, 13 Jan 2010 18:08:01 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F224D8FC1C; Wed, 13 Jan 2010 18:08:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DI802U082219; Wed, 13 Jan 2010 18:08:00 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DI80xq082216; Wed, 13 Jan 2010 18:08:00 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131808.o0DI80xq082216@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:08:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202198 - head/usr.bin/getent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:08:01 -0000 Author: ed Date: Wed Jan 13 18:08:00 2010 New Revision: 202198 URL: http://svn.freebsd.org/changeset/base/202198 Log: Allow getent(1) to display utmpx entries as well. Because getutxent also matches the typical get*ent format of library routines, I thought it would be a good idea to teach it how to read utmpx databases. getent(1) just gives a raw dump, which is very useful when debugging problems related to parsing/logging. Modified: head/usr.bin/getent/getent.1 head/usr.bin/getent/getent.c Modified: head/usr.bin/getent/getent.1 ============================================================================== --- head/usr.bin/getent/getent.1 Wed Jan 13 18:06:31 2010 (r202197) +++ head/usr.bin/getent/getent.1 Wed Jan 13 18:08:00 2010 (r202198) @@ -75,6 +75,7 @@ argument may be one of: .It Li rpc Ta name number [alias ...] .It Li services Ta name port/protocol [alias ...] .It Li shells Ta /path/to/shell +.It Li utmpx Ta [time] type: properties .El .Pp If one or more @@ -109,6 +110,7 @@ utility exits 0 on success, or 3 if there is no support for enumeration on .Ar database . .Sh SEE ALSO +.Xr getutxent 3 , .Xr ethers 5 , .Xr group 5 , .Xr hosts 5 , Modified: head/usr.bin/getent/getent.c ============================================================================== --- head/usr.bin/getent/getent.c Wed Jan 13 18:06:31 2010 (r202197) +++ head/usr.bin/getent/getent.c Wed Jan 13 18:08:00 2010 (r202198) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static int usage(void); static int parsenum(const char *, unsigned long *); @@ -72,6 +73,7 @@ static int protocols(int, char *[]); static int rpc(int, char *[]); static int services(int, char *[]); static int shells(int, char *[]); +static int utmpx(int, char *[]); enum { RV_OK = 0, @@ -93,6 +95,7 @@ static struct getentdb { { "rpc", rpc, }, { "services", services, }, { "shells", shells, }, + { "utmpx", utmpx, }, { NULL, NULL, }, }; @@ -562,3 +565,89 @@ shells(int argc, char *argv[]) endusershell(); return rv; } + +/* + * utmpx + */ + +#define UTMPXPRINTID do { \ + size_t i; \ + for (i = 0; i < sizeof ut->ut_id; i++) \ + printf("%02hhx", ut->ut_id[i]); \ +} while (0) + +static void +utmpxprint(const struct utmpx *ut) +{ + + if (ut->ut_type == EMPTY) + return; + + printf("[%.24s] ", ctime(&ut->ut_tv.tv_sec)); + + switch (ut->ut_type) { + case BOOT_TIME: + printf("system boot\n"); + return; + case SHUTDOWN_TIME: + printf("system shutdown\n"); + return; + case OLD_TIME: + printf("old system time\n"); + return; + case NEW_TIME: + printf("new system time\n"); + return; + case USER_PROCESS: + printf("user process: id=\""); + UTMPXPRINTID; + printf("\" user=\"%s\" line=\"%s\" host=\"%s\"\n", + ut->ut_user, ut->ut_line, ut->ut_host); + break; + case DEAD_PROCESS: + printf("dead process: id=\""); + UTMPXPRINTID; + printf("\"\n"); + break; + default: + printf("unknown record type\n"); + break; + } +} + +static int +utmpx(int argc, char *argv[]) +{ + const struct utmpx *ut; + int rv = RV_OK, db; + + assert(argc > 1); + assert(argv != NULL); + + if (argc == 2) { + db = UTXDB_ACTIVE; + } else if (argc == 3) { + if (strcmp(argv[2], "active") == 0) + db = UTXDB_ACTIVE; + else if (strcmp(argv[2], "lastlogin") == 0) + db = UTXDB_LASTLOGIN; + else if (strcmp(argv[2], "log") == 0) + db = UTXDB_LOG; + else + rv = RV_USAGE; + } else { + rv = RV_USAGE; + } + + if (rv == RV_USAGE) { + fprintf(stderr, "Usage: %s utmpx [active | lastlogin | log]\n", + getprogname()); + } else if (rv == RV_OK) { + if (setutxdb(db, NULL) != 0) + return (RV_NOTFOUND); + while ((ut = getutxent()) != NULL) + utmpxprint(ut); + endutxent(); + } + return (rv); +} From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:09:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4CDD106566B; Wed, 13 Jan 2010 18:09:21 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C45978FC1C; Wed, 13 Jan 2010 18:09:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DI9Lbe082559; Wed, 13 Jan 2010 18:09:21 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DI9LhZ082556; Wed, 13 Jan 2010 18:09:21 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131809.o0DI9LhZ082556@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202199 - head/usr.bin/w X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:09:21 -0000 Author: ed Date: Wed Jan 13 18:09:21 2010 New Revision: 202199 URL: http://svn.freebsd.org/changeset/base/202199 Log: Port w(1) to utmpx. Let it print "-" when the TTY string is empty. In this case, it must also make sure it doesn't match processes who also have no controlling TTY. Otherwise it will print random kernel processes when trying to pick the best matching process. Eventually it should look at the value of ut_pid as well. Modified: head/usr.bin/w/Makefile head/usr.bin/w/w.c Modified: head/usr.bin/w/Makefile ============================================================================== --- head/usr.bin/w/Makefile Wed Jan 13 18:08:00 2010 (r202198) +++ head/usr.bin/w/Makefile Wed Jan 13 18:09:21 2010 (r202199) @@ -4,8 +4,8 @@ PROG= w SRCS= fmt.c pr_time.c proc_compare.c w.c MAN= w.1 uptime.1 -DPADD= ${LIBKVM} ${LIBULOG} ${LIBUTIL} -LDADD= -lkvm -lulog -lutil +DPADD= ${LIBKVM} ${LIBUTIL} +LDADD= -lkvm -lutil #BINGRP= kmem #BINMODE=2555 LINKS= ${BINDIR}/w ${BINDIR}/uptime Modified: head/usr.bin/w/w.c ============================================================================== --- head/usr.bin/w/w.c Wed Jan 13 18:08:00 2010 (r202198) +++ head/usr.bin/w/w.c Wed Jan 13 18:09:21 2010 (r202199) @@ -83,9 +83,8 @@ static const char sccsid[] = "@(#)w.c 8. #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include #include #include "extern.h" @@ -283,7 +282,8 @@ main(int argc, char *argv[]) if ((kp = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nentries)) == NULL) err(1, "%s", kvm_geterr(kd)); for (i = 0; i < nentries; i++, kp++) { - if (kp->ki_stat == SIDL || kp->ki_stat == SZOMB) + if (kp->ki_stat == SIDL || kp->ki_stat == SZOMB || + kp->ki_tdev == NODEV) continue; for (ep = ehead; ep != NULL; ep = ep->next) { if (ep->tdev == kp->ki_tdev) { @@ -418,9 +418,10 @@ main(int argc, char *argv[]) (void)printf("%-*.*s %-*.*s %-*.*s ", W_DISPUSERSIZE, W_DISPUSERSIZE, ep->utmp.ut_user, W_DISPLINESIZE, W_DISPLINESIZE, - strncmp(ep->utmp.ut_line, "tty", 3) && + *ep->utmp.ut_line ? + (strncmp(ep->utmp.ut_line, "tty", 3) && strncmp(ep->utmp.ut_line, "cua", 3) ? - ep->utmp.ut_line : ep->utmp.ut_line + 3, + ep->utmp.ut_line : ep->utmp.ut_line + 3) : "-", W_DISPHOSTSIZE, W_DISPHOSTSIZE, *p ? p : "-"); t = ep->utmp.ut_tv.tv_sec; longattime = pr_attime(&t, &now); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:09:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93F731065692; Wed, 13 Jan 2010 18:09:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EB1A8FC21; Wed, 13 Jan 2010 18:09:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DI9tFw082738; Wed, 13 Jan 2010 18:09:55 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DI9sCS082727; Wed, 13 Jan 2010 18:09:54 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131809.o0DI9sCS082727@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202200 - in head/usr.bin: systat users wall who write X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:09:55 -0000 Author: ed Date: Wed Jan 13 18:09:54 2010 New Revision: 202200 URL: http://svn.freebsd.org/changeset/base/202200 Log: Perform all trivial ports to utmpx for usr.bin/. They were already converted to use libulog, so it's easy to convert them to utmpx. Modified: head/usr.bin/systat/Makefile head/usr.bin/systat/vmstat.c head/usr.bin/users/Makefile head/usr.bin/users/users.c head/usr.bin/wall/Makefile head/usr.bin/wall/wall.c head/usr.bin/who/Makefile head/usr.bin/who/who.c head/usr.bin/write/Makefile head/usr.bin/write/write.c Modified: head/usr.bin/systat/Makefile ============================================================================== --- head/usr.bin/systat/Makefile Wed Jan 13 18:09:21 2010 (r202199) +++ head/usr.bin/systat/Makefile Wed Jan 13 18:09:54 2010 (r202200) @@ -16,7 +16,7 @@ CFLAGS+= -DINET6 WARNS?= 0 -DPADD= ${LIBCURSES} ${LIBM} ${LIBDEVSTAT} ${LIBKVM} ${LIBULOG} -LDADD= -lcursesw -lm -ldevstat -lkvm -lulog +DPADD= ${LIBCURSES} ${LIBM} ${LIBDEVSTAT} ${LIBKVM} +LDADD= -lcursesw -lm -ldevstat -lkvm .include Modified: head/usr.bin/systat/vmstat.c ============================================================================== --- head/usr.bin/systat/vmstat.c Wed Jan 13 18:09:21 2010 (r202199) +++ head/usr.bin/systat/vmstat.c Wed Jan 13 18:09:54 2010 (r202200) @@ -65,9 +65,8 @@ static const char sccsid[] = "@(#)vmstat #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include #include #include "systat.h" #include "extern.h" Modified: head/usr.bin/users/Makefile ============================================================================== --- head/usr.bin/users/Makefile Wed Jan 13 18:09:21 2010 (r202199) +++ head/usr.bin/users/Makefile Wed Jan 13 18:09:54 2010 (r202200) @@ -3,7 +3,4 @@ PROG= users -DPADD= ${LIBULOG} -LDADD= -lulog - .include Modified: head/usr.bin/users/users.c ============================================================================== --- head/usr.bin/users/users.c Wed Jan 13 18:09:21 2010 (r202199) +++ head/usr.bin/users/users.c Wed Jan 13 18:09:54 2010 (r202200) @@ -51,9 +51,8 @@ static const char rcsid[] = #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include typedef char namebuf[MAXLOGNAME]; Modified: head/usr.bin/wall/Makefile ============================================================================== --- head/usr.bin/wall/Makefile Wed Jan 13 18:09:21 2010 (r202199) +++ head/usr.bin/wall/Makefile Wed Jan 13 18:09:54 2010 (r202200) @@ -6,7 +6,4 @@ SRCS= ttymsg.c wall.c BINGRP= tty BINMODE=2555 -DPADD= ${LIBULOG} -LDADD= -lulog - .include Modified: head/usr.bin/wall/wall.c ============================================================================== --- head/usr.bin/wall/wall.c Wed Jan 13 18:09:21 2010 (r202199) +++ head/usr.bin/wall/wall.c Wed Jan 13 18:09:54 2010 (r202200) @@ -64,9 +64,8 @@ static const char sccsid[] = "@(#)wall.c #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include #include "ttymsg.h" Modified: head/usr.bin/who/Makefile ============================================================================== --- head/usr.bin/who/Makefile Wed Jan 13 18:09:21 2010 (r202199) +++ head/usr.bin/who/Makefile Wed Jan 13 18:09:54 2010 (r202200) @@ -3,7 +3,4 @@ PROG= who -DPADD= ${LIBULOG} -LDADD= -lulog - .include Modified: head/usr.bin/who/who.c ============================================================================== --- head/usr.bin/who/who.c Wed Jan 13 18:09:21 2010 (r202199) +++ head/usr.bin/who/who.c Wed Jan 13 18:09:54 2010 (r202200) @@ -44,9 +44,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include static void heading(void); static void process_utmp(void); @@ -109,7 +108,7 @@ main(int argc, char *argv[]) usage(); if (*argv != NULL) { - if (ulog_setutxfile(UTXI_TTY, *argv) != 0) + if (setutxdb(UTXDB_ACTIVE, *argv) != 0) err(1, "%s", *argv); } Modified: head/usr.bin/write/Makefile ============================================================================== --- head/usr.bin/write/Makefile Wed Jan 13 18:09:21 2010 (r202199) +++ head/usr.bin/write/Makefile Wed Jan 13 18:09:54 2010 (r202200) @@ -5,7 +5,4 @@ PROG= write BINMODE=2555 BINGRP= tty -DPADD= ${LIBULOG} -LDADD= -lulog - .include Modified: head/usr.bin/write/write.c ============================================================================== --- head/usr.bin/write/write.c Wed Jan 13 18:09:21 2010 (r202199) +++ head/usr.bin/write/write.c Wed Jan 13 18:09:54 2010 (r202200) @@ -62,9 +62,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include void done(int); void do_write(char *, char *, uid_t); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:12:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 427671065672; Wed, 13 Jan 2010 18:12:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 311598FC17; Wed, 13 Jan 2010 18:12:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DICM93083392; Wed, 13 Jan 2010 18:12:22 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DICMhH083390; Wed, 13 Jan 2010 18:12:22 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001131812.o0DICMhH083390@svn.freebsd.org> From: John Baldwin Date: Wed, 13 Jan 2010 18:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202201 - stable/8/lib/libc/stdtime X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:12:22 -0000 Author: jhb Date: Wed Jan 13 18:12:21 2010 New Revision: 202201 URL: http://svn.freebsd.org/changeset/base/202201 Log: MFC 199607, 200797, 201270, 201669: Use pthread_once() to initialize the thread-local storage for localtime() and gmtime() and _once() to initialize gmt state rather than home-rolled versions using pthread mutex locks. Modified: stable/8/lib/libc/stdtime/localtime.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/stdtime/localtime.c ============================================================================== --- stable/8/lib/libc/stdtime/localtime.c Wed Jan 13 18:09:54 2010 (r202200) +++ stable/8/lib/libc/stdtime/localtime.c Wed Jan 13 18:12:21 2010 (r202201) @@ -235,9 +235,14 @@ static struct state gmtmem; static char lcl_TZname[TZ_STRLEN_MAX + 1]; static int lcl_is_set; -static int gmt_is_set; +static pthread_once_t gmt_once = PTHREAD_ONCE_INIT; static pthread_rwlock_t lcl_rwlock = PTHREAD_RWLOCK_INITIALIZER; -static pthread_mutex_t gmt_mutex = PTHREAD_MUTEX_INITIALIZER; +static pthread_once_t gmtime_once = PTHREAD_ONCE_INIT; +static pthread_key_t gmtime_key; +static int gmtime_key_error; +static pthread_once_t localtime_once = PTHREAD_ONCE_INIT; +static pthread_key_t localtime_key; +static int localtime_key_error; char * tzname[2] = { wildabbr, @@ -1407,27 +1412,24 @@ struct tm * const tmp; return result; } +static void +localtime_key_init(void) +{ + + localtime_key_error = _pthread_key_create(&localtime_key, free); +} + struct tm * localtime(timep) const time_t * const timep; { - static pthread_mutex_t localtime_mutex = PTHREAD_MUTEX_INITIALIZER; - static pthread_key_t localtime_key = -1; struct tm *p_tm; - int r; if (__isthreaded != 0) { - if (localtime_key < 0) { - _pthread_mutex_lock(&localtime_mutex); - if (localtime_key < 0) { - if ((r = _pthread_key_create(&localtime_key, - free)) != 0) { - _pthread_mutex_unlock(&localtime_mutex); - errno = r; - return(NULL); - } - } - _pthread_mutex_unlock(&localtime_mutex); + _pthread_once(&localtime_once, localtime_key_init); + if (localtime_key_error != 0) { + errno = localtime_key_error; + return(NULL); } p_tm = _pthread_getspecific(localtime_key); if (p_tm == NULL) { @@ -1464,6 +1466,17 @@ struct tm * tmp; return tmp; } +static void +gmt_init(void) +{ + +#ifdef ALL_STATE + gmtptr = (struct state *) malloc(sizeof *gmtptr); + if (gmtptr != NULL) +#endif /* defined ALL_STATE */ + gmtload(gmtptr); +} + /* ** gmtsub is to gmtime as localsub is to localtime. */ @@ -1476,16 +1489,7 @@ struct tm * const tmp; { register struct tm * result; - _MUTEX_LOCK(&gmt_mutex); - if (!gmt_is_set) { -#ifdef ALL_STATE - gmtptr = (struct state *) malloc(sizeof *gmtptr); - if (gmtptr != NULL) -#endif /* defined ALL_STATE */ - gmtload(gmtptr); - gmt_is_set = TRUE; - } - _MUTEX_UNLOCK(&gmt_mutex); + _once(&gmt_once, gmt_init); result = timesub(timep, offset, gmtptr, tmp); #ifdef TM_ZONE /* @@ -1509,27 +1513,24 @@ struct tm * const tmp; return result; } +static void +gmtime_key_init(void) +{ + + gmtime_key_error = _pthread_key_create(&gmtime_key, free); +} + struct tm * gmtime(timep) const time_t * const timep; { - static pthread_mutex_t gmtime_mutex = PTHREAD_MUTEX_INITIALIZER; - static pthread_key_t gmtime_key = -1; struct tm *p_tm; - int r; if (__isthreaded != 0) { - if (gmtime_key < 0) { - _pthread_mutex_lock(&gmtime_mutex); - if (gmtime_key < 0) { - if ((r = _pthread_key_create(&gmtime_key, - free)) != 0) { - _pthread_mutex_unlock(&gmtime_mutex); - errno = r; - return(NULL); - } - } - _pthread_mutex_unlock(&gmtime_mutex); + _pthread_once(&gmtime_once, gmtime_key_init); + if (gmtime_key_error != 0) { + errno = gmtime_key_error; + return(NULL); } /* * Changed to follow POSIX.1 threads standard, which From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:12:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B388310657D5; Wed, 13 Jan 2010 18:12:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1F7C8FC28; Wed, 13 Jan 2010 18:12:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DICb3N083492; Wed, 13 Jan 2010 18:12:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DICbJi083490; Wed, 13 Jan 2010 18:12:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001131812.o0DICbJi083490@svn.freebsd.org> From: John Baldwin Date: Wed, 13 Jan 2010 18:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202202 - stable/7/lib/libc/stdtime X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:12:37 -0000 Author: jhb Date: Wed Jan 13 18:12:37 2010 New Revision: 202202 URL: http://svn.freebsd.org/changeset/base/202202 Log: MFC 199607, 200797, 201270, 201669: Use pthread_once() to initialize the thread-local storage for localtime() and gmtime() and _once() to initialize gmt state rather than home-rolled versions using pthread mutex locks. Modified: stable/7/lib/libc/stdtime/localtime.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/stdtime/localtime.c ============================================================================== --- stable/7/lib/libc/stdtime/localtime.c Wed Jan 13 18:12:21 2010 (r202201) +++ stable/7/lib/libc/stdtime/localtime.c Wed Jan 13 18:12:37 2010 (r202202) @@ -235,9 +235,14 @@ static struct state gmtmem; static char lcl_TZname[TZ_STRLEN_MAX + 1]; static int lcl_is_set; -static int gmt_is_set; +static pthread_once_t gmt_once = PTHREAD_ONCE_INIT; static pthread_rwlock_t lcl_rwlock = PTHREAD_RWLOCK_INITIALIZER; -static pthread_mutex_t gmt_mutex = PTHREAD_MUTEX_INITIALIZER; +static pthread_once_t gmtime_once = PTHREAD_ONCE_INIT; +static pthread_key_t gmtime_key; +static int gmtime_key_error; +static pthread_once_t localtime_once = PTHREAD_ONCE_INIT; +static pthread_key_t localtime_key; +static int localtime_key_error; char * tzname[2] = { wildabbr, @@ -1407,26 +1412,25 @@ struct tm * const tmp; return result; } +static void +localtime_key_init(void) +{ + + localtime_key_error = _pthread_key_create(&localtime_key, free); +} + struct tm * localtime(timep) const time_t * const timep; { - static pthread_mutex_t localtime_mutex = PTHREAD_MUTEX_INITIALIZER; - static pthread_key_t localtime_key = -1; struct tm *p_tm; - int r; if (__isthreaded != 0) { - _pthread_mutex_lock(&localtime_mutex); - if (localtime_key < 0) { - if ((r = _pthread_key_create(&localtime_key, free)) - != 0) { - _pthread_mutex_unlock(&localtime_mutex); - errno = r; - return(NULL); - } + _pthread_once(&localtime_once, localtime_key_init); + if (localtime_key_error != 0) { + errno = localtime_key_error; + return(NULL); } - _pthread_mutex_unlock(&localtime_mutex); p_tm = _pthread_getspecific(localtime_key); if (p_tm == NULL) { if ((p_tm = (struct tm *)malloc(sizeof(struct tm))) @@ -1462,6 +1466,17 @@ struct tm * tmp; return tmp; } +static void +gmt_init(void) +{ + +#ifdef ALL_STATE + gmtptr = (struct state *) malloc(sizeof *gmtptr); + if (gmtptr != NULL) +#endif /* defined ALL_STATE */ + gmtload(gmtptr); +} + /* ** gmtsub is to gmtime as localsub is to localtime. */ @@ -1474,16 +1489,7 @@ struct tm * const tmp; { register struct tm * result; - _MUTEX_LOCK(&gmt_mutex); - if (!gmt_is_set) { - gmt_is_set = TRUE; -#ifdef ALL_STATE - gmtptr = (struct state *) malloc(sizeof *gmtptr); - if (gmtptr != NULL) -#endif /* defined ALL_STATE */ - gmtload(gmtptr); - } - _MUTEX_UNLOCK(&gmt_mutex); + _once(&gmt_once, gmt_init); result = timesub(timep, offset, gmtptr, tmp); #ifdef TM_ZONE /* @@ -1507,25 +1513,25 @@ struct tm * const tmp; return result; } +static void +gmtime_key_init(void) +{ + + gmtime_key_error = _pthread_key_create(&gmtime_key, free); +} + struct tm * gmtime(timep) const time_t * const timep; { - static pthread_mutex_t gmtime_mutex = PTHREAD_MUTEX_INITIALIZER; - static pthread_key_t gmtime_key = -1; struct tm *p_tm; - int r; if (__isthreaded != 0) { - _pthread_mutex_lock(&gmtime_mutex); - if (gmtime_key < 0) { - if ((r = _pthread_key_create(&gmtime_key, free)) != 0) { - _pthread_mutex_unlock(&gmtime_mutex); - errno = r; - return(NULL); - } + _pthread_once(&gmtime_once, gmtime_key_init); + if (gmtime_key_error != 0) { + errno = gmtime_key_error; + return(NULL); } - _pthread_mutex_unlock(&gmtime_mutex); /* * Changed to follow POSIX.1 threads standard, which * is what BSD currently has. From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:14:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA05710656B5; Wed, 13 Jan 2010 18:14:59 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 837298FC14; Wed, 13 Jan 2010 18:14:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIExBO084046; Wed, 13 Jan 2010 18:14:59 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIExWh084044; Wed, 13 Jan 2010 18:14:59 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131814.o0DIExWh084044@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202203 - head/usr.sbin/ac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:14:59 -0000 Author: ed Date: Wed Jan 13 18:14:59 2010 New Revision: 202203 URL: http://svn.freebsd.org/changeset/base/202203 Log: Port ac(8) to utmpx. Similar to last(1), it must compare ut_id's instead of TTYs to determine whether a session has been terminated. It must also use ut_type to determine the type of the login record instead figuring it out by itself. Modified: head/usr.sbin/ac/ac.c Modified: head/usr.sbin/ac/ac.c ============================================================================== --- head/usr.sbin/ac/ac.c Wed Jan 13 18:12:37 2010 (r202202) +++ head/usr.sbin/ac/ac.c Wed Jan 13 18:14:59 2010 (r202203) @@ -27,14 +27,14 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include /* * this is for our list of currently logged in sessions */ struct utmp_list { struct utmp_list *next; - struct utmp usr; + struct utmpx usr; }; /* @@ -42,7 +42,7 @@ struct utmp_list { */ struct user_list { struct user_list *next; - char name[UT_NAMESIZE+1]; + char name[sizeof(((struct utmpx *)0)->ut_user)]; time_t secs; }; @@ -51,7 +51,7 @@ struct user_list { */ struct tty_list { struct tty_list *next; - char name[UT_LINESIZE+3]; + char name[sizeof(((struct utmpx *)0)->ut_host) + 2]; size_t len; int ret; }; @@ -81,15 +81,14 @@ static int Debug = 0; #endif int main(int, char **); -int ac(FILE *); +int ac(const char *); struct tty_list *add_tty(char *); #ifdef DEBUG -const char *debug_pfx(const struct utmp *, const struct utmp *); +const char *debug_pfx(const struct utmpx *, const struct utmpx *); #endif int do_tty(char *); -FILE *file(const char *); -struct utmp_list *log_in(struct utmp_list *, struct utmp *); -struct utmp_list *log_out(struct utmp_list *, struct utmp *); +struct utmp_list *log_in(struct utmp_list *, struct utmpx *); +struct utmp_list *log_out(struct utmp_list *, struct utmpx *); int on_console(struct utmp_list *); void show(const char *, time_t); void show_today(struct user_list *, struct utmp_list *, @@ -98,22 +97,6 @@ void show_users(struct user_list *); struct user_list *update_user(struct user_list *, char *, time_t); void usage(void); -/* - * open wtmp or die - */ -FILE * -file(const char *name) -{ - FILE *fp; - - if ((fp = fopen(name, "r")) == NULL) - err(1, "%s", name); - /* in case we want to discriminate */ - if (strcmp(_PATH_WTMP, name)) - Flags |= AC_W; - return fp; -} - struct tty_list * add_tty(char *name) { @@ -173,8 +156,7 @@ on_console(struct utmp_list *head) struct utmp_list *up; for (up = head; up; up = up->next) { - if (strncmp(up->usr.ut_line, Console, - sizeof (up->usr.ut_line)) == 0) + if (strcmp(up->usr.ut_line, Console) == 0) return 1; } return 0; @@ -190,7 +172,7 @@ update_user(struct user_list *head, char struct user_list *up; for (up = head; up != NULL; up = up->next) { - if (strncmp(up->name, name, UT_NAMESIZE) == 0) { + if (strcmp(up->name, name) == 0) { up->secs += secs; Total += secs; return head; @@ -217,9 +199,10 @@ update_user(struct user_list *head, char * includes a timestamp (perhaps with year), device-name, and user-name. */ const char * -debug_pfx(const struct utmp *event_up, const struct utmp *userinf_up) +debug_pfx(const struct utmpx *event_up, const struct utmpx *userinf_up) { - static char str_result[40+UT_LINESIZE+UT_NAMESIZE]; + static char str_result[40 + sizeof(userinf_up->ut_line) + + sizeof(userinf_up->ut_user)]; static char thisyear[5]; size_t maxcopy; time_t ut_timecopy; @@ -231,15 +214,10 @@ debug_pfx(const struct utmp *event_up, c strlcpy(thisyear, &str_result[20], sizeof(thisyear)); } - if (event_up->ut_time == 0) + if (event_up->ut_tv.tv_sec == 0) strlcpy(str_result, "*ZeroTime* --:--:-- ", sizeof(str_result)); else { - /* - * The type of utmp.ut_time is not necessary type time_t, as - * it is explicitly defined as type int32_t. Copy the value - * for platforms where sizeof(time_t) != sizeof(int32_t). - */ - ut_timecopy = _time32_to_time(event_up->ut_time); + ut_timecopy = event_up->ut_tv.tv_sec; strlcpy(str_result, ctime(&ut_timecopy), sizeof(str_result)); /* * Include the year, if it is not the same year as "now". @@ -255,22 +233,20 @@ debug_pfx(const struct utmp *event_up, c if (userinf_up->ut_line[0] == '\0') strlcat(str_result, "NoDev", sizeof(str_result)); else { - /* ut_line is not necessarily null-terminated. */ - maxcopy = strlen(str_result) + UT_LINESIZE + 1; + maxcopy = strlen(str_result) + sizeof(userinf_up->ut_line); if (maxcopy > sizeof(str_result)) maxcopy = sizeof(str_result); strlcat(str_result, userinf_up->ut_line, maxcopy); } strlcat(str_result, ": ", sizeof(str_result)); - if (userinf_up->ut_name[0] == '\0') + if (userinf_up->ut_user[0] == '\0') strlcat(str_result, "LogOff", sizeof(str_result)); else { - /* ut_name is not necessarily null-terminated. */ - maxcopy = strlen(str_result) + UT_NAMESIZE + 1; + maxcopy = strlen(str_result) + sizeof(userinf_up->ut_user); if (maxcopy > sizeof(str_result)) maxcopy = sizeof(str_result); - strlcat(str_result, userinf_up->ut_name, maxcopy); + strlcat(str_result, userinf_up->ut_user, maxcopy); } return (str_result); @@ -280,12 +256,11 @@ debug_pfx(const struct utmp *event_up, c int main(int argc, char *argv[]) { - FILE *fp; + const char *wtmpf = NULL; int c; (void) setlocale(LC_TIME, ""); - fp = NULL; while ((c = getopt(argc, argv, "Dc:dpt:w:")) != -1) { switch (c) { #ifdef DEBUG @@ -310,7 +285,8 @@ main(int argc, char *argv[]) add_tty(optarg); break; case 'w': - fp = file(optarg); + Flags |= AC_W; + wtmpf = optarg; break; case '?': default: @@ -329,16 +305,7 @@ main(int argc, char *argv[]) } if (Flags & AC_D) Flags &= ~AC_P; - if (fp == NULL) { - /* - * if _PATH_WTMP does not exist, exit quietly - */ - if (access(_PATH_WTMP, 0) != 0 && errno == ENOENT) - return 0; - - fp = file(_PATH_WTMP); - } - ac(fp); + ac(wtmpf); return 0; } @@ -349,7 +316,8 @@ main(int argc, char *argv[]) void show(const char *name, time_t secs) { - (void)printf("\t%-*s %8.2f\n", UT_NAMESIZE, name, + (void)printf("\t%-*s %8.2f\n", + (int)sizeof(((struct utmpx *)0)->ut_user), name, ((double)secs / 3600)); } @@ -384,9 +352,9 @@ show_today(struct user_list *users, stru yesterday++; for (lp = logins; lp != NULL; lp = lp->next) { - secs = yesterday - lp->usr.ut_time; - Users = update_user(Users, lp->usr.ut_name, secs); - lp->usr.ut_time = yesterday; /* as if they just logged in */ + secs = yesterday - lp->usr.ut_tv.tv_sec; + Users = update_user(Users, lp->usr.ut_user, secs); + lp->usr.ut_tv.tv_sec = yesterday; /* as if they just logged in */ } secs = 0; for (up = users; up != NULL; up = up->next) { @@ -403,16 +371,17 @@ show_today(struct user_list *users, stru * been shut down. */ struct utmp_list * -log_out(struct utmp_list *head, struct utmp *up) +log_out(struct utmp_list *head, struct utmpx *up) { struct utmp_list *lp, *lp2, *tlp; time_t secs; for (lp = head, lp2 = NULL; lp != NULL; ) - if (*up->ut_line == '~' || strncmp(lp->usr.ut_line, up->ut_line, - sizeof (up->ut_line)) == 0) { - secs = up->ut_time - lp->usr.ut_time; - Users = update_user(Users, lp->usr.ut_name, secs); + if (up->ut_type == BOOT_TIME || up->ut_type == SHUTDOWN_TIME || + (up->ut_type == DEAD_PROCESS && + memcmp(lp->usr.ut_id, up->ut_id, sizeof up->ut_id) == 0)) { + secs = up->ut_tv.tv_sec - lp->usr.ut_tv.tv_sec; + Users = update_user(Users, lp->usr.ut_user, secs); #ifdef DEBUG if (Debug) printf("%s logged out (%2d:%02d:%02d)\n", @@ -442,7 +411,7 @@ log_out(struct utmp_list *head, struct u * if do_tty says ok, login a user */ struct utmp_list * -log_in(struct utmp_list *head, struct utmp *up) +log_in(struct utmp_list *head, struct utmpx *up) { struct utmp_list *lp; @@ -491,7 +460,7 @@ log_in(struct utmp_list *head, struct ut errx(1, "malloc failed"); lp->next = head; head = lp; - memmove((char *)&lp->usr, (char *)up, sizeof (struct utmp)); + memmove(&lp->usr, up, sizeof *up); #ifdef DEBUG if (Debug) { printf("%s logged in", debug_pfx(&lp->usr, up)); @@ -505,10 +474,10 @@ log_in(struct utmp_list *head, struct ut } int -ac(FILE *fp) +ac(const char *file) { struct utmp_list *lp, *head = NULL; - struct utmp usr; + struct utmpx *usr, usht; struct tm *ltm; time_t prev_secs, secs, ut_timecopy; int day, rfound, tchanged, tskipped; @@ -517,14 +486,11 @@ ac(FILE *fp) prev_secs = 1; /* Minimum acceptable date == 1970 */ rfound = tchanged = tskipped = 0; secs = 0; - while (fread((char *)&usr, sizeof(usr), 1, fp) == 1) { + if (setutxdb(UTXDB_LOG, file) != 0) + err(1, "%s", file); + while ((usr = getutxent()) != NULL) { rfound++; - /* - * The type of utmp.ut_time is not necessary type time_t, as - * it is explicitly defined as type int32_t. Copy the value - * for platforms where sizeof(time_t) != size(int32_t). - */ - ut_timecopy = _time32_to_time(usr.ut_time); + ut_timecopy = usr->ut_tv.tv_sec; /* * With sparc64 using 64-bit time_t's, there is some system * routine which sets ut_time==0 (the high-order word of a @@ -540,10 +506,10 @@ ac(FILE *fp) #ifdef DEBUG if (Debug) printf("%s - date changed to: %s", - debug_pfx(&usr, &usr), ctime(&prev_secs)); + debug_pfx(usr, usr), ctime(&prev_secs)); #endif tchanged++; - usr.ut_time = ut_timecopy = prev_secs; + usr->ut_tv.tv_sec = ut_timecopy = prev_secs; } /* * Skip records where the time goes backwards. @@ -552,7 +518,7 @@ ac(FILE *fp) #ifdef DEBUG if (Debug) printf("%s - bad date, record skipped\n", - debug_pfx(&usr, &usr)); + debug_pfx(usr, usr)); #endif tskipped++; continue; /* Skip this invalid record. */ @@ -576,50 +542,51 @@ ac(FILE *fp) } else day = ltm->tm_yday; } - switch(*usr.ut_line) { - case '|': + switch(usr->ut_type) { + case OLD_TIME: secs = ut_timecopy; break; - case '{': + case NEW_TIME: secs -= ut_timecopy; /* * adjust time for those logged in */ for (lp = head; lp != NULL; lp = lp->next) - lp->usr.ut_time -= secs; + lp->usr.ut_tv.tv_sec -= secs; break; - case '~': /* reboot or shutdown */ - head = log_out(head, &usr); + case BOOT_TIME: + case SHUTDOWN_TIME: + head = log_out(head, usr); FirstTime = ut_timecopy; /* shouldn't be needed */ break; - default: + case USER_PROCESS: /* * if they came in on tty[p-sP-S]*, then it is only * a login session if the ut_host field is non-empty */ - if (*usr.ut_name) { - if (strncmp(usr.ut_line, "tty", 3) == 0 || - strchr("pqrsPQRS", usr.ut_line[3]) != 0 || - *usr.ut_host != '\0') - head = log_in(head, &usr); + if (strncmp(usr->ut_line, "tty", 3) != 0 || + strchr("pqrsPQRS", usr->ut_line[3]) == NULL || + *usr->ut_host != '\0') + head = log_in(head, usr); #ifdef DEBUG - else if (Debug > 1) - /* Things such as 'screen' sessions. */ - printf("%s - record ignored\n", - debug_pfx(&usr, &usr)); + else if (Debug > 1) + /* Things such as 'screen' sessions. */ + printf("%s - record ignored\n", + debug_pfx(usr, usr)); #endif - } else - head = log_out(head, &usr); + break; + case DEAD_PROCESS: + head = log_out(head, usr); break; } } - (void)fclose(fp); + endutxent(); if (!(Flags & AC_W)) - usr.ut_time = time((time_t *)0); - (void)strcpy(usr.ut_line, "~"); + usht.ut_tv.tv_sec = time(NULL); + usht.ut_type = SHUTDOWN_TIME; if (Flags & AC_D) { - ut_timecopy = _time32_to_time(usr.ut_time); + ut_timecopy = usht.ut_tv.tv_sec; ltm = localtime(&ut_timecopy); if (day >= 0 && day != ltm->tm_yday) { /* @@ -635,7 +602,7 @@ ac(FILE *fp) /* * anyone still logged in gets time up to now */ - head = log_out(head, &usr); + head = log_out(head, &usht); if (Flags & AC_D) show_today(Users, head, time((time_t *)0)); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:15:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD34310656A6; Wed, 13 Jan 2010 18:15:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92C958FC25; Wed, 13 Jan 2010 18:15:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIFkfd084271; Wed, 13 Jan 2010 18:15:46 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIFkng084268; Wed, 13 Jan 2010 18:15:46 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131815.o0DIFkng084268@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202204 - head/usr.sbin/timed/timed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:15:46 -0000 Author: ed Date: Wed Jan 13 18:15:46 2010 New Revision: 202204 URL: http://svn.freebsd.org/changeset/base/202204 Log: Port timed away from logwtmp(3). Let it use utmpx. Modified: head/usr.sbin/timed/timed/master.c head/usr.sbin/timed/timed/slave.c Modified: head/usr.sbin/timed/timed/master.c ============================================================================== --- head/usr.sbin/timed/timed/master.c Wed Jan 13 18:14:59 2010 (r202203) +++ head/usr.sbin/timed/timed/master.c Wed Jan 13 18:15:46 2010 (r202204) @@ -44,6 +44,7 @@ static const char rcsid[] = #include #include #include +#include #include "pathnames.h" extern int measure_delta; @@ -56,8 +57,6 @@ static int slvcount; /* slaves listeni static void mchgdate(struct tsp *); -extern void logwtmp(char *, char *, char *); - /* * The main function of `master' is to periodically compute the differences * (deltas) between its clock and the clocks of the slaves, to compute the @@ -350,6 +349,7 @@ mchgdate(msg) char tname[MAXHOSTNAMELEN]; char olddate[32]; struct timeval otime, ntime, tmptv; + struct utmpx utx; (void)strcpy(tname, msg->tsp_name); @@ -371,9 +371,13 @@ mchgdate(msg) dictate = 3; synch(tvtomsround(ntime)); } else { - logwtmp("|", "date", ""); + utx.ut_type = OLD_TIME; + gettimeofday(&utx.ut_tv, NULL); + pututxline(&utx); (void)settimeofday(&tmptv, 0); - logwtmp("{", "date", ""); + utx.ut_type = NEW_TIME; + gettimeofday(&utx.ut_tv, NULL); + pututxline(&utx); spreadtime(); } Modified: head/usr.sbin/timed/timed/slave.c ============================================================================== --- head/usr.sbin/timed/timed/slave.c Wed Jan 13 18:14:59 2010 (r202203) +++ head/usr.sbin/timed/timed/slave.c Wed Jan 13 18:15:46 2010 (r202204) @@ -41,6 +41,7 @@ static const char rcsid[] = #include "globals.h" #include +#include #include "pathnames.h" extern jmp_buf jmpenv; @@ -57,8 +58,6 @@ static void schgdate(struct tsp *, char static void setmaster(struct tsp *); static void answerdelay(void); -extern void logwtmp(char *, char *, char *); - int slave() { @@ -80,6 +79,7 @@ slave() char newdate[32]; struct netinfo *ntp; struct hosttbl *htp; + struct utmpx utx; old_slavenet = 0; @@ -280,9 +280,13 @@ loop: */ synch(tvtomsround(ntime)); } else { - logwtmp("|", "date", ""); - (void)settimeofday(&tmptv, 0); - logwtmp("{", "date", ""); + utx.ut_type = OLD_TIME; + gettimeofday(&utx.ut_tv, NULL); + pututxline(&utx); + (void)settimeofday(&tmptv, 0); + utx.ut_type = NEW_TIME; + gettimeofday(&utx.ut_tv, NULL); + pututxline(&utx); syslog(LOG_NOTICE, "date changed by %s from %s", msg->tsp_name, olddate); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:17:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1A9F10656A7; Wed, 13 Jan 2010 18:17:12 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7AFF8FC15; Wed, 13 Jan 2010 18:17:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIHC4s084607; Wed, 13 Jan 2010 18:17:12 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIHC44084604; Wed, 13 Jan 2010 18:17:12 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131817.o0DIHC44084604@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202205 - head/usr.sbin/lastlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:17:13 -0000 Author: ed Date: Wed Jan 13 18:17:12 2010 New Revision: 202205 URL: http://svn.freebsd.org/changeset/base/202205 Log: Port lastlogin(8) to utmpx. While there, fix a bug I introduced previously. We must reopen the database for each username passed on the command line. We must rewind the database and search from the beginning. Modified: head/usr.sbin/lastlogin/Makefile head/usr.sbin/lastlogin/lastlogin.c Modified: head/usr.sbin/lastlogin/Makefile ============================================================================== --- head/usr.sbin/lastlogin/Makefile Wed Jan 13 18:15:46 2010 (r202204) +++ head/usr.sbin/lastlogin/Makefile Wed Jan 13 18:17:12 2010 (r202205) @@ -3,7 +3,4 @@ PROG= lastlogin MAN= lastlogin.8 -DPADD= ${LIBULOG} -LDADD= -lulog - .include Modified: head/usr.sbin/lastlogin/lastlogin.c ============================================================================== --- head/usr.sbin/lastlogin/lastlogin.c Wed Jan 13 18:15:46 2010 (r202204) +++ head/usr.sbin/lastlogin/lastlogin.c Wed Jan 13 18:17:12 2010 (r202205) @@ -41,62 +41,62 @@ __RCSID("$NetBSD: lastlogin.c,v 1.4 1998 #include #include #include -#include #include +#include int main(int, char **); -static void output(struct ulog_utmpx *); +static void output(struct utmpx *); static void usage(void); int main(int argc, char *argv[]) { int ch, i; - struct ulog_utmpx *u; + struct utmpx *u; while ((ch = getopt(argc, argv, "")) != -1) { usage(); } - if (ulog_setutxfile(UTXI_USER, NULL) != 0) - errx(1, "failed to open lastlog database"); - setpassent(1); /* Keep passwd file pointers open */ /* Process usernames given on the command line. */ if (argc > 1) { for (i = 1; i < argc; ++i) { - if ((u = ulog_getutxuser(argv[i])) == NULL) { + if (setutxdb(UTXDB_LASTLOGIN, NULL) != 0) + errx(1, "failed to open lastlog database"); + if ((u = getutxuser(argv[i])) == NULL) { warnx("user '%s' not found", argv[i]); continue; } output(u); + endutxent(); } } /* Read all lastlog entries, looking for active ones */ else { - while ((u = ulog_getutxent()) != NULL) { + if (setutxdb(UTXDB_LASTLOGIN, NULL) != 0) + errx(1, "failed to open lastlog database"); + while ((u = getutxent()) != NULL) { if (u->ut_type != USER_PROCESS) continue; output(u); } + endutxent(); } setpassent(0); /* Close passwd file pointers */ - - ulog_endutxent(); exit(0); } /* Duplicate the output of last(1) */ static void -output(struct ulog_utmpx *u) +output(struct utmpx *u) { time_t t = u->ut_tv.tv_sec; - printf("%-16s %-8s %-16s %s", - u->ut_user, u->ut_line, u->ut_host, - (u->ut_type == USER_PROCESS) ? ctime(&t) : "Never logged in\n"); + printf("%-10s %-8s %-22s %s", + u->ut_user, u->ut_line, u->ut_host, ctime(&t)); } static void From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:17:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4F441065672; Wed, 13 Jan 2010 18:17:53 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3C918FC08; Wed, 13 Jan 2010 18:17:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIHr7e084806; Wed, 13 Jan 2010 18:17:53 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIHrkQ084799; Wed, 13 Jan 2010 18:17:53 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131817.o0DIHrkQ084799@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202206 - in head/usr.sbin: bsnmpd/modules/snmp_hostres rwhod syslogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:17:54 -0000 Author: ed Date: Wed Jan 13 18:17:53 2010 New Revision: 202206 URL: http://svn.freebsd.org/changeset/base/202206 Log: Port all applications in usr.sbin/ from libulog to utmpx. Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c head/usr.sbin/rwhod/Makefile head/usr.sbin/rwhod/rwhod.c head/usr.sbin/syslogd/Makefile head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Wed Jan 13 18:17:12 2010 (r202205) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Wed Jan 13 18:17:53 2010 (r202206) @@ -69,8 +69,8 @@ MAN= snmp_hostres.3 DEFS= ${MOD}_tree.def BMIBS= BEGEMOT-HOSTRES-MIB.txt -DPADD= ${LIBKVM} ${LIBDEVINFO} ${LIBM} ${LIBGEOM} ${LIBMEMSTAT} ${LIBULOG} -LDADD= -lkvm -ldevinfo -lm -lgeom -lmemstat -lulog +DPADD= ${LIBKVM} ${LIBDEVINFO} ${LIBM} ${LIBGEOM} ${LIBMEMSTAT} +LDADD= -lkvm -ldevinfo -lm -lgeom -lmemstat .include Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Wed Jan 13 18:17:12 2010 (r202205) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Wed Jan 13 18:17:53 2010 (r202206) @@ -41,8 +41,7 @@ #include #include #include -#define _ULOG_POSIX_NAMES -#include +#include #include "hostres_snmp.h" #include "hostres_oid.h" Modified: head/usr.sbin/rwhod/Makefile ============================================================================== --- head/usr.sbin/rwhod/Makefile Wed Jan 13 18:17:12 2010 (r202205) +++ head/usr.sbin/rwhod/Makefile Wed Jan 13 18:17:53 2010 (r202206) @@ -6,7 +6,4 @@ MAN= rwhod.8 WARNS?= 3 -DPADD= ${LIBULOG} -LDADD= -lulog - .include Modified: head/usr.sbin/rwhod/rwhod.c ============================================================================== --- head/usr.sbin/rwhod/rwhod.c Wed Jan 13 18:17:12 2010 (r202205) +++ head/usr.sbin/rwhod/rwhod.c Wed Jan 13 18:17:53 2010 (r202206) @@ -67,9 +67,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include #include #include Modified: head/usr.sbin/syslogd/Makefile ============================================================================== --- head/usr.sbin/syslogd/Makefile Wed Jan 13 18:17:12 2010 (r202205) +++ head/usr.sbin/syslogd/Makefile Wed Jan 13 18:17:53 2010 (r202206) @@ -9,8 +9,8 @@ PROG= syslogd MAN= syslog.conf.5 syslogd.8 SRCS= syslogd.c ttymsg.c -DPADD= ${LIBULOG} ${LIBUTIL} -LDADD= -lulog -lutil +DPADD= ${LIBUTIL} +LDADD= -lutil WARNS?= 3 Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Wed Jan 13 18:17:12 2010 (r202205) +++ head/usr.sbin/syslogd/syslogd.c Wed Jan 13 18:17:53 2010 (r202206) @@ -105,9 +105,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _ULOG_POSIX_NAMES -#include #include +#include #include "pathnames.h" #include "ttymsg.h" From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:24:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D92F71065692; Wed, 13 Jan 2010 18:24:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8C5D8FC17; Wed, 13 Jan 2010 18:24:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIO4Sd086221; Wed, 13 Jan 2010 18:24:04 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIO46j086219; Wed, 13 Jan 2010 18:24:04 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131824.o0DIO46j086219@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202207 - head/libexec/rlogind X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:24:04 -0000 Author: ed Date: Wed Jan 13 18:24:04 2010 New Revision: 202207 URL: http://svn.freebsd.org/changeset/base/202207 Log: Remove `dead code' from rlogind. - It shouldn't call logwtmp(). Applications like login(1) already make sure both login and logout entries are written to the storage. - There's no need to restore permissions on the pseudo-terminal, since it should be garbage collected by the kernel. Modified: head/libexec/rlogind/rlogind.c Modified: head/libexec/rlogind/rlogind.c ============================================================================== --- head/libexec/rlogind/rlogind.c Wed Jan 13 18:17:53 2010 (r202206) +++ head/libexec/rlogind/rlogind.c Wed Jan 13 18:24:04 2010 (r202207) @@ -479,18 +479,7 @@ protocol(int f, int p) void cleanup(int signo) { - char *p; - p = line + sizeof(_PATH_DEV) - 1; - if (logout(p)) - logwtmp(p, "", ""); - (void)chflags(line, 0); - (void)chmod(line, 0666); - (void)chown(line, 0, 0); - *p = 'p'; - (void)chflags(line, 0); - (void)chmod(line, 0666); - (void)chown(line, 0, 0); shutdown(netf, SHUT_RDWR); exit(1); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:25:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 478701065670; Wed, 13 Jan 2010 18:25:44 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 363BA8FC1D; Wed, 13 Jan 2010 18:25:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIPifI086617; Wed, 13 Jan 2010 18:25:44 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIPiwJ086615; Wed, 13 Jan 2010 18:25:44 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131825.o0DIPiwJ086615@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202208 - head/libexec/comsat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:25:44 -0000 Author: ed Date: Wed Jan 13 18:25:43 2010 New Revision: 202208 URL: http://svn.freebsd.org/changeset/base/202208 Log: Port comsat to utmpx. It seems comsat stats the utmpx database each 15 seconds to see whether it has been changed. I am changing this behaviour to look at the utmpx database upon processing. I don't want to allow direct interference with the database files. I also wonder whether this optimization has any measurable performance benefit nowadays. Modified: head/libexec/comsat/comsat.c Modified: head/libexec/comsat/comsat.c ============================================================================== --- head/libexec/comsat/comsat.c Wed Jan 13 18:24:04 2010 (r202207) +++ head/libexec/comsat/comsat.c Wed Jan 13 18:25:43 2010 (r202208) @@ -66,7 +66,7 @@ static const char rcsid[] = #include #include #include -#include +#include int debug = 0; #define dsyslog if (debug) syslog @@ -74,14 +74,10 @@ int debug = 0; #define MAXIDLE 120 char hostname[MAXHOSTNAMELEN]; -struct utmp *utmp = NULL; -time_t lastmsgtime; -int nutmp, uf; void jkfprintf(FILE *, char[], char[], off_t); void mailfor(char *); -void notify(struct utmp *, char[], off_t, int); -void onalrm(int); +void notify(struct utmpx *, char[], off_t, int); void reapchildren(int); int @@ -102,15 +98,7 @@ main(int argc __unused, char *argv[] __u (void) recv(0, msgbuf, sizeof(msgbuf) - 1, 0); exit(1); } - if ((uf = open(_PATH_UTMP, O_RDONLY, 0)) < 0) { - syslog(LOG_ERR, "open: %s: %m", _PATH_UTMP); - (void) recv(0, msgbuf, sizeof(msgbuf) - 1, 0); - exit(1); - } - (void)time(&lastmsgtime); (void)gethostname(hostname, sizeof(hostname)); - onalrm(0); - (void)signal(SIGALRM, onalrm); (void)signal(SIGTTOU, SIG_IGN); (void)signal(SIGCHLD, reapchildren); for (;;) { @@ -121,11 +109,7 @@ main(int argc __unused, char *argv[] __u errno = 0; continue; } - if (!nutmp) /* no one has logged in yet */ - continue; - sigblock(sigmask(SIGALRM)); msgbuf[cc] = '\0'; - (void)time(&lastmsgtime); mailfor(msgbuf); sigsetmask(0L); } @@ -138,40 +122,15 @@ reapchildren(int signo __unused) } void -onalrm(int signo __unused) -{ - static off_t utmpsize; /* last malloced size for utmp */ - static time_t utmpmtime; /* last modification time for utmp */ - struct stat statbf; - - if (time(NULL) - lastmsgtime >= MAXIDLE) - exit(0); - (void)alarm((u_int)15); - (void)fstat(uf, &statbf); - if (statbf.st_mtime > utmpmtime) { - utmpmtime = statbf.st_mtime; - if (statbf.st_size > utmpsize) { - utmpsize = statbf.st_size + 10 * sizeof(struct utmp); - if ((utmp = realloc(utmp, utmpsize)) == NULL) { - syslog(LOG_ERR, "%s", strerror(errno)); - exit(1); - } - } - (void)lseek(uf, (off_t)0, SEEK_SET); - nutmp = read(uf, utmp, (size_t)statbf.st_size)/sizeof(struct utmp); - } -} - -void mailfor(char *name) { - struct utmp *utp = &utmp[nutmp]; + struct utmpx *utp; char *cp; char *file; off_t offset; int folder; - char buf[sizeof(_PATH_MAILDIR) + sizeof(utmp[0].ut_name) + 1]; - char buf2[sizeof(_PATH_MAILDIR) + sizeof(utmp[0].ut_name) + 1]; + char buf[sizeof(_PATH_MAILDIR) + sizeof(utp->ut_user) + 1]; + char buf2[sizeof(_PATH_MAILDIR) + sizeof(utp->ut_user) + 1]; if (!(cp = strchr(name, '@'))) return; @@ -181,33 +140,35 @@ mailfor(char *name) file = name; else file = cp + 1; - sprintf(buf, "%s/%.*s", _PATH_MAILDIR, (int)sizeof(utmp[0].ut_name), + sprintf(buf, "%s/%.*s", _PATH_MAILDIR, (int)sizeof(utp->ut_user), name); if (*file != '/') { sprintf(buf2, "%s/%.*s", _PATH_MAILDIR, - (int)sizeof(utmp[0].ut_name), file); + (int)sizeof(utp->ut_user), file); file = buf2; } folder = strcmp(buf, file); - while (--utp >= utmp) - if (!strncmp(utp->ut_name, name, sizeof(utmp[0].ut_name))) + setutxent(); + while ((utp = getutxent()) != NULL) + if (utp->ut_type == USER_PROCESS && !strcmp(utp->ut_user, name)) notify(utp, file, offset, folder); + endutxent(); } static const char *cr; void -notify(struct utmp *utp, char file[], off_t offset, int folder) +notify(struct utmpx *utp, char file[], off_t offset, int folder) { FILE *tp; struct stat stb; struct termios tio; - char tty[20], name[sizeof(utmp[0].ut_name) + 1]; - const char *line = utp->ut_line; + char tty[20]; + const char *s = utp->ut_line; - if (strncmp(line, "pts/", 4) == 0) - line += 4; - if (strchr(line, '/')) { + if (strncmp(s, "pts/", 4) == 0) + s += 4; + if (strchr(s, '/')) { /* A slash is an attempt to break security... */ syslog(LOG_AUTH | LOG_NOTICE, "Unexpected `/' in `%s'", utp->ut_line); @@ -216,10 +177,10 @@ notify(struct utmp *utp, char file[], of (void)snprintf(tty, sizeof(tty), "%s%.*s", _PATH_DEV, (int)sizeof(utp->ut_line), utp->ut_line); if (stat(tty, &stb) == -1 || !(stb.st_mode & (S_IXUSR | S_IXGRP))) { - dsyslog(LOG_DEBUG, "%s: wrong mode on %s", utp->ut_name, tty); + dsyslog(LOG_DEBUG, "%s: wrong mode on %s", utp->ut_user, tty); return; } - dsyslog(LOG_DEBUG, "notify %s on %s\n", utp->ut_name, tty); + dsyslog(LOG_DEBUG, "notify %s on %s\n", utp->ut_user, tty); switch (fork()) { case -1: syslog(LOG_NOTICE, "fork failed (%m)"); @@ -229,25 +190,21 @@ notify(struct utmp *utp, char file[], of default: return; } - (void)signal(SIGALRM, SIG_DFL); - (void)alarm((u_int)30); if ((tp = fopen(tty, "w")) == NULL) { dsyslog(LOG_ERR, "%s: %s", tty, strerror(errno)); _exit(1); } (void)tcgetattr(fileno(tp), &tio); cr = ((tio.c_oflag & (OPOST|ONLCR)) == (OPOST|ONLCR)) ? "\n" : "\n\r"; - (void)strncpy(name, utp->ut_name, sizeof(utp->ut_name)); - name[sizeof(name) - 1] = '\0'; switch (stb.st_mode & (S_IXUSR | S_IXGRP)) { case S_IXUSR: case (S_IXUSR | S_IXGRP): (void)fprintf(tp, "%s\007New mail for %s@%.*s\007 has arrived%s%s%s:%s----%s", - cr, name, (int)sizeof(hostname), hostname, + cr, utp->ut_user, (int)sizeof(hostname), hostname, folder ? cr : "", folder ? "to " : "", folder ? file : "", cr, cr); - jkfprintf(tp, name, file, offset); + jkfprintf(tp, utp->ut_user, file, offset); break; case S_IXGRP: (void)fprintf(tp, "\007"); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:28:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 863F91065679; Wed, 13 Jan 2010 18:28:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A9248FC1F; Wed, 13 Jan 2010 18:28:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DISf18087307; Wed, 13 Jan 2010 18:28:41 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DISfZw087304; Wed, 13 Jan 2010 18:28:41 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131828.o0DISfZw087304@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202209 - head/libexec/ftpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:28:41 -0000 Author: ed Date: Wed Jan 13 18:28:41 2010 New Revision: 202209 URL: http://svn.freebsd.org/changeset/base/202209 Log: Port ftpd to utmpx. Unfortunately I have to partially wreck its functionality, though. ftpd used to keep a file descriptor to the wtmp, which allowed it to work from within a chroot. The current utmpx implementation doesn't offer a way to do this. Maybe we can address this in the future, if it turns out to be a real issue. Modified: head/libexec/ftpd/ftpd.c head/libexec/ftpd/logwtmp.c Modified: head/libexec/ftpd/ftpd.c ============================================================================== --- head/libexec/ftpd/ftpd.c Wed Jan 13 18:25:43 2010 (r202208) +++ head/libexec/ftpd/ftpd.c Wed Jan 13 18:28:41 2010 (r202209) @@ -173,8 +173,7 @@ static struct ftphost { char remotehost[NI_MAXHOST]; char *ident = NULL; -static char ttyline[20]; -char *tty = ttyline; /* for klogin */ +static char wtmpid[20]; #ifdef USE_PAM static int auth_pam(struct passwd**, const char*); @@ -584,8 +583,7 @@ gotchild: data_source.su_port = htons(ntohs(ctrl_addr.su_port) - 1); - /* set this here so klogin can use it... */ - (void)snprintf(ttyline, sizeof(ttyline), "ftp%d", getpid()); + (void)snprintf(wtmpid, sizeof(wtmpid), "%xftpd", getpid()); /* Try to handle urgent data inline */ #ifdef SO_OOBINLINE @@ -1180,8 +1178,8 @@ end_login(void) #endif (void) seteuid(0); - if (logged_in && dowtmp) - ftpd_logwtmp(ttyline, "", NULL); + if (logged_in && dowtmp && !dochroot) + ftpd_logwtmp(wtmpid, "", NULL); pw = NULL; #ifdef LOGIN_CAP setusercontext(NULL, getpwuid(0), 0, @@ -1476,9 +1474,16 @@ skip: } #endif - /* open wtmp before chroot */ - if (dowtmp) - ftpd_logwtmp(ttyline, pw->pw_name, + dochroot = + checkuser(_PATH_FTPCHROOT, pw->pw_name, 1, &residue) +#ifdef LOGIN_CAP /* Allow login.conf configuration as well */ + || login_getcapbool(lc, "ftp-chroot", 0) +#endif + ; + chrootdir = NULL; + + if (dowtmp && !dochroot) + ftpd_logwtmp(wtmpid, pw->pw_name, (struct sockaddr *)&his_addr); logged_in = 1; @@ -1491,13 +1496,6 @@ skip: if (statfd < 0) stats = 0; - dochroot = - checkuser(_PATH_FTPCHROOT, pw->pw_name, 1, &residue) -#ifdef LOGIN_CAP /* Allow login.conf configuration as well */ - || login_getcapbool(lc, "ftp-chroot", 0) -#endif - ; - chrootdir = NULL; /* * For a chrooted local user, * a) see whether ftpchroot(5) specifies a chroot directory, @@ -2732,9 +2730,9 @@ void dologout(int status) { - if (logged_in && dowtmp) { + if (logged_in && dowtmp && !dochroot) { (void) seteuid(0); - ftpd_logwtmp(ttyline, "", NULL); + ftpd_logwtmp(wtmpid, "", NULL); } /* beware of flushing buffers after a SIGPIPE */ _exit(status); Modified: head/libexec/ftpd/logwtmp.c ============================================================================== --- head/libexec/ftpd/logwtmp.c Wed Jan 13 18:25:43 2010 (r202208) +++ head/libexec/ftpd/logwtmp.c Wed Jan 13 18:28:41 2010 (r202209) @@ -46,47 +46,35 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include -#include -#include +#include #include #include -#include +#include +#include #include "extern.h" -static int fd = -1; - -/* - * Modified version of logwtmp that holds wtmp file open - * after first call, for use with ftp (which may chroot - * after login, but before logout). - */ void -ftpd_logwtmp(line, name, addr) - char *line, *name; - struct sockaddr *addr; +ftpd_logwtmp(char *id, char *user, struct sockaddr *addr) { - struct utmp ut; - struct stat buf; - char host[UT_HOSTSIZE]; - - if (addr == NULL) - host[0] = '\0'; - else - realhostname_sa(host, sizeof(host), addr, addr->sa_len); - - if (fd < 0 && (fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) < 0) - return; - if (fstat(fd, &buf) == 0) { - (void)strncpy(ut.ut_line, line, sizeof(ut.ut_line)); - (void)strncpy(ut.ut_name, name, sizeof(ut.ut_name)); - (void)strncpy(ut.ut_host, host, sizeof(ut.ut_host)); - ut.ut_time = _time_to_time32(time(NULL)); - if (write(fd, &ut, sizeof(struct utmp)) != - sizeof(struct utmp)) - (void)ftruncate(fd, buf.st_size); + struct utmpx ut; + + memset(&ut, 0, sizeof(ut)); + + if (*user != '\0') { + /* Log in. */ + ut.ut_type = USER_PROCESS; + (void)strncpy(ut.ut_user, user, sizeof(ut.ut_user)); + if (addr != NULL) + realhostname_sa(ut.ut_host, sizeof(ut.ut_host), + addr, addr->sa_len); + } else { + /* Log out. */ + ut.ut_type = DEAD_PROCESS; } + + ut.ut_pid = getpid(); + gettimeofday(&ut.ut_tv, NULL); + (void)strncpy(ut.ut_id, id, sizeof(ut.ut_id)); + + pututxline(&ut); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:28:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 537B11065692; Wed, 13 Jan 2010 18:28:59 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 298B78FC0A; Wed, 13 Jan 2010 18:28:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DISxhM087410; Wed, 13 Jan 2010 18:28:59 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DISxPx087405; Wed, 13 Jan 2010 18:28:59 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131828.o0DISxPx087405@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:28:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202210 - in head/libexec: rpc.rusersd talkd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:28:59 -0000 Author: ed Date: Wed Jan 13 18:28:58 2010 New Revision: 202210 URL: http://svn.freebsd.org/changeset/base/202210 Log: Port all apps in libexec/ from libulog to utmpx. Modified: head/libexec/rpc.rusersd/Makefile head/libexec/rpc.rusersd/rusers_proc.c head/libexec/talkd/Makefile head/libexec/talkd/process.c Modified: head/libexec/rpc.rusersd/Makefile ============================================================================== --- head/libexec/rpc.rusersd/Makefile Wed Jan 13 18:28:41 2010 (r202209) +++ head/libexec/rpc.rusersd/Makefile Wed Jan 13 18:28:58 2010 (r202210) @@ -4,8 +4,8 @@ PROG = rpc.rusersd SRCS = rusersd.c rusers_proc.c MAN = rpc.rusersd.8 -DPADD= ${LIBRPCSVC} ${LIBULOG} ${LIBUTIL} -LDADD= -lrpcsvc -lulog -lutil +DPADD= ${LIBRPCSVC} ${LIBUTIL} +LDADD= -lrpcsvc -lutil #.if exists(/usr/X11R6/include/X11/extensions/xidle.h) #CFLAGS+= -DXIDLE Modified: head/libexec/rpc.rusersd/rusers_proc.c ============================================================================== --- head/libexec/rpc.rusersd/rusers_proc.c Wed Jan 13 18:28:41 2010 (r202209) +++ head/libexec/rpc.rusersd/rusers_proc.c Wed Jan 13 18:28:58 2010 (r202210) @@ -45,8 +45,7 @@ static const char rcsid[] = #include #include #include -#define _ULOG_POSIX_NAMES -#include +#include #ifdef XIDLE #include #include Modified: head/libexec/talkd/Makefile ============================================================================== --- head/libexec/talkd/Makefile Wed Jan 13 18:28:41 2010 (r202209) +++ head/libexec/talkd/Makefile Wed Jan 13 18:28:58 2010 (r202210) @@ -7,8 +7,4 @@ SRCS= talkd.c announce.c process.c table MAN= talkd.8 CFLAGS+=-I${.CURDIR}/../../usr.bin/wall - -DPADD= ${LIBULOG} -LDADD= -lulog - .include Modified: head/libexec/talkd/process.c ============================================================================== --- head/libexec/talkd/process.c Wed Jan 13 18:28:41 2010 (r202209) +++ head/libexec/talkd/process.c Wed Jan 13 18:28:58 2010 (r202210) @@ -59,8 +59,7 @@ static const char rcsid[] = #include #include #include -#define _ULOG_POSIX_NAMES -#include +#include #include "extern.h" From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:32:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CFE5106566C; Wed, 13 Jan 2010 18:32:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C4548FC1B; Wed, 13 Jan 2010 18:32:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIWVdE088210; Wed, 13 Jan 2010 18:32:31 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIWVtl088208; Wed, 13 Jan 2010 18:32:31 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131832.o0DIWVtl088208@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202211 - head/lib/libpam/modules/pam_lastlog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:32:31 -0000 Author: ed Date: Wed Jan 13 18:32:31 2010 New Revision: 202211 URL: http://svn.freebsd.org/changeset/base/202211 Log: Let pam_lastlog use utmpx instead of libulog's utmpx interface. It will still use ulog_login(3) and ulog_logout(3), which will remain present. Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.c ============================================================================== --- head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Wed Jan 13 18:28:58 2010 (r202210) +++ head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Wed Jan 13 18:32:31 2010 (r202211) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define PAM_SM_SESSION @@ -61,7 +62,7 @@ pam_sm_open_session(pam_handle_t *pamh, int argc __unused, const char *argv[] __unused) { struct passwd *pwd; - struct ulog_utmpx *utx; + struct utmpx *utx; time_t t; const char *user; const void *rhost, *tty; @@ -91,10 +92,10 @@ pam_sm_open_session(pam_handle_t *pamh, } if ((flags & PAM_SILENT) == 0) { - if (ulog_setutxfile(UTXI_USER, NULL) != 0) { - PAM_LOG("Failed to open lastlog database"); + if (setutxdb(UTXDB_LASTLOGIN, NULL) != 0) { + PAM_LOG("Failed to open lastlogin database"); } else { - utx = ulog_getutxuser(user); + utx = getutxuser(user); if (utx != NULL && utx->ut_type == USER_PROCESS) { t = utx->ut_tv.tv_sec; if (*utx->ut_host != '\0') @@ -104,7 +105,7 @@ pam_sm_open_session(pam_handle_t *pamh, pam_info(pamh, "Last login: %.*s on %s", 24 - 5, ctime(&t), utx->ut_line); } - ulog_endutxent(); + endutxent(); } } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:37:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0797E1065672; Wed, 13 Jan 2010 18:37:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB11D8FC17; Wed, 13 Jan 2010 18:37:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIbgDA089410; Wed, 13 Jan 2010 18:37:42 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIbgen089407; Wed, 13 Jan 2010 18:37:42 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131837.o0DIbgen089407@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202212 - head/contrib/telnet/telnetd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:37:43 -0000 Author: ed Date: Wed Jan 13 18:37:42 2010 New Revision: 202212 URL: http://svn.freebsd.org/changeset/base/202212 Log: Let telnetd build without utmp and logwtmp(3). Just like rlogind, there is no need to change the ownership of the terminal during shutdown anymore. Also don't call logwtmp, because the login(1)/PAM is responsible for doing this. Also use SHUT_RDWR instead of 2. Modified: head/contrib/telnet/telnetd/sys_term.c head/contrib/telnet/telnetd/telnetd.c Modified: head/contrib/telnet/telnetd/sys_term.c ============================================================================== --- head/contrib/telnet/telnetd/sys_term.c Wed Jan 13 18:32:31 2010 (r202211) +++ head/contrib/telnet/telnetd/sys_term.c Wed Jan 13 18:37:42 2010 (r202212) @@ -1303,24 +1303,7 @@ scrub_env(void) void cleanup(int sig __unused) { - char *p; - sigset_t mask; - p = line + sizeof(_PATH_DEV) - 1; - /* - * Block all signals before clearing the utmp entry. We don't want to - * be called again after calling logout() and then not add the wtmp - * entry because of not finding the corresponding entry in utmp. - */ - sigfillset(&mask); - sigprocmask(SIG_SETMASK, &mask, NULL); - if (logout(p)) - logwtmp(p, "", ""); - (void)chmod(line, 0666); - (void)chown(line, 0, 0); - *p = 'p'; - (void)chmod(line, 0666); - (void)chown(line, 0, 0); - (void) shutdown(net, 2); + (void) shutdown(net, SHUT_RDWR); _exit(1); } Modified: head/contrib/telnet/telnetd/telnetd.c ============================================================================== --- head/contrib/telnet/telnetd/telnetd.c Wed Jan 13 18:32:31 2010 (r202211) +++ head/contrib/telnet/telnetd/telnetd.c Wed Jan 13 18:37:42 2010 (r202212) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:43:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E10F1065672; Wed, 13 Jan 2010 18:43:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CC468FC17; Wed, 13 Jan 2010 18:43:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIhWr9090700; Wed, 13 Jan 2010 18:43:32 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIhWuL090695; Wed, 13 Jan 2010 18:43:32 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131843.o0DIhWuL090695@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202213 - head/crypto/openssh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:43:32 -0000 Author: ed Date: Wed Jan 13 18:43:32 2010 New Revision: 202213 URL: http://svn.freebsd.org/changeset/base/202213 Log: Make OpenSSH work with utmpx. - Partially revert r184122 (sshd.c). Our ut_host is now big enough to fit proper hostnames. - Change config.h to match reality. - defines.h requires UTMPX_FILE to be set by before it allows the utmpx code to work. This makes no sense to me. I've already mentioned this upstream. - Add our own platform-specific handling of lastlog. The version I will send to the OpenSSH folks will use proper autoconf generated definitions instead of `#if 1'. Modified: head/crypto/openssh/config.h head/crypto/openssh/defines.h head/crypto/openssh/loginrec.c head/crypto/openssh/sshd.c Modified: head/crypto/openssh/config.h ============================================================================== --- head/crypto/openssh/config.h Wed Jan 13 18:37:42 2010 (r202212) +++ head/crypto/openssh/config.h Wed Jan 13 18:43:32 2010 (r202213) @@ -85,13 +85,13 @@ /* #undef CONF_UTMPX_FILE */ /* Define if you want to specify the path to your utmp file */ -#define CONF_UTMP_FILE "/var/run/utmp" +/* #undef CONF_UTMP_FILE */ /* Define if you want to specify the path to your wtmpx file */ /* #undef CONF_WTMPX_FILE */ /* Define if you want to specify the path to your wtmp file */ -#define CONF_WTMP_FILE "/var/log/wtmp" +/* #undef CONF_WTMP_FILE */ /* Define if your platform needs to skip post auth file descriptor passing */ /* #undef DISABLE_FD_PASSING */ @@ -112,13 +112,13 @@ /* #undef DISABLE_SHADOW */ /* Define if you don't want to use utmp */ -/* #undef DISABLE_UTMP */ +#define DISABLE_UTMP 1 /* Define if you don't want to use utmpx */ -#define DISABLE_UTMPX 1 +/* #undef DISABLE_UTMPX */ /* Define if you don't want to use wtmp */ -/* #undef DISABLE_WTMP */ +#define DISABLE_WTMP 1 /* Define if you don't want to use wtmpx */ #define DISABLE_WTMPX 1 @@ -319,7 +319,7 @@ /* #undef HAVE_ENDUTENT */ /* Define to 1 if you have the `endutxent' function. */ -/* #undef HAVE_ENDUTXENT */ +#define HAVE_ENDUTXENT 1 /* Define if your system has /etc/default/login */ /* #undef HAVE_ETC_DEFAULT_LOGIN */ @@ -445,13 +445,13 @@ /* #undef HAVE_GETUTLINE */ /* Define to 1 if you have the `getutxent' function. */ -/* #undef HAVE_GETUTXENT */ +#define HAVE_GETUTXENT 1 /* Define to 1 if you have the `getutxid' function. */ -/* #undef HAVE_GETUTXID */ +#define HAVE_GETUTXID 1 /* Define to 1 if you have the `getutxline' function. */ -/* #undef HAVE_GETUTXLINE */ +#define HAVE_GETUTXLINE 1 /* Define to 1 if you have the `get_default_context_with_level' function. */ /* #undef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL */ @@ -484,10 +484,10 @@ #define HAVE_HEADER_AD 1 /* Define if you have ut_host in utmp.h */ -#define HAVE_HOST_IN_UTMP 1 +/* #undef HAVE_HOST_IN_UTMP */ /* Define if you have ut_host in utmpx.h */ -/* #undef HAVE_HOST_IN_UTMPX */ +#define HAVE_HOST_IN_UTMPX 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_IAF_H */ @@ -499,7 +499,7 @@ /* #undef HAVE_ID_IN_UTMP */ /* Define if you have ut_id in utmpx.h */ -/* #undef HAVE_ID_IN_UTMPX */ +#define HAVE_ID_IN_UTMPX 1 /* Define to 1 if you have the `inet_aton' function. */ #define HAVE_INET_ATON 1 @@ -574,7 +574,7 @@ /* #undef HAVE_LINUX_IF_TUN_H */ /* Define if your libraries define login() */ -#define HAVE_LOGIN 1 +/* #undef HAVE_LOGIN */ /* Define to 1 if you have the header file. */ #define HAVE_LOGIN_CAP_H 1 @@ -586,10 +586,10 @@ /* #undef HAVE_LOGIN_H */ /* Define to 1 if you have the `logout' function. */ -#define HAVE_LOGOUT 1 +/* #undef HAVE_LOGOUT */ /* Define to 1 if you have the `logwtmp' function. */ -#define HAVE_LOGWTMP 1 +/* #undef HAVE_LOGWTMP */ /* Define to 1 if the system has the type `long double'. */ #define HAVE_LONG_DOUBLE 1 @@ -704,7 +704,7 @@ /* #undef HAVE_PUTUTLINE */ /* Define to 1 if you have the `pututxline' function. */ -/* #undef HAVE_PUTUTXLINE */ +#define HAVE_PUTUTXLINE 1 /* Define if your password has a pw_change field */ #define HAVE_PW_CHANGE_IN_PASSWD 1 @@ -800,7 +800,7 @@ /* #undef HAVE_SETUTENT */ /* Define to 1 if you have the `setutxent' function. */ -/* #undef HAVE_SETUTXENT */ +#define HAVE_SETUTXENT 1 /* Define to 1 if you have the `setvbuf' function. */ #define HAVE_SETVBUF 1 @@ -1025,7 +1025,7 @@ #define HAVE_TIME_H 1 /* Define if you have ut_time in utmp.h */ -#define HAVE_TIME_IN_UTMP 1 +/* #undef HAVE_TIME_IN_UTMP */ /* Define if you have ut_time in utmpx.h */ /* #undef HAVE_TIME_IN_UTMPX */ @@ -1043,13 +1043,13 @@ /* #undef HAVE_TV_IN_UTMP */ /* Define if you have ut_tv in utmpx.h */ -/* #undef HAVE_TV_IN_UTMPX */ +#define HAVE_TV_IN_UTMPX 1 /* Define if you have ut_type in utmp.h */ /* #undef HAVE_TYPE_IN_UTMP */ /* Define if you have ut_type in utmpx.h */ -/* #undef HAVE_TYPE_IN_UTMPX */ +#define HAVE_TYPE_IN_UTMPX 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_UCRED_H */ @@ -1091,10 +1091,10 @@ /* #undef HAVE_UTMPXNAME */ /* Define to 1 if you have the header file. */ -/* #undef HAVE_UTMPX_H */ +#define HAVE_UTMPX_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_UTMP_H 1 +/* #undef HAVE_UTMP_H */ /* define if you have u_char data type */ #define HAVE_U_CHAR 1 Modified: head/crypto/openssh/defines.h ============================================================================== --- head/crypto/openssh/defines.h Wed Jan 13 18:37:42 2010 (r202212) +++ head/crypto/openssh/defines.h Wed Jan 13 18:43:32 2010 (r202213) @@ -674,7 +674,7 @@ struct winsize { #else /* Simply select your favourite login types. */ /* Can't do if-else because some systems use several... */ -# if defined(UTMPX_FILE) && !defined(DISABLE_UTMPX) +# if !defined(DISABLE_UTMPX) # define USE_UTMPX # endif # if defined(UTMP_FILE) && !defined(DISABLE_UTMP) Modified: head/crypto/openssh/loginrec.c ============================================================================== --- head/crypto/openssh/loginrec.c Wed Jan 13 18:37:42 2010 (r202212) +++ head/crypto/openssh/loginrec.c Wed Jan 13 18:43:32 2010 (r202213) @@ -207,6 +207,7 @@ int syslogin_write_entry(struct logininf int getlast_entry(struct logininfo *li); int lastlog_get_entry(struct logininfo *li); +int utmpx_get_entry(struct logininfo *li); int wtmp_get_entry(struct logininfo *li); int wtmpx_get_entry(struct logininfo *li); @@ -509,6 +510,10 @@ getlast_entry(struct logininfo *li) return(lastlog_get_entry(li)); #else /* !USE_LASTLOG */ +#if 1 + return (utmpx_get_entry(li)); +#endif + #if defined(DISABLE_LASTLOG) /* On some systems we shouldn't even try to obtain last login * time, e.g. AIX */ @@ -758,8 +763,8 @@ construct_utmpx(struct logininfo *li, st utx->ut_pid = li->pid; /* strncpy(): Don't necessarily want null termination */ - strncpy(utx->ut_name, li->username, - MIN_SIZEOF(utx->ut_name, li->username)); + strncpy(utx->ut_user, li->username, + MIN_SIZEOF(utx->ut_user, li->username)); if (li->type == LTYPE_LOGOUT) return; @@ -1608,6 +1613,31 @@ lastlog_get_entry(struct logininfo *li) #endif /* HAVE_GETLASTLOGXBYNAME */ #endif /* USE_LASTLOG */ +#if 1 +int +utmpx_get_entry(struct logininfo *li) +{ + struct utmpx *utx; + + if (setutxdb(UTXDB_LASTLOGIN, NULL) != 0) + return (0); + utx = getutxuser(li->username); + if (utx == NULL) { + endutxent(); + return (0); + } + + line_fullname(li->line, utx->ut_line, + MIN_SIZEOF(li->line, utx->ut_line)); + strlcpy(li->hostname, utx->ut_host, + MIN_SIZEOF(li->hostname, utx->ut_host)); + li->tv_sec = utx->ut_tv.tv_sec; + li->tv_usec = utx->ut_tv.tv_usec; + endutxent(); + return (1); +} +#endif + #ifdef USE_BTMP /* * Logs failed login attempts in _PATH_BTMP if that exists. Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Wed Jan 13 18:37:42 2010 (r202212) +++ head/crypto/openssh/sshd.c Wed Jan 13 18:43:32 2010 (r202213) @@ -73,7 +73,6 @@ __RCSID("$FreeBSD$"); #include #include #include -#include #include #include @@ -240,7 +239,7 @@ u_char *session_id2 = NULL; u_int session_id2_len = 0; /* record remote hostname or ip */ -u_int utmp_len = UT_HOSTSIZE; +u_int utmp_len = MAXHOSTNAMELEN; /* options.max_startup sized array of fd ints */ int *startup_pipes = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:46:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5C501065672; Wed, 13 Jan 2010 18:46:50 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C59418FC13; Wed, 13 Jan 2010 18:46:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIkohS091474; Wed, 13 Jan 2010 18:46:50 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIkoGG091472; Wed, 13 Jan 2010 18:46:50 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131846.o0DIkoGG091472@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202214 - head/contrib/telnet/telnetd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:46:50 -0000 Author: ed Date: Wed Jan 13 18:46:50 2010 New Revision: 202214 URL: http://svn.freebsd.org/changeset/base/202214 Log: Forgot a part that was missing in the previous commit. There is no need to call trimdomain() anymore now that ut_host is big enough to fit decent hostnames. Modified: head/contrib/telnet/telnetd/telnetd.c Modified: head/contrib/telnet/telnetd/telnetd.c ============================================================================== --- head/contrib/telnet/telnetd/telnetd.c Wed Jan 13 18:43:32 2010 (r202213) +++ head/contrib/telnet/telnetd/telnetd.c Wed Jan 13 18:46:50 2010 (r202214) @@ -692,7 +692,6 @@ doit(struct sockaddr *who) Please contact your net administrator"); remote_hostname[sizeof(remote_hostname) - 1] = '\0'; - trimdomain(remote_hostname, UT_HOSTSIZE); if (!isdigit(remote_hostname[0]) && strlen(remote_hostname) > utmp_len) err_ = getnameinfo(who, who->sa_len, remote_hostname, sizeof(remote_hostname), NULL, 0, From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:49:05 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F0E1065694 for ; Wed, 13 Jan 2010 18:49:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id B87348FC26 for ; Wed, 13 Jan 2010 18:49:04 +0000 (UTC) Received: (qmail 14521 invoked by uid 399); 13 Jan 2010 18:49:03 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 13 Jan 2010 18:49:03 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B4E1586.7090102@FreeBSD.org> Date: Wed, 13 Jan 2010 10:48:38 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.5) Gecko/20100112 Thunderbird/3.0 MIME-Version: 1.0 To: "M. Warner Losh" References: <20100110.210204.787670930858346133.imp@bsdimp.com> <4B4D109A.5060500@FreeBSD.org> <20100112.174326.337739863389869251.imp@bsdimp.com> In-Reply-To: <20100112.174326.337739863389869251.imp@bsdimp.com> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, freebsd-arch@FreeBSD.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:49:05 -0000 On 01/12/10 16:43, M. Warner Losh wrote: > In message: <4B4D109A.5060500@FreeBSD.org> > Doug Barton writes: > : On 1/10/2010 8:02 PM, M. Warner Losh wrote: > : > In message: > : > Doug Barton writes: > : > : On Sun, 10 Jan 2010, Warner Losh wrote: > : > : > : > : > Author: imp > : > : > Date: Sun Jan 10 17:44:22 2010 > : > : > New Revision: 202019 > : > : > URL: http://svn.freebsd.org/changeset/base/202019 > : > : > > : > : > Log: > : > : > Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. > : > : > : > : Thanks for doing this, however the comment about how to include the > : > : whole file (including the comments) were not included. Do I need to do > : > : this part of it myself? No problem if so, I just want to be sure to > : > : get it done in time to MFC it before the freeze for 7.3-release. > : > > : > In general, we don't put big comments like that in the config files, > : > preferring to leave them to NOTES. I was just following that > : > convention... > : > : Understood, however given that there is plenty of room for confusion on > : this point because the default is NOT to include the comments I think > : that some explanation is justified. My original text was: > : > : # Store the plain version of the configuration file in the kernel itself. > : # To store the entire file, including comments, put this in /etc/src.conf: > : # CONFIGARGS= -C > : # See config(8) for more details. > : > : I'm open to suggestions on shrinking it, but I do think some sort of > : explanation is warranted. > > I'm not sure I see where there's confusion possible here, let alone > plenty of room for it. Do you think you can describe what confusion > is possible here? I think that most users would expect that the actual config file is included, with the comments; as opposed to the stripped down version with just the actual lines of configuration information that is actually stored by default. Not only do I think it's obvious that this is what users would think, this exact issue came up in the discussion on -current in December. To address the other responses, Tom, sorry, your suggested text doesn't address my concern. John, I don't think that users would somehow magically know to look in NOTES for more information about an option that is already in GENERIC. In the interests of bringing this to a close: # Store the plain version of the configuration file in the kernel itself. # For information on extraction, and storing the comments also, see config(8). There are plenty of comments in GENERIC that are longer/more substantial than that, and let's be serious for a minute, IT DOESN'T MATTER ANYWAY. I'm sorry if adding a comment that is slightly larger than usual to a kernel config file defiles someone's view of the purity of all things kernel, but let's try to take a step back and realize that NOT making things so cryptic might actually benefit the users. And yes, if you can't already tell, my patience is at an end for this. I "get" why it needs to move to GENERIC instead of DEFAULTS, especially since that's where I wanted to put it in the first place. But specifically to Warner, if you had in mind to do something other than to just move what I did to GENERIC you should have said that, and we could have avoided this whole stupid discussion. And generally, let's forget for a second that y'all are annoying the crap out of me, how many other people are you discouraging from participation because an issue as simple as this one is generating such an overwhelmingly out of proportion response? Unless someone objects to the TEXT of the comment I proposed in the next 24 hours I'll be committing it after that. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:53:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CCFD1065670; Wed, 13 Jan 2010 18:53:07 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0ABCE8FC19; Wed, 13 Jan 2010 18:53:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIr6Ad092895; Wed, 13 Jan 2010 18:53:06 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIr67j092885; Wed, 13 Jan 2010 18:53:06 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131853.o0DIr67j092885@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:53:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202215 - in head: . lib/libulog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:53:07 -0000 Author: ed Date: Wed Jan 13 18:53:06 2010 New Revision: 202215 URL: http://svn.freebsd.org/changeset/base/202215 Log: Remove utmpx stub from libulog. I'm not increasing the shlib major version for this, because not a single application outside the base system should have used these functions in such a short timespan. Rewrite ulog_login(3) and ulog_logout(3) to build on top of the utmpx implementation in libc. Deleted: head/lib/libulog/ulog_getutxent.3 head/lib/libulog/ulog_getutxent.c head/lib/libulog/ulog_internal.h head/lib/libulog/ulog_pututxline.c head/lib/libulog/ulog_setutxfile.3 head/lib/libulog/ulog_util.c Modified: head/ObsoleteFiles.inc head/lib/libulog/Makefile head/lib/libulog/Symbol.map head/lib/libulog/ulog.h head/lib/libulog/ulog_login.3 head/lib/libulog/ulog_login.c head/lib/libulog/ulog_login_pseudo.c head/lib/libulog/utempter.c head/lib/libulog/utempter_add_record.3 Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jan 13 18:46:50 2010 (r202214) +++ head/ObsoleteFiles.inc Wed Jan 13 18:53:06 2010 (r202215) @@ -14,6 +14,14 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100113: remove utmp.h, replace it by utmpx.h +OLD_FILES+=usr/share/man/man3/ulog_endutxent.3.gz +OLD_FILES+=usr/share/man/man3/ulog_getutxent.3.gz +OLD_FILES+=usr/share/man/man3/ulog_getutxline.3.gz +OLD_FILES+=usr/share/man/man3/ulog_getutxuser.3.gz +OLD_FILES+=usr/share/man/man3/ulog_pututxline.3.gz +OLD_FILES+=usr/share/man/man3/ulog_setutxent.3.gz +OLD_FILES+=usr/share/man/man3/ulog_setutxfile.3.gz # 20100105: new userland semaphore implementation OLD_FILES+=usr/include/sys/semaphore.h # 20100103: ntptrace(8) removed Modified: head/lib/libulog/Makefile ============================================================================== --- head/lib/libulog/Makefile Wed Jan 13 18:46:50 2010 (r202214) +++ head/lib/libulog/Makefile Wed Jan 13 18:53:06 2010 (r202215) @@ -7,25 +7,21 @@ SHLIBDIR?=/lib LIB= ulog SHLIB_MAJOR= 0 INCS= ulog.h utempter.h -SRCS= ulog.h ulog_getutxent.c ulog_internal.h ulog_login.c \ - ulog_login_pseudo.c ulog_pututxline.c ulog_util.c utempter.c +SRCS= ulog.h ulog_login.c ulog_login_pseudo.c utempter.c -MAN= ulog_getutxent.3 ulog_login.3 ulog_setutxfile.3 \ - utempter_add_record.3 -MLINKS+=ulog_getutxent.3 ulog_endutxent.3 \ - ulog_getutxent.3 ulog_getutxline.3 \ - ulog_getutxent.3 ulog_pututxline.3 \ - ulog_getutxent.3 ulog_setutxent.3 \ - ulog_login.3 ulog_login_pseudo.3 \ +MAN= ulog_login.3 utempter_add_record.3 +MLINKS+=ulog_login.3 ulog_login_pseudo.3 \ ulog_login.3 ulog_logout.3 \ ulog_login.3 ulog_logout_pseudo.3 \ - ulog_setutxfile.3 ulog_getutxuser.3 \ utempter_add_record.3 utempter_remove_added_record.3 \ utempter_add_record.3 utempter_remove_record.3 \ utempter_add_record.3 addToUtmp.3 \ utempter_remove_added_record.3 removeFromUtmp.3 \ utempter_remove_record.3 removeLineFromUtmp.3 +DPADD= ${LIBMD} +LDADD= -lmd + VERSION_DEF= ${.CURDIR}/../libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map Modified: head/lib/libulog/Symbol.map ============================================================================== --- head/lib/libulog/Symbol.map Wed Jan 13 18:46:50 2010 (r202214) +++ head/lib/libulog/Symbol.map Wed Jan 13 18:53:06 2010 (r202215) @@ -3,17 +3,10 @@ */ FBSD_1.2 { - ulog_endutxent; - ulog_getutxent; - ulog_getutxline; - ulog_getutxuser; ulog_login; ulog_login_pseudo; ulog_logout; ulog_logout_pseudo; - ulog_pututxline; - ulog_setutxent; - ulog_setutxfile; addToUtmp; removeFromUtmp; Modified: head/lib/libulog/ulog.h ============================================================================== --- head/lib/libulog/ulog.h Wed Jan 13 18:46:50 2010 (r202214) +++ head/lib/libulog/ulog.h Wed Jan 13 18:53:06 2010 (r202215) @@ -30,79 +30,12 @@ #define _ULOG_H_ #include -#include -#include - -#ifndef _PID_T_DECLARED -typedef __pid_t pid_t; -#define _PID_T_DECLARED -#endif - -/* - * libulog. - * - * This library is provided as a migratory tool towards . We - * cannot yet implement , because our on-disk file format lacks - * various fields. also has some shortcomings. Ideally we - * want to allow logging of user login records generated by unprivileged - * processes as well, provided that they hold a file descriptor to a - * pseudo-terminal master device. - * - * This library (or at least parts of it) will hopefully deprecate over - * time, when we provide the API. - */ - -struct ulog_utmpx { - char ut_user[32]; - char ut_id[8]; /* XXX: unsupported. */ - char ut_line[32]; - char ut_host[256]; - pid_t ut_pid; /* XXX: unsupported. */ - short ut_type; -#define EMPTY 0 -#define BOOT_TIME 1 -#define OLD_TIME 2 -#define NEW_TIME 3 -#define USER_PROCESS 4 -#define INIT_PROCESS 5 /* XXX: unsupported. */ -#define LOGIN_PROCESS 6 /* XXX: unsupported. */ -#define DEAD_PROCESS 7 -#define SHUTDOWN_TIME 8 - struct timeval ut_tv; -}; __BEGIN_DECLS -/* POSIX routines. */ -void ulog_endutxent(void); -struct ulog_utmpx *ulog_getutxent(void); -#if 0 -struct ulog_utmpx *ulog_getutxid(const struct ulog_utmpx *); -#endif -struct ulog_utmpx *ulog_getutxline(const struct ulog_utmpx *); -struct ulog_utmpx *ulog_pututxline(const struct ulog_utmpx *); -void ulog_setutxent(void); - -/* Extensions. */ -struct ulog_utmpx *ulog_getutxuser(const char *); -int ulog_setutxfile(int, const char *); -#define UTXI_TTY 0 -#define UTXI_TIME 1 -#define UTXI_USER 2 - -/* Login/logout utility functions. */ void ulog_login(const char *, const char *, const char *); void ulog_login_pseudo(int, const char *); void ulog_logout(const char *); void ulog_logout_pseudo(int); __END_DECLS -#ifdef _ULOG_POSIX_NAMES -#define utmpx ulog_utmpx -#define endutxent ulog_endutxent -#define getutxent ulog_getutxent -#define getutxline ulog_getutxline -#define pututxline ulog_pututxline -#define setutxent ulog_setutxent -#endif /* _ULOG_POSIX_NAMES */ - #endif /* !_ULOG_H_ */ Modified: head/lib/libulog/ulog_login.3 ============================================================================== --- head/lib/libulog/ulog_login.3 Wed Jan 13 18:46:50 2010 (r202214) +++ head/lib/libulog/ulog_login.3 Wed Jan 13 18:53:06 2010 (r202215) @@ -90,13 +90,10 @@ and .Fn ulog_logout_pseudo functions spawn a privileged process to perform the actual logging. .Sh SEE ALSO -.Xr getuid 3 , -.Xr login 3 , -.Xr logout 3 , .Xr posix_openpt 2 , +.Xr getuid 3 , .Xr ptsname 3 , -.Xr ulog_getutxent 3 , -.Xr utmp 5 +.Xr pututxline 3 .Sh HISTORY These functions appeared in .Fx 9.0 . Modified: head/lib/libulog/ulog_login.c ============================================================================== --- head/lib/libulog/ulog_login.c Wed Jan 13 18:46:50 2010 (r202214) +++ head/lib/libulog/ulog_login.c Wed Jan 13 18:53:06 2010 (r202215) @@ -27,49 +27,58 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include +#include #include +#include +#include +#include "ulog.h" -#include "ulog_internal.h" - -void -ulog_login(const char *line, const char *user, const char *host) +static void +ulog_fill(struct utmpx *utx, const char *line) { - struct ulog_utmpx utx; + SHA_CTX c; + char id[SHA_DIGEST_LENGTH]; /* Remove /dev/ component. */ if (strncmp(line, _PATH_DEV, sizeof _PATH_DEV - 1) == 0) line += sizeof _PATH_DEV - 1; - memset(&utx, 0, sizeof utx); + memset(utx, 0, sizeof *utx); - /* XXX: ut_id, ut_pid missing. */ + utx->ut_pid = getpid(); + gettimeofday(&utx->ut_tv, NULL); + strncpy(utx->ut_line, line, sizeof utx->ut_line); + + SHA1_Init(&c); + SHA1_Update(&c, "libulog", 7); + SHA1_Update(&c, utx->ut_line, sizeof utx->ut_line); + SHA_Final(id, &c); + + memcpy(utx->ut_id, id, MIN(sizeof utx->ut_id, sizeof id)); +} + +void +ulog_login(const char *line, const char *user, const char *host) +{ + struct utmpx utx; + + ulog_fill(&utx, line); utx.ut_type = USER_PROCESS; - strncpy(utx.ut_line, line, sizeof utx.ut_line); strncpy(utx.ut_user, user, sizeof utx.ut_user); if (host != NULL) strncpy(utx.ut_host, host, sizeof utx.ut_host); - gettimeofday(&utx.ut_tv, NULL); - - ulog_pututxline(&utx); + pututxline(&utx); } void ulog_logout(const char *line) { - struct ulog_utmpx utx; - - /* Remove /dev/ component. */ - if (strncmp(line, _PATH_DEV, sizeof _PATH_DEV - 1) == 0) - line += sizeof _PATH_DEV - 1; + struct utmpx utx; - memset(&utx, 0, sizeof utx); - - /* XXX: ut_id, ut_pid missing. ut_line not needed */ + ulog_fill(&utx, line); utx.ut_type = DEAD_PROCESS; - strncpy(utx.ut_line, line, sizeof utx.ut_line); - gettimeofday(&utx.ut_tv, NULL); - - ulog_pututxline(&utx); + pututxline(&utx); } Modified: head/lib/libulog/ulog_login_pseudo.c ============================================================================== --- head/lib/libulog/ulog_login_pseudo.c Wed Jan 13 18:46:50 2010 (r202214) +++ head/lib/libulog/ulog_login_pseudo.c Wed Jan 13 18:53:06 2010 (r202215) @@ -34,8 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include - -#include "ulog_internal.h" +#include "ulog.h" #define _PATH_ULOG_HELPER "/usr/libexec/ulog-helper" Modified: head/lib/libulog/utempter.c ============================================================================== --- head/lib/libulog/utempter.c Wed Jan 13 18:46:50 2010 (r202214) +++ head/lib/libulog/utempter.c Wed Jan 13 18:53:06 2010 (r202215) @@ -27,7 +27,7 @@ #include __FBSDID("$FreeBSD$"); -#include "ulog_internal.h" +#include "ulog.h" #include "utempter.h" static int last_fd = -1; Modified: head/lib/libulog/utempter_add_record.3 ============================================================================== --- head/lib/libulog/utempter_add_record.3 Wed Jan 13 18:46:50 2010 (r202214) +++ head/lib/libulog/utempter_add_record.3 Wed Jan 13 18:53:06 2010 (r202215) @@ -98,9 +98,8 @@ and .Fn utempter_remove_record always return a value of 0. .Sh SEE ALSO -.Xr ulog_login_pseudo 3 , -.Xr ulog_setutxfile 3 , -.Xr utmp 5 +.Xr pututxline 3 , +.Xr ulog_login_pseudo 3 .Sh HISTORY These functions appeared in .Fx 9.0 . From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 18:59:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 885EA1065672; Wed, 13 Jan 2010 18:59:51 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 774AF8FC17; Wed, 13 Jan 2010 18:59:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DIxpjT094408; Wed, 13 Jan 2010 18:59:51 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DIxp4u094404; Wed, 13 Jan 2010 18:59:51 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131859.o0DIxp4u094404@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 18:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202216 - in head: . lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 18:59:51 -0000 Author: ed Date: Wed Jan 13 18:59:51 2010 New Revision: 202216 URL: http://svn.freebsd.org/changeset/base/202216 Log: Remove login(3), logout(3) and logwtmp(3) from libutil. These functions only apply to utmp(5). They cannot be kept intact when moving towards utmpx. The login(3) function would break, because its argument is an utmp structure. The logout(3) and logwtmp(3) functions cannot be used, since they provide a functionality which partially overlaps. Increment SHLIB_MAJOR to 9 to indicate the removal. Deleted: head/lib/libutil/login.3 head/lib/libutil/login.c head/lib/libutil/logout.3 head/lib/libutil/logout.c head/lib/libutil/logwtmp.3 head/lib/libutil/logwtmp.c Modified: head/ObsoleteFiles.inc head/lib/libutil/Makefile head/lib/libutil/libutil.h Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jan 13 18:53:06 2010 (r202215) +++ head/ObsoleteFiles.inc Wed Jan 13 18:59:51 2010 (r202216) @@ -15,6 +15,9 @@ # # 20100113: remove utmp.h, replace it by utmpx.h +OLD_FILES+=usr/share/man/man3/login.3.gz +OLD_FILES+=usr/share/man/man3/logout.3.gz +OLD_FILES+=usr/share/man/man3/logwtmp.3.gz OLD_FILES+=usr/share/man/man3/ulog_endutxent.3.gz OLD_FILES+=usr/share/man/man3/ulog_getutxent.3.gz OLD_FILES+=usr/share/man/man3/ulog_getutxline.3.gz @@ -22,6 +25,7 @@ OLD_FILES+=usr/share/man/man3/ulog_getut OLD_FILES+=usr/share/man/man3/ulog_pututxline.3.gz OLD_FILES+=usr/share/man/man3/ulog_setutxent.3.gz OLD_FILES+=usr/share/man/man3/ulog_setutxfile.3.gz +OLD_LIBS+=lib/libutil.so.8 # 20100105: new userland semaphore implementation OLD_FILES+=usr/include/sys/semaphore.h # 20100103: ntptrace(8) removed Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Wed Jan 13 18:53:06 2010 (r202215) +++ head/lib/libutil/Makefile Wed Jan 13 18:59:51 2010 (r202216) @@ -6,13 +6,13 @@ SHLIBDIR?= /lib .include LIB= util -SHLIB_MAJOR= 8 +SHLIB_MAJOR= 9 SRCS= _secure_path.c auth.c expand_number.c flopen.c fparseln.c gr_util.c \ hexdump.c humanize_number.c kinfo_getfile.c kinfo_getvmmap.c kld.c \ - login.c login_auth.c login_cap.c \ + login_auth.c login_cap.c \ login_class.c login_crypt.c login_ok.c login_times.c login_tty.c \ - logout.c logwtmp.c pidfile.c property.c pty.c pw_util.c realhostname.c \ + pidfile.c property.c pty.c pw_util.c realhostname.c \ stub.c trimdomain.c uucplock.c INCS= libutil.h login_cap.h @@ -24,7 +24,7 @@ CFLAGS+= -DINET6 CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../libc/gen/ -MAN+= kld.3 login.3 login_auth.3 login_tty.3 logout.3 logwtmp.3 pty.3 \ +MAN+= kld.3 login_auth.3 login_tty.3 pty.3 \ login_cap.3 login_class.3 login_times.3 login_ok.3 \ _secure_path.3 uucplock.3 property.3 auth.3 realhostname.3 \ realhostname_sa.3 trimdomain.3 fparseln.3 humanize_number.3 \ Modified: head/lib/libutil/libutil.h ============================================================================== --- head/lib/libutil/libutil.h Wed Jan 13 18:53:06 2010 (r202215) +++ head/lib/libutil/libutil.h Wed Jan 13 18:59:51 2010 (r202216) @@ -90,7 +90,6 @@ struct pidfh { /* Avoid pulling in all the include files for no need */ struct termios; struct winsize; -struct utmp; struct in_addr; struct kinfo_file; struct kinfo_vmentry; @@ -102,10 +101,7 @@ int extattr_namespace_to_string(int _att int extattr_string_to_namespace(const char *_string, int *_attrnamespace); int flopen(const char *_path, int _flags, ...); void hexdump(const void *ptr, int length, const char *hdr, int flags); -void login(struct utmp *_ut); int login_tty(int _fd); -int logout(const char *_line); -void logwtmp(const char *_line, const char *_name, const char *_host); void trimdomain(char *_fullhost, int _hostsize); int openpty(int *_amaster, int *_aslave, char *_name, struct termios *_termp, struct winsize *_winp); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 19:03:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AF11106568B; Wed, 13 Jan 2010 19:03:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89CD58FC13; Wed, 13 Jan 2010 19:03:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DJ3mp0095321; Wed, 13 Jan 2010 19:03:48 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DJ3mJi095317; Wed, 13 Jan 2010 19:03:48 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131903.o0DJ3mJi095317@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 19:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202217 - in head: . include share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 19:03:48 -0000 Author: ed Date: Wed Jan 13 19:03:48 2010 New Revision: 202217 URL: http://svn.freebsd.org/changeset/base/202217 Log: Remove and its corresponding manual page. Deleted: head/share/man/man5/utmp.5 Modified: head/ObsoleteFiles.inc head/include/utmp.h head/share/man/man5/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jan 13 18:59:51 2010 (r202216) +++ head/ObsoleteFiles.inc Wed Jan 13 19:03:48 2010 (r202217) @@ -25,6 +25,9 @@ OLD_FILES+=usr/share/man/man3/ulog_getut OLD_FILES+=usr/share/man/man3/ulog_pututxline.3.gz OLD_FILES+=usr/share/man/man3/ulog_setutxent.3.gz OLD_FILES+=usr/share/man/man3/ulog_setutxfile.3.gz +OLD_FILES+=usr/share/man/man5/lastlog.5.gz +OLD_FILES+=usr/share/man/man5/utmp.5.gz +OLD_FILES+=usr/share/man/man5/wtmp.5.gz OLD_LIBS+=lib/libutil.so.8 # 20100105: new userland semaphore implementation OLD_FILES+=usr/include/sys/semaphore.h Modified: head/include/utmp.h ============================================================================== --- head/include/utmp.h Wed Jan 13 18:59:51 2010 (r202216) +++ head/include/utmp.h Wed Jan 13 19:03:48 2010 (r202217) @@ -1,73 +1,2 @@ -/* - * Copyright (c) 1988, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)utmp.h 8.2 (Berkeley) 1/21/94 - * $FreeBSD$ - */ - -#ifndef _UTMP_H_ -#define _UTMP_H_ - -#define _PATH_UTMP "/var/run/utmp" -#define _PATH_WTMP "/var/log/wtmp" -#define _PATH_LASTLOG "/var/log/lastlog" - -/* - * XXX: These values are too low, but cannot be changed without breaking - * the file format. Right now pts(4) is limited to 1000 instances, - * because /dev/pts/1000 would require UT_LINESIZE to be bigger. - * UT_HOSTSIZE is also too small to hold most common hostnames or IPv6 - * addresses. - */ -#define UT_NAMESIZE 16 /* see MAXLOGNAME in */ -#define UT_LINESIZE 8 -#define UT_HOSTSIZE 16 - -struct lastlog { - int32_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; -}; - -struct utmp { - char ut_line[UT_LINESIZE]; - char ut_name[UT_NAMESIZE]; - char ut_host[UT_HOSTSIZE]; - int32_t ut_time; -}; - -#endif /* !_UTMP_H_ */ +/* $FreeBSD$ */ +#error " has been replaced by " Modified: head/share/man/man5/Makefile ============================================================================== --- head/share/man/man5/Makefile Wed Jan 13 18:59:51 2010 (r202216) +++ head/share/man/man5/Makefile Wed Jan 13 19:03:48 2010 (r202217) @@ -68,7 +68,6 @@ MAN= acct.5 \ style.Makefile.5 \ sysctl.conf.5 \ tmpfs.5 \ - utmp.5 \ xfs.5 MLINKS= dir.5 dirent.5 @@ -79,7 +78,6 @@ MLINKS+=passwd.5 master.passwd.5 MLINKS+=quota.user.5 quota.group.5 MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 -MLINKS+=utmp.5 lastlog.5 utmp.5 wtmp.5 .if ${MK_HESIOD} != "no" MAN+= hesiod.conf.5 From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 19:07:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75CF91065676; Wed, 13 Jan 2010 19:07:49 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BDCF8FC08; Wed, 13 Jan 2010 19:07:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DJ7nAl096244; Wed, 13 Jan 2010 19:07:49 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DJ7nfb096239; Wed, 13 Jan 2010 19:07:49 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131907.o0DJ7nfb096239@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 19:07:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202218 - in head/etc: . periodic/monthly rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 19:07:49 -0000 Author: ed Date: Wed Jan 13 19:07:48 2010 New Revision: 202218 URL: http://svn.freebsd.org/changeset/base/202218 Log: Let rc and periodic infrastructure and newsyslog use the utmpx files. Modified: head/etc/newsyslog.conf head/etc/periodic/monthly/200.accounting head/etc/rc.d/cleanvar head/etc/rc.d/var Modified: head/etc/newsyslog.conf ============================================================================== --- head/etc/newsyslog.conf Wed Jan 13 19:03:48 2010 (r202217) +++ head/etc/newsyslog.conf Wed Jan 13 19:07:48 2010 (r202218) @@ -33,6 +33,6 @@ /var/log/ppp.log root:network 640 3 100 * JC /var/log/security 600 10 100 * JC /var/log/sendmail.st 640 10 * 168 B +/var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 1 $W6D0 JN -/var/log/wtmp 644 3 * @01T05 B /var/log/xferlog 600 7 100 * JC Modified: head/etc/periodic/monthly/200.accounting ============================================================================== --- head/etc/periodic/monthly/200.accounting Wed Jan 13 19:03:48 2010 (r202217) +++ head/etc/periodic/monthly/200.accounting Wed Jan 13 19:07:48 2010 (r202218) @@ -15,7 +15,7 @@ oldmask=$(umask) umask 066 case "$monthly_accounting_enable" in [Yy][Ee][Ss]) - W=/var/log/wtmp + W=/var/log/utx.log rc=0 remove=NO if [ ! -f $W.0 ] Modified: head/etc/rc.d/cleanvar ============================================================================== --- head/etc/rc.d/cleanvar Wed Jan 13 19:03:48 2010 (r202217) +++ head/etc/rc.d/cleanvar Wed Jan 13 19:07:48 2010 (r202218) @@ -58,8 +58,8 @@ cleanvar_start () { if [ -d /var/run -a ! -f /var/run/clean_var ]; then purgedir /var/run - # And an initial utmp file - (cd /var/run && cp /dev/null utmp && chmod 644 utmp) + # And an initial utmpx active session file + (cd /var/run && cp /dev/null utx.active && chmod 644 utx.active) >/var/run/clean_var fi if [ -d /var/spool/lock -a ! -f /var/spool/lock/clean_var ]; then Modified: head/etc/rc.d/var ============================================================================== --- head/etc/rc.d/var Wed Jan 13 19:03:48 2010 (r202217) +++ head/etc/rc.d/var Wed Jan 13 19:07:48 2010 (r202218) @@ -98,12 +98,12 @@ case "${populate_var}" in ;; esac -# Make sure we have /var/log/lastlog and /var/log/wtmp files -if [ ! -f /var/log/lastlog ]; then - cp /dev/null /var/log/lastlog - chmod 644 /var/log/lastlog +# Make sure we have /var/log/utx.lastlogin and /var/log/utx.log files +if [ ! -f /var/log/utx.lastlogin ]; then + cp /dev/null /var/log/utx.lastlogin + chmod 644 /var/log/utx.lastlogin fi -if [ ! -f /var/log/wtmp ]; then - cp /dev/null /var/log/wtmp - chmod 644 /var/log/wtmp +if [ ! -f /var/log/utx.log ]; then + cp /dev/null /var/log/utx.log + chmod 644 /var/log/utx.log fi From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 19:25:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9067106566B; Wed, 13 Jan 2010 19:25:03 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F0668FC17; Wed, 13 Jan 2010 19:25:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DJP3qE000159; Wed, 13 Jan 2010 19:25:03 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DJP3L1000156; Wed, 13 Jan 2010 19:25:03 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131925.o0DJP3L1000156@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 19:25:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202219 - in head: . sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 19:25:03 -0000 Author: ed Date: Wed Jan 13 19:25:03 2010 New Revision: 202219 URL: http://svn.freebsd.org/changeset/base/202219 Log: Complete the migration towards utmpx. - Add a notice to UPDATING, explaining users may need to recompile applications that use the old database. - Bump __FreeBSD_version. Modified: head/UPDATING head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Jan 13 19:07:48 2010 (r202218) +++ head/UPDATING Wed Jan 13 19:25:03 2010 (r202219) @@ -22,6 +22,23 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20100113: + The utmp user accounting database has been replaced with utmpx, + the user accounting interface standardized by POSIX. + Unfortunately the semantics of utmp and utmpx don't match, + making it practically impossible to support both interfaces. + The user accounting database is used by tools like finger(1), + last(1), talk(1), w(1) and ac(8). + + All applications in the base system use utmpx. This means only + local binaries (e.g. from the ports tree) may still use these + utmp database files. These applications must be rebuilt to make + use of utmpx. + + After the system has been upgraded, it is safe to remove the old + log files (/var/run/utmp, /var/log/lastlog and /var/log/wtmp*), + assuming their contents is of no importance anymore. + 20100108: Introduce the kernel thread "deadlock resolver" (which can be enabled via the DEADLKRES option, see NOTES for more details) and the Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Jan 13 19:07:48 2010 (r202218) +++ head/sys/sys/param.h Wed Jan 13 19:25:03 2010 (r202219) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900006 /* Master, propagated to newvers */ +#define __FreeBSD_version 900007 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 19:55:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B2E4106566B; Wed, 13 Jan 2010 19:55:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 787018FC2D; Wed, 13 Jan 2010 19:55:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DJtpJA007135; Wed, 13 Jan 2010 19:55:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DJtpF5007130; Wed, 13 Jan 2010 19:55:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001131955.o0DJtpF5007130@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 19:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202221 - in stable/8/sys/sparc64: pci sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 19:55:52 -0000 Author: marius Date: Wed Jan 13 19:55:51 2010 New Revision: 202221 URL: http://svn.freebsd.org/changeset/base/202221 Log: MFC: 197164 Factor out the duplicated macro for the device type used in the OFW device tree for PCI bridges and add a new one for PCI Express. While at it, take advantage of the former for the rman(9) work- around in jbusppm(4). Modified: stable/8/sys/sparc64/pci/ofw_pci.h stable/8/sys/sparc64/pci/psycho.c stable/8/sys/sparc64/pci/schizo.c stable/8/sys/sparc64/sparc64/jbusppm.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/pci/ofw_pci.h ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pci.h Wed Jan 13 19:46:53 2010 (r202220) +++ stable/8/sys/sparc64/pci/ofw_pci.h Wed Jan 13 19:55:51 2010 (r202221) @@ -44,6 +44,10 @@ typedef uint32_t ofw_pci_intr_t; #define OFW_PCI_CS_MEM32 0x02 #define OFW_PCI_CS_MEM64 0x03 +/* OFW device types */ +#define OFW_TYPE_PCI "pci" +#define OFW_TYPE_PCIE "pciex" + struct ofw_pci_ranges { uint32_t cspace; uint32_t child_hi; Modified: stable/8/sys/sparc64/pci/psycho.c ============================================================================== --- stable/8/sys/sparc64/pci/psycho.c Wed Jan 13 19:46:53 2010 (r202220) +++ stable/8/sys/sparc64/pci/psycho.c Wed Jan 13 19:55:51 2010 (r202221) @@ -224,8 +224,6 @@ struct psycho_dma_sync { * providing two PCI buses. */ -#define OFW_PCI_TYPE "pci" - struct psycho_desc { const char *pd_string; int pd_mode; @@ -275,7 +273,7 @@ psycho_probe(device_t dev) const char *dtype; dtype = ofw_bus_get_type(dev); - if (dtype != NULL && strcmp(dtype, OFW_PCI_TYPE) == 0 && + if (dtype != NULL && strcmp(dtype, OFW_TYPE_PCI) == 0 && psycho_get_desc(dev) != NULL) { device_set_desc(dev, "U2P UPA-PCI bridge"); return (0); Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Wed Jan 13 19:46:53 2010 (r202220) +++ stable/8/sys/sparc64/pci/schizo.c Wed Jan 13 19:55:51 2010 (r202221) @@ -209,8 +209,6 @@ struct schizo_dma_sync { #define SCHIZO_ICON_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_ICON, (sc), (offs), (v)) -#define OFW_PCI_TYPE "pci" - struct schizo_desc { const char *sd_string; int sd_mode; @@ -244,7 +242,7 @@ schizo_probe(device_t dev) const char *dtype; dtype = ofw_bus_get_type(dev); - if (dtype != NULL && strcmp(dtype, OFW_PCI_TYPE) == 0 && + if (dtype != NULL && strcmp(dtype, OFW_TYPE_PCI) == 0 && schizo_get_desc(dev) != NULL) { device_set_desc(dev, "Sun Host-PCI bridge"); return (0); Modified: stable/8/sys/sparc64/sparc64/jbusppm.c ============================================================================== --- stable/8/sys/sparc64/sparc64/jbusppm.c Wed Jan 13 19:46:53 2010 (r202220) +++ stable/8/sys/sparc64/sparc64/jbusppm.c Wed Jan 13 19:55:51 2010 (r202221) @@ -40,6 +40,10 @@ __FBSDID("$FreeBSD$"); #include #include +#if 1 +#include +#endif + #define JBUSPPM_NREG 2 #define JBUSPPM_DEVID 0 @@ -150,7 +154,7 @@ jbusppm_attach(device_t dev) for (j = 0; j < nchildren; j++) { if (ofw_bus_get_type(children[j]) != NULL && strcmp(ofw_bus_get_type(children[j]), - "pci") == 0 && + OFW_TYPE_PCI) == 0 && ofw_bus_get_compat(children[j]) != NULL && strcmp(ofw_bus_get_compat(children[j]), "pci108e,a801") == 0 && From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 19:56:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EABBB106576D; Wed, 13 Jan 2010 19:56:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF4E88FC26; Wed, 13 Jan 2010 19:56:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DJu2b2007209; Wed, 13 Jan 2010 19:56:02 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DJu2e7007204; Wed, 13 Jan 2010 19:56:02 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001131956.o0DJu2e7007204@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 19:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202222 - in stable/7/sys/sparc64: pci sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 19:56:03 -0000 Author: marius Date: Wed Jan 13 19:56:02 2010 New Revision: 202222 URL: http://svn.freebsd.org/changeset/base/202222 Log: MFC: 197164 Factor out the duplicated macro for the device type used in the OFW device tree for PCI bridges and add a new one for PCI Express. While at it, take advantage of the former for the rman(9) work- around in jbusppm(4). Modified: stable/7/sys/sparc64/pci/ofw_pci.h stable/7/sys/sparc64/pci/psycho.c stable/7/sys/sparc64/pci/schizo.c stable/7/sys/sparc64/sparc64/jbusppm.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/ofw_pci.h ============================================================================== --- stable/7/sys/sparc64/pci/ofw_pci.h Wed Jan 13 19:55:51 2010 (r202221) +++ stable/7/sys/sparc64/pci/ofw_pci.h Wed Jan 13 19:56:02 2010 (r202222) @@ -44,6 +44,10 @@ typedef uint32_t ofw_pci_intr_t; #define OFW_PCI_CS_MEM32 0x02 #define OFW_PCI_CS_MEM64 0x03 +/* OFW device types */ +#define OFW_TYPE_PCI "pci" +#define OFW_TYPE_PCIE "pciex" + struct ofw_pci_ranges { uint32_t cspace; uint32_t child_hi; Modified: stable/7/sys/sparc64/pci/psycho.c ============================================================================== --- stable/7/sys/sparc64/pci/psycho.c Wed Jan 13 19:55:51 2010 (r202221) +++ stable/7/sys/sparc64/pci/psycho.c Wed Jan 13 19:56:02 2010 (r202222) @@ -225,8 +225,6 @@ struct psycho_dma_sync { * providing two PCI buses. */ -#define OFW_PCI_TYPE "pci" - struct psycho_desc { const char *pd_string; int pd_mode; @@ -276,7 +274,7 @@ psycho_probe(device_t dev) const char *dtype; dtype = ofw_bus_get_type(dev); - if (dtype != NULL && strcmp(dtype, OFW_PCI_TYPE) == 0 && + if (dtype != NULL && strcmp(dtype, OFW_TYPE_PCI) == 0 && psycho_get_desc(dev) != NULL) { device_set_desc(dev, "U2P UPA-PCI bridge"); return (0); Modified: stable/7/sys/sparc64/pci/schizo.c ============================================================================== --- stable/7/sys/sparc64/pci/schizo.c Wed Jan 13 19:55:51 2010 (r202221) +++ stable/7/sys/sparc64/pci/schizo.c Wed Jan 13 19:56:02 2010 (r202222) @@ -210,8 +210,6 @@ struct schizo_dma_sync { #define SCHIZO_ICON_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_ICON, (sc), (offs), (v)) -#define OFW_PCI_TYPE "pci" - struct schizo_desc { const char *sd_string; int sd_mode; @@ -245,7 +243,7 @@ schizo_probe(device_t dev) const char *dtype; dtype = ofw_bus_get_type(dev); - if (dtype != NULL && strcmp(dtype, OFW_PCI_TYPE) == 0 && + if (dtype != NULL && strcmp(dtype, OFW_TYPE_PCI) == 0 && schizo_get_desc(dev) != NULL) { device_set_desc(dev, "Sun Host-PCI bridge"); return (0); Modified: stable/7/sys/sparc64/sparc64/jbusppm.c ============================================================================== --- stable/7/sys/sparc64/sparc64/jbusppm.c Wed Jan 13 19:55:51 2010 (r202221) +++ stable/7/sys/sparc64/sparc64/jbusppm.c Wed Jan 13 19:56:02 2010 (r202222) @@ -40,6 +40,10 @@ __FBSDID("$FreeBSD$"); #include #include +#if 1 +#include +#endif + #define JBUSPPM_NREG 2 #define JBUSPPM_DEVID 0 @@ -150,7 +154,7 @@ jbusppm_attach(device_t dev) for (j = 0; j < nchildren; j++) { if (ofw_bus_get_type(children[j]) != NULL && strcmp(ofw_bus_get_type(children[j]), - "pci") == 0 && + OFW_TYPE_PCI) == 0 && ofw_bus_get_compat(children[j]) != NULL && strcmp(ofw_bus_get_compat(children[j]), "pci108e,a801") == 0 && From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 19:59:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA49F106568B; Wed, 13 Jan 2010 19:59:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C72928FC1A; Wed, 13 Jan 2010 19:59:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DJxDiF007985; Wed, 13 Jan 2010 19:59:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DJxDCI007977; Wed, 13 Jan 2010 19:59:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001131959.o0DJxDCI007977@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 19:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202223 - in stable/8/sys: dev/auxio sparc64/central sparc64/fhc sparc64/pci sparc64/sbus sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 19:59:14 -0000 Author: marius Date: Wed Jan 13 19:59:13 2010 New Revision: 202223 URL: http://svn.freebsd.org/changeset/base/202223 Log: MFC: r200815, r200816 Provide and consume missing module dependency information. Modified: stable/8/sys/dev/auxio/auxio.c stable/8/sys/sparc64/central/central.c stable/8/sys/sparc64/fhc/fhc.c stable/8/sys/sparc64/pci/apb.c stable/8/sys/sparc64/pci/ofw_pcib.c stable/8/sys/sparc64/sbus/sbus.c stable/8/sys/sparc64/sparc64/nexus.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/auxio/auxio.c ============================================================================== --- stable/8/sys/dev/auxio/auxio.c Wed Jan 13 19:56:02 2010 (r202222) +++ stable/8/sys/dev/auxio/auxio.c Wed Jan 13 19:59:13 2010 (r202223) @@ -56,7 +56,7 @@ */ /* - * AUXIO registers support on the sbus & ebus2, used for the floppy driver + * AUXIO registers support on the SBus & EBus2, used for the floppy driver * and to control the system LED, for the BLINK option. */ @@ -85,8 +85,8 @@ __FBSDID("$FreeBSD$"); #include /* - * on sun4u, auxio exists with one register (LED) on the sbus, and 5 - * registers on the ebus2 (pci) (LED, PCIMODE, FREQUENCY, SCSI + * On sun4u, auxio exists with one register (LED) on the SBus, and 5 + * registers on the EBus2 (pci) (LED, PCIMODE, FREQUENCY, SCSI * OSCILLATOR, and TEMP SENSE. */ @@ -142,6 +142,7 @@ static driver_t auxio_sbus_driver = { static devclass_t auxio_devclass; DRIVER_MODULE(auxio, sbus, auxio_sbus_driver, auxio_devclass, 0, 0); +MODULE_DEPEND(auxio, sbus, 1, 1, 1); /* EBus */ static device_method_t auxio_ebus_methods[] = { @@ -158,6 +159,7 @@ static driver_t auxio_ebus_driver = { }; DRIVER_MODULE(auxio, ebus, auxio_ebus_driver, auxio_devclass, 0, 0); +MODULE_DEPEND(auxio, ebus, 1, 1, 1); MODULE_VERSION(auxio, 1); #define AUXIO_LOCK_INIT(sc) \ Modified: stable/8/sys/sparc64/central/central.c ============================================================================== --- stable/8/sys/sparc64/central/central.c Wed Jan 13 19:56:02 2010 (r202222) +++ stable/8/sys/sparc64/central/central.c Wed Jan 13 19:59:13 2010 (r202223) @@ -106,6 +106,7 @@ static driver_t central_driver = { static devclass_t central_devclass; DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0); +MODULE_DEPEND(fhc, nexus, 1, 1, 1); MODULE_VERSION(central, 1); static int Modified: stable/8/sys/sparc64/fhc/fhc.c ============================================================================== --- stable/8/sys/sparc64/fhc/fhc.c Wed Jan 13 19:56:02 2010 (r202222) +++ stable/8/sys/sparc64/fhc/fhc.c Wed Jan 13 19:59:13 2010 (r202223) @@ -120,8 +120,9 @@ static driver_t fhc_driver = { static devclass_t fhc_devclass; DRIVER_MODULE(fhc, central, fhc_driver, fhc_devclass, 0, 0); -DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0); MODULE_DEPEND(fhc, central, 1, 1, 1); +DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0); +MODULE_DEPEND(fhc, nexus, 1, 1, 1); MODULE_VERSION(fhc, 1); static const struct intr_controller fhc_ic = { Modified: stable/8/sys/sparc64/pci/apb.c ============================================================================== --- stable/8/sys/sparc64/pci/apb.c Wed Jan 13 19:56:02 2010 (r202222) +++ stable/8/sys/sparc64/pci/apb.c Wed Jan 13 19:59:13 2010 (r202223) @@ -112,6 +112,7 @@ static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc)); DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0); +MODULE_DEPEND(apb, pci, 1, 1, 1); /* APB specific registers */ #define APBR_IOMAP 0xde Modified: stable/8/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pcib.c Wed Jan 13 19:56:02 2010 (r202222) +++ stable/8/sys/sparc64/pci/ofw_pcib.c Wed Jan 13 19:59:13 2010 (r202223) @@ -94,6 +94,7 @@ static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods, sizeof(struct ofw_pcib_gen_softc)); DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0); +MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1); static int ofw_pcib_probe(device_t dev) Modified: stable/8/sys/sparc64/sbus/sbus.c ============================================================================== --- stable/8/sys/sparc64/sbus/sbus.c Wed Jan 13 19:56:02 2010 (r202222) +++ stable/8/sys/sparc64/sbus/sbus.c Wed Jan 13 19:59:13 2010 (r202223) @@ -248,6 +248,7 @@ static driver_t sbus_driver = { static devclass_t sbus_devclass; DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0); +MODULE_DEPEND(sbus, nexus, 1, 1, 1); MODULE_VERSION(sbus, 1); #define OFW_SBUS_TYPE "sbus" Modified: stable/8/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/8/sys/sparc64/sparc64/nexus.c Wed Jan 13 19:56:02 2010 (r202222) +++ stable/8/sys/sparc64/sparc64/nexus.c Wed Jan 13 19:59:13 2010 (r202223) @@ -145,6 +145,7 @@ static devclass_t nexus_devclass; DEFINE_CLASS_0(nexus, nexus_driver, nexus_methods, sizeof(struct nexus_softc)); DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +MODULE_VERSION(nexus, 1); static const char *const nexus_excl_name[] = { "aliases", From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 19:59:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F3491065769; Wed, 13 Jan 2010 19:59:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1328FC22; Wed, 13 Jan 2010 19:59:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DJxKFU008058; Wed, 13 Jan 2010 19:59:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DJxJba008050; Wed, 13 Jan 2010 19:59:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001131959.o0DJxJba008050@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 19:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202224 - in stable/7/sys: dev/auxio sparc64/central sparc64/fhc sparc64/pci sparc64/sbus sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 19:59:20 -0000 Author: marius Date: Wed Jan 13 19:59:19 2010 New Revision: 202224 URL: http://svn.freebsd.org/changeset/base/202224 Log: MFC: r200815, r200816 Provide and consume missing module dependency information. Modified: stable/7/sys/dev/auxio/auxio.c stable/7/sys/sparc64/central/central.c stable/7/sys/sparc64/fhc/fhc.c stable/7/sys/sparc64/pci/apb.c stable/7/sys/sparc64/pci/ofw_pcib.c stable/7/sys/sparc64/sbus/sbus.c stable/7/sys/sparc64/sparc64/nexus.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/auxio/auxio.c ============================================================================== --- stable/7/sys/dev/auxio/auxio.c Wed Jan 13 19:59:13 2010 (r202223) +++ stable/7/sys/dev/auxio/auxio.c Wed Jan 13 19:59:19 2010 (r202224) @@ -56,7 +56,7 @@ */ /* - * AUXIO registers support on the sbus & ebus2, used for the floppy driver + * AUXIO registers support on the SBus & EBus2, used for the floppy driver * and to control the system LED, for the BLINK option. */ @@ -85,8 +85,8 @@ __FBSDID("$FreeBSD$"); #include /* - * on sun4u, auxio exists with one register (LED) on the sbus, and 5 - * registers on the ebus2 (pci) (LED, PCIMODE, FREQUENCY, SCSI + * On sun4u, auxio exists with one register (LED) on the SBus, and 5 + * registers on the EBus2 (pci) (LED, PCIMODE, FREQUENCY, SCSI * OSCILLATOR, and TEMP SENSE. */ @@ -142,6 +142,7 @@ static driver_t auxio_sbus_driver = { static devclass_t auxio_devclass; DRIVER_MODULE(auxio, sbus, auxio_sbus_driver, auxio_devclass, 0, 0); +MODULE_DEPEND(auxio, sbus, 1, 1, 1); /* EBus */ static device_method_t auxio_ebus_methods[] = { @@ -158,6 +159,7 @@ static driver_t auxio_ebus_driver = { }; DRIVER_MODULE(auxio, ebus, auxio_ebus_driver, auxio_devclass, 0, 0); +MODULE_DEPEND(auxio, ebus, 1, 1, 1); MODULE_VERSION(auxio, 1); #define AUXIO_LOCK_INIT(sc) \ Modified: stable/7/sys/sparc64/central/central.c ============================================================================== --- stable/7/sys/sparc64/central/central.c Wed Jan 13 19:59:13 2010 (r202223) +++ stable/7/sys/sparc64/central/central.c Wed Jan 13 19:59:19 2010 (r202224) @@ -105,6 +105,7 @@ static driver_t central_driver = { static devclass_t central_devclass; DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0); +MODULE_DEPEND(fhc, nexus, 1, 1, 1); MODULE_VERSION(central, 1); static int Modified: stable/7/sys/sparc64/fhc/fhc.c ============================================================================== --- stable/7/sys/sparc64/fhc/fhc.c Wed Jan 13 19:59:13 2010 (r202223) +++ stable/7/sys/sparc64/fhc/fhc.c Wed Jan 13 19:59:19 2010 (r202224) @@ -119,8 +119,9 @@ static driver_t fhc_driver = { static devclass_t fhc_devclass; DRIVER_MODULE(fhc, central, fhc_driver, fhc_devclass, 0, 0); -DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0); MODULE_DEPEND(fhc, central, 1, 1, 1); +DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0); +MODULE_DEPEND(fhc, nexus, 1, 1, 1); MODULE_VERSION(fhc, 1); static const struct intr_controller fhc_ic = { Modified: stable/7/sys/sparc64/pci/apb.c ============================================================================== --- stable/7/sys/sparc64/pci/apb.c Wed Jan 13 19:59:13 2010 (r202223) +++ stable/7/sys/sparc64/pci/apb.c Wed Jan 13 19:59:19 2010 (r202224) @@ -113,6 +113,7 @@ static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc)); DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0); +MODULE_DEPEND(apb, pci, 1, 1, 1); /* APB specific registers */ #define APBR_IOMAP 0xde Modified: stable/7/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- stable/7/sys/sparc64/pci/ofw_pcib.c Wed Jan 13 19:59:13 2010 (r202223) +++ stable/7/sys/sparc64/pci/ofw_pcib.c Wed Jan 13 19:59:19 2010 (r202224) @@ -95,6 +95,7 @@ static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods, sizeof(struct ofw_pcib_gen_softc)); DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0); +MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1); static int ofw_pcib_probe(device_t dev) Modified: stable/7/sys/sparc64/sbus/sbus.c ============================================================================== --- stable/7/sys/sparc64/sbus/sbus.c Wed Jan 13 19:59:13 2010 (r202223) +++ stable/7/sys/sparc64/sbus/sbus.c Wed Jan 13 19:59:19 2010 (r202224) @@ -247,6 +247,7 @@ static driver_t sbus_driver = { static devclass_t sbus_devclass; DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0); +MODULE_DEPEND(sbus, nexus, 1, 1, 1); MODULE_VERSION(sbus, 1); #define OFW_SBUS_TYPE "sbus" Modified: stable/7/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/7/sys/sparc64/sparc64/nexus.c Wed Jan 13 19:59:13 2010 (r202223) +++ stable/7/sys/sparc64/sparc64/nexus.c Wed Jan 13 19:59:19 2010 (r202224) @@ -145,6 +145,7 @@ static devclass_t nexus_devclass; DEFINE_CLASS_0(nexus, nexus_driver, nexus_methods, sizeof(struct nexus_softc)); DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +MODULE_VERSION(nexus, 1); static const char *const nexus_excl_name[] = { "aliases", From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:03:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43F7F1065672; Wed, 13 Jan 2010 20:03:25 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 303E38FC1D; Wed, 13 Jan 2010 20:03:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DK3PbJ009056; Wed, 13 Jan 2010 20:03:25 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DK3Owe009044; Wed, 13 Jan 2010 20:03:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132003.o0DK3Owe009044@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202225 - in stable/8/sys: dev/auxio sparc64/central sparc64/ebus sparc64/fhc sparc64/pci sparc64/sbus sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:03:25 -0000 Author: marius Date: Wed Jan 13 20:03:24 2010 New Revision: 202225 URL: http://svn.freebsd.org/changeset/base/202225 Log: MFC: r200874 Enroll these drivers in multipass probing. The motivation behind this is that the JBus to EBus bridges share the interrupt controller of a sibling JBus to PCIe bridge (at least as far as the OFW device tree is concerned, in reality they are part of the same chip) so we have to probe and attach the latter first. That happens to be also the case due to the fact that the JBus to PCIe bridges appear first in the OFW device tree but it doesn't hurt to ensure the right order. Modified: stable/8/sys/dev/auxio/auxio.c stable/8/sys/sparc64/central/central.c stable/8/sys/sparc64/ebus/ebus.c stable/8/sys/sparc64/fhc/fhc.c stable/8/sys/sparc64/pci/apb.c stable/8/sys/sparc64/pci/ofw_pcib.c stable/8/sys/sparc64/pci/ofw_pcibus.c stable/8/sys/sparc64/sbus/dma_sbus.c stable/8/sys/sparc64/sbus/sbus.c stable/8/sys/sparc64/sparc64/nexus.c stable/8/sys/sparc64/sparc64/upa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/auxio/auxio.c ============================================================================== --- stable/8/sys/dev/auxio/auxio.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/dev/auxio/auxio.c Wed Jan 13 20:03:24 2010 (r202225) @@ -141,7 +141,9 @@ static driver_t auxio_sbus_driver = { }; static devclass_t auxio_devclass; -DRIVER_MODULE(auxio, sbus, auxio_sbus_driver, auxio_devclass, 0, 0); +/* The probe order is handled by sbus(4). */ +EARLY_DRIVER_MODULE(auxio, sbus, auxio_sbus_driver, auxio_devclass, 0, 0, + BUS_PASS_DEFAULT); MODULE_DEPEND(auxio, sbus, 1, 1, 1); /* EBus */ @@ -158,7 +160,8 @@ static driver_t auxio_ebus_driver = { sizeof(struct auxio_softc) }; -DRIVER_MODULE(auxio, ebus, auxio_ebus_driver, auxio_devclass, 0, 0); +EARLY_DRIVER_MODULE(auxio, ebus, auxio_ebus_driver, auxio_devclass, 0, 0, + BUS_PASS_DEFAULT); MODULE_DEPEND(auxio, ebus, 1, 1, 1); MODULE_VERSION(auxio, 1); Modified: stable/8/sys/sparc64/central/central.c ============================================================================== --- stable/8/sys/sparc64/central/central.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/central/central.c Wed Jan 13 20:03:24 2010 (r202225) @@ -105,7 +105,8 @@ static driver_t central_driver = { static devclass_t central_devclass; -DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0); +EARLY_DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(fhc, nexus, 1, 1, 1); MODULE_VERSION(central, 1); Modified: stable/8/sys/sparc64/ebus/ebus.c ============================================================================== --- stable/8/sys/sparc64/ebus/ebus.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/ebus/ebus.c Wed Jan 13 20:03:24 2010 (r202225) @@ -138,7 +138,8 @@ static driver_t ebus_driver = { static devclass_t ebus_devclass; -DRIVER_MODULE(ebus, pci, ebus_driver, ebus_devclass, 0, 0); +EARLY_DRIVER_MODULE(ebus, pci, ebus_driver, ebus_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(ebus, pci, 1, 1, 1); MODULE_VERSION(ebus, 1); Modified: stable/8/sys/sparc64/fhc/fhc.c ============================================================================== --- stable/8/sys/sparc64/fhc/fhc.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/fhc/fhc.c Wed Jan 13 20:03:24 2010 (r202225) @@ -119,9 +119,11 @@ static driver_t fhc_driver = { static devclass_t fhc_devclass; -DRIVER_MODULE(fhc, central, fhc_driver, fhc_devclass, 0, 0); +EARLY_DRIVER_MODULE(fhc, central, fhc_driver, fhc_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(fhc, central, 1, 1, 1); -DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0); +EARLY_DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(fhc, nexus, 1, 1, 1); MODULE_VERSION(fhc, 1); Modified: stable/8/sys/sparc64/pci/apb.c ============================================================================== --- stable/8/sys/sparc64/pci/apb.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/pci/apb.c Wed Jan 13 20:03:24 2010 (r202225) @@ -111,7 +111,7 @@ static device_method_t apb_methods[] = { static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc)); -DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0); +EARLY_DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0, BUS_PASS_BUS); MODULE_DEPEND(apb, pci, 1, 1, 1); /* APB specific registers */ Modified: stable/8/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pcib.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/pci/ofw_pcib.c Wed Jan 13 20:03:24 2010 (r202225) @@ -93,7 +93,8 @@ static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods, sizeof(struct ofw_pcib_gen_softc)); -DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0); +EARLY_DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1); static int Modified: stable/8/sys/sparc64/pci/ofw_pcibus.c ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 20:03:24 2010 (r202225) @@ -101,7 +101,8 @@ static devclass_t pci_devclass; DEFINE_CLASS_1(pci, ofw_pcibus_driver, ofw_pcibus_methods, 1 /* no softc */, pci_driver); -DRIVER_MODULE(ofw_pcibus, pcib, ofw_pcibus_driver, pci_devclass, 0, 0); +EARLY_DRIVER_MODULE(ofw_pcibus, pcib, ofw_pcibus_driver, pci_devclass, 0, 0, + BUS_PASS_BUS); MODULE_VERSION(ofw_pcibus, 1); MODULE_DEPEND(ofw_pcibus, pci, 1, 1, 1); Modified: stable/8/sys/sparc64/sbus/dma_sbus.c ============================================================================== --- stable/8/sys/sparc64/sbus/dma_sbus.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/sbus/dma_sbus.c Wed Jan 13 20:03:24 2010 (r202225) @@ -149,7 +149,13 @@ static driver_t dma_driver = { sizeof(struct dma_softc), }; -DRIVER_MODULE(dma, sbus, dma_driver, dma_devclass, 0, 0); +/* + * The probe order is handled by sbus(4) as we don't want the variants + * with children to be attached earlier than the stand-alone controllers + * in order to generally preserve the OFW device tree order. + */ +EARLY_DRIVER_MODULE(dma, sbus, dma_driver, dma_devclass, 0, 0, + BUS_PASS_DEFAULT); MODULE_DEPEND(dma, sbus, 1, 1, 1); MODULE_VERSION(dma, 1); Modified: stable/8/sys/sparc64/sbus/sbus.c ============================================================================== --- stable/8/sys/sparc64/sbus/sbus.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/sbus/sbus.c Wed Jan 13 20:03:24 2010 (r202225) @@ -247,7 +247,8 @@ static driver_t sbus_driver = { static devclass_t sbus_devclass; -DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0); +EARLY_DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(sbus, nexus, 1, 1, 1); MODULE_VERSION(sbus, 1); Modified: stable/8/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/8/sys/sparc64/sparc64/nexus.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/sparc64/nexus.c Wed Jan 13 20:03:24 2010 (r202225) @@ -144,7 +144,8 @@ static device_method_t nexus_methods[] = static devclass_t nexus_devclass; DEFINE_CLASS_0(nexus, nexus_driver, nexus_methods, sizeof(struct nexus_softc)); -DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +EARLY_DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0, + BUS_PASS_BUS); MODULE_VERSION(nexus, 1); static const char *const nexus_excl_name[] = { Modified: stable/8/sys/sparc64/sparc64/upa.c ============================================================================== --- stable/8/sys/sparc64/sparc64/upa.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/sparc64/upa.c Wed Jan 13 20:03:24 2010 (r202225) @@ -151,7 +151,7 @@ static device_method_t upa_methods[] = { static devclass_t upa_devclass; DEFINE_CLASS_0(upa, upa_driver, upa_methods, sizeof(struct upa_softc)); -DRIVER_MODULE(upa, nexus, upa_driver, upa_devclass, 0, 0); +EARLY_DRIVER_MODULE(upa, nexus, upa_driver, upa_devclass, 0, 0, BUS_PASS_BUS); static const struct intr_controller upa_ic = { upa_intr_enable, From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:05:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAA7C1065694; Wed, 13 Jan 2010 20:05:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C03D78FC15; Wed, 13 Jan 2010 20:05:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DK5W25009590; Wed, 13 Jan 2010 20:05:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DK5WrP009588; Wed, 13 Jan 2010 20:05:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132005.o0DK5WrP009588@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202226 - stable/8/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:05:33 -0000 Author: marius Date: Wed Jan 13 20:05:32 2010 New Revision: 202226 URL: http://svn.freebsd.org/changeset/base/202226 Log: MFC: r200876 Make these constants unsigned which is more appropriate. Modified: stable/8/sys/sparc64/include/bus_common.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/include/bus_common.h ============================================================================== --- stable/8/sys/sparc64/include/bus_common.h Wed Jan 13 20:03:24 2010 (r202225) +++ stable/8/sys/sparc64/include/bus_common.h Wed Jan 13 20:05:32 2010 (r202226) @@ -39,18 +39,18 @@ #ifndef _MACHINE_BUS_COMMON_H_ #define _MACHINE_BUS_COMMON_H_ -#define INTMAP_V 0x080000000LL /* Interrupt valid (enabled) */ -#define INTMAP_TID_MASK 0x07c000000LL /* UPA target ID */ +#define INTMAP_V 0x080000000ULL /* Interrupt valid (enabled) */ +#define INTMAP_TID_MASK 0x07c000000ULL /* UPA target ID */ #define INTMAP_TID_SHIFT 26 -#define INTMAP_IGN_MASK 0x0000007c0LL /* Interrupt group no. */ +#define INTMAP_IGN_MASK 0x0000007c0ULL /* Interrupt group no. */ #define INTMAP_IGN_SHIFT 6 -#define INTMAP_INO_MASK 0x00000003fLL /* Interrupt number */ +#define INTMAP_INO_MASK 0x00000003fULL /* Interrupt number */ #define INTMAP_INR_MASK (INTMAP_IGN_MASK | INTMAP_INO_MASK) -#define INTMAP_SBUSSLOT_MASK 0x000000018LL /* SBus slot # */ -#define INTMAP_PCIBUS_MASK 0x000000010LL /* PCI bus number (A or B) */ -#define INTMAP_PCISLOT_MASK 0x00000000cLL /* PCI slot # */ -#define INTMAP_PCIINT_MASK 0x000000003LL /* PCI interrupt #A,#B,#C,#D */ -#define INTMAP_OBIO_MASK 0x000000020LL /* Onboard device */ +#define INTMAP_SBUSSLOT_MASK 0x000000018ULL /* SBus slot # */ +#define INTMAP_PCIBUS_MASK 0x000000010ULL /* PCI bus number (A or B) */ +#define INTMAP_PCISLOT_MASK 0x00000000cULL /* PCI slot # */ +#define INTMAP_PCIINT_MASK 0x000000003ULL /* PCI interrupt #A,#B,#C,#D */ +#define INTMAP_OBIO_MASK 0x000000020ULL /* Onboard device */ #define INTIGN(x) (((x) & INTMAP_IGN_MASK) >> INTMAP_IGN_SHIFT) #define INTVEC(x) ((x) & INTMAP_INR_MASK) #define INTSLOT(x) (((x) >> 3) & 0x7) From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:05:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16999106568D; Wed, 13 Jan 2010 20:05:36 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E06098FC13; Wed, 13 Jan 2010 20:05:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DK5ZS9009656; Wed, 13 Jan 2010 20:05:35 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DK5ZZx009654; Wed, 13 Jan 2010 20:05:35 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132005.o0DK5ZZx009654@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202227 - stable/7/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:05:36 -0000 Author: marius Date: Wed Jan 13 20:05:35 2010 New Revision: 202227 URL: http://svn.freebsd.org/changeset/base/202227 Log: MFC: r200876 Make these constants unsigned which is more appropriate. Modified: stable/7/sys/sparc64/include/bus_common.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/bus_common.h ============================================================================== --- stable/7/sys/sparc64/include/bus_common.h Wed Jan 13 20:05:32 2010 (r202226) +++ stable/7/sys/sparc64/include/bus_common.h Wed Jan 13 20:05:35 2010 (r202227) @@ -39,18 +39,18 @@ #ifndef _MACHINE_BUS_COMMON_H_ #define _MACHINE_BUS_COMMON_H_ -#define INTMAP_V 0x080000000LL /* Interrupt valid (enabled) */ -#define INTMAP_TID_MASK 0x07c000000LL /* UPA target ID */ +#define INTMAP_V 0x080000000ULL /* Interrupt valid (enabled) */ +#define INTMAP_TID_MASK 0x07c000000ULL /* UPA target ID */ #define INTMAP_TID_SHIFT 26 -#define INTMAP_IGN_MASK 0x0000007c0LL /* Interrupt group no. */ +#define INTMAP_IGN_MASK 0x0000007c0ULL /* Interrupt group no. */ #define INTMAP_IGN_SHIFT 6 -#define INTMAP_INO_MASK 0x00000003fLL /* Interrupt number */ +#define INTMAP_INO_MASK 0x00000003fULL /* Interrupt number */ #define INTMAP_INR_MASK (INTMAP_IGN_MASK | INTMAP_INO_MASK) -#define INTMAP_SBUSSLOT_MASK 0x000000018LL /* SBus slot # */ -#define INTMAP_PCIBUS_MASK 0x000000010LL /* PCI bus number (A or B) */ -#define INTMAP_PCISLOT_MASK 0x00000000cLL /* PCI slot # */ -#define INTMAP_PCIINT_MASK 0x000000003LL /* PCI interrupt #A,#B,#C,#D */ -#define INTMAP_OBIO_MASK 0x000000020LL /* Onboard device */ +#define INTMAP_SBUSSLOT_MASK 0x000000018ULL /* SBus slot # */ +#define INTMAP_PCIBUS_MASK 0x000000010ULL /* PCI bus number (A or B) */ +#define INTMAP_PCISLOT_MASK 0x00000000cULL /* PCI slot # */ +#define INTMAP_PCIINT_MASK 0x000000003ULL /* PCI interrupt #A,#B,#C,#D */ +#define INTMAP_OBIO_MASK 0x000000020ULL /* Onboard device */ #define INTIGN(x) (((x) & INTMAP_IGN_MASK) >> INTMAP_IGN_SHIFT) #define INTVEC(x) ((x) & INTMAP_INR_MASK) #define INTSLOT(x) (((x) >> 3) & 0x7) From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:07:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FC5C106566B; Wed, 13 Jan 2010 20:07:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1A378FC12; Wed, 13 Jan 2010 20:07:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DK7jGf010186; Wed, 13 Jan 2010 20:07:45 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DK7jfW010184; Wed, 13 Jan 2010 20:07:45 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132007.o0DK7jfW010184@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202228 - stable/8/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:07:46 -0000 Author: marius Date: Wed Jan 13 20:07:45 2010 New Revision: 202228 URL: http://svn.freebsd.org/changeset/base/202228 Log: MFC: r200878 - Add macros for the states of the interrupt clear registers. - Change INTMAP_VEC() to take an INO as its second argument rather than an INR. The former is what I actually intended with this macro and how it's currently used. Modified: stable/8/sys/sparc64/include/bus_common.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/include/bus_common.h ============================================================================== --- stable/8/sys/sparc64/include/bus_common.h Wed Jan 13 20:05:35 2010 (r202227) +++ stable/8/sys/sparc64/include/bus_common.h Wed Jan 13 20:07:45 2010 (r202228) @@ -39,6 +39,10 @@ #ifndef _MACHINE_BUS_COMMON_H_ #define _MACHINE_BUS_COMMON_H_ +#define INTCLR_PENDING 0x000000003ULL /* Interrupt queued to CPU */ +#define INTCLR_RECEIVED 0x000000001ULL /* Interrupt received */ +#define INTCLR_IDLE 0x000000000ULL /* Interrupt idle */ + #define INTMAP_V 0x080000000ULL /* Interrupt valid (enabled) */ #define INTMAP_TID_MASK 0x07c000000ULL /* UPA target ID */ #define INTMAP_TID_SHIFT 26 @@ -60,9 +64,9 @@ (INTMAP_TID((mr), (mid)) | INTMAP_V) #define INTMAP_TID(mr, mid) \ (((mr) & ~INTMAP_TID_MASK) | ((mid) << INTMAP_TID_SHIFT)) -#define INTMAP_VEC(ign, inr) \ +#define INTMAP_VEC(ign, ino) \ ((((ign) << INTMAP_IGN_SHIFT) & INTMAP_IGN_MASK) | \ - ((inr) & INTMAP_INR_MASK)) + ((ino) & INTMAP_INO_MASK)) /* counter-timer support. */ void sparc64_counter_init(const char *name, bus_space_tag_t tag, From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:07:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0EBE1065676; Wed, 13 Jan 2010 20:07:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF92F8FC18; Wed, 13 Jan 2010 20:07:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DK7k4Z010216; Wed, 13 Jan 2010 20:07:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DK7k8K010214; Wed, 13 Jan 2010 20:07:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132007.o0DK7k8K010214@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202229 - stable/7/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:07:47 -0000 Author: marius Date: Wed Jan 13 20:07:46 2010 New Revision: 202229 URL: http://svn.freebsd.org/changeset/base/202229 Log: MFC: r200878 - Add macros for the states of the interrupt clear registers. - Change INTMAP_VEC() to take an INO as its second argument rather than an INR. The former is what I actually intended with this macro and how it's currently used. Modified: stable/7/sys/sparc64/include/bus_common.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/bus_common.h ============================================================================== --- stable/7/sys/sparc64/include/bus_common.h Wed Jan 13 20:07:45 2010 (r202228) +++ stable/7/sys/sparc64/include/bus_common.h Wed Jan 13 20:07:46 2010 (r202229) @@ -39,6 +39,10 @@ #ifndef _MACHINE_BUS_COMMON_H_ #define _MACHINE_BUS_COMMON_H_ +#define INTCLR_PENDING 0x000000003ULL /* Interrupt queued to CPU */ +#define INTCLR_RECEIVED 0x000000001ULL /* Interrupt received */ +#define INTCLR_IDLE 0x000000000ULL /* Interrupt idle */ + #define INTMAP_V 0x080000000ULL /* Interrupt valid (enabled) */ #define INTMAP_TID_MASK 0x07c000000ULL /* UPA target ID */ #define INTMAP_TID_SHIFT 26 @@ -60,9 +64,9 @@ (INTMAP_TID((mr), (mid)) | INTMAP_V) #define INTMAP_TID(mr, mid) \ (((mr) & ~INTMAP_TID_MASK) | ((mid) << INTMAP_TID_SHIFT)) -#define INTMAP_VEC(ign, inr) \ +#define INTMAP_VEC(ign, ino) \ ((((ign) << INTMAP_IGN_SHIFT) & INTMAP_IGN_MASK) | \ - ((inr) & INTMAP_INR_MASK)) + ((ino) & INTMAP_INO_MASK)) /* counter-timer support. */ void sparc64_counter_init(const char *name, bus_space_tag_t tag, From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:21:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F644106566B; Wed, 13 Jan 2010 20:21:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1E7468FC16; Wed, 13 Jan 2010 20:21:29 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C21D246B17; Wed, 13 Jan 2010 15:21:28 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id A2A4D8A01F; Wed, 13 Jan 2010 15:21:25 -0500 (EST) From: John Baldwin To: Doug Barton Date: Wed, 13 Jan 2010 15:15:08 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091231; KDE/4.3.1; amd64; ; ) References: <20100112.174326.337739863389869251.imp@bsdimp.com> <4B4E1586.7090102@FreeBSD.org> In-Reply-To: <4B4E1586.7090102@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001131515.08602.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 13 Jan 2010 15:21:25 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "M. Warner Losh" , freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:21:29 -0000 On Wednesday 13 January 2010 1:48:38 pm Doug Barton wrote: > To address the other responses, Tom, sorry, your suggested text doesn't > address my concern. John, I don't think that users would somehow > magically know to look in NOTES for more information about an option > that is already in GENERIC. You really think users do not already know to look in manpages or NOTES to find out more details about kernel options? Why bother having those documents if our users aren't going to look at them? Seriously, have you actually looked at GENERIC and NOTES and compared their contents. There are _many_ options and devices in GENERIC that have expanded descriptions in NOTES. This is the norm for documenting kernel options and has been for well over a decade. > In the interests of bringing this to a close: > # Store the plain version of the configuration file in the kernel itself. > # For information on extraction, and storing the comments also, see > config(8). > > There are plenty of comments in GENERIC that are longer/more substantial > than that, and let's be serious for a minute, IT DOESN'T MATTER ANYWAY. > I'm sorry if adding a comment that is slightly larger than usual to a > kernel config file defiles someone's view of the purity of all things > kernel, but let's try to take a step back and realize that NOT making > things so cryptic might actually benefit the users. So why not add a 3-line comment to GENERIC for every other kernel option? Put another way, what makes 'INCLUDE_CONFIG_FILE' sufficiently special that it deserves special treatment relative to other kernel options? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:30:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBDCC1065697; Wed, 13 Jan 2010 20:30:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAFF28FC08; Wed, 13 Jan 2010 20:30:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKUGIV015343; Wed, 13 Jan 2010 20:30:16 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKUGIU015341; Wed, 13 Jan 2010 20:30:16 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001132030.o0DKUGIU015341@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 20:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202231 - head/crypto/openssh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:30:16 -0000 Author: ed Date: Wed Jan 13 20:30:16 2010 New Revision: 202231 URL: http://svn.freebsd.org/changeset/base/202231 Log: Add a missing $FreeBSD$ string. I was requested to add this string to any file that was modified by my commit, which I forgot to do so. Requested by: des Modified: head/crypto/openssh/loginrec.c Modified: head/crypto/openssh/loginrec.c ============================================================================== --- head/crypto/openssh/loginrec.c Wed Jan 13 20:25:45 2010 (r202230) +++ head/crypto/openssh/loginrec.c Wed Jan 13 20:30:16 2010 (r202231) @@ -146,6 +146,7 @@ */ #include "includes.h" +__RCSID("$FreeBSD$"); #include #include From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:32:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4867106568B; Wed, 13 Jan 2010 20:32:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1ECB8FC0C; Wed, 13 Jan 2010 20:32:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKWsDc015935; Wed, 13 Jan 2010 20:32:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKWsI6015933; Wed, 13 Jan 2010 20:32:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132032.o0DKWsI6015933@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202232 - stable/8/sys/sparc64/ebus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:32:55 -0000 Author: marius Date: Wed Jan 13 20:32:54 2010 New Revision: 202232 URL: http://svn.freebsd.org/changeset/base/202232 Log: MFC: r200879 - Add support for the JBus to EBus bridges which hang off of nexus(4) and are found in sun4u and sun4v machines based on the Fire ASIC. - Initialize the configuration space of the PCI to EBus variant the same way as OpenSolaris does. Modified: stable/8/sys/sparc64/ebus/ebus.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/ebus/ebus.c ============================================================================== --- stable/8/sys/sparc64/ebus/ebus.c Wed Jan 13 20:30:16 2010 (r202231) +++ stable/8/sys/sparc64/ebus/ebus.c Wed Jan 13 20:32:54 2010 (r202232) @@ -1,6 +1,7 @@ /*- * Copyright (c) 1999, 2000 Matthew R. Green * Copyright (c) 2001 Thomas Moestl + * Copyright (c) 2009 by Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +34,7 @@ __FBSDID("$FreeBSD$"); /* - * UltraSPARC 5 and beyond EBus support + * Driver for JBus to EBus and PCI to EBus bridges */ #include @@ -43,14 +44,17 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include #include #include +#include +#ifndef SUN4V +#include +#endif +#include #include #include @@ -59,11 +63,19 @@ __FBSDID("$FreeBSD$"); #include /* - * The register, ranges and interrupt map properties are identical to the ISA - * ones. + * The register, interrupt map and for the PCI variant also the ranges + * properties are identical to the ISA ones. */ #include +struct ebus_nexus_ranges { + uint32_t child_hi; + uint32_t child_lo; + uint32_t phys_hi; + uint32_t phys_lo; + uint32_t size; +}; + struct ebus_devinfo { struct ofw_bus_devinfo edi_obdinfo; struct resource_list edi_rl; @@ -76,32 +88,45 @@ struct ebus_rinfo { }; struct ebus_softc { - struct isa_ranges *sc_range; + void *sc_range; struct ebus_rinfo *sc_rinfo; + u_int sc_flags; +#define EBUS_PCI (1 << 0) + int sc_nrange; struct ofw_bus_iinfo sc_iinfo; + +#ifndef SUN4V + uint32_t sc_ign; +#endif }; -static device_probe_t ebus_probe; -static device_attach_t ebus_attach; +static device_probe_t ebus_nexus_probe; +static device_attach_t ebus_nexus_attach; +static device_probe_t ebus_pci_probe; +static device_attach_t ebus_pci_attach; static bus_print_child_t ebus_print_child; static bus_probe_nomatch_t ebus_probe_nomatch; static bus_alloc_resource_t ebus_alloc_resource; static bus_release_resource_t ebus_release_resource; +static bus_setup_intr_t ebus_setup_intr; static bus_get_resource_list_t ebus_get_resource_list; static ofw_bus_get_devinfo_t ebus_get_devinfo; -static struct ebus_devinfo *ebus_setup_dinfo(device_t, struct ebus_softc *, - phandle_t); -static void ebus_destroy_dinfo(struct ebus_devinfo *); -static int ebus_print_res(struct ebus_devinfo *); +static int ebus_attach(device_t dev, struct ebus_softc *sc, phandle_t node); +static struct ebus_devinfo *ebus_setup_dinfo(device_t dev, + struct ebus_softc *sc, phandle_t node); +static void ebus_destroy_dinfo(struct ebus_devinfo *edi); +static int ebus_print_res(struct ebus_devinfo *edi); + +static devclass_t ebus_devclass; -static device_method_t ebus_methods[] = { +static device_method_t ebus_nexus_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, ebus_probe), - DEVMETHOD(device_attach, ebus_attach), + DEVMETHOD(device_probe, ebus_nexus_probe), + DEVMETHOD(device_attach, ebus_nexus_attach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), @@ -113,7 +138,7 @@ static device_method_t ebus_methods[] = DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_release_resource, ebus_release_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_setup_intr, ebus_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_get_resource_list, ebus_get_resource_list), @@ -130,21 +155,80 @@ static device_method_t ebus_methods[] = KOBJMETHOD_END }; -static driver_t ebus_driver = { +static driver_t ebus_nexus_driver = { "ebus", - ebus_methods, + ebus_nexus_methods, sizeof(struct ebus_softc), }; -static devclass_t ebus_devclass; +/* + * NB: we rely on the interrupt controllers of the accompanying PCI-Express + * bridge to be registered as the nexus variant of the EBus bridges doesn't + * employ its own one. + */ +EARLY_DRIVER_MODULE(ebus, nexus, ebus_nexus_driver, ebus_devclass, 0, 0, + BUS_PASS_BUS + 1); +MODULE_DEPEND(ebus, nexus, 1, 1, 1); + +static device_method_t ebus_pci_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ebus_pci_probe), + DEVMETHOD(device_attach, ebus_pci_attach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), -EARLY_DRIVER_MODULE(ebus, pci, ebus_driver, ebus_devclass, 0, 0, + /* Bus interface */ + DEVMETHOD(bus_print_child, ebus_print_child), + DEVMETHOD(bus_probe_nomatch, ebus_probe_nomatch), + DEVMETHOD(bus_alloc_resource, ebus_alloc_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_release_resource, ebus_release_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_get_resource_list, ebus_get_resource_list), + DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, ebus_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + + KOBJMETHOD_END +}; + +static driver_t ebus_pci_driver = { + "ebus", + ebus_pci_methods, + sizeof(struct ebus_softc), +}; + +EARLY_DRIVER_MODULE(ebus, pci, ebus_pci_driver, ebus_devclass, 0, 0, BUS_PASS_BUS); MODULE_DEPEND(ebus, pci, 1, 1, 1); MODULE_VERSION(ebus, 1); static int -ebus_probe(device_t dev) +ebus_nexus_probe(device_t dev) +{ + const char* compat; + + compat = ofw_bus_get_compat(dev); + if (compat != NULL && strcmp(ofw_bus_get_name(dev), "ebus") == 0 && + strcmp(compat, "jbus-ebus") == 0) { + device_set_desc(dev, "JBus-EBus bridge"); + return (BUS_PROBE_GENERIC); + } + return (ENXIO); +} + +static int +ebus_pci_probe(device_t dev) { if (pci_get_class(dev) != PCIC_BRIDGE || @@ -158,27 +242,58 @@ ebus_probe(device_t dev) device_set_desc(dev, "PCI-EBus3 bridge"); else return (ENXIO); - return (0); + return (BUS_PROBE_GENERIC); } static int -ebus_attach(device_t dev) +ebus_nexus_attach(device_t dev) +{ + struct ebus_softc *sc; + phandle_t node; + + sc = device_get_softc(dev); + node = ofw_bus_get_node(dev); + +#ifndef SUN4V + if (OF_getprop(node, "portid", &sc->sc_ign, + sizeof(sc->sc_ign)) == -1) { + device_printf(dev, "could not determine IGN"); + return (ENXIO); + } +#endif + + sc->sc_nrange = OF_getprop_alloc(node, "ranges", + sizeof(struct ebus_nexus_ranges), &sc->sc_range); + if (sc->sc_nrange == -1) { + printf("%s: could not get ranges property\n", __func__); + return (ENXIO); + } + return (ebus_attach(dev, sc, node)); +} + +static int +ebus_pci_attach(device_t dev) { struct ebus_softc *sc; - struct ebus_devinfo *edi; struct ebus_rinfo *eri; struct resource *res; - device_t cdev; phandle_t node; int i, rnum, rid; sc = device_get_softc(dev); + sc->sc_flags |= EBUS_PCI; + + pci_write_config(dev, PCIR_COMMAND, + pci_read_config(dev, PCIR_COMMAND, 2) | PCIM_CMD_SERRESPEN | + PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN, 2); + pci_write_config(dev, PCIR_CACHELNSZ, 16 /* 64 bytes */, 1); + pci_write_config(dev, PCIR_LATTIMER, 64 /* 64 PCI cycles */, 1); node = ofw_bus_get_node(dev); sc->sc_nrange = OF_getprop_alloc(node, "ranges", - sizeof(*sc->sc_range), (void **)&sc->sc_range); + sizeof(struct isa_ranges), &sc->sc_range); if (sc->sc_nrange == -1) { - printf("ebus_attach: could not get ranges property\n"); + printf("%s: could not get ranges property\n", __func__); return (ENXIO); } @@ -188,29 +303,52 @@ ebus_attach(device_t dev) /* For every range, there must be a matching resource. */ for (rnum = 0; rnum < sc->sc_nrange; rnum++) { eri = &sc->sc_rinfo[rnum]; - eri->eri_rtype = ofw_isa_range_restype(&sc->sc_range[rnum]); + eri->eri_rtype = ofw_isa_range_restype( + &((struct isa_ranges *)sc->sc_range)[rnum]); rid = PCIR_BAR(rnum); res = bus_alloc_resource_any(dev, eri->eri_rtype, &rid, RF_ACTIVE); if (res == NULL) { - printf("ebus_attach: failed to allocate range " - "resource!\n"); + printf("%s: failed to allocate range resource!\n", + __func__); goto fail; } eri->eri_res = res; eri->eri_rman.rm_type = RMAN_ARRAY; eri->eri_rman.rm_descr = "EBus range"; if (rman_init(&eri->eri_rman) != 0) { - printf("ebus_attach: failed to initialize rman!"); + printf("%s: failed to initialize rman!", __func__); goto fail; } if (rman_manage_region(&eri->eri_rman, rman_get_start(res), rman_get_end(res)) != 0) { - printf("ebus_attach: failed to register region!"); + printf("%s: failed to register region!", __func__); rman_fini(&eri->eri_rman); goto fail; } } + return (ebus_attach(dev, sc, node)); + + fail: + for (i = rnum; i >= 0; i--) { + eri = &sc->sc_rinfo[i]; + if (i < rnum) + rman_fini(&eri->eri_rman); + if (eri->eri_res != 0) { + bus_release_resource(dev, eri->eri_rtype, + PCIR_BAR(rnum), eri->eri_res); + } + } + free(sc->sc_rinfo, M_DEVBUF); + free(sc->sc_range, M_OFWPROP); + return (ENXIO); +} + +static int +ebus_attach(device_t dev, struct ebus_softc *sc, phandle_t node) +{ + struct ebus_devinfo *edi; + device_t cdev; ofw_bus_setup_iinfo(node, &sc->sc_iinfo, sizeof(ofw_isa_intr_t)); @@ -229,20 +367,6 @@ ebus_attach(device_t dev) device_set_ivars(cdev, edi); } return (bus_generic_attach(dev)); - -fail: - for (i = rnum; i >= 0; i--) { - eri = &sc->sc_rinfo[i]; - if (i < rnum) - rman_fini(&eri->eri_rman); - if (eri->eri_res != 0) { - bus_release_resource(dev, eri->eri_rtype, - PCIR_BAR(rnum), eri->eri_res); - } - } - free(sc->sc_rinfo, M_DEVBUF); - free(sc->sc_range, M_OFWPROP); - return (ENXIO); } static int @@ -274,28 +398,26 @@ ebus_alloc_resource(device_t bus, device struct resource_list_entry *rle = NULL; struct resource *res; struct ebus_rinfo *ri; + struct ebus_nexus_ranges *enr; bus_space_tag_t bt; bus_space_handle_t bh; - int passthrough = (device_get_parent(child) != bus); - int isdefault = (start == 0UL && end == ~0UL); - int ridx, rv; + uint64_t cend, cstart, offset; + int i, isdefault, passthrough, ridx, rv; - sc = (struct ebus_softc *)device_get_softc(bus); + isdefault = (start == 0UL && end == ~0UL); + passthrough = (device_get_parent(child) != bus); + sc = device_get_softc(bus); rl = BUS_GET_RESOURCE_LIST(bus, child); - /* - * Map EBus ranges to PCI ranges. This may include changing the - * allocation type. - */ switch (type) { case SYS_RES_MEMORY: KASSERT(!(isdefault && passthrough), - ("ebus_alloc_resource: passthrough of default alloc")); + ("%s: passthrough of default allocation", __func__)); if (!passthrough) { rle = resource_list_find(rl, type, *rid); if (rle == NULL) return (NULL); KASSERT(rle->res == NULL, - ("ebus_alloc_resource: resource entry is busy")); + ("%s: resource entry is busy", __func__)); if (isdefault) { start = rle->start; count = ulmax(count, rle->count); @@ -303,25 +425,53 @@ ebus_alloc_resource(device_t bus, device } } - (void)ofw_isa_range_map(sc->sc_range, sc->sc_nrange, - &start, &end, &ridx); + res = NULL; + if ((sc->sc_flags & EBUS_PCI) != 0) { + /* + * Map EBus ranges to PCI ranges. This may include + * changing the allocation type. + */ + (void)ofw_isa_range_map(sc->sc_range, sc->sc_nrange, + &start, &end, &ridx); + ri = &sc->sc_rinfo[ridx]; + res = rman_reserve_resource(&ri->eri_rman, start, end, + count, flags, child); + if (res == NULL) + return (NULL); + rman_set_rid(res, *rid); + bt = rman_get_bustag(ri->eri_res); + rman_set_bustag(res, bt); + rv = bus_space_subregion(bt, + rman_get_bushandle(ri->eri_res), + rman_get_start(res) - rman_get_start(ri->eri_res), + count, &bh); + if (rv != 0) { + rman_release_resource(res); + return (NULL); + } + rman_set_bushandle(res, bh); + } else { + /* Map EBus ranges to nexus ranges. */ + for (i = 0; i < sc->sc_nrange; i++) { + enr = &((struct ebus_nexus_ranges *) + sc->sc_range)[i]; + cstart = (((uint64_t)enr->child_hi) << 32) | + enr->child_lo; + cend = cstart + enr->size - 1; + if (start >= cstart && end <= cend) { + offset = + (((uint64_t)enr->phys_hi) << 32) | + enr->phys_lo; + start += offset - cstart; + end += offset - cstart; + res = bus_generic_alloc_resource(bus, + child, type, rid, start, end, + count, flags); + break; + } + } - ri = &sc->sc_rinfo[ridx]; - res = rman_reserve_resource(&ri->eri_rman, start, end, count, - flags, child); - if (res == NULL) - return (NULL); - rman_set_rid(res, *rid); - bt = rman_get_bustag(ri->eri_res); - rman_set_bustag(res, bt); - rv = bus_space_subregion(bt, rman_get_bushandle(ri->eri_res), - rman_get_start(res) - rman_get_start(ri->eri_res), count, - &bh); - if (rv != 0) { - rman_release_resource(res); - return (NULL); } - rman_set_bushandle(res, bh); if (!passthrough) rle->res = res; return (res); @@ -336,34 +486,77 @@ static int ebus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { + struct ebus_softc *sc; struct resource_list *rl; struct resource_list_entry *rle; - int passthrough = (device_get_parent(child) != bus); - int rv; + int passthrough, rv; + passthrough = (device_get_parent(child) != bus); rl = BUS_GET_RESOURCE_LIST(bus, child); switch (type) { case SYS_RES_MEMORY: + sc = device_get_softc(bus); + if ((sc->sc_flags & EBUS_PCI) == 0) + return (resource_list_release(rl, bus, child, type, + rid, res)); if ((rv = rman_release_resource(res)) != 0) return (rv); if (!passthrough) { rle = resource_list_find(rl, type, rid); - KASSERT(rle != NULL, ("ebus_release_resource: " - "resource entry not found!")); - KASSERT(rle->res != NULL, ("ebus_alloc_resource: " - "resource entry is not busy")); + KASSERT(rle != NULL, + ("%s: resource entry not found!", __func__)); + KASSERT(rle->res != NULL, + ("%s: resource entry is not busy", __func__)); rle->res = NULL; } break; case SYS_RES_IRQ: return (resource_list_release(rl, bus, child, type, rid, res)); default: - panic("ebus_release_resource: unsupported resource type %d", - type); + panic("%s: unsupported resource type %d", __func__, type); } return (0); } +static int +ebus_setup_intr(device_t dev, device_t child, struct resource *ires, + int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, + void **cookiep) +{ +#ifndef SUN4V + struct ebus_softc *sc; + u_long vec; + + sc = device_get_softc(dev); + if ((sc->sc_flags & EBUS_PCI) == 0) { + /* + * Make sure the vector is fully specified. This isn't + * necessarily the case with the PCI variant. + */ + vec = rman_get_start(ires); + if (INTIGN(vec) != sc->sc_ign) { + device_printf(dev, + "invalid interrupt vector 0x%lx\n", vec); + return (EINVAL); + } + + /* + * As we rely on the interrupt controllers of the + * accompanying PCI-Express bridge ensure at least + * something is registered for this vector. + */ + if (intr_vectors[vec].iv_ic == NULL) { + device_printf(dev, + "invalid interrupt controller for vector 0x%lx\n", + vec); + return (EINVAL); + } + } +#endif + return (bus_generic_setup_intr(dev, child, ires, flags, filt, intr, + arg, cookiep)); +} + static struct resource_list * ebus_get_resource_list(device_t dev, device_t child) { @@ -385,12 +578,13 @@ ebus_get_devinfo(device_t bus, device_t static struct ebus_devinfo * ebus_setup_dinfo(device_t dev, struct ebus_softc *sc, phandle_t node) { + struct isa_regs reg, *regs; + ofw_isa_intr_t intr, *intrs; struct ebus_devinfo *edi; - struct isa_regs *reg; - ofw_isa_intr_t *intrs; - ofw_pci_intr_t rintr; - u_int64_t start; - int nreg, nintr, i; + uint64_t start; + uint32_t rintr; + int i, nintr, nreg, rv; + uint8_t maskbuf[sizeof(reg) + sizeof(intr)]; edi = malloc(sizeof(*edi), M_DEVBUF, M_ZERO | M_WAITOK); if (ofw_bus_gen_setup_devinfo(&edi->edi_obdinfo, node) != 0) { @@ -398,40 +592,51 @@ ebus_setup_dinfo(device_t dev, struct eb return (NULL); } resource_list_init(&edi->edi_rl); - nreg = OF_getprop_alloc(node, "reg", sizeof(*reg), (void **)®); + nreg = OF_getprop_alloc(node, "reg", sizeof(*regs), (void **)®s); if (nreg == -1) { device_printf(dev, "<%s>: incomplete\n", edi->edi_obdinfo.obd_name); - goto fail; + ebus_destroy_dinfo(edi); + return (NULL); } for (i = 0; i < nreg; i++) { - start = ISA_REG_PHYS(reg + i); - resource_list_add(&edi->edi_rl, SYS_RES_MEMORY, i, - start, start + reg[i].size - 1, reg[i].size); + start = ISA_REG_PHYS(regs + i); + (void)resource_list_add(&edi->edi_rl, SYS_RES_MEMORY, i, + start, start + regs[i].size - 1, regs[i].size); } - free(reg, M_OFWPROP); + free(regs, M_OFWPROP); nintr = OF_getprop_alloc(node, "interrupts", sizeof(*intrs), (void **)&intrs); + if (nintr == -1) + return (edi); for (i = 0; i < nintr; i++) { - rintr = ofw_isa_route_intr(dev, node, &sc->sc_iinfo, intrs[i]); - if (rintr == PCI_INVALID_IRQ) { + rv = 0; + if ((sc->sc_flags & EBUS_PCI) != 0) { + rintr = ofw_isa_route_intr(dev, node, &sc->sc_iinfo, + intrs[i]); + } else { + intr = intrs[i]; + rv = ofw_bus_lookup_imap(node, &sc->sc_iinfo, ®, + sizeof(reg), &intr, sizeof(intr), &rintr, + sizeof(rintr), maskbuf); +#ifndef SUN4V + if (rv != 0) + rintr = INTMAP_VEC(sc->sc_ign, rintr); +#endif + } + if ((sc->sc_flags & EBUS_PCI) == 0 ? rv == 0 : + rintr == PCI_INVALID_IRQ) { device_printf(dev, "<%s>: could not map EBus interrupt %d\n", edi->edi_obdinfo.obd_name, intrs[i]); - free(intrs, M_OFWPROP); - goto fail; + continue; } - resource_list_add(&edi->edi_rl, SYS_RES_IRQ, i, - rintr, rintr, 1); + (void)resource_list_add(&edi->edi_rl, SYS_RES_IRQ, i, rintr, + rintr, 1); } free(intrs, M_OFWPROP); - return (edi); - -fail: - ebus_destroy_dinfo(edi); - return (NULL); } static void From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:33:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC7BD1065704; Wed, 13 Jan 2010 20:33:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC5E48FC13; Wed, 13 Jan 2010 20:33:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKX0t5016016; Wed, 13 Jan 2010 20:33:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKX0M8016014; Wed, 13 Jan 2010 20:33:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132033.o0DKX0M8016014@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202233 - stable/7/sys/sparc64/ebus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:33:01 -0000 Author: marius Date: Wed Jan 13 20:33:00 2010 New Revision: 202233 URL: http://svn.freebsd.org/changeset/base/202233 Log: MFC: r200879 - Add support for the JBus to EBus bridges which hang off of nexus(4) and are found in sun4u and sun4v machines based on the Fire ASIC. - Initialize the configuration space of the PCI to EBus variant the same way as OpenSolaris does. Modified: stable/7/sys/sparc64/ebus/ebus.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/ebus/ebus.c ============================================================================== --- stable/7/sys/sparc64/ebus/ebus.c Wed Jan 13 20:32:54 2010 (r202232) +++ stable/7/sys/sparc64/ebus/ebus.c Wed Jan 13 20:33:00 2010 (r202233) @@ -1,6 +1,7 @@ /*- * Copyright (c) 1999, 2000 Matthew R. Green * Copyright (c) 2001 Thomas Moestl + * Copyright (c) 2009 by Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +34,7 @@ __FBSDID("$FreeBSD$"); /* - * UltraSPARC 5 and beyond EBus support + * Driver for JBus to EBus and PCI to EBus bridges */ #include @@ -43,14 +44,17 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include #include #include +#include +#ifndef SUN4V +#include +#endif +#include #include #include @@ -60,11 +64,19 @@ __FBSDID("$FreeBSD$"); #include /* - * The register, ranges and interrupt map properties are identical to the ISA - * ones. + * The register, interrupt map and for the PCI variant also the ranges + * properties are identical to the ISA ones. */ #include +struct ebus_nexus_ranges { + uint32_t child_hi; + uint32_t child_lo; + uint32_t phys_hi; + uint32_t phys_lo; + uint32_t size; +}; + struct ebus_devinfo { struct ofw_bus_devinfo edi_obdinfo; struct resource_list edi_rl; @@ -77,32 +89,45 @@ struct ebus_rinfo { }; struct ebus_softc { - struct isa_ranges *sc_range; + void *sc_range; struct ebus_rinfo *sc_rinfo; + u_int sc_flags; +#define EBUS_PCI (1 << 0) + int sc_nrange; struct ofw_bus_iinfo sc_iinfo; + +#ifndef SUN4V + uint32_t sc_ign; +#endif }; -static device_probe_t ebus_probe; -static device_attach_t ebus_attach; +static device_probe_t ebus_nexus_probe; +static device_attach_t ebus_nexus_attach; +static device_probe_t ebus_pci_probe; +static device_attach_t ebus_pci_attach; static bus_print_child_t ebus_print_child; static bus_probe_nomatch_t ebus_probe_nomatch; static bus_alloc_resource_t ebus_alloc_resource; static bus_release_resource_t ebus_release_resource; +static bus_setup_intr_t ebus_setup_intr; static bus_get_resource_list_t ebus_get_resource_list; static ofw_bus_get_devinfo_t ebus_get_devinfo; -static struct ebus_devinfo *ebus_setup_dinfo(device_t, struct ebus_softc *, - phandle_t); -static void ebus_destroy_dinfo(struct ebus_devinfo *); -static int ebus_print_res(struct ebus_devinfo *); +static int ebus_attach(device_t dev, struct ebus_softc *sc, phandle_t node); +static struct ebus_devinfo *ebus_setup_dinfo(device_t dev, + struct ebus_softc *sc, phandle_t node); +static void ebus_destroy_dinfo(struct ebus_devinfo *edi); +static int ebus_print_res(struct ebus_devinfo *edi); + +static devclass_t ebus_devclass; -static device_method_t ebus_methods[] = { +static device_method_t ebus_nexus_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, ebus_probe), - DEVMETHOD(device_attach, ebus_attach), + DEVMETHOD(device_probe, ebus_nexus_probe), + DEVMETHOD(device_attach, ebus_nexus_attach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), @@ -114,7 +139,7 @@ static device_method_t ebus_methods[] = DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_release_resource, ebus_release_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_setup_intr, ebus_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_get_resource_list, ebus_get_resource_list), @@ -130,20 +155,79 @@ static device_method_t ebus_methods[] = KOBJMETHOD_END }; -static driver_t ebus_driver = { +static driver_t ebus_nexus_driver = { "ebus", - ebus_methods, + ebus_nexus_methods, sizeof(struct ebus_softc), }; -static devclass_t ebus_devclass; +/* + * XXX: we rely on the interrupt controllers of the accompanying PCI-Express + * bridge to be registered as the nexus variant of the EBus bridges doesn't + * employ its own one. However, without multipass probing we have no way to + * specify that fact and thus have to rely on the OFW device tree provding an + * appropriate order. + */ +DRIVER_MODULE(ebus, nexus, ebus_nexus_driver, ebus_devclass, 0, 0); +MODULE_DEPEND(ebus, nexus, 1, 1, 1); + +static device_method_t ebus_pci_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ebus_pci_probe), + DEVMETHOD(device_attach, ebus_pci_attach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus interface */ + DEVMETHOD(bus_print_child, ebus_print_child), + DEVMETHOD(bus_probe_nomatch, ebus_probe_nomatch), + DEVMETHOD(bus_alloc_resource, ebus_alloc_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_release_resource, ebus_release_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_get_resource_list, ebus_get_resource_list), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, ebus_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), -DRIVER_MODULE(ebus, pci, ebus_driver, ebus_devclass, 0, 0); + KOBJMETHOD_END +}; + +static driver_t ebus_pci_driver = { + "ebus", + ebus_pci_methods, + sizeof(struct ebus_softc), +}; + +DRIVER_MODULE(ebus, pci, ebus_pci_driver, ebus_devclass, 0, 0); MODULE_DEPEND(ebus, pci, 1, 1, 1); MODULE_VERSION(ebus, 1); static int -ebus_probe(device_t dev) +ebus_nexus_probe(device_t dev) +{ + const char* compat; + + compat = ofw_bus_get_compat(dev); + if (compat != NULL && strcmp(ofw_bus_get_name(dev), "ebus") == 0 && + strcmp(compat, "jbus-ebus") == 0) { + device_set_desc(dev, "JBus-EBus bridge"); + return (BUS_PROBE_GENERIC); + } + return (ENXIO); +} + +static int +ebus_pci_probe(device_t dev) { if (pci_get_class(dev) != PCIC_BRIDGE || @@ -157,27 +241,58 @@ ebus_probe(device_t dev) device_set_desc(dev, "PCI-EBus3 bridge"); else return (ENXIO); - return (0); + return (BUS_PROBE_GENERIC); } static int -ebus_attach(device_t dev) +ebus_nexus_attach(device_t dev) +{ + struct ebus_softc *sc; + phandle_t node; + + sc = device_get_softc(dev); + node = ofw_bus_get_node(dev); + +#ifndef SUN4V + if (OF_getprop(node, "portid", &sc->sc_ign, + sizeof(sc->sc_ign)) == -1) { + device_printf(dev, "could not determine IGN"); + return (ENXIO); + } +#endif + + sc->sc_nrange = OF_getprop_alloc(node, "ranges", + sizeof(struct ebus_nexus_ranges), &sc->sc_range); + if (sc->sc_nrange == -1) { + printf("%s: could not get ranges property\n", __func__); + return (ENXIO); + } + return (ebus_attach(dev, sc, node)); +} + +static int +ebus_pci_attach(device_t dev) { struct ebus_softc *sc; - struct ebus_devinfo *edi; struct ebus_rinfo *eri; struct resource *res; - device_t cdev; phandle_t node; int i, rnum, rid; sc = device_get_softc(dev); + sc->sc_flags |= EBUS_PCI; + + pci_write_config(dev, PCIR_COMMAND, + pci_read_config(dev, PCIR_COMMAND, 2) | PCIM_CMD_SERRESPEN | + PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN, 2); + pci_write_config(dev, PCIR_CACHELNSZ, 16 /* 64 bytes */, 1); + pci_write_config(dev, PCIR_LATTIMER, 64 /* 64 PCI cycles */, 1); node = ofw_bus_get_node(dev); sc->sc_nrange = OF_getprop_alloc(node, "ranges", - sizeof(*sc->sc_range), (void **)&sc->sc_range); + sizeof(struct isa_ranges), &sc->sc_range); if (sc->sc_nrange == -1) { - printf("ebus_attach: could not get ranges property\n"); + printf("%s: could not get ranges property\n", __func__); return (ENXIO); } @@ -187,29 +302,52 @@ ebus_attach(device_t dev) /* For every range, there must be a matching resource. */ for (rnum = 0; rnum < sc->sc_nrange; rnum++) { eri = &sc->sc_rinfo[rnum]; - eri->eri_rtype = ofw_isa_range_restype(&sc->sc_range[rnum]); + eri->eri_rtype = ofw_isa_range_restype( + &((struct isa_ranges *)sc->sc_range)[rnum]); rid = PCIR_BAR(rnum); res = bus_alloc_resource_any(dev, eri->eri_rtype, &rid, RF_ACTIVE); if (res == NULL) { - printf("ebus_attach: failed to allocate range " - "resource!\n"); + printf("%s: failed to allocate range resource!\n", + __func__); goto fail; } eri->eri_res = res; eri->eri_rman.rm_type = RMAN_ARRAY; eri->eri_rman.rm_descr = "EBus range"; if (rman_init(&eri->eri_rman) != 0) { - printf("ebus_attach: failed to initialize rman!"); + printf("%s: failed to initialize rman!", __func__); goto fail; } if (rman_manage_region(&eri->eri_rman, rman_get_start(res), rman_get_end(res)) != 0) { - printf("ebus_attach: failed to register region!"); + printf("%s: failed to register region!", __func__); rman_fini(&eri->eri_rman); goto fail; } } + return (ebus_attach(dev, sc, node)); + + fail: + for (i = rnum; i >= 0; i--) { + eri = &sc->sc_rinfo[i]; + if (i < rnum) + rman_fini(&eri->eri_rman); + if (eri->eri_res != 0) { + bus_release_resource(dev, eri->eri_rtype, + PCIR_BAR(rnum), eri->eri_res); + } + } + free(sc->sc_rinfo, M_DEVBUF); + free(sc->sc_range, M_OFWPROP); + return (ENXIO); +} + +static int +ebus_attach(device_t dev, struct ebus_softc *sc, phandle_t node) +{ + struct ebus_devinfo *edi; + device_t cdev; ofw_bus_setup_iinfo(node, &sc->sc_iinfo, sizeof(ofw_isa_intr_t)); @@ -228,20 +366,6 @@ ebus_attach(device_t dev) device_set_ivars(cdev, edi); } return (bus_generic_attach(dev)); - -fail: - for (i = rnum; i >= 0; i--) { - eri = &sc->sc_rinfo[i]; - if (i < rnum) - rman_fini(&eri->eri_rman); - if (eri->eri_res != 0) { - bus_release_resource(dev, eri->eri_rtype, - PCIR_BAR(rnum), eri->eri_res); - } - } - free(sc->sc_rinfo, M_DEVBUF); - free(sc->sc_range, M_OFWPROP); - return (ENXIO); } static int @@ -273,28 +397,26 @@ ebus_alloc_resource(device_t bus, device struct resource_list_entry *rle = NULL; struct resource *res; struct ebus_rinfo *ri; + struct ebus_nexus_ranges *enr; bus_space_tag_t bt; bus_space_handle_t bh; - int passthrough = (device_get_parent(child) != bus); - int isdefault = (start == 0UL && end == ~0UL); - int ridx, rv; + uint64_t cend, cstart, offset; + int i, isdefault, passthrough, ridx, rv; - sc = (struct ebus_softc *)device_get_softc(bus); + isdefault = (start == 0UL && end == ~0UL); + passthrough = (device_get_parent(child) != bus); + sc = device_get_softc(bus); rl = BUS_GET_RESOURCE_LIST(bus, child); - /* - * Map EBus ranges to PCI ranges. This may include changing the - * allocation type. - */ switch (type) { case SYS_RES_MEMORY: KASSERT(!(isdefault && passthrough), - ("ebus_alloc_resource: passthrough of default alloc")); + ("%s: passthrough of default allocation", __func__)); if (!passthrough) { rle = resource_list_find(rl, type, *rid); if (rle == NULL) return (NULL); KASSERT(rle->res == NULL, - ("ebus_alloc_resource: resource entry is busy")); + ("%s: resource entry is busy", __func__)); if (isdefault) { start = rle->start; count = ulmax(count, rle->count); @@ -302,25 +424,53 @@ ebus_alloc_resource(device_t bus, device } } - (void)ofw_isa_range_map(sc->sc_range, sc->sc_nrange, - &start, &end, &ridx); + res = NULL; + if ((sc->sc_flags & EBUS_PCI) != 0) { + /* + * Map EBus ranges to PCI ranges. This may include + * changing the allocation type. + */ + (void)ofw_isa_range_map(sc->sc_range, sc->sc_nrange, + &start, &end, &ridx); + ri = &sc->sc_rinfo[ridx]; + res = rman_reserve_resource(&ri->eri_rman, start, end, + count, flags, child); + if (res == NULL) + return (NULL); + rman_set_rid(res, *rid); + bt = rman_get_bustag(ri->eri_res); + rman_set_bustag(res, bt); + rv = bus_space_subregion(bt, + rman_get_bushandle(ri->eri_res), + rman_get_start(res) - rman_get_start(ri->eri_res), + count, &bh); + if (rv != 0) { + rman_release_resource(res); + return (NULL); + } + rman_set_bushandle(res, bh); + } else { + /* Map EBus ranges to nexus ranges. */ + for (i = 0; i < sc->sc_nrange; i++) { + enr = &((struct ebus_nexus_ranges *) + sc->sc_range)[i]; + cstart = (((uint64_t)enr->child_hi) << 32) | + enr->child_lo; + cend = cstart + enr->size - 1; + if (start >= cstart && end <= cend) { + offset = + (((uint64_t)enr->phys_hi) << 32) | + enr->phys_lo; + start += offset - cstart; + end += offset - cstart; + res = bus_generic_alloc_resource(bus, + child, type, rid, start, end, + count, flags); + break; + } + } - ri = &sc->sc_rinfo[ridx]; - res = rman_reserve_resource(&ri->eri_rman, start, end, count, - flags, child); - if (res == NULL) - return (NULL); - rman_set_rid(res, *rid); - bt = rman_get_bustag(ri->eri_res); - rman_set_bustag(res, bt); - rv = bus_space_subregion(bt, rman_get_bushandle(ri->eri_res), - rman_get_start(res) - rman_get_start(ri->eri_res), count, - &bh); - if (rv != 0) { - rman_release_resource(res); - return (NULL); } - rman_set_bushandle(res, bh); if (!passthrough) rle->res = res; return (res); @@ -335,34 +485,77 @@ static int ebus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { + struct ebus_softc *sc; struct resource_list *rl; struct resource_list_entry *rle; - int passthrough = (device_get_parent(child) != bus); - int rv; + int passthrough, rv; + passthrough = (device_get_parent(child) != bus); rl = BUS_GET_RESOURCE_LIST(bus, child); switch (type) { case SYS_RES_MEMORY: + sc = device_get_softc(bus); + if ((sc->sc_flags & EBUS_PCI) == 0) + return (resource_list_release(rl, bus, child, type, + rid, res)); if ((rv = rman_release_resource(res)) != 0) return (rv); if (!passthrough) { rle = resource_list_find(rl, type, rid); - KASSERT(rle != NULL, ("ebus_release_resource: " - "resource entry not found!")); - KASSERT(rle->res != NULL, ("ebus_alloc_resource: " - "resource entry is not busy")); + KASSERT(rle != NULL, + ("%s: resource entry not found!", __func__)); + KASSERT(rle->res != NULL, + ("%s: resource entry is not busy", __func__)); rle->res = NULL; } break; case SYS_RES_IRQ: return (resource_list_release(rl, bus, child, type, rid, res)); default: - panic("ebus_release_resource: unsupported resource type %d", - type); + panic("%s: unsupported resource type %d", __func__, type); } return (0); } +static int +ebus_setup_intr(device_t dev, device_t child, struct resource *ires, + int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, + void **cookiep) +{ +#ifndef SUN4V + struct ebus_softc *sc; + u_long vec; + + sc = device_get_softc(dev); + if ((sc->sc_flags & EBUS_PCI) == 0) { + /* + * Make sure the vector is fully specified. This isn't + * necessarily the case with the PCI variant. + */ + vec = rman_get_start(ires); + if (INTIGN(vec) != sc->sc_ign) { + device_printf(dev, + "invalid interrupt vector 0x%lx\n", vec); + return (EINVAL); + } + + /* + * As we rely on the interrupt controllers of the + * accompanying PCI-Express bridge ensure at least + * something is registered for this vector. + */ + if (intr_vectors[vec].iv_ic == NULL) { + device_printf(dev, + "invalid interrupt controller for vector 0x%lx\n", + vec); + return (EINVAL); + } + } +#endif + return (bus_generic_setup_intr(dev, child, ires, flags, filt, intr, + arg, cookiep)); +} + static struct resource_list * ebus_get_resource_list(device_t dev, device_t child) { @@ -384,12 +577,13 @@ ebus_get_devinfo(device_t bus, device_t static struct ebus_devinfo * ebus_setup_dinfo(device_t dev, struct ebus_softc *sc, phandle_t node) { + struct isa_regs reg, *regs; + ofw_isa_intr_t intr, *intrs; struct ebus_devinfo *edi; - struct isa_regs *reg; - ofw_isa_intr_t *intrs; - ofw_pci_intr_t rintr; - u_int64_t start; - int nreg, nintr, i; + uint64_t start; + uint32_t rintr; + int i, nintr, nreg, rv; + uint8_t maskbuf[sizeof(reg) + sizeof(intr)]; edi = malloc(sizeof(*edi), M_DEVBUF, M_ZERO | M_WAITOK); if (ofw_bus_gen_setup_devinfo(&edi->edi_obdinfo, node) != 0) { @@ -397,40 +591,51 @@ ebus_setup_dinfo(device_t dev, struct eb return (NULL); } resource_list_init(&edi->edi_rl); - nreg = OF_getprop_alloc(node, "reg", sizeof(*reg), (void **)®); + nreg = OF_getprop_alloc(node, "reg", sizeof(*regs), (void **)®s); if (nreg == -1) { device_printf(dev, "<%s>: incomplete\n", edi->edi_obdinfo.obd_name); - goto fail; + ebus_destroy_dinfo(edi); + return (NULL); } for (i = 0; i < nreg; i++) { - start = ISA_REG_PHYS(reg + i); - resource_list_add(&edi->edi_rl, SYS_RES_MEMORY, i, - start, start + reg[i].size - 1, reg[i].size); + start = ISA_REG_PHYS(regs + i); + (void)resource_list_add(&edi->edi_rl, SYS_RES_MEMORY, i, + start, start + regs[i].size - 1, regs[i].size); } - free(reg, M_OFWPROP); + free(regs, M_OFWPROP); nintr = OF_getprop_alloc(node, "interrupts", sizeof(*intrs), (void **)&intrs); + if (nintr == -1) + return (edi); for (i = 0; i < nintr; i++) { - rintr = ofw_isa_route_intr(dev, node, &sc->sc_iinfo, intrs[i]); - if (rintr == PCI_INVALID_IRQ) { + rv = 0; + if ((sc->sc_flags & EBUS_PCI) != 0) { + rintr = ofw_isa_route_intr(dev, node, &sc->sc_iinfo, + intrs[i]); + } else { + intr = intrs[i]; + rv = ofw_bus_lookup_imap(node, &sc->sc_iinfo, ®, + sizeof(reg), &intr, sizeof(intr), &rintr, + sizeof(rintr), maskbuf); +#ifndef SUN4V + if (rv != 0) + rintr = INTMAP_VEC(sc->sc_ign, rintr); +#endif + } + if ((sc->sc_flags & EBUS_PCI) == 0 ? rv == 0 : + rintr == PCI_INVALID_IRQ) { device_printf(dev, "<%s>: could not map EBus interrupt %d\n", edi->edi_obdinfo.obd_name, intrs[i]); - free(intrs, M_OFWPROP); - goto fail; + continue; } - resource_list_add(&edi->edi_rl, SYS_RES_IRQ, i, - rintr, rintr, 1); + (void)resource_list_add(&edi->edi_rl, SYS_RES_IRQ, i, rintr, + rintr, 1); } free(intrs, M_OFWPROP); - return (edi); - -fail: - ebus_destroy_dinfo(edi); - return (NULL); } static void From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:35:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13BAB106566B; Wed, 13 Jan 2010 20:35:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 024BD8FC12; Wed, 13 Jan 2010 20:35:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKZRFm016626; Wed, 13 Jan 2010 20:35:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKZRYc016624; Wed, 13 Jan 2010 20:35:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132035.o0DKZRYc016624@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202234 - stable/8/sys/sparc64/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:35:28 -0000 Author: marius Date: Wed Jan 13 20:35:27 2010 New Revision: 202234 URL: http://svn.freebsd.org/changeset/base/202234 Log: MFC: r200880 - Correct an off-by-one error when calculating the end of a child range. - Spell the PCI TLA in uppercase. Modified: stable/8/sys/sparc64/isa/ofw_isa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/isa/ofw_isa.c ============================================================================== --- stable/8/sys/sparc64/isa/ofw_isa.c Wed Jan 13 20:33:00 2010 (r202233) +++ stable/8/sys/sparc64/isa/ofw_isa.c Wed Jan 13 20:35:27 2010 (r202234) @@ -79,11 +79,11 @@ ofw_isa_range_map(struct isa_ranges *ran for (i = 0; i < nrange; i++) { r = &range[i]; cstart = ISA_RANGE_CHILD(r); - cend = cstart + r->size; + cend = cstart + r->size - 1; if (*start < cstart || *start > cend) continue; if (*end < cstart || *end > cend) { - panic("ofw_isa_map_iorange: iorange crosses pci " + panic("ofw_isa_map_iorange: iorange crosses PCI " "ranges (%#lx not in %#lx - %#lx)", *end, cstart, cend); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:35:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA03010657AE; Wed, 13 Jan 2010 20:35:37 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8C258FC15; Wed, 13 Jan 2010 20:35:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKZbtH016696; Wed, 13 Jan 2010 20:35:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKZbSf016694; Wed, 13 Jan 2010 20:35:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132035.o0DKZbSf016694@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202235 - stable/7/sys/sparc64/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:35:37 -0000 Author: marius Date: Wed Jan 13 20:35:37 2010 New Revision: 202235 URL: http://svn.freebsd.org/changeset/base/202235 Log: MFC: r200880 - Correct an off-by-one error when calculating the end of a child range. - Spell the PCI TLA in uppercase. Modified: stable/7/sys/sparc64/isa/ofw_isa.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/isa/ofw_isa.c ============================================================================== --- stable/7/sys/sparc64/isa/ofw_isa.c Wed Jan 13 20:35:27 2010 (r202234) +++ stable/7/sys/sparc64/isa/ofw_isa.c Wed Jan 13 20:35:37 2010 (r202235) @@ -79,11 +79,11 @@ ofw_isa_range_map(struct isa_ranges *ran for (i = 0; i < nrange; i++) { r = &range[i]; cstart = ISA_RANGE_CHILD(r); - cend = cstart + r->size; + cend = cstart + r->size - 1; if (*start < cstart || *start > cend) continue; if (*end < cstart || *end > cend) { - panic("ofw_isa_map_iorange: iorange crosses pci " + panic("ofw_isa_map_iorange: iorange crosses PCI " "ranges (%#lx not in %#lx - %#lx)", *end, cstart, cend); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:35:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E028106584B; Wed, 13 Jan 2010 20:35:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B7658FC18; Wed, 13 Jan 2010 20:35:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKZhxx016766; Wed, 13 Jan 2010 20:35:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKZhfb016764; Wed, 13 Jan 2010 20:35:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132035.o0DKZhfb016764@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202236 - stable/6/sys/sparc64/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:35:43 -0000 Author: marius Date: Wed Jan 13 20:35:43 2010 New Revision: 202236 URL: http://svn.freebsd.org/changeset/base/202236 Log: MFC: r200880 - Correct an off-by-one error when calculating the end of a child range. - Spell the PCI TLA in uppercase. Modified: stable/6/sys/sparc64/isa/ofw_isa.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/sparc64/isa/ofw_isa.c ============================================================================== --- stable/6/sys/sparc64/isa/ofw_isa.c Wed Jan 13 20:35:37 2010 (r202235) +++ stable/6/sys/sparc64/isa/ofw_isa.c Wed Jan 13 20:35:43 2010 (r202236) @@ -79,11 +79,11 @@ ofw_isa_range_map(struct isa_ranges *ran for (i = 0; i < nrange; i++) { r = &range[i]; cstart = ISA_RANGE_CHILD(r); - cend = cstart + r->size; + cend = cstart + r->size - 1; if (*start < cstart || *start > cend) continue; if (*end < cstart || *end > cend) { - panic("ofw_isa_map_iorange: iorange crosses pci " + panic("ofw_isa_map_iorange: iorange crosses PCI " "ranges (%#lx not in %#lx - %#lx)", *end, cstart, cend); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:36:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15D74106568F for ; Wed, 13 Jan 2010 20:36:26 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id B08138FC1E for ; Wed, 13 Jan 2010 20:36:25 +0000 (UTC) Received: (qmail 15519 invoked by uid 399); 13 Jan 2010 20:36:24 -0000 Received: from localhost (HELO ?192.168.0.110?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 13 Jan 2010 20:36:24 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B4E2ECA.90905@FreeBSD.org> Date: Wed, 13 Jan 2010 12:36:26 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: John Baldwin References: <20100112.174326.337739863389869251.imp@bsdimp.com> <4B4E1586.7090102@FreeBSD.org> <201001131515.08602.jhb@freebsd.org> In-Reply-To: <201001131515.08602.jhb@freebsd.org> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "M. Warner Losh" , freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:36:26 -0000 On 1/13/2010 12:15 PM, John Baldwin wrote: > On Wednesday 13 January 2010 1:48:38 pm Doug Barton wrote: >> To address the other responses, Tom, sorry, your suggested text doesn't >> address my concern. John, I don't think that users would somehow >> magically know to look in NOTES for more information about an option >> that is already in GENERIC. > > You really think users do not already know to look in manpages or NOTES to > find out more details about kernel options? That's not what I said. > Put > another way, what makes 'INCLUDE_CONFIG_FILE' sufficiently special that it > deserves special treatment relative to other kernel options? Because the default behavior (not including the actual file) for the option is contrary to user' reasonable expectation of how the option should work .... and now I'm repeating myself. Seriously, don't you have anything better to do than argue against including a comment in a config file? I know I do. What is the overwhelming horror that will arise here if there are more comments GENERIC than you deem to be absolutely necessary? And yes, I read the part of your message that I snipped about "why do we have these documents if users don't read them?" The answer is, that's why I'm suggesting a comment that tells users what man page to read. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:40:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D7F8106568D; Wed, 13 Jan 2010 20:40:49 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B9CC8FC08; Wed, 13 Jan 2010 20:40:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKenNS018010; Wed, 13 Jan 2010 20:40:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKenF4018008; Wed, 13 Jan 2010 20:40:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132040.o0DKenF4018008@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202237 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:40:49 -0000 Author: marius Date: Wed Jan 13 20:40:49 2010 New Revision: 202237 URL: http://svn.freebsd.org/changeset/base/202237 Log: MFC: r200914 Don't use an out register to hold the vector number across the call of the interrupt handler in intr_fast() as the handler might clobber it (no in-tree handler currently does but an upcoming one will). While at it, tidy the register usage in the interrupt counting code. Modified: stable/8/sys/sparc64/sparc64/interrupt.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/interrupt.S ============================================================================== --- stable/8/sys/sparc64/sparc64/interrupt.S Wed Jan 13 20:35:43 2010 (r202236) +++ stable/8/sys/sparc64/sparc64/interrupt.S Wed Jan 13 20:40:49 2010 (r202237) @@ -176,7 +176,7 @@ ENTRY(intr_fast) 3: ldx [%l0 + IR_FUNC], %o0 ldx [%l0 + IR_ARG], %o1 - lduw [%l0 + IR_VEC], %o2 + lduw [%l0 + IR_VEC], %l2 ldx [PCPU(IRFREE)], %l1 stx %l1, [%l0 + IR_NEXT] @@ -188,17 +188,17 @@ ENTRY(intr_fast) call %o0 mov %o1, %o0 - /* intrcnt[intr_countp[%o2]]++ */ - SET(intrcnt, %l7, %l2) /* %l2 = intrcnt */ - prefetcha [%l2] ASI_N, 1 - SET(intr_countp, %l7, %l3) /* %l3 = intr_countp */ - sllx %o2, 1, %l4 /* %l4 = vec << 1 */ - lduh [%l4 + %l3], %l5 /* %l5 = intr_countp[%o2] */ - sllx %l5, 3, %l6 /* %l6 = intr_countp[%o2] << 3 */ - add %l6, %l2, %l7 /* %l7 = intrcnt[intr_countp[%o2]] */ - ldx [%l7], %l2 + /* intrcnt[intr_countp[%l2]]++ */ + SET(intrcnt, %l7, %l3) /* %l3 = intrcnt */ + prefetcha [%l3] ASI_N, 1 + SET(intr_countp, %l7, %l4) /* %l4 = intr_countp */ + sllx %l2, 1, %l2 /* %l2 = vec << 1 */ + lduh [%l4 + %l2], %l4 /* %l4 = intr_countp[%l2] */ + sllx %l4, 3, %l4 /* %l4 = intr_countp[%l2] << 3 */ + add %l4, %l3, %l4 /* %l4 = intrcnt[intr_countp[%l2]] */ + ldx [%l4], %l2 inc %l2 - stx %l2, [%l7] + stx %l2, [%l4] ba,a %xcc, 1b nop From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:40:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0341E106568B; Wed, 13 Jan 2010 20:40:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC74B8FC0A; Wed, 13 Jan 2010 20:40:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKepNv018045; Wed, 13 Jan 2010 20:40:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKepS9018043; Wed, 13 Jan 2010 20:40:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132040.o0DKepS9018043@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202238 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:40:52 -0000 Author: marius Date: Wed Jan 13 20:40:51 2010 New Revision: 202238 URL: http://svn.freebsd.org/changeset/base/202238 Log: MFC: r200914 Don't use an out register to hold the vector number across the call of the interrupt handler in intr_fast() as the handler might clobber it (no in-tree handler currently does but an upcoming one will). While at it, tidy the register usage in the interrupt counting code. Modified: stable/7/sys/sparc64/sparc64/interrupt.S Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/interrupt.S ============================================================================== --- stable/7/sys/sparc64/sparc64/interrupt.S Wed Jan 13 20:40:49 2010 (r202237) +++ stable/7/sys/sparc64/sparc64/interrupt.S Wed Jan 13 20:40:51 2010 (r202238) @@ -176,7 +176,7 @@ ENTRY(intr_fast) 3: ldx [%l0 + IR_FUNC], %o0 ldx [%l0 + IR_ARG], %o1 - lduw [%l0 + IR_VEC], %o2 + lduw [%l0 + IR_VEC], %l2 ldx [PCPU(IRFREE)], %l1 stx %l1, [%l0 + IR_NEXT] @@ -188,17 +188,17 @@ ENTRY(intr_fast) call %o0 mov %o1, %o0 - /* intrcnt[intr_countp[%o2]]++ */ - SET(intrcnt, %l7, %l2) /* %l2 = intrcnt */ - prefetcha [%l2] ASI_N, 1 - SET(intr_countp, %l7, %l3) /* %l3 = intr_countp */ - sllx %o2, 1, %l4 /* %l4 = vec << 1 */ - lduh [%l4 + %l3], %l5 /* %l5 = intr_countp[%o2] */ - sllx %l5, 3, %l6 /* %l6 = intr_countp[%o2] << 3 */ - add %l6, %l2, %l7 /* %l7 = intrcnt[intr_countp[%o2]] */ - ldx [%l7], %l2 + /* intrcnt[intr_countp[%l2]]++ */ + SET(intrcnt, %l7, %l3) /* %l3 = intrcnt */ + prefetcha [%l3] ASI_N, 1 + SET(intr_countp, %l7, %l4) /* %l4 = intr_countp */ + sllx %l2, 1, %l2 /* %l2 = vec << 1 */ + lduh [%l4 + %l2], %l4 /* %l4 = intr_countp[%l2] */ + sllx %l4, 3, %l4 /* %l4 = intr_countp[%l2] << 3 */ + add %l4, %l3, %l4 /* %l4 = intrcnt[intr_countp[%l2]] */ + ldx [%l4], %l2 inc %l2 - stx %l2, [%l7] + stx %l2, [%l4] ba,a %xcc, 1b nop From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:41:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 311341065670; Wed, 13 Jan 2010 20:41:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F6138FC1C; Wed, 13 Jan 2010 20:41:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKfSfH018216; Wed, 13 Jan 2010 20:41:28 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKfSx7018214; Wed, 13 Jan 2010 20:41:28 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132041.o0DKfSx7018214@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202239 - stable/6/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:41:28 -0000 Author: marius Date: Wed Jan 13 20:41:27 2010 New Revision: 202239 URL: http://svn.freebsd.org/changeset/base/202239 Log: MFC: r200914 Don't use an out register to hold the vector number across the call of the interrupt handler in intr_fast() as the handler might clobber it (no in-tree handler currently does but an upcoming one will). While at it, tidy the register usage in the interrupt counting code. Modified: stable/6/sys/sparc64/sparc64/interrupt.S Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/sparc64/sparc64/interrupt.S ============================================================================== --- stable/6/sys/sparc64/sparc64/interrupt.S Wed Jan 13 20:40:51 2010 (r202238) +++ stable/6/sys/sparc64/sparc64/interrupt.S Wed Jan 13 20:41:27 2010 (r202239) @@ -175,7 +175,7 @@ ENTRY(intr_fast) 3: ldx [%l0 + IR_FUNC], %o0 ldx [%l0 + IR_ARG], %o1 - lduw [%l0 + IR_VEC], %o2 + lduw [%l0 + IR_VEC], %l2 ldx [PCPU(IRFREE)], %l1 stx %l1, [%l0 + IR_NEXT] @@ -187,17 +187,17 @@ ENTRY(intr_fast) call %o0 mov %o1, %o0 - /* intrcnt[intr_countp[%o2]]++ */ - SET(intrcnt, %l7, %l2) /* %l2 = intrcnt */ - prefetcha [%l2] ASI_N, 1 - SET(intr_countp, %l7, %l3) /* %l3 = intr_countp */ - sllx %o2, 1, %l4 /* %l4 = vec << 1 */ - lduh [%l4 + %l3], %l5 /* %l5 = intr_countp[%o2] */ - sllx %l5, 3, %l6 /* %l6 = intr_countp[%o2] << 3 */ - add %l6, %l2, %l7 /* %l7 = intrcnt[intr_countp[%o2]] */ - ldx [%l7], %l2 + /* intrcnt[intr_countp[%l2]]++ */ + SET(intrcnt, %l7, %l3) /* %l3 = intrcnt */ + prefetcha [%l3] ASI_N, 1 + SET(intr_countp, %l7, %l4) /* %l4 = intr_countp */ + sllx %l2, 1, %l2 /* %l2 = vec << 1 */ + lduh [%l4 + %l2], %l4 /* %l4 = intr_countp[%l2] */ + sllx %l4, 3, %l4 /* %l4 = intr_countp[%l2] << 3 */ + add %l4, %l3, %l4 /* %l4 = intrcnt[intr_countp[%l2]] */ + ldx [%l4], %l2 inc %l2 - stx %l2, [%l7] + stx %l2, [%l4] ba,a %xcc, 1b nop From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:48:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EF901065676; Wed, 13 Jan 2010 20:48:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFFB98FC18; Wed, 13 Jan 2010 20:48:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKmgAT019920; Wed, 13 Jan 2010 20:48:42 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKmg1a019912; Wed, 13 Jan 2010 20:48:42 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132048.o0DKmg1a019912@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202240 - in stable/6/sys: dev/auxio sparc64/central sparc64/fhc sparc64/pci sparc64/sbus sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:48:43 -0000 Author: marius Date: Wed Jan 13 20:48:42 2010 New Revision: 202240 URL: http://svn.freebsd.org/changeset/base/202240 Log: MFC: r200815, r200816 Provide and consume missing module dependency information. Modified: stable/6/sys/dev/auxio/auxio.c stable/6/sys/sparc64/central/central.c stable/6/sys/sparc64/fhc/fhc_nexus.c stable/6/sys/sparc64/pci/apb.c stable/6/sys/sparc64/pci/ofw_pcib.c stable/6/sys/sparc64/sbus/sbus.c stable/6/sys/sparc64/sparc64/nexus.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/auxio/auxio.c ============================================================================== --- stable/6/sys/dev/auxio/auxio.c Wed Jan 13 20:41:27 2010 (r202239) +++ stable/6/sys/dev/auxio/auxio.c Wed Jan 13 20:48:42 2010 (r202240) @@ -56,7 +56,7 @@ */ /* - * AUXIO registers support on the sbus & ebus2, used for the floppy driver + * AUXIO registers support on the SBus & EBus2, used for the floppy driver * and to control the system LED, for the BLINK option. */ @@ -85,8 +85,8 @@ __FBSDID("$FreeBSD$"); #include /* - * on sun4u, auxio exists with one register (LED) on the sbus, and 5 - * registers on the ebus2 (pci) (LED, PCIMODE, FREQUENCY, SCSI + * On sun4u, auxio exists with one register (LED) on the SBus, and 5 + * registers on the EBus2 (pci) (LED, PCIMODE, FREQUENCY, SCSI * OSCILLATOR, and TEMP SENSE. */ @@ -142,6 +142,7 @@ static driver_t auxio_sbus_driver = { static devclass_t auxio_devclass; DRIVER_MODULE(auxio, sbus, auxio_sbus_driver, auxio_devclass, 0, 0); +MODULE_DEPEND(auxio, sbus, 1, 1, 1); /* EBus */ static device_method_t auxio_ebus_methods[] = { @@ -158,6 +159,7 @@ static driver_t auxio_ebus_driver = { }; DRIVER_MODULE(auxio, ebus, auxio_ebus_driver, auxio_devclass, 0, 0); +MODULE_DEPEND(auxio, ebus, 1, 1, 1); MODULE_VERSION(auxio, 1); #define AUXIO_LOCK_INIT(sc) \ Modified: stable/6/sys/sparc64/central/central.c ============================================================================== --- stable/6/sys/sparc64/central/central.c Wed Jan 13 20:41:27 2010 (r202239) +++ stable/6/sys/sparc64/central/central.c Wed Jan 13 20:48:42 2010 (r202240) @@ -112,6 +112,7 @@ static driver_t central_driver = { static devclass_t central_devclass; DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0); +MODULE_DEPEND(fhc, nexus, 1, 1, 1); MODULE_VERSION(central, 1); static int Modified: stable/6/sys/sparc64/fhc/fhc_nexus.c ============================================================================== --- stable/6/sys/sparc64/fhc/fhc_nexus.c Wed Jan 13 20:41:27 2010 (r202239) +++ stable/6/sys/sparc64/fhc/fhc_nexus.c Wed Jan 13 20:48:42 2010 (r202240) @@ -89,6 +89,7 @@ static driver_t fhc_nexus_driver = { static devclass_t fhc_nexus_devclass; DRIVER_MODULE(fhc, nexus, fhc_nexus_driver, fhc_nexus_devclass, 0, 0); +MODULE_DEPEND(fhc, nexus, 1, 1, 1); static int fhc_nexus_probe(device_t dev) Modified: stable/6/sys/sparc64/pci/apb.c ============================================================================== --- stable/6/sys/sparc64/pci/apb.c Wed Jan 13 20:41:27 2010 (r202239) +++ stable/6/sys/sparc64/pci/apb.c Wed Jan 13 20:48:42 2010 (r202240) @@ -116,6 +116,7 @@ static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc)); DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0); +MODULE_DEPEND(apb, pci, 1, 1, 1); /* APB specific registers */ #define APBR_IOMAP 0xde Modified: stable/6/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- stable/6/sys/sparc64/pci/ofw_pcib.c Wed Jan 13 20:41:27 2010 (r202239) +++ stable/6/sys/sparc64/pci/ofw_pcib.c Wed Jan 13 20:48:42 2010 (r202240) @@ -97,6 +97,7 @@ static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods, sizeof(struct ofw_pcib_gen_softc)); DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0); +MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1); static int ofw_pcib_probe(device_t dev) Modified: stable/6/sys/sparc64/sbus/sbus.c ============================================================================== --- stable/6/sys/sparc64/sbus/sbus.c Wed Jan 13 20:41:27 2010 (r202239) +++ stable/6/sys/sparc64/sbus/sbus.c Wed Jan 13 20:48:42 2010 (r202240) @@ -261,6 +261,7 @@ static driver_t sbus_driver = { static devclass_t sbus_devclass; DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0); +MODULE_DEPEND(sbus, nexus, 1, 1, 1); MODULE_VERSION(sbus, 1); #define OFW_SBUS_TYPE "sbus" Modified: stable/6/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/6/sys/sparc64/sparc64/nexus.c Wed Jan 13 20:41:27 2010 (r202239) +++ stable/6/sys/sparc64/sparc64/nexus.c Wed Jan 13 20:48:42 2010 (r202240) @@ -131,6 +131,7 @@ static driver_t nexus_driver = { static devclass_t nexus_devclass; DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +MODULE_VERSION(nexus, 1); static char *nexus_excl_name[] = { "aliases", From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:51:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED88C1065672; Wed, 13 Jan 2010 20:51:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC4258FC14; Wed, 13 Jan 2010 20:51:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKpLrB020600; Wed, 13 Jan 2010 20:51:21 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKpLPv020598; Wed, 13 Jan 2010 20:51:21 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132051.o0DKpLPv020598@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:51:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202241 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:51:22 -0000 Author: marius Date: Wed Jan 13 20:51:21 2010 New Revision: 202241 URL: http://svn.freebsd.org/changeset/base/202241 Log: MFC: r200915 Don't probe the bq4802 variant found in Ultra 25 and 45 for now as this chip isn't MC146818 compatible and requires different handlers (but which I can't test due to lack of such hardware). Modified: stable/8/sys/sparc64/sparc64/rtc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/rtc.c ============================================================================== --- stable/8/sys/sparc64/sparc64/rtc.c Wed Jan 13 20:48:42 2010 (r202240) +++ stable/8/sys/sparc64/sparc64/rtc.c Wed Jan 13 20:51:21 2010 (r202241) @@ -28,10 +28,11 @@ __FBSDID("$FreeBSD$"); /* - * The `rtc' device is a MC146818 compatible clock found on the ISA - * bus and EBus. The EBus variant actually is the Real-Time Clock - * function of a National Semiconductor PC87317/PC97317 which also - * provides Advanced Power Control functionality. + * The `rtc' device is found on the ISA bus and the EBus. The ISA version + * always is a MC146818 compatible clock while the EBus variant either is the + * MC146818 compatible Real-Time Clock function of a National Semiconductor + * PC87317/PC97317 which also provides Advanced Power Control functionality + * or a Texas Instruments bq4802. */ #include "opt_isa.h" @@ -130,6 +131,10 @@ rtc_ebus_probe(device_t dev) { if (strcmp(ofw_bus_get_name(dev), "rtc") == 0) { + /* The bq4802 is not supported, yet. */ + if (ofw_bus_get_compat(dev) != NULL && + strcmp(ofw_bus_get_compat(dev), "bq4802") == 0) + return (ENXIO); device_set_desc(dev, RTC_DESC); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:51:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8427D106566C; Wed, 13 Jan 2010 20:51:23 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72C248FC0A; Wed, 13 Jan 2010 20:51:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKpN6N020633; Wed, 13 Jan 2010 20:51:23 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKpNsq020631; Wed, 13 Jan 2010 20:51:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132051.o0DKpNsq020631@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202242 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:51:23 -0000 Author: marius Date: Wed Jan 13 20:51:23 2010 New Revision: 202242 URL: http://svn.freebsd.org/changeset/base/202242 Log: MFC: r200915 Don't probe the bq4802 variant found in Ultra 25 and 45 for now as this chip isn't MC146818 compatible and requires different handlers (but which I can't test due to lack of such hardware). Modified: stable/7/sys/sparc64/sparc64/rtc.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/rtc.c ============================================================================== --- stable/7/sys/sparc64/sparc64/rtc.c Wed Jan 13 20:51:21 2010 (r202241) +++ stable/7/sys/sparc64/sparc64/rtc.c Wed Jan 13 20:51:23 2010 (r202242) @@ -28,10 +28,11 @@ __FBSDID("$FreeBSD$"); /* - * The `rtc' device is a MC146818 compatible clock found on the ISA - * bus and EBus. The EBus variant actually is the Real-Time Clock - * function of a National Semiconductor PC87317/PC97317 which also - * provides Advanced Power Control functionality. + * The `rtc' device is found on the ISA bus and the EBus. The ISA version + * always is a MC146818 compatible clock while the EBus variant either is the + * MC146818 compatible Real-Time Clock function of a National Semiconductor + * PC87317/PC97317 which also provides Advanced Power Control functionality + * or a Texas Instruments bq4802. */ #include "opt_isa.h" @@ -130,6 +131,10 @@ rtc_ebus_probe(device_t dev) { if (strcmp(ofw_bus_get_name(dev), "rtc") == 0) { + /* The bq4802 is not supported, yet. */ + if (ofw_bus_get_compat(dev) != NULL && + strcmp(ofw_bus_get_compat(dev), "bq4802") == 0) + return (ENXIO); device_set_desc(dev, RTC_DESC); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:54:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E62B1065745; Wed, 13 Jan 2010 20:54:18 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C1218FC17; Wed, 13 Jan 2010 20:54:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKsINd021328; Wed, 13 Jan 2010 20:54:18 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKsI9e021324; Wed, 13 Jan 2010 20:54:18 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001132054.o0DKsI9e021324@svn.freebsd.org> From: Andrew Thompson Date: Wed, 13 Jan 2010 20:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202243 - in head: share/man/man4 sys/dev/usb sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:54:18 -0000 Author: thompsa Date: Wed Jan 13 20:54:18 2010 New Revision: 202243 URL: http://svn.freebsd.org/changeset/base/202243 Log: Update to Fredrik's latest uhso driver. This changes port detection, adds comments and other code nits. Submitted by: Fredrik Lindberg Modified: head/share/man/man4/uhso.4 head/sys/dev/usb/net/uhso.c head/sys/dev/usb/usbdevs Modified: head/share/man/man4/uhso.4 ============================================================================== --- head/share/man/man4/uhso.4 Wed Jan 13 20:51:23 2010 (r202242) +++ head/share/man/man4/uhso.4 Wed Jan 13 20:54:18 2010 (r202243) @@ -23,11 +23,11 @@ .\" .\" $FreeBSD$ .\" -.Dd Aug 12, 2009 +.Dd January 14, 2010 .Os .Dt UHSO 4 .Sh NAME -.Nm hso +.Nm uhso .Nd support for several HSxPA devices from Option N.V. .Sh SYNOPSIS The module can be loaded at boot time by placing the following line in @@ -47,12 +47,12 @@ driver which makes them behave like a .Xr tty 4 . The packet interface is exposed as a network interface. .Pp -To establish a connection on the packet interface the use of the proprietary +Connection of the packet interface is achieved by using the proprietary AT commands .Dq Li AT_OWANCALL and .Dq Li AT_OWANDATA -are required on any of the serial ports. +on any of the available serial ports. .Pp The network interface must be configured manually using the data obtain from these calls. @@ -70,12 +70,23 @@ driver supports at least the following c Option GlobeSurfer iCON 7.2 (new firmware) .It Option iCON 225 +.It +Option iCON 505 .El .Pp The device features a mass storage device referred to as .Dq Zero-CD -which contains drivers for Microsoft Windows. -The driver automatically switches the device to modem mode. +which contains drivers for Microsoft Windows, this is the default +mode for the device. +The +.Nm +driver automatically switches the device from +.Dq Zero-CD +mode to modem mode. +This behavior can be disabled by setting +.Va hw.usb.uhso.auto_switch +to 0 using +.Xr sysctl 8 .Sh EXAMPLES Establishing a packet interface connection .Bd -literal -offset indent Modified: head/sys/dev/usb/net/uhso.c ============================================================================== --- head/sys/dev/usb/net/uhso.c Wed Jan 13 20:51:23 2010 (r202242) +++ head/sys/dev/usb/net/uhso.c Wed Jan 13 20:54:18 2010 (r202243) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Fredrik Lindberg + * Copyright (c) 2009 Fredrik Lindberg * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -63,13 +63,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include struct uhso_tty { struct uhso_softc *ht_sc; struct usb_xfer *ht_xfer[3]; - int ht_muxport; + int ht_muxport; /* Mux. port no */ int ht_open; char ht_name[32]; }; @@ -78,7 +80,7 @@ struct uhso_softc { device_t sc_dev; struct usb_device *sc_udev; struct mtx sc_mtx; - uint32_t sc_type; + uint32_t sc_type; /* Interface definition */ struct usb_xfer *sc_xfer[3]; uint8_t sc_iface_no; @@ -91,14 +93,14 @@ struct uhso_softc { /* Network */ struct usb_xfer *sc_if_xfer[2]; struct ifnet *sc_ifp; - struct mbuf *sc_mwait; /* partial packet */ - size_t sc_waitlen; /* no. of outstanding bytes */ + struct mbuf *sc_mwait; /* Partial packet */ + size_t sc_waitlen; /* No. of outstanding bytes */ struct ifqueue sc_rxq; struct callout sc_c; /* TTY related structures */ struct ucom_super_softc sc_super_ucom; - int sc_ttys; + int sc_ttys; struct uhso_tty *sc_tty; struct ucom_softc *sc_ucom; int sc_msr; @@ -106,7 +108,6 @@ struct uhso_softc { int sc_line; }; - #define UHSO_MAX_MTU 2048 /* @@ -135,7 +136,7 @@ struct uhso_softc { * Port types */ #define UHSO_PORT_UNKNOWN 0x00 -#define UHSO_PORT_SERIAL 0x01 /* Serial port */ +#define UHSO_PORT_SERIAL 0x01 /* Serial port */ #define UHSO_PORT_NETWORK 0x02 /* Network packet interface */ /* @@ -145,12 +146,14 @@ struct uhso_softc { #define UHSO_MPORT_TYPE_APP 0x01 /* Application */ #define UHSO_MPORT_TYPE_PCSC 0x02 #define UHSO_MPORT_TYPE_GPS 0x03 -#define UHSO_MPORT_TYPE_APP2 0x04 +#define UHSO_MPORT_TYPE_APP2 0x04 /* Secondary application */ #define UHSO_MPORT_TYPE_MAX UHSO_MPORT_TYPE_APP2 #define UHSO_MPORT_TYPE_NOMAX 8 /* Max number of mux ports */ /* * Port definitions + * Note that these definitions are arbitray and doesn't match + * values returned by the auto config descriptor. */ #define UHSO_PORT_TYPE_CTL 0x01 #define UHSO_PORT_TYPE_APP 0x02 @@ -176,8 +179,12 @@ static char *uhso_port[] = { "Network/Serial" }; -/* Map between interface port type read from device and description type */ -static char uhso_port_map[] = { +/* + * Map between interface port type read from device and description type. + * The position in this array is a direct map to the auto config + * descriptor values. + */ +static unsigned char uhso_port_map[] = { 0, UHSO_PORT_TYPE_DIAG, UHSO_PORT_TYPE_GPS, @@ -193,7 +200,7 @@ static char uhso_port_map[] = { }; static char uhso_port_map_max = sizeof(uhso_port_map) / sizeof(char); -static char uhso_mux_port_map[] = { +static unsigned char uhso_mux_port_map[] = { UHSO_PORT_TYPE_CTL, UHSO_PORT_TYPE_APP, UHSO_PORT_TYPE_PCSC, @@ -202,7 +209,7 @@ static char uhso_mux_port_map[] = { }; static char *uhso_port_type[] = { - "Unknown", + "Unknown", /* Not a valid port */ "Control", "Application", "Application (Secondary)", @@ -233,7 +240,6 @@ static char *uhso_port_type_sysctl[] = { "voice", }; - #define UHSO_STATIC_IFACE 0x01 #define UHSO_AUTO_IFACE 0x02 @@ -263,11 +269,16 @@ static const struct usb_device_id uhso_d /* Option iCON 321 */ UHSO_DEV(OPTION, ICON321, UHSO_STATIC_IFACE), /* Option iCON 322 */ - UHSO_DEV(OPTION, GTICON322, UHSO_STATIC_IFACE) + UHSO_DEV(OPTION, GTICON322, UHSO_STATIC_IFACE), + /* Option iCON 505 */ + UHSO_DEV(OPTION, ICON505, UHSO_AUTO_IFACE), #undef UHSO_DEV }; SYSCTL_NODE(_hw_usb, OID_AUTO, uhso, CTLFLAG_RW, 0, "USB uhso"); +static int uhso_autoswitch = 1; +SYSCTL_INT(_hw_usb_uhso, OID_AUTO, auto_switch, CTLFLAG_RW, + &uhso_autoswitch, 0, "Automatically switch to modem mode"); #ifdef USB_DEBUG #ifdef UHSO_DEBUG @@ -335,6 +346,7 @@ static usb_callback_t uhso_bs_intr_callb static usb_callback_t uhso_ifnet_read_callback; static usb_callback_t uhso_ifnet_write_callback; +/* Config used for the default control pipes */ static const struct usb_config uhso_ctrl_config[UHSO_CTRL_MAX] = { [UHSO_CTRL_READ] = { .type = UE_CONTROL, @@ -356,6 +368,7 @@ static const struct usb_config uhso_ctrl } }; +/* Config for the multiplexed serial ports */ static const struct usb_config uhso_mux_config[UHSO_MUX_ENDPT_MAX] = { [UHSO_MUX_ENDPT_INTR] = { .type = UE_INTERRUPT, @@ -367,6 +380,7 @@ static const struct usb_config uhso_mux_ } }; +/* Config for the raw IP-packet interface */ static const struct usb_config uhso_ifnet_config[UHSO_IFNET_MAX] = { [UHSO_IFNET_READ] = { .type = UE_BULK, @@ -387,6 +401,7 @@ static const struct usb_config uhso_ifne } }; +/* Config for interfaces with normal bulk serial ports */ static const struct usb_config uhso_bs_config[UHSO_BULK_ENDPT_MAX] = { [UHSO_BULK_ENDPT_READ] = { .type = UE_BULK, @@ -416,20 +431,19 @@ static const struct usb_config uhso_bs_c } }; -static int uhso_probe_iface(struct uhso_softc *, int, +static int uhso_probe_iface(struct uhso_softc *, int, int (*probe)(struct uhso_softc *, int)); -static int uhso_probe_iface_auto(struct uhso_softc *, int); -static int uhso_probe_iface_static(struct uhso_softc *, int); - -static int uhso_attach_muxserial(struct uhso_softc *, struct usb_interface *, +static int uhso_probe_iface_auto(struct uhso_softc *, int); +static int uhso_probe_iface_static(struct uhso_softc *, int); +static int uhso_attach_muxserial(struct uhso_softc *, struct usb_interface *, int type); -static int uhso_attach_bulkserial(struct uhso_softc *, struct usb_interface *, +static int uhso_attach_bulkserial(struct uhso_softc *, struct usb_interface *, int type); -static int uhso_attach_ifnet(struct uhso_softc *, struct usb_interface *, +static int uhso_attach_ifnet(struct uhso_softc *, struct usb_interface *, int type); static void uhso_test_autoinst(void *, struct usb_device *, struct usb_attach_arg *); -static int uhso_driver_loaded(struct module *, int, void *); +static int uhso_driver_loaded(struct module *, int, void *); static void uhso_ucom_start_read(struct ucom_softc *); static void uhso_ucom_stop_read(struct ucom_softc *); @@ -438,12 +452,11 @@ static void uhso_ucom_stop_write(struct static void uhso_ucom_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); static void uhso_ucom_cfg_set_dtr(struct ucom_softc *, uint8_t); static void uhso_ucom_cfg_set_rts(struct ucom_softc *, uint8_t); - static void uhso_if_init(void *); static void uhso_if_start(struct ifnet *); static void uhso_if_stop(struct uhso_softc *); -static int uhso_if_ioctl(struct ifnet *, u_long, caddr_t); -static int uhso_if_output(struct ifnet *, struct mbuf *, struct sockaddr *, +static int uhso_if_ioctl(struct ifnet *, u_long, caddr_t); +static int uhso_if_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct route *); static void uhso_if_rxflush(void *); @@ -512,11 +525,6 @@ uhso_attach(device_t self) usb_error_t uerr; char *desc; - device_set_usb_desc(self); - - UHSO_DPRINTF(0, "Device is in modem mode, devClass=%x\n", - uaa->device->ddesc.bDeviceClass); - sc->sc_dev = self; sc->sc_udev = uaa->device; mtx_init(&sc->sc_mtx, "uhso", NULL, MTX_DEF); @@ -552,7 +560,6 @@ uhso_attach(device_t self) if (error != 0) goto out; - sctx = device_get_sysctl_ctx(sc->sc_dev); soid = device_get_sysctl_tree(sc->sc_dev); @@ -560,6 +567,18 @@ uhso_attach(device_t self) CTLFLAG_RD, uhso_port[UHSO_IFACE_PORT(sc->sc_type)], 0, "Port available at this interface"); + /* + * The default interface description on most Option devices aren't + * very helpful. So we skip device_set_usb_desc and set the + * device description manually. + */ + device_set_desc_copy(self, uhso_port_type[UHSO_IFACE_PORT_TYPE(sc->sc_type)]); + /* Announce device */ + device_printf(self, "<%s port> at <%s %s> on %s\n", + uhso_port_type[UHSO_IFACE_PORT_TYPE(sc->sc_type)], + uaa->device->manufacturer, uaa->device->product, + device_get_nameunit(uaa->device->bus->bdev)); + if (sc->sc_ttys > 0) { SYSCTL_ADD_INT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "ports", CTLFLAG_RD, &sc->sc_ttys, 0, "Number of attached serial ports"); @@ -568,11 +587,14 @@ uhso_attach(device_t self) "port", CTLFLAG_RD, NULL, "Serial ports"); } + /* + * Loop through the number of found TTYs and create sysctl + * nodes for them. + */ for (i = 0; i < sc->sc_ttys; i++) { ht = &sc->sc_tty[i]; ucom = &sc->sc_ucom[i]; - if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_MUX) port = uhso_mux_port_map[ht->ht_muxport]; else @@ -607,7 +629,6 @@ uhso_attach(device_t self) out: uhso_detach(sc->sc_dev); return (ENXIO); - } static int @@ -633,21 +654,17 @@ uhso_detach(device_t self) } if (sc->sc_ifp != NULL) { - callout_drain(&sc->sc_c); - mtx_lock(&sc->sc_mtx); uhso_if_stop(sc); bpfdetach(sc->sc_ifp); if_detach(sc->sc_ifp); if_free(sc->sc_ifp); mtx_unlock(&sc->sc_mtx); - usbd_transfer_unsetup(sc->sc_if_xfer, UHSO_IFNET_MAX); } mtx_destroy(&sc->sc_mtx); - return (0); } @@ -658,7 +675,7 @@ uhso_test_autoinst(void *arg, struct usb struct usb_interface *iface; struct usb_interface_descriptor *id; - if (uaa->dev_state != UAA_DEV_READY) + if (uaa->dev_state != UAA_DEV_READY || !uhso_autoswitch) return; iface = usbd_get_iface(udev, 0); @@ -694,7 +711,13 @@ uhso_driver_loaded(struct module *mod, i return (0); } -static int uhso_probe_iface_auto(struct uhso_softc *sc, int index) +/* + * Probe the interface type by querying the device. The elements + * of an array indicates the capabilities of a particular interface. + * Returns a bit mask with the interface capabilities. + */ +static int +uhso_probe_iface_auto(struct uhso_softc *sc, int index) { struct usb_device_request req; usb_error_t uerr; @@ -716,7 +739,7 @@ static int uhso_probe_iface_auto(struct return (0); } - UHSO_DPRINTF(3, "actlen=%d\n", actlen); + UHSO_DPRINTF(1, "actlen=%d\n", actlen); UHSO_HEXDUMP(buf, 17); if (index < 0 || index > 16) { @@ -724,21 +747,25 @@ static int uhso_probe_iface_auto(struct return (0); } - UHSO_DPRINTF(3, "index=%d, type=%x\n", index, buf[index]); + UHSO_DPRINTF(1, "index=%d, type=%x[%s]\n", index, buf[index], + uhso_port_type[(int)uhso_port_map[(int)buf[index]]]); if (buf[index] >= uhso_port_map_max) port = 0; else port = uhso_port_map[(int)buf[index]]; - if (port == UHSO_PORT_TYPE_NETWORK) - return (UHSO_IFACE_SPEC(UHSO_IF_BULK, - UHSO_PORT_NETWORK, port)); - else if (port == UHSO_PORT_TYPE_VOICE) + switch (port) { + case UHSO_PORT_TYPE_NETWORK: + return (UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, + UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, port)); + case UHSO_PORT_TYPE_VOICE: + /* Don't claim 'voice' ports */ return (0); - else + default: return (UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, port)); + } return (0); } @@ -750,10 +777,12 @@ uhso_probe_iface_static(struct uhso_soft cd = usbd_get_config_descriptor(sc->sc_udev); if (cd->bNumInterface <= 3) { + /* Cards with 3 or less interfaces */ switch (index) { case 0: return UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, - UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, 0); + UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, + UHSO_PORT_TYPE_NETWORK); case 1: return UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, UHSO_PORT_TYPE_DIAG); @@ -761,12 +790,13 @@ uhso_probe_iface_static(struct uhso_soft return UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, UHSO_PORT_TYPE_MODEM); } - } - else { + } else { + /* Cards with 4 interfaces */ switch (index) { case 0: return UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, - UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, 0); + UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, + UHSO_PORT_TYPE_NETWORK); case 1: return UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, UHSO_PORT_TYPE_DIAG2); @@ -781,14 +811,18 @@ uhso_probe_iface_static(struct uhso_soft return (0); } +/* + * Probes an interface for its particular capabilities and attaches if + * it's a supported interface. + */ static int uhso_probe_iface(struct uhso_softc *sc, int index, int (*probe)(struct uhso_softc *, int)) { struct usb_interface *iface; - int type, error, error0; + int type, error; - UHSO_DPRINTF(1, "Probing for interface %d, cb=%p\n", index, probe); + UHSO_DPRINTF(1, "Probing for interface %d, probe_func=%p\n", index, probe); type = probe(sc, index); UHSO_DPRINTF(1, "Probe result %x\n", type); @@ -798,27 +832,41 @@ uhso_probe_iface(struct uhso_softc *sc, sc->sc_type = type; iface = usbd_get_iface(sc->sc_udev, index); - if (UHSO_IFACE_USB_TYPE(type) & (UHSO_IF_MUX | UHSO_IF_NET)) { - error0 = uhso_attach_muxserial(sc, iface, type); + if (UHSO_IFACE_PORT_TYPE(type) == UHSO_PORT_TYPE_NETWORK) { error = uhso_attach_ifnet(sc, iface, type); - - if (error0 && error) + if (error) { + UHSO_DPRINTF(1, "uhso_attach_ifnet failed"); return (ENXIO); + } - if (sc->sc_ttys > 0) { + /* + * If there is an additional interrupt endpoint on this + * interface we most likley have a multiplexed serial port + * available. + */ + if (iface->idesc->bNumEndpoints < 3) { + sc->sc_type = UHSO_IFACE_SPEC( + UHSO_IFACE_USB_TYPE(type) & ~UHSO_IF_MUX, + UHSO_IFACE_PORT(type) & ~UHSO_PORT_SERIAL, + UHSO_IFACE_PORT_TYPE(type)); + return (0); + } + + UHSO_DPRINTF(1, "Trying to attach mux. serial\n"); + error = uhso_attach_muxserial(sc, iface, type); + if (error == 0 && sc->sc_ttys > 0) { error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_ttys, sc, &uhso_ucom_callback, &sc->sc_mtx); if (error) { device_printf(sc->sc_dev, "ucom_attach failed\n"); return (ENXIO); } - } - mtx_lock(&sc->sc_mtx); - usbd_transfer_start(sc->sc_xfer[UHSO_MUX_ENDPT_INTR]); - mtx_unlock(&sc->sc_mtx); - } - else if ((UHSO_IFACE_USB_TYPE(type) & UHSO_IF_BULK) && + mtx_lock(&sc->sc_mtx); + usbd_transfer_start(sc->sc_xfer[UHSO_MUX_ENDPT_INTR]); + mtx_unlock(&sc->sc_mtx); + } + } else if ((UHSO_IFACE_USB_TYPE(type) & UHSO_IF_BULK) && UHSO_IFACE_PORT(type) & UHSO_PORT_SERIAL) { error = uhso_attach_bulkserial(sc, iface, type); @@ -833,12 +881,18 @@ uhso_probe_iface(struct uhso_softc *sc, } } else { + UHSO_DPRINTF(0, "Unknown type %x\n", type); return (ENXIO); } return (0); } +/* + * Expands allocated memory to fit an additional TTY. + * Two arrays are kept with matching indexes, one for ucom and one + * for our private data. + */ static int uhso_alloc_tty(struct uhso_softc *sc) { @@ -856,11 +910,15 @@ uhso_alloc_tty(struct uhso_softc *sc) sc->sc_tty[sc->sc_ttys - 1].ht_sc = sc; - UHSO_DPRINTF(2, "Allocated TTY %d\n", sc->sc_ttys - 1); + UHSO_DPRINTF(1, "Allocated TTY %d\n", sc->sc_ttys - 1); return (sc->sc_ttys - 1); } - +/* + * Attach a multiplexed serial port + * Data is read/written with requests on the default control pipe. An interrupt + * endpoint returns when there is new data to be read. + */ static int uhso_attach_muxserial(struct uhso_softc *sc, struct usb_interface *iface, int type) @@ -885,6 +943,10 @@ uhso_attach_muxserial(struct uhso_softc if (desc->bDescriptorSubtype == 0) return (ENXIO); + /* + * The bitmask is one octet, loop through the number of + * bits that are set and create a TTY for each. + */ for (i = 0; i < 8; i++) { port = (1 << i); if ((port & desc->bDescriptorSubtype) == port) { @@ -905,6 +967,7 @@ uhso_attach_muxserial(struct uhso_softc } } + /* Setup the intr. endpoint */ uerr = usbd_transfer_setup(sc->sc_udev, &iface->idesc->bInterfaceNumber, sc->sc_xfer, uhso_mux_config, 1, sc, &sc->sc_mtx); @@ -914,6 +977,10 @@ uhso_attach_muxserial(struct uhso_softc return (0); } +/* + * Interrupt callback for the multiplexed serial port. Indicates + * which serial port that has data waiting. + */ static void uhso_mux_intr_callback(struct usb_xfer *xfer, usb_error_t error) { @@ -943,6 +1010,7 @@ uhso_mux_intr_callback(struct usb_xfer * if (mux > UHSO_MPORT_TYPE_NOMAX) break; + /* Issue a read for this serial port */ usbd_xfer_set_priv( sc->sc_tty[mux].ht_xfer[UHSO_CTRL_READ], &sc->sc_tty[mux]); @@ -962,7 +1030,6 @@ tr_setup: usbd_xfer_set_stall(xfer); goto tr_setup; } - } static void @@ -1079,7 +1146,6 @@ uhso_mux_write_callback(struct usb_xfer break; break; } - } static int @@ -1089,9 +1155,7 @@ uhso_attach_bulkserial(struct uhso_softc usb_error_t uerr; int tty; - /* - * Try attaching RD/WR/INTR first - */ + /* Try attaching RD/WR/INTR first */ uerr = usbd_transfer_setup(sc->sc_udev, &iface->idesc->bInterfaceNumber, sc->sc_xfer, uhso_bs_config, UHSO_BULK_ENDPT_MAX, sc, &sc->sc_mtx); @@ -1146,7 +1210,6 @@ tr_setup: } } - static void uhso_bs_write_callback(struct usb_xfer *xfer, usb_error_t error) { @@ -1208,9 +1271,7 @@ uhso_bs_intr_callback(struct usb_xfer *x int actlen; struct usb_cdc_notification cdc; - usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); - UHSO_DPRINTF(3, "status %d, actlen=%d\n", USB_GET_STATE(xfer), actlen); switch (USB_GET_STATE(xfer)) { @@ -1228,14 +1289,14 @@ uhso_bs_intr_callback(struct usb_xfer *x usbd_copy_out(pc, 0, &cdc, actlen); if (UGETW(cdc.wIndex) != sc->sc_iface_no) { - UHSO_DPRINTF(0, "Interface missmatch, got %d expected %d\n", + UHSO_DPRINTF(0, "Interface mismatch, got %d expected %d\n", UGETW(cdc.wIndex), sc->sc_iface_no); goto tr_setup; } if (cdc.bmRequestType == UCDC_NOTIFICATION && cdc.bNotification == UCDC_N_SERIAL_STATE) { - UHSO_DPRINTF(1, "notify = 0x%02x\n", cdc.data[0]); + UHSO_DPRINTF(2, "notify = 0x%02x\n", cdc.data[0]); sc->sc_msr = 0; sc->sc_lsr = 0; @@ -1299,7 +1360,6 @@ uhso_ucom_cfg_set_rts(struct ucom_softc uhso_bs_cfg(sc); } - static void uhso_ucom_start_read(struct ucom_softc *ucom) { @@ -1373,7 +1433,6 @@ uhso_ucom_stop_write(struct ucom_softc * else if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_BULK) { usbd_transfer_stop(sc->sc_xfer[UHSO_BULK_ENDPT_WRITE]); } - } static int uhso_attach_ifnet(struct uhso_softc *sc, struct usb_interface *iface, @@ -1393,7 +1452,7 @@ static int uhso_attach_ifnet(struct uhso return (-1); } - sc->sc_ifp = ifp = if_alloc(IFT_PPP); + sc->sc_ifp = ifp = if_alloc(IFT_OTHER); if (sc->sc_ifp == NULL) { device_printf(sc->sc_dev, "if_alloc() failed\n"); return (-1); @@ -1406,7 +1465,6 @@ static int uhso_attach_ifnet(struct uhso if_initname(ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev)); ifp->if_mtu = UHSO_MAX_MTU; - ifp->if_ioctl = uhso_if_ioctl; ifp->if_init = uhso_if_init; ifp->if_start = uhso_if_start; @@ -1448,6 +1506,7 @@ uhso_ifnet_read_callback(struct usb_xfer m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); usbd_copy_out(pc, 0, mtod(m, uint8_t *), actlen); m->m_pkthdr.len = m->m_len = actlen; + /* Enqueue frame for further processing */ _IF_ENQUEUE(&sc->sc_rxq, m); if (!callout_pending(&sc->sc_c) || !callout_active(&sc->sc_c)) { @@ -1470,7 +1529,11 @@ tr_setup: } /* - * Defered RX processing, called with mutex locked. + * Deferred RX processing, called with mutex locked. + * + * Each frame we receive might contain several small ip-packets aswell + * as partial ip-packets. We need to separate/assemble them into individual + * packets before sending them to the ip-layer. */ static void uhso_if_rxflush(void *arg) @@ -1493,7 +1556,7 @@ uhso_if_rxflush(void *arg) _IF_DEQUEUE(&sc->sc_rxq, m); if (m == NULL) break; - UHSO_DPRINTF(2, "dequeue m=%p, len=%d\n", m, m->m_len); + UHSO_DPRINTF(3, "dequeue m=%p, len=%d\n", m, m->m_len); } mtx_unlock(&sc->sc_mtx); @@ -1502,7 +1565,7 @@ uhso_if_rxflush(void *arg) m0 = mwait; mwait = NULL; - UHSO_DPRINTF(1, "partial m0=%p(%d), concat w/ m=%p(%d)\n", + UHSO_DPRINTF(3, "partial m0=%p(%d), concat w/ m=%p(%d)\n", m0, m0->m_len, m, m->m_len); len = m->m_len + m0->m_len; @@ -1518,7 +1581,7 @@ uhso_if_rxflush(void *arg) mtx_lock(&sc->sc_mtx); continue; } - UHSO_DPRINTF(2, "Constructed mbuf=%p, len=%d\n", + UHSO_DPRINTF(3, "Constructed mbuf=%p, len=%d\n", m, m->m_pkthdr.len); } @@ -1560,7 +1623,7 @@ uhso_if_rxflush(void *arg) continue; } - UHSO_DPRINTF(1, "m=%p, len=%d, cp=%p, iplen=%d\n", + UHSO_DPRINTF(3, "m=%p, len=%d, cp=%p, iplen=%d\n", m, m->m_pkthdr.len, cp, iplen); m0 = NULL; @@ -1581,12 +1644,12 @@ uhso_if_rxflush(void *arg) m_adj(m0, iplen); m0 = m_defrag(m0, M_WAIT); - UHSO_DPRINTF(1, "New mbuf=%p, len=%d/%d, m0=%p, " + UHSO_DPRINTF(3, "New mbuf=%p, len=%d/%d, m0=%p, " "m0_len=%d/%d\n", m, m->m_pkthdr.len, m->m_len, m0, m0->m_pkthdr.len, m0->m_len); } else if (iplen > m->m_pkthdr.len) { - UHSO_DPRINTF(1, "Defered mbuf=%p, len=%d\n", + UHSO_DPRINTF(3, "Deferred mbuf=%p, len=%d\n", m, m->m_pkthdr.len); mwait = m; m = NULL; @@ -1649,7 +1712,6 @@ tr_setup: usbd_xfer_set_stall(xfer); goto tr_setup; } - } static int @@ -1698,7 +1760,7 @@ uhso_if_init(void *priv) ifp->if_drv_flags |= IFF_DRV_RUNNING; mtx_unlock(&sc->sc_mtx); - UHSO_DPRINTF(3, "ifnet initialized\n"); + UHSO_DPRINTF(2, "ifnet initialized\n"); } static int @@ -1722,7 +1784,6 @@ uhso_if_output(struct ifnet *ifp, struct return (ENOBUFS); } ifp->if_opackets++; - return (0); } @@ -1749,6 +1810,5 @@ uhso_if_stop(struct uhso_softc *sc) usbd_transfer_stop(sc->sc_if_xfer[UHSO_IFNET_READ]); usbd_transfer_stop(sc->sc_if_xfer[UHSO_IFNET_WRITE]); - sc->sc_ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); } Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Jan 13 20:51:23 2010 (r202242) +++ head/sys/dev/usb/usbdevs Wed Jan 13 20:54:18 2010 (r202243) @@ -2111,6 +2111,7 @@ product OPTION GE40X_3 0x7381 Globetrot product OPTION ICONEDGE 0xc031 GlobeSurfer iCON EDGE product OPTION MODHSXPA 0xd013 Globetrotter HSUPA product OPTION ICON321 0xd031 Globetrotter HSUPA +product OPTION ICON505 0xd055 Globetrotter iCON 505 /* OQO */ product OQO WIFI01 0x0002 model 01 WiFi interface From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:59:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A455B1065670; Wed, 13 Jan 2010 20:59:36 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92CEB8FC0C; Wed, 13 Jan 2010 20:59:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKxakL022521; Wed, 13 Jan 2010 20:59:36 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKxaxR022519; Wed, 13 Jan 2010 20:59:36 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132059.o0DKxaxR022519@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202244 - stable/8/sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:59:36 -0000 Author: marius Date: Wed Jan 13 20:59:36 2010 New Revision: 202244 URL: http://svn.freebsd.org/changeset/base/202244 Log: MFC: r200916 Remove devices which are/were only relevant for sun4u. Modified: stable/8/sys/sun4v/conf/NOTES Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sun4v/conf/NOTES ============================================================================== --- stable/8/sys/sun4v/conf/NOTES Wed Jan 13 20:54:18 2010 (r202243) +++ stable/8/sys/sun4v/conf/NOTES Wed Jan 13 20:59:36 2010 (r202244) @@ -21,37 +21,18 @@ cpu SUN4V device ebus #device isa device pci -device sbus -#device central -device fhc ##################################################################### # HARDWARE DEVICE CONFIGURATION # -# Mandatory devices: -# - -#device eeprom # eeprom (really a front-end for the MK48Txx) -device mk48txx # Mostek MK48Txx clocks -#device rtc # rtc (really a front-end for the MC146818) -device mc146818 # Motorola MC146818 and compatible clocks - -# # Optional devices: # -#device auxio # auxiliary I/O device -#device clkbrd # Clock Board (blinkenlight on Sun Exx00) -#device creator # Creator, Creator3D and Elite3D framebuffers -#device machfb # ATI Mach64 framebuffers - device ofw_console # Open Firmware console device option OFWCONS_POLL_HZ=4 # 20 or more works best on Ultra2 -#device sab # Siemens SAB82532 based serial ports - ##################################################################### # Devices we don't want to deal with From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 20:59:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB4B01065757; Wed, 13 Jan 2010 20:59:42 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 971BD8FC0A; Wed, 13 Jan 2010 20:59:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DKxgnp022589; Wed, 13 Jan 2010 20:59:42 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DKxgVt022587; Wed, 13 Jan 2010 20:59:42 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132059.o0DKxgVt022587@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202245 - stable/7/sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:59:42 -0000 Author: marius Date: Wed Jan 13 20:59:42 2010 New Revision: 202245 URL: http://svn.freebsd.org/changeset/base/202245 Log: MFC: r200916 Remove devices which are/were only relevant for sun4u. Modified: stable/7/sys/sun4v/conf/NOTES Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sun4v/conf/NOTES ============================================================================== --- stable/7/sys/sun4v/conf/NOTES Wed Jan 13 20:59:36 2010 (r202244) +++ stable/7/sys/sun4v/conf/NOTES Wed Jan 13 20:59:42 2010 (r202245) @@ -21,9 +21,6 @@ cpu SUN4V device ebus #device isa device pci -device sbus -#device central -device fhc ##################################################################### @@ -34,25 +31,14 @@ device fhc # device genclock # Generic clock interface -#device eeprom # eeprom (really a front-end for the MK48Txx) -device mk48txx # Mostek MK48Txx clocks -#device rtc # rtc (really a front-end for the MC146818) -device mc146818 # Motorola MC146818 and compatible clocks # # Optional devices: # -#device auxio # auxiliary I/O device -#device clkbrd # Clock Board (blinkenlight on Sun Exx00) -#device creator # Creator, Creator3D and Elite3D framebuffers -#device machfb # ATI Mach64 framebuffers - device ofw_console # Open Firmware console device option OFWCONS_POLL_HZ=4 # 20 or more works best on Ultra2 -#device sab # Siemens SAB82532 based serial ports - ##################################################################### # Devices we don't want to deal with From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:03:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3BF4106566C; Wed, 13 Jan 2010 21:03:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C24668FC19; Wed, 13 Jan 2010 21:03:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DL34KA023445; Wed, 13 Jan 2010 21:03:04 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DL34Tk023442; Wed, 13 Jan 2010 21:03:04 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132103.o0DL34Tk023442@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202246 - in stable/8/sys: conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:03:04 -0000 Author: marius Date: Wed Jan 13 21:03:04 2010 New Revision: 202246 URL: http://svn.freebsd.org/changeset/base/202246 Log: MFC: r200917 Hook ebus(4) and isa(4) up to the sun4v LINT build in order to ensure that their compilation doesn't break as they are expected to work as-is now (but aren't actually run-time tested). Modified: stable/8/sys/conf/files.sun4v stable/8/sys/sun4v/conf/NOTES Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files.sun4v ============================================================================== --- stable/8/sys/conf/files.sun4v Wed Jan 13 20:59:42 2010 (r202245) +++ stable/8/sys/conf/files.sun4v Wed Jan 13 21:03:04 2010 (r202246) @@ -35,6 +35,10 @@ libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard libkern/memmove.c standard +sparc64/ebus/ebus.c optional ebus +sparc64/isa/isa.c optional isa +sparc64/isa/isa_dma.c optional isa +sparc64/isa/ofw_isa.c optional ebus | isa sparc64/sparc64/autoconf.c standard sun4v/sun4v/bus_machdep.c standard sun4v/sun4v/clock.c standard Modified: stable/8/sys/sun4v/conf/NOTES ============================================================================== --- stable/8/sys/sun4v/conf/NOTES Wed Jan 13 20:59:42 2010 (r202245) +++ stable/8/sys/sun4v/conf/NOTES Wed Jan 13 21:03:04 2010 (r202246) @@ -19,7 +19,7 @@ cpu SUN4V # HARDWARE BUS CONFIGURATION device ebus -#device isa +device isa device pci From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:03:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 749E1106566B; Wed, 13 Jan 2010 21:03:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 633FE8FC0C; Wed, 13 Jan 2010 21:03:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DL36Vo023479; Wed, 13 Jan 2010 21:03:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DL36gu023476; Wed, 13 Jan 2010 21:03:06 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132103.o0DL36gu023476@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202247 - in stable/7/sys: conf sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:03:06 -0000 Author: marius Date: Wed Jan 13 21:03:06 2010 New Revision: 202247 URL: http://svn.freebsd.org/changeset/base/202247 Log: MFC: r200917 Hook ebus(4) and isa(4) up to the sun4v LINT build in order to ensure that their compilation doesn't break as they are expected to work as-is now (but aren't actually run-time tested). Modified: stable/7/sys/conf/files.sun4v stable/7/sys/sun4v/conf/NOTES Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/conf/files.sun4v ============================================================================== --- stable/7/sys/conf/files.sun4v Wed Jan 13 21:03:04 2010 (r202246) +++ stable/7/sys/conf/files.sun4v Wed Jan 13 21:03:06 2010 (r202247) @@ -32,6 +32,10 @@ libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +sparc64/ebus/ebus.c optional ebus +sparc64/isa/isa.c optional isa +sparc64/isa/isa_dma.c optional isa +sparc64/isa/ofw_isa.c optional ebus | isa sparc64/sparc64/autoconf.c standard sun4v/sun4v/bus_machdep.c standard sun4v/sun4v/clock.c standard Modified: stable/7/sys/sun4v/conf/NOTES ============================================================================== --- stable/7/sys/sun4v/conf/NOTES Wed Jan 13 21:03:04 2010 (r202246) +++ stable/7/sys/sun4v/conf/NOTES Wed Jan 13 21:03:06 2010 (r202247) @@ -19,7 +19,7 @@ cpu SUN4V # HARDWARE BUS CONFIGURATION device ebus -#device isa +device isa device pci From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:04:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B493A1065695; Wed, 13 Jan 2010 21:04:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A369F8FC22; Wed, 13 Jan 2010 21:04:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DL4uQh023937; Wed, 13 Jan 2010 21:04:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DL4uqp023935; Wed, 13 Jan 2010 21:04:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132104.o0DL4uqp023935@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202248 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:04:56 -0000 Author: marius Date: Wed Jan 13 21:04:56 2010 New Revision: 202248 URL: http://svn.freebsd.org/changeset/base/202248 Log: MFC: r200918 Add structures for OFW MSI/MSI-X support. These are identical for both sun4u and sun4v. Modified: stable/8/sys/sparc64/pci/ofw_pci.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/pci/ofw_pci.h ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pci.h Wed Jan 13 21:03:06 2010 (r202247) +++ stable/8/sys/sparc64/pci/ofw_pci.h Wed Jan 13 21:04:56 2010 (r202248) @@ -48,6 +48,31 @@ typedef uint32_t ofw_pci_intr_t; #define OFW_TYPE_PCI "pci" #define OFW_TYPE_PCIE "pciex" +struct ofw_pci_msi_addr_ranges { + uint32_t addr32_hi; + uint32_t addr32_lo; + uint32_t addr32_sz; + uint32_t addr64_hi; + uint32_t addr64_lo; + uint32_t addr64_sz; +}; + +#define OFW_PCI_MSI_ADDR_RANGE_32(r) \ + (((uint64_t)(r)->addr32_hi << 32) | (uint64_t)(r)->addr32_lo) +#define OFW_PCI_MSI_ADDR_RANGE_64(r) \ + (((uint64_t)(r)->addr64_hi << 32) | (uint64_t)(r)->addr64_lo) + +struct ofw_pci_msi_eq_to_devino { + uint32_t eq_first; + uint32_t eq_count; + uint32_t devino_first; +}; + +struct ofw_pci_msi_ranges { + uint32_t first; + uint32_t count; +}; + struct ofw_pci_ranges { uint32_t cspace; uint32_t child_hi; From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:05:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB4DB10656A7; Wed, 13 Jan 2010 21:05:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F5DB8FC1A; Wed, 13 Jan 2010 21:05:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DL52Uv024009; Wed, 13 Jan 2010 21:05:02 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DL52do024007; Wed, 13 Jan 2010 21:05:02 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132105.o0DL52do024007@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202249 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:05:05 -0000 Author: marius Date: Wed Jan 13 21:05:01 2010 New Revision: 202249 URL: http://svn.freebsd.org/changeset/base/202249 Log: MFC: r200918 Add structures for OFW MSI/MSI-X support. These are identical for both sun4u and sun4v. Modified: stable/7/sys/sparc64/pci/ofw_pci.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/ofw_pci.h ============================================================================== --- stable/7/sys/sparc64/pci/ofw_pci.h Wed Jan 13 21:04:56 2010 (r202248) +++ stable/7/sys/sparc64/pci/ofw_pci.h Wed Jan 13 21:05:01 2010 (r202249) @@ -48,6 +48,31 @@ typedef uint32_t ofw_pci_intr_t; #define OFW_TYPE_PCI "pci" #define OFW_TYPE_PCIE "pciex" +struct ofw_pci_msi_addr_ranges { + uint32_t addr32_hi; + uint32_t addr32_lo; + uint32_t addr32_sz; + uint32_t addr64_hi; + uint32_t addr64_lo; + uint32_t addr64_sz; +}; + +#define OFW_PCI_MSI_ADDR_RANGE_32(r) \ + (((uint64_t)(r)->addr32_hi << 32) | (uint64_t)(r)->addr32_lo) +#define OFW_PCI_MSI_ADDR_RANGE_64(r) \ + (((uint64_t)(r)->addr64_hi << 32) | (uint64_t)(r)->addr64_lo) + +struct ofw_pci_msi_eq_to_devino { + uint32_t eq_first; + uint32_t eq_count; + uint32_t devino_first; +}; + +struct ofw_pci_msi_ranges { + uint32_t first; + uint32_t count; +}; + struct ofw_pci_ranges { uint32_t cspace; uint32_t child_hi; From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:08:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 260BD106566B; Wed, 13 Jan 2010 21:08:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13CBB8FC16; Wed, 13 Jan 2010 21:08:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DL8v9u024961; Wed, 13 Jan 2010 21:08:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DL8vpS024959; Wed, 13 Jan 2010 21:08:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132108.o0DL8vpS024959@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202250 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:08:58 -0000 Author: marius Date: Wed Jan 13 21:08:57 2010 New Revision: 202250 URL: http://svn.freebsd.org/changeset/base/202250 Log: MFC: r200920 - Sort the prototypes. - Add macros to ease the access of device configuration space in ofw_pcibus_setup_device(). Modified: stable/7/sys/sparc64/pci/ofw_pcibus.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/ofw_pcibus.c ============================================================================== --- stable/7/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 21:05:01 2010 (r202249) +++ stable/7/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 21:08:57 2010 (r202250) @@ -65,10 +65,10 @@ static void ofw_pcibus_setup_device(devi u_int busno, u_int slot, u_int func); /* Methods */ -static device_probe_t ofw_pcibus_probe; static device_attach_t ofw_pcibus_attach; -static pci_assign_interrupt_t ofw_pcibus_assign_interrupt; +static device_probe_t ofw_pcibus_probe; static ofw_bus_get_devinfo_t ofw_pcibus_get_devinfo; +static pci_assign_interrupt_t ofw_pcibus_assign_interrupt; static device_method_t ofw_pcibus_methods[] = { /* Device interface */ @@ -122,6 +122,11 @@ static void ofw_pcibus_setup_device(device_t bridge, uint32_t clock, u_int busno, u_int slot, u_int func) { +#define CS_READ(n, w) \ + PCIB_READ_CONFIG(bridge, busno, slot, func, (n), (w)) +#define CS_WRITE(n, v, w) \ + PCIB_WRITE_CONFIG(bridge, busno, slot, func, (n), (v), (w)) + #ifndef SUN4V uint32_t reg; @@ -136,10 +141,9 @@ ofw_pcibus_setup_device(device_t bridge, * For bridges, we additionally set up the bridge control and the * secondary latency registers. */ - if ((PCIB_READ_CONFIG(bridge, busno, slot, func, PCIR_HDRTYPE, 1) & - PCIM_HDRTYPE) == PCIM_HDRTYPE_BRIDGE) { - reg = PCIB_READ_CONFIG(bridge, busno, slot, func, - PCIR_BRIDGECTL_1, 1); + if ((CS_READ(PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) == + PCIM_HDRTYPE_BRIDGE) { + reg = CS_READ(PCIR_BRIDGECTL_1, 1); #if 0 reg |= PCIB_BCR_MASTER_ABORT_MODE | PCIB_BCR_SERR_ENABLE | #else @@ -149,24 +153,19 @@ ofw_pcibus_setup_device(device_t bridge, #ifdef OFW_PCI_DEBUG device_printf(bridge, "bridge %d/%d/%d: control 0x%x -> 0x%x\n", - busno, slot, func, PCIB_READ_CONFIG(bridge, busno, slot, - func, PCIR_BRIDGECTL_1, 1), reg); + busno, slot, func, CS_READ(PCIR_BRIDGECTL_1, 1), reg); #endif /* OFW_PCI_DEBUG */ - PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_BRIDGECTL_1, - reg, 1); + CS_WRITE(PCIR_BRIDGECTL_1, reg, 1); reg = OFW_PCI_LATENCY; #ifdef OFW_PCI_DEBUG device_printf(bridge, "bridge %d/%d/%d: latency timer %d -> %d\n", - busno, slot, func, PCIB_READ_CONFIG(bridge, busno, slot, - func, PCIR_SECLAT_1, 1), reg); + busno, slot, func, CS_READ(PCIR_SECLAT_1, 1), reg); #endif /* OFW_PCI_DEBUG */ - PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_SECLAT_1, - reg, 1); + CS_WRITE(PCIR_SECLAT_1, reg, 1); } else { - reg = PCIB_READ_CONFIG(bridge, busno, slot, func, - PCIR_MINGNT, 1); + reg = CS_READ(PCIR_MINGNT, 1); if (reg != 0) { switch (clock) { case 33000000: @@ -182,10 +181,9 @@ ofw_pcibus_setup_device(device_t bridge, } #ifdef OFW_PCI_DEBUG device_printf(bridge, "device %d/%d/%d: latency timer %d -> %d\n", - busno, slot, func, PCIB_READ_CONFIG(bridge, busno, slot, func, - PCIR_LATTIMER, 1), reg); + busno, slot, func, CS_READ(PCIR_LATTIMER, 1), reg); #endif /* OFW_PCI_DEBUG */ - PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_LATTIMER, reg, 1); + CS_WRITE(PCIR_LATTIMER, reg, 1); /* * Compute a value to write into the cache line size register. @@ -194,8 +192,7 @@ ofw_pcibus_setup_device(device_t bridge, * reached. Generally, the cache line size is fixed at 64 bytes * by Fireplane/Safari, JBus and UPA. */ - PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_CACHELNSZ, - STRBUF_LINESZ / sizeof(uint32_t), 1); + CS_WRITE(PCIR_CACHELNSZ, STRBUF_LINESZ / sizeof(uint32_t), 1); #endif /* @@ -203,8 +200,10 @@ ofw_pcibus_setup_device(device_t bridge, * it to 255, so that the PCI code will reroute the interrupt if * needed. */ - PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_INTLINE, - PCI_INVALID_IRQ, 1); + CS_WRITE(PCIR_INTLINE, PCI_INVALID_IRQ, 1); + +#undef CS_READ +#undef CS_WRITE } static int From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:08:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 558B4106566C; Wed, 13 Jan 2010 21:08:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 439918FC17; Wed, 13 Jan 2010 21:08:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DL8w89024975; Wed, 13 Jan 2010 21:08:58 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DL8wqN024973; Wed, 13 Jan 2010 21:08:58 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132108.o0DL8wqN024973@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202251 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:08:58 -0000 Author: marius Date: Wed Jan 13 21:08:57 2010 New Revision: 202251 URL: http://svn.freebsd.org/changeset/base/202251 Log: MFC: r200920 - Sort the prototypes. - Add macros to ease the access of device configuration space in ofw_pcibus_setup_device(). Modified: stable/8/sys/sparc64/pci/ofw_pcibus.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/pci/ofw_pcibus.c ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 21:08:57 2010 (r202250) +++ stable/8/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 21:08:57 2010 (r202251) @@ -64,11 +64,11 @@ static void ofw_pcibus_setup_device(devi u_int busno, u_int slot, u_int func); /* Methods */ -static device_probe_t ofw_pcibus_probe; +static bus_child_pnpinfo_str_t ofw_pcibus_pnpinfo_str; static device_attach_t ofw_pcibus_attach; -static pci_assign_interrupt_t ofw_pcibus_assign_interrupt; +static device_probe_t ofw_pcibus_probe; static ofw_bus_get_devinfo_t ofw_pcibus_get_devinfo; -static bus_child_pnpinfo_str_t ofw_pcibus_pnpinfo_str; +static pci_assign_interrupt_t ofw_pcibus_assign_interrupt; static device_method_t ofw_pcibus_methods[] = { /* Device interface */ @@ -124,6 +124,11 @@ static void ofw_pcibus_setup_device(device_t bridge, uint32_t clock, u_int busno, u_int slot, u_int func) { +#define CS_READ(n, w) \ + PCIB_READ_CONFIG(bridge, busno, slot, func, (n), (w)) +#define CS_WRITE(n, v, w) \ + PCIB_WRITE_CONFIG(bridge, busno, slot, func, (n), (v), (w)) + #ifndef SUN4V uint32_t reg; @@ -138,33 +143,27 @@ ofw_pcibus_setup_device(device_t bridge, * For bridges, we additionally set up the bridge control and the * secondary latency registers. */ - if ((PCIB_READ_CONFIG(bridge, busno, slot, func, PCIR_HDRTYPE, 1) & - PCIM_HDRTYPE) == PCIM_HDRTYPE_BRIDGE) { - reg = PCIB_READ_CONFIG(bridge, busno, slot, func, - PCIR_BRIDGECTL_1, 1); + if ((CS_READ(PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) == + PCIM_HDRTYPE_BRIDGE) { + reg = CS_READ(PCIR_BRIDGECTL_1, 1); reg |= PCIB_BCR_MASTER_ABORT_MODE | PCIB_BCR_SERR_ENABLE | PCIB_BCR_PERR_ENABLE; #ifdef OFW_PCI_DEBUG device_printf(bridge, "bridge %d/%d/%d: control 0x%x -> 0x%x\n", - busno, slot, func, PCIB_READ_CONFIG(bridge, busno, slot, - func, PCIR_BRIDGECTL_1, 1), reg); + busno, slot, func, CS_READ(PCIR_BRIDGECTL_1, 1), reg); #endif /* OFW_PCI_DEBUG */ - PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_BRIDGECTL_1, - reg, 1); + CS_WRITE(PCIR_BRIDGECTL_1, reg, 1); reg = OFW_PCI_LATENCY; #ifdef OFW_PCI_DEBUG device_printf(bridge, "bridge %d/%d/%d: latency timer %d -> %d\n", - busno, slot, func, PCIB_READ_CONFIG(bridge, busno, slot, - func, PCIR_SECLAT_1, 1), reg); + busno, slot, func, CS_READ(PCIR_SECLAT_1, 1), reg); #endif /* OFW_PCI_DEBUG */ - PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_SECLAT_1, - reg, 1); + CS_WRITE(PCIR_SECLAT_1, reg, 1); } else { - reg = PCIB_READ_CONFIG(bridge, busno, slot, func, - PCIR_MINGNT, 1); + reg = CS_READ(PCIR_MINGNT, 1); if (reg != 0) { switch (clock) { case 33000000: @@ -180,10 +179,9 @@ ofw_pcibus_setup_device(device_t bridge, } #ifdef OFW_PCI_DEBUG device_printf(bridge, "device %d/%d/%d: latency timer %d -> %d\n", - busno, slot, func, PCIB_READ_CONFIG(bridge, busno, slot, func, - PCIR_LATTIMER, 1), reg); + busno, slot, func, CS_READ(PCIR_LATTIMER, 1), reg); #endif /* OFW_PCI_DEBUG */ - PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_LATTIMER, reg, 1); + CS_WRITE(PCIR_LATTIMER, reg, 1); /* * Compute a value to write into the cache line size register. @@ -192,8 +190,7 @@ ofw_pcibus_setup_device(device_t bridge, * reached. Generally, the cache line size is fixed at 64 bytes * by Fireplane/Safari, JBus and UPA. */ - PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_CACHELNSZ, - STRBUF_LINESZ / sizeof(uint32_t), 1); + CS_WRITE(PCIR_CACHELNSZ, STRBUF_LINESZ / sizeof(uint32_t), 1); #endif /* @@ -201,8 +198,10 @@ ofw_pcibus_setup_device(device_t bridge, * it to 255, so that the PCI code will reroute the interrupt if * needed. */ - PCIB_WRITE_CONFIG(bridge, busno, slot, func, PCIR_INTLINE, - PCI_INVALID_IRQ, 1); + CS_WRITE(PCIR_INTLINE, PCI_INVALID_IRQ, 1); + +#undef CS_READ +#undef CS_WRITE } static int From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:12:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39BEF1065696; Wed, 13 Jan 2010 21:12:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C750E8FC17; Wed, 13 Jan 2010 21:12:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLCRZx025824; Wed, 13 Jan 2010 21:12:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLCRqm025822; Wed, 13 Jan 2010 21:12:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132112.o0DLCRqm025822@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:12:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202252 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:12:28 -0000 Author: marius Date: Wed Jan 13 21:12:27 2010 New Revision: 202252 URL: http://svn.freebsd.org/changeset/base/202252 Log: MFC: r200921 - Add quirk handling for ALi M5229, mainly setting the magic "force enable IDE I/O" bit which prevents data access traps with revision 0xc8 in Fire-based machines when pci(4) enables PCIM_CMD_PORTEN. - Like for sun4v also don't add the PCI side of host-PCIe bridges to the bus on sun4u as they don't have configuration space implement there either. Modified: stable/8/sys/sparc64/pci/ofw_pcibus.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/pci/ofw_pcibus.c ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 21:08:57 2010 (r202251) +++ stable/8/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 21:12:27 2010 (r202252) @@ -3,6 +3,7 @@ * Copyright (c) 2000, Michael Smith * Copyright (c) 2000, BSDi * Copyright (c) 2003, Thomas Moestl + * Copyright (c) 2005 - 2009 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -194,6 +195,22 @@ ofw_pcibus_setup_device(device_t bridge, #endif /* + * Ensure that ALi M5229 report the actual content of PCIR_PROGIF + * and that IDE I/O is force enabled. The former is done in order + * to have unique behavior across revisions as some default to + * hiding bits 4-6 for compliance with PCI 2.3. The latter is done + * as at least revision 0xc8 requires the PCIM_CMD_PORTEN bypass + * to be always enabled as otherwise even enabling PCIM_CMD_PORTEN + * results in an instant data access trap on Fire-based machines. + * Thus these quirks have to be handled before pci(4) adds the maps. + * Note that for older revisions bit 0 of register 0x50 enables the + * internal IDE function instead of force enabling IDE I/O. + */ + if ((CS_READ(PCIR_VENDOR, 2) == 0x10b9 && + CS_READ(PCIR_DEVICE, 2) == 0x5229)) + CS_WRITE(0x50, CS_READ(0x50, 1) | 0x3, 1); + + /* * The preset in the intline register is usually wrong. Reset * it to 255, so that the PCI code will reroute the interrupt if * needed. @@ -222,9 +239,14 @@ ofw_pcibus_attach(device_t dev) domain, busno); node = ofw_bus_get_node(dev); -#ifndef SUN4V - /* Add the PCI side of the HOST-PCI bridge itself to the bus. */ + /* + * Add the PCI side of the host-PCI bridge itself to the bus. + * Note that we exclude the host-PCIe bridges here as these + * have no configuration space implemented themselves. + */ if (strcmp(device_get_name(device_get_parent(pcib)), "nexus") == 0 && + ofw_bus_get_type(pcib) != NULL && + strcmp(ofw_bus_get_type(pcib), OFW_TYPE_PCIE) != 0 && (dinfo = (struct ofw_pcibus_devinfo *)pci_read_device(pcib, domain, busno, 0, 0, sizeof(*dinfo))) != NULL) { if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, node) != 0) @@ -232,7 +254,6 @@ ofw_pcibus_attach(device_t dev) else pci_add_child(dev, (struct pci_devinfo *)dinfo); } -#endif if (OF_getprop(ofw_bus_get_node(pcib), "clock-frequency", &clock, sizeof(clock)) == -1) From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:12:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48E111065698; Wed, 13 Jan 2010 21:12:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 372F78FC1F; Wed, 13 Jan 2010 21:12:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLCVWo025860; Wed, 13 Jan 2010 21:12:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLCVqo025858; Wed, 13 Jan 2010 21:12:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132112.o0DLCVqo025858@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202253 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:12:32 -0000 Author: marius Date: Wed Jan 13 21:12:31 2010 New Revision: 202253 URL: http://svn.freebsd.org/changeset/base/202253 Log: MFC: r200921 - Add quirk handling for ALi M5229, mainly setting the magic "force enable IDE I/O" bit which prevents data access traps with revision 0xc8 in Fire-based machines when pci(4) enables PCIM_CMD_PORTEN. - Like for sun4v also don't add the PCI side of host-PCIe bridges to the bus on sun4u as they don't have configuration space implement there either. Modified: stable/7/sys/sparc64/pci/ofw_pcibus.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/ofw_pcibus.c ============================================================================== --- stable/7/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 21:12:27 2010 (r202252) +++ stable/7/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 21:12:31 2010 (r202253) @@ -3,6 +3,7 @@ * Copyright (c) 2000, Michael Smith * Copyright (c) 2000, BSDi * Copyright (c) 2003, Thomas Moestl + * Copyright (c) 2005 - 2009 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -196,6 +197,22 @@ ofw_pcibus_setup_device(device_t bridge, #endif /* + * Ensure that ALi M5229 report the actual content of PCIR_PROGIF + * and that IDE I/O is force enabled. The former is done in order + * to have unique behavior across revisions as some default to + * hiding bits 4-6 for compliance with PCI 2.3. The latter is done + * as at least revision 0xc8 requires the PCIM_CMD_PORTEN bypass + * to be always enabled as otherwise even enabling PCIM_CMD_PORTEN + * results in an instant data access trap on Fire-based machines. + * Thus these quirks have to be handled before pci(4) adds the maps. + * Note that for older revisions bit 0 of register 0x50 enables the + * internal IDE function instead of force enabling IDE I/O. + */ + if ((CS_READ(PCIR_VENDOR, 2) == 0x10b9 && + CS_READ(PCIR_DEVICE, 2) == 0x5229)) + CS_WRITE(0x50, CS_READ(0x50, 1) | 0x3, 1); + + /* * The preset in the intline register is usually wrong. Reset * it to 255, so that the PCI code will reroute the interrupt if * needed. @@ -224,9 +241,14 @@ ofw_pcibus_attach(device_t dev) domain, busno); node = ofw_bus_get_node(dev); -#ifndef SUN4V - /* Add the PCI side of the HOST-PCI bridge itself to the bus. */ + /* + * Add the PCI side of the host-PCI bridge itself to the bus. + * Note that we exclude the host-PCIe bridges here as these + * have no configuration space implemented themselves. + */ if (strcmp(device_get_name(device_get_parent(pcib)), "nexus") == 0 && + ofw_bus_get_type(pcib) != NULL && + strcmp(ofw_bus_get_type(pcib), OFW_TYPE_PCIE) != 0 && (dinfo = (struct ofw_pcibus_devinfo *)pci_read_device(pcib, domain, busno, 0, 0, sizeof(*dinfo))) != NULL) { if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, node) != 0) @@ -234,7 +256,6 @@ ofw_pcibus_attach(device_t dev) else pci_add_child(dev, (struct pci_devinfo *)dinfo); } -#endif if (OF_getprop(ofw_bus_get_node(pcib), "clock-frequency", &clock, sizeof(clock)) == -1) From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:13:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F63610656A3; Wed, 13 Jan 2010 21:13:50 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E1498FC0C; Wed, 13 Jan 2010 21:13:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLDocG026223; Wed, 13 Jan 2010 21:13:50 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLDoGP026221; Wed, 13 Jan 2010 21:13:50 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132113.o0DLDoGP026221@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202254 - stable/8/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:13:50 -0000 Author: marius Date: Wed Jan 13 21:13:50 2010 New Revision: 202254 URL: http://svn.freebsd.org/changeset/base/202254 Log: MFC: r200922 Fix whitespace according to style(9). Modified: stable/8/sys/sparc64/include/iommureg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/include/iommureg.h ============================================================================== --- stable/8/sys/sparc64/include/iommureg.h Wed Jan 13 21:12:31 2010 (r202253) +++ stable/8/sys/sparc64/include/iommureg.h Wed Jan 13 21:13:50 2010 (r202254) @@ -37,7 +37,7 @@ */ #ifndef _MACHINE_IOMMUREG_H_ -#define _MACHINE_IOMMUREG_H_ +#define _MACHINE_IOMMUREG_H_ /* * UltraSPARC IOMMU registers, common to both the PCI and SBus @@ -61,9 +61,9 @@ #define ISD_LN_TAG_DIAG 0x0900 /* streaming buffer line tag diag 0..15 */ /* streaming buffer control register */ -#define STRBUF_EN 0x0000000000000001UL -#define STRBUF_D 0x0000000000000002UL -#define STRBUF_RR_DIS 0x0000000000000004UL +#define STRBUF_EN 0x0000000000000001UL +#define STRBUF_D 0x0000000000000002UL +#define STRBUF_RR_DIS 0x0000000000000004UL #define IOMMU_MAXADDR(bits) ((1UL << (bits)) - 1) @@ -72,24 +72,24 @@ */ /* Nummber of entries in IOTSB */ #define IOMMUCR_TSBSZ_SHIFT 16 -#define IOMMUCR_TSB1K 0x0000000000000000UL -#define IOMMUCR_TSB2K 0x0000000000010000UL -#define IOMMUCR_TSB4K 0x0000000000020000UL -#define IOMMUCR_TSB8K 0x0000000000030000UL -#define IOMMUCR_TSB16K 0x0000000000040000UL -#define IOMMUCR_TSB32K 0x0000000000050000UL -#define IOMMUCR_TSB64K 0x0000000000060000UL -#define IOMMUCR_TSB128K 0x0000000000070000UL +#define IOMMUCR_TSB1K 0x0000000000000000UL +#define IOMMUCR_TSB2K 0x0000000000010000UL +#define IOMMUCR_TSB4K 0x0000000000020000UL +#define IOMMUCR_TSB8K 0x0000000000030000UL +#define IOMMUCR_TSB16K 0x0000000000040000UL +#define IOMMUCR_TSB32K 0x0000000000050000UL +#define IOMMUCR_TSB64K 0x0000000000060000UL +#define IOMMUCR_TSB128K 0x0000000000070000UL /* Mask for above */ -#define IOMMUCR_TSBMASK 0xfffffffffff8ffffUL +#define IOMMUCR_TSBMASK 0xfffffffffff8ffffUL /* 8K iommu page size */ -#define IOMMUCR_8KPG 0x0000000000000000UL +#define IOMMUCR_8KPG 0x0000000000000000UL /* 64K iommu page size */ -#define IOMMUCR_64KPG 0x0000000000000004UL +#define IOMMUCR_64KPG 0x0000000000000004UL /* Diag enable */ -#define IOMMUCR_DE 0x0000000000000002UL +#define IOMMUCR_DE 0x0000000000000002UL /* Enable IOMMU */ -#define IOMMUCR_EN 0x0000000000000001UL +#define IOMMUCR_EN 0x0000000000000001UL /* * Diagnostic register definitions @@ -97,9 +97,9 @@ #define IOMMU_DTAG_VPNBITS 19 #define IOMMU_DTAG_VPNMASK ((1 << IOMMU_DTAG_VPNBITS) - 1) #define IOMMU_DTAG_VPNSHIFT 13 -#define IOMMU_DTAG_ERRBITS 3 +#define IOMMU_DTAG_ERRBITS 3 #define IOMMU_DTAG_ERRSHIFT 22 -#define IOMMU_DTAG_ERRMASK \ +#define IOMMU_DTAG_ERRMASK \ (((1 << IOMMU_DTAG_ERRBITS) - 1) << IOMMU_DTAG_ERRSHIFT) #define IOMMU_DDATA_PGBITS 21 @@ -114,18 +114,18 @@ /* Entry valid */ #define IOTTE_V 0x8000000000000000UL /* 8K or 64K page? */ -#define IOTTE_64K 0x2000000000000000UL -#define IOTTE_8K 0x0000000000000000UL +#define IOTTE_64K 0x2000000000000000UL +#define IOTTE_8K 0x0000000000000000UL /* Is page streamable? */ -#define IOTTE_STREAM 0x1000000000000000UL +#define IOTTE_STREAM 0x1000000000000000UL /* Accesses to same bus segment? */ #define IOTTE_LOCAL 0x0800000000000000UL /* Let's assume this is correct */ -#define IOTTE_PAMASK 0x000007ffffffe000UL +#define IOTTE_PAMASK 0x000007ffffffe000UL /* Accesses to cacheable space */ -#define IOTTE_C 0x0000000000000010UL +#define IOTTE_C 0x0000000000000010UL /* Writeable */ -#define IOTTE_W 0x0000000000000002UL +#define IOTTE_W 0x0000000000000002UL /* log2 of the IOMMU TTE size */ #define IOTTE_SHIFT 3 @@ -167,14 +167,14 @@ */ #define IOTSB_BASESZ (1024 << IOTTE_SHIFT) -#define IOTSB_VEND (~IO_PAGE_MASK) -#define IOTSB_VSTART(sz) (u_int)(IOTSB_VEND << ((sz) + 10)) +#define IOTSB_VEND (~IO_PAGE_MASK) +#define IOTSB_VSTART(sz) (u_int)(IOTSB_VEND << ((sz) + 10)) -#define MAKEIOTTE(pa,w,c,s) \ +#define MAKEIOTTE(pa, w, c, s) \ (((pa) & IOTTE_PAMASK) | ((w) ? IOTTE_W : 0) | \ ((c) ? IOTTE_C : 0) | ((s) ? IOTTE_STREAM : 0) | \ (IOTTE_V | IOTTE_8K)) -#define IOTSBSLOT(va) \ +#define IOTSBSLOT(va) \ ((u_int)(((vm_offset_t)(va)) - (is->is_dvmabase)) >> IO_PAGE_SHIFT) #endif /* !_MACHINE_IOMMUREG_H_ */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:13:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7784106566C; Wed, 13 Jan 2010 21:13:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1DB08FC2E; Wed, 13 Jan 2010 21:13:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLDppT026256; Wed, 13 Jan 2010 21:13:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLDpi1026254; Wed, 13 Jan 2010 21:13:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132113.o0DLDpi1026254@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202255 - stable/7/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:13:52 -0000 Author: marius Date: Wed Jan 13 21:13:51 2010 New Revision: 202255 URL: http://svn.freebsd.org/changeset/base/202255 Log: MFC: r200922 Fix whitespace according to style(9). Modified: stable/7/sys/sparc64/include/iommureg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/iommureg.h ============================================================================== --- stable/7/sys/sparc64/include/iommureg.h Wed Jan 13 21:13:50 2010 (r202254) +++ stable/7/sys/sparc64/include/iommureg.h Wed Jan 13 21:13:51 2010 (r202255) @@ -37,7 +37,7 @@ */ #ifndef _MACHINE_IOMMUREG_H_ -#define _MACHINE_IOMMUREG_H_ +#define _MACHINE_IOMMUREG_H_ /* * UltraSPARC IOMMU registers, common to both the PCI and SBus @@ -61,9 +61,9 @@ #define ISD_LN_TAG_DIAG 0x0900 /* streaming buffer line tag diag 0..15 */ /* streaming buffer control register */ -#define STRBUF_EN 0x0000000000000001UL -#define STRBUF_D 0x0000000000000002UL -#define STRBUF_RR_DIS 0x0000000000000004UL +#define STRBUF_EN 0x0000000000000001UL +#define STRBUF_D 0x0000000000000002UL +#define STRBUF_RR_DIS 0x0000000000000004UL #define IOMMU_MAXADDR(bits) ((1UL << (bits)) - 1) @@ -72,24 +72,24 @@ */ /* Nummber of entries in IOTSB */ #define IOMMUCR_TSBSZ_SHIFT 16 -#define IOMMUCR_TSB1K 0x0000000000000000UL -#define IOMMUCR_TSB2K 0x0000000000010000UL -#define IOMMUCR_TSB4K 0x0000000000020000UL -#define IOMMUCR_TSB8K 0x0000000000030000UL -#define IOMMUCR_TSB16K 0x0000000000040000UL -#define IOMMUCR_TSB32K 0x0000000000050000UL -#define IOMMUCR_TSB64K 0x0000000000060000UL -#define IOMMUCR_TSB128K 0x0000000000070000UL +#define IOMMUCR_TSB1K 0x0000000000000000UL +#define IOMMUCR_TSB2K 0x0000000000010000UL +#define IOMMUCR_TSB4K 0x0000000000020000UL +#define IOMMUCR_TSB8K 0x0000000000030000UL +#define IOMMUCR_TSB16K 0x0000000000040000UL +#define IOMMUCR_TSB32K 0x0000000000050000UL +#define IOMMUCR_TSB64K 0x0000000000060000UL +#define IOMMUCR_TSB128K 0x0000000000070000UL /* Mask for above */ -#define IOMMUCR_TSBMASK 0xfffffffffff8ffffUL +#define IOMMUCR_TSBMASK 0xfffffffffff8ffffUL /* 8K iommu page size */ -#define IOMMUCR_8KPG 0x0000000000000000UL +#define IOMMUCR_8KPG 0x0000000000000000UL /* 64K iommu page size */ -#define IOMMUCR_64KPG 0x0000000000000004UL +#define IOMMUCR_64KPG 0x0000000000000004UL /* Diag enable */ -#define IOMMUCR_DE 0x0000000000000002UL +#define IOMMUCR_DE 0x0000000000000002UL /* Enable IOMMU */ -#define IOMMUCR_EN 0x0000000000000001UL +#define IOMMUCR_EN 0x0000000000000001UL /* * Diagnostic register definitions @@ -97,9 +97,9 @@ #define IOMMU_DTAG_VPNBITS 19 #define IOMMU_DTAG_VPNMASK ((1 << IOMMU_DTAG_VPNBITS) - 1) #define IOMMU_DTAG_VPNSHIFT 13 -#define IOMMU_DTAG_ERRBITS 3 +#define IOMMU_DTAG_ERRBITS 3 #define IOMMU_DTAG_ERRSHIFT 22 -#define IOMMU_DTAG_ERRMASK \ +#define IOMMU_DTAG_ERRMASK \ (((1 << IOMMU_DTAG_ERRBITS) - 1) << IOMMU_DTAG_ERRSHIFT) #define IOMMU_DDATA_PGBITS 21 @@ -114,18 +114,18 @@ /* Entry valid */ #define IOTTE_V 0x8000000000000000UL /* 8K or 64K page? */ -#define IOTTE_64K 0x2000000000000000UL -#define IOTTE_8K 0x0000000000000000UL +#define IOTTE_64K 0x2000000000000000UL +#define IOTTE_8K 0x0000000000000000UL /* Is page streamable? */ -#define IOTTE_STREAM 0x1000000000000000UL +#define IOTTE_STREAM 0x1000000000000000UL /* Accesses to same bus segment? */ #define IOTTE_LOCAL 0x0800000000000000UL /* Let's assume this is correct */ -#define IOTTE_PAMASK 0x000007ffffffe000UL +#define IOTTE_PAMASK 0x000007ffffffe000UL /* Accesses to cacheable space */ -#define IOTTE_C 0x0000000000000010UL +#define IOTTE_C 0x0000000000000010UL /* Writeable */ -#define IOTTE_W 0x0000000000000002UL +#define IOTTE_W 0x0000000000000002UL /* log2 of the IOMMU TTE size */ #define IOTTE_SHIFT 3 @@ -167,14 +167,14 @@ */ #define IOTSB_BASESZ (1024 << IOTTE_SHIFT) -#define IOTSB_VEND (~IO_PAGE_MASK) -#define IOTSB_VSTART(sz) (u_int)(IOTSB_VEND << ((sz) + 10)) +#define IOTSB_VEND (~IO_PAGE_MASK) +#define IOTSB_VSTART(sz) (u_int)(IOTSB_VEND << ((sz) + 10)) -#define MAKEIOTTE(pa,w,c,s) \ +#define MAKEIOTTE(pa, w, c, s) \ (((pa) & IOTTE_PAMASK) | ((w) ? IOTTE_W : 0) | \ ((c) ? IOTTE_C : 0) | ((s) ? IOTTE_STREAM : 0) | \ (IOTTE_V | IOTTE_8K)) -#define IOTSBSLOT(va) \ +#define IOTSBSLOT(va) \ ((u_int)(((vm_offset_t)(va)) - (is->is_dvmabase)) >> IO_PAGE_SHIFT) #endif /* !_MACHINE_IOMMUREG_H_ */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:16:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63127106566B; Wed, 13 Jan 2010 21:16:07 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 507B78FC17; Wed, 13 Jan 2010 21:16:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLG7A9026843; Wed, 13 Jan 2010 21:16:07 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLG7I9026839; Wed, 13 Jan 2010 21:16:07 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132116.o0DLG7I9026839@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202256 - in stable/8/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:16:07 -0000 Author: marius Date: Wed Jan 13 21:16:07 2010 New Revision: 202256 URL: http://svn.freebsd.org/changeset/base/202256 Log: MFC: r200923 - Add support for the IOMMUs of Fire JBus to PCIe and Oberon Uranus to PCIe bridges. - Add support for talking the PROM mappings over to the kernel IOTSB just like we do with the kernel TSB in order to allow OFW drivers to continue to work. - Change some members, parameters and variables to unsigned where more appropriate. Modified: stable/8/sys/sparc64/include/iommureg.h stable/8/sys/sparc64/include/iommuvar.h stable/8/sys/sparc64/sparc64/iommu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/include/iommureg.h ============================================================================== --- stable/8/sys/sparc64/include/iommureg.h Wed Jan 13 21:13:51 2010 (r202255) +++ stable/8/sys/sparc64/include/iommureg.h Wed Jan 13 21:16:07 2010 (r202256) @@ -44,10 +44,13 @@ * controllers. */ -/* iommmu registers */ +/* IOMMU registers */ #define IMR_CTL 0x0000 /* IOMMU control register */ #define IMR_TSB 0x0008 /* IOMMU TSB base register */ #define IMR_FLUSH 0x0010 /* IOMMU flush register */ +/* The TTE Cache is Fire and Oberon only. */ +#define IMR_CACHE_FLUSH 0x0100 /* IOMMU TTE cache flush address register */ +#define IMR_CACHE_INVAL 0x0108 /* IOMMU TTE cache invalidate register */ /* streaming buffer registers */ #define ISR_CTL 0x0000 /* streaming buffer control reg */ @@ -70,28 +73,57 @@ /* * control register bits */ -/* Nummber of entries in IOTSB */ +/* Nummber of entries in the IOTSB - pre-Fire only */ +#define IOMMUCR_TSBSZ_MASK 0x0000000000070000UL #define IOMMUCR_TSBSZ_SHIFT 16 -#define IOMMUCR_TSB1K 0x0000000000000000UL -#define IOMMUCR_TSB2K 0x0000000000010000UL -#define IOMMUCR_TSB4K 0x0000000000020000UL -#define IOMMUCR_TSB8K 0x0000000000030000UL -#define IOMMUCR_TSB16K 0x0000000000040000UL -#define IOMMUCR_TSB32K 0x0000000000050000UL -#define IOMMUCR_TSB64K 0x0000000000060000UL -#define IOMMUCR_TSB128K 0x0000000000070000UL -/* Mask for above */ -#define IOMMUCR_TSBMASK 0xfffffffffff8ffffUL -/* 8K iommu page size */ +/* TSB cache snoop enable */ +#define IOMMUCR_SE 0x0000000000000400UL +/* Cache modes - Fire and Oberon */ +#define IOMMUCR_CM_NC_TLB_TBW 0x0000000000000000UL +#define IOMMUCR_CM_LC_NTLB_NTBW 0x0000000000000100UL +#define IOMMUCR_CM_LC_TLB_TBW 0x0000000000000200UL +#define IOMMUCR_CM_C_TLB_TBW 0x0000000000000300UL +/* IOMMU page size - pre-Fire only */ #define IOMMUCR_8KPG 0x0000000000000000UL -/* 64K iommu page size */ #define IOMMUCR_64KPG 0x0000000000000004UL -/* Diag enable */ +/* Bypass enable - Fire and Oberon */ +#define IOMMUCR_BE 0x0000000000000002UL +/* Diagnostic mode enable - pre-Fire only */ #define IOMMUCR_DE 0x0000000000000002UL -/* Enable IOMMU */ +/* IOMMU/translation enable */ #define IOMMUCR_EN 0x0000000000000001UL /* + * TSB base register bits + */ + /* TSB base address */ +#define IOMMUTB_TB_MASK 0x000007ffffffe000UL +#define IOMMUTB_TB_SHIFT 13 +/* IOMMU page size - Fire and Oberon */ +#define IOMMUTB_8KPG 0x0000000000000000UL +#define IOMMUTB_64KPG 0x0000000000000100UL +/* Nummber of entries in the IOTSB - Fire and Oberon */ +#define IOMMUTB_TSBSZ_MASK 0x0000000000000004UL +#define IOMMUTB_TSBSZ_SHIFT 0 + +/* + * TSB size definitions for both control and TSB base register */ +#define IOMMU_TSB1K 0 +#define IOMMU_TSB2K 1 +#define IOMMU_TSB4K 2 +#define IOMMU_TSB8K 3 +#define IOMMU_TSB16K 4 +#define IOMMU_TSB32K 5 +#define IOMMU_TSB64K 6 +#define IOMMU_TSB128K 7 +/* Fire and Oberon */ +#define IOMMU_TSB256K 8 +/* Fire and Oberon */ +#define IOMMU_TSB512K 9 +#define IOMMU_TSBENTRIES(tsbsz) \ + ((1 << (tsbsz)) << (IO_PAGE_SHIFT - IOTTE_SHIFT)) + +/* * Diagnostic register definitions */ #define IOMMU_DTAG_VPNBITS 19 @@ -113,16 +145,16 @@ */ /* Entry valid */ #define IOTTE_V 0x8000000000000000UL -/* 8K or 64K page? */ +/* Page size - pre-Fire only */ #define IOTTE_64K 0x2000000000000000UL #define IOTTE_8K 0x0000000000000000UL -/* Is page streamable? */ +/* Streamable page - streaming buffer equipped variants only */ #define IOTTE_STREAM 0x1000000000000000UL -/* Accesses to same bus segment? */ +/* Accesses to the same bus segment - SBus only */ #define IOTTE_LOCAL 0x0800000000000000UL -/* Let's assume this is correct */ -#define IOTTE_PAMASK 0x000007ffffffe000UL -/* Accesses to cacheable space */ +/* Physical address mask (based on Oberon) */ +#define IOTTE_PAMASK 0x00007fffffffe000UL +/* Accesses to cacheable space - pre-Fire only */ #define IOTTE_C 0x0000000000000010UL /* Writeable */ #define IOTTE_W 0x0000000000000002UL Modified: stable/8/sys/sparc64/include/iommuvar.h ============================================================================== --- stable/8/sys/sparc64/include/iommuvar.h Wed Jan 13 21:13:51 2010 (r202255) +++ stable/8/sys/sparc64/include/iommuvar.h Wed Jan 13 21:16:07 2010 (r202256) @@ -66,10 +66,10 @@ struct iommu_state { int is_tsbsize; /* (r) 0 = 8K, ... */ uint64_t is_pmaxaddr; /* (r) max. physical address */ uint64_t is_dvmabase; /* (r) */ - int64_t is_cr; /* (r) Control reg value */ + uint64_t is_cr; /* (r) Control reg value */ vm_paddr_t is_flushpa[2]; /* (r) */ - volatile int64_t *is_flushva[2]; /* (r, *i) */ + volatile uint64_t *is_flushva[2]; /* (r, *i) */ /* * (i) * When a flush is completed, 64 bytes will be stored at the given @@ -99,11 +99,14 @@ struct iommu_state { /* behavior flags */ u_int is_flags; /* (r) */ #define IOMMU_RERUN_DISABLE (1 << 0) +#define IOMMU_FIRE (1 << 1) +#define IOMMU_FLUSH_CACHE (1 << 2) +#define IOMMU_PRESERVE_PROM (1 << 3) }; /* interfaces for PCI/SBus code */ -void iommu_init(const char *name, struct iommu_state *is, int tsbsize, - uint32_t iovabase, int resvpg); +void iommu_init(const char *name, struct iommu_state *is, u_int tsbsize, + uint32_t iovabase, u_int resvpg); void iommu_reset(struct iommu_state *is); void iommu_decode_fault(struct iommu_state *is, vm_offset_t phys); Modified: stable/8/sys/sparc64/sparc64/iommu.c ============================================================================== --- stable/8/sys/sparc64/sparc64/iommu.c Wed Jan 13 21:13:51 2010 (r202255) +++ stable/8/sys/sparc64/sparc64/iommu.c Wed Jan 13 21:16:07 2010 (r202256) @@ -138,11 +138,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include +#include #include @@ -212,6 +214,12 @@ static __inline void iommu_tlb_flush(struct iommu_state *is, bus_addr_t va) { + if ((is->is_flags & IOMMU_FIRE) != 0) + /* + * Direct page flushing is not supported and also not + * necessary due to cache snooping. + */ + return; IOMMU_WRITE8(is, is_iommu, IMR_FLUSH, va); } @@ -282,18 +290,19 @@ iommu_map_remq(struct iommu_state *is, b * - create a private DVMA map. */ void -iommu_init(const char *name, struct iommu_state *is, int tsbsize, - uint32_t iovabase, int resvpg) +iommu_init(const char *name, struct iommu_state *is, u_int tsbsize, + uint32_t iovabase, u_int resvpg) { vm_size_t size; vm_offset_t offs; - uint64_t end; + uint64_t end, obpmap, obpptsb, tte; + u_int maxtsbsize, obptsbentries, obptsbsize, slot, tsbentries; int i; /* - * Setup the iommu. + * Setup the IOMMU. * - * The sun4u iommu is part of the PCI or SBus controller so we + * The sun4u IOMMU is part of the PCI or SBus controller so we * will deal with it here.. * * The IOMMU address space always ends at 0xffffe000, but the starting @@ -301,16 +310,30 @@ iommu_init(const char *name, struct iomm * is->is_tsbsize entries, where each entry is 8 bytes. The start of * the map can be calculated by (0xffffe000 << (8 + is->is_tsbsize)). */ - is->is_cr = (tsbsize << IOMMUCR_TSBSZ_SHIFT) | IOMMUCR_EN; + if ((is->is_flags & IOMMU_FIRE) != 0) { + maxtsbsize = IOMMU_TSB512K; + /* + * We enable bypass in order to be able to use a physical + * address for the event queue base. + */ + is->is_cr = IOMMUCR_SE | IOMMUCR_CM_C_TLB_TBW | IOMMUCR_BE; + } else { + maxtsbsize = IOMMU_TSB128K; + is->is_cr = (tsbsize << IOMMUCR_TSBSZ_SHIFT) | IOMMUCR_DE; + } + if (tsbsize > maxtsbsize) + panic("%s: unsupported TSB size ", __func__); + tsbentries = IOMMU_TSBENTRIES(tsbsize); + is->is_cr |= IOMMUCR_EN; is->is_tsbsize = tsbsize; is->is_dvmabase = iovabase; if (iovabase == -1) is->is_dvmabase = IOTSB_VSTART(is->is_tsbsize); size = IOTSB_BASESZ << is->is_tsbsize; - printf("%s: DVMA map: %#lx to %#lx%s\n", name, + printf("%s: DVMA map: %#lx to %#lx %d entries%s\n", name, is->is_dvmabase, is->is_dvmabase + - (size << (IO_PAGE_SHIFT - IOTTE_SHIFT)) - 1, + (size << (IO_PAGE_SHIFT - IOTTE_SHIFT)) - 1, tsbentries, IOMMU_HAS_SB(is) ? ", streaming buffer" : ""); /* @@ -333,12 +356,54 @@ iommu_init(const char *name, struct iomm */ is->is_tsb = contigmalloc(size, M_DEVBUF, M_NOWAIT, 0, ~0UL, PAGE_SIZE, 0); - if (is->is_tsb == 0) + if (is->is_tsb == NULL) panic("%s: contigmalloc failed", __func__); is->is_ptsb = pmap_kextract((vm_offset_t)is->is_tsb); bzero(is->is_tsb, size); /* + * Add the PROM mappings to the kernel IOTSB if desired. + * Note that the firmware of certain Darwin boards doesn't set + * the TSB size correctly. + */ + if ((is->is_flags & IOMMU_FIRE) != 0) + obptsbsize = (IOMMU_READ8(is, is_iommu, IMR_TSB) & + IOMMUTB_TSBSZ_MASK) >> IOMMUTB_TSBSZ_SHIFT; + else + obptsbsize = (IOMMU_READ8(is, is_iommu, IMR_CTL) & + IOMMUCR_TSBSZ_MASK) >> IOMMUCR_TSBSZ_SHIFT; + obptsbentries = IOMMU_TSBENTRIES(obptsbsize); + if (bootverbose) + printf("%s: PROM IOTSB size: %d (%d entries)\n", name, + obptsbsize, obptsbentries); + if ((is->is_flags & IOMMU_PRESERVE_PROM) != 0 && + !(cpu_impl == CPU_IMPL_ULTRASPARCIIi && obptsbsize == 7)) { + if (obptsbentries > tsbentries) + panic("%s: PROM IOTSB entries exceed kernel", + __func__); + obpptsb = IOMMU_READ8(is, is_iommu, IMR_TSB) & + IOMMUTB_TB_MASK; + for (i = 0; i < obptsbentries; i++) { + tte = ldxa(obpptsb + i * 8, ASI_PHYS_USE_EC); + if ((tte & IOTTE_V) == 0) + continue; + slot = tsbentries - obptsbentries + i; + if (bootverbose) + printf("%s: adding PROM IOTSB slot %d " + "(kernel slot %d) TTE: %#lx\n", name, + i, slot, tte); + obpmap = (is->is_dvmabase + slot * IO_PAGE_SIZE) >> + IO_PAGE_SHIFT; + if (rman_reserve_resource(&is->is_dvma_rman, obpmap, + obpmap, IO_PAGE_SIZE >> IO_PAGE_SHIFT, RF_ACTIVE, + NULL) == NULL) + panic("%s: could not reserve PROM IOTSB slot " + "%d (kernel slot %d)", __func__, i, slot); + is->is_tsb[slot] = tte; + } + } + + /* * Initialize streaming buffer, if it is there. */ if (IOMMU_HAS_SB(is)) { @@ -349,7 +414,7 @@ iommu_init(const char *name, struct iomm offs = roundup2((vm_offset_t)is->is_flush, STRBUF_FLUSHSYNC_NBYTES); for (i = 0; i < 2; i++, offs += STRBUF_FLUSHSYNC_NBYTES) { - is->is_flushva[i] = (int64_t *)offs; + is->is_flushva[i] = (uint64_t *)offs; is->is_flushpa[i] = pmap_kextract(offs); } } @@ -368,11 +433,16 @@ iommu_init(const char *name, struct iomm void iommu_reset(struct iommu_state *is) { + uint64_t tsb; int i; - IOMMU_WRITE8(is, is_iommu, IMR_TSB, is->is_ptsb); - /* Enable IOMMU in diagnostic mode */ - IOMMU_WRITE8(is, is_iommu, IMR_CTL, is->is_cr | IOMMUCR_DE); + tsb = is->is_ptsb; + if ((is->is_flags & IOMMU_FIRE) != 0) { + tsb |= is->is_tsbsize; + IOMMU_WRITE8(is, is_iommu, IMR_CACHE_INVAL, ~0ULL); + } + IOMMU_WRITE8(is, is_iommu, IMR_TSB, tsb); + IOMMU_WRITE8(is, is_iommu, IMR_CTL, is->is_cr); for (i = 0; i < 2; i++) { if (is->is_sb[i] != 0) { @@ -386,6 +456,8 @@ iommu_reset(struct iommu_state *is) is->is_sb[i] = 0; } } + + (void)IOMMU_READ8(is, is_iommu, IMR_CTL); } /* @@ -396,7 +468,7 @@ static void iommu_enter(struct iommu_state *is, vm_offset_t va, vm_paddr_t pa, int stream, int flags) { - int64_t tte; + uint64_t tte; KASSERT(va >= is->is_dvmabase, ("%s: va %#lx not in DVMA space", __func__, va)); @@ -423,7 +495,7 @@ iommu_enter(struct iommu_state *is, vm_o static int iommu_remove(struct iommu_state *is, vm_offset_t va, vm_size_t len) { - int streamed = 0; + int slot, streamed = 0; #ifdef IOMMU_DIAG iommu_diag(is, va); @@ -443,6 +515,12 @@ iommu_remove(struct iommu_state *is, vm_ len -= ulmin(len, IO_PAGE_SIZE); IOMMU_SET_TTE(is, va, 0); iommu_tlb_flush(is, va); + if ((is->is_flags & IOMMU_FLUSH_CACHE) != 0) { + slot = IOTSBSLOT(va); + if (len <= IO_PAGE_SIZE || slot % 8 == 7) + IOMMU_WRITE8(is, is_iommu, IMR_CACHE_FLUSH, + is->is_ptsb + slot * 8); + } va += IO_PAGE_SIZE; } return (streamed); @@ -829,12 +907,13 @@ iommu_dvmamap_load_buffer(bus_dma_tag_t bus_dmamap_t map, void *buf, bus_size_t buflen, struct thread *td, int flags, bus_dma_segment_t *segs, int *segp, int align) { - bus_addr_t amask, dvmaddr; + bus_addr_t amask, dvmaddr, dvmoffs; bus_size_t sgsize, esize; vm_offset_t vaddr, voffs; vm_paddr_t curaddr; pmap_t pmap = NULL; int error, firstpg, sgcnt; + u_int slot; KASSERT(buflen != 0, ("%s: buflen == 0!", __func__)); if (buflen > dt->dt_maxsize) @@ -877,8 +956,15 @@ iommu_dvmamap_load_buffer(bus_dma_tag_t buflen -= sgsize; vaddr += sgsize; - iommu_enter(is, trunc_io_page(dvmaddr), trunc_io_page(curaddr), + dvmoffs = trunc_io_page(dvmaddr); + iommu_enter(is, dvmoffs, trunc_io_page(curaddr), (map->dm_flags & DMF_STREAMED) != 0, flags); + if ((is->is_flags & IOMMU_FLUSH_CACHE) != 0) { + slot = IOTSBSLOT(dvmoffs); + if (buflen <= 0 || slot % 8 == 7) + IOMMU_WRITE8(is, is_iommu, IMR_CACHE_FLUSH, + is->is_ptsb + slot * 8); + } /* * Chop the chunk up into segments of at most maxsegsz, but try @@ -1183,6 +1269,8 @@ iommu_diag(struct iommu_state *is, vm_of int i; uint64_t data, tag; + if ((is->is_flags & IOMMU_FIRE) != 0) + return; IS_LOCK_ASSERT(is); IOMMU_WRITE8(is, is_dva, 0, trunc_io_page(va)); membar(StoreStore | StoreLoad); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:16:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF794106575C; Wed, 13 Jan 2010 21:16:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB7ED8FC12; Wed, 13 Jan 2010 21:16:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLGDeL026913; Wed, 13 Jan 2010 21:16:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLGDEa026909; Wed, 13 Jan 2010 21:16:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132116.o0DLGDEa026909@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:16:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202257 - in stable/7/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:16:14 -0000 Author: marius Date: Wed Jan 13 21:16:13 2010 New Revision: 202257 URL: http://svn.freebsd.org/changeset/base/202257 Log: MFC: r200923 - Add support for the IOMMUs of Fire JBus to PCIe and Oberon Uranus to PCIe bridges. - Add support for talking the PROM mappings over to the kernel IOTSB just like we do with the kernel TSB in order to allow OFW drivers to continue to work. - Change some members, parameters and variables to unsigned where more appropriate. Modified: stable/7/sys/sparc64/include/iommureg.h stable/7/sys/sparc64/include/iommuvar.h stable/7/sys/sparc64/sparc64/iommu.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/iommureg.h ============================================================================== --- stable/7/sys/sparc64/include/iommureg.h Wed Jan 13 21:16:07 2010 (r202256) +++ stable/7/sys/sparc64/include/iommureg.h Wed Jan 13 21:16:13 2010 (r202257) @@ -44,10 +44,13 @@ * controllers. */ -/* iommmu registers */ +/* IOMMU registers */ #define IMR_CTL 0x0000 /* IOMMU control register */ #define IMR_TSB 0x0008 /* IOMMU TSB base register */ #define IMR_FLUSH 0x0010 /* IOMMU flush register */ +/* The TTE Cache is Fire and Oberon only. */ +#define IMR_CACHE_FLUSH 0x0100 /* IOMMU TTE cache flush address register */ +#define IMR_CACHE_INVAL 0x0108 /* IOMMU TTE cache invalidate register */ /* streaming buffer registers */ #define ISR_CTL 0x0000 /* streaming buffer control reg */ @@ -70,28 +73,57 @@ /* * control register bits */ -/* Nummber of entries in IOTSB */ +/* Nummber of entries in the IOTSB - pre-Fire only */ +#define IOMMUCR_TSBSZ_MASK 0x0000000000070000UL #define IOMMUCR_TSBSZ_SHIFT 16 -#define IOMMUCR_TSB1K 0x0000000000000000UL -#define IOMMUCR_TSB2K 0x0000000000010000UL -#define IOMMUCR_TSB4K 0x0000000000020000UL -#define IOMMUCR_TSB8K 0x0000000000030000UL -#define IOMMUCR_TSB16K 0x0000000000040000UL -#define IOMMUCR_TSB32K 0x0000000000050000UL -#define IOMMUCR_TSB64K 0x0000000000060000UL -#define IOMMUCR_TSB128K 0x0000000000070000UL -/* Mask for above */ -#define IOMMUCR_TSBMASK 0xfffffffffff8ffffUL -/* 8K iommu page size */ +/* TSB cache snoop enable */ +#define IOMMUCR_SE 0x0000000000000400UL +/* Cache modes - Fire and Oberon */ +#define IOMMUCR_CM_NC_TLB_TBW 0x0000000000000000UL +#define IOMMUCR_CM_LC_NTLB_NTBW 0x0000000000000100UL +#define IOMMUCR_CM_LC_TLB_TBW 0x0000000000000200UL +#define IOMMUCR_CM_C_TLB_TBW 0x0000000000000300UL +/* IOMMU page size - pre-Fire only */ #define IOMMUCR_8KPG 0x0000000000000000UL -/* 64K iommu page size */ #define IOMMUCR_64KPG 0x0000000000000004UL -/* Diag enable */ +/* Bypass enable - Fire and Oberon */ +#define IOMMUCR_BE 0x0000000000000002UL +/* Diagnostic mode enable - pre-Fire only */ #define IOMMUCR_DE 0x0000000000000002UL -/* Enable IOMMU */ +/* IOMMU/translation enable */ #define IOMMUCR_EN 0x0000000000000001UL /* + * TSB base register bits + */ + /* TSB base address */ +#define IOMMUTB_TB_MASK 0x000007ffffffe000UL +#define IOMMUTB_TB_SHIFT 13 +/* IOMMU page size - Fire and Oberon */ +#define IOMMUTB_8KPG 0x0000000000000000UL +#define IOMMUTB_64KPG 0x0000000000000100UL +/* Nummber of entries in the IOTSB - Fire and Oberon */ +#define IOMMUTB_TSBSZ_MASK 0x0000000000000004UL +#define IOMMUTB_TSBSZ_SHIFT 0 + +/* + * TSB size definitions for both control and TSB base register */ +#define IOMMU_TSB1K 0 +#define IOMMU_TSB2K 1 +#define IOMMU_TSB4K 2 +#define IOMMU_TSB8K 3 +#define IOMMU_TSB16K 4 +#define IOMMU_TSB32K 5 +#define IOMMU_TSB64K 6 +#define IOMMU_TSB128K 7 +/* Fire and Oberon */ +#define IOMMU_TSB256K 8 +/* Fire and Oberon */ +#define IOMMU_TSB512K 9 +#define IOMMU_TSBENTRIES(tsbsz) \ + ((1 << (tsbsz)) << (IO_PAGE_SHIFT - IOTTE_SHIFT)) + +/* * Diagnostic register definitions */ #define IOMMU_DTAG_VPNBITS 19 @@ -113,16 +145,16 @@ */ /* Entry valid */ #define IOTTE_V 0x8000000000000000UL -/* 8K or 64K page? */ +/* Page size - pre-Fire only */ #define IOTTE_64K 0x2000000000000000UL #define IOTTE_8K 0x0000000000000000UL -/* Is page streamable? */ +/* Streamable page - streaming buffer equipped variants only */ #define IOTTE_STREAM 0x1000000000000000UL -/* Accesses to same bus segment? */ +/* Accesses to the same bus segment - SBus only */ #define IOTTE_LOCAL 0x0800000000000000UL -/* Let's assume this is correct */ -#define IOTTE_PAMASK 0x000007ffffffe000UL -/* Accesses to cacheable space */ +/* Physical address mask (based on Oberon) */ +#define IOTTE_PAMASK 0x00007fffffffe000UL +/* Accesses to cacheable space - pre-Fire only */ #define IOTTE_C 0x0000000000000010UL /* Writeable */ #define IOTTE_W 0x0000000000000002UL Modified: stable/7/sys/sparc64/include/iommuvar.h ============================================================================== --- stable/7/sys/sparc64/include/iommuvar.h Wed Jan 13 21:16:07 2010 (r202256) +++ stable/7/sys/sparc64/include/iommuvar.h Wed Jan 13 21:16:13 2010 (r202257) @@ -66,10 +66,10 @@ struct iommu_state { int is_tsbsize; /* (r) 0 = 8K, ... */ uint64_t is_pmaxaddr; /* (r) max. physical address */ uint64_t is_dvmabase; /* (r) */ - int64_t is_cr; /* (r) Control reg value */ + uint64_t is_cr; /* (r) Control reg value */ vm_paddr_t is_flushpa[2]; /* (r) */ - volatile int64_t *is_flushva[2]; /* (r, *i) */ + volatile uint64_t *is_flushva[2]; /* (r, *i) */ /* * (i) * When a flush is completed, 64 bytes will be stored at the given @@ -99,11 +99,14 @@ struct iommu_state { /* behavior flags */ u_int is_flags; /* (r) */ #define IOMMU_RERUN_DISABLE (1 << 0) +#define IOMMU_FIRE (1 << 1) +#define IOMMU_FLUSH_CACHE (1 << 2) +#define IOMMU_PRESERVE_PROM (1 << 3) }; /* interfaces for PCI/SBus code */ -void iommu_init(const char *name, struct iommu_state *is, int tsbsize, - uint32_t iovabase, int resvpg); +void iommu_init(const char *name, struct iommu_state *is, u_int tsbsize, + uint32_t iovabase, u_int resvpg); void iommu_reset(struct iommu_state *is); void iommu_decode_fault(struct iommu_state *is, vm_offset_t phys); Modified: stable/7/sys/sparc64/sparc64/iommu.c ============================================================================== --- stable/7/sys/sparc64/sparc64/iommu.c Wed Jan 13 21:16:07 2010 (r202256) +++ stable/7/sys/sparc64/sparc64/iommu.c Wed Jan 13 21:16:13 2010 (r202257) @@ -138,11 +138,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include +#include #include @@ -212,6 +214,12 @@ static __inline void iommu_tlb_flush(struct iommu_state *is, bus_addr_t va) { + if ((is->is_flags & IOMMU_FIRE) != 0) + /* + * Direct page flushing is not supported and also not + * necessary due to cache snooping. + */ + return; IOMMU_WRITE8(is, is_iommu, IMR_FLUSH, va); } @@ -282,18 +290,19 @@ iommu_map_remq(struct iommu_state *is, b * - create a private DVMA map. */ void -iommu_init(const char *name, struct iommu_state *is, int tsbsize, - uint32_t iovabase, int resvpg) +iommu_init(const char *name, struct iommu_state *is, u_int tsbsize, + uint32_t iovabase, u_int resvpg) { vm_size_t size; vm_offset_t offs; - uint64_t end; + uint64_t end, obpmap, obpptsb, tte; + u_int maxtsbsize, obptsbentries, obptsbsize, slot, tsbentries; int i; /* - * Setup the iommu. + * Setup the IOMMU. * - * The sun4u iommu is part of the PCI or SBus controller so we + * The sun4u IOMMU is part of the PCI or SBus controller so we * will deal with it here.. * * The IOMMU address space always ends at 0xffffe000, but the starting @@ -301,16 +310,30 @@ iommu_init(const char *name, struct iomm * is->is_tsbsize entries, where each entry is 8 bytes. The start of * the map can be calculated by (0xffffe000 << (8 + is->is_tsbsize)). */ - is->is_cr = (tsbsize << IOMMUCR_TSBSZ_SHIFT) | IOMMUCR_EN; + if ((is->is_flags & IOMMU_FIRE) != 0) { + maxtsbsize = IOMMU_TSB512K; + /* + * We enable bypass in order to be able to use a physical + * address for the event queue base. + */ + is->is_cr = IOMMUCR_SE | IOMMUCR_CM_C_TLB_TBW | IOMMUCR_BE; + } else { + maxtsbsize = IOMMU_TSB128K; + is->is_cr = (tsbsize << IOMMUCR_TSBSZ_SHIFT) | IOMMUCR_DE; + } + if (tsbsize > maxtsbsize) + panic("%s: unsupported TSB size ", __func__); + tsbentries = IOMMU_TSBENTRIES(tsbsize); + is->is_cr |= IOMMUCR_EN; is->is_tsbsize = tsbsize; is->is_dvmabase = iovabase; if (iovabase == -1) is->is_dvmabase = IOTSB_VSTART(is->is_tsbsize); size = IOTSB_BASESZ << is->is_tsbsize; - printf("%s: DVMA map: %#lx to %#lx%s\n", name, + printf("%s: DVMA map: %#lx to %#lx %d entries%s\n", name, is->is_dvmabase, is->is_dvmabase + - (size << (IO_PAGE_SHIFT - IOTTE_SHIFT)) - 1, + (size << (IO_PAGE_SHIFT - IOTTE_SHIFT)) - 1, tsbentries, IOMMU_HAS_SB(is) ? ", streaming buffer" : ""); /* @@ -333,12 +356,54 @@ iommu_init(const char *name, struct iomm */ is->is_tsb = contigmalloc(size, M_DEVBUF, M_NOWAIT, 0, ~0UL, PAGE_SIZE, 0); - if (is->is_tsb == 0) + if (is->is_tsb == NULL) panic("%s: contigmalloc failed", __func__); is->is_ptsb = pmap_kextract((vm_offset_t)is->is_tsb); bzero(is->is_tsb, size); /* + * Add the PROM mappings to the kernel IOTSB if desired. + * Note that the firmware of certain Darwin boards doesn't set + * the TSB size correctly. + */ + if ((is->is_flags & IOMMU_FIRE) != 0) + obptsbsize = (IOMMU_READ8(is, is_iommu, IMR_TSB) & + IOMMUTB_TSBSZ_MASK) >> IOMMUTB_TSBSZ_SHIFT; + else + obptsbsize = (IOMMU_READ8(is, is_iommu, IMR_CTL) & + IOMMUCR_TSBSZ_MASK) >> IOMMUCR_TSBSZ_SHIFT; + obptsbentries = IOMMU_TSBENTRIES(obptsbsize); + if (bootverbose) + printf("%s: PROM IOTSB size: %d (%d entries)\n", name, + obptsbsize, obptsbentries); + if ((is->is_flags & IOMMU_PRESERVE_PROM) != 0 && + !(cpu_impl == CPU_IMPL_ULTRASPARCIIi && obptsbsize == 7)) { + if (obptsbentries > tsbentries) + panic("%s: PROM IOTSB entries exceed kernel", + __func__); + obpptsb = IOMMU_READ8(is, is_iommu, IMR_TSB) & + IOMMUTB_TB_MASK; + for (i = 0; i < obptsbentries; i++) { + tte = ldxa(obpptsb + i * 8, ASI_PHYS_USE_EC); + if ((tte & IOTTE_V) == 0) + continue; + slot = tsbentries - obptsbentries + i; + if (bootverbose) + printf("%s: adding PROM IOTSB slot %d " + "(kernel slot %d) TTE: %#lx\n", name, + i, slot, tte); + obpmap = (is->is_dvmabase + slot * IO_PAGE_SIZE) >> + IO_PAGE_SHIFT; + if (rman_reserve_resource(&is->is_dvma_rman, obpmap, + obpmap, IO_PAGE_SIZE >> IO_PAGE_SHIFT, RF_ACTIVE, + NULL) == NULL) + panic("%s: could not reserve PROM IOTSB slot " + "%d (kernel slot %d)", __func__, i, slot); + is->is_tsb[slot] = tte; + } + } + + /* * Initialize streaming buffer, if it is there. */ if (IOMMU_HAS_SB(is)) { @@ -349,7 +414,7 @@ iommu_init(const char *name, struct iomm offs = roundup2((vm_offset_t)is->is_flush, STRBUF_FLUSHSYNC_NBYTES); for (i = 0; i < 2; i++, offs += STRBUF_FLUSHSYNC_NBYTES) { - is->is_flushva[i] = (int64_t *)offs; + is->is_flushva[i] = (uint64_t *)offs; is->is_flushpa[i] = pmap_kextract(offs); } } @@ -368,11 +433,16 @@ iommu_init(const char *name, struct iomm void iommu_reset(struct iommu_state *is) { + uint64_t tsb; int i; - IOMMU_WRITE8(is, is_iommu, IMR_TSB, is->is_ptsb); - /* Enable IOMMU in diagnostic mode */ - IOMMU_WRITE8(is, is_iommu, IMR_CTL, is->is_cr | IOMMUCR_DE); + tsb = is->is_ptsb; + if ((is->is_flags & IOMMU_FIRE) != 0) { + tsb |= is->is_tsbsize; + IOMMU_WRITE8(is, is_iommu, IMR_CACHE_INVAL, ~0ULL); + } + IOMMU_WRITE8(is, is_iommu, IMR_TSB, tsb); + IOMMU_WRITE8(is, is_iommu, IMR_CTL, is->is_cr); for (i = 0; i < 2; i++) { if (is->is_sb[i] != 0) { @@ -386,6 +456,8 @@ iommu_reset(struct iommu_state *is) is->is_sb[i] = 0; } } + + (void)IOMMU_READ8(is, is_iommu, IMR_CTL); } /* @@ -396,7 +468,7 @@ static void iommu_enter(struct iommu_state *is, vm_offset_t va, vm_paddr_t pa, int stream, int flags) { - int64_t tte; + uint64_t tte; KASSERT(va >= is->is_dvmabase, ("%s: va %#lx not in DVMA space", __func__, va)); @@ -423,7 +495,7 @@ iommu_enter(struct iommu_state *is, vm_o static int iommu_remove(struct iommu_state *is, vm_offset_t va, vm_size_t len) { - int streamed = 0; + int slot, streamed = 0; #ifdef IOMMU_DIAG iommu_diag(is, va); @@ -443,6 +515,12 @@ iommu_remove(struct iommu_state *is, vm_ len -= ulmin(len, IO_PAGE_SIZE); IOMMU_SET_TTE(is, va, 0); iommu_tlb_flush(is, va); + if ((is->is_flags & IOMMU_FLUSH_CACHE) != 0) { + slot = IOTSBSLOT(va); + if (len <= IO_PAGE_SIZE || slot % 8 == 7) + IOMMU_WRITE8(is, is_iommu, IMR_CACHE_FLUSH, + is->is_ptsb + slot * 8); + } va += IO_PAGE_SIZE; } return (streamed); @@ -829,12 +907,13 @@ iommu_dvmamap_load_buffer(bus_dma_tag_t bus_dmamap_t map, void *buf, bus_size_t buflen, struct thread *td, int flags, bus_dma_segment_t *segs, int *segp, int align) { - bus_addr_t amask, dvmaddr; + bus_addr_t amask, dvmaddr, dvmoffs; bus_size_t sgsize, esize; vm_offset_t vaddr, voffs; vm_paddr_t curaddr; pmap_t pmap = NULL; int error, firstpg, sgcnt; + u_int slot; KASSERT(buflen != 0, ("%s: buflen == 0!", __func__)); if (buflen > dt->dt_maxsize) @@ -877,8 +956,15 @@ iommu_dvmamap_load_buffer(bus_dma_tag_t buflen -= sgsize; vaddr += sgsize; - iommu_enter(is, trunc_io_page(dvmaddr), trunc_io_page(curaddr), + dvmoffs = trunc_io_page(dvmaddr); + iommu_enter(is, dvmoffs, trunc_io_page(curaddr), (map->dm_flags & DMF_STREAMED) != 0, flags); + if ((is->is_flags & IOMMU_FLUSH_CACHE) != 0) { + slot = IOTSBSLOT(dvmoffs); + if (buflen <= 0 || slot % 8 == 7) + IOMMU_WRITE8(is, is_iommu, IMR_CACHE_FLUSH, + is->is_ptsb + slot * 8); + } /* * Chop the chunk up into segments of at most maxsegsz, but try @@ -1183,6 +1269,8 @@ iommu_diag(struct iommu_state *is, vm_of int i; uint64_t data, tag; + if ((is->is_flags & IOMMU_FIRE) != 0) + return; IS_LOCK_ASSERT(is); IOMMU_WRITE8(is, is_dva, 0, trunc_io_page(va)); membar(StoreStore | StoreLoad); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:17:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E16D1065670; Wed, 13 Jan 2010 21:17:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C3628FC08; Wed, 13 Jan 2010 21:17:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLHk5U027317; Wed, 13 Jan 2010 21:17:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLHklI027315; Wed, 13 Jan 2010 21:17:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132117.o0DLHklI027315@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:17:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202258 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:17:46 -0000 Author: marius Date: Wed Jan 13 21:17:45 2010 New Revision: 202258 URL: http://svn.freebsd.org/changeset/base/202258 Log: MFC: r200924 Style changes. Modified: stable/8/sys/sparc64/sparc64/ofw_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/ofw_machdep.c Wed Jan 13 21:16:13 2010 (r202257) +++ stable/8/sys/sparc64/sparc64/ofw_machdep.c Wed Jan 13 21:17:45 2010 (r202258) @@ -23,7 +23,7 @@ * 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$"); @@ -64,34 +64,32 @@ OF_getetheraddr(device_t dev, u_char *ad node = OF_peer(0); if (node <= 0 || OF_getprop(node, "idprom", &idp, sizeof(idp)) == -1) - panic("Could not determine the machine ethernet address"); + panic("Could not determine the machine Ethernet address"); bcopy(&idp.id_ether, addr, ETHER_ADDR_LEN); } static __inline uint32_t phys_hi_mask_space(const char *bus, uint32_t phys_hi) { - uint32_t space; - space = phys_hi; if (strcmp(bus, "ebus") == 0 || strcmp(bus, "isa") == 0) - space &= 0x1; + phys_hi &= 0x1; else if (strcmp(bus, "pci") == 0) - space &= OFW_PCI_PHYS_HI_SPACEMASK; + phys_hi &= OFW_PCI_PHYS_HI_SPACEMASK; /* The phys.hi cells of the other busses only contain space bits. */ - return (space); + return (phys_hi); } /* * Return the physical address and the bus space to use for a node * referenced by its package handle and the index of the register bank - * to decode. Intended to be used to together with sparc64_fake_bustag() + * to decode. Intended to be used to together with sparc64_fake_bustag() * by console drivers in early boot only. * Works by mapping the address of the node's bank given in the address * space of its parent upward in the device tree at each bridge along the * path. * Currently only really deals with max. 64-bit addresses, i.e. addresses - * consisting of max. 2 phys cells (phys.hi and phys.lo). If we encounter + * consisting of max. 2 phys cells (phys.hi and phys.lo). If we encounter * a 3 phys cells address (as with PCI addresses) we assume phys.hi can * be ignored except for the space bits (generally contained in phys.hi) * and treat phys.mid as phys.hi. @@ -109,17 +107,17 @@ OF_decode_addr(phandle_t node, int bank, /* * In general the addresses are contained in the "reg" property - * of a node. The first address in the "reg" property of a PCI + * of a node. The first address in the "reg" property of a PCI * node however is the address of its configuration registers in - * the configuration space of the host bridge. Additional entries - * denote the memory and I/O addresses. For relocatable addresses + * the configuration space of the host bridge. Additional entries + * denote the memory and I/O addresses. For relocatable addresses * the "reg" property contains the BAR, for non-relocatable - * addresses it contains the absolute PCI address. The PCI-only + * addresses it contains the absolute PCI address. The PCI-only * "assigned-addresses" property however always contains the * absolute PCI addresses. * The "assigned-addresses" and "reg" properties are arrays of * address structures consisting of #address-cells 32-bit phys - * cells and #size-cells 32-bit size cells. If a parent lacks + * cells and #size-cells 32-bit size cells. If a parent lacks * the "#address-cells" or "#size-cells" property the default * for #address-cells to use is 2 and for #size-cells 1. */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:17:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E7E1106566B; Wed, 13 Jan 2010 21:17:49 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CA2F8FC0A; Wed, 13 Jan 2010 21:17:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLHnCh027355; Wed, 13 Jan 2010 21:17:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLHnb8027353; Wed, 13 Jan 2010 21:17:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132117.o0DLHnb8027353@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202259 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:17:49 -0000 Author: marius Date: Wed Jan 13 21:17:48 2010 New Revision: 202259 URL: http://svn.freebsd.org/changeset/base/202259 Log: MFC: r200924 Style changes. Modified: stable/7/sys/sparc64/sparc64/ofw_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/ofw_machdep.c Wed Jan 13 21:17:45 2010 (r202258) +++ stable/7/sys/sparc64/sparc64/ofw_machdep.c Wed Jan 13 21:17:48 2010 (r202259) @@ -23,7 +23,7 @@ * 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$"); @@ -65,34 +65,32 @@ OF_getetheraddr(device_t dev, u_char *ad node = OF_peer(0); if (node <= 0 || OF_getprop(node, "idprom", &idp, sizeof(idp)) == -1) - panic("Could not determine the machine ethernet address"); + panic("Could not determine the machine Ethernet address"); bcopy(&idp.id_ether, addr, ETHER_ADDR_LEN); } static __inline uint32_t phys_hi_mask_space(const char *bus, uint32_t phys_hi) { - uint32_t space; - space = phys_hi; if (strcmp(bus, "ebus") == 0 || strcmp(bus, "isa") == 0) - space &= 0x1; + phys_hi &= 0x1; else if (strcmp(bus, "pci") == 0) - space &= OFW_PCI_PHYS_HI_SPACEMASK; + phys_hi &= OFW_PCI_PHYS_HI_SPACEMASK; /* The phys.hi cells of the other busses only contain space bits. */ - return (space); + return (phys_hi); } /* * Return the physical address and the bus space to use for a node * referenced by its package handle and the index of the register bank - * to decode. Intended to be used to together with sparc64_fake_bustag() + * to decode. Intended to be used to together with sparc64_fake_bustag() * by console drivers in early boot only. * Works by mapping the address of the node's bank given in the address * space of its parent upward in the device tree at each bridge along the * path. * Currently only really deals with max. 64-bit addresses, i.e. addresses - * consisting of max. 2 phys cells (phys.hi and phys.lo). If we encounter + * consisting of max. 2 phys cells (phys.hi and phys.lo). If we encounter * a 3 phys cells address (as with PCI addresses) we assume phys.hi can * be ignored except for the space bits (generally contained in phys.hi) * and treat phys.mid as phys.hi. @@ -110,17 +108,17 @@ OF_decode_addr(phandle_t node, int bank, /* * In general the addresses are contained in the "reg" property - * of a node. The first address in the "reg" property of a PCI + * of a node. The first address in the "reg" property of a PCI * node however is the address of its configuration registers in - * the configuration space of the host bridge. Additional entries - * denote the memory and I/O addresses. For relocatable addresses + * the configuration space of the host bridge. Additional entries + * denote the memory and I/O addresses. For relocatable addresses * the "reg" property contains the BAR, for non-relocatable - * addresses it contains the absolute PCI address. The PCI-only + * addresses it contains the absolute PCI address. The PCI-only * "assigned-addresses" property however always contains the * absolute PCI addresses. * The "assigned-addresses" and "reg" properties are arrays of * address structures consisting of #address-cells 32-bit phys - * cells and #size-cells 32-bit size cells. If a parent lacks + * cells and #size-cells 32-bit size cells. If a parent lacks * the "#address-cells" or "#size-cells" property the default * for #address-cells to use is 2 and for #size-cells 1. */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:19:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 984F0106566B; Wed, 13 Jan 2010 21:19:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 867148FC0A; Wed, 13 Jan 2010 21:19:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLJkiv027876; Wed, 13 Jan 2010 21:19:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLJkIX027874; Wed, 13 Jan 2010 21:19:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132119.o0DLJkIX027874@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202260 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:19:46 -0000 Author: marius Date: Wed Jan 13 21:19:46 2010 New Revision: 202260 URL: http://svn.freebsd.org/changeset/base/202260 Log: MFC: r200925 - By re-arranging the code in OF_decode_addr() somewhat and accepting a bit of a detour we can just iterate through the banks array instead of having to calculate every offset. This change is inspired by the powerpc version of this function. - Add support for the JBus to EBus bridges which hang off of nexus(4). Modified: stable/8/sys/sparc64/sparc64/ofw_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/ofw_machdep.c Wed Jan 13 21:17:48 2010 (r202259) +++ stable/8/sys/sparc64/sparc64/ofw_machdep.c Wed Jan 13 21:19:46 2010 (r202260) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 by Thomas Moestl . - * Copyright (c) 2005 by Marius Strobl . + * Copyright (c) 2005 - 2009 by Marius Strobl . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -98,11 +98,11 @@ int OF_decode_addr(phandle_t node, int bank, int *space, bus_addr_t *addr) { char name[32]; - uint64_t cend, cstart, end, phys, sz, start; + uint64_t cend, cstart, end, phys, pphys, sz, start; pcell_t addrc, szc, paddrc; phandle_t bus, lbus, pbus; uint32_t banks[10 * 5]; /* 10 PCI banks */ - uint32_t cspace, spc; + uint32_t cspc, pspc, spc; int i, j, nbank; /* @@ -148,17 +148,18 @@ OF_decode_addr(phandle_t node, int bank, nbank /= sizeof(banks[0]) * (addrc + szc); if (bank < 0 || bank > nbank - 1) return (ENXIO); + bank *= addrc + szc; + spc = phys_hi_mask_space(name, banks[bank]); + /* Skip the high cell for 3-cell addresses. */ + bank += addrc - 2; phys = 0; for (i = 0; i < MIN(2, addrc); i++) - phys |= (uint64_t)banks[(addrc + szc) * bank + addrc - 2 + i] << - 32 * (MIN(2, addrc) - i - 1); + phys = ((uint64_t)phys << 32) | banks[bank++]; sz = 0; for (i = 0; i < szc; i++) - sz |= (uint64_t)banks[(addrc + szc) * bank + addrc + i] << - 32 * (szc - i - 1); + sz = ((uint64_t)sz << 32) | banks[bank++]; start = phys; end = phys + sz - 1; - spc = phys_hi_mask_space(name, banks[(addrc + szc) * bank]); /* * Map upward in the device tree at every bridge we encounter @@ -170,7 +171,7 @@ OF_decode_addr(phandle_t node, int bank, * If a bridge doesn't have a "ranges" property no mapping is * necessary at that bridge. */ - cspace = 0; + cspc = 0; lbus = bus; while ((pbus = OF_parent(bus)) != 0) { if (OF_getprop(pbus, "#address-cells", &paddrc, @@ -193,42 +194,40 @@ OF_decode_addr(phandle_t node, int bank, return (ENXIO); } nbank /= sizeof(banks[0]) * (addrc + paddrc + szc); + bank = 0; for (i = 0; i < nbank; i++) { - cspace = phys_hi_mask_space(name, - banks[(addrc + paddrc + szc) * i]); - if (cspace != spc) + cspc = phys_hi_mask_space(name, banks[bank]); + if (cspc != spc) { + bank += addrc + paddrc + szc; continue; + } + /* Skip the high cell for 3-cell addresses. */ + bank += addrc - 2; phys = 0; for (j = 0; j < MIN(2, addrc); j++) - phys |= (uint64_t)banks[ - (addrc + paddrc + szc) * i + - addrc - 2 + j] << - 32 * (MIN(2, addrc) - j - 1); + phys = ((uint64_t)phys << 32) | banks[bank++]; + pspc = banks[bank]; + /* Skip the high cell for 3-cell addresses. */ + bank += paddrc - 2; + pphys = 0; + for (j = 0; j < MIN(2, paddrc); j++) + pphys = + ((uint64_t)pphys << 32) | banks[bank++]; sz = 0; for (j = 0; j < szc; j++) - sz |= (uint64_t)banks[ - (addrc + paddrc + szc) * i + addrc + - paddrc + j] << - 32 * (szc - j - 1); + sz = ((uint64_t)sz << 32) | banks[bank++]; cstart = phys; cend = phys + sz - 1; if (start < cstart || start > cend) continue; if (end < cstart || end > cend) return (ENXIO); - phys = 0; - for (j = 0; j < MIN(2, paddrc); j++) - phys |= (uint64_t)banks[ - (addrc + paddrc + szc) * i + addrc + - paddrc - 2 + j] << - 32 * (MIN(2, paddrc) - j - 1); - start += phys - cstart; - end += phys - cstart; if (OF_getprop(pbus, "name", name, sizeof(name)) == -1) return (ENXIO); name[sizeof(name) - 1] = '\0'; - spc = phys_hi_mask_space(name, - banks[(addrc + paddrc + szc) * i + addrc]); + spc = phys_hi_mask_space(name, pspc); + start += pphys - cstart; + end += pphys - cstart; break; } if (i == nbank) @@ -239,8 +238,8 @@ OF_decode_addr(phandle_t node, int bank, bus = pbus; } - /* Done with mapping. Return the bus space as used by FreeBSD. */ *addr = start; + /* Determine the bus space based on the last bus we mapped. */ if (OF_parent(lbus) == 0) { *space = NEXUS_BUS_SPACE; return (0); @@ -248,11 +247,12 @@ OF_decode_addr(phandle_t node, int bank, if (OF_getprop(lbus, "name", name, sizeof(name)) == -1) return (ENXIO); name[sizeof(name) - 1] = '\0'; - if (strcmp(name, "central") == 0 || strcmp(name, "upa") == 0) { + if (strcmp(name, "central") == 0 || strcmp(name, "ebus") == 0 || + strcmp(name, "upa") == 0) { *space = NEXUS_BUS_SPACE; return (0); } else if (strcmp(name, "pci") == 0) { - switch (cspace) { + switch (cspc) { case OFW_PCI_PHYS_HI_SPACE_IO: *space = PCI_IO_BUS_SPACE; return (0); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:19:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD6C61065672; Wed, 13 Jan 2010 21:19:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB9258FC0C; Wed, 13 Jan 2010 21:19:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLJkvC027891; Wed, 13 Jan 2010 21:19:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLJkX3027889; Wed, 13 Jan 2010 21:19:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132119.o0DLJkX3027889@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202261 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:19:47 -0000 Author: marius Date: Wed Jan 13 21:19:46 2010 New Revision: 202261 URL: http://svn.freebsd.org/changeset/base/202261 Log: MFC: r200925 - By re-arranging the code in OF_decode_addr() somewhat and accepting a bit of a detour we can just iterate through the banks array instead of having to calculate every offset. This change is inspired by the powerpc version of this function. - Add support for the JBus to EBus bridges which hang off of nexus(4). Modified: stable/7/sys/sparc64/sparc64/ofw_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/ofw_machdep.c Wed Jan 13 21:19:46 2010 (r202260) +++ stable/7/sys/sparc64/sparc64/ofw_machdep.c Wed Jan 13 21:19:46 2010 (r202261) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2001 by Thomas Moestl . - * Copyright (c) 2005 by Marius Strobl . + * Copyright (c) 2005 - 2009 by Marius Strobl . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,11 +99,11 @@ int OF_decode_addr(phandle_t node, int bank, int *space, bus_addr_t *addr) { char name[32]; - uint64_t cend, cstart, end, phys, sz, start; + uint64_t cend, cstart, end, phys, pphys, sz, start; pcell_t addrc, szc, paddrc; phandle_t bus, lbus, pbus; uint32_t banks[10 * 5]; /* 10 PCI banks */ - uint32_t cspace, spc; + uint32_t cspc, pspc, spc; int i, j, nbank; /* @@ -149,17 +149,18 @@ OF_decode_addr(phandle_t node, int bank, nbank /= sizeof(banks[0]) * (addrc + szc); if (bank < 0 || bank > nbank - 1) return (ENXIO); + bank *= addrc + szc; + spc = phys_hi_mask_space(name, banks[bank]); + /* Skip the high cell for 3-cell addresses. */ + bank += addrc - 2; phys = 0; for (i = 0; i < MIN(2, addrc); i++) - phys |= (uint64_t)banks[(addrc + szc) * bank + addrc - 2 + i] << - 32 * (MIN(2, addrc) - i - 1); + phys = ((uint64_t)phys << 32) | banks[bank++]; sz = 0; for (i = 0; i < szc; i++) - sz |= (uint64_t)banks[(addrc + szc) * bank + addrc + i] << - 32 * (szc - i - 1); + sz = ((uint64_t)sz << 32) | banks[bank++]; start = phys; end = phys + sz - 1; - spc = phys_hi_mask_space(name, banks[(addrc + szc) * bank]); /* * Map upward in the device tree at every bridge we encounter @@ -171,7 +172,7 @@ OF_decode_addr(phandle_t node, int bank, * If a bridge doesn't have a "ranges" property no mapping is * necessary at that bridge. */ - cspace = 0; + cspc = 0; lbus = bus; while ((pbus = OF_parent(bus)) != 0) { if (OF_getprop(pbus, "#address-cells", &paddrc, @@ -194,42 +195,40 @@ OF_decode_addr(phandle_t node, int bank, return (ENXIO); } nbank /= sizeof(banks[0]) * (addrc + paddrc + szc); + bank = 0; for (i = 0; i < nbank; i++) { - cspace = phys_hi_mask_space(name, - banks[(addrc + paddrc + szc) * i]); - if (cspace != spc) + cspc = phys_hi_mask_space(name, banks[bank]); + if (cspc != spc) { + bank += addrc + paddrc + szc; continue; + } + /* Skip the high cell for 3-cell addresses. */ + bank += addrc - 2; phys = 0; for (j = 0; j < MIN(2, addrc); j++) - phys |= (uint64_t)banks[ - (addrc + paddrc + szc) * i + - addrc - 2 + j] << - 32 * (MIN(2, addrc) - j - 1); + phys = ((uint64_t)phys << 32) | banks[bank++]; + pspc = banks[bank]; + /* Skip the high cell for 3-cell addresses. */ + bank += paddrc - 2; + pphys = 0; + for (j = 0; j < MIN(2, paddrc); j++) + pphys = + ((uint64_t)pphys << 32) | banks[bank++]; sz = 0; for (j = 0; j < szc; j++) - sz |= (uint64_t)banks[ - (addrc + paddrc + szc) * i + addrc + - paddrc + j] << - 32 * (szc - j - 1); + sz = ((uint64_t)sz << 32) | banks[bank++]; cstart = phys; cend = phys + sz - 1; if (start < cstart || start > cend) continue; if (end < cstart || end > cend) return (ENXIO); - phys = 0; - for (j = 0; j < MIN(2, paddrc); j++) - phys |= (uint64_t)banks[ - (addrc + paddrc + szc) * i + addrc + - paddrc - 2 + j] << - 32 * (MIN(2, paddrc) - j - 1); - start += phys - cstart; - end += phys - cstart; if (OF_getprop(pbus, "name", name, sizeof(name)) == -1) return (ENXIO); name[sizeof(name) - 1] = '\0'; - spc = phys_hi_mask_space(name, - banks[(addrc + paddrc + szc) * i + addrc]); + spc = phys_hi_mask_space(name, pspc); + start += pphys - cstart; + end += pphys - cstart; break; } if (i == nbank) @@ -240,8 +239,8 @@ OF_decode_addr(phandle_t node, int bank, bus = pbus; } - /* Done with mapping. Return the bus space as used by FreeBSD. */ *addr = start; + /* Determine the bus space based on the last bus we mapped. */ if (OF_parent(lbus) == 0) { *space = NEXUS_BUS_SPACE; return (0); @@ -249,11 +248,12 @@ OF_decode_addr(phandle_t node, int bank, if (OF_getprop(lbus, "name", name, sizeof(name)) == -1) return (ENXIO); name[sizeof(name) - 1] = '\0'; - if (strcmp(name, "central") == 0 || strcmp(name, "upa") == 0) { + if (strcmp(name, "central") == 0 || strcmp(name, "ebus") == 0 || + strcmp(name, "upa") == 0) { *space = NEXUS_BUS_SPACE; return (0); } else if (strcmp(name, "pci") == 0) { - switch (cspace) { + switch (cspc) { case OFW_PCI_PHYS_HI_SPACE_IO: *space = PCI_IO_BUS_SPACE; return (0); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:21:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CB4B106566C; Wed, 13 Jan 2010 21:21:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61E4A8FC08; Wed, 13 Jan 2010 21:21:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLLTH6028369; Wed, 13 Jan 2010 21:21:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLLTxF028366; Wed, 13 Jan 2010 21:21:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132121.o0DLLTxF028366@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202262 - stable/8/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:21:29 -0000 Author: marius Date: Wed Jan 13 21:21:29 2010 New Revision: 202262 URL: http://svn.freebsd.org/changeset/base/202262 Log: MFC: r200926 Recognize the NS16552 found in PCIe-based sun4u machines. Modified: stable/8/sys/dev/uart/uart_bus_ebus.c stable/8/sys/dev/uart/uart_cpu_sparc64.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/uart/uart_bus_ebus.c ============================================================================== --- stable/8/sys/dev/uart/uart_bus_ebus.c Wed Jan 13 21:19:46 2010 (r202261) +++ stable/8/sys/dev/uart/uart_bus_ebus.c Wed Jan 13 21:21:29 2010 (r202262) @@ -77,7 +77,7 @@ uart_ebus_probe(device_t dev) if (!strcmp(nm, "lom-console") || !strcmp(nm, "su") || !strcmp(nm, "su_pnp") || !strcmp(cmpt, "rsc-console") || !strcmp(cmpt, "rsc-control") || !strcmp(cmpt, "su") || - !strcmp(cmpt, "su16550")) { + !strcmp(cmpt, "su16550") || !strcmp(cmpt, "su16552")) { /* * On AXi and AXmp boards the NS16550 (used to connect * keyboard/mouse) share their IRQ lines with the i8042. Modified: stable/8/sys/dev/uart/uart_cpu_sparc64.c ============================================================================== --- stable/8/sys/dev/uart/uart_cpu_sparc64.c Wed Jan 13 21:19:46 2010 (r202261) +++ stable/8/sys/dev/uart/uart_cpu_sparc64.c Wed Jan 13 21:21:29 2010 (r202262) @@ -254,7 +254,8 @@ uart_cpu_getdev(int devtype, struct uart addr += range - range * (di->bas.chan - 1); } else if (!strcmp(buf, "lom-console") || !strcmp(buf, "su") || !strcmp(buf, "su_pnp") || !strcmp(compat, "rsc-console") || - !strcmp(compat, "su") || !strcmp(compat, "su16550")) { + !strcmp(compat, "su") || !strcmp(compat, "su16550") || + !strcmp(compat, "su16552")) { class = &uart_ns8250_class; di->bas.chan = 0; } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:21:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC7FD106568D; Wed, 13 Jan 2010 21:21:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1858FC0A; Wed, 13 Jan 2010 21:21:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLLWwZ028406; Wed, 13 Jan 2010 21:21:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLLWxk028403; Wed, 13 Jan 2010 21:21:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132121.o0DLLWxk028403@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202263 - stable/7/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:21:32 -0000 Author: marius Date: Wed Jan 13 21:21:32 2010 New Revision: 202263 URL: http://svn.freebsd.org/changeset/base/202263 Log: MFC: r200926 Recognize the NS16552 found in PCIe-based sun4u machines. Modified: stable/7/sys/dev/uart/uart_bus_ebus.c stable/7/sys/dev/uart/uart_cpu_sparc64.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/uart/uart_bus_ebus.c ============================================================================== --- stable/7/sys/dev/uart/uart_bus_ebus.c Wed Jan 13 21:21:29 2010 (r202262) +++ stable/7/sys/dev/uart/uart_bus_ebus.c Wed Jan 13 21:21:32 2010 (r202263) @@ -77,7 +77,7 @@ uart_ebus_probe(device_t dev) if (!strcmp(nm, "lom-console") || !strcmp(nm, "su") || !strcmp(nm, "su_pnp") || !strcmp(cmpt, "rsc-console") || !strcmp(cmpt, "rsc-control") || !strcmp(cmpt, "su") || - !strcmp(cmpt, "su16550")) { + !strcmp(cmpt, "su16550") || !strcmp(cmpt, "su16552")) { /* * On AXi and AXmp boards the NS16550 (used to connect * keyboard/mouse) share their IRQ lines with the i8042. Modified: stable/7/sys/dev/uart/uart_cpu_sparc64.c ============================================================================== --- stable/7/sys/dev/uart/uart_cpu_sparc64.c Wed Jan 13 21:21:29 2010 (r202262) +++ stable/7/sys/dev/uart/uart_cpu_sparc64.c Wed Jan 13 21:21:32 2010 (r202263) @@ -254,7 +254,8 @@ uart_cpu_getdev(int devtype, struct uart addr += range - range * (di->bas.chan - 1); } else if (!strcmp(buf, "lom-console") || !strcmp(buf, "su") || !strcmp(buf, "su_pnp") || !strcmp(compat, "rsc-console") || - !strcmp(compat, "su") || !strcmp(compat, "su16550")) { + !strcmp(compat, "su") || !strcmp(compat, "su16550") || + !strcmp(compat, "su16552")) { class = &uart_ns8250_class; di->bas.chan = 0; } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:22:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03CB81065672; Wed, 13 Jan 2010 21:22:24 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDDAF8FC14; Wed, 13 Jan 2010 21:22:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLMNqH028685; Wed, 13 Jan 2010 21:22:23 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLMNmP028682; Wed, 13 Jan 2010 21:22:23 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001132122.o0DLMNmP028682@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 21:22:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202264 - in head: share/man/man4 sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:22:24 -0000 Author: ed Date: Wed Jan 13 21:22:23 2010 New Revision: 202264 URL: http://svn.freebsd.org/changeset/base/202264 Log: Remove the 1000 pseudo terminal limit from pts(4). Even with the old utmp format, we could in fact go to pts/9999, because ut_line wasn't guaranteed to be null terminated there. Modified: head/share/man/man4/pts.4 head/sys/kern/tty_pts.c Modified: head/share/man/man4/pts.4 ============================================================================== --- head/share/man/man4/pts.4 Wed Jan 13 21:21:32 2010 (r202263) +++ head/share/man/man4/pts.4 Wed Jan 13 21:22:23 2010 (r202264) @@ -136,12 +136,6 @@ This should not be used directly. It is used to implement routines like .Xr grantpt 3 . .El -.Pp -The maximum number of pseudo-terminals is limited to 1000. -It is not possible to use more than 1000 pseudo-terminals, as all software -which use -.Xr utmp 5 -will not be able to handle pseudo-terminals with number superior to 999. .Sh FILES The files used by this pseudo-terminals implementation are: @@ -150,26 +144,6 @@ pseudo-terminals implementation are: .It Pa /dev/pts/[num] Pseudo-terminal slave devices. .El -.Sh SYSCTL VARIABLES -The following -.Xr sysctl 8 -variables can be used to modify or monitor -.Nm -behavior. -.Bl -tag -width indent -.It Va kern.pts_maxdev -Highest pseudo-terminal unit number to be allocated. -Because -.Xr utmp 5 -is restricted to an 8-byte line name size, -.Nm -will not create any pseudo-terminals with a unit number above 999 by -default. -After increasing -.Dv UT_LINESIZE , -this variable can be changed to allow more than 1000 pseudo-terminals to -be allocated simultaneously. -.El .Sh DIAGNOSTICS None. .Sh SEE ALSO Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Wed Jan 13 21:21:32 2010 (r202263) +++ head/sys/kern/tty_pts.c Wed Jan 13 21:22:23 2010 (r202264) @@ -71,9 +71,6 @@ __FBSDID("$FreeBSD$"); * UT_LINESIZE. */ static struct unrhdr *pts_pool; -static unsigned int pts_maxdev = 999; -SYSCTL_UINT(_kern, OID_AUTO, pts_maxdev, CTLFLAG_RW, &pts_maxdev, 0, - "Maximum amount of pts(4) pseudo-terminals"); static MALLOC_DEFINE(M_PTS, "pts", "pseudo tty device"); @@ -725,11 +722,6 @@ pts_alloc(int fflags, struct thread *td, chgptscnt(uid, -1, 0); return (EAGAIN); } - if (unit > pts_maxdev) { - free_unr(pts_pool, unit); - chgptscnt(uid, -1, 0); - return (EAGAIN); - } /* Allocate TTY and softc. */ psc = malloc(sizeof(struct pts_softc), M_PTS, M_WAITOK|M_ZERO); From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:23:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FCE410656A8; Wed, 13 Jan 2010 21:23:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8658FC22; Wed, 13 Jan 2010 21:23:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLNRWs028959; Wed, 13 Jan 2010 21:23:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLNRd4028957; Wed, 13 Jan 2010 21:23:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132123.o0DLNRd4028957@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202265 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:23:27 -0000 Author: marius Date: Wed Jan 13 21:23:27 2010 New Revision: 202265 URL: http://svn.freebsd.org/changeset/base/202265 Log: MFC: r200938 - Don't check for a valid interrupt controller on every interrupt in intr_execute_handlers(). If we managed to get here without an associated interrupt controller we have way bigger problems. While at it predict stray vector interrupts as false as they are rather unlikely. - Don't blindly call the clear function of an interrupt controller when adding a handler in inthand_add() as interrupt controllers like the one driven by upa(4) are auto-clearing and thus provide NULL instead. Modified: stable/8/sys/sparc64/sparc64/intr_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/intr_machdep.c Wed Jan 13 21:22:23 2010 (r202264) +++ stable/8/sys/sparc64/sparc64/intr_machdep.c Wed Jan 13 21:23:27 2010 (r202265) @@ -276,7 +276,7 @@ intr_execute_handlers(void *cookie) struct intr_vector *iv; iv = cookie; - if (iv->iv_ic == NULL || intr_event_handle(iv->iv_event, NULL) != 0) + if (__predict_false(intr_event_handle(iv->iv_event, NULL) != 0)) intr_stray_vector(iv); } @@ -377,7 +377,8 @@ inthand_add(const char *name, int vec, d #endif ic->ic_enable(iv); /* Ensure the interrupt is cleared, it might have triggered before. */ - ic->ic_clear(iv); + if (ic->ic_clear != NULL) + ic->ic_clear(iv); sx_xunlock(&intr_table_lock); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:23:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88BDE1065696; Wed, 13 Jan 2010 21:23:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 774588FC0A; Wed, 13 Jan 2010 21:23:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DLNTdj028995; Wed, 13 Jan 2010 21:23:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DLNTab028993; Wed, 13 Jan 2010 21:23:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132123.o0DLNTab028993@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 21:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202266 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:23:29 -0000 Author: marius Date: Wed Jan 13 21:23:29 2010 New Revision: 202266 URL: http://svn.freebsd.org/changeset/base/202266 Log: MFC: r200938 - Don't check for a valid interrupt controller on every interrupt in intr_execute_handlers(). If we managed to get here without an associated interrupt controller we have way bigger problems. While at it predict stray vector interrupts as false as they are rather unlikely. - Don't blindly call the clear function of an interrupt controller when adding a handler in inthand_add() as interrupt controllers like the one driven by upa(4) are auto-clearing and thus provide NULL instead. Modified: stable/7/sys/sparc64/sparc64/intr_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/intr_machdep.c Wed Jan 13 21:23:27 2010 (r202265) +++ stable/7/sys/sparc64/sparc64/intr_machdep.c Wed Jan 13 21:23:29 2010 (r202266) @@ -277,7 +277,7 @@ intr_execute_handlers(void *cookie) struct intr_vector *iv; iv = cookie; - if (iv->iv_ic == NULL || intr_event_handle(iv->iv_event, NULL) != 0) + if (__predict_false(intr_event_handle(iv->iv_event, NULL) != 0)) intr_stray_vector(iv); } @@ -378,7 +378,8 @@ inthand_add(const char *name, int vec, d #endif ic->ic_enable(iv); /* Ensure the interrupt is cleared, it might have triggered before. */ - ic->ic_clear(iv); + if (ic->ic_clear != NULL) + ic->ic_clear(iv); sx_xunlock(&intr_table_lock); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:27:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36427106566B; Wed, 13 Jan 2010 21:27:30 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-ew0-f211.google.com (mail-ew0-f211.google.com [209.85.219.211]) by mx1.freebsd.org (Postfix) with ESMTP id 3EA038FC12; Wed, 13 Jan 2010 21:27:28 +0000 (UTC) Received: by ewy3 with SMTP id 3so104940ewy.13 for ; Wed, 13 Jan 2010 13:27:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=a/NEstGZn9uhrtNdFQQrKJ7xBGbGN6lpe1ygePVNYos=; b=sWAaQbVYt7ZlFYCssMl9jGb3FisyKRrRcF/2HbyLHQfLu+65xwVW7b9xmPfOlE3vir pfo4YXC/pGE///Wh+VaLjBUdap/uSPHVnyYePAfJFIpwJPoA5b4m2ykg6Mq70RWaxEwF fmBr3s/Dq5NRvl2gdMs5QP2bto4/AJsxE6cGQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=vevSmgz7KQvbe6Rl7h9XwsggNw9AsphDZKWUQ1tfJqw8gy6PC8iWZdAnlTp+0G6Z1e 3/T6WYGqNboUl7iwA6Exx69NoH1i1PB1tK60yiaYiKcgeLMnjRDN0awmjG7z47gb/shE K6DHK6VWvobyFUvz7hIhWqKZmU2ID2Ix/sggA= MIME-Version: 1.0 Received: by 10.213.23.201 with SMTP id s9mr1923554ebb.5.1263418044099; Wed, 13 Jan 2010 13:27:24 -0800 (PST) In-Reply-To: <201001132054.o0DKsI9e021324@svn.freebsd.org> References: <201001132054.o0DKsI9e021324@svn.freebsd.org> Date: Wed, 13 Jan 2010 16:27:24 -0500 Message-ID: <47d0403c1001131327w61c9ccb9gc8693dc88f7fff13@mail.gmail.com> From: Ben Kaduk To: Andrew Thompson Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202243 - in head: share/man/man4 sys/dev/usb sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:27:30 -0000 Lots of grammar nits. See below. On Wed, Jan 13, 2010 at 3:54 PM, Andrew Thompson wrote: > Author: thompsa > Date: Wed Jan 13 20:54:18 2010 > New Revision: 202243 > URL: http://svn.freebsd.org/changeset/base/202243 > > Log: > Update to Fredrik's latest uhso driver. This changes port detection, adds > comments and other code nits. > > Submitted by: Fredrik Lindberg > > Modified: > head/share/man/man4/uhso.4 > head/sys/dev/usb/net/uhso.c > head/sys/dev/usb/usbdevs > > Modified: head/share/man/man4/uhso.4 > ============================================================================== > --- head/share/man/man4/uhso.4 Wed Jan 13 20:51:23 2010 (r202242) > +++ head/share/man/man4/uhso.4 Wed Jan 13 20:54:18 2010 (r202243) > @@ -23,11 +23,11 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd Aug 12, 2009 > +.Dd January 14, 2010 > .Os > .Dt UHSO 4 > .Sh NAME > -.Nm hso > +.Nm uhso > .Nd support for several HSxPA devices from Option N.V. > .Sh SYNOPSIS > The module can be loaded at boot time by placing the following line in > @@ -47,12 +47,12 @@ driver which makes them behave like a > .Xr tty 4 . > The packet interface is exposed as a network interface. > .Pp > -To establish a connection on the packet interface the use of the proprietary > +Connection of the packet interface is achieved by using the proprietary This sentence sounds subtly wrong to me. I think that just saying "connection to" instead of "of" will make it grammatically correct, but I worry that it may no longer be factually correct, then. Perhaps "A connection on [...]", instead? > AT commands > .Dq Li AT_OWANCALL > and > .Dq Li AT_OWANDATA > -are required on any of the serial ports. > +on any of the available serial ports. > .Pp > The network interface must be configured manually using the data obtain from > these calls. > @@ -70,12 +70,23 @@ driver supports at least the following c > Option GlobeSurfer iCON 7.2 (new firmware) > .It > Option iCON 225 > +.It > +Option iCON 505 > .El > .Pp > The device features a mass storage device referred to as > .Dq Zero-CD > -which contains drivers for Microsoft Windows. > -The driver automatically switches the device to modem mode. > +which contains drivers for Microsoft Windows, this is the default Comma splice. I would put a semicolon, but a full stop is acceptable, too. > +mode for the device. > +The > +.Nm > +driver automatically switches the device from > +.Dq Zero-CD > +mode to modem mode. > +This behavior can be disabled by setting > +.Va hw.usb.uhso.auto_switch > +to 0 using > +.Xr sysctl 8 > .Sh EXAMPLES > Establishing a packet interface connection > .Bd -literal -offset indent > > Modified: head/sys/dev/usb/net/uhso.c > ============================================================================== > --- head/sys/dev/usb/net/uhso.c Wed Jan 13 20:51:23 2010 (r202242) > +++ head/sys/dev/usb/net/uhso.c Wed Jan 13 20:54:18 2010 (r202243) > @@ -145,12 +146,14 @@ struct uhso_softc { > #define UHSO_MPORT_TYPE_APP 0x01 /* Application */ > #define UHSO_MPORT_TYPE_PCSC 0x02 > #define UHSO_MPORT_TYPE_GPS 0x03 > -#define UHSO_MPORT_TYPE_APP2 0x04 > +#define UHSO_MPORT_TYPE_APP2 0x04 /* Secondary application */ > #define UHSO_MPORT_TYPE_MAX UHSO_MPORT_TYPE_APP2 > #define UHSO_MPORT_TYPE_NOMAX 8 /* Max number of mux ports */ > > /* > * Port definitions > + * Note that these definitions are arbitray and doesn't match > + * values returned by the auto config descriptor. "arbitrary"; "don't"; "the values" > */ > #define UHSO_PORT_TYPE_CTL 0x01 > #define UHSO_PORT_TYPE_APP 0x02 > @@ -560,6 +567,18 @@ uhso_attach(device_t self) > CTLFLAG_RD, uhso_port[UHSO_IFACE_PORT(sc->sc_type)], 0, > "Port available at this interface"); > > + /* > + * The default interface description on most Option devices aren't "isn't" > + * very helpful. So we skip device_set_usb_desc and set the > + * device description manually. > + */ > + device_set_desc_copy(self, uhso_port_type[UHSO_IFACE_PORT_TYPE(sc->sc_type)]); > + /* Announce device */ > + device_printf(self, "<%s port> at <%s %s> on %s\n", > + uhso_port_type[UHSO_IFACE_PORT_TYPE(sc->sc_type)], > + uaa->device->manufacturer, uaa->device->product, > + device_get_nameunit(uaa->device->bus->bdev)); > + > if (sc->sc_ttys > 0) { > SYSCTL_ADD_INT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "ports", > CTLFLAG_RD, &sc->sc_ttys, 0, "Number of attached serial ports"); > @@ -798,27 +832,41 @@ uhso_probe_iface(struct uhso_softc *sc, > sc->sc_type = type; > iface = usbd_get_iface(sc->sc_udev, index); > > - if (UHSO_IFACE_USB_TYPE(type) & (UHSO_IF_MUX | UHSO_IF_NET)) { > - error0 = uhso_attach_muxserial(sc, iface, type); > + if (UHSO_IFACE_PORT_TYPE(type) == UHSO_PORT_TYPE_NETWORK) { > error = uhso_attach_ifnet(sc, iface, type); > - > - if (error0 && error) > + if (error) { > + UHSO_DPRINTF(1, "uhso_attach_ifnet failed"); > return (ENXIO); > + } > > - if (sc->sc_ttys > 0) { > + /* > + * If there is an additional interrupt endpoint on this > + * interface we most likley have a multiplexed serial port "likely". I might put a comma before "we", while you're here. > + * available. > + */ > + if (iface->idesc->bNumEndpoints < 3) { > + sc->sc_type = UHSO_IFACE_SPEC( > + UHSO_IFACE_USB_TYPE(type) & ~UHSO_IF_MUX, > + UHSO_IFACE_PORT(type) & ~UHSO_PORT_SERIAL, > + UHSO_IFACE_PORT_TYPE(type)); > + return (0); > + } > + > + UHSO_DPRINTF(1, "Trying to attach mux. serial\n"); > + error = uhso_attach_muxserial(sc, iface, type); > + if (error == 0 && sc->sc_ttys > 0) { > error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom, > sc->sc_ttys, sc, &uhso_ucom_callback, &sc->sc_mtx); > if (error) { > device_printf(sc->sc_dev, "ucom_attach failed\n"); > return (ENXIO); > } > - } > > - mtx_lock(&sc->sc_mtx); > - usbd_transfer_start(sc->sc_xfer[UHSO_MUX_ENDPT_INTR]); > - mtx_unlock(&sc->sc_mtx); > - } > - else if ((UHSO_IFACE_USB_TYPE(type) & UHSO_IF_BULK) && > + mtx_lock(&sc->sc_mtx); > + usbd_transfer_start(sc->sc_xfer[UHSO_MUX_ENDPT_INTR]); > + mtx_unlock(&sc->sc_mtx); > + } > + } else if ((UHSO_IFACE_USB_TYPE(type) & UHSO_IF_BULK) && > UHSO_IFACE_PORT(type) & UHSO_PORT_SERIAL) { > > error = uhso_attach_bulkserial(sc, iface, type); > @@ -914,6 +977,10 @@ uhso_attach_muxserial(struct uhso_softc > return (0); > } > > +/* > + * Interrupt callback for the multiplexed serial port. Indicates > + * which serial port that has data waiting. "that" is unnecessary, here. > + */ > static void > uhso_mux_intr_callback(struct usb_xfer *xfer, usb_error_t error) > { > @@ -1470,7 +1529,11 @@ tr_setup: > } > > /* > - * Defered RX processing, called with mutex locked. > + * Deferred RX processing, called with mutex locked. > + * > + * Each frame we receive might contain several small ip-packets aswell "as well" -Ben Kaduk From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:35:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15D341065676; Wed, 13 Jan 2010 21:35:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D905D8FC08; Wed, 13 Jan 2010 21:35:50 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 6FD5746B2C; Wed, 13 Jan 2010 16:35:50 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id B92A08A01D; Wed, 13 Jan 2010 16:35:49 -0500 (EST) From: John Baldwin To: Doug Barton Date: Wed, 13 Jan 2010 16:33:09 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091231; KDE/4.3.1; amd64; ; ) References: <201001131515.08602.jhb@freebsd.org> <4B4E2ECA.90905@FreeBSD.org> In-Reply-To: <4B4E2ECA.90905@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001131633.09669.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 13 Jan 2010 16:35:49 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "M. Warner Losh" , freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:35:51 -0000 On Wednesday 13 January 2010 3:36:26 pm Doug Barton wrote: > On 1/13/2010 12:15 PM, John Baldwin wrote: > > On Wednesday 13 January 2010 1:48:38 pm Doug Barton wrote: > >> To address the other responses, Tom, sorry, your suggested text doesn't > >> address my concern. John, I don't think that users would somehow > >> magically know to look in NOTES for more information about an option > >> that is already in GENERIC. > > > > You really think users do not already know to look in manpages or NOTES to > > find out more details about kernel options? > > That's not what I said. I don't think that users would [..] know to look in NOTES for more information about an option that is [...] in GENERIC. That seems really straight forward to me, or my English isn't good. I do think users "would know to look in NOTES for more information about an option that is in GENERIC". > > Put > > another way, what makes 'INCLUDE_CONFIG_FILE' sufficiently special that it > > deserves special treatment relative to other kernel options? > > Because the default behavior (not including the actual file) for the > option is contrary to user' reasonable expectation of how the option > should work .... and now I'm repeating myself. I think a better change would be to just change the default behavior of config(8) to do the reasonable thing. > Seriously, don't you have anything better to do than argue against > including a comment in a config file? I know I do. What is the > overwhelming horror that will arise here if there are more comments > GENERIC than you deem to be absolutely necessary? What is the overwhelming horror about keeping a file readable and allowing users to find extended documentation for INCLUDE_CONFIG_FILE in the same place that they find extended documentation about every other kernel option? > And yes, I read the part of your message that I snipped about "why do we > have these documents if users don't read them?" The answer is, that's > why I'm suggesting a comment that tells users what man page to read. I think adding comments that merely redirect the users to further documentation only serves to obfuscate. Left unchecked this approach will render files such as GENERIC with a very low signal-to-noise ratio making it harder to parse in a "big picture" way. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:37:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A922A1065670; Wed, 13 Jan 2010 21:37:24 +0000 (UTC) (envelope-from julian@elischer.org) Received: from utility-0.aerioconnect.net (utility-0.aerioconnect.net [216.240.32.11]) by mx1.freebsd.org (Postfix) with ESMTP id 6AAF98FC13; Wed, 13 Jan 2010 21:37:24 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by utility-0.aerioconnect.net (8.13.1/8.13.1) with ESMTP id o0DKSXBV011267; Wed, 13 Jan 2010 12:28:33 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 64EF72D6018; Wed, 13 Jan 2010 12:28:32 -0800 (PST) Message-ID: <4B4E2CEF.5030709@elischer.org> Date: Wed, 13 Jan 2010 12:28:31 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: John Baldwin References: <20100112.174326.337739863389869251.imp@bsdimp.com> <4B4E1586.7090102@FreeBSD.org> <201001131515.08602.jhb@freebsd.org> In-Reply-To: <201001131515.08602.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Doug Barton , svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:37:24 -0000 John Baldwin wrote: > On Wednesday 13 January 2010 1:48:38 pm Doug Barton wrote: >> To address the other responses, Tom, sorry, your suggested text doesn't >> address my concern. John, I don't think that users would somehow >> magically know to look in NOTES for more information about an option >> that is already in GENERIC. > > You really think users do not already know to look in manpages or NOTES to > find out more details about kernel options? how about a one line comment in GENERIC suggesting that people look at NOTES for more info. From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 21:55:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9913A106568D; Wed, 13 Jan 2010 21:55:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6781C8FC0C; Wed, 13 Jan 2010 21:55:10 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 10B5A46B51; Wed, 13 Jan 2010 16:55:10 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 525DD8A01D; Wed, 13 Jan 2010 16:55:09 -0500 (EST) From: John Baldwin To: Julian Elischer Date: Wed, 13 Jan 2010 16:55:08 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091231; KDE/4.3.1; amd64; ; ) References: <201001131515.08602.jhb@freebsd.org> <4B4E2CEF.5030709@elischer.org> In-Reply-To: <4B4E2CEF.5030709@elischer.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001131655.08465.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 13 Jan 2010 16:55:09 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Doug Barton , svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 21:55:10 -0000 On Wednesday 13 January 2010 3:28:31 pm Julian Elischer wrote: > John Baldwin wrote: > > On Wednesday 13 January 2010 1:48:38 pm Doug Barton wrote: > >> To address the other responses, Tom, sorry, your suggested text doesn't > >> address my concern. John, I don't think that users would somehow > >> magically know to look in NOTES for more information about an option > >> that is already in GENERIC. > > > > You really think users do not already know to look in manpages or NOTES to > > find out more details about kernel options? > > how about a one line comment in GENERIC suggesting that people look at > NOTES for more info. There is already a large block comment at the top of GENERIC that gives people several other places to look for more detailed info on kernel options as a general rule: # # GENERIC -- Generic kernel configuration file for FreeBSD/amd64 # # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the # FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the # latest information. # # An exhaustive list of options and more detailed explanations of the # device lines is also present in the ../../conf/NOTES and NOTES files. # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # # $FreeBSD: head/sys/amd64/conf/GENERIC 202019 2010-01-10 17:44:22Z imp $ I think the existing paragraph about NOTES in particular is sufficient without requiring additional detailed documentation for each option. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 22:10:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82C4B1065676; Wed, 13 Jan 2010 22:10:29 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 34A088FC14; Wed, 13 Jan 2010 22:10:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0DM3dAA096341; Wed, 13 Jan 2010 15:03:39 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 13 Jan 2010 15:04:35 -0700 (MST) Message-Id: <20100113.150435.650865766805848595.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <201001131633.09669.jhb@freebsd.org> References: <201001131515.08602.jhb@freebsd.org> <4B4E2ECA.90905@FreeBSD.org> <201001131633.09669.jhb@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, dougb@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 22:10:29 -0000 In message: <201001131633.09669.jhb@freebsd.org> John Baldwin writes: : On Wednesday 13 January 2010 3:36:26 pm Doug Barton wrote: : > On 1/13/2010 12:15 PM, John Baldwin wrote: : > > On Wednesday 13 January 2010 1:48:38 pm Doug Barton wrote: : > >> To address the other responses, Tom, sorry, your suggested text doesn't : > >> address my concern. John, I don't think that users would somehow : > >> magically know to look in NOTES for more information about an option : > >> that is already in GENERIC. : > > : > > You really think users do not already know to look in manpages or NOTES to : > > find out more details about kernel options? : > : > That's not what I said. : : : I don't think that users would [..] know to look in NOTES for more information : about an option that is [...] in GENERIC. : : : That seems really straight forward to me, or my English isn't good. I do : think users "would know to look in NOTES for more information about an option : that is in GENERIC". Agreed. That's why I did what I did: I conformed to the usual practice. : > > Put : > > another way, what makes 'INCLUDE_CONFIG_FILE' sufficiently special that it : > > deserves special treatment relative to other kernel options? : > : > Because the default behavior (not including the actual file) for the : > option is contrary to user' reasonable expectation of how the option : > should work .... and now I'm repeating myself. : : I think a better change would be to just change the default behavior of : config(8) to do the reasonable thing. -C should be the default, and we should invent a new '--smaller-saved-config' option. : > Seriously, don't you have anything better to do than argue against : > including a comment in a config file? I know I do. What is the : > overwhelming horror that will arise here if there are more comments : > GENERIC than you deem to be absolutely necessary? : : What is the overwhelming horror about keeping a file readable and allowing : users to find extended documentation for INCLUDE_CONFIG_FILE in the same place : that they find extended documentation about every other kernel option? Yes. That's why I did what I did: to keep things readable. : > And yes, I read the part of your message that I snipped about "why do we : > have these documents if users don't read them?" The answer is, that's : > why I'm suggesting a comment that tells users what man page to read. : : I think adding comments that merely redirect the users to further : documentation only serves to obfuscate. Left unchecked this approach will : render files such as GENERIC with a very low signal-to-noise ratio making it : harder to parse in a "big picture" way. Yes. Basically, I'm annoyed too: Our users aren't idiots, and we shouldn't be treating them as such at every turn. If there are surprises with how INCLUDE_CONFIG_FILE behaves, we should work to make it better, not paper over it with a comment. Warner From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 22:22:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBFBE106566C; Wed, 13 Jan 2010 22:22:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1B218FC18; Wed, 13 Jan 2010 22:22:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DMMGc8042106; Wed, 13 Jan 2010 22:22:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DMMGE0042103; Wed, 13 Jan 2010 22:22:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001132222.o0DMMGE0042103@svn.freebsd.org> From: Alexander Motin Date: Wed, 13 Jan 2010 22:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202267 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 22:22:17 -0000 Author: mav Date: Wed Jan 13 22:22:16 2010 New Revision: 202267 URL: http://svn.freebsd.org/changeset/base/202267 Log: Hide from default sndstat some information not used on daily basis, to make it readable by average user with average screen size. Modified: head/sys/dev/sound/pcm/sndstat.c head/sys/dev/sound/pcm/sndstat.h Modified: head/sys/dev/sound/pcm/sndstat.c ============================================================================== --- head/sys/dev/sound/pcm/sndstat.c Wed Jan 13 21:23:29 2010 (r202266) +++ head/sys/dev/sound/pcm/sndstat.c Wed Jan 13 22:22:16 2010 (r202267) @@ -81,7 +81,7 @@ static int sndstat_files = 0; static SLIST_HEAD(, sndstat_entry) sndstat_devlist = SLIST_HEAD_INITIALIZER(sndstat_devlist); -int snd_verbose = 1; +int snd_verbose = 0; TUNABLE_INT("hw.snd.verbose", &snd_verbose); #ifdef SND_DEBUG @@ -372,12 +372,10 @@ sndstat_prepare(struct sbuf *s) PCM_ACQUIRE_QUICK(d); sbuf_printf(s, "%s:", device_get_nameunit(ent->dev)); sbuf_printf(s, " <%s>", device_get_desc(ent->dev)); - sbuf_printf(s, " %s [%s]", ent->str, - (d->flags & SD_F_MPSAFE) ? "MPSAFE" : "GIANT"); + if (snd_verbose > 0) + sbuf_printf(s, " %s", ent->str); if (ent->handler) ent->handler(s, ent->dev, snd_verbose); - else - sbuf_printf(s, " [no handler]"); sbuf_printf(s, "\n"); PCM_RELEASE_QUICK(d); } Modified: head/sys/dev/sound/pcm/sndstat.h ============================================================================== --- head/sys/dev/sound/pcm/sndstat.h Wed Jan 13 21:23:29 2010 (r202266) +++ head/sys/dev/sound/pcm/sndstat.h Wed Jan 13 22:22:16 2010 (r202267) @@ -37,9 +37,6 @@ struct pcm_channel *c; \ struct pcm_feeder *f; \ \ - if (verbose < 1) \ - return (0); \ - \ d = device_get_softc(dev); \ PCM_BUSYASSERT(d); \ \ @@ -48,9 +45,19 @@ return (0); \ } \ \ - sbuf_printf(s, " (%dp:%dv/%dr:%dv channels %splex%s)", \ - d->playcount, d->pvchancount, d->reccount, d->rvchancount, \ - (d->flags & SD_F_SIMPLEX) ? "sim" : "du", \ + if (verbose < 1) { \ + sbuf_printf(s, " (%s%s%s", \ + d->playcount ? "play" : "", \ + (d->playcount && d->reccount) ? "/" : "", \ + d->reccount ? "rec" : ""); \ + } else { \ + sbuf_printf(s, " (%dp:%dv/%dr:%dv", \ + d->playcount, d->pvchancount, \ + d->reccount, d->rvchancount); \ + } \ + sbuf_printf(s, "%s)%s", \ + ((d->playcount != 0 && d->reccount != 0) && \ + (d->flags & SD_F_SIMPLEX)) ? " simplex" : "", \ (device_get_unit(dev) == snd_unit) ? " default" : "") From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 22:39:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAB871065679; Wed, 13 Jan 2010 22:39:39 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCEE38FC17; Wed, 13 Jan 2010 22:39:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DMddgF045976; Wed, 13 Jan 2010 22:39:39 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DMddYZ045973; Wed, 13 Jan 2010 22:39:39 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001132239.o0DMddYZ045973@svn.freebsd.org> From: Xin LI Date: Wed, 13 Jan 2010 22:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202268 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 22:39:40 -0000 Author: delphij Date: Wed Jan 13 22:39:39 2010 New Revision: 202268 URL: http://svn.freebsd.org/changeset/base/202268 Log: o Add PCI ID for BCM 5756. o Don't enable BGE_FLAG_BER_BUG on both 5722 and 5756, and based on their PCI IDs rather than their chip IDs. Reported by: several PC-BSD users via kmoore Reviewed by: yongari, imp, jhb, davidch Sponsored by: iXsystems, Inc. MFC after: 2 weeks Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Jan 13 22:22:16 2010 (r202267) +++ head/sys/dev/bge/if_bge.c Wed Jan 13 22:39:39 2010 (r202268) @@ -187,6 +187,7 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM5754M }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5755 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5755M }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5756 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761E }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761S }, @@ -2604,7 +2605,8 @@ bge_attach(device_t dev) sc->bge_asicrev == BGE_ASICREV_BCM5761 || sc->bge_asicrev == BGE_ASICREV_BCM5784 || sc->bge_asicrev == BGE_ASICREV_BCM5787) { - if (sc->bge_chipid != BGE_CHIPID_BCM5722_A0) + if (pci_get_device(dev) != BCOM_DEVICEID_BCM5722 && + pci_get_device(dev) != BCOM_DEVICEID_BCM5756) sc->bge_flags |= BGE_FLAG_JITTER_BUG; } else if (sc->bge_asicrev != BGE_ASICREV_BCM5906) sc->bge_flags |= BGE_FLAG_BER_BUG; Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Wed Jan 13 22:22:16 2010 (r202267) +++ head/sys/dev/bge/if_bgereg.h Wed Jan 13 22:39:39 2010 (r202268) @@ -2138,6 +2138,7 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM5754M 0x1672 #define BCOM_DEVICEID_BCM5755 0x167B #define BCOM_DEVICEID_BCM5755M 0x1673 +#define BCOM_DEVICEID_BCM5756 0x1674 #define BCOM_DEVICEID_BCM5761 0x1681 #define BCOM_DEVICEID_BCM5761E 0x1680 #define BCOM_DEVICEID_BCM5761S 0x1688 From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 00:36:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A60D1065670; Thu, 14 Jan 2010 00:36:50 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 192258FC0C; Thu, 14 Jan 2010 00:36:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0E0annY072037; Thu, 14 Jan 2010 00:36:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0E0anlU072034; Thu, 14 Jan 2010 00:36:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001140036.o0E0anlU072034@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 00:36:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202269 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 00:36:50 -0000 Author: yongari Date: Thu Jan 14 00:36:49 2010 New Revision: 202269 URL: http://svn.freebsd.org/changeset/base/202269 Log: Add BCM5754 PHY id that is found on Dell Studio XPS 16. Tested by: scf MFC after: 1 week Modified: head/sys/dev/mii/brgphy.c head/sys/dev/mii/miidevs Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Wed Jan 13 22:39:39 2010 (r202268) +++ head/sys/dev/mii/brgphy.c Thu Jan 14 00:36:49 2010 (r202269) @@ -133,6 +133,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5708S), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709CAX), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5722), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5784), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), MII_PHY_DESC(BROADCOM2, BCM5906), Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Wed Jan 13 22:39:39 2010 (r202268) +++ head/sys/dev/mii/miidevs Thu Jan 14 00:36:49 2010 (r202269) @@ -153,6 +153,7 @@ model xxBROADCOM_ALT1 BCM5787 0x000e BCM model xxBROADCOM_ALT1 BCM5708S 0x0015 BCM5708S 1000/2500BaseSX PHY model xxBROADCOM_ALT1 BCM5709CAX 0x002c BCM5709C(AX) 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5722 0x002d BCM5722 10/100/1000baseTX PHY +model xxBROADCOM_ALT1 BCM5784 0x003a BCM5784 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 01:16:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E441065676; Thu, 14 Jan 2010 01:16:21 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE8618FC08; Thu, 14 Jan 2010 01:16:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0E1GK5H080925; Thu, 14 Jan 2010 01:16:20 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0E1GKsr080922; Thu, 14 Jan 2010 01:16:20 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001140116.o0E1GKsr080922@svn.freebsd.org> From: Andrew Thompson Date: Thu, 14 Jan 2010 01:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202270 - in head: share/man/man4 sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 01:16:21 -0000 Author: thompsa Date: Thu Jan 14 01:16:20 2010 New Revision: 202270 URL: http://svn.freebsd.org/changeset/base/202270 Log: Grammar nits. Submitted by: Ben Kaduk Modified: head/share/man/man4/uhso.4 head/sys/dev/usb/net/uhso.c Modified: head/share/man/man4/uhso.4 ============================================================================== --- head/share/man/man4/uhso.4 Thu Jan 14 00:36:49 2010 (r202269) +++ head/share/man/man4/uhso.4 Thu Jan 14 01:16:20 2010 (r202270) @@ -47,8 +47,8 @@ driver which makes them behave like a .Xr tty 4 . The packet interface is exposed as a network interface. .Pp -Connection of the packet interface is achieved by using the proprietary -AT commands +Establishing a connection on the packet interface is achieved by using the +proprietary AT commands .Dq Li AT_OWANCALL and .Dq Li AT_OWANDATA @@ -76,7 +76,7 @@ Option iCON 505 .Pp The device features a mass storage device referred to as .Dq Zero-CD -which contains drivers for Microsoft Windows, this is the default +which contains drivers for Microsoft Windows; this is the default mode for the device. The .Nm Modified: head/sys/dev/usb/net/uhso.c ============================================================================== --- head/sys/dev/usb/net/uhso.c Thu Jan 14 00:36:49 2010 (r202269) +++ head/sys/dev/usb/net/uhso.c Thu Jan 14 01:16:20 2010 (r202270) @@ -152,8 +152,8 @@ struct uhso_softc { /* * Port definitions - * Note that these definitions are arbitray and doesn't match - * values returned by the auto config descriptor. + * Note that these definitions are arbitrary and do not match the values + * returned by the auto config descriptor. */ #define UHSO_PORT_TYPE_CTL 0x01 #define UHSO_PORT_TYPE_APP 0x02 @@ -568,7 +568,7 @@ uhso_attach(device_t self) "Port available at this interface"); /* - * The default interface description on most Option devices aren't + * The default interface description on most Option devices isn't * very helpful. So we skip device_set_usb_desc and set the * device description manually. */ @@ -841,7 +841,7 @@ uhso_probe_iface(struct uhso_softc *sc, /* * If there is an additional interrupt endpoint on this - * interface we most likley have a multiplexed serial port + * interface then we most likely have a multiplexed serial port * available. */ if (iface->idesc->bNumEndpoints < 3) { @@ -979,7 +979,7 @@ uhso_attach_muxserial(struct uhso_softc /* * Interrupt callback for the multiplexed serial port. Indicates - * which serial port that has data waiting. + * which serial port has data waiting. */ static void uhso_mux_intr_callback(struct usb_xfer *xfer, usb_error_t error) @@ -1531,7 +1531,7 @@ tr_setup: /* * Deferred RX processing, called with mutex locked. * - * Each frame we receive might contain several small ip-packets aswell + * Each frame we receive might contain several small ip-packets as well * as partial ip-packets. We need to separate/assemble them into individual * packets before sending them to the ip-layer. */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 01:16:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77499106568B; Thu, 14 Jan 2010 01:16:50 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9538FC08; Thu, 14 Jan 2010 01:16:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id E072B7B6F2; Thu, 14 Jan 2010 14:16:48 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 90KAky25Z++Q; Thu, 14 Jan 2010 14:16:44 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Thu, 14 Jan 2010 14:16:44 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 15B1511434; Thu, 14 Jan 2010 14:16:44 +1300 (NZDT) Date: Thu, 14 Jan 2010 14:16:43 +1300 From: Andrew Thompson To: Ben Kaduk Message-ID: <20100114011643.GG63408@citylink.fud.org.nz> References: <201001132054.o0DKsI9e021324@svn.freebsd.org> <47d0403c1001131327w61c9ccb9gc8693dc88f7fff13@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47d0403c1001131327w61c9ccb9gc8693dc88f7fff13@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202243 - in head: share/man/man4 sys/dev/usb sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 01:16:50 -0000 On Wed, Jan 13, 2010 at 04:27:24PM -0500, Ben Kaduk wrote: > Lots of grammar nits. See below. > ... Thanks, commmitted. From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 02:14:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26D251065670; Thu, 14 Jan 2010 02:14:22 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 149C18FC12; Thu, 14 Jan 2010 02:14:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0E2ELqi093642; Thu, 14 Jan 2010 02:14:21 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0E2ELDr093639; Thu, 14 Jan 2010 02:14:21 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001140214.o0E2ELDr093639@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 14 Jan 2010 02:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202271 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 02:14:22 -0000 Author: marcel Date: Thu Jan 14 02:14:21 2010 New Revision: 202271 URL: http://svn.freebsd.org/changeset/base/202271 Log: Add wrappers for the RT Variable Services. While here, translate the EFI status into a standard errno value and change efi_set_time() to return a standard error. MFC after: 1 week Modified: head/sys/ia64/ia64/efi.c head/sys/ia64/include/efi.h Modified: head/sys/ia64/ia64/efi.c ============================================================================== --- head/sys/ia64/ia64/efi.c Thu Jan 14 01:16:20 2010 (r202270) +++ head/sys/ia64/ia64/efi.c Thu Jan 14 02:14:21 2010 (r202271) @@ -41,6 +41,45 @@ static struct efi_systbl *efi_systbl; static struct efi_cfgtbl *efi_cfgtbl; static struct efi_rt *efi_runtime; +static int efi_status2err[25] = { + 0, /* EFI_SUCCESS */ + ENOEXEC, /* EFI_LOAD_ERROR */ + EINVAL, /* EFI_INVALID_PARAMETER */ + ENOSYS, /* EFI_UNSUPPORTED */ + EMSGSIZE, /* EFI_BAD_BUFFER_SIZE */ + EOVERFLOW, /* EFI_BUFFER_TOO_SMALL */ + EBUSY, /* EFI_NOT_READY */ + EIO, /* EFI_DEVICE_ERROR */ + EROFS, /* EFI_WRITE_PROTECTED */ + EAGAIN, /* EFI_OUT_OF_RESOURCES */ + EIO, /* EFI_VOLUME_CORRUPTED */ + ENOSPC, /* EFI_VOLUME_FULL */ + ENXIO, /* EFI_NO_MEDIA */ + ESTALE, /* EFI_MEDIA_CHANGED */ + ENOENT, /* EFI_NOT_FOUND */ + EACCES, /* EFI_ACCESS_DENIED */ + ETIMEDOUT, /* EFI_NO_RESPONSE */ + EADDRNOTAVAIL, /* EFI_NO_MAPPING */ + ETIMEDOUT, /* EFI_TIMEOUT */ + EDOOFUS, /* EFI_NOT_STARTED */ + EALREADY, /* EFI_ALREADY_STARTED */ + ECANCELED, /* EFI_ABORTED */ + EPROTO, /* EFI_ICMP_ERROR */ + EPROTO, /* EFI_TFTP_ERROR */ + EPROTO /* EFI_PROTOCOL_ERROR */ +}; + +static int +efi_status_to_errno(efi_status status) +{ + u_long code; + int error; + + code = status & 0x3ffffffffffffffful; + error = (code < 25) ? efi_status2err[code] : EDOOFUS; + return (error); +} + void efi_boot_finish(void) { @@ -148,9 +187,38 @@ efi_reset_system(void) panic("%s: unable to reset the machine", __func__); } -efi_status +int efi_set_time(struct efi_tm *tm) { - return (efi_runtime->rt_settime(tm)); + return (efi_status_to_errno(efi_runtime->rt_settime(tm))); +} + +int +efi_var_get(efi_char *name, struct uuid *vendor, uint32_t *attrib, + size_t *datasize, void *data) +{ + efi_status status; + + status = efi_runtime->rt_getvar(name, vendor, attrib, datasize, data); + return (efi_status_to_errno(status)); +} + +int +efi_var_nextname(size_t *namesize, efi_char *name, struct uuid *vendor) +{ + efi_status status; + + status = efi_runtime->rt_scanvar(namesize, name, vendor); + return (efi_status_to_errno(status)); +} + +int +efi_var_set(efi_char *name, struct uuid *vendor, uint32_t *attrib, + size_t *datasize, void *data) +{ + efi_status status; + + status = efi_runtime->rt_getvar(name, vendor, attrib, datasize, data); + return (efi_status_to_errno(status)); } Modified: head/sys/ia64/include/efi.h ============================================================================== --- head/sys/ia64/include/efi.h Thu Jan 14 01:16:20 2010 (r202270) +++ head/sys/ia64/include/efi.h Thu Jan 14 02:14:21 2010 (r202271) @@ -158,6 +158,9 @@ void efi_get_time(struct efi_tm *); struct efi_md *efi_md_first(void); struct efi_md *efi_md_next(struct efi_md *); void efi_reset_system(void); -efi_status efi_set_time(struct efi_tm *); +int efi_set_time(struct efi_tm *); +int efi_var_get(efi_char *, struct uuid *, uint32_t *, size_t *, void *); +int efi_var_nextname(size_t *, efi_char *, struct uuid *); +int efi_var_set(efi_char *, struct uuid *, uint32_t *, size_t *, void *); #endif /* _MACHINE_EFI_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 02:38:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76BAA106568B; Thu, 14 Jan 2010 02:38:46 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64B818FC0A; Thu, 14 Jan 2010 02:38:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0E2ckSb099050; Thu, 14 Jan 2010 02:38:46 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0E2ckFi099047; Thu, 14 Jan 2010 02:38:46 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001140238.o0E2ckFi099047@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 14 Jan 2010 02:38:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202272 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 02:38:46 -0000 Author: marcel Date: Thu Jan 14 02:38:46 2010 New Revision: 202272 URL: http://svn.freebsd.org/changeset/base/202272 Log: Fix previous commitr:. efi_var_set() was copied from efi_var_get(), but wasn't actually changed. Modified: head/sys/ia64/ia64/efi.c head/sys/ia64/include/efi.h Modified: head/sys/ia64/ia64/efi.c ============================================================================== --- head/sys/ia64/ia64/efi.c Thu Jan 14 02:14:21 2010 (r202271) +++ head/sys/ia64/ia64/efi.c Thu Jan 14 02:38:46 2010 (r202272) @@ -214,11 +214,11 @@ efi_var_nextname(size_t *namesize, efi_c } int -efi_var_set(efi_char *name, struct uuid *vendor, uint32_t *attrib, - size_t *datasize, void *data) +efi_var_set(efi_char *name, struct uuid *vendor, uint32_t attrib, + size_t datasize, void *data) { efi_status status; - status = efi_runtime->rt_getvar(name, vendor, attrib, datasize, data); + status = efi_runtime->rt_setvar(name, vendor, attrib, datasize, data); return (efi_status_to_errno(status)); } Modified: head/sys/ia64/include/efi.h ============================================================================== --- head/sys/ia64/include/efi.h Thu Jan 14 02:14:21 2010 (r202271) +++ head/sys/ia64/include/efi.h Thu Jan 14 02:38:46 2010 (r202272) @@ -161,6 +161,6 @@ void efi_reset_system(void); int efi_set_time(struct efi_tm *); int efi_var_get(efi_char *, struct uuid *, uint32_t *, size_t *, void *); int efi_var_nextname(size_t *, efi_char *, struct uuid *); -int efi_var_set(efi_char *, struct uuid *, uint32_t *, size_t *, void *); +int efi_var_set(efi_char *, struct uuid *, uint32_t, size_t, void *); #endif /* _MACHINE_EFI_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 02:48:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E092C106566B; Thu, 14 Jan 2010 02:48:39 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE1208FC08; Thu, 14 Jan 2010 02:48:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0E2mdvW001368; Thu, 14 Jan 2010 02:48:39 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0E2mdKe001365; Thu, 14 Jan 2010 02:48:39 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001140248.o0E2mdKe001365@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 14 Jan 2010 02:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202273 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 02:48:40 -0000 Author: marcel Date: Thu Jan 14 02:48:39 2010 New Revision: 202273 URL: http://svn.freebsd.org/changeset/base/202273 Log: Add ioctl requests to /dev/io on ia64 for reading and writing EFI variables. The primary reason for this is that it allows sysinstall(8) to add a boot menu item for the newly installed FreeBSD image. Modified: head/sys/ia64/ia64/iodev_machdep.c head/sys/ia64/include/iodev.h Modified: head/sys/ia64/ia64/iodev_machdep.c ============================================================================== --- head/sys/ia64/ia64/iodev_machdep.c Thu Jan 14 02:38:46 2010 (r202272) +++ head/sys/ia64/ia64/iodev_machdep.c Thu Jan 14 02:48:39 2010 (r202273) @@ -31,16 +31,22 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +#include #include static int iodev_pio_read(struct iodev_pio_req *req); static int iodev_pio_write(struct iodev_pio_req *req); +static int iodev_efivar_getvar(struct iodev_efivar_req *req); +static int iodev_efivar_nextname(struct iodev_efivar_req *req); +static int iodev_efivar_setvar(struct iodev_efivar_req *req); + /* ARGSUSED */ int ioopen(struct cdev *dev __unused, int flags __unused, int fmt __unused, @@ -69,6 +75,7 @@ int ioioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, int fflag __unused, struct thread *td __unused) { + struct iodev_efivar_req *efivar_req; struct iodev_pio_req *pio_req; int error; @@ -88,6 +95,24 @@ ioioctl(struct cdev *dev __unused, u_lon break; } break; + case IODEV_EFIVAR: + efivar_req = (struct iodev_efivar_req *)data; + efivar_req->result = 0; /* So it's well-defined */ + switch (efivar_req->access) { + case IODEV_EFIVAR_GETVAR: + error = iodev_efivar_getvar(efivar_req); + break; + case IODEV_EFIVAR_NEXTNAME: + error = iodev_efivar_nextname(efivar_req); + break; + case IODEV_EFIVAR_SETVAR: + error = iodev_efivar_setvar(efivar_req); + break; + default: + error = EINVAL; + break; + } + break; } return (error); @@ -158,3 +183,118 @@ iodev_pio_write(struct iodev_pio_req *re return (0); } + +static int +iodev_efivar_getvar(struct iodev_efivar_req *req) +{ + void *data; + efi_char *name; + int error; + + if ((req->namesize & 1) != 0 || req->namesize < 4) + return (EINVAL); + if (req->datasize == 0) + return (EINVAL); + + /* + * Pre-zero the allocated memory and don't copy the last 2 bytes + * of the name. That should be the closing nul character (ucs-2) + * and if not, then we ensured a nul-terminating string. This is + * to protect the firmware and thus ourselves. + */ + name = malloc(req->namesize, M_TEMP, M_WAITOK | M_ZERO); + error = copyin(req->name, name, req->namesize - 2); + if (error) { + free(name, M_TEMP); + return (error); + } + + data = malloc(req->datasize, M_TEMP, M_WAITOK); + error = efi_var_get(name, &req->vendor, &req->attrib, &req->datasize, + data); + if (error == EOVERFLOW || error == ENOENT) { + req->result = error; + error = 0; + } + if (!error && !req->result) + error = copyout(data, req->data, req->datasize); + + free(data, M_TEMP); + free(name, M_TEMP); + return (error); +} + +static int +iodev_efivar_nextname(struct iodev_efivar_req *req) +{ + efi_char *name; + int error; + + /* Enforce a reasonable minimum size of the name buffer. */ + if (req->namesize < 4) + return (EINVAL); + + name = malloc(req->namesize, M_TEMP, M_WAITOK); + error = copyin(req->name, name, req->namesize); + if (error) { + free(name, M_TEMP); + return (error); + } + + error = efi_var_nextname(&req->namesize, name, &req->vendor); + if (error == EOVERFLOW || error == ENOENT) { + req->result = error; + error = 0; + } + if (!error && !req->result) + error = copyout(name, req->name, req->namesize); + + free(name, M_TEMP); + return (error); +} + +static int +iodev_efivar_setvar(struct iodev_efivar_req *req) +{ + void *data; + efi_char *name; + int error; + + if ((req->namesize & 1) != 0 || req->namesize < 4) + return (EINVAL); + + /* + * Pre-zero the allocated memory and don't copy the last 2 bytes + * of the name. That should be the closing nul character (ucs-2) + * and if not, then we ensured a nul-terminating string. This is + * to protect the firmware and thus ourselves. + */ + name = malloc(req->namesize, M_TEMP, M_WAITOK | M_ZERO); + error = copyin(req->name, name, req->namesize - 2); + if (error) { + free(name, M_TEMP); + return (error); + } + + if (req->datasize) { + data = malloc(req->datasize, M_TEMP, M_WAITOK); + error = copyin(req->data, data, req->datasize); + if (error) { + free(data, M_TEMP); + free(name, M_TEMP); + return (error); + } + } else + data = NULL; + + error = efi_var_set(name, &req->vendor, req->attrib, req->datasize, + data); + if (error == EAGAIN || error == ENOENT) { + req->result = error; + error = 0; + } + + free(data, M_TEMP); + free(name, M_TEMP); + return (error); +} Modified: head/sys/ia64/include/iodev.h ============================================================================== --- head/sys/ia64/include/iodev.h Thu Jan 14 02:38:46 2010 (r202272) +++ head/sys/ia64/include/iodev.h Thu Jan 14 02:48:39 2010 (r202273) @@ -29,6 +29,8 @@ #ifndef _MACHINE_IODEV_H_ #define _MACHINE_IODEV_H_ +#include + struct iodev_pio_req { u_int access; #define IODEV_PIO_READ 0 @@ -40,6 +42,22 @@ struct iodev_pio_req { #define IODEV_PIO _IOWR('I', 0, struct iodev_pio_req) +struct iodev_efivar_req { + u_int access; +#define IODEV_EFIVAR_GETVAR 0 +#define IODEV_EFIVAR_NEXTNAME 1 +#define IODEV_EFIVAR_SETVAR 2 + u_int result; /* errno value */ + size_t namesize; + u_short *name; /* UCS-2 */ + struct uuid vendor; + uint32_t attrib; + size_t datasize; + void *data; +}; + +#define IODEV_EFIVAR _IOWR('I', 1, struct iodev_efivar_req) + #ifdef _KERNEL d_open_t ioopen; From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 05:35:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5A42106566B; Thu, 14 Jan 2010 05:35:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B37108FC15; Thu, 14 Jan 2010 05:35:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0E5ZWlN038020; Thu, 14 Jan 2010 05:35:32 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0E5ZWCx038013; Thu, 14 Jan 2010 05:35:32 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001140535.o0E5ZWCx038013@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 Jan 2010 05:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202274 - in head: . include lib/libc/gen libexec/getty X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 05:35:32 -0000 Author: ed Date: Thu Jan 14 05:35:32 2010 New Revision: 202274 URL: http://svn.freebsd.org/changeset/base/202274 Log: Phase out ttyslot(3). The ttyslot() function was originally part for SUSv1, marked LEGACY in SUSv2 and removed later on. This function only makes sense when using utmp(5), because it was used to determine the offset of the record for the controlling TTY. It makes little sense to keep it here, because the new utmpx file format doesn't index based on TTY slots. Modified: head/ObsoleteFiles.inc head/include/unistd.h head/lib/libc/gen/Symbol.map head/lib/libc/gen/ttyname.3 head/lib/libc/gen/ttyslot.c head/libexec/getty/ttys.5 Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Jan 14 02:48:39 2010 (r202273) +++ head/ObsoleteFiles.inc Thu Jan 14 05:35:32 2010 (r202274) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100114: removal of ttyslot(3) +OLD_FILES+=usr/share/man/man3/ttyslot.3.gz # 20100113: remove utmp.h, replace it by utmpx.h OLD_FILES+=usr/share/man/man3/login.3.gz OLD_FILES+=usr/share/man/man3/logout.3.gz Modified: head/include/unistd.h ============================================================================== --- head/include/unistd.h Thu Jan 14 02:48:39 2010 (r202273) +++ head/include/unistd.h Thu Jan 14 05:35:32 2010 (r202274) @@ -574,7 +574,6 @@ int swapon(const char *); int swapoff(const char *); int syscall(int, ...); off_t __syscall(quad_t, ...); -int ttyslot(void); int undelete(const char *); int unwhiteout(const char *); void *valloc(size_t); /* obsoleted by malloc() */ Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Thu Jan 14 02:48:39 2010 (r202273) +++ head/lib/libc/gen/Symbol.map Thu Jan 14 05:35:32 2010 (r202274) @@ -272,7 +272,6 @@ FBSD_1.0 { openlog; closelog; setlogmask; - ttyslot; ttyname_r; ttyname; timezone; Modified: head/lib/libc/gen/ttyname.3 ============================================================================== --- head/lib/libc/gen/ttyname.3 Thu Jan 14 02:48:39 2010 (r202273) +++ head/lib/libc/gen/ttyname.3 Thu Jan 14 05:35:32 2010 (r202274) @@ -34,8 +34,7 @@ .Sh NAME .Nm ttyname , .Nm ttyname_r , -.Nm isatty , -.Nm ttyslot +.Nm isatty .Nd get name of associated terminal (tty) from file descriptor .Sh LIBRARY .Lb libc @@ -47,8 +46,6 @@ .Fn ttyname_r "int fd" "char *buf" "size_t len" .Ft int .Fn isatty "int fd" -.Ft int -.Fn ttyslot void .Sh DESCRIPTION These functions operate on the system file descriptors for terminal type devices. @@ -89,13 +86,6 @@ The .Fn ttyname_r function takes a buffer and length as arguments to avoid this problem. -.Pp -The -.Fn ttyslot -function -fetches the current process' control terminal number from the -.Xr ttys 5 -file entry. .Sh RETURN VALUES The .Fn ttyname @@ -110,12 +100,6 @@ The .Fn ttyname_r function returns 0 if successful. Otherwise an error number is returned. -.Pp -The -.Fn ttyslot -function -returns the unit number of the device file if found; otherwise -the value zero is returned. .Sh FILES .Bl -tag -width ".Pa /etc/ttys" -compact .It Pa /dev/\(** @@ -142,10 +126,9 @@ is smaller than the length of the string .Xr ttys 5 .Sh HISTORY The -.Fn isatty , -.Fn ttyname , +.Fn isatty and -.Fn ttyslot +.Fn ttyname functions appeared in .At v7 . Modified: head/lib/libc/gen/ttyslot.c ============================================================================== --- head/lib/libc/gen/ttyslot.c Thu Jan 14 02:48:39 2010 (r202273) +++ head/lib/libc/gen/ttyslot.c Thu Jan 14 05:35:32 2010 (r202274) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include int -ttyslot() +__ttyslot(void) { struct ttyent *ttyp; int slot; @@ -63,3 +63,5 @@ ttyslot() endttyent(); return(0); } + +__sym_compat(ttyslot, __ttyslot, FBSD_1.0); Modified: head/libexec/getty/ttys.5 ============================================================================== --- head/libexec/getty/ttys.5 Thu Jan 14 02:48:39 2010 (r202273) +++ head/libexec/getty/ttys.5 Thu Jan 14 05:35:32 2010 (r202274) @@ -158,7 +158,6 @@ ttyp1 none network off group=pty .Sh SEE ALSO .Xr login 1 , .Xr getttyent 3 , -.Xr ttyslot 3 , .Xr gettytab 5 , .Xr login.conf 5 , .Xr termcap 5 , From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 05:37:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A692106566B; Thu, 14 Jan 2010 05:37:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5947C8FC12; Thu, 14 Jan 2010 05:37:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0E5bhaX038521; Thu, 14 Jan 2010 05:37:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0E5bhdj038518; Thu, 14 Jan 2010 05:37:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001140537.o0E5bhdj038518@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 Jan 2010 05:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202275 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 05:37:43 -0000 Author: ed Date: Thu Jan 14 05:37:43 2010 New Revision: 202275 URL: http://svn.freebsd.org/changeset/base/202275 Log: Add two changes that should have gone into commit r202274. Phase out ttyslot(3). The ttyslot() function was originally part for SUSv1, marked LEGACY in SUSv2 and removed later on. This function only makes sense when using utmp(5), because it was used to determine the offset of the record for the controlling TTY. It makes little sense to keep it here, because the new utmpx file format doesn't index based on TTY slots. Modified: head/lib/libc/gen/Makefile.inc head/lib/libc/gen/getttyent.3 Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Thu Jan 14 05:35:32 2010 (r202274) +++ head/lib/libc/gen/Makefile.inc Thu Jan 14 05:37:43 2010 (r202275) @@ -177,7 +177,7 @@ MLINKS+=tcsetattr.3 cfgetispeed.3 tcseta tcsetattr.3 cfmakeraw.3 tcsetattr.3 cfsetispeed.3 \ tcsetattr.3 cfsetospeed.3 tcsetattr.3 cfsetspeed.3 \ tcsetattr.3 tcgetattr.3 -MLINKS+=ttyname.3 isatty.3 ttyname.3 ttyname_r.3 ttyname.3 ttyslot.3 +MLINKS+=ttyname.3 isatty.3 ttyname.3 ttyname_r.3 MLINKS+=tzset.3 tzsetwall.3 MLINKS+=unvis.3 strunvis.3 unvis.3 strunvisx.3 MLINKS+=vis.3 strvis.3 vis.3 strvisx.3 Modified: head/lib/libc/gen/getttyent.3 ============================================================================== --- head/lib/libc/gen/getttyent.3 Thu Jan 14 05:35:32 2010 (r202274) +++ head/lib/libc/gen/getttyent.3 Thu Jan 14 05:37:43 2010 (r202275) @@ -188,7 +188,6 @@ zero otherwise. .El .Sh SEE ALSO .Xr login 1 , -.Xr ttyslot 3 , .Xr gettytab 5 , .Xr termcap 5 , .Xr ttys 5 , From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 07:32:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B10C1106568B; Thu, 14 Jan 2010 07:32:24 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id E6BF68FC15; Thu, 14 Jan 2010 07:32:22 +0000 (UTC) Received: by fxm27 with SMTP id 27so525861fxm.3 for ; Wed, 13 Jan 2010 23:32:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=K6iODhB5ZuLwETp20LHwGnw35ZM9QS3R91jRnUXXmgk=; b=epsBugqNL+Sk/ijC7DGSa1gfKv0mPv/AdBkFrzd17zOtsgtisyNOp47125Niuxj0vY 4p8yLGx6/f/4X6d6c7vzacGe1rh38pU/n0drpp5gma9TIR2Bif/18pFZ68OHyPwh1TsC LeiKECV+8FqveyzoZjjhe+F8ZRBxWl+DmC1CY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=ipfNN8OV8QVuShDA+a43UeYkAPRUmKyvpeU0V50GUEn70JsAHR2sQCQIJc2S0FUB7i jJFXm7RvUI03uzfEDABfEssGKbWKs6WYsogij2vPlOYIe6EFZONkYD4q9/aKR3yQu9cg y/EVA7wx4d2cqWzOYIYe/nDi3qPHucHWFsdIw= Received: by 10.223.76.65 with SMTP id b1mr450497fak.5.1263452935066; Wed, 13 Jan 2010 23:08:55 -0800 (PST) Received: from mbp-gige.totalterror.net (93-152-151-19.ddns.onlinedirect.bg [93.152.151.19]) by mx.google.com with ESMTPS id 18sm457098fks.4.2010.01.13.23.08.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 13 Jan 2010 23:08:53 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Nikolay Denev In-Reply-To: <20100113.150435.650865766805848595.imp@bsdimp.com> Date: Thu, 14 Jan 2010 09:08:48 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201001131515.08602.jhb@freebsd.org> <4B4E2ECA.90905@FreeBSD.org> <201001131633.09669.jhb@freebsd.org> <20100113.150435.650865766805848595.imp@bsdimp.com> To: M. Warner Losh X-Mailer: Apple Mail (2.1077) Cc: dougb@freebsd.org, jhb@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org, svn-src-head@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 07:32:25 -0000 On 14 Jan, 2010, at 24:04 , M. Warner Losh wrote: > In message: <201001131633.09669.jhb@freebsd.org> > John Baldwin writes: > : On Wednesday 13 January 2010 3:36:26 pm Doug Barton wrote: > : > On 1/13/2010 12:15 PM, John Baldwin wrote: > : > > On Wednesday 13 January 2010 1:48:38 pm Doug Barton wrote: > : > >> To address the other responses, Tom, sorry, your suggested text = doesn't > : > >> address my concern. John, I don't think that users would = somehow > : > >> magically know to look in NOTES for more information about an = option > : > >> that is already in GENERIC. > : > >=20 > : > > You really think users do not already know to look in manpages = or NOTES to=20 > : > > find out more details about kernel options?=20 > : >=20 > : > That's not what I said. > :=20 > : > : I don't think that users would [..] know to look in NOTES for more = information=20 > : about an option that is [...] in GENERIC. > : > :=20 > : That seems really straight forward to me, or my English isn't good. = I do=20 > : think users "would know to look in NOTES for more information about = an option=20 > : that is in GENERIC". >=20 > Agreed. That's why I did what I did: I conformed to the usual = practice. >=20 > : > > Put=20 > : > > another way, what makes 'INCLUDE_CONFIG_FILE' sufficiently = special that it=20 > : > > deserves special treatment relative to other kernel options? > : >=20 > : > Because the default behavior (not including the actual file) for = the > : > option is contrary to user' reasonable expectation of how the = option > : > should work .... and now I'm repeating myself. > :=20 > : I think a better change would be to just change the default behavior = of=20 > : config(8) to do the reasonable thing. >=20 > -C should be the default, and we should invent a new > '--smaller-saved-config' option. >=20 > : > Seriously, don't you have anything better to do than argue against > : > including a comment in a config file? I know I do. What is the > : > overwhelming horror that will arise here if there are more = comments > : > GENERIC than you deem to be absolutely necessary? > :=20 > : What is the overwhelming horror about keeping a file readable and = allowing=20 > : users to find extended documentation for INCLUDE_CONFIG_FILE in the = same place=20 > : that they find extended documentation about every other kernel = option? >=20 > Yes. That's why I did what I did: to keep things readable. >=20 > : > And yes, I read the part of your message that I snipped about "why = do we > : > have these documents if users don't read them?" The answer is, = that's > : > why I'm suggesting a comment that tells users what man page to = read. > :=20 > : I think adding comments that merely redirect the users to further=20 > : documentation only serves to obfuscate. Left unchecked this = approach will=20 > : render files such as GENERIC with a very low signal-to-noise ratio = making it=20 > : harder to parse in a "big picture" way. >=20 > Yes. >=20 > Basically, I'm annoyed too: Our users aren't idiots, and we shouldn't > be treating them as such at every turn. If there are surprises with > how INCLUDE_CONFIG_FILE behaves, we should work to make it better, not > paper over it with a comment. >=20 > Warner Hello, I just want to add a user's point of view : To me INCLUDE_CONFIG_FILE sounds like the whole config file will be included, not just the output after preprocessing. So I was thinking about something like two different options, one "INCLUDE_CONFIG_FILE" which includes the whole file with comments, and the other to be just "INCLUDE_CONFIG". I think these would be pretty self-explanatory. Yes, it adds another kernel option, but having options to kernel options looks even more cryptic :) -- Regards, Niki= From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 08:08:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 469E8106566C; Thu, 14 Jan 2010 08:08:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 364A98FC18; Thu, 14 Jan 2010 08:08:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0E88uxx071561; Thu, 14 Jan 2010 08:08:56 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0E88uwq071559; Thu, 14 Jan 2010 08:08:56 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001140808.o0E88uwq071559@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 Jan 2010 08:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202277 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 08:08:56 -0000 Author: ed Date: Thu Jan 14 08:08:55 2010 New Revision: 202277 URL: http://svn.freebsd.org/changeset/base/202277 Log: Don't use fseeko() to obtain the file offset. I was a bit confused with lseek(), which returns the new offset. We should ftello() to obtain it using stdio. Modified: head/lib/libc/gen/pututxline.c Modified: head/lib/libc/gen/pututxline.c ============================================================================== --- head/lib/libc/gen/pututxline.c Thu Jan 14 07:13:06 2010 (r202276) +++ head/lib/libc/gen/pututxline.c Thu Jan 14 08:08:55 2010 (r202277) @@ -96,7 +96,7 @@ utx_active_add(const struct futx *fu) default: /* Allow us to overwrite unused records. */ if (partial == -1) - partial = fseeko(fp, 0, SEEK_CUR) - sizeof fe; + partial = ftello(fp) - sizeof fe; break; } } From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 09:30:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57F62106566C; Thu, 14 Jan 2010 09:30:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id D47D78FC0A; Thu, 14 Jan 2010 09:30:52 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o0E9UiIe076125 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Jan 2010 11:30:44 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0E9UiRu093535; Thu, 14 Jan 2010 11:30:44 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0E9UiwF093534; Thu, 14 Jan 2010 11:30:44 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 14 Jan 2010 11:30:44 +0200 From: Kostik Belousov To: Ed Schouten Message-ID: <20100114093044.GW62907@deviant.kiev.zoral.com.ua> References: <201001140535.o0E5ZWCx038013@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E75mJrUy8lRi9cGN" Content-Disposition: inline In-Reply-To: <201001140535.o0E5ZWCx038013@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202274 - in head: . include lib/libc/gen libexec/getty X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 09:30:53 -0000 --E75mJrUy8lRi9cGN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 14, 2010 at 05:35:32AM +0000, Ed Schouten wrote: > Author: ed > Date: Thu Jan 14 05:35:32 2010 > New Revision: 202274 > URL: http://svn.freebsd.org/changeset/base/202274 >=20 > Log: > Phase out ttyslot(3). > =20 > The ttyslot() function was originally part for SUSv1, marked LEGACY in > SUSv2 and removed later on. This function only makes sense when using > utmp(5), because it was used to determine the offset of the record for > the controlling TTY. It makes little sense to keep it here, because the > new utmpx file format doesn't index based on TTY slots. >=20 > Modified: > head/ObsoleteFiles.inc > head/include/unistd.h > head/lib/libc/gen/Symbol.map > head/lib/libc/gen/ttyname.3 > head/lib/libc/gen/ttyslot.c > head/libexec/getty/ttys.5 >=20 > Modified: head/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/ObsoleteFiles.inc Thu Jan 14 02:48:39 2010 (r202273) > +++ head/ObsoleteFiles.inc Thu Jan 14 05:35:32 2010 (r202274) > @@ -14,6 +14,8 @@ > # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS l= ast. > # > =20 > +# 20100114: removal of ttyslot(3) > +OLD_FILES+=3Dusr/share/man/man3/ttyslot.3.gz > # 20100113: remove utmp.h, replace it by utmpx.h > OLD_FILES+=3Dusr/share/man/man3/login.3.gz > OLD_FILES+=3Dusr/share/man/man3/logout.3.gz >=20 > Modified: head/include/unistd.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/include/unistd.h Thu Jan 14 02:48:39 2010 (r202273) > +++ head/include/unistd.h Thu Jan 14 05:35:32 2010 (r202274) > @@ -574,7 +574,6 @@ int swapon(const char *); > int swapoff(const char *); > int syscall(int, ...); > off_t __syscall(quad_t, ...); > -int ttyslot(void); > int undelete(const char *); > int unwhiteout(const char *); > void *valloc(size_t); /* obsoleted by malloc() */ >=20 > Modified: head/lib/libc/gen/Symbol.map > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/gen/Symbol.map Thu Jan 14 02:48:39 2010 (r202273) > +++ head/lib/libc/gen/Symbol.map Thu Jan 14 05:35:32 2010 (r202274) > @@ -272,7 +272,6 @@ FBSD_1.0 { > openlog; > closelog; > setlogmask; > - ttyslot; > ttyname_r; > ttyname; > timezone; You should never remove symbol from the version map for shared library. Doing that removes one of the reason for having symbol versioning at all (namely, pre-execution check that version requirements of the objects are satisfied). FreeBSD allows version maps to grow, that makes the check weaker then it ought to be. --E75mJrUy8lRi9cGN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktO5EQACgkQC3+MBN1Mb4hs5QCgzfDRqSb/+IWbD9dx2fsGmIuv 6SwAn2AV12ANI/URRiMhxlrE5XO1cfqh =1qS3 -----END PGP SIGNATURE----- --E75mJrUy8lRi9cGN-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 09:38:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9AFA106566B; Thu, 14 Jan 2010 09:38:03 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9C28FC13; Thu, 14 Jan 2010 09:38:03 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 854DB1CD96; Thu, 14 Jan 2010 10:38:02 +0100 (CET) Date: Thu, 14 Jan 2010 10:38:02 +0100 From: Ed Schouten To: Kostik Belousov Message-ID: <20100114093802.GZ64905@hoeg.nl> References: <201001140535.o0E5ZWCx038013@svn.freebsd.org> <20100114093044.GW62907@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d/uAuzW7m3hkRWVd" Content-Disposition: inline In-Reply-To: <20100114093044.GW62907@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202274 - in head: . include lib/libc/gen libexec/getty X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 09:38:04 -0000 --d/uAuzW7m3hkRWVd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kostik Belousov wrote: > You should never remove symbol from the version map for shared library. > Doing that removes one of the reason for having symbol versioning at all > (namely, pre-execution check that version requirements of the objects > are satisfied). FreeBSD allows version maps to grow, that makes the > check weaker then it ought to be. Ah, I see. I discussed this with kan@ the other day and I was under the impression that using __sym_compat() would be sufficient. So you say I should leave the __sym_compat(), but revert the change to the Symbol.map? Would that still allow me to use the symbol, but prevent linkage against it? --=20 Ed Schouten WWW: http://80386.nl/ --d/uAuzW7m3hkRWVd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktO5foACgkQ52SDGA2eCwXZEwCeKtHcXxfCN5hwmkBUn8K6h98A EsAAnRk/lc+0+hHZE3T6gTD6n6Ji7X0F =MjlP -----END PGP SIGNATURE----- --d/uAuzW7m3hkRWVd-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 09:38:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31C341065670; Thu, 14 Jan 2010 09:38:24 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 215AE8FC18; Thu, 14 Jan 2010 09:38:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0E9cOrM091131; Thu, 14 Jan 2010 09:38:24 GMT (envelope-from roam@svn.freebsd.org) Received: (from roam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0E9cO4e091129; Thu, 14 Jan 2010 09:38:24 GMT (envelope-from roam@svn.freebsd.org) Message-Id: <201001140938.o0E9cO4e091129@svn.freebsd.org> From: Peter Pentchev Date: Thu, 14 Jan 2010 09:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202278 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 09:38:24 -0000 Author: roam (doc,ports committer) Date: Thu Jan 14 09:38:23 2010 New Revision: 202278 URL: http://svn.freebsd.org/changeset/base/202278 Log: Document that the IEEE80211_DEBUG kernel option is needed for using the wlan(4) debugging controls with wording slightly different from that in the PR. PR: 142367 Submitted by: Matthew Thyer MFC after: 2 weeks Modified: head/share/man/man4/wlan.4 Modified: head/share/man/man4/wlan.4 ============================================================================== --- head/share/man/man4/wlan.4 Thu Jan 14 08:08:55 2010 (r202277) +++ head/share/man/man4/wlan.4 Thu Jan 14 09:38:23 2010 (r202278) @@ -130,7 +130,10 @@ Similarly there is an authenticator fram authentication services and a framework for integrating access control mechanisms specific to the 802.11 protocol. .Sh DEBUGGING -Debugging controls are available using: +If the +.Dv IEEE80211_DEBUG +option is included in the kernel configuration, +debugging controls are available using: .Pp .Dl "sysctl net.wlan.X.debug=mask" .Pp From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 09:50:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B0D31065696; Thu, 14 Jan 2010 09:50:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id DCDCE8FC0C; Thu, 14 Jan 2010 09:50:36 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o0E9oVYY078145 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Jan 2010 11:50:31 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0E9oUEt093648; Thu, 14 Jan 2010 11:50:30 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0E9oUCA093647; Thu, 14 Jan 2010 11:50:30 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 14 Jan 2010 11:50:30 +0200 From: Kostik Belousov To: Ed Schouten Message-ID: <20100114095030.GX62907@deviant.kiev.zoral.com.ua> References: <201001140535.o0E5ZWCx038013@svn.freebsd.org> <20100114093044.GW62907@deviant.kiev.zoral.com.ua> <20100114093802.GZ64905@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wfgmFf0LjPE7xkRl" Content-Disposition: inline In-Reply-To: <20100114093802.GZ64905@hoeg.nl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202274 - in head: . include lib/libc/gen libexec/getty X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 09:50:37 -0000 --wfgmFf0LjPE7xkRl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 14, 2010 at 10:38:02AM +0100, Ed Schouten wrote: > * Kostik Belousov wrote: > > You should never remove symbol from the version map for shared library. > > Doing that removes one of the reason for having symbol versioning at all > > (namely, pre-execution check that version requirements of the objects > > are satisfied). FreeBSD allows version maps to grow, that makes the > > check weaker then it ought to be. >=20 > Ah, I see. I discussed this with kan@ the other day and I was under the > impression that using __sym_compat() would be sufficient. So you say I > should leave the __sym_compat(), but revert the change to the > Symbol.map? Would that still allow me to use the symbol, but prevent > linkage against it? It should. You can recheck it with readelf/objdump. Symbol shall be exported only with FBSD_1.0 version, and have no default version. --wfgmFf0LjPE7xkRl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktO6OYACgkQC3+MBN1Mb4gvlQCgmPYomvYEN60bDJgRP8kbzD1S LUsAoNbdH0tYdqEjx/vZOBqp2iQeSo3a =ExXY -----END PGP SIGNATURE----- --wfgmFf0LjPE7xkRl-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 09:54:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7A021065670; Thu, 14 Jan 2010 09:54:44 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id ACDF58FC08; Thu, 14 Jan 2010 09:54:44 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 1FC881CCD8; Thu, 14 Jan 2010 10:54:44 +0100 (CET) Date: Thu, 14 Jan 2010 10:54:44 +0100 From: Ed Schouten To: Kostik Belousov Message-ID: <20100114095444.GA64905@hoeg.nl> References: <201001140535.o0E5ZWCx038013@svn.freebsd.org> <20100114093044.GW62907@deviant.kiev.zoral.com.ua> <20100114093802.GZ64905@hoeg.nl> <20100114095030.GX62907@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jBzvIQRTJnWuYzSb" Content-Disposition: inline In-Reply-To: <20100114095030.GX62907@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202274 - in head: . include lib/libc/gen libexec/getty X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 09:54:45 -0000 --jBzvIQRTJnWuYzSb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Kostik, * Kostik Belousov wrote: > It should. You can recheck it with readelf/objdump. Symbol shall be expor= ted > only with FBSD_1.0 version, and have no default version. I see. I will give it a try and commit a fix this afternoon. Thanks for the clarification! --=20 Ed Schouten WWW: http://80386.nl/ --jBzvIQRTJnWuYzSb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktO6eQACgkQ52SDGA2eCwWlggCfYEnOwVgJm8ew2Z7MnGotOyuS bNAAn2I95+P/PhBH3QfqbJK+BfXmFwJS =Drov -----END PGP SIGNATURE----- --jBzvIQRTJnWuYzSb-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 10:00:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AEF4106566C; Thu, 14 Jan 2010 10:00:01 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 569258FC13; Thu, 14 Jan 2010 10:00:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EA01ST095912; Thu, 14 Jan 2010 10:00:01 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EA0182095910; Thu, 14 Jan 2010 10:00:01 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001141000.o0EA0182095910@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 Jan 2010 10:00:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202279 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 10:00:01 -0000 Author: ed Date: Thu Jan 14 10:00:01 2010 New Revision: 202279 URL: http://svn.freebsd.org/changeset/base/202279 Log: Revert the change to Symbol.map, made in r202274. Even though we use __sym_compat(), we should list the symbol in Symbol.map. ttyslot() is now listed as follows, which seems to do the right thing: | Symbol table '.dynsym' contains 2755 entries: | Num: Value Size Type Bind Vis Ndx Name | 613: 00000000000477b0 121 FUNC GLOBAL DEFAULT 10 ttyslot@FBSD_1.0 Reported by: kib Modified: head/lib/libc/gen/Symbol.map Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Thu Jan 14 09:38:23 2010 (r202278) +++ head/lib/libc/gen/Symbol.map Thu Jan 14 10:00:01 2010 (r202279) @@ -272,6 +272,7 @@ FBSD_1.0 { openlog; closelog; setlogmask; + ttyslot; ttyname_r; ttyname; timezone; From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 10:40:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 622DB106568F; Thu, 14 Jan 2010 10:40:55 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37FFA8FC1C; Thu, 14 Jan 2010 10:40:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EAetFD007149; Thu, 14 Jan 2010 10:40:55 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EAetxU007146; Thu, 14 Jan 2010 10:40:55 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001141040.o0EAetxU007146@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 14 Jan 2010 10:40:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202280 - head/usr.bin/whois X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 10:40:55 -0000 Author: edwin Date: Thu Jan 14 10:40:54 2010 New Revision: 202280 URL: http://svn.freebsd.org/changeset/base/202280 Log: Remove -d option, whois.nic.mil doesn't exist anymore. PR: bin/142507 Submitted by: Dan Mahoney MFC after: 1 week Modified: head/usr.bin/whois/whois.1 head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.1 ============================================================================== --- head/usr.bin/whois/whois.1 Thu Jan 14 10:00:01 2010 (r202279) +++ head/usr.bin/whois/whois.1 Thu Jan 14 10:40:54 2010 (r202280) @@ -40,7 +40,7 @@ .Nd "Internet domain name and network number directory service" .Sh SYNOPSIS .Nm -.Op Fl aAbdfgiIklmQrR +.Op Fl aAbfgiIklmQrR .Op Fl c Ar country-code | Fl h Ar host .Op Fl p Ar port .Ar name ... @@ -82,11 +82,6 @@ This is the equivalent of using the .Fl h option with an argument of .Qq Ar country-code Ns Li .whois-servers.net . -.It Fl d -Use the US Department of Defense -database. -It contains points of contact for subdomains of -.Pa .MIL . .It Fl f Use the African Network Information Centre .Pq Tn AfriNIC Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu Jan 14 10:00:01 2010 (r202279) +++ head/usr.bin/whois/whois.c Thu Jan 14 10:40:54 2010 (r202280) @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #define ABUSEHOST "whois.abuse.net" #define NICHOST "whois.crsnic.net" #define INICHOST "whois.networksolutions.com" -#define DNICHOST "whois.nic.mil" #define GNICHOST "whois.nic.gov" #define ANICHOST "whois.arin.net" #define LNICHOST "whois.lacnic.net" @@ -109,7 +108,7 @@ main(int argc, char *argv[]) country = host = qnichost = NULL; flags = use_qnichost = 0; - while ((ch = getopt(argc, argv, "aAbc:dfgh:iIklmp:QrR6")) != -1) { + while ((ch = getopt(argc, argv, "aAbc:fgh:iIklmp:QrR6")) != -1) { switch (ch) { case 'a': host = ANICHOST; @@ -123,9 +122,6 @@ main(int argc, char *argv[]) case 'c': country = optarg; break; - case 'd': - host = DNICHOST; - break; case 'f': host = FNICHOST; break; @@ -364,7 +360,7 @@ static void usage(void) { fprintf(stderr, - "usage: whois [-aAbdfgiIklmQrR6] [-c country-code | -h hostname] " + "usage: whois [-aAbfgiIklmQrR6] [-c country-code | -h hostname] " "[-p port] name ...\n"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 10:56:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2501106566C; Thu, 14 Jan 2010 10:56:54 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C17A48FC13; Thu, 14 Jan 2010 10:56:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EAus1J010814; Thu, 14 Jan 2010 10:56:54 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EAusZL010812; Thu, 14 Jan 2010 10:56:54 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001141056.o0EAusZL010812@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 14 Jan 2010 10:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202281 - head/usr.bin/whois X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 10:56:54 -0000 Author: edwin Date: Thu Jan 14 10:56:54 2010 New Revision: 202281 URL: http://svn.freebsd.org/changeset/base/202281 Log: Make whois capable of searching for IPv6 addresses just like it can do for IPv4 addresses without having to explicetly specify that the ARIN server should be used to get the initial information PR: bin/128725 Submitted by: "Matt D. Harris" MFC after: 1 week Modified: head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu Jan 14 10:40:54 2010 (r202280) +++ head/usr.bin/whois/whois.c Thu Jan 14 10:56:54 2010 (r202281) @@ -215,6 +215,10 @@ choose_server(char *domain) { char *pos, *retval; + if (strchr(domain, ':')) { + s_asprintf(&retval, "%s", ANICHOST); + return (retval); + } for (pos = strchr(domain, '\0'); pos > domain && *--pos == '.';) *pos = '\0'; if (*domain == '\0') From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 11:03:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F3801065695; Thu, 14 Jan 2010 11:03:26 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EF668FC27; Thu, 14 Jan 2010 11:03:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EB3QWG012344; Thu, 14 Jan 2010 11:03:26 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EB3QYS012342; Thu, 14 Jan 2010 11:03:26 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001141103.o0EB3QYS012342@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 Jan 2010 11:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202282 - head/usr.bin/chpass X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 11:03:26 -0000 Author: ed Date: Thu Jan 14 11:03:26 2010 New Revision: 202282 URL: http://svn.freebsd.org/changeset/base/202282 Log: The group field is called `gid', not `group'. Modified: head/usr.bin/chpass/chpass.1 Modified: head/usr.bin/chpass/chpass.1 ============================================================================== --- head/usr.bin/chpass/chpass.1 Thu Jan 14 10:56:54 2010 (r202281) +++ head/usr.bin/chpass/chpass.1 Thu Jan 14 11:03:26 2010 (r202282) @@ -168,7 +168,7 @@ that manipulate these files will often r entries, and that one by random selection. .Pp The -.Ar group +.Ar gid field is the group that the user will be placed in at login. Since .Bx From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 11:07:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A54E106566B; Thu, 14 Jan 2010 11:07:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 7B04A8FC12; Thu, 14 Jan 2010 11:07:17 +0000 (UTC) Received: from c122-106-161-214.carlnfd1.nsw.optusnet.com.au (c122-106-161-214.carlnfd1.nsw.optusnet.com.au [122.106.161.214]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0EB7BmW021064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Jan 2010 22:07:14 +1100 Date: Thu, 14 Jan 2010 22:07:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Andrey Chernov In-Reply-To: <20100111121938.GA57442@nagual.pp.ru> Message-ID: <20100114212822.R62635@delplex.bde.org> References: <201001101430.o0AEUURS051917@svn.freebsd.org> <20100110212548.GA47331@nagual.pp.ru> <4B4A5252.9070205@freebsd.org> <20100111134429.F1302@besplex.bde.org> <20100111121938.GA57442@nagual.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival , Bruce Evans Subject: Re: svn commit: r201999 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 11:07:19 -0000 On Mon, 11 Jan 2010, Andrey Chernov wrote: > On Mon, Jan 11, 2010 at 02:29:03PM +1100, Bruce Evans wrote: >>>> 3) errno should be EOVERFLOW, see other owerflow checks in the stdio. >> >> There are none. I (we?) intentionally didn't set errno when the correct > > F.e. see fseek()/fseeko() stdio checks, as POSIX says: > > [EOVERFLOW] For fseek(), the resulting file offset would be a value which > cannot be represented correctly in an object of type long. > [EOVERFLOW] For fseeko(), the resulting file offset would be a value > which cannot be represented correctly in an object of type off_t. I meant only the i/o functions. Also, vswprintf() returns -1/EOVERFLOW if the buffer is too small, but I don't count it since: - this behaviour is not possible in C99 (no EOVERFLOW, only a negative return value) - this behaviour is not documented in FreeBSD's man page - only th wide char [v]sprintf does this. > Moreover, POSIX tends to introduce EOVERFLOW now in many places like > old system calls too, see read()/pread(): > > [EOVERFLOW] The file is a regular file, nbyte is greater than 0, the > starting position is before the end-of-file, and the starting position is > greater than or equal to the offset maximum established in the open file > description associated with fildes. > > (IEEE P1003.1 Draft 5.1 Issue 7 quoted in both cases) I know, since you fixed this in part of FreeBSD, and I cleaned up the fixes :-). This reminds me that the fixes are incomplete, with most file systems except ffs being unmaintained even if they were cloned from ffs. In /sys/fs only the following file systems reference EOVERFLOW: smbfs (!?), nfs. Many file systems there have a maxfilesize (variable) limit and many others have a compile-time limit. Similarly for /sys/gnu/fs except things are harder to find there. Just noticed a related delicate bug: For write(), the corresponding (and much older) error is EFBIG. POSIX says that it occurs when there is no space to write any bytes, but ffs_write() gives it when there is no space to write all the bytes. Since most programs don't understand short writes, the FreeBSD behaviour is safer. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 11:47:34 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98329106566C; Thu, 14 Jan 2010 11:47:34 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 0D0788FC0C; Thu, 14 Jan 2010 11:47:33 +0000 (UTC) Received: from c122-106-161-214.carlnfd1.nsw.optusnet.com.au (c122-106-161-214.carlnfd1.nsw.optusnet.com.au [122.106.161.214]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0EBlP0U001407 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Jan 2010 22:47:27 +1100 Date: Thu, 14 Jan 2010 22:47:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Nikolay Denev In-Reply-To: Message-ID: <20100114222154.M62659@delplex.bde.org> References: <201001131515.08602.jhb@freebsd.org> <4B4E2ECA.90905@FreeBSD.org> <201001131633.09669.jhb@freebsd.org> <20100113.150435.650865766805848595.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: dougb@FreeBSD.org, jhb@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, freebsd-arch@FreeBSD.org, svn-src-head@FreeBSD.org, "M. Warner Losh" Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 11:47:34 -0000 On Thu, 14 Jan 2010, Nikolay Denev wrote: > I just want to add a user's point of view : > To me INCLUDE_CONFIG_FILE sounds like the > whole config file will be included, > not just the output after preprocessing. It used to mean to actually include the config file. This became a broken meaning when the include directive was added in 2001, if this directory wass actually used, so that a typical config file looked like: include MOST options extra nooptions noextra This was fixed in 2007, but at the same time, for some reason stripping the comments became the default. Of course GENERIC shouldn't have verbose comments (except meta ones). Please remove any others :-). There are only 2 really annoying ones in the i386 GENERIC: - one for puc - a set of 3 separate 1-line extra ones for bpf, the first line of which essentially just repeats the expansion of the acronym `bpf' but does it with different capitalization. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 12:50:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B30781065693; Thu, 14 Jan 2010 12:50:59 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.221.174]) by mx1.freebsd.org (Postfix) with ESMTP id 2CAB98FC19; Thu, 14 Jan 2010 12:50:58 +0000 (UTC) Received: by qyk4 with SMTP id 4so11543174qyk.7 for ; Thu, 14 Jan 2010 04:50:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=3DhMqguGr+Sk70Ryx4dNIRL0ihQAvFTAIs+S5TsAyew=; b=BGX60GPx4tw+50/S75QWekvAJRgULCJ0lXsFOiYcbhBpUCEuJXSwQp6dgos2qpst1m QaHHSkSiqC3fFsEz2PTl/KHkgjrASeORt+vUa58Tk6g4tz1v9s/HRTKrVHPYSVIKVLtU Xa6D+Jj1sI0ZD9IX0yq1ajQyuPIAtT9xslRfg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=f5fflfvrvJmJ/1ByyUH1y+FOhNZg66MuxSeiTvYjOjGOVQtr2+u1BMczJq/Xv22/c+ ui5mVaOfxW+MRPzsL7u25uYZpu9EJmwr+voYmRWwrWth1SxKN6VQak20LlnfFPXUIxX+ TBEZ/Wv7dge2tSFcX7lXtS//Jvg2C8fds3+Eo= Received: by 10.224.69.164 with SMTP id z36mr494824qai.377.1263473453707; Thu, 14 Jan 2010 04:50:53 -0800 (PST) Received: from kan.dnsalias.net (c-24-91-218-112.hsd1.ma.comcast.net [24.91.218.112]) by mx.google.com with ESMTPS id 8sm1733472qwj.43.2010.01.14.04.50.51 (version=SSLv3 cipher=RC4-MD5); Thu, 14 Jan 2010 04:50:52 -0800 (PST) Date: Thu, 14 Jan 2010 07:50:46 -0500 From: Alexander Kabaev To: Ed Schouten Message-ID: <20100114075046.6a2ebb71@kan.dnsalias.net> In-Reply-To: <201001141000.o0EA0182095910@svn.freebsd.org> References: <201001141000.o0EA0182095910@svn.freebsd.org> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/yIKllgEyDeoejAqG6=xLErk"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202279 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 12:50:59 -0000 --Sig_/yIKllgEyDeoejAqG6=xLErk Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 14 Jan 2010 10:00:01 +0000 (UTC) Ed Schouten wrote: > Author: ed > Date: Thu Jan 14 10:00:01 2010 > New Revision: 202279 > URL: http://svn.freebsd.org/changeset/base/202279 >=20 > Log: > Revert the change to Symbol.map, made in r202274. > =20 > Even though we use __sym_compat(), we should list the symbol in > Symbol.map. > =20 > ttyslot() is now listed as follows, which seems to do the right > thing:=20 > | Symbol table '.dynsym' contains 2755 entries: > | Num: Value Size Type Bind Vis Ndx Name > | 613: 00000000000477b0 121 FUNC GLOBAL DEFAULT 10 > ttyslot@FBSD_1.0=20 > Reported by: kib >=20 > Modified: > head/lib/libc/gen/Symbol.map >=20 > Modified: head/lib/libc/gen/Symbol.map > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/gen/Symbol.map Thu Jan 14 09:38:23 > 2010 (r202278) +++ head/lib/libc/gen/Symbol.map Thu Jan > 14 10:00:01 2010 (r202279) @@ -272,6 +272,7 @@ FBSD_1.0 { > openlog; > closelog; > setlogmask; > + ttyslot; > ttyname_r; > ttyname; > timezone; Unnecessary, despite of what kib says. It was exported with proper version by __sym_compat already. This line in Symbol map is a NOP because there's no unadorned global 'ttyslot' symbol in the library for it to apply. Please back it out.=20 --=20 Alexander Kabaev --Sig_/yIKllgEyDeoejAqG6=xLErk Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iD8DBQFLTxMqQ6z1jMm+XZYRAspwAJsFVmiHBfeVhwKfDEkHHzxkqKBPigCghqJ1 cHdAktiy1OSpIB4fMHi6XEM= =mAXj -----END PGP SIGNATURE----- --Sig_/yIKllgEyDeoejAqG6=xLErk-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 14:30:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77312106566C; Thu, 14 Jan 2010 14:30:54 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 639678FC15; Thu, 14 Jan 2010 14:30:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EEUsqY057935; Thu, 14 Jan 2010 14:30:54 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EEUssv057931; Thu, 14 Jan 2010 14:30:54 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201001141430.o0EEUssv057931@svn.freebsd.org> From: Ulf Lilleengen Date: Thu, 14 Jan 2010 14:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202283 - in head/sys: conf fs/ext2fs gnu/fs/ext2fs gnu/fs/reiserfs modules/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 14:30:54 -0000 Author: lulf Date: Thu Jan 14 14:30:54 2010 New Revision: 202283 URL: http://svn.freebsd.org/changeset/base/202283 Log: Bring in the ext2fs work done by Aditya Sarawgi during and after Google Summer of Code 2009: - BSDL block and inode allocation policies for ext2fs. This involves the use FFS1 style block and inode allocation for ext2fs. Preallocation was removed since it was GPL'd. - Make ext2fs MPSAFE by introducing locks to per-mount datastructures. - Fixes for kern/122047 PR. - Various small bugfixes. - Move out of gnu/ directory. Sponsored by: Google Inc. Submitted by: Aditya Sarawgi Added: head/sys/fs/ext2fs/ - copied from r201427, head/sys/gnu/fs/ext2fs/ head/sys/fs/ext2fs/ext2_dinode.h (contents, props changed) head/sys/fs/ext2fs/ext2_dir.h (contents, props changed) head/sys/fs/ext2fs/ext2fs.h (contents, props changed) Deleted: head/sys/fs/ext2fs/COPYRIGHT.INFO head/sys/fs/ext2fs/ext2_bitops.h head/sys/fs/ext2fs/ext2_fs.h head/sys/fs/ext2fs/ext2_fs_sb.h head/sys/fs/ext2fs/ext2_linux_balloc.c head/sys/fs/ext2fs/ext2_linux_ialloc.c head/sys/fs/ext2fs/i386-bitops.h head/sys/gnu/fs/ext2fs/ Modified: head/sys/conf/files head/sys/fs/ext2fs/ext2_alloc.c head/sys/fs/ext2fs/ext2_balloc.c head/sys/fs/ext2fs/ext2_bmap.c head/sys/fs/ext2fs/ext2_extern.h head/sys/fs/ext2fs/ext2_inode.c head/sys/fs/ext2fs/ext2_inode_cnv.c head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_mount.h head/sys/fs/ext2fs/ext2_readwrite.c head/sys/fs/ext2fs/ext2_subr.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/ext2fs/fs.h head/sys/fs/ext2fs/inode.h head/sys/gnu/fs/reiserfs/reiserfs_fs.h head/sys/modules/ext2fs/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 14 11:03:26 2010 (r202282) +++ head/sys/conf/files Thu Jan 14 14:30:54 2010 (r202283) @@ -1956,18 +1956,15 @@ geom/virstor/binstream.c optional geom_v geom/virstor/g_virstor.c optional geom_virstor geom/virstor/g_virstor_md.c optional geom_virstor geom/zero/g_zero.c optional geom_zero -gnu/fs/ext2fs/ext2_alloc.c optional ext2fs \ - warning "kernel contains GPL contaminated ext2fs filesystem" -gnu/fs/ext2fs/ext2_balloc.c optional ext2fs -gnu/fs/ext2fs/ext2_bmap.c optional ext2fs -gnu/fs/ext2fs/ext2_inode.c optional ext2fs -gnu/fs/ext2fs/ext2_inode_cnv.c optional ext2fs -gnu/fs/ext2fs/ext2_linux_balloc.c optional ext2fs -gnu/fs/ext2fs/ext2_linux_ialloc.c optional ext2fs -gnu/fs/ext2fs/ext2_lookup.c optional ext2fs -gnu/fs/ext2fs/ext2_subr.c optional ext2fs -gnu/fs/ext2fs/ext2_vfsops.c optional ext2fs -gnu/fs/ext2fs/ext2_vnops.c optional ext2fs +fs/ext2fs/ext2_alloc.c optional ext2fs +fs/ext2fs/ext2_balloc.c optional ext2fs +fs/ext2fs/ext2_bmap.c optional ext2fs +fs/ext2fs/ext2_inode.c optional ext2fs +fs/ext2fs/ext2_inode_cnv.c optional ext2fs +fs/ext2fs/ext2_lookup.c optional ext2fs +fs/ext2fs/ext2_subr.c optional ext2fs +fs/ext2fs/ext2_vfsops.c optional ext2fs +fs/ext2fs/ext2_vnops.c optional ext2fs gnu/fs/reiserfs/reiserfs_hashes.c optional reiserfs \ warning "kernel contains GPL contaminated ReiserFS filesystem" gnu/fs/reiserfs/reiserfs_inode.c optional reiserfs Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/gnu/fs/ext2fs/ext2_alloc.c Sun Jan 3 12:17:51 2010 (r201427) +++ head/sys/fs/ext2fs/ext2_alloc.c Thu Jan 14 14:30:54 2010 (r202283) @@ -43,52 +43,54 @@ #include #include #include +#include -#include -#include -#include -#include -#include -#include - -static void ext2_fserr(struct ext2_sb_info *, u_int, char *); - -/* - * Linux calls this functions at the following locations: - * (1) the inode is freed - * (2) a preallocation miss occurs - * (3) truncate is called - * (4) release_file is called and f_mode & 2 - * - * I call it in ext2_inactive, ext2_truncate, ext2_vfree and in (2) - * the call in vfree might be redundant - */ -void -ext2_discard_prealloc(ip) - struct inode * ip; -{ -#ifdef EXT2_PREALLOCATE - if (ip->i_prealloc_count) { - int i = ip->i_prealloc_count; - ip->i_prealloc_count = 0; - ext2_free_blocks (ITOV(ip)->v_mount, - ip->i_prealloc_block, - i); - } -#endif -} - +#include +#include +#include +#include +#include + +static daddr_t ext2_alloccg(struct inode *, int, daddr_t, int); +static u_long ext2_dirpref(struct inode *); +static void ext2_fserr(struct m_ext2fs *, uid_t, char *); +static u_long ext2_hashalloc(struct inode *, int, long, int, + daddr_t (*)(struct inode *, int, daddr_t, + int)); +static daddr_t ext2_nodealloccg(struct inode *, int, daddr_t, int); +static daddr_t ext2_mapsearch(struct m_ext2fs *, char *, daddr_t); /* * Allocate a block in the file system. - * - * this takes the framework from ffs_alloc. To implement the - * actual allocation, it calls ext2_new_block, the ported version - * of the same Linux routine. * - * we note that this is always called in connection with ext2_blkpref + * A preference may be optionally specified. If a preference is given + * the following hierarchy is used to allocate a block: + * 1) allocate the requested block. + * 2) allocate a rotationally optimal block in the same cylinder. + * 3) allocate a block in the same cylinder group. + * 4) quadradically rehash into other cylinder groups, until an + * available block is located. + * If no block preference is given the following hierarchy is used + * to allocate a block: + * 1) allocate a block in the cylinder group that contains the + * inode for the file. + * 2) quadradically rehash into other cylinder groups, until an + * available block is located. * - * preallocation is done as Linux does it + * A preference may be optionally specified. If a preference is given + * the following hierarchy is used to allocate a block: + * 1) allocate the requested block. + * 2) allocate a rotationally optimal block in the same cylinder. + * 3) allocate a block in the same cylinder group. + * 4) quadradically rehash into other cylinder groups, until an + * available block is located. + * If no block preference is given the following hierarchy is used + * to allocate a block: + * 1) allocate a block in the cylinder group that contains the + * inode for the file. + * 2) quadradically rehash into other cylinder groups, until an + * available block is located. */ + int ext2_alloc(ip, lbn, bpref, size, cred, bnp) struct inode *ip; @@ -97,75 +99,46 @@ ext2_alloc(ip, lbn, bpref, size, cred, b struct ucred *cred; int32_t *bnp; { - struct ext2_sb_info *fs; + struct m_ext2fs *fs; + struct ext2mount *ump; int32_t bno; - + int cg; *bnp = 0; fs = ip->i_e2fs; + ump = ip->i_ump; + mtx_assert(EXT2_MTX(ump), MA_OWNED); #ifdef DIAGNOSTIC - if ((u_int)size > fs->s_blocksize || blkoff(fs, size) != 0) { + if ((u_int)size > fs->e2fs_bsize || blkoff(fs, size) != 0) { vn_printf(ip->i_devvp, "bsize = %lu, size = %d, fs = %s\n", - fs->s_blocksize, size, fs->fs_fsmnt); + (long unsigned int)fs->e2fs_bsize, size, fs->e2fs_fsmnt); panic("ext2_alloc: bad size"); } if (cred == NOCRED) panic("ext2_alloc: missing credential"); #endif /* DIAGNOSTIC */ - if (size == fs->s_blocksize && fs->s_es->s_free_blocks_count == 0) + if (size == fs->e2fs_bsize && fs->e2fs->e2fs_fbcount == 0) goto nospace; if (cred->cr_uid != 0 && - fs->s_es->s_free_blocks_count < fs->s_es->s_r_blocks_count) + fs->e2fs->e2fs_fbcount < fs->e2fs->e2fs_rbcount) goto nospace; - if (bpref >= fs->s_es->s_blocks_count) + if (bpref >= fs->e2fs->e2fs_bcount) bpref = 0; - /* call the Linux code */ -#ifdef EXT2_PREALLOCATE - /* To have a preallocation hit, we must - * - have at least one block preallocated - * - and our preferred block must have that block number or one below - */ - if (ip->i_prealloc_count && - (bpref == ip->i_prealloc_block || - bpref + 1 == ip->i_prealloc_block)) - { - bno = ip->i_prealloc_block++; - ip->i_prealloc_count--; - /* ext2_debug ("preallocation hit (%lu/%lu).\n", - ++alloc_hits, ++alloc_attempts); */ - - /* Linux gets, clears, and releases the buffer at this - point - we don't have to that; we leave it to the caller - */ - } else { - ext2_discard_prealloc (ip); - /* ext2_debug ("preallocation miss (%lu/%lu).\n", - alloc_hits, ++alloc_attempts); */ - if (S_ISREG(ip->i_mode)) - bno = ext2_new_block - (ITOV(ip)->v_mount, bpref, - &ip->i_prealloc_count, - &ip->i_prealloc_block); - else - bno = (int32_t)ext2_new_block(ITOV(ip)->v_mount, - bpref, 0, 0); + if (bpref == 0) + cg = ino_to_cg(fs, ip->i_number); + else + cg = dtog(fs, bpref); + bno = (daddr_t)ext2_hashalloc(ip, cg, bpref, fs->e2fs_bsize, + ext2_alloccg); + if (bno > 0) { + ip->i_blocks += btodb(fs->e2fs_bsize); + ip->i_flag |= IN_CHANGE | IN_UPDATE; + *bnp = bno; + return (0); } -#else - bno = (int32_t)ext2_new_block(ITOV(ip)->v_mount, bpref, 0, 0); -#endif - - if (bno > 0) { - /* set next_alloc fields as done in block_getblk */ - ip->i_next_alloc_block = lbn; - ip->i_next_alloc_goal = bno; - - ip->i_blocks += btodb(size); - ip->i_flag |= IN_CHANGE | IN_UPDATE; - *bnp = bno; - return (0); - } nospace: + EXT2_UNLOCK(ump); ext2_fserr(fs, cred->cr_uid, "file system full"); - uprintf("\n%s: write failed, file system is full\n", fs->fs_fsmnt); + uprintf("\n%s: write failed, file system is full\n", fs->e2fs_fsmnt); return (ENOSPC); } @@ -187,6 +160,8 @@ nospace: #ifdef FANCY_REALLOC #include static int doasyncfree = 1; +static int doreallocblks = 1; + #ifdef OPT_DEBUG SYSCTL_INT(_debug, 14, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, ""); #endif /* OPT_DEBUG */ @@ -204,19 +179,21 @@ ext2_reallocblks(ap) return ENOSPC; #else - struct ext2_sb_info *fs; + struct m_ext2fs *fs; struct inode *ip; struct vnode *vp; struct buf *sbp, *ebp; - int32_t *bap, *sbap, *ebap; + int32_t *bap, *sbap, *ebap = 0; + struct ext2mount *ump; struct cluster_save *buflist; - int32_t start_lbn, end_lbn, soff, eoff, newblk, blkno; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; + int32_t start_lbn, end_lbn, soff, newblk, blkno =0; int i, len, start_lvl, end_lvl, pref, ssize; vp = ap->a_vp; ip = VTOI(vp); fs = ip->i_e2fs; + ump = ip->i_ump; #ifdef UNKLAR if (fs->fs_contigsumsize <= 0) return (ENOSPC); @@ -238,8 +215,8 @@ return ENOSPC; if (dtog(fs, dbtofsb(fs, buflist->bs_children[0]->b_blkno)) != dtog(fs, dbtofsb(fs, buflist->bs_children[len - 1]->b_blkno))) return (ENOSPC); - if (ufs_getlbns(vp, start_lbn, start_ap, &start_lvl) || - ufs_getlbns(vp, end_lbn, end_ap, &end_lvl)) + if (ext2_getlbns(vp, start_lbn, start_ap, &start_lvl) || + ext2_getlbns(vp, end_lbn, end_ap, &end_lvl)) return (ENOSPC); /* * Get the starting offset and block map for the first block. @@ -249,7 +226,7 @@ return ENOSPC; soff = start_lbn; } else { idp = &start_ap[start_lvl - 1]; - if (bread(vp, idp->in_lbn, (int)fs->s_blocksize, NOCRED, &sbp)) { + if (bread(vp, idp->in_lbn, (int)fs->e2fs_bsize, NOCRED, &sbp)) { brelse(sbp); return (ENOSPC); } @@ -259,7 +236,8 @@ return ENOSPC; /* * Find the preferred location for the cluster. */ - pref = ext2_blkpref(ip, start_lbn, soff, sbap); + EXT2_LOCK(ump); + pref = ext2_blkpref(ip, start_lbn, soff, sbap, blkno); /* * If the block range spans two block maps, get the second map. */ @@ -271,16 +249,20 @@ return ENOSPC; panic("ext2_reallocblk: start == end"); #endif ssize = len - (idp->in_off + 1); - if (bread(vp, idp->in_lbn, (int)fs->s_blocksize, NOCRED, &ebp)) + if (bread(vp, idp->in_lbn, (int)fs->e2fs_bsize, NOCRED, &ebp)){ + EXT2_UNLOCK(ump); goto fail; + } ebap = (int32_t *)ebp->b_data; } /* * Search the block map looking for an allocation of the desired size. */ - if ((newblk = (int32_t)ext2_hashalloc(ip, dtog(fs, pref), (long)pref, - len, (u_long (*)())ext2_clusteralloc)) == 0) + if ((newblk = (int32_t)ext2_hashalloc(ip, dtog(fs, pref), pref, + len, ext2_clusteralloc)) == 0){ + EXT2_UNLOCK(ump); goto fail; + } /* * We have found a new contiguous block. * @@ -289,9 +271,10 @@ return ENOSPC; * with the file. */ blkno = newblk; - for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->s_frags_per_block) { + for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->e2fs_fpb) { if (i == ssize) bap = ebap; + soff = -i; #ifdef DIAGNOSTIC if (buflist->bs_children[i]->b_blkno != fsbtodb(fs, *bap)) panic("ext2_reallocblks: alloc mismatch"); @@ -322,17 +305,18 @@ return ENOSPC; if (!doasyncfree) ext2_update(vp, 1); } - if (ssize < len) + if (ssize < len) { if (doasyncfree) bdwrite(ebp); else bwrite(ebp); + } /* * Last, free the old blocks and assign the new blocks to the buffers. */ - for (blkno = newblk, i = 0; i < len; i++, blkno += fs->s_frags_per_block) { + for (blkno = newblk, i = 0; i < len; i++, blkno += fs->e2fs_fpb) { ext2_blkfree(ip, dbtofsb(fs, buflist->bs_children[i]->b_blkno), - fs->s_blocksize); + fs->e2fs_bsize); buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno); } return (0); @@ -350,8 +334,6 @@ fail: /* * Allocate an inode in the file system. * - * we leave the actual allocation strategy to the (modified) - * ext2_new_inode(), to make sure we get the policies right */ int ext2_valloc(pvp, mode, cred, vpp) @@ -361,21 +343,38 @@ ext2_valloc(pvp, mode, cred, vpp) struct vnode **vpp; { struct inode *pip; - struct ext2_sb_info *fs; + struct m_ext2fs *fs; struct inode *ip; - ino_t ino; - int i, error; + struct ext2mount *ump; + ino_t ino, ipref; + int i, error, cg; *vpp = NULL; pip = VTOI(pvp); fs = pip->i_e2fs; - if (fs->s_es->s_free_inodes_count == 0) - goto noinodes; + ump = pip->i_ump; - /* call the Linux routine - it returns the inode number only */ - ino = ext2_new_inode(pip, mode); + EXT2_LOCK(ump); + if (fs->e2fs->e2fs_ficount == 0) + goto noinodes; + /* + * If it is a directory then obtain a cylinder group based on + * ext2_dirpref else obtain it using ino_to_cg. The preferred inode is + * always the next inode. + */ + if((mode & IFMT) == IFDIR) { + cg = ext2_dirpref(pip); + if (fs->e2fs_contigdirs[cg] < 255) + fs->e2fs_contigdirs[cg]++; + } else { + cg = ino_to_cg(fs, pip->i_number); + if (fs->e2fs_contigdirs[cg] > 0) + fs->e2fs_contigdirs[cg]--; + } + ipref = cg * fs->e2fs->e2fs_ipg + 1; + ino = (ino_t)ext2_hashalloc(pip, cg, (long)ipref, mode, ext2_nodealloccg); - if (ino == 0) + if (ino == 0) goto noinodes; error = VFS_VGET(pvp->v_mount, ino, LK_EXCLUSIVE, vpp); if (error) { @@ -410,12 +409,126 @@ printf("ext2_valloc: allocated inode %d\ */ return (0); noinodes: + EXT2_UNLOCK(ump); ext2_fserr(fs, cred->cr_uid, "out of inodes"); - uprintf("\n%s: create/symlink failed, no inodes free\n", fs->fs_fsmnt); + uprintf("\n%s: create/symlink failed, no inodes free\n", fs->e2fs_fsmnt); return (ENOSPC); } /* + * Find a cylinder to place a directory. + * + * The policy implemented by this algorithm is to allocate a + * directory inode in the same cylinder group as its parent + * directory, but also to reserve space for its files inodes + * and data. Restrict the number of directories which may be + * allocated one after another in the same cylinder group + * without intervening allocation of files. + * + * If we allocate a first level directory then force allocation + * in another cylinder group. + * + */ +static u_long +ext2_dirpref(struct inode *pip) +{ + struct m_ext2fs *fs; + int cg, prefcg, dirsize, cgsize; + int avgifree, avgbfree, avgndir, curdirsize; + int minifree, minbfree, maxndir; + int mincg, minndir; + int maxcontigdirs; + + mtx_assert(EXT2_MTX(pip->i_ump), MA_OWNED); + fs = pip->i_e2fs; + + avgifree = fs->e2fs->e2fs_ficount / fs->e2fs_gcount; + avgbfree = fs->e2fs->e2fs_fbcount / fs->e2fs_gcount; + avgndir = fs->e2fs_total_dir / fs->e2fs_gcount; + + /* + * Force allocation in another cg if creating a first level dir. + */ + ASSERT_VOP_LOCKED(ITOV(pip), "ext2fs_dirpref"); + if (ITOV(pip)->v_vflag & VV_ROOT) { + prefcg = arc4random() % fs->e2fs_gcount; + mincg = prefcg; + minndir = fs->e2fs_ipg; + for (cg = prefcg; cg < fs->e2fs_gcount; cg++) + if (fs->e2fs_gd[cg].ext2bgd_ndirs < minndir && + fs->e2fs_gd[cg].ext2bgd_nifree >= avgifree && + fs->e2fs_gd[cg].ext2bgd_nbfree >= avgbfree) { + mincg = cg; + minndir = fs->e2fs_gd[cg].ext2bgd_ndirs; + } + for (cg = 0; cg < prefcg; cg++) + if (fs->e2fs_gd[cg].ext2bgd_ndirs < minndir && + fs->e2fs_gd[cg].ext2bgd_nifree >= avgifree && + fs->e2fs_gd[cg].ext2bgd_nbfree >= avgbfree) { + mincg = cg; + minndir = fs->e2fs_gd[cg].ext2bgd_ndirs; + } + + return (mincg); + } + + /* + * Count various limits which used for + * optimal allocation of a directory inode. + */ + maxndir = min(avgndir + fs->e2fs_ipg / 16, fs->e2fs_ipg); + minifree = avgifree - avgifree / 4; + if (minifree < 1) + minifree = 1; + minbfree = avgbfree - avgbfree / 4; + if (minbfree < 1) + minbfree = 1; + cgsize = fs->e2fs_fsize * fs->e2fs_fpg; + dirsize = AVGDIRSIZE; + curdirsize = avgndir ? (cgsize - avgbfree * fs->e2fs_bsize) / avgndir : 0; + if (dirsize < curdirsize) + dirsize = curdirsize; + if (dirsize <= 0) + maxcontigdirs = 0; /* dirsize overflowed */ + else + maxcontigdirs = min((avgbfree * fs->e2fs_bsize) / dirsize, 255); + maxcontigdirs = min(maxcontigdirs, fs->e2fs_ipg / AFPDIR); + if (maxcontigdirs == 0) + maxcontigdirs = 1; + + /* + * Limit number of dirs in one cg and reserve space for + * regular files, but only if we have no deficit in + * inodes or space. + */ + prefcg = ino_to_cg(fs, pip->i_number); + for (cg = prefcg; cg < fs->e2fs_gcount; cg++) + if (fs->e2fs_gd[cg].ext2bgd_ndirs < maxndir && + fs->e2fs_gd[cg].ext2bgd_nifree >= minifree && + fs->e2fs_gd[cg].ext2bgd_nbfree >= minbfree) { + if (fs->e2fs_contigdirs[cg] < maxcontigdirs) + return (cg); + } + for (cg = 0; cg < prefcg; cg++) + if (fs->e2fs_gd[cg].ext2bgd_ndirs < maxndir && + fs->e2fs_gd[cg].ext2bgd_nifree >= minifree && + fs->e2fs_gd[cg].ext2bgd_nbfree >= minbfree) { + if (fs->e2fs_contigdirs[cg] < maxcontigdirs) + return (cg); + } + /* + * This is a backstop when we have deficit in space. + */ + for (cg = prefcg; cg < fs->e2fs_gcount; cg++) + if (fs->e2fs_gd[cg].ext2bgd_nifree >= avgifree) + return (cg); + for (cg = 0; cg < prefcg; cg++) + if (fs->e2fs_gd[cg].ext2bgd_nifree >= avgifree) + break; + return (cg); +} + +/* * Select the desired position for the next block in a file. * * we try to mimic what Remy does in inode_getblk/block_getblk @@ -437,11 +550,12 @@ ext2_blkpref(ip, lbn, indx, bap, blocknr int32_t blocknr; { int tmp; + mtx_assert(EXT2_MTX(ip->i_ump), MA_OWNED); /* if the next block is actually what we thought it is, then set the goal to what we thought it should be */ - if(ip->i_next_alloc_block == lbn) + if(ip->i_next_alloc_block == lbn && ip->i_next_alloc_goal != 0) return ip->i_next_alloc_goal; /* now check whether we were provided with an array that basically @@ -458,13 +572,230 @@ ext2_blkpref(ip, lbn, indx, bap, blocknr return blocknr ? blocknr : (int32_t)(ip->i_block_group * EXT2_BLOCKS_PER_GROUP(ip->i_e2fs)) + - ip->i_e2fs->s_es->s_first_data_block; + ip->i_e2fs->e2fs->e2fs_first_dblock; +} + +/* + * Implement the cylinder overflow algorithm. + * + * The policy implemented by this algorithm is: + * 1) allocate the block in its requested cylinder group. + * 2) quadradically rehash on the cylinder group number. + * 3) brute force search for a free block. + */ +static u_long +ext2_hashalloc(struct inode *ip, int cg, long pref, int size, + daddr_t (*allocator)(struct inode *, int, daddr_t, int)) +{ + struct m_ext2fs *fs; + ino_t result; + int i, icg = cg; + + mtx_assert(EXT2_MTX(ip->i_ump), MA_OWNED); + fs = ip->i_e2fs; + /* + * 1: preferred cylinder group + */ + result = (*allocator)(ip, cg, pref, size); + if (result) + return (result); + /* + * 2: quadratic rehash + */ + for (i = 1; i < fs->e2fs_gcount; i *= 2) { + cg += i; + if (cg >= fs->e2fs_gcount) + cg -= fs->e2fs_gcount; + result = (*allocator)(ip, cg, 0, size); + if (result) + return (result); + } + /* + * 3: brute force search + * Note that we start at i == 2, since 0 was checked initially, + * and 1 is always checked in the quadratic rehash. + */ + cg = (icg + 2) % fs->e2fs_gcount; + for (i = 2; i < fs->e2fs_gcount; i++) { + result = (*allocator)(ip, cg, 0, size); + if (result) + return (result); + cg++; + if (cg == fs->e2fs_gcount) + cg = 0; + } + return (0); +} + +/* + * Determine whether a block can be allocated. + * + * Check to see if a block of the appropriate size is available, + * and if it is, allocate it. + */ +static daddr_t +ext2_alloccg(struct inode *ip, int cg, daddr_t bpref, int size) +{ + struct m_ext2fs *fs; + struct buf *bp; + struct ext2mount *ump; + int error, bno, start, end, loc; + char *bbp; + /* XXX ondisk32 */ + fs = ip->i_e2fs; + ump = ip->i_ump; + if (fs->e2fs_gd[cg].ext2bgd_nbfree == 0) + return (0); + EXT2_UNLOCK(ump); + error = bread(ip->i_devvp, fsbtodb(fs, + fs->e2fs_gd[cg].ext2bgd_b_bitmap), + (int)fs->e2fs_bsize, NOCRED, &bp); + if (error) { + brelse(bp); + EXT2_LOCK(ump); + return (0); + } + bbp = (char *)bp->b_data; + + if (dtog(fs, bpref) != cg) + bpref = 0; + if (bpref != 0) { + bpref = dtogd(fs, bpref); + /* + * if the requested block is available, use it + */ + if (isclr(bbp, bpref)) { + bno = bpref; + goto gotit; + } + } + /* + * no blocks in the requested cylinder, so take next + * available one in this cylinder group. + * first try to get 8 contigous blocks, then fall back to a single + * block. + */ + if (bpref) + start = dtogd(fs, bpref) / NBBY; + else + start = 0; + end = howmany(fs->e2fs->e2fs_fpg, NBBY) - start; + for (loc = start; loc < end; loc++) { + if (bbp[loc] == 0) { + bno = loc * NBBY; + goto gotit; + } + } + for (loc = 0; loc < start; loc++) { + if (bbp[loc] == 0) { + bno = loc * NBBY; + goto gotit; + } + } + + bno = ext2_mapsearch(fs, bbp, bpref); + if (bno < 0){ + brelse(bp); + EXT2_LOCK(ump); + return (0); + } +gotit: +#ifdef DIAGNOSTIC + if (isset(bbp, (daddr_t)bno)) { + printf("ext2fs_alloccgblk: cg=%d bno=%d fs=%s\n", + cg, bno, fs->e2fs_fsmnt); + panic("ext2fs_alloccg: dup alloc"); + } +#endif + setbit(bbp, (daddr_t)bno); + EXT2_LOCK(ump); + fs->e2fs->e2fs_fbcount--; + fs->e2fs_gd[cg].ext2bgd_nbfree--; + fs->e2fs_fmod = 1; + EXT2_UNLOCK(ump); + bdwrite(bp); + return (cg * fs->e2fs->e2fs_fpg + fs->e2fs->e2fs_first_dblock + bno); +} + +/* + * Determine whether an inode can be allocated. + * + * Check to see if an inode is available, and if it is, + * allocate it using tode in the specified cylinder group. + */ +static daddr_t +ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipref, int mode) +{ + struct m_ext2fs *fs; + struct buf *bp; + struct ext2mount *ump; + int error, start, len, loc, map, i; + char *ibp; + ipref--; /* to avoid a lot of (ipref -1) */ + if (ipref == -1) + ipref = 0; + fs = ip->i_e2fs; + ump = ip->i_ump; + if (fs->e2fs_gd[cg].ext2bgd_nifree == 0) + return (0); + EXT2_UNLOCK(ump); + error = bread(ip->i_devvp, fsbtodb(fs, + fs->e2fs_gd[cg].ext2bgd_i_bitmap), + (int)fs->e2fs_bsize, NOCRED, &bp); + if (error) { + brelse(bp); + EXT2_LOCK(ump); + return (0); + } + ibp = (char *)bp->b_data; + if (ipref) { + ipref %= fs->e2fs->e2fs_ipg; + if (isclr(ibp, ipref)) + goto gotit; + } + start = ipref / NBBY; + len = howmany(fs->e2fs->e2fs_ipg - ipref, NBBY); + loc = skpc(0xff, len, &ibp[start]); + if (loc == 0) { + len = start + 1; + start = 0; + loc = skpc(0xff, len, &ibp[0]); + if (loc == 0) { + printf("cg = %d, ipref = %lld, fs = %s\n", + cg, (long long)ipref, fs->e2fs_fsmnt); + panic("ext2fs_nodealloccg: map corrupted"); + /* NOTREACHED */ + } + } + i = start + len - loc; + map = ibp[i]; + ipref = i * NBBY; + for (i = 1; i < (1 << NBBY); i <<= 1, ipref++) { + if ((map & i) == 0) { + goto gotit; + } + } + printf("fs = %s\n", fs->e2fs_fsmnt); + panic("ext2fs_nodealloccg: block not in map"); + /* NOTREACHED */ +gotit: + setbit(ibp, ipref); + EXT2_LOCK(ump); + fs->e2fs_gd[cg].ext2bgd_nifree--; + fs->e2fs->e2fs_ficount--; + fs->e2fs_fmod = 1; + if ((mode & IFMT) == IFDIR) { + fs->e2fs_gd[cg].ext2bgd_ndirs++; + fs->e2fs_total_dir++; + } + EXT2_UNLOCK(ump); + bdwrite(bp); + return (cg * fs->e2fs->e2fs_ipg + ipref +1); } /* * Free a block or fragment. * - * pass on to the Linux code */ void ext2_blkfree(ip, bno, size) @@ -472,19 +803,47 @@ ext2_blkfree(ip, bno, size) int32_t bno; long size; { - struct ext2_sb_info *fs; + struct m_ext2fs *fs; + struct buf *bp; + struct ext2mount *ump; + int cg, error; + char *bbp; fs = ip->i_e2fs; - /* - * call Linux code with mount *, block number, count - */ - ext2_free_blocks(ITOV(ip)->v_mount, bno, size / fs->s_frag_size); + ump = ip->i_ump; + cg = dtog(fs, bno); + if ((u_int)bno >= fs->e2fs->e2fs_bcount) { + printf("bad block %lld, ino %llu\n", (long long)bno, + (unsigned long long)ip->i_number); + ext2_fserr(fs, ip->i_uid, "bad block"); + return; + } + error = bread(ip->i_devvp, + fsbtodb(fs, fs->e2fs_gd[cg].ext2bgd_b_bitmap), + (int)fs->e2fs_bsize, NOCRED, &bp); + if (error) { + brelse(bp); + return; + } + bbp = (char *)bp->b_data; + bno = dtogd(fs, bno); + if (isclr(bbp, bno)) { + printf("block = %lld, fs = %s\n", + (long long)bno, fs->e2fs_fsmnt); + panic("blkfree: freeing free block"); + } + clrbit(bbp, bno); + EXT2_LOCK(ump); + fs->e2fs->e2fs_fbcount++; + fs->e2fs_gd[cg].ext2bgd_nbfree++; + fs->e2fs_fmod = 1; + EXT2_UNLOCK(ump); + bdwrite(bp); } /* * Free an inode. * - * the maintenance of the actual bitmaps is again up to the linux code */ int ext2_vfree(pvp, ino, mode) @@ -492,30 +851,94 @@ ext2_vfree(pvp, ino, mode) ino_t ino; int mode; { - struct ext2_sb_info *fs; + struct m_ext2fs *fs; struct inode *pip; - mode_t save_i_mode; + struct buf *bp; + struct ext2mount *ump; + int error, cg; + char * ibp; +/* mode_t save_i_mode; */ pip = VTOI(pvp); fs = pip->i_e2fs; - if ((u_int)ino > fs->s_inodes_per_group * fs->s_groups_count) + ump = pip->i_ump; + if ((u_int)ino > fs->e2fs_ipg * fs->e2fs_gcount) panic("ext2_vfree: range: devvp = %p, ino = %d, fs = %s", - pip->i_devvp, ino, fs->fs_fsmnt); + pip->i_devvp, ino, fs->e2fs_fsmnt); -/* ext2_debug("ext2_vfree (%d, %d) called\n", pip->i_number, mode); + cg = ino_to_cg(fs, ino); + error = bread(pip->i_devvp, + fsbtodb(fs, fs->e2fs_gd[cg].ext2bgd_i_bitmap), + (int)fs->e2fs_bsize, NOCRED, &bp); + if (error) { + brelse(bp); + return (0); + } + ibp = (char *)bp->b_data; + ino = (ino - 1) % fs->e2fs->e2fs_ipg; + if (isclr(ibp, ino)) { + printf("ino = %llu, fs = %s\n", + (unsigned long long)ino, fs->e2fs_fsmnt); + if (fs->e2fs_ronly == 0) + panic("ifree: freeing free inode"); + } + clrbit(ibp, ino); + EXT2_LOCK(ump); + fs->e2fs->e2fs_ficount++; + fs->e2fs_gd[cg].ext2bgd_nifree++; + if ((mode & IFMT) == IFDIR) { + fs->e2fs_gd[cg].ext2bgd_ndirs--; + fs->e2fs_total_dir--; + } + fs->e2fs_fmod = 1; + EXT2_UNLOCK(ump); + bdwrite(bp); + return (0); +} + +/* + * Find a block in the specified cylinder group. + * + * It is a panic if a request is made to find a block if none are + * available. */ - ext2_discard_prealloc(pip); +static daddr_t +ext2_mapsearch(struct m_ext2fs *fs, char *bbp, daddr_t bpref) +{ + daddr_t bno; + int start, len, loc, i, map; - /* we need to make sure that ext2_free_inode can adjust the - used_dir_counts in the group summary information - I'd - really like to know what the rationale behind this - 'set i_mode to zero to denote an unused inode' is + /* + * find the fragment by searching through the free block + * map for an appropriate bit pattern */ - save_i_mode = pip->i_mode; - pip->i_mode = mode; - ext2_free_inode(pip); - pip->i_mode = save_i_mode; - return (0); + if (bpref) + start = dtogd(fs, bpref) / NBBY; + else + start = 0; + len = howmany(fs->e2fs->e2fs_fpg, NBBY) - start; + loc = skpc(0xff, len, &bbp[start]); + if (loc == 0) { + len = start + 1; + start = 0; + loc = skpc(0xff, len, &bbp[start]); + if (loc == 0) { + printf("start = %d, len = %d, fs = %s\n", + start, len, fs->e2fs_fsmnt); + panic("ext2fs_alloccg: map corrupted"); + /* NOTREACHED */ + } + } + i = start + len - loc; + map = bbp[i]; + bno = i * NBBY; + for (i = 1; i < (1 << NBBY); i <<= 1, bno++) { + if ((map & i) == 0) + return (bno); + } + printf("fs = %s\n", fs->e2fs_fsmnt); + panic("ext2fs_mapsearch: block not in map"); + /* NOTREACHED */ } /* @@ -526,10 +949,25 @@ ext2_vfree(pvp, ino, mode) */ static void ext2_fserr(fs, uid, cp) - struct ext2_sb_info *fs; - u_int uid; + struct m_ext2fs *fs; + uid_t uid; char *cp; { - log(LOG_ERR, "uid %d on %s: %s\n", uid, fs->fs_fsmnt, cp); + log(LOG_ERR, "uid %u on %s: %s\n", uid, fs->e2fs_fsmnt, cp); +} + +int +cg_has_sb(int i) +{ + int a3, a5, a7; + + if (i == 0 || i == 1) + return 1; + for (a3 = 3, a5 = 5, a7 = 7; + a3 <= i || a5 <= i || a7 <= i; + a3 *= 3, a5 *= 5, a7 *= 7) + if (i == a3 || i == a5 || i == a7) + return 1; + return 0; } Modified: head/sys/fs/ext2fs/ext2_balloc.c ============================================================================== --- head/sys/gnu/fs/ext2fs/ext2_balloc.c Sun Jan 3 12:17:51 2010 (r201427) +++ head/sys/fs/ext2fs/ext2_balloc.c Thu Jan 14 14:30:54 2010 (r202283) @@ -44,42 +44,39 @@ #include #include -#include -#include -#include -#include -#include - +#include +#include +#include +#include +#include /* * Balloc defines the structure of file system storage * by allocating the physical blocks on a device given * the inode and the logical block number in a file. */ int -ext2_balloc(ip, bn, size, cred, bpp, flags) +ext2_balloc(ip, lbn, size, cred, bpp, flags) struct inode *ip; - int32_t bn; + int32_t lbn; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 14:36:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 029491065670; Thu, 14 Jan 2010 14:36:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC2CC8FC17; Thu, 14 Jan 2010 14:36:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EEadvL059226; Thu, 14 Jan 2010 14:36:39 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EEadDa059223; Thu, 14 Jan 2010 14:36:39 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001141436.o0EEadDa059223@svn.freebsd.org> From: John Baldwin Date: Thu, 14 Jan 2010 14:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202284 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 14:36:40 -0000 Author: jhb Date: Thu Jan 14 14:36:39 2010 New Revision: 202284 URL: http://svn.freebsd.org/changeset/base/202284 Log: - Update required headers for namei() to add and remove . - Add RETURN VALUES and ERROR sections for namei()'s error return values. - Add a missing link to NDHASGIANT.9. PR: docs/142815, docs/142816 Submitted by: Lachlan Kang (1, 2) MFC after: 3 days Modified: head/share/man/man9/Makefile head/share/man/man9/namei.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Jan 14 14:30:54 2010 (r202283) +++ head/share/man/man9/Makefile Thu Jan 14 14:36:39 2010 (r202284) @@ -903,7 +903,8 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 mtx_unlock_spin.9 \ mutex.9 mtx_unlock_spin_flags.9 MLINKS+=namei.9 NDFREE.9 \ - namei.9 NDINIT.9 + namei.9 NDINIT.9 \ + namei.9 NDHASGIANT.9 MLINKS+=pbuf.9 getpbuf.9 \ pbuf.9 relpbuf.9 \ pbuf.9 trypbuf.9 Modified: head/share/man/man9/namei.9 ============================================================================== --- head/share/man/man9/namei.9 Thu Jan 14 14:30:54 2010 (r202283) +++ head/share/man/man9/namei.9 Thu Jan 14 14:36:39 2010 (r202284) @@ -44,7 +44,7 @@ .Nd pathname translation and lookup operations .Sh SYNOPSIS .In sys/param.h -.In sys/proc.h +.In sys/fcntl.h .In sys/namei.h .Ft int .Fn namei "struct nameidata *ndp" @@ -315,6 +315,34 @@ flag can be passed to the .Fn NDFREE function. .El +.Sh RETURN VALUES +If successful, +.Fn namei +will return 0, otherwise it will return an error. +.Sh ERRORS +Errors which +.Fn namei +may return: +.Bl -tag -width Er +.It Bq Er ENOTDIR +A component of the specified pathname is not a directory when a directory is +expected. +.It Bq Er ENAMETOOLONG +A component of a pathname exceeded 255 characters, +or an entire pathname exceeded 1023 characters. +.It Bq Er ENOENT +A component of the specified pathname does not exist, +or the pathname is an empty string. +.It Bq Er ACCES +An attempt is made to access a file in a way forbidden by its file access +permissions. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating the pathname. +.It Bq Er EISDIR +An attempt is made to open a directory with write mode specified. +.It Bq Er EROFS +An attempt is made to modify a file or directory on a read-only file system. +.El .Sh FILES .Bl -tag .It Pa src/sys/kern/vfs_lookup.c From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 14:43:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1138D106566C; Thu, 14 Jan 2010 14:43:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F38C18FC14; Thu, 14 Jan 2010 14:43:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EEhGCc060702; Thu, 14 Jan 2010 14:43:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EEhG8e060700; Thu, 14 Jan 2010 14:43:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001141443.o0EEhG8e060700@svn.freebsd.org> From: John Baldwin Date: Thu, 14 Jan 2010 14:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202285 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 14:43:17 -0000 Author: jhb Date: Thu Jan 14 14:43:16 2010 New Revision: 202285 URL: http://svn.freebsd.org/changeset/base/202285 Log: - Note that if_xname, if_dname, and if_dunit are usually initialized via if_initname(). - Document if_drv_flags and replace references to IFF_(RUNNING|OACTIVE) with references to IFF_DRV_(RUNNING|OACTIVE). - Complete truncated sentence in the description of if_transmit by copying from the description in if_qflush. - Add missing line breaks for translators. Reviewed by: brooks (1) MFC after: 3 days Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Thu Jan 14 14:36:39 2010 (r202284) +++ head/share/man/man9/ifnet.9 Thu Jan 14 14:43:16 2010 (r202285) @@ -237,11 +237,15 @@ The name of the interface, .Dq Li fxp0 or .Dq Li lo0 ) . -(Initialized by driver.) +(Initialized by driver +(usually via +.Fn if_initname ) . ) .It Va if_dname .Pq Vt "const char *" The name of the driver. -(Initialized by driver.) +(Initialized by driver +(usually via +.Fn if_initname ) . ) .It Va if_dunit .Pq Vt int A unique number assigned to each interface managed by a particular @@ -249,7 +253,9 @@ driver. Drivers may choose to set this to .Dv IF_DUNIT_NONE if a unit number is not associated with the device. -(Initialized by driver.) +(Initialized by driver +(usually via +.Fn if_initname ) . ) .It Va if_addrhead .Pq Vt "struct ifaddrhead" The head of the @@ -282,7 +288,11 @@ to refer to a particular interface by in .It Va if_flags .Pq Vt int Flags describing operational parameters of this interface (see below). -(Manipulated by both driver and generic code.) +(Manipulated by generic code.) +.It Va if_drv_flags +.Pq Vt int +Flags describing operational status of this interface (see below). +(Manipulated by driver.) .It Va if_capabilities .Pq Vt int Flags describing the capabilities the interface supports (see below). @@ -349,18 +359,26 @@ Output a packet on interface or queue it on the output queue if the interface is already active. .It Fn if_transmit Transmit a packet on an interface or queue it if the interface is -in use. This function will return +in use. +This function will return .Dv ENOBUFS -if the devices software and hardware queues are both full. This -function must be installed after +if the devices software and hardware queues are both full. +This function must be installed after +.Fn if_attach +to override the default implementation. +This function is exposed in order to allow drivers to manage their own queues +and to reduce the latency caused by a frequently gratuitous enqueue / dequeue +pair to ifq. +The suggested internal software queueing mechanism is buf_ring. .It Fn if_qflush Free mbufs in internally managed queues when the interface is marked down. This function must be installed after .Fn if_attach -to override the default implementation. This function is exposed in order -to allow drivers to manage their own queues and to reduce the latency -caused by a frequently gratuitous enqueue / dequeue pair to ifq. The -suggested internal software queueing mechanism is buf_ring. +to override the default implementation. +This function is exposed in order to allow drivers to manage their own queues +and to reduce the latency caused by a frequently gratuitous enqueue / dequeue +pair to ifq. +The suggested internal software queueing mechanism is buf_ring. .It Fn if_start Start queued output on an interface. This function is exposed in @@ -369,10 +387,10 @@ order to provide for some interface clas among all drivers. .Fn if_start may only be called when the -.Dv IFF_OACTIVE +.Dv IFF_DRV_OACTIVE flag is not set. (Thus, -.Dv IFF_OACTIVE +.Dv IFF_DRV_OACTIVE does not literally mean that output is active, but rather that the device's internal output queue is full.) Please note that this function will soon be deprecated. @@ -406,7 +424,7 @@ Initialize and bring up the hardware, e.g., reset the chip and enable the receiver unit. Should mark the interface running, but not active -.Dv ( IFF_RUNNING , ~IIF_OACTIVE ) . +.Dv ( IFF_DRV_RUNNING , ~IIF_DRV_OACTIVE ) . .It Fn if_resolvemulti Check the requested multicast group membership, .Fa addr , @@ -425,6 +443,12 @@ Flags of the former kind are marked .Aq S in this table; the latter are marked .Aq D . +Flags which begin with +.Dq IFF_DRV_ +are stored in +.Va if_drv_flags ; +all other flags are stored in +.Va if_flags . .Pp The macro .Dv IFF_CANTCHANGE @@ -454,7 +478,7 @@ The interface is a loopback device. The interface is point-to-point; .Dq broadcast address is actually the address of the other end. -.It Dv IFF_RUNNING +.It Dv IFF_DRV_RUNNING .Aq D* The interface has been configured and dynamic resources were successfully allocated. @@ -473,7 +497,7 @@ This interface is in the permanently pro .It Dv IFF_ALLMULTI .Aq D* This interface is in all-multicasts mode (used by multicast routers). -.It Dv IFF_OACTIVE +.It Dv IFF_DRV_OACTIVE .Aq D* The interface's hardware output queue (if any) is full; output packets are to be queued. From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 15:07:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF7001065693; Thu, 14 Jan 2010 15:07:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDE478FC0A; Thu, 14 Jan 2010 15:07:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EF7Ihv066048; Thu, 14 Jan 2010 15:07:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EF7IQ9066047; Thu, 14 Jan 2010 15:07:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001141507.o0EF7IQ9066047@svn.freebsd.org> From: John Baldwin Date: Thu, 14 Jan 2010 15:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202286 - head/sys/amd64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 15:07:18 -0000 Author: jhb Date: Thu Jan 14 15:07:18 2010 New Revision: 202286 URL: http://svn.freebsd.org/changeset/base/202286 Log: Update the ident for the XENHVM kernel config to match the filename. MFC after: 1 week Modified: head/sys/amd64/conf/XENHVM Modified: head/sys/amd64/conf/XENHVM ============================================================================== --- head/sys/amd64/conf/XENHVM Thu Jan 14 14:43:16 2010 (r202285) +++ head/sys/amd64/conf/XENHVM Thu Jan 14 15:07:18 2010 (r202286) @@ -19,7 +19,7 @@ # $FreeBSD$ cpu HAMMER -ident GENERIC +ident XENHVM # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 15:20:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A981106566B; Thu, 14 Jan 2010 15:20:09 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 597228FC0A; Thu, 14 Jan 2010 15:20:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EFK9A4068870; Thu, 14 Jan 2010 15:20:09 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EFK9L7068868; Thu, 14 Jan 2010 15:20:09 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001141520.o0EFK9L7068868@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 Jan 2010 15:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202287 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 15:20:09 -0000 Author: ed Date: Thu Jan 14 15:20:09 2010 New Revision: 202287 URL: http://svn.freebsd.org/changeset/base/202287 Log: Unbreak pututxline() on 32-bit architectures. I forgot to cast the size_t's back to off_t before negating them, causing all sorts of artifacts where the log files would grow to 2^32 - 197 bytes. Reported by: ume Modified: head/lib/libc/gen/pututxline.c Modified: head/lib/libc/gen/pututxline.c ============================================================================== --- head/lib/libc/gen/pututxline.c Thu Jan 14 15:07:18 2010 (r202286) +++ head/lib/libc/gen/pututxline.c Thu Jan 14 15:20:09 2010 (r202287) @@ -87,7 +87,7 @@ utx_active_add(const struct futx *fu) case DEAD_PROCESS: /* Overwrite when ut_id matches. */ if (memcmp(fu->fu_id, fe.fu_id, sizeof fe.fu_id) == 0) { - fseeko(fp, -sizeof fe, SEEK_CUR); + fseeko(fp, -(off_t)sizeof fe, SEEK_CUR); goto exact; } if (fe.fu_type != DEAD_PROCESS) @@ -96,7 +96,7 @@ utx_active_add(const struct futx *fu) default: /* Allow us to overwrite unused records. */ if (partial == -1) - partial = ftello(fp) - sizeof fe; + partial = ftello(fp) - (off_t)sizeof fe; break; } } @@ -140,7 +140,7 @@ utx_active_remove(struct futx *fu) fu->fu_tv = fe.fu_tv; /* Terminate session. */ - fseeko(fp, -sizeof fe, SEEK_CUR); + fseeko(fp, -(off_t)sizeof fe, SEEK_CUR); fwrite(fu, sizeof *fu, 1, fp); fclose(fp); return (0); @@ -181,7 +181,7 @@ utx_lastlogin_add(const struct futx *fu) goto done; /* Found a previous lastlogin entry for this user. */ - fseeko(fp, -sizeof fe, SEEK_CUR); + fseeko(fp, -(off_t)sizeof fe, SEEK_CUR); break; } fwrite(fu, sizeof *fu, 1, fp); From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 15:20:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61390106568F; Thu, 14 Jan 2010 15:20:47 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 377358FC22; Thu, 14 Jan 2010 15:20:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EFKlvZ069071; Thu, 14 Jan 2010 15:20:47 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EFKldP069069; Thu, 14 Jan 2010 15:20:47 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001141520.o0EFKldP069069@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 Jan 2010 15:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202288 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 15:20:47 -0000 Author: ed Date: Thu Jan 14 15:20:46 2010 New Revision: 202288 URL: http://svn.freebsd.org/changeset/base/202288 Log: Remove ttyslot from Symbol.map anyway. Requested by: kan Modified: head/lib/libc/gen/Symbol.map Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Thu Jan 14 15:20:09 2010 (r202287) +++ head/lib/libc/gen/Symbol.map Thu Jan 14 15:20:46 2010 (r202288) @@ -272,7 +272,6 @@ FBSD_1.0 { openlog; closelog; setlogmask; - ttyslot; ttyname_r; ttyname; timezone; From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 15:27:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13C6B1065670; Thu, 14 Jan 2010 15:27:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02B9E8FC08; Thu, 14 Jan 2010 15:27:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EFRIf9070519; Thu, 14 Jan 2010 15:27:18 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EFRILD070517; Thu, 14 Jan 2010 15:27:18 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201001141527.o0EFRILD070517@svn.freebsd.org> From: Ed Maste Date: Thu, 14 Jan 2010 15:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202289 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 15:27:19 -0000 Author: emaste Date: Thu Jan 14 15:27:18 2010 New Revision: 202289 URL: http://svn.freebsd.org/changeset/base/202289 Log: Reject invalid CIDR widths rather than silently stopping at the first non-digit character. Due to an issue with rc(8) in a test configuration, ifconfig was being invoked with the address used again as the width - for example, ifconfig vlan0 10.0.0.1/10.0.0.1 Prior to this change, that address/width would be interpreted as 10.0.0.1/10. Modified: head/sbin/ifconfig/af_inet.c Modified: head/sbin/ifconfig/af_inet.c ============================================================================== --- head/sbin/ifconfig/af_inet.c Thu Jan 14 15:20:46 2010 (r202288) +++ head/sbin/ifconfig/af_inet.c Thu Jan 14 15:27:18 2010 (r202289) @@ -37,6 +37,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -110,15 +111,18 @@ in_getaddr(const char *s, int which) char *p = NULL; if((p = strrchr(s, '/')) != NULL) { + const char *errstr; /* address is `name/masklen' */ int masklen; - int ret; struct sockaddr_in *min = sintab[MASK]; *p = '\0'; - ret = sscanf(p+1, "%u", &masklen); - if(ret != 1 || (masklen < 0 || masklen > 32)) { + if (!isdigit(*(p + 1))) + errstr = "invalid"; + else + masklen = (int)strtonum(p + 1, 0, 32, &errstr); + if (errstr != NULL) { *p = '/'; - errx(1, "%s: bad value", s); + errx(1, "%s: bad value (width %s)", s, errstr); } min->sin_len = sizeof(*min); min->sin_addr.s_addr = htonl(~((1LL << (32 - masklen)) - 1) & From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 16:49:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEAD5106566B; Thu, 14 Jan 2010 16:49:22 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD9518FC12; Thu, 14 Jan 2010 16:49:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EGnMRA088610; Thu, 14 Jan 2010 16:49:22 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EGnMp8088608; Thu, 14 Jan 2010 16:49:22 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001141649.o0EGnMp8088608@svn.freebsd.org> From: Christian Brueffer Date: Thu, 14 Jan 2010 16:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202290 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 16:49:23 -0000 Author: brueffer Date: Thu Jan 14 16:49:22 2010 New Revision: 202290 URL: http://svn.freebsd.org/changeset/base/202290 Log: Build iwi(4) and iwifw(4) modules on amd64 as well. PR: 113117 Submitted by: "O. Hartmann" MFC after: 1 week Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Jan 14 15:27:18 2010 (r202289) +++ head/sys/modules/Makefile Thu Jan 14 16:49:22 2010 (r202290) @@ -513,6 +513,8 @@ _ipmi= ipmi _ips= ips _ipw= ipw _ipwfw= ipwfw +_iwi= iwi +_iwifw= iwifw _iwn= iwn _iwnfw= iwnfw _ixgb= ixgb From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 16:53:46 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E5341065670; Thu, 14 Jan 2010 16:53:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D90238FC0C; Thu, 14 Jan 2010 16:53:45 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 761D946B29; Thu, 14 Jan 2010 11:53:45 -0500 (EST) Date: Thu, 14 Jan 2010 16:53:45 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Doug Barton In-Reply-To: <4B4E1586.7090102@FreeBSD.org> Message-ID: References: <20100110.210204.787670930858346133.imp@bsdimp.com> <4B4D109A.5060500@FreeBSD.org> <20100112.174326.337739863389869251.imp@bsdimp.com> <4B4E1586.7090102@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "M. Warner Losh" , freebsd-arch@FreeBSD.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 16:53:46 -0000 > In the interests of bringing this to a close: > # Store the plain version of the configuration file in the kernel itself. > # For information on extraction, and storing the comments also, see > config(8). Am I right in thinking that even with this change, you still end up with a single giant config file whereas it may have been made up of several files in the original and assembled using the include directive? This means some caution (and a caveat of some sort) are still required. I agree entirely that we should be including the comments by default. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 17:30:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44E041065694; Thu, 14 Jan 2010 17:30:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id DAA628FC1B; Thu, 14 Jan 2010 17:30:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0EHKjMi012163; Thu, 14 Jan 2010 10:20:45 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 14 Jan 2010 10:21:42 -0700 (MST) Message-Id: <20100114.102142.328914705071816274.imp@bsdimp.com> To: rwatson@freebsd.org From: "M. Warner Losh" In-Reply-To: References: <20100112.174326.337739863389869251.imp@bsdimp.com> <4B4E1586.7090102@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, dougb@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 17:30:49 -0000 In message: Robert Watson writes: : : > In the interests of bringing this to a close: : > # Store the plain version of the configuration file in the kernel : > # itself. : > # For information on extraction, and storing the comments also, see : > config(8). : : Am I right in thinking that even with this change, you still end up : with a single giant config file whereas it may have been made up of : several files in the original and assembled using the include : directive? No. Without -C you get something that looks like: options CONFIG_AUTOGENERATED\n\ ident GENERIC\n\ machine amd64\n\ cpu HAMMER\n\ makeoptions DEBUG=-g\n\ options AH_SUPPORT_AR5416\n\ options IEEE80211_SUPPORT_MESH\n\ options IEEE80211_AMPDU_AGE\n\ which is the totally pre-processed config, with stuff sorted in a weird order (I think backwards in the file). This is the fully-processed config, including include files, option/nooption cancellation, etc. With -C you get: #\n\ # GENERIC -- Generic kernel configuration file for FreeBSD/amd64\n\ #\n\ # For more information on this file, please read the config(5) manual page,\n\ # and/or the handbook section on Kernel Configuration Files:\n\ #\n\ eg, an verbatim copy of the config file used, but do not get any files that were included such as DEFAULTS. Personally, I'd rather see us have two different options here, as suggested by others, so that it is clear and self-contained. I'd vote for INCLUDE_CONFIG for today's behavior without -C, and INCLUDE_CONFIG_FILE for config -C. -C then becomes a nop and the man page becomes correct. We can then put a single line: options INCLUDE_CONFIG_FILE # include this config file in kernel and be done with it in head. For MFC, having the extra comment lines isn't so horrible as an explicitly granted exception to the rule of not doing that so others won't be tempted to do it too. : This means some caution (and a caveat of some sort) are : still required. I agree entirely that we should be including the : comments by default. I disagree, for the reasons above. Warner From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 17:35:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6DED106566B; Thu, 14 Jan 2010 17:35:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4F688FC16; Thu, 14 Jan 2010 17:35:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EHZ7JI098763; Thu, 14 Jan 2010 17:35:07 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EHZ7mT098761; Thu, 14 Jan 2010 17:35:07 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001141735.o0EHZ7mT098761@svn.freebsd.org> From: Rick Macklem Date: Thu, 14 Jan 2010 17:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202292 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 17:35:07 -0000 Author: rmacklem Date: Thu Jan 14 17:35:07 2010 New Revision: 202292 URL: http://svn.freebsd.org/changeset/base/202292 Log: MFC: r201345 Fix the experimental NFS client so that it can create Unix domain sockets on an NFSv4 mount point. It was generating incorrect XDR in the request for this case. Tested by: infofarmer Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Thu Jan 14 17:30:13 2010 (r202291) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Thu Jan 14 17:35:07 2010 (r202292) @@ -1633,10 +1633,15 @@ nfsrpc_mknod(vnode_t dvp, char *name, in return (ENAMETOOLONG); NFSCL_REQSTART(nd, NFSPROC_MKNOD, dvp); if (nd->nd_flag & ND_NFSV4) { - NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); - *tl++ = vtonfsv34_type(vtyp); - *tl++ = txdr_unsigned(NFSMAJOR(rdev)); - *tl = txdr_unsigned(NFSMINOR(rdev)); + if (vtyp == VBLK || vtyp == VCHR) { + NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); + *tl++ = vtonfsv34_type(vtyp); + *tl++ = txdr_unsigned(NFSMAJOR(rdev)); + *tl = txdr_unsigned(NFSMINOR(rdev)); + } else { + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = vtonfsv34_type(vtyp); + } } (void) nfsm_strtom(nd, name, namelen); if (nd->nd_flag & ND_NFSV3) { From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 18:05:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 513E01065670; Thu, 14 Jan 2010 18:05:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E408C8FC0C; Thu, 14 Jan 2010 18:05:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0EHtODR012670; Thu, 14 Jan 2010 10:55:24 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 14 Jan 2010 10:56:22 -0700 (MST) Message-Id: <20100114.105622.457034909117828677.imp@bsdimp.com> To: rwatson@freebsd.org From: "M. Warner Losh" In-Reply-To: <20100114.102142.328914705071816274.imp@bsdimp.com> References: <4B4E1586.7090102@FreeBSD.org> <20100114.102142.328914705071816274.imp@bsdimp.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Jan_14_10_56_22_2010_136)--" Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, dougb@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 18:05:53 -0000 ----Next_Part(Thu_Jan_14_10_56_22_2010_136)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In message: <20100114.102142.328914705071816274.imp@bsdimp.com> "M. Warner Losh" writes: : Personally, I'd rather see us have two different options here, as : suggested by others, so that it is clear and self-contained. I'd vote : for INCLUDE_CONFIG for today's behavior without -C, and : INCLUDE_CONFIG_FILE for config -C. -C then becomes a nop and the man : page becomes correct. We can then put a single line: : : options INCLUDE_CONFIG_FILE # include this config file in kernel : : and be done with it in head. Consider the following patches, and the following lines in GENERIC: options INCLUDE_CONFIG_FILE # include this config file in kernel #options INCLUDE_CONFIG # processed config, without comments : For MFC, having the extra comment lines isn't so horrible as an : explicitly granted exception to the rule of not doing that so others : won't be tempted to do it too. That was worded badly. "I'm OK with merging the extra comments, so long as it is clear to everybody that this is done as a special case exception to the general rule that we don't do this." Finally, I'd like to appologize to Doug for hijacking his simple change and using it as an engine to make things better for the project. Warner P.S. I've also placed a copy of the diff at http://people.freebsd.org/~imp/config.diff ----Next_Part(Thu_Jan_14_10_56_22_2010_136)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="config.diff" Index: sys/kern/kern_mib.c =================================================================== --- sys/kern/kern_mib.c (revision 202102) +++ sys/kern/kern_mib.c (working copy) @@ -351,7 +351,7 @@ CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, sysctl_kern_securelvl, "I", "Current secure level"); -#ifdef INCLUDE_CONFIG_FILE +#if defined(INCLUDE_CONFIG_FILE) || defined(INCLUDE_CONFIG) /* Actual kernel configuration options. */ extern char kernconfstring[]; Index: usr.sbin/config/kernconf.tmpl =================================================================== --- usr.sbin/config/kernconf.tmpl (revision 202102) +++ usr.sbin/config/kernconf.tmpl (working copy) @@ -5,13 +5,19 @@ * $FreeBSD$ */ #include "opt_config.h" -#ifdef INCLUDE_CONFIG_FILE /* - * For !INCLUDE_CONFIG_FILE case, you should look at kern_mib.c. This is - * where kernconfstring is defined then. + * If INCLUDE_CONFIG_FILE is defined, then we include the config file + * verbatim (and that's the only config file we include). Otherwise, if + * INCLUDE_CONFIG is defined, we include it. Otherwise, we include nothing + * at all. */ +#ifdef INCLUDE_CONFIG_FILE const char kernconfstring[] __attribute__ ((section("kern_conf"))) = "%%KERNCONFFILE%%"; - +#else /* INCLUDE_CONFIG_FILE */ +#ifdef INCLUDE_CONFIG +const char kernconfstring[] __attribute__ ((section("kern_conf"))) = +"%%KERNCONF%%"; +#endif /* INCLUDE_CONFIG */ #endif /* INCLUDE_CONFIG_FILE */ Index: usr.sbin/config/main.c =================================================================== --- usr.sbin/config/main.c (revision 202102) +++ usr.sbin/config/main.c (working copy) @@ -79,12 +79,6 @@ int found_defaults; int incignore; -/* - * Preserve old behaviour in INCLUDE_CONFIG_FILE handling (files are included - * literally). - */ -int filebased = 0; - static void configfile(void); static void get_srcdir(void); static void usage(void); @@ -114,7 +108,6 @@ while ((ch = getopt(argc, argv, "Cd:gpVx:")) != -1) switch (ch) { case 'C': - filebased = 1; break; case 'd': if (*destdir == '\0') @@ -489,12 +482,18 @@ } } +static int +matches(const char *s1, const char *s2) +{ + return (strncmp(s1, s2, strlen(s2)) == 0); +} + static void configfile(void) { FILE *fo; - struct sbuf *sb; - char *p; + struct sbuf *sb1, *sb2; + char *p, *walker; /* Add main configuration file to the list of files to be included */ cfgfile_add(PREFIX); @@ -502,30 +501,30 @@ fo = fopen(p, "w"); if (!fo) err(2, "%s", p); - sb = sbuf_new(NULL, NULL, 2048, SBUF_AUTOEXTEND); - assert(sb != NULL); - sbuf_clear(sb); - if (filebased) { - /* Is needed, can be used for backward compatibility. */ - configfile_filebased(sb); - } else { - configfile_dynamic(sb); + sb1 = sbuf_new(NULL, NULL, 2048, SBUF_AUTOEXTEND); + assert(sb1 != NULL); + sb2 = sbuf_new(NULL, NULL, 2048, SBUF_AUTOEXTEND); + assert(sb2 != NULL); + sbuf_clear(sb1); + configfile_filebased(sb1); + sbuf_finish(sb1); + sbuf_clear(sb2); + configfile_dynamic(sb2); + sbuf_finish(sb2); + walker = kernconfstr; + while (*walker) { + if (matches(walker, KERNCONFFILETAG)) { + fprintf(fo, "%s", sbuf_data(sb1)); + walker += strlen(KERNCONFFILETAG); + } else if (matches(walker, KERNCONFTAG)) { + fprintf(fo, "%s", sbuf_data(sb2)); + walker += strlen(KERNCONFTAG); + } else { + fputc(*walker++, fo); + } } - sbuf_finish(sb); - /* - * We print first part of the tamplate, replace our tag with - * configuration files content and later continue writing our - * template. - */ - p = strstr(kernconfstr, KERNCONFTAG); - if (p == NULL) - errx(EXIT_FAILURE, "Something went terribly wrong!"); - *p = '\0'; - fprintf(fo, "%s", kernconfstr); - fprintf(fo, "%s", sbuf_data(sb)); - p += strlen(KERNCONFTAG); - fprintf(fo, "%s", p); - sbuf_delete(sb); + sbuf_delete(sb1); + sbuf_delete(sb2); fclose(fo); moveifchanged(path("config.c.new"), path("config.c")); cfgfile_removeall(); Index: usr.sbin/config/config.8 =================================================================== --- usr.sbin/config/config.8 (revision 202102) +++ usr.sbin/config/config.8 (working copy) @@ -65,9 +65,6 @@ .Nm version number. .It Fl C -If the INCLUDE_CONFIG_FILE is present in a configuration file, -kernel image will contain full configuration files included -literally (preserving comments). This flag is kept for backward compatibility. .It Fl d Ar destdir Use @@ -83,7 +80,9 @@ .It Fl x Ar kernel Print kernel configuration file embedded into a kernel file. -This option makes sense only if +This option makes sense only if either +.Cd "options INCLUDE_CONFIG" +or .Cd "options INCLUDE_CONFIG_FILE" entry was present in your configuration file. .It Fl p @@ -150,6 +149,17 @@ should be run again. Attempts to compile a system that had configuration errors are likely to fail. +.Pp +The kernel config file can be embedded into the kernel binary in one of +two ways. +First, a verbatim copy of the kernel config text file, without any of the +included config files, can be included using +.Cd "options INCLUDE_CONFIG_FILE" +in the config file. +Second, a copy of the fully process kernel config file, without any comments +at all, can be included using +.Cd "options INCLUDE_CONFIG" +in the config file. .Sh DEBUG KERNELS Traditional .Bx Index: usr.sbin/config/config.h =================================================================== --- usr.sbin/config/config.h (revision 202102) +++ usr.sbin/config/config.h (working copy) @@ -142,10 +142,11 @@ STAILQ_HEAD(hint_head, hint) hints; /* - * Tag present in the kernelconf.tmlp template file. It's mandatory for those - * two strings to be the same. Otherwise you'll get into trouble. + * Tags expanded in the kernconf.tmpl file. KERNCONFTAG is for the processed + * kernel file, while KERNCONFFILE is for the verbatim file. */ -#define KERNCONFTAG "%%KERNCONFFILE%%" +#define KERNCONFTAG "%%KERNCONF%%" +#define KERNCONFFILETAG "%%KERNCONFFILE%%" /* * Faked option to note, that the configuration file has been taken from the ----Next_Part(Thu_Jan_14_10_56_22_2010_136)---- From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 18:44:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36ACF1065679; Thu, 14 Jan 2010 18:44:41 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id EF61B8FC0A; Thu, 14 Jan 2010 18:44:40 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 5DC1A1CCD8; Thu, 14 Jan 2010 19:44:40 +0100 (CET) Date: Thu, 14 Jan 2010 19:44:40 +0100 From: Ed Schouten To: Ulf Lilleengen Message-ID: <20100114184440.GL64905@hoeg.nl> References: <201001141430.o0EEUssv057931@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pUbUlJlI7D8AxsZW" Content-Disposition: inline In-Reply-To: <201001141430.o0EEUssv057931@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202283 - in head/sys: conf fs/ext2fs gnu/fs/ext2fs gnu/fs/reiserfs modules/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 18:44:41 -0000 --pUbUlJlI7D8AxsZW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Ulf Lilleengen wrote: > Bring in the ext2fs work done by Aditya Sarawgi during and after > Google Summer of Code 2009: Very nice! Congratulations, Aditya! --=20 Ed Schouten WWW: http://80386.nl/ --pUbUlJlI7D8AxsZW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktPZhgACgkQ52SDGA2eCwU5VgCcDRtoxV1dW5SuwzIe/RkPfNyV pjEAn3AnctH+jtxE3HRqXGNDzAgx0QCC =nj6x -----END PGP SIGNATURE----- --pUbUlJlI7D8AxsZW-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 19:08:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD44A106566C; Thu, 14 Jan 2010 19:08:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC40C8FC0C; Thu, 14 Jan 2010 19:08:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EJ8hjv019461; Thu, 14 Jan 2010 19:08:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EJ8hTi019458; Thu, 14 Jan 2010 19:08:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001141908.o0EJ8hTi019458@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 19:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202293 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 19:08:43 -0000 Author: yongari Date: Thu Jan 14 19:08:43 2010 New Revision: 202293 URL: http://svn.freebsd.org/changeset/base/202293 Log: For controllers that has dual mode PHY(copper or fiber) interfaces over GMII, make sure to enable GMII. With this change brgphy(4) is used to handle the dual mode PHY. Since we still don't have a sane way to pass PHY specific information to mii(4) layer special handling is needed in brgphy(4) to determine which mode of PHY was configured in parent interface. This change make BCM5715S work. Tested by: olli Obtained from: OpenBSD MFC after: 1 week Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Thu Jan 14 17:35:07 2010 (r202292) +++ head/sys/dev/bge/if_bge.c Thu Jan 14 19:08:43 2010 (r202293) @@ -902,7 +902,8 @@ bge_miibus_statchg(device_t dev) mii = device_get_softc(sc->bge_miibus); BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_PORTMODE); - if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || + IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_GMII); else BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_MII); @@ -1783,13 +1784,20 @@ bge_blockinit(struct bge_softc *sc) if (!(BGE_IS_5705_PLUS(sc))) CSR_WRITE_4(sc, BGE_RXLS_MODE, BGE_RXLSMODE_ENABLE); + val = BGE_MACMODE_TXDMA_ENB | BGE_MACMODE_RXDMA_ENB | + BGE_MACMODE_RX_STATS_CLEAR | BGE_MACMODE_TX_STATS_CLEAR | + BGE_MACMODE_RX_STATS_ENB | BGE_MACMODE_TX_STATS_ENB | + BGE_MACMODE_FRMHDR_DMA_ENB; + + if (sc->bge_flags & BGE_FLAG_TBI) + val |= BGE_PORTMODE_TBI; + else if (sc->bge_flags & BGE_FLAG_MII_SERDES) + val |= BGE_PORTMODE_GMII; + else + val |= BGE_PORTMODE_MII; + /* Turn on DMA, clear stats */ - CSR_WRITE_4(sc, BGE_MAC_MODE, BGE_MACMODE_TXDMA_ENB | - BGE_MACMODE_RXDMA_ENB | BGE_MACMODE_RX_STATS_CLEAR | - BGE_MACMODE_TX_STATS_CLEAR | BGE_MACMODE_RX_STATS_ENB | - BGE_MACMODE_TX_STATS_ENB | BGE_MACMODE_FRMHDR_DMA_ENB | - ((sc->bge_flags & BGE_FLAG_TBI) ? - BGE_PORTMODE_TBI : BGE_PORTMODE_MII)); + CSR_WRITE_4(sc, BGE_MAC_MODE, val); /* Set misc. local control, enable interrupts on attentions */ CSR_WRITE_4(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_ONATTN); @@ -2851,12 +2859,14 @@ bge_attach(device_t dev) hwcfg = ntohl(hwcfg); } - if ((hwcfg & BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER) - sc->bge_flags |= BGE_FLAG_TBI; - /* The SysKonnect SK-9D41 is a 1000baseSX card. */ - if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == SK_SUBSYSID_9D41) - sc->bge_flags |= BGE_FLAG_TBI; + if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == + SK_SUBSYSID_9D41 || (hwcfg & BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER) { + if (BGE_IS_5714_FAMILY(sc)) + sc->bge_flags |= BGE_FLAG_MII_SERDES; + else + sc->bge_flags |= BGE_FLAG_TBI; + } if (sc->bge_flags & BGE_FLAG_TBI) { ifmedia_init(&sc->bge_ifmedia, IFM_IMASK, bge_ifmedia_upd, Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Thu Jan 14 17:35:07 2010 (r202292) +++ head/sys/dev/bge/if_bgereg.h Thu Jan 14 19:08:43 2010 (r202293) @@ -2603,6 +2603,7 @@ struct bge_softc { #define BGE_FLAG_JUMBO 0x00000002 #define BGE_FLAG_WIRESPEED 0x00000004 #define BGE_FLAG_EADDR 0x00000008 +#define BGE_FLAG_MII_SERDES 0x00000010 #define BGE_FLAG_MSI 0x00000100 #define BGE_FLAG_PCIX 0x00000200 #define BGE_FLAG_PCIE 0x00000400 From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 19:14:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92CD4106566B; Thu, 14 Jan 2010 19:14:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 826C68FC0C; Thu, 14 Jan 2010 19:14:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EJEO7d020759; Thu, 14 Jan 2010 19:14:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EJEOQw020757; Thu, 14 Jan 2010 19:14:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001141914.o0EJEOQw020757@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 19:14:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202294 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 19:14:24 -0000 Author: yongari Date: Thu Jan 14 19:14:24 2010 New Revision: 202294 URL: http://svn.freebsd.org/changeset/base/202294 Log: Add check for fiber mode for BCM5714 PHY. This PHY supports both copper and fiber interfaces over GMII so an explicit check is necessary to know whether it was configured for fiber interface. This change make BCM5715S work. Tested by: olli MFC after: 1 week Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Thu Jan 14 19:08:43 2010 (r202293) +++ head/sys/dev/mii/brgphy.c Thu Jan 14 19:14:24 2010 (r202294) @@ -197,6 +197,7 @@ brgphy_attach(device_t dev) case MII_OUI_xxBROADCOM: switch (bsc->mii_model) { case MII_MODEL_xxBROADCOM_BCM5706: + case MII_MODEL_xxBROADCOM_BCM5714: /* * The 5464 PHY used in the 5706 supports both copper * and fiber interfaces over GMII. Need to check the From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 19:23:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99101106566C; Thu, 14 Jan 2010 19:23:41 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88CA38FC1B; Thu, 14 Jan 2010 19:23:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EJNfvQ022837; Thu, 14 Jan 2010 19:23:41 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EJNf0m022835; Thu, 14 Jan 2010 19:23:41 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001141923.o0EJNf0m022835@svn.freebsd.org> From: Rui Paulo Date: Thu, 14 Jan 2010 19:23:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202295 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 19:23:41 -0000 Author: rpaulo Date: Thu Jan 14 19:23:41 2010 New Revision: 202295 URL: http://svn.freebsd.org/changeset/base/202295 Log: Fix bugs introduced in previous commit: off-by-one in add_meshconf() and big-endian bug on verify_meshconf() Modified: head/sys/net80211/ieee80211_mesh.c Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Thu Jan 14 19:14:24 2010 (r202294) +++ head/sys/net80211/ieee80211_mesh.c Thu Jan 14 19:23:41 2010 (r202295) @@ -2283,6 +2283,7 @@ mesh_verify_meshconf(struct ieee80211vap const struct ieee80211_meshconf_ie *meshconf = (const struct ieee80211_meshconf_ie *) ie; const struct ieee80211_mesh_state *ms = vap->iv_mesh; + uint16_t cap; if (meshconf == NULL) return 1; @@ -2316,8 +2317,10 @@ mesh_verify_meshconf(struct ieee80211vap meshconf->conf_pselid); return 1; } + /* NB: conf_cap is only read correctly here */ + cap = LE_READ_2(&meshconf->conf_cap); /* Not accepting peers */ - if (!(meshconf->conf_cap & IEEE80211_MESHCONF_CAP_AP)) { + if (!(cap & IEEE80211_MESHCONF_CAP_AP)) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, "not accepting peers: 0x%x\n", meshconf->conf_cap); return 1; @@ -2403,7 +2406,6 @@ ieee80211_add_meshconf(uint8_t *frm, str if (ms->ms_flags & IEEE80211_MESHFLAGS_FWD) caps |= IEEE80211_MESHCONF_CAP_FWRD; ADDSHORT(frm, caps); - frm += 1; return frm; } From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 20:01:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8016106566B for ; Thu, 14 Jan 2010 20:01:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 35A048FC1E for ; Thu, 14 Jan 2010 20:01:16 +0000 (UTC) Received: (qmail 20898 invoked by uid 399); 14 Jan 2010 20:01:16 -0000 Received: from localhost (HELO ?192.168.0.110?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 14 Jan 2010 20:01:16 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B4F7810.2080003@FreeBSD.org> Date: Thu, 14 Jan 2010 12:01:20 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: "M. Warner Losh" References: <4B4E1586.7090102@FreeBSD.org> <20100114.102142.328914705071816274.imp@bsdimp.com> <20100114.105622.457034909117828677.imp@bsdimp.com> In-Reply-To: <20100114.105622.457034909117828677.imp@bsdimp.com> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 20:01:17 -0000 On 1/14/2010 9:56 AM, M. Warner Losh wrote: + * If INCLUDE_CONFIG_FILE is defined, then we include the config file + * verbatim (and that's the only config file we include). Otherwise, if + * INCLUDE_CONFIG is defined, we include it. Otherwise, we include nothing + * at all. FWIW, I actually think this makes it worse, not better. The INCLUDE_CONFIG_FILE option should include everything needed to recreate the kernel. If it doesn't, it's worse than worthless, it leads to a false sense of security which makes it dangerous. I wasn't actually aware that if you do the config -C trick that you'll get ONLY the one file, not everything. Frankly I'm flabbergasted that we could do something so stupid. And on that note, I officially give up. I have better things to do with my time than argue about this any more, and it's pretty clear that my perspective on this is not shared. Maybe it's not even reasonable, who knows? Good luck, Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 20:12:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F5E41065670; Thu, 14 Jan 2010 20:12:28 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 55EEF8FC1A; Thu, 14 Jan 2010 20:12:28 +0000 (UTC) Received: from [192.168.2.102] (host86-178-254-187.range86-178.btcentralplus.com [86.178.254.187]) by cyrus.watson.org (Postfix) with ESMTPSA id EE0DE46B0D; Thu, 14 Jan 2010 15:12:26 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <4B4F7810.2080003@FreeBSD.org> Date: Thu, 14 Jan 2010 20:12:24 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> References: <4B4E1586.7090102@FreeBSD.org> <20100114.102142.328914705071816274.imp@bsdimp.com> <20100114.105622.457034909117828677.imp@bsdimp.com> <4B4F7810.2080003@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "M. Warner Losh" , freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 20:12:28 -0000 On 14 Jan 2010, at 20:01, Doug Barton wrote: > FWIW, I actually think this makes it worse, not better. The > INCLUDE_CONFIG_FILE option should include everything needed to = recreate > the kernel. If it doesn't, it's worse than worthless, it leads to a > false sense of security which makes it dangerous. I wasn't actually > aware that if you do the config -C trick that you'll get ONLY the one > file, not everything. (...more irritated words stripped like the comments in a config file...) I agree. I see two kinds of users: - Desktop/server users who want their system to work without any special = tuning or magic, and likely feel the comments they put in configuration = files are important - Users who care a about a few hundred bytes of comments due to the = nature of their special embedded hardware target environment As such, I see a reasonable "default" -- i.e., i386/amd64 GENERIC -- be = to fully preserve the configuration and its comments. For the embedded = and appliance crowds, I definitely want them to be able to fully exclude = the configuration (by not including the option). I don't see a lot of = merit to supporting stripping the comments, but if someone wants that = special case, I'm OK with supporting it, but I think it's an unuseful = default for the desktop/server platforms. Robert= From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 20:20:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBDE0106566B; Thu, 14 Jan 2010 20:20:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9EF28FC1B; Thu, 14 Jan 2010 20:20:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EKKQSC035270; Thu, 14 Jan 2010 20:20:26 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EKKQGp035267; Thu, 14 Jan 2010 20:20:26 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142020.o0EKKQGp035267@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 20:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202296 - in stable/7/sys: conf dev/ste modules/ste pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 20:20:27 -0000 Author: yongari Date: Thu Jan 14 20:20:26 2010 New Revision: 202296 URL: http://svn.freebsd.org/changeset/base/202296 Log: MFC r181739: Move the ste driver from sys/pci to sys/dev/ste. Added: stable/7/sys/dev/ste/ - copied from r181739, head/sys/dev/ste/ Deleted: stable/7/sys/pci/if_ste.c stable/7/sys/pci/if_stereg.h Modified: stable/7/sys/conf/files stable/7/sys/modules/ste/Makefile Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Thu Jan 14 19:23:41 2010 (r202295) +++ stable/7/sys/conf/files Thu Jan 14 20:20:26 2010 (r202296) @@ -1207,6 +1207,7 @@ dev/spibus/spibus.c optional spibus dev/spibus/spibus_if.m optional spibus dev/sr/if_sr.c optional sr dev/sr/if_sr_pci.c optional sr pci +dev/ste/if_ste.c optional ste pci dev/stg/tmc18c30.c optional stg dev/stg/tmc18c30_isa.c optional stg isa dev/stg/tmc18c30_pccard.c optional stg pccard @@ -2124,7 +2125,6 @@ pci/amdpm.c optional amdpm pci | nfpm pci/amdsmb.c optional amdsmb pci pci/if_mn.c optional mn pci pci/if_rl.c optional rl pci -pci/if_ste.c optional ste pci pci/if_tl.c optional tl pci pci/if_wb.c optional wb pci pci/if_xl.c optional xl pci Modified: stable/7/sys/modules/ste/Makefile ============================================================================== --- stable/7/sys/modules/ste/Makefile Thu Jan 14 19:23:41 2010 (r202295) +++ stable/7/sys/modules/ste/Makefile Thu Jan 14 20:20:26 2010 (r202296) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../pci +.PATH: ${.CURDIR}/../../dev/ste KMOD= if_ste SRCS= if_ste.c device_if.h bus_if.h pci_if.h From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 20:37:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6091B106566B; Thu, 14 Jan 2010 20:37:40 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 6A8B98FC14; Thu, 14 Jan 2010 20:37:39 +0000 (UTC) Received: by bwz5 with SMTP id 5so63737bwz.3 for ; Thu, 14 Jan 2010 12:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=nRCR/CR1i/7l0iwlDyLJCogZTQQ4XzxJ8gEvWGfJGpw=; b=qXOdKftPqVXhZ8cig7A/wAYW7BDdztEYCQPKXKKnP21+kAUhkhvK1hp3BWq8iDyZKx B8E3Y2H6IhcT+WcADBXiYWC+K/fx4v10cLIdjLLGyFN19IR7XRZ+ZW7P/GaAGxK4R4wf zw98JxN4TmZR4+BURUQwNtPd/caBaBlBfSuN4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=U6ouhO5iQ4CsdgAHLAX1BkRVQIYmS69zaBvFTFn+nowJRWalM4cSU25B6Vmbe1vw3A qeREhjgrZJqPmILXLpr/AVK4yf3rKaAkQ7xtws9/kjFtAG1uapfV5hKiwDrEYR/aAtFr qqQZomCAcHEE0AVYn0koYMjNQ3I7DoymuD6Co= MIME-Version: 1.0 Received: by 10.204.15.145 with SMTP id k17mr771595bka.70.1263501448967; Thu, 14 Jan 2010 12:37:28 -0800 (PST) In-Reply-To: <201001141430.o0EEUssv057931@svn.freebsd.org> References: <201001141430.o0EEUssv057931@svn.freebsd.org> Date: Thu, 14 Jan 2010 23:37:28 +0300 Message-ID: From: pluknet To: Ulf Lilleengen Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202283 - in head/sys: conf fs/ext2fs gnu/fs/ext2fs gnu/fs/reiserfs modules/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 20:37:40 -0000 2010/1/14 Ulf Lilleengen : > Author: lulf > Date: Thu Jan 14 14:30:54 2010 > New Revision: 202283 > URL: http://svn.freebsd.org/changeset/base/202283 > Sorry for my late comment. Please, dedup those comments below (came from p4 165599). thanks! > =A0/* > =A0* Allocate a block in the file system. > - * > - * this takes the framework from ffs_alloc. To implement the > - * actual allocation, it calls ext2_new_block, the ported version > - * of the same Linux routine. > =A0* > - * we note that this is always called in connection with ext2_blkpref > + * A preference may be optionally specified. If a preference is given > + * the following hierarchy is used to allocate a block: > + * =A0 1) allocate the requested block. > + * =A0 2) allocate a rotationally optimal block in the same cylinder. > + * =A0 3) allocate a block in the same cylinder group. > + * =A0 4) quadradically rehash into other cylinder groups, until an > + * =A0 =A0 =A0 =A0available block is located. > + * If no block preference is given the following hierarchy is used > + * to allocate a block: > + * =A0 1) allocate a block in the cylinder group that contains the > + * =A0 =A0 =A0 =A0inode for the file. > + * =A0 2) quadradically rehash into other cylinder groups, until an > + * =A0 =A0 =A0 =A0available block is located. > =A0* > - * preallocation is done as Linux does it > + * A preference may be optionally specified. If a preference is given > + * the following hierarchy is used to allocate a block: > + * =A0 1) allocate the requested block. > + * =A0 2) allocate a rotationally optimal block in the same cylinder. > + * =A0 3) allocate a block in the same cylinder group. > + * =A0 4) quadradically rehash into other cylinder groups, until an > + * =A0 =A0 =A0 =A0available block is located. > + * If no block preference is given the following hierarchy is used > + * to allocate a block: > + * =A0 1) allocate a block in the cylinder group that contains the > + * =A0 =A0 =A0 =A0inode for the file. > + * =A0 2) quadradically rehash into other cylinder groups, until an > + * =A0 =A0 =A0 =A0available block is located. > =A0*/ --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 20:38:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC7FD106566C; Thu, 14 Jan 2010 20:38:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9D208FC1D; Thu, 14 Jan 2010 20:38:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EKceh5039474; Thu, 14 Jan 2010 20:38:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EKceC4039471; Thu, 14 Jan 2010 20:38:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142038.o0EKceC4039471@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 20:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202297 - stable/8/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 20:38:41 -0000 Author: yongari Date: Thu Jan 14 20:38:40 2010 New Revision: 202297 URL: http://svn.freebsd.org/changeset/base/202297 Log: Partial merge r199559: - Add a private timer to drive the transmit watchdog instead of using if_watchdog and if_timer. - Fix some issues in detach for sn(4), ste(4), and ti(4). Primarily this means calling ether_ifdetach() before anything else. Modified: stable/8/sys/dev/ste/if_ste.c stable/8/sys/dev/ste/if_stereg.h Modified: stable/8/sys/dev/ste/if_ste.c ============================================================================== --- stable/8/sys/dev/ste/if_ste.c Thu Jan 14 20:20:26 2010 (r202296) +++ stable/8/sys/dev/ste/if_ste.c Thu Jan 14 20:38:40 2010 (r202297) @@ -108,7 +108,7 @@ static int ste_ioctl(struct ifnet *, u_l static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *); static void ste_start(struct ifnet *); static void ste_start_locked(struct ifnet *); -static void ste_watchdog(struct ifnet *); +static void ste_watchdog(struct ste_softc *); static int ste_shutdown(device_t); static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *, struct mbuf *); @@ -924,7 +924,7 @@ ste_txeof(sc) sc->ste_cdata.ste_tx_cons = idx; if (idx == sc->ste_cdata.ste_tx_prod) - ifp->if_timer = 0; + sc->ste_timer = 0; } static void @@ -960,6 +960,8 @@ ste_stats_update(xsc) } } + if (sc->ste_timer > 0 && --sc->ste_timer == 0) + ste_watchdog(sc); callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc); return; @@ -1094,7 +1096,6 @@ ste_attach(dev) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ste_ioctl; ifp->if_start = ste_start; - ifp->if_watchdog = ste_watchdog; ifp->if_init = ste_init; IFQ_SET_MAXLEN(&ifp->if_snd, STE_TX_LIST_CNT - 1); ifp->if_snd.ifq_drv_maxlen = STE_TX_LIST_CNT - 1; @@ -1159,11 +1160,11 @@ ste_detach(dev) /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { + ether_ifdetach(ifp); STE_LOCK(sc); ste_stop(sc); STE_UNLOCK(sc); callout_drain(&sc->ste_stat_callout); - ether_ifdetach(ifp); } if (sc->ste_miibus) device_delete_child(dev, sc->ste_miibus); @@ -1708,7 +1709,7 @@ ste_start_locked(ifp) BPF_MTAP(ifp, cur_tx->ste_mbuf); STE_INC(idx, STE_TX_LIST_CNT); - ifp->if_timer = 5; + sc->ste_timer = 5; } sc->ste_cdata.ste_tx_prod = idx; @@ -1716,13 +1717,12 @@ ste_start_locked(ifp) } static void -ste_watchdog(ifp) - struct ifnet *ifp; +ste_watchdog(struct ste_softc *sc) { - struct ste_softc *sc; + struct ifnet *ifp; - sc = ifp->if_softc; - STE_LOCK(sc); + ifp = sc->ste_ifp; + STE_LOCK_ASSERT(sc); ifp->if_oerrors++; if_printf(ifp, "watchdog timeout\n"); @@ -1736,7 +1736,6 @@ ste_watchdog(ifp) if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ste_start_locked(ifp); - STE_UNLOCK(sc); return; } Modified: stable/8/sys/dev/ste/if_stereg.h ============================================================================== --- stable/8/sys/dev/ste/if_stereg.h Thu Jan 14 20:20:26 2010 (r202296) +++ stable/8/sys/dev/ste/if_stereg.h Thu Jan 14 20:38:40 2010 (r202297) @@ -517,6 +517,7 @@ struct ste_softc { int ste_tx_thresh; u_int8_t ste_link; int ste_if_flags; + int ste_timer; struct ste_chain *ste_tx_prev; struct ste_list_data *ste_ldata; struct ste_chain_data ste_cdata; From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 20:40:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2AF8106566B; Thu, 14 Jan 2010 20:40:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 916EF8FC0A; Thu, 14 Jan 2010 20:40:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EKebmZ039952; Thu, 14 Jan 2010 20:40:37 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EKebiG039949; Thu, 14 Jan 2010 20:40:37 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142040.o0EKebiG039949@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 20:40:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202298 - stable/7/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 20:40:37 -0000 Author: yongari Date: Thu Jan 14 20:40:37 2010 New Revision: 202298 URL: http://svn.freebsd.org/changeset/base/202298 Log: Partial merge r199559: - Add a private timer to drive the transmit watchdog instead of using if_watchdog and if_timer. - Fix some issues in detach for sn(4), ste(4), and ti(4). Primarily this means calling ether_ifdetach() before anything else. Modified: stable/7/sys/dev/ste/if_ste.c stable/7/sys/dev/ste/if_stereg.h Modified: stable/7/sys/dev/ste/if_ste.c ============================================================================== --- stable/7/sys/dev/ste/if_ste.c Thu Jan 14 20:38:40 2010 (r202297) +++ stable/7/sys/dev/ste/if_ste.c Thu Jan 14 20:40:37 2010 (r202298) @@ -108,7 +108,7 @@ static int ste_ioctl(struct ifnet *, u_l static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *); static void ste_start(struct ifnet *); static void ste_start_locked(struct ifnet *); -static void ste_watchdog(struct ifnet *); +static void ste_watchdog(struct ste_softc *); static int ste_shutdown(device_t); static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *, struct mbuf *); @@ -919,7 +919,7 @@ ste_txeof(sc) sc->ste_cdata.ste_tx_cons = idx; if (idx == sc->ste_cdata.ste_tx_prod) - ifp->if_timer = 0; + sc->ste_timer = 0; } static void @@ -955,6 +955,8 @@ ste_stats_update(xsc) } } + if (sc->ste_timer > 0 && --sc->ste_timer == 0) + ste_watchdog(sc); callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc); return; @@ -1089,7 +1091,6 @@ ste_attach(dev) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ste_ioctl; ifp->if_start = ste_start; - ifp->if_watchdog = ste_watchdog; ifp->if_init = ste_init; IFQ_SET_MAXLEN(&ifp->if_snd, STE_TX_LIST_CNT - 1); ifp->if_snd.ifq_drv_maxlen = STE_TX_LIST_CNT - 1; @@ -1154,11 +1155,11 @@ ste_detach(dev) /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { + ether_ifdetach(ifp); STE_LOCK(sc); ste_stop(sc); STE_UNLOCK(sc); callout_drain(&sc->ste_stat_callout); - ether_ifdetach(ifp); } if (sc->ste_miibus) device_delete_child(dev, sc->ste_miibus); @@ -1703,7 +1704,7 @@ ste_start_locked(ifp) BPF_MTAP(ifp, cur_tx->ste_mbuf); STE_INC(idx, STE_TX_LIST_CNT); - ifp->if_timer = 5; + sc->ste_timer = 5; } sc->ste_cdata.ste_tx_prod = idx; @@ -1711,13 +1712,12 @@ ste_start_locked(ifp) } static void -ste_watchdog(ifp) - struct ifnet *ifp; +ste_watchdog(struct ste_softc *sc) { - struct ste_softc *sc; + struct ifnet *ifp; - sc = ifp->if_softc; - STE_LOCK(sc); + ifp = sc->ste_ifp; + STE_LOCK_ASSERT(sc); ifp->if_oerrors++; if_printf(ifp, "watchdog timeout\n"); @@ -1731,7 +1731,6 @@ ste_watchdog(ifp) if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ste_start_locked(ifp); - STE_UNLOCK(sc); return; } Modified: stable/7/sys/dev/ste/if_stereg.h ============================================================================== --- stable/7/sys/dev/ste/if_stereg.h Thu Jan 14 20:38:40 2010 (r202297) +++ stable/7/sys/dev/ste/if_stereg.h Thu Jan 14 20:40:37 2010 (r202298) @@ -517,6 +517,7 @@ struct ste_softc { int ste_tx_thresh; u_int8_t ste_link; int ste_if_flags; + int ste_timer; struct ste_chain *ste_tx_prev; struct ste_list_data *ste_ldata; struct ste_chain_data ste_cdata; From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 20:47:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48980106566C; Thu, 14 Jan 2010 20:47:49 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36AD48FC13; Thu, 14 Jan 2010 20:47:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EKlnKu041653; Thu, 14 Jan 2010 20:47:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EKlnBc041650; Thu, 14 Jan 2010 20:47:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142047.o0EKlnBc041650@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 20:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202299 - stable/8/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 20:47:49 -0000 Author: yongari Date: Thu Jan 14 20:47:49 2010 New Revision: 202299 URL: http://svn.freebsd.org/changeset/base/202299 Log: MFC r200798,200801,200803-200804,200808,200810 r200798: Use ANSI function definations. r200801: o Remove unnecessary return statement. o Remove register keyword. r200803: s/u_intXX_t/uintXX_t/g r200804: Remove trailing white spaces. r200808: style(9) r200810: Sort function prototyes. Modified: stable/8/sys/dev/ste/if_ste.c stable/8/sys/dev/ste/if_stereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ste/if_ste.c ============================================================================== --- stable/8/sys/dev/ste/if_ste.c Thu Jan 14 20:40:37 2010 (r202298) +++ stable/8/sys/dev/ste/if_ste.c Thu Jan 14 20:47:49 2010 (r202299) @@ -91,45 +91,44 @@ static struct ste_type ste_devs[] = { { 0, 0, NULL } }; -static int ste_probe(device_t); -static int ste_attach(device_t); -static int ste_detach(device_t); -static void ste_init(void *); -static void ste_init_locked(struct ste_softc *); -static void ste_intr(void *); -static void ste_rxeoc(struct ste_softc *); -static int ste_rxeof(struct ste_softc *); -static void ste_txeoc(struct ste_softc *); -static void ste_txeof(struct ste_softc *); -static void ste_stats_update(void *); -static void ste_stop(struct ste_softc *); -static void ste_reset(struct ste_softc *); -static int ste_ioctl(struct ifnet *, u_long, caddr_t); -static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *); -static void ste_start(struct ifnet *); -static void ste_start_locked(struct ifnet *); -static void ste_watchdog(struct ste_softc *); -static int ste_shutdown(device_t); -static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *, - struct mbuf *); -static int ste_ifmedia_upd(struct ifnet *); -static void ste_ifmedia_upd_locked(struct ifnet *); -static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *); - -static void ste_mii_sync(struct ste_softc *); -static void ste_mii_send(struct ste_softc *, u_int32_t, int); -static int ste_mii_readreg(struct ste_softc *, struct ste_mii_frame *); -static int ste_mii_writereg(struct ste_softc *, struct ste_mii_frame *); -static int ste_miibus_readreg(device_t, int, int); -static int ste_miibus_writereg(device_t, int, int, int); -static void ste_miibus_statchg(device_t); - -static int ste_eeprom_wait(struct ste_softc *); -static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); -static void ste_wait(struct ste_softc *); -static void ste_setmulti(struct ste_softc *); -static int ste_init_rx_list(struct ste_softc *); -static void ste_init_tx_list(struct ste_softc *); +static int ste_attach(device_t); +static int ste_detach(device_t); +static int ste_probe(device_t); +static int ste_shutdown(device_t); + +static int ste_eeprom_wait(struct ste_softc *); +static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *); +static int ste_ifmedia_upd(struct ifnet *); +static void ste_ifmedia_upd_locked(struct ifnet *); +static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static void ste_init(void *); +static void ste_init_locked(struct ste_softc *); +static int ste_init_rx_list(struct ste_softc *); +static void ste_init_tx_list(struct ste_softc *); +static void ste_intr(void *); +static int ste_ioctl(struct ifnet *, u_long, caddr_t); +static int ste_mii_readreg(struct ste_softc *, struct ste_mii_frame *); +static void ste_mii_send(struct ste_softc *, uint32_t, int); +static void ste_mii_sync(struct ste_softc *); +static int ste_mii_writereg(struct ste_softc *, struct ste_mii_frame *); +static int ste_miibus_readreg(device_t, int, int); +static void ste_miibus_statchg(device_t); +static int ste_miibus_writereg(device_t, int, int, int); +static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *, + struct mbuf *); +static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); +static void ste_reset(struct ste_softc *); +static void ste_rxeoc(struct ste_softc *); +static int ste_rxeof(struct ste_softc *); +static void ste_setmulti(struct ste_softc *); +static void ste_start(struct ifnet *); +static void ste_start_locked(struct ifnet *); +static void ste_stats_update(void *); +static void ste_stop(struct ste_softc *); +static void ste_txeoc(struct ste_softc *); +static void ste_txeof(struct ste_softc *); +static void ste_wait(struct ste_softc *); +static void ste_watchdog(struct ste_softc *); #ifdef STE_USEIOSPACE #define STE_RES SYS_RES_IOPORT @@ -194,16 +193,15 @@ SYSCTL_INT(_hw_ste, OID_AUTO, rxsyncs, C #define MII_SET(x) STE_SETBIT1(sc, STE_PHYCTL, x) -#define MII_CLR(x) STE_CLRBIT1(sc, STE_PHYCTL, x) +#define MII_CLR(x) STE_CLRBIT1(sc, STE_PHYCTL, x) /* * Sync the PHYs by setting data bit and strobing the clock 32 times. */ static void -ste_mii_sync(sc) - struct ste_softc *sc; +ste_mii_sync(struct ste_softc *sc) { - register int i; + int i; MII_SET(STE_PHYCTL_MDIR|STE_PHYCTL_MDATA); @@ -213,20 +211,15 @@ ste_mii_sync(sc) MII_CLR(STE_PHYCTL_MCLK); DELAY(1); } - - return; } /* * Clock a series of bits through the MII. */ static void -ste_mii_send(sc, bits, cnt) - struct ste_softc *sc; - u_int32_t bits; - int cnt; +ste_mii_send(struct ste_softc *sc, uint32_t bits, int cnt) { - int i; + int i; MII_CLR(STE_PHYCTL_MCLK); @@ -247,12 +240,9 @@ ste_mii_send(sc, bits, cnt) * Read an PHY register through the MII. */ static int -ste_mii_readreg(sc, frame) - struct ste_softc *sc; - struct ste_mii_frame *frame; - +ste_mii_readreg(struct ste_softc *sc, struct ste_mii_frame *frame) { - int i, ack; + int i, ack; /* * Set up frame for RX. @@ -261,7 +251,7 @@ ste_mii_readreg(sc, frame) frame->mii_opcode = STE_MII_READOP; frame->mii_turnaround = 0; frame->mii_data = 0; - + CSR_WRITE_2(sc, STE_PHYCTL, 0); /* * Turn on data xmit. @@ -299,7 +289,7 @@ ste_mii_readreg(sc, frame) * need to clock through 16 cycles to keep the PHY(s) in sync. */ if (ack) { - for(i = 0; i < 16; i++) { + for (i = 0; i < 16; i++) { MII_CLR(STE_PHYCTL_MCLK); DELAY(1); MII_SET(STE_PHYCTL_MCLK); @@ -328,18 +318,15 @@ fail: DELAY(1); if (ack) - return(1); - return(0); + return (1); + return (0); } /* * Write to a PHY register through the MII. */ static int -ste_mii_writereg(sc, frame) - struct ste_softc *sc; - struct ste_mii_frame *frame; - +ste_mii_writereg(struct ste_softc *sc, struct ste_mii_frame *frame) { /* @@ -349,7 +336,7 @@ ste_mii_writereg(sc, frame) frame->mii_stdelim = STE_MII_STARTDELIM; frame->mii_opcode = STE_MII_WRITEOP; frame->mii_turnaround = STE_MII_TURNAROUND; - + /* * Turn on data output. */ @@ -375,16 +362,14 @@ ste_mii_writereg(sc, frame) */ MII_CLR(STE_PHYCTL_MDIR); - return(0); + return (0); } static int -ste_miibus_readreg(dev, phy, reg) - device_t dev; - int phy, reg; +ste_miibus_readreg(device_t dev, int phy, int reg) { - struct ste_softc *sc; - struct ste_mii_frame frame; + struct ste_softc *sc; + struct ste_mii_frame frame; sc = device_get_softc(dev); @@ -397,16 +382,14 @@ ste_miibus_readreg(dev, phy, reg) frame.mii_regaddr = reg; ste_mii_readreg(sc, &frame); - return(frame.mii_data); + return (frame.mii_data); } static int -ste_miibus_writereg(dev, phy, reg, data) - device_t dev; - int phy, reg, data; +ste_miibus_writereg(device_t dev, int phy, int reg, int data) { - struct ste_softc *sc; - struct ste_mii_frame frame; + struct ste_softc *sc; + struct ste_mii_frame frame; sc = device_get_softc(dev); bzero((char *)&frame, sizeof(frame)); @@ -417,15 +400,14 @@ ste_miibus_writereg(dev, phy, reg, data) ste_mii_writereg(sc, &frame); - return(0); + return (0); } static void -ste_miibus_statchg(dev) - device_t dev; +ste_miibus_statchg(device_t dev) { - struct ste_softc *sc; - struct mii_data *mii; + struct ste_softc *sc; + struct mii_data *mii; sc = device_get_softc(dev); @@ -436,30 +418,26 @@ ste_miibus_statchg(dev) } else { STE_CLRBIT2(sc, STE_MACCTL0, STE_MACCTL0_FULLDUPLEX); } - - return; } - + static int -ste_ifmedia_upd(ifp) - struct ifnet *ifp; +ste_ifmedia_upd(struct ifnet *ifp) { - struct ste_softc *sc; + struct ste_softc *sc; sc = ifp->if_softc; STE_LOCK(sc); ste_ifmedia_upd_locked(ifp); STE_UNLOCK(sc); - return(0); + return (0); } static void -ste_ifmedia_upd_locked(ifp) - struct ifnet *ifp; +ste_ifmedia_upd_locked(struct ifnet *ifp) { - struct ste_softc *sc; - struct mii_data *mii; + struct ste_softc *sc; + struct mii_data *mii; sc = ifp->if_softc; STE_LOCK_ASSERT(sc); @@ -474,12 +452,10 @@ ste_ifmedia_upd_locked(ifp) } static void -ste_ifmedia_sts(ifp, ifmr) - struct ifnet *ifp; - struct ifmediareq *ifmr; +ste_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { - struct ste_softc *sc; - struct mii_data *mii; + struct ste_softc *sc; + struct mii_data *mii; sc = ifp->if_softc; mii = device_get_softc(sc->ste_miibus); @@ -489,15 +465,12 @@ ste_ifmedia_sts(ifp, ifmr) ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; STE_UNLOCK(sc); - - return; } static void -ste_wait(sc) - struct ste_softc *sc; +ste_wait(struct ste_softc *sc) { - register int i; + int i; for (i = 0; i < STE_TIMEOUT; i++) { if (!(CSR_READ_4(sc, STE_DMACTL) & STE_DMACTL_DMA_HALTINPROG)) @@ -506,8 +479,6 @@ ste_wait(sc) if (i == STE_TIMEOUT) device_printf(sc->ste_dev, "command never completed!\n"); - - return; } /* @@ -515,10 +486,9 @@ ste_wait(sc) * it a command. */ static int -ste_eeprom_wait(sc) - struct ste_softc *sc; +ste_eeprom_wait(struct ste_softc *sc) { - int i; + int i; DELAY(1000); @@ -531,10 +501,10 @@ ste_eeprom_wait(sc) if (i == 100) { device_printf(sc->ste_dev, "eeprom failed to come ready\n"); - return(1); + return (1); } - return(0); + return (0); } /* @@ -542,18 +512,13 @@ ste_eeprom_wait(sc) * data is stored in the EEPROM in network byte order. */ static int -ste_read_eeprom(sc, dest, off, cnt, swap) - struct ste_softc *sc; - caddr_t dest; - int off; - int cnt; - int swap; +ste_read_eeprom(struct ste_softc *sc, caddr_t dest, int off, int cnt, int swap) { - int err = 0, i; - u_int16_t word = 0, *ptr; + uint16_t word, *ptr; + int err = 0, i; if (ste_eeprom_wait(sc)) - return(1); + return (1); for (i = 0; i < cnt; i++) { CSR_WRITE_2(sc, STE_EEPROM_CTL, STE_EEOPCODE_READ | (off + i)); @@ -561,24 +526,23 @@ ste_read_eeprom(sc, dest, off, cnt, swap if (err) break; word = CSR_READ_2(sc, STE_EEPROM_DATA); - ptr = (u_int16_t *)(dest + (i * 2)); + ptr = (uint16_t *)(dest + (i * 2)); if (swap) *ptr = ntohs(word); else - *ptr = word; + *ptr = word; } - return(err ? 1 : 0); + return (err ? 1 : 0); } static void -ste_setmulti(sc) - struct ste_softc *sc; +ste_setmulti(struct ste_softc *sc) { - struct ifnet *ifp; - int h = 0; - u_int32_t hashes[2] = { 0, 0 }; - struct ifmultiaddr *ifma; + struct ifnet *ifp; + struct ifmultiaddr *ifma; + uint32_t hashes[2] = { 0, 0 }; + int h; ifp = sc->ste_ifp; if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { @@ -613,8 +577,6 @@ ste_setmulti(sc) CSR_WRITE_2(sc, STE_MAR3, (hashes[1] >> 16) & 0xFFFF); STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_ALLMULTI); STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_MULTIHASH); - - return; } #ifdef DEVICE_POLLING @@ -650,7 +612,7 @@ ste_poll_locked(struct ifnet *ifp, enum ste_start_locked(ifp); if (cmd == POLL_AND_CHECK_STATUS) { - u_int16_t status; + uint16_t status; status = CSR_READ_2(sc, STE_ISR_ACK); @@ -675,12 +637,11 @@ ste_poll_locked(struct ifnet *ifp, enum #endif /* DEVICE_POLLING */ static void -ste_intr(xsc) - void *xsc; +ste_intr(void *xsc) { - struct ste_softc *sc; - struct ifnet *ifp; - u_int16_t status; + struct ste_softc *sc; + struct ifnet *ifp; + uint16_t status; sc = xsc; STE_LOCK(sc); @@ -738,8 +699,6 @@ ste_intr(xsc) ste_start_locked(ifp); STE_UNLOCK(sc); - - return; } static void @@ -770,20 +729,19 @@ ste_rxeoc(struct ste_softc *sc) * the higher level protocols. */ static int -ste_rxeof(sc) - struct ste_softc *sc; +ste_rxeof(struct ste_softc *sc) { - struct mbuf *m; - struct ifnet *ifp; - struct ste_chain_onefrag *cur_rx; - int total_len = 0, count=0, rx_npkts = 0; - u_int32_t rxstat; + struct mbuf *m; + struct ifnet *ifp; + struct ste_chain_onefrag *cur_rx; + uint32_t rxstat; + int total_len = 0, count = 0, rx_npkts = 0; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; - while((rxstat = sc->ste_cdata.ste_rx_head->ste_ptr->ste_status) + while ((rxstat = sc->ste_cdata.ste_rx_head->ste_ptr->ste_status) & STE_RXSTAT_DMADONE) { #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) { @@ -824,7 +782,7 @@ ste_rxeof(sc) continue; } - /* No errors; receive the packet. */ + /* No errors; receive the packet. */ m = cur_rx->ste_mbuf; total_len = cur_rx->ste_ptr->ste_status & STE_RXSTAT_FRAMELEN; @@ -858,11 +816,10 @@ ste_rxeof(sc) } static void -ste_txeoc(sc) - struct ste_softc *sc; +ste_txeoc(struct ste_softc *sc) { - u_int8_t txstat; - struct ifnet *ifp; + struct ifnet *ifp; + uint8_t txstat; ifp = sc->ste_ifp; @@ -893,22 +850,19 @@ ste_txeoc(sc) ste_init_locked(sc); CSR_WRITE_2(sc, STE_TX_STATUS, txstat); } - - return; } static void -ste_txeof(sc) - struct ste_softc *sc; +ste_txeof(struct ste_softc *sc) { - struct ste_chain *cur_tx; - struct ifnet *ifp; - int idx; + struct ifnet *ifp; + struct ste_chain *cur_tx; + int idx; ifp = sc->ste_ifp; idx = sc->ste_cdata.ste_tx_cons; - while(idx != sc->ste_cdata.ste_tx_prod) { + while (idx != sc->ste_cdata.ste_tx_prod) { cur_tx = &sc->ste_cdata.ste_tx_chain[idx]; if (!(cur_tx->ste_ptr->ste_ctl & STE_TXCTL_DMADONE)) @@ -928,12 +882,11 @@ ste_txeof(sc) } static void -ste_stats_update(xsc) - void *xsc; +ste_stats_update(void *xsc) { - struct ste_softc *sc; - struct ifnet *ifp; - struct mii_data *mii; + struct ste_softc *sc; + struct ifnet *ifp; + struct mii_data *mii; sc = xsc; STE_LOCK_ASSERT(sc); @@ -963,8 +916,6 @@ ste_stats_update(xsc) if (sc->ste_timer > 0 && --sc->ste_timer == 0) ste_watchdog(sc); callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc); - - return; } @@ -973,14 +924,13 @@ ste_stats_update(xsc) * IDs against our list and return a device name if we find a match. */ static int -ste_probe(dev) - device_t dev; +ste_probe(device_t dev) { - struct ste_type *t; + struct ste_type *t; t = ste_devs; - while(t->ste_name != NULL) { + while (t->ste_name != NULL) { if ((pci_get_vendor(dev) == t->ste_vid) && (pci_get_device(dev) == t->ste_did)) { device_set_desc(dev, t->ste_name); @@ -989,7 +939,7 @@ ste_probe(dev) t++; } - return(ENXIO); + return (ENXIO); } /* @@ -997,13 +947,12 @@ ste_probe(dev) * setup and ethernet/BPF attach. */ static int -ste_attach(dev) - device_t dev; +ste_attach(device_t dev) { - struct ste_softc *sc; - struct ifnet *ifp; - int error = 0, rid; - u_char eaddr[6]; + struct ste_softc *sc; + struct ifnet *ifp; + u_char eaddr[6]; + int error = 0, rid; sc = device_get_softc(dev); sc->ste_dev = dev; @@ -1132,7 +1081,7 @@ fail: if (error) ste_detach(dev); - return(error); + return (error); } /* @@ -1143,11 +1092,10 @@ fail: * allocated. */ static int -ste_detach(dev) - device_t dev; +ste_detach(device_t dev) { - struct ste_softc *sc; - struct ifnet *ifp; + struct ste_softc *sc; + struct ifnet *ifp; sc = device_get_softc(dev); KASSERT(mtx_initialized(&sc->ste_mtx), ("ste mutex not initialized")); @@ -1187,25 +1135,22 @@ ste_detach(dev) mtx_destroy(&sc->ste_mtx); - return(0); + return (0); } static int -ste_newbuf(sc, c, m) - struct ste_softc *sc; - struct ste_chain_onefrag *c; - struct mbuf *m; +ste_newbuf(struct ste_softc *sc, struct ste_chain_onefrag *c, struct mbuf *m) { - struct mbuf *m_new = NULL; + struct mbuf *m_new = NULL; if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) - return(ENOBUFS); + return (ENOBUFS); MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); - return(ENOBUFS); + return (ENOBUFS); } m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; } else { @@ -1221,16 +1166,15 @@ ste_newbuf(sc, c, m) c->ste_ptr->ste_frag.ste_addr = vtophys(mtod(m_new, caddr_t)); c->ste_ptr->ste_frag.ste_len = (1536 + ETHER_VLAN_ENCAP_LEN) | STE_FRAG_LAST; - return(0); + return (0); } static int -ste_init_rx_list(sc) - struct ste_softc *sc; +ste_init_rx_list(struct ste_softc *sc) { - struct ste_chain_data *cd; - struct ste_list_data *ld; - int i; + struct ste_chain_data *cd; + struct ste_list_data *ld; + int i; cd = &sc->ste_cdata; ld = sc->ste_ldata; @@ -1238,7 +1182,7 @@ ste_init_rx_list(sc) for (i = 0; i < STE_RX_LIST_CNT; i++) { cd->ste_rx_chain[i].ste_ptr = &ld->ste_rx_list[i]; if (ste_newbuf(sc, &cd->ste_rx_chain[i], NULL) == ENOBUFS) - return(ENOBUFS); + return (ENOBUFS); if (i == (STE_RX_LIST_CNT - 1)) { cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[0]; @@ -1255,16 +1199,15 @@ ste_init_rx_list(sc) cd->ste_rx_head = &cd->ste_rx_chain[0]; - return(0); + return (0); } static void -ste_init_tx_list(sc) - struct ste_softc *sc; +ste_init_tx_list(struct ste_softc *sc) { - struct ste_chain_data *cd; - struct ste_list_data *ld; - int i; + struct ste_chain_data *cd; + struct ste_list_data *ld; + int i; cd = &sc->ste_cdata; ld = sc->ste_ldata; @@ -1283,15 +1226,12 @@ ste_init_tx_list(sc) cd->ste_tx_prod = 0; cd->ste_tx_cons = 0; - - return; } static void -ste_init(xsc) - void *xsc; +ste_init(void *xsc) { - struct ste_softc *sc; + struct ste_softc *sc; sc = xsc; STE_LOCK(sc); @@ -1300,11 +1240,10 @@ ste_init(xsc) } static void -ste_init_locked(sc) - struct ste_softc *sc; +ste_init_locked(struct ste_softc *sc) { - int i; - struct ifnet *ifp; + struct ifnet *ifp; + int i; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; @@ -1394,7 +1333,7 @@ ste_init_locked(sc) /* Disable interrupts if we are polling. */ if (ifp->if_capenable & IFCAP_POLLING) CSR_WRITE_2(sc, STE_IMR, 0); - else + else #endif /* Enable interrupts. */ CSR_WRITE_2(sc, STE_IMR, STE_INTRS); @@ -1408,16 +1347,13 @@ ste_init_locked(sc) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc); - - return; } static void -ste_stop(sc) - struct ste_softc *sc; +ste_stop(struct ste_softc *sc) { - int i; - struct ifnet *ifp; + struct ifnet *ifp; + int i; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; @@ -1432,8 +1368,8 @@ ste_stop(sc) STE_SETBIT2(sc, STE_DMACTL, STE_DMACTL_TXDMA_STALL); STE_SETBIT2(sc, STE_DMACTL, STE_DMACTL_RXDMA_STALL); ste_wait(sc); - /* - * Try really hard to stop the RX engine or under heavy RX + /* + * Try really hard to stop the RX engine or under heavy RX * data chip will write into de-allocated memory. */ ste_reset(sc); @@ -1455,15 +1391,12 @@ ste_stop(sc) } bzero(sc->ste_ldata, sizeof(struct ste_list_data)); - - return; } static void -ste_reset(sc) - struct ste_softc *sc; +ste_reset(struct ste_softc *sc) { - int i; + int i; STE_SETBIT4(sc, STE_ASICCTL, STE_ASICCTL_GLOBAL_RESET|STE_ASICCTL_RX_RESET| @@ -1481,25 +1414,20 @@ ste_reset(sc) if (i == STE_TIMEOUT) device_printf(sc->ste_dev, "global reset never completed\n"); - - return; } static int -ste_ioctl(ifp, command, data) - struct ifnet *ifp; - u_long command; - caddr_t data; -{ - struct ste_softc *sc; - struct ifreq *ifr; - struct mii_data *mii; - int error = 0; +ste_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +{ + struct ste_softc *sc; + struct ifreq *ifr; + struct mii_data *mii; + int error = 0; sc = ifp->if_softc; ifr = (struct ifreq *)data; - switch(command) { + switch (command) { case SIOCSIFFLAGS: STE_LOCK(sc); if (ifp->if_flags & IFF_UP) { @@ -1513,7 +1441,7 @@ ste_ioctl(ifp, command, data) sc->ste_if_flags & IFF_PROMISC) { STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_PROMISC); - } + } if (ifp->if_drv_flags & IFF_DRV_RUNNING && (ifp->if_flags ^ sc->ste_if_flags) & IFF_ALLMULTI) ste_setmulti(sc); @@ -1547,14 +1475,14 @@ ste_ioctl(ifp, command, data) !(ifp->if_capenable & IFCAP_POLLING)) { error = ether_poll_register(ste_poll, ifp); if (error) - return(error); + return (error); STE_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, STE_IMR, 0); ifp->if_capenable |= IFCAP_POLLING; STE_UNLOCK(sc); return (error); - + } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { @@ -1573,19 +1501,16 @@ ste_ioctl(ifp, command, data) break; } - return(error); + return (error); } static int -ste_encap(sc, c, m_head) - struct ste_softc *sc; - struct ste_chain *c; - struct mbuf *m_head; -{ - int frag = 0; - struct ste_frag *f = NULL; - struct mbuf *m; - struct ste_desc *d; +ste_encap(struct ste_softc *sc, struct ste_chain *c, struct mbuf *m_head) +{ + struct mbuf *m; + struct ste_desc *d; + struct ste_frag *f = NULL; + int frag = 0; d = c->ste_ptr; d->ste_ctl = 0; @@ -1623,14 +1548,13 @@ encap_retry: d->ste_frags[frag - 1].ste_len |= STE_FRAG_LAST; d->ste_ctl = 1; - return(0); + return (0); } static void -ste_start(ifp) - struct ifnet *ifp; +ste_start(struct ifnet *ifp) { - struct ste_softc *sc; + struct ste_softc *sc; sc = ifp->if_softc; STE_LOCK(sc); @@ -1639,13 +1563,12 @@ ste_start(ifp) } static void -ste_start_locked(ifp) - struct ifnet *ifp; +ste_start_locked(struct ifnet *ifp) { - struct ste_softc *sc; - struct mbuf *m_head = NULL; - struct ste_chain *cur_tx; - int idx; + struct ste_softc *sc; + struct ste_chain *cur_tx; + struct mbuf *m_head = NULL; + int idx; sc = ifp->if_softc; STE_LOCK_ASSERT(sc); @@ -1658,7 +1581,7 @@ ste_start_locked(ifp) idx = sc->ste_cdata.ste_tx_prod; - while(sc->ste_cdata.ste_tx_chain[idx].ste_mbuf == NULL) { + while (sc->ste_cdata.ste_tx_chain[idx].ste_mbuf == NULL) { /* * We cannot re-use the last (free) descriptor; * the chip may not have read its ste_next yet. @@ -1691,7 +1614,7 @@ ste_start_locked(ifp) /* Set TX polling interval to start TX engine */ CSR_WRITE_1(sc, STE_TX_DMAPOLL_PERIOD, 64); - + STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); ste_wait(sc); }else{ @@ -1712,14 +1635,12 @@ ste_start_locked(ifp) sc->ste_timer = 5; } sc->ste_cdata.ste_tx_prod = idx; - - return; } static void ste_watchdog(struct ste_softc *sc) { - struct ifnet *ifp; + struct ifnet *ifp; ifp = sc->ste_ifp; STE_LOCK_ASSERT(sc); @@ -1736,15 +1657,12 @@ ste_watchdog(struct ste_softc *sc) if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ste_start_locked(ifp); - - return; } static int -ste_shutdown(dev) - device_t dev; +ste_shutdown(device_t dev) { - struct ste_softc *sc; + struct ste_softc *sc; sc = device_get_softc(dev); Modified: stable/8/sys/dev/ste/if_stereg.h ============================================================================== --- stable/8/sys/dev/ste/if_stereg.h Thu Jan 14 20:40:37 2010 (r202298) +++ stable/8/sys/dev/ste/if_stereg.h Thu Jan 14 20:47:49 2010 (r202299) @@ -96,7 +96,7 @@ #define STE_LATE_COLLS 0x75 #define STE_MULTI_COLLS 0x76 -#define STE_SINGLE_COLLS 0x77 +#define STE_SINGLE_COLLS 0x77 #define STE_DMACTL_RXDMA_STOPPED 0x00000001 #define STE_DMACTL_TXDMA_CMPREQ 0x00000002 @@ -386,27 +386,27 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 20:58:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22CFE1065676; Thu, 14 Jan 2010 20:58:20 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11D058FC13; Thu, 14 Jan 2010 20:58:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EKwJBh044102; Thu, 14 Jan 2010 20:58:19 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EKwJbX044100; Thu, 14 Jan 2010 20:58:19 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001142058.o0EKwJbX044100@svn.freebsd.org> From: Andrew Gallatin Date: Thu, 14 Jan 2010 20:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202300 - stable/7/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 20:58:20 -0000 Author: gallatin Date: Thu Jan 14 20:58:19 2010 New Revision: 202300 URL: http://svn.freebsd.org/changeset/base/202300 Log: MFC 202119: Fix reporting of 10G Twinax media Modified: stable/7/sys/dev/mxge/if_mxge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/7/sys/dev/mxge/if_mxge.c Thu Jan 14 20:47:49 2010 (r202299) +++ stable/7/sys/dev/mxge/if_mxge.c Thu Jan 14 20:58:19 2010 (r202300) @@ -2588,6 +2588,7 @@ static struct mxge_media_type mxge_xfp_m }; static struct mxge_media_type mxge_sfp_media_types[] = { + {IFM_10G_TWINAX, 0, "10GBASE-Twinax"}, {0, (1 << 7), "Reserved"}, {IFM_10G_LRM, (1 << 6), "10GBASE-LRM"}, {IFM_10G_LR, (1 << 5), "10GBASE-LR"}, @@ -2722,7 +2723,7 @@ mxge_media_probe(mxge_softc_t *sc) if (mxge_verbose) device_printf(sc->dev, "%s:%s\n", cage_type, mxge_media_types[0].name); - mxge_set_media(sc, IFM_10G_CX4); + mxge_set_media(sc, mxge_media_types[0].flag); return; } for (i = 1; i < mxge_media_type_entries; i++) { From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 20:58:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64C0C106566C; Thu, 14 Jan 2010 20:58:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52EAF8FC0A; Thu, 14 Jan 2010 20:58:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EKwkk7044243; Thu, 14 Jan 2010 20:58:46 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EKwkPK044236; Thu, 14 Jan 2010 20:58:46 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001142058.o0EKwkPK044236@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 Jan 2010 20:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202301 - in head: . lib/libc/gen usr.bin usr.bin/wtmpcvt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 20:58:46 -0000 Author: ed Date: Thu Jan 14 20:58:45 2010 New Revision: 202301 URL: http://svn.freebsd.org/changeset/base/202301 Log: Add wtmpcvt(1). This utility allows users to convert their wtmp databases to the new format. It makes no sense for users to keep their wtmp log files if they are unable to view them. It basically copies ut_line into ut_id as well. This makes it possible for last(1) and ac(8) to match login records with their corresponding logout record. Added: head/usr.bin/wtmpcvt/ head/usr.bin/wtmpcvt/Makefile (contents, props changed) head/usr.bin/wtmpcvt/wtmpcvt.1 (contents, props changed) head/usr.bin/wtmpcvt/wtmpcvt.c (contents, props changed) Modified: head/UPDATING head/lib/libc/gen/getutxent.3 head/usr.bin/Makefile Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Jan 14 20:58:19 2010 (r202300) +++ head/UPDATING Thu Jan 14 20:58:45 2010 (r202301) @@ -37,7 +37,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. After the system has been upgraded, it is safe to remove the old log files (/var/run/utmp, /var/log/lastlog and /var/log/wtmp*), - assuming their contents is of no importance anymore. + assuming their contents is of no importance anymore. Old wtmp + databases can only be used by last(1) and ac(8) after they have + been converted to the new format using wtmpcvt(1). 20100108: Introduce the kernel thread "deadlock resolver" (which can be enabled Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Thu Jan 14 20:58:19 2010 (r202300) +++ head/lib/libc/gen/getutxent.3 Thu Jan 14 20:58:45 2010 (r202301) @@ -401,6 +401,7 @@ The file format is invalid. .Sh SEE ALSO .Xr last 1 , .Xr write 1 , +.Xr wtmpcvt 1 , .Xr getpid 2 , .Xr gettimeofday 2 , .Xr tty 4 , Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Thu Jan 14 20:58:19 2010 (r202300) +++ head/usr.bin/Makefile Thu Jan 14 20:58:45 2010 (r202301) @@ -225,6 +225,7 @@ SUBDIR= alias \ who \ whois \ write \ + wtmpcvt \ xargs \ xinstall \ ${_xlint} \ Added: head/usr.bin/wtmpcvt/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/wtmpcvt/Makefile Thu Jan 14 20:58:45 2010 (r202301) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +PROG= wtmpcvt + +.include Added: head/usr.bin/wtmpcvt/wtmpcvt.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/wtmpcvt/wtmpcvt.1 Thu Jan 14 20:58:45 2010 (r202301) @@ -0,0 +1,66 @@ +.\" Copyright (c) 2010 Ed Schouten +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 14, 2010 +.Os +.Dt WTMPCVT 1 +.Sh NAME +.Nm wtmpcvt +.Nd convert wtmp files to the utmpx format +.Sh SYNOPSIS +.Nm +.Ar input +.Ar output +.Sh DESCRIPTION +The +.Nm +utility converts traditional +.Pa wtmp +user accounting database files to the same format that is used by +.Pa /var/log/utx.log . +This makes it possible to view their contents using existing accouting +utilities, such as +.Xr last 1 +and +.Xr ac 8 . +.Sh SEE ALSO +.Xr last 1 , +.Xr getutxent 3 , +.Xr ac 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 9.0 . +.Sh BUGS +The application assumes the +.Ar input +file has the same byte order as the host system. +The +.Ar output +file can be used on any architecture. +.Sh AUTHORS +.An Ed Schouten Aq ed@FreeBSD.org Added: head/usr.bin/wtmpcvt/wtmpcvt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/wtmpcvt/wtmpcvt.c Thu Jan 14 20:58:45 2010 (r202301) @@ -0,0 +1,138 @@ +/*- + * Copyright (c) 2010 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "../../lib/libc/gen/utxdb.h" + +struct outmp { + char ut_line[8]; + char ut_user[16]; + char ut_host[16]; + int32_t ut_time; +}; + +static void +usage(void) +{ + + fprintf(stderr, "usage: wtmpcvt input output\n"); + exit(1); +} + +static void +outmp_to_futx(const struct outmp *ui, struct futx *uo) +{ + + memset(uo, 0, sizeof *uo); +#define COPY_STRING(field) do { \ + strncpy(uo->fu_ ## field, ui->ut_ ## field, \ + MIN(sizeof uo->fu_ ## field, sizeof ui->ut_ ## field)); \ +} while (0) +#define COPY_LINE_TO_ID() do { \ + strncpy(uo->fu_id, ui->ut_line, \ + MIN(sizeof uo->fu_id, sizeof ui->ut_line)); \ +} while (0) +#define MATCH(field, value) (strncmp(ui->ut_ ## field, (value), \ + sizeof(ui->ut_ ## field)) == 0) + if (MATCH(user, "reboot") && MATCH(line, "~")) + uo->fu_type = BOOT_TIME; + else if (MATCH(user, "date") && MATCH(line, "|")) + uo->fu_type = OLD_TIME; + else if (MATCH(user, "date") && MATCH(line, "{")) + uo->fu_type = NEW_TIME; + else if (MATCH(user, "shutdown") && MATCH(line, "~")) + uo->fu_type = SHUTDOWN_TIME; + else if (MATCH(user, "") && MATCH(host, "") && !MATCH(line, "")) { + uo->fu_type = DEAD_PROCESS; + COPY_LINE_TO_ID(); + } else if (!MATCH(user, "") && !MATCH(line, "") && ui->ut_time != 0) { + uo->fu_type = USER_PROCESS; + COPY_STRING(user); + COPY_STRING(line); + COPY_STRING(host); + COPY_LINE_TO_ID(); + } else { + uo->fu_type = EMPTY; + return; + } +#undef COPY_STRING +#undef COPY_LINE_TO_ID +#undef MATCH + + /* Timestamp conversion. XXX: Assumes host byte order! */ + uo->fu_tv = htobe64((uint64_t)ui->ut_time * 1000000); +} + +int +main(int argc, char *argv[]) +{ + FILE *in, *out; + struct outmp ui; + struct futx uo; + size_t l; + uint16_t lo; + + if (argc != 3) + usage(); + + /* Open files. */ + in = fopen(argv[1], "r"); + if (in == NULL) + err(1, argv[1]); + out = fopen(argv[2], "w"); + if (out == NULL) + err(1, argv[2]); + + /* Process entries. */ + while (fread(&ui, sizeof ui, 1, in) == 1) { + outmp_to_futx(&ui, &uo); + if (uo.fu_type == EMPTY) + continue; + + /* Write new entry to output file. */ + for (l = sizeof uo; l > 0 && + ((const char *)&uo)[l - 1] == '\0'; l--); + lo = htobe16(l); + fwrite(&lo, sizeof lo, 1, out); + fwrite(&uo, l, 1, out); + } + + fclose(in); + fclose(out); + return (0); +} From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 20:59:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84CCE10656AA; Thu, 14 Jan 2010 20:59:02 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73E7D8FC1F; Thu, 14 Jan 2010 20:59:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EKx2NB044314; Thu, 14 Jan 2010 20:59:02 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EKx2et044312; Thu, 14 Jan 2010 20:59:02 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001142059.o0EKx2et044312@svn.freebsd.org> From: Andrew Gallatin Date: Thu, 14 Jan 2010 20:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202302 - stable/8/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 20:59:02 -0000 Author: gallatin Date: Thu Jan 14 20:59:02 2010 New Revision: 202302 URL: http://svn.freebsd.org/changeset/base/202302 Log: MFC 202119: Fix reporting of 10G Twinax media Modified: stable/8/sys/dev/mxge/if_mxge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/8/sys/dev/mxge/if_mxge.c Thu Jan 14 20:58:45 2010 (r202301) +++ stable/8/sys/dev/mxge/if_mxge.c Thu Jan 14 20:59:02 2010 (r202302) @@ -2774,6 +2774,7 @@ static struct mxge_media_type mxge_xfp_m }; static struct mxge_media_type mxge_sfp_media_types[] = { + {IFM_10G_TWINAX, 0, "10GBASE-Twinax"}, {0, (1 << 7), "Reserved"}, {IFM_10G_LRM, (1 << 6), "10GBASE-LRM"}, {IFM_10G_LR, (1 << 5), "10GBASE-LR"}, @@ -2908,7 +2909,7 @@ mxge_media_probe(mxge_softc_t *sc) if (mxge_verbose) device_printf(sc->dev, "%s:%s\n", cage_type, mxge_media_types[0].name); - mxge_set_media(sc, IFM_10G_CX4); + mxge_set_media(sc, mxge_media_types[0].flag); return; } for (i = 1; i < mxge_media_type_entries; i++) { From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 21:06:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F396106566C; Thu, 14 Jan 2010 21:06:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id CF2218FC14; Thu, 14 Jan 2010 21:06:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0EKwWth014817; Thu, 14 Jan 2010 13:58:32 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 14 Jan 2010 13:59:30 -0700 (MST) Message-Id: <20100114.135930.80200584442733547.imp@bsdimp.com> To: rwatson@freebsd.org From: "M. Warner Losh" In-Reply-To: <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> References: <20100114.105622.457034909117828677.imp@bsdimp.com> <4B4F7810.2080003@FreeBSD.org> <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, dougb@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 21:06:55 -0000 In message: <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> "Robert N. M. Watson" writes: : : On 14 Jan 2010, at 20:01, Doug Barton wrote: : : > FWIW, I actually think this makes it worse, not better. The : > INCLUDE_CONFIG_FILE option should include everything needed to recreate : > the kernel. If it doesn't, it's worse than worthless, it leads to a : > false sense of security which makes it dangerous. I wasn't actually : > aware that if you do the config -C trick that you'll get ONLY the one : > file, not everything. : : (...more irritated words stripped like the comments in a config file...) : : I agree. I see two kinds of users: : : - Desktop/server users who want their system to work without any : special tuning or magic, and likely feel the comments they put in : configuration files are important : - Users who care a about a few hundred bytes of comments due to the : nature of their special embedded hardware target environment : : As such, I see a reasonable "default" -- i.e., i386/amd64 GENERIC -- : be to fully preserve the configuration and its comments. For the : embedded and appliance crowds, I definitely want them to be able to : fully exclude the configuration (by not including the option). I : don't see a lot of merit to supporting stripping the comments, but : if someone wants that special case, I'm OK with supporting it, but I : think it's an unuseful default for the desktop/server platforms. I think you are confusing two different things. The embedded folks omit this entirely. That's not the issue at all here. Space is not the concern. We're putting it into GENERIC. Why are there two ways? Because there are two points in the process one can squirt the data out of config. Let me explain (sorry for the length, but it is necessary to clear up the confusion): The first way is "preserve the FILE the user used to create the kernel" on the assumption that the FILE is what is important. This will preserve the comments, but assumes that every single included file from that file is recoverable in a trivial manner (eg, from cvs, svn, p4, release ISOs, etc). This model works well for the casual user. In this model, we're therefore able to preserve the kernel config by copying the file, verbatim, into the kernel. I think this is the model that best fits most user's needs, since they EITHER take GENERIC and hack on it (in which case we preserve all that), OR they include GENERIC and opt in/out of things based on that default. Either way, this is the best way for users of releases to preserve the data they need to recreate the kernel without losing data that's important to the user, but not config (comments, spacing, order, etc). The other way of preserving the config file is to say "I want EVERYTHING applied, and I want a copy of that!" To get that, you have to walk through config's internal data structures. By the time we get to *THAT* point in the processing, comments are but a distant memory. Those are discarded early, along with the variations in spacing, blank lines. By this point in the process, even the original ordering is long gone, as is the origin of each of the remaining items in config's internal data structures. However, the resulting config file that we generate here is GUARANTEED to recreate the same kernel from the same sources modulo any silly time/date/path stuff we encode. There's a class of user that would find this comforting, or essential, since they may have multiple include files that they control, etc. In addition, since the config is presented as a sysctl, users could query it to see if the kernel had certain things compiled in or not. For some applications, this is important to know, even though other methods usually work better. So it isn't that there's an option to just strip comments or not strip comments, these two different options save data at two radically different points in the process. Both have their pros and cons. If space isn't an issue, we could save BOTH. That would be a bigger patch, since we'd have to alter config to extract both kinds of data. All I did was to move the -C option from an obscure src.conf variable to be a full-fledged kernel option, leaving the rest of the infrastructure intact. The advantage is that we cover both bases and could export both views as a sysctl (right now we overload the two different views with one sysctl). Heck, we could save the whole src/sys tree as a tarball in a separate non-loadable ELF section if people that that was useful. This could be implemented entirely in the *.mk files, however, without the need to modify config(8). Warner From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 21:10:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1799106568B; Thu, 14 Jan 2010 21:10:36 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C08A88FC12; Thu, 14 Jan 2010 21:10:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ELAaCX046971; Thu, 14 Jan 2010 21:10:36 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ELAaDx046969; Thu, 14 Jan 2010 21:10:36 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001142110.o0ELAaDx046969@svn.freebsd.org> From: Andrew Gallatin Date: Thu, 14 Jan 2010 21:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202303 - stable/8/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 21:10:37 -0000 Author: gallatin Date: Thu Jan 14 21:10:36 2010 New Revision: 202303 URL: http://svn.freebsd.org/changeset/base/202303 Log: MFC r202121: Use better default RSS hash (src + dst, rather than just src port) Modified: stable/8/sys/dev/mxge/if_mxge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/8/sys/dev/mxge/if_mxge.c Thu Jan 14 20:59:02 2010 (r202302) +++ stable/8/sys/dev/mxge/if_mxge.c Thu Jan 14 21:10:36 2010 (r202303) @@ -104,7 +104,7 @@ static int mxge_verbose = 0; static int mxge_lro_cnt = 8; static int mxge_ticks; static int mxge_max_slices = 1; -static int mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; +static int mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_DST_PORT; static int mxge_always_promisc = 0; static int mxge_initial_mtu = ETHERMTU_JUMBO; static int mxge_throttle = 0; @@ -4175,7 +4175,7 @@ mxge_fetch_tunables(mxge_softc_t *sc) sc->pause = mxge_flow_control; if (mxge_rss_hash_type < MXGEFW_RSS_HASH_TYPE_IPV4 || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_MAX) { - mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; + mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_DST_PORT; } if (mxge_initial_mtu > ETHERMTU_JUMBO || mxge_initial_mtu < ETHER_MIN_LEN) From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 21:10:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C484A1065693; Thu, 14 Jan 2010 21:10:41 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B377C8FC14; Thu, 14 Jan 2010 21:10:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ELAfJM047039; Thu, 14 Jan 2010 21:10:41 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ELAffb047037; Thu, 14 Jan 2010 21:10:41 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001142110.o0ELAffb047037@svn.freebsd.org> From: Andrew Gallatin Date: Thu, 14 Jan 2010 21:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202304 - in stable/7/sys/dev: mxge ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 21:10:41 -0000 Author: gallatin Date: Thu Jan 14 21:10:41 2010 New Revision: 202304 URL: http://svn.freebsd.org/changeset/base/202304 Log: MFC r202121: Use better default RSS hash (src + dst, rather than just src port) Modified: stable/7/sys/dev/mxge/if_mxge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ste/if_ste.c (props changed) stable/7/sys/dev/ste/if_stereg.h (props changed) Modified: stable/7/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/7/sys/dev/mxge/if_mxge.c Thu Jan 14 21:10:36 2010 (r202303) +++ stable/7/sys/dev/mxge/if_mxge.c Thu Jan 14 21:10:41 2010 (r202304) @@ -97,7 +97,7 @@ static int mxge_verbose = 0; static int mxge_lro_cnt = 8; static int mxge_ticks; static int mxge_max_slices = 1; -static int mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; +static int mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_DST_PORT; static int mxge_always_promisc = 0; static int mxge_initial_mtu = ETHERMTU_JUMBO; static int mxge_throttle = 0; @@ -3907,7 +3907,7 @@ mxge_fetch_tunables(mxge_softc_t *sc) sc->pause = mxge_flow_control; if (mxge_rss_hash_type < MXGEFW_RSS_HASH_TYPE_IPV4 || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_MAX) { - mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; + mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_DST_PORT; } if (mxge_initial_mtu > ETHERMTU_JUMBO || mxge_initial_mtu < ETHER_MIN_LEN) From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 21:30:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB945106566B; Thu, 14 Jan 2010 21:30:06 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D4878FC17; Thu, 14 Jan 2010 21:30:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ELU6ja051401; Thu, 14 Jan 2010 21:30:06 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ELU6YU051398; Thu, 14 Jan 2010 21:30:06 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001142130.o0ELU6YU051398@svn.freebsd.org> From: Andrew Gallatin Date: Thu, 14 Jan 2010 21:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202305 - stable/8/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 21:30:07 -0000 Author: gallatin Date: Thu Jan 14 21:30:06 2010 New Revision: 202305 URL: http://svn.freebsd.org/changeset/base/202305 Log: MFC: r202120: Update mxge(4) firmware to 1.4.48b (latest available) from Myricom. Modified: stable/8/sys/dev/mxge/eth_z8e.h stable/8/sys/dev/mxge/ethp_z8e.h stable/8/sys/dev/mxge/rss_eth_z8e.h stable/8/sys/dev/mxge/rss_ethp_z8e.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mxge/eth_z8e.h ============================================================================== --- stable/8/sys/dev/mxge/eth_z8e.h Thu Jan 14 21:10:41 2010 (r202304) +++ stable/8/sys/dev/mxge/eth_z8e.h Thu Jan 14 21:30:06 2010 (r202305) @@ -28,7033 +28,7255 @@ POSSIBILITY OF SUCH DAMAGE. $FreeBSD$ ***************************************************************************/ -static unsigned int eth_z8e_uncompressed_length = 359956 ; -static unsigned int eth_z8e_length = 112403 ; -static unsigned char eth_z8e[112403 + 1] = - "\x78\x9c\xec\xbd\x7f\x7c\x54\xd5\xb5\x37\xbc\x72\x32\xc0\x24\x8d" - "\x4c\xc4\x48\x47\x44\x1d\x14\xda\xa8\x41\xa2\x62\x8b\x16\x24\x4a" - "\xb4\xd0\xcb\x8f\xa8\x60\xd3\x8a\x26\x68\x82\x41\x23\x44\x88\x10" - "\x30\x64\xc2\x80\x36\xa1\x40\x52\x49\x21\x40\x48\x62\x8b\x82\x2d" - "\x48\x04\xda\xe6\xf6\xa2\x8e\x25\xbe\x1f\x7a\x9b\x64\x62\x5f\xfa" - "\x1a\x7d\xb0\x1d\xb8\x91\xa6\x3c\x01\x46\x32\x90\x31\x99\x99\xfd" - "\x7c\xd7\xde\xe7\x24\x33\xc3\x04\xe5\xf6\x7e\xde\xe7\x9f\xe6\xf3" - "\x99\x9c\x73\xf6\xd9\x7b\xed\xb5\xd7\x5e\x7b\xed\xb5\xf6\x5e\x7b" - "\x1d\xa2\x7f\xe2\x4f\xdb\xd7\xf8\xcf\x14\xff\xd7\xdf\xbf\xfe\xfe" - "\xf5\xf7\xaf\xbf\x7f\xfd\xfd\xeb\xef\x5f\x7f\xff\x77\xfe\xce\x6b" - "\x26\xfa\x43\x25\x51\x8f\xc3\x6c\x75\xd3\xb9\xe2\xad\x9b\x85\x1f" - "\xc9\x31\x6e\x32\x5b\xf9\xaa\xff\xe8\x35\xa4\x6b\x95\x64\xbe\x39" - "\x91\x12\xa6\xed\x24\xaa\x1a\x29\xba\x36\x6f\x11\x9e\xb5\x5b\x44" - "\x57\xfa\x1b\x44\x4d\x63\x89\x36\x8f\x14\x5e\xc0\x99\xef\xa6\x1f" - "\x75\x30\x9c\xb5\x78\xe6\xf7\xeb\x46\x0a\x0f\xd2\x0b\xdd\xf4\xe3" - "\xf9\x9c\xbe\x66\x24\x60\x25\x11\x39\xb6\x08\x5f\x08\x5c\x33\x97" - "\x67\x98\xe9\x63\x24\x3e\xbb\x22\xe0\x30\x8c\x46\xc0\x38\x76\x19" - "\x18\x09\x06\x5e\x5e\x8d\x62\x18\x5e\xb7\x83\xac\x5e\x87\xf3\x5a" - "\x94\xf5\xa2\x4d\xc9\x5c\xb6\x02\x79\x84\x83\x62\x9b\x8a\xfc\x64" - "\xbb\x99\x62\x4e\x51\xdc\x3f\x70\xd5\x70\xfd\x8c\xdb\xbb\x56\x95" - "\x1b\xcb\x30\x50\x36\xa6\xc7\x11\x97\xda\x5f\x16\xb0\x6d\x25\x64" - "\x42\xde\x77\xbc\x9a\x53\x53\x79\x13\xe3\xf4\xbc\x1a\xf2\xce\x37" - "\xf2\xaa\x77\xda\x0c\xfd\xdd\x37\xf0\xae\x28\xfc\x9d\xe9\x35\xfd" - "\x5d\x02\xde\x55\x45\xe0\x67\x72\xf5\xfa\x09\xf5\x30\x2e\x36\x37" - "\xae\x47\xd0\x33\x3a\x6e\x8c\x53\x13\xf2\x97\x72\xfe\x74\x9b\xf0" - "\xcf\xb5\x91\xc4\x85\x69\x87\xbc\xd3\x8f\xd4\xab\xbc\xb8\x1f\xcd" - "\xe5\xf5\x7b\x1b\xee\x65\xba\x5e\xef\xd5\x3d\x8e\xf8\x84\x70\x9c" - "\x88\xf4\x77\x23\xf0\x2e\x39\xfc\xdd\x7b\xa9\xfa\xbb\x6f\xe2\x5d" - "\x7a\xf8\xbb\x18\xa3\x9c\x15\xef\xb2\x8d\x77\xa1\xfd\xa4\x38\xce" - "\x84\xdf\x10\x33\xd1\x50\xfc\x86\x99\x8d\xbe\x5b\x66\x15\x41\xfb" - "\x75\x64\x12\xeb\xb7\x94\x05\x1d\x82\x5c\x45\x3e\xb2\x8d\x22\xfb" - "\x49\x8a\x6f\x03\x5c\xda\xb4\x8a\xcc\xf6\x02\xe1\x73\x15\x75\x51" - "\xab\xa7\x8b\xec\x1e\xd1\xe9\xf2\x5f\xa0\x92\x0b\x64\x76\xf9\xcf" - "\x50\xc9\x8b\x64\x6d\x2a\xfe\x9c\xa2\xf1\x45\x50\x13\x64\x1f\xcd" - "\x65\x3b\xa8\xb5\xa6\x83\xec\x35\xe1\x65\xed\x37\x90\xb5\x05\xcf" - "\xa0\xb9\x85\xf1\x68\xb2\xf9\xc9\x1f\xbf\xa5\xac\x78\x1b\x99\xec" - "\x63\x48\x6b\xc9\x71\xea\xb8\x7c\xa3\x9a\x71\x59\x77\x9a\xcc\xbf" - "\x5c\x88\xbe\x3f\xcd\xf8\xd6\x96\xed\x5f\xe5\xd3\x8e\x58\x67\xd2" - "\x11\xeb\x71\x6a\xb2\x4e\xa1\xa6\xa2\x74\xda\x74\x9a\x12\x8e\xf8" - "\x26\x53\x93\xe9\x61\x8c\x8d\x74\x72\x75\xe1\xde\x16\x40\x1e\x2f" - "\xd9\x96\x13\xfa\xf5\x1b\x65\x55\xcf\x91\xd9\xad\x60\xa2\x3f\xbf" - "\x51\xf5\x41\x21\x11\xd3\x8c\x9f\xa3\xb5\x63\xd9\x75\x64\x05\x7e" - "\x9d\xc0\xe5\x5e\xe0\xd2\x32\xd6\x4a\xa9\xc0\x79\x98\xab\xda\x4f" - "\xa6\x62\x8a\x1b\x64\x4c\x24\x05\x1d\x72\x6c\x76\xd5\x6e\x11\x9d" - "\xcc\x5b\xdd\x2f\x67\x62\x7c\x25\x98\x50\xf7\x2e\xae\x6f\x13\xc6" - "\xa8\xfd\x75\x32\x75\xaf\xc8\x8c\xa9\xdb\x22\x3a\xf0\xce\x66\xbc" - "\x03\xbf\x77\xe0\x7d\xe7\x84\x24\x4a\x74\xf9\xd3\xe8\xfd\xde\x4e" - "\x13\xc3\x18\xee\xa5\x18\x86\x67\x29\xa2\x58\xb4\x67\x08\xf0\xf9" - "\xa2\x0e\xe9\xb7\x20\x1f\xca\xa3\xff\xd7\xef\xe1\xf2\xe2\x9b\x4f" - "\x78\x83\xdf\x7c\xe2\x42\x70\xeb\x13\xdd\x62\xeb\x13\xe7\x03\x5b" - "\x9f\xf8\xc2\xbe\x92\xcc\x81\x6f\x3e\xe1\x69\x2d\x90\x7d\x90\xd8" - "\x5a\x80\x3e\x08\x90\x79\xf5\x19\x4a\x7c\xea\x45\xf4\xbd\xff\x33" - "\x5a\xbd\x88\xac\xc1\xb8\x9d\x69\x2e\xff\x5f\xe8\xa9\x62\x12\xb8" - "\xcf\x88\xd6\xbe\xee\xf8\xda\xa3\x8a\x67\xcd\xdc\xa6\x76\xb7\xf6" - "\x73\x39\x26\x3c\x71\x6f\x1e\xc5\xaf\x19\xbf\x36\xfc\x8e\x89\xf8" - "\xda\x63\xa0\x95\x7d\xf8\x9a\x18\xaa\xed\x25\x9a\x10\xa4\x18\x74" - "\x91\x17\xf8\x27\x0e\x42\xb7\xd1\xc1\xf5\xef\x54\x7e\xbb\x94\x4a" - "\x7a\x7a\xf2\x88\x65\x0a\xcb\x13\x96\x2f\x3d\x8e\xab\xd2\x50\x8f" - "\x53\xf2\xfe\x16\xe1\x15\xf1\xef\x54\x22\xbd\xd3\xfb\x72\x5e\x8c" - "\xe7\xe5\x3c\xad\x3b\xfe\x9d\xcd\xc8\x93\x83\x3c\x3e\x9d\x86\x9d" - "\x0c\x0b\xe3\xc4\x73\x95\x9f\x62\x01\xb3\xe0\x77\x17\xdb\x4d\x3b" - "\xb7\x88\xe3\xc8\xb7\xa1\x1f\x16\x60\x03\x0e\xe8\x7f\x55\xbd\x91" - "\x06\x5a\x77\x6c\x44\x3e\x2e\xef\xf2\xa5\xb1\xdc\x75\xbb\xf2\x3b" - "\xc9\xe2\xa7\x78\xd1\xa7\xea\x43\x9e\x4e\x96\x8f\x57\xf9\x68\x68" - "\x8f\x83\x32\x18\x36\x97\x73\x75\x75\x12\xca\x6d\x16\xf6\x3c\xc8" - "\x25\x9a\xdd\x23\xf2\x62\x20\x8b\x3b\x8e\xa0\xbc\xaa\x7b\xb8\xd9" - "\xc0\x91\xeb\xe0\xbe\x96\x78\x82\x1f\x8e\xe4\xfb\xe8\xaa\x6a\x8a" - "\x45\xb9\xc7\x18\x1e\xc3\x02\x1f\xb8\xd1\xd6\xcd\x47\xf2\x3d\x14" - "\x14\x61\x30\xdd\x3a\xbc\xcc\x30\x78\x48\x17\x80\xc7\xfc\xd7\x84" - "\x32\x57\xd5\x4b\x78\x8f\xfe\x2e\xc8\xf0\x7c\x64\xb2\x49\x7c\x1f" - "\x67\x18\x3d\x2c\xd3\x00\xd3\xb9\xfc\x41\xea\xa2\xe1\x4e\x8f\x3d" - "\x2f\xb6\xb5\x98\x88\xcb\xef\x2f\xe9\x1c\x22\xba\x33\x63\x99\xe7" - "\xf8\xbd\xcb\x7f\x9e\xf3\xbc\x2e\xba\xf3\x62\xaf\xea\x22\x13\xe3" - "\x8c\xf2\x45\x8c\x67\x68\x5f\x3e\xfa\xd0\xe3\x53\xe8\xf1\xf4\x19" - "\xe9\x53\x68\xd6\x03\xd3\xa6\x50\xea\xbd\xe3\x53\xef\xfe\xee\xa4" - "\xbb\x29\xe3\x87\x8f\x4e\xa1\x8c\xd9\x53\xe8\x31\xfc\x32\x1f\x9e" - "\x81\x87\x69\x53\xee\x4c\xfd\xfe\xf8\x8c\x69\x33\x1e\xa2\x47\xe6" - "\xde\x95\x7a\xd7\x5d\xf4\xc0\x43\x33\xef\x4c\x4d\xd5\xaf\x77\xa6" - "\x72\x96\x1f\x4f\x7a\xe8\xb1\xf1\x19\x4b\x97\x14\x2e\x19\x3f\x7b" - "\xc6\xb4\xd0\x39\x31\x39\x70\x31\xc8\x34\xf5\x8a\x73\xd3\x29\x08" - "\x19\x51\x8b\xbe\xc6\xaf\xcb\x59\x72\x12\x63\x3d\x71\x75\x2d\xf7" - "\x91\x94\x93\xc3\x8f\x63\x7c\x9b\x7a\x1c\x96\x75\x6e\x6d\xcb\x24" - "\xa6\x15\xe6\x1e\xe4\xb9\x76\x01\xde\x9d\xd0\x65\xf3\x10\xbc\xdf" - "\x15\xfe\xfe\xea\x22\xbc\xff\x7b\xab\x8d\xc8\x85\x1f\xe8\xeb\x85" - "\xcc\x03\x1d\x3d\xd4\x6d\xcf\x1c\x02\x3e\x8e\x41\x1d\x1d\x18\x83" - "\x6d\x28\xeb\x0e\x19\xdb\x1d\xe8\x87\x36\xdb\x2a\x8a\x3d\x4b\x96" - "\x7f\x6f\x2d\x4c\x23\xee\x0f\x57\xa1\x0e\xe3\x42\x3f\x8c\x78\x09" - "\x03\x7d\x0c\x38\xc7\x14\x9c\xc4\xe4\x10\x39\xe0\x66\x38\x9b\xf0" - "\x4e\x87\x15\x68\x85\x3c\x80\xbc\x7e\x2d\x68\x4f\x26\x11\xbf\xa5" - "\x32\xd8\x97\x2c\xe7\x16\x94\xcb\x36\xf8\x17\xf9\xbd\x4d\x05\xc8" - "\xf7\xcb\xe9\x31\xe8\xef\x18\xcc\x9d\x68\x8b\x25\x1f\x7c\xec\x0d" - "\xae\x7f\xb3\x5d\xf4\x64\x92\x4a\x4b\xdc\x2b\xe2\xf1\xbc\xfe\xcd" - "\x4f\x84\x1d\x69\xab\x64\xda\x3e\x4e\x43\xdf\xc6\xf2\x18\x14\x2f" - "\xcb\xf4\x58\xd0\x62\x0c\xf0\x6b\x0f\x70\xf9\x73\xb2\xfc\x30\xa4" - "\xc5\x20\xef\x27\xc1\xf8\x37\x3f\x05\xaf\x70\x1a\xe6\xf3\x6b\x4b" - "\x01\xef\x7f\x05\x45\x26\x09\xf3\xf9\x46\xdc\x1f\x77\xae\xea\xa2" - "\x53\x05\xa4\xb9\xf1\x2e\x68\x07\xcc\xbe\xfe\xfa\xdb\xb8\x2c\xea" - "\x32\xf5\xf4\xe5\x61\x0e\x4d\x3c\xc6\xba\x40\x80\xf1\x39\xd7\x9f" - "\xc7\xc9\x75\xf2\x38\x46\x5f\x74\xa1\x9f\xe2\x7a\x1c\x57\xcf\x8c" - "\xe8\xa7\x1c\xc0\xf9\x04\x74\x6f\x07\x8c\xc3\xc1\x6e\xd4\x81\x67" - "\xc0\xd5\x74\xb8\x06\x0c\xaf\xe2\x83\xab\x37\x44\xf0\xc1\x43\x80" - "\x7d\x21\xe4\xfd\xde\x88\xf7\xb7\xe2\x7d\xaf\xfe\x1e\xe3\xe9\xea" - "\xe6\x88\xfa\x3b\xf1\x3e\x88\xfa\xbd\x18\x2f\xb1\xa8\x2f\xa3\x96" - "\xf5\xb4\x81\xfc\xfe\xf0\xfc\x23\xac\xdd\x0e\x0b\xcb\x10\x96\x85" - "\x32\x7f\x9d\xce\xab\xaa\xfe\x11\x29\x11\xf9\xc1\xc3\x96\x61\xe0" - "\x07\xbe\x5e\x83\x3c\xc3\x20\x8b\x4c\x98\x37\x8e\x1f\x29\x66\xbd" - "\x6d\xc4\xfc\x88\xfc\xc5\xc8\x37\x8a\xe9\x28\x69\x70\x4e\xd2\x20" - "\x43\xd7\xb3\x78\x2c\x98\x51\xa6\x32\xa2\x4c\x03\xca\xdc\x1c\x54" - "\x74\x8b\xed\xe9\x8e\x5a\xa6\x29\xa2\x4c\x87\xec\x7f\x55\x8f\x89" - "\xf9\xc5\x28\x23\x65\x4b\x5f\x18\x0c\x6e\x1b\xf4\xb1\x6b\xcc\xe1" - "\x30\x92\x3a\x50\xef\x6d\x1b\xd5\x38\xfe\x06\xfa\xfc\x2e\xa4\xfd" - "\x05\x70\x3f\x63\x3e\x61\x5e\x76\x79\x7c\x90\x7d\xd3\x13\xd4\x1c" - "\x7e\xcd\x22\x4b\x31\xf1\xfd\x78\xbe\x67\xd8\xa2\x6f\xa6\xce\xe3" - "\xd7\x2c\xc2\x95\xd3\x65\x9d\x3c\xb6\x44\xdf\xbf\x05\x15\xcc\x6b" - "\x36\x62\x0c\x6a\x78\x0e\xe8\x75\xb4\xe0\x39\x06\xfc\xf9\x29\xe4" - "\x2a\x78\x72\x3a\xf3\xdb\x44\xa4\x7f\xa8\xbf\x7f\x97\xf3\xe3\xfe" - "\x4e\xfd\x9e\xf9\xf2\x53\x9d\x2f\xc1\xe7\x49\xbf\x91\x75\x4b\x5e" - "\x57\xe5\x83\x8a\xaf\xa7\xe1\xdd\xeb\xb8\xce\xc0\x75\x23\xae\x8f" - "\xe0\xba\xc8\x7e\x81\xac\xf6\x00\xf4\x08\xf5\x3c\x0f\xd7\x47\x71" - "\x7d\x00\xd7\xc7\x70\x1d\xcf\xe3\xd2\xb3\x22\x8f\x22\x78\xa2\x2b" - "\xa8\xc6\xe2\x30\xd5\x1f\x49\xa3\xf5\xf1\xa1\xc6\xe7\xb9\x81\x34" - "\xa1\xd2\x34\xc8\xf3\x81\xb4\xbe\xe9\x4c\x97\x0c\xb4\xdd\xc7\xf5" - "\xeb\xe3\x7a\x88\xea\x17\x95\x27\xa8\xca\xe9\x7d\xa7\xa7\xa9\x7c" - "\x31\xa1\x75\xba\xe9\x9a\xe6\x12\xaf\x10\xb8\x36\x32\x5d\x91\x7e" - "\x18\x34\x81\x3e\x73\xcd\x06\xa6\xd3\x40\x7f\x5f\x93\x1c\xd2\xdf" - "\xd0\x67\x93\x7c\xe1\xfd\x9d\x98\xc1\x34\xe3\xfe\x36\xf0\x65\xdc" - "\x31\xa7\xf0\x3c\x35\x54\xe1\x9f\x98\x01\xb9\xde\xc5\x7d\x1f\x5b" - "\xc0\xe3\xe1\xda\xc9\x6e\xda\x25\x65\x22\xbf\xf3\xc6\x1d\x48\xe4" - "\xf2\xb1\xf9\xf2\x5d\x26\xe4\x65\xbb\xf1\x8e\xeb\xe6\x71\x18\x5b" - "\x28\xdf\x15\x1a\xe5\x20\x33\x1b\x64\x59\xcc\x71\x3c\xe7\xf3\xdc" - "\x8d\x39\xb4\x13\x79\xaa\xdd\x74\x55\xe2\x60\xf6\x8d\x28\xdb\x52" - "\x3f\xbe\x94\xb4\x5b\x4a\x69\x88\xcb\x7f\x9c\xe6\xf8\x45\x60\x3c" - "\x51\x9c\xcb\x3f\x99\x6e\x25\xba\xda\xe5\x3f\x46\x68\xf0\x18\x97" - "\xbf\x0a\x73\xe4\x3a\x7e\xff\xfe\x6d\x14\x13\x83\xab\xfd\x76\xd2" - "\x62\x5c\xfe\x5d\x48\x3f\x44\xb7\x90\x29\xe6\xfb\x43\x44\x8f\xcb" - "\x3f\x11\xcf\x85\xf4\xf0\x10\xf1\xb7\xac\x00\x25\xce\x7c\x45\xd8" - "\x5d\xfe\x1c\x7a\xf8\x95\xa0\x70\xf9\x9b\xf1\x2e\x9f\xe6\x04\xbe" - "\x14\x73\x02\x3d\x42\x98\xb7\x34\xcc\x09\x9c\xc3\xfd\xdf\x04\x68" - "\x89\xeb\xfb\xf8\xd9\x85\x0b\xba\xae\x28\xdf\x52\x9f\xb5\x52\xa3" - "\x3e\xcc\x2b\x22\x6e\x4b\x03\xda\xe7\xec\x13\x79\xb1\x98\x13\xde" - "\xef\xeb\xc3\x75\xfd\x96\xf7\xe4\x73\xd9\x96\x36\xc0\x71\xde\x01" - "\xc5\x9f\xf1\x77\xf9\x3b\x28\x0b\xb2\x63\xce\x4a\x8f\x60\xdc\x87" - "\xaf\x11\x34\x67\xe5\xfb\x02\x72\xcb\x32\x67\xa5\x5d\xe0\x9d\x19" - "\xf0\x9c\x2e\x7f\x17\xd7\xd1\x06\x78\x2d\x12\x5e\xd9\x16\x0f\xf2" - "\x7a\x38\x5f\x28\x1c\x86\xc1\x79\xe7\x04\xc8\x82\xfc\x9e\xbe\xf2" - "\x2d\xee\xbe\xf2\xad\x84\x5f\xaa\x88\xdf\xfa\x60\xd0\x91\xf4\x01" - "\xcf\x51\xa2\x6c\x6b\x06\x9e\xb3\xbf\x04\x9f\x48\x3a\x06\x68\x98" - "\x28\xdf\x9a\x81\x3e\x4f\xef\x91\xf8\x6e\x2d\x95\xf8\xae\xdf\x6a" - "\xff\x52\xb6\x63\x6b\x89\x6a\xc7\xd6\xd5\x9c\xee\x05\xdf\xe2\xbe" - "\xde\xab\xde\xd5\xa1\xdc\x5c\x59\xae\x6c\x6b\xbd\x30\x6f\x6d\x00" - "\x0f\xc6\xce\x09\x88\x52\xa6\x21\xe8\x5a\xca\x74\x64\xbb\x05\x75" - "\xd4\x8b\xb8\xad\x0d\xc0\xc7\x89\xf2\x7f\xee\x13\x3c\x6f\x6e\x75" - "\x7f\xa9\x60\xff\x0d\x70\xe6\xf7\x30\x4c\xf3\x56\x37\x60\x79\xfc" - "\x9a\x0d\xf4\x10\xbe\x39\xfe\x35\xfe\xac\x95\x14\xeb\xf2\x7f\x48" - "\xc9\xa5\xa5\x31\xae\xa2\x42\xb4\x73\x03\x60\xe6\xe0\x3d\x5d\x83" - "\xba\xde\x07\x5c\x37\xd7\x87\x3a\x3c\x80\x79\x06\xb0\x72\x18\xa7" - "\x5e\x07\x25\x8a\xf8\x6a\xea\x95\xf8\x55\xdb\x82\x65\xd5\x69\x41" - "\x73\x75\xaa\xc1\x3f\xcc\x3b\x8a\x6e\xcc\x33\xfb\x38\x2d\xd1\xe0" - "\x93\x40\x59\x75\xe2\xed\x44\x89\xb3\xbd\xc2\xcf\xbc\x32\x81\x0a" - "\x62\x5a\xbd\xc7\x40\x6b\x33\xb5\x16\x1c\xa2\xdb\x88\xed\x27\x2f" - "\xb5\x7a\xab\xf0\xbc\x93\x18\xbf\x56\xef\x3a\x6a\xe9\xda\x45\xb3" - "\x0b\xbc\x6b\x02\xe6\xea\xca\x96\xae\x59\x84\xf2\xef\x03\xc7\xe0" - "\x53\x05\xa6\xd2\xd6\x02\x2f\x3f\xdb\x5b\xba\xc0\x9f\x01\x11\xf0" - "\x97\x55\x93\xdf\x5c\x5d\x3f\xfb\x82\xf0\xcc\xea\x2a\x1d\x82\xb4" - "\x3e\x4b\x8c\xf0\x5b\x8a\xec\xa2\xa5\x6b\x03\x3d\x75\x81\x62\x5a" - "\xf2\x0e\x49\x3e\x7d\xaa\xa0\x80\x64\xf9\x0b\x7e\xcb\x93\x5d\xa5" - "\xf4\x64\x1e\x0d\x47\xfe\x73\xcc\xb3\x62\x78\x29\x35\x77\xe4\xd3" - "\xac\x33\xfe\xd8\xd9\x17\xfa\x44\x73\x76\x15\xb5\xe4\x55\x81\x1e" - "\xd5\x36\xb6\x33\x66\x9d\xe9\x16\xb3\x2f\xf4\x88\x96\xbc\x7d\xd4" - "\x9c\x7d\x88\x66\x7e\xee\xb4\x04\xca\xab\x13\x83\x71\xd5\xa9\xc1" - "\xf2\xea\xb4\x40\x5c\x75\xa5\xbf\x1c\xb8\xc4\x55\xd7\x8b\xf5\xdb" - "\x60\xc3\x60\x6e\x97\xfd\xbb\x6d\x38\xee\x6d\xb2\x7f\xcd\xdb\x6c" - "\xa2\x6c\x5b\x5a\x5f\xf9\xb6\x54\xc9\xf7\x71\xdb\x6c\x2e\x3f\xf3" - "\xff\xb6\x34\xe4\x4b\x53\x3c\xb2\x2d\x43\xf1\xfe\xb6\x39\xdc\xaf" - "\xc8\x9b\x8d\x5f\x01\x7e\xd0\x45\xb6\x41\xa7\xa2\xab\x19\x6e\xb0" - "\x6c\x9b\x3b\x68\xde\x86\xf1\xb0\xcd\x03\xbb\x44\x6b\xf5\xee\xa2" - "\x00\x64\x6b\xab\x37\x40\xb3\x5f\xf4\xa1\x6f\xd1\x07\x45\x01\xd0" - "\xf3\x38\x3d\xf5\x22\xd9\x5d\x45\xc7\x49\xbc\x57\xc9\xf4\xb0\xcc" - "\x7e\xf1\x7d\x11\x2c\xdf\xe6\xe6\xf7\xb3\x5f\xb4\xc3\x36\x02\x9c" - "\xb8\x6d\x9e\xe0\xfa\xed\x89\xba\xae\x04\x3c\xb6\x5b\x18\x8f\xbe" - "\x1e\xf0\x18\xe6\x71\x11\xb7\xdd\x86\xb4\xd7\x78\xee\x08\x32\xdf" - "\x95\x6d\xaf\x14\xe6\xed\x9e\x59\x43\x84\x27\xf0\x2a\x49\x1e\x08" - "\xde\x2f\x04\xdb\x5e\x59\x45\x54\x2f\xc7\x54\x60\x54\x29\xca\x79" - "\x44\xf9\xf6\xca\xe0\xfa\x9d\x77\x01\x4e\xac\x58\xc1\x65\x77\xa6" - "\x2a\x9e\xf9\x4c\x8e\x3d\x51\xbe\x33\xf5\xeb\xda\xf9\x3d\x8e\x51" - "\xc5\x6e\x7a\x3b\x93\x65\x1c\xee\xcb\xdc\xb4\x3f\x45\xbf\xaf\x72" - "\x53\xd5\x71\x29\x1f\x21\xe7\x0a\x4a\xe8\xda\xd3\x74\xfd\x74\xd0" - "\x84\x70\x9f\x80\xfb\x99\x73\x6e\x45\xbb\xcb\x3e\xeb\x44\x9f\xf7" - "\xb0\xcc\x11\x8e\x89\xd0\x37\x28\x0d\xed\x35\x8b\x9e\xe4\x04\x11" - "\xbf\x7b\xa1\xe8\xb3\xb2\x2d\x69\xc1\xf3\x70\xd0\x75\x2c\xae\x23" - "\x76\x5e\xa4\x24\xfc\xac\x3b\x1d\xc1\x52\x96\xc9\xb8\x4f\x15\x2b" - "\xac\xf1\x9b\x96\x53\x8a\xc5\x4b\xe6\x3a\x47\x30\xd3\xb2\x26\x91" - "\x6d\xaa\x24\xbe\x17\x8e\x6d\x54\x77\x91\x4c\x3c\xb7\x04\xe3\x50" - "\x5f\x91\x45\x88\x65\xc9\x54\xb7\x14\xf2\xc8\x41\xd6\x3a\x87\x68" - "\x08\xf4\x24\x6b\x8c\xa7\x81\x0b\xe3\x06\x3c\x6f\x00\x9e\xf3\xe7" - "\xad\x4c\xa3\x0f\x8b\x28\xea\x5a\x44\x8f\xe3\xfa\xfe\xf6\x0f\xf2" - "\xbe\xc6\xa0\xc9\x20\xef\x0f\x1b\x74\x1a\xcc\xde\xe7\x71\x1e\xb8" - "\x28\x3c\x15\x8b\x89\x69\x61\xb5\xfb\xc5\x7f\xc1\x26\x29\x2d\x09" - "\xd0\x0d\x73\x56\xde\x24\x5c\x1e\xe1\x74\x15\x9d\x91\xeb\x75\x75" - "\xc8\x53\xe2\x17\x41\xb6\x6f\xd9\xb6\xad\x62\x5b\xb5\x7c\xf7\x74" - "\x51\xbe\x3b\xbd\x7b\xb9\xf0\xd7\x4a\x7b\x74\x74\xaa\x9b\xee\x29" - "\x50\x7d\x53\x6d\xc3\x5c\xd8\xd1\x6d\xde\x9d\x0e\xd8\x57\x33\xec" - "\xd6\x02\xe1\x0c\xc6\xed\x9e\x89\x7c\x98\xff\x7e\x5f\x19\xba\x66" - "\x87\x79\xad\x6b\xdd\x16\x9e\xdb\x46\x63\xfe\xbb\x69\xee\x25\x6b" - "\x42\x72\x75\x91\xd0\x2f\xb6\x81\x45\xc9\x18\x9d\x7d\x8c\xbf\x44" - "\xfc\xd2\xa2\xbf\x1e\x98\x1b\xab\xeb\xbb\x61\x77\xd9\x57\xd3\x68" - "\xf4\xc3\xf5\xa7\x69\xf4\x3f\xec\x45\xe2\x94\x70\x8c\x2e\xfd\xe5" - "\x2a\x1f\x74\x82\xd1\x5e\x37\xad\xc9\x1b\x7c\x6e\x85\x5c\xbc\x28" - "\x3a\x2b\x96\xf7\xd3\xec\xc4\x9c\x95\x41\xc1\xf7\x3c\xce\xea\x90" - "\xce\xf4\xe8\x71\xdc\x30\xd9\xa0\xc5\x20\xf4\x37\x89\xb2\xdd\x99" - "\x4a\x07\xbc\xa1\x46\x38\x04\x39\x6f\xe4\x75\xbc\x1b\x76\x4a\x3d" - "\xa8\x6c\x5b\x6a\x37\xe4\x08\xaf\x77\x40\x67\xf6\x2e\xb3\x0a\x1f" - "\x60\x56\xba\x69\x9c\x5b\xb7\xb3\xbc\x2e\xff\x43\x2c\x53\x52\x07" - "\x5b\x27\x1d\x80\x7f\xe3\xe1\x56\x68\x44\x2c\x93\x84\xf9\xc0\xdc" - "\x12\x85\xb7\x8f\xe1\x3a\x4b\xce\x53\x07\xde\x2f\xf3\x8a\x4e\x51" - "\x76\x60\x3a\xeb\x21\xce\xe5\xbd\x9c\xf6\x2e\x78\x58\x38\x97\x32" - "\x4e\x37\xbe\xeb\xbc\xb1\x97\x4e\x41\xc7\x83\x7e\xe7\x51\x36\xd7" - "\x8d\x7b\x8e\x14\x92\x6e\xc7\xdd\x08\xfb\xef\xdb\x7b\x0c\xbc\x20" - "\x3b\x04\xe8\x8b\xfa\x59\xee\x75\x11\xaf\xa1\x2d\x2b\x16\x3e\xe0" - "\x6a\x43\xde\xb9\x46\x1b\xb8\x7d\xaa\x5d\x37\xe6\x85\xb6\x0b\x38" - "\x78\xa0\x2f\x4b\x1a\x2c\x5b\x49\x66\x9b\xa2\xb5\x99\xdb\xcb\x6d" - "\xe1\x36\xcb\xb6\x40\xbf\xe0\x79\xc5\xe5\xbf\x07\xfa\x97\x4c\x4f" - "\x03\xac\x43\x6e\xfa\x56\xba\xd2\xad\x6e\x94\x7a\x5d\xd4\x7e\x34" - "\x6f\xf5\xd8\xbf\xa4\x1b\xed\x41\x71\xf2\x14\xdd\xc4\x3a\x6d\x2c" - "\x5f\xe5\x9c\xec\x03\xff\x9a\xf7\x8d\xe5\xb9\xd8\x55\x7c\x01\xf2" - "\x5b\xe6\xbd\x06\x79\x3b\x90\xe7\x4e\x3d\xef\x9d\x6a\x7d\x57\x5e" - "\x87\xf1\x15\x73\xf3\x19\xf0\xee\x74\x5e\x93\x00\x9d\x13\x8d\x67" - "\x81\x67\x5c\xd1\x57\xfb\xc6\x46\xc7\x65\xbb\x27\xa8\xc6\x62\x17" - "\xea\xf9\x26\xf3\x94\x7d\x25\x5d\x07\xbe\x3c\x51\xb2\x9a\xae\x61" - "\x7e\x12\x71\xbb\x73\x14\xdd\x6f\xaa\x12\x8e\x52\x72\x41\x7a\x16" - "\x2c\xa7\xeb\x31\xfe\xe6\x9f\xa6\x9b\xde\xca\x2a\xb6\x01\x57\xa2" - "\x8a\xb3\x44\x52\xd6\xc4\xed\xce\x76\xf9\x3f\xa7\xba\xb3\x6c\x6b" - "\xdd\x74\xd4\xe0\x45\xdc\x1f\xbb\x9c\x5c\x00\x5d\x0b\x94\xad\x60" - "\x7b\x80\xd7\xcb\x4e\x92\x2d\x85\xdb\x8b\x5f\x0c\xd2\x6e\x10\x17" - "\xc5\x7c\xc1\xfa\x1b\xe6\x2b\x37\xd9\x32\x71\x2d\x90\x3f\x07\x19" - "\xcf\xd9\xc8\x97\x20\x2e\x06\x39\x4f\x01\xd2\xc6\x0a\x47\x0c\x8f" - "\x89\xc3\x3d\x0e\x5b\x86\x9b\x26\x95\xa9\xbe\xb1\x8d\x66\x58\x83" - "\xe0\x90\x8d\xbe\x25\xe6\x4d\xc0\xfa\x77\x5b\x49\x0c\xe3\xb1\x51" - "\x8e\x0b\xc0\xaa\xd3\x94\x7c\xc6\xdc\x58\x50\xeb\x08\xe6\x41\x16" - "\xe7\x05\xd7\xef\x2f\x95\xf7\xfa\x3b\xc6\x03\x73\x5f\x41\x74\xf8" - "\x07\xe6\x3a\x47\x31\x8f\x8f\x49\x52\x70\x0e\x4c\x77\x8e\x3a\xcd" - "\xcf\xd7\xf2\xb3\xd7\xdc\x50\xea\xaa\x4e\x43\xfd\xa7\x51\xef\x98" - "\x24\x65\x03\x8c\xb9\xb6\x1b\x75\xf4\x38\xc6\x24\xb9\x29\xf9\x90" - "\x5a\x3b\x6c\x28\x1d\x64\xec\x25\xf2\xd8\x69\xa9\x21\x7d\x4c\xdf" - "\xfc\xef\xbc\x8e\x81\x76\x65\x04\xcc\xdb\x0a\x74\xb9\xc1\x76\xd5" - "\x37\x4e\xd2\xcd\x8d\xad\x79\x92\xbf\x35\xa1\x8d\x29\x7c\x3b\xe8" - "\xd1\x78\x7d\x57\x89\xaf\x9b\x1b\x2f\xfd\x8d\xd9\x85\xdf\x21\xfc" - "\x9c\xfa\x73\x33\x7e\x6e\xdc\xa7\x4a\xba\x75\xe7\xc0\xce\xb9\xb9" - "\x11\x73\x7d\x01\x3f\xbb\x69\xcc\x5e\xd1\x3d\x56\x0b\xea\xf7\xb5" - "\x5f\xb0\x8d\x31\xa6\x1d\xf4\xcf\x51\xfd\xc0\x30\x28\x06\x63\x91" - "\x69\x2e\xec\xd5\xc2\xd7\x54\xe2\x65\x9c\xcd\x4d\xd5\x5e\xb2\x7d" - "\x8b\xdb\x7e\x73\xc2\xb2\x6a\xe1\xf1\x82\xf6\x7c\xe5\xb6\x1d\xa9" - "\xf1\x13\xaf\x31\xf7\x38\x6e\x1e\xeb\xa6\xa7\xab\xa4\xcc\x8f\x3f" - "\x50\xc0\xf0\x44\x9c\xe4\x07\x61\xb4\x5d\xc9\xb3\x86\x52\xee\x47" - "\x3c\xff\x08\xed\xb6\x9c\xa5\x9b\x65\x7f\x1e\x41\xdb\x77\x42\xa6" - "\xb0\xed\x54\x27\xe5\xff\xcd\x90\xff\xb6\x26\x63\x3d\x74\x23\xde" - "\xc1\x6e\xea\x6a\xc9\xf3\x11\xc3\x08\x00\x76\x85\x5c\x13\xda\x5f" - "\xba\xba\x4b\xf8\xde\x2f\xe9\x34\x61\x3e\x46\x7f\x37\x94\x72\x9d" - "\x76\xe8\xc1\xce\xc5\xb2\xde\x34\xc8\x2a\x6f\xd4\xfe\xef\xc7\xed" - "\x96\x77\x8f\x8c\x95\x72\x31\x03\x3a\x56\x76\x78\xbf\xdc\x72\x58" - "\xf5\xc9\x2d\xe6\xf0\x3e\xb9\xe5\x30\x7e\x33\xf1\xcb\xc1\xaf\x50" - "\x7f\x0e\xfd\x4d\x0a\xb9\x5f\xd7\xe3\xb8\x25\x1d\x63\xdf\xad\x68" - "\xcd\x69\xc0\x95\x79\xe0\x0b\x32\xb3\xed\xcd\xfb\x0a\x9c\xce\xfc" - "\xca\xe9\x41\xe8\x25\x78\xce\xc4\xfb\x44\x1e\x8b\x15\x41\x0a\x7b" - "\xef\x5a\x07\x9e\x5a\xd5\xcb\xb8\xbf\x25\xd7\x0b\xd6\x94\x95\x31" - "\x1f\x22\xcf\x7c\x8b\xbf\xac\x0c\xf5\x1d\x32\xe8\x87\xb4\x1a\x7e" - "\x1f\x5d\x3f\xb8\xe5\x78\xbf\x1e\x05\xfd\x92\x65\x4b\x17\x8d\xed" - "\x84\xfc\x41\x5f\xed\x2f\x52\xf3\xc6\xd8\x7f\xf0\x33\xe4\xde\x09" - "\xdc\x77\xb4\x40\xbe\xf4\xae\x7f\xf3\x68\x9f\x46\xc3\x7a\x35\x4a" - "\xf3\xaf\xff\x6b\x82\x3f\xbe\xf6\x98\xab\xf3\x10\xb5\xfa\x0f\x90" - "\xed\x39\x09\xe3\x33\x17\xf3\xf3\x4a\x11\xd8\xdf\xbb\x07\xb6\xd6" - "\x39\x27\xe6\xd9\x9b\x4e\xd3\x58\xd9\xf6\x9f\x9e\xc4\x0c\xfe\x94" - "\x84\xad\xd3\xe2\xb3\xce\x4d\x0b\x85\x7f\xd3\x29\x8c\x8f\x3e\x6b" - "\xfc\xc6\x5e\x4a\xd9\xbe\x8a\x52\x6b\x7a\x69\x6c\x6d\x2f\x25\x8b" - "\xbf\x27\x6b\x35\xd0\xb5\x9e\xba\x90\x48\x18\xdf\x99\xc3\x0b\xc8" - "\x5c\xbb\x8a\x64\x9f\x07\xca\xa1\x73\xf9\xa1\x73\x9d\x4b\x66\x39" - "\xd7\xaf\x73\xf5\xf5\xb1\xce\xb5\xfb\xa8\xe2\x8b\xdd\x47\xaf\xca" - "\xa3\x98\x84\x6c\x4a\x04\x7e\xf6\xb3\x34\xf6\x86\x84\x0e\xe8\x7b" - "\x68\xb3\x5b\x6f\x2f\xae\xa9\x96\x3c\x1a\x26\xdb\x0a\xd9\x2b\xca" - "\xf7\x17\x0d\x3a\xa7\x6a\xcc\x3b\x5e\xde\x03\x42\x1b\xc6\xdd\xc3" - "\xfb\x18\x87\x46\xf9\x4c\xcb\x6a\xc0\x77\x48\x2f\x1c\x23\x7c\x48" - "\x1f\xcd\x75\x37\x20\xbd\xc7\x31\x2e\xdd\xad\xbd\xb6\x6b\x30\x79" - "\x6b\x59\x63\xcc\xfb\xe3\x3e\x14\x5a\x29\xeb\xdb\x89\xab\xfd\xc2" - "\xe3\x3a\xcb\x63\x70\x5c\xd3\x9c\x7c\xe1\xb7\x2d\xe6\x3d\xa5\x71" - "\x87\x78\xbf\x8b\xd7\xb9\xdf\x86\x9e\xf2\x55\x7b\x5c\x2c\xfb\xa1" - "\x8f\xdb\x2c\xf9\x80\x09\x7d\x5f\xd8\x93\x29\x5c\xf7\x8e\xae\x77" - "\xf3\xde\xe8\x66\xb9\x0f\x3b\x0e\xfc\xf3\xb0\xd4\xc3\x58\xdf\x63" - "\x19\x08\xbd\xe9\x9a\x53\xf4\xad\x49\x6c\xd7\xf7\x38\xbe\x35\xda" - "\x4d\xd3\x8c\x7d\x3d\xb9\xbf\x8b\x34\xe8\x7f\xe9\xf9\x9c\x56\x38" - "\x86\xac\x85\x36\xd1\x39\x98\xee\x23\xf7\x5c\x35\xfa\x26\xca\xe4" - "\x18\x70\x30\xdf\xfc\xaa\x5b\x9b\x37\x0f\x69\x45\x06\x1c\xe4\xb9" - "\x16\xcf\x65\xfd\x79\x54\x99\xea\x90\x32\xf3\xba\xb5\xdb\x7e\x85" - "\xb4\xbd\x11\x65\x0e\x47\x94\x69\x0e\x29\x53\xaa\xd7\xe3\x8e\x28" - "\xe3\x09\x2f\xf3\x6d\xba\x14\xb7\x6f\x27\x85\x97\xf9\xf6\xd8\x88" - "\x32\x13\x2f\xc5\xed\xdb\xd3\x23\xca\x64\x46\x94\xc9\x0b\xa1\x25" - "\xef\xad\xa6\x22\xad\x38\xa2\xcc\x86\x88\x32\x35\xc6\xf3\x60\x7b" - "\xdc\xcb\x76\x92\x15\x7c\xd9\xc9\xfd\x09\xbd\xbd\xab\x7b\xeb\xf3" - "\x3d\x7a\xd9\xf6\x28\xed\xea\x8a\xa8\xcf\x1f\x5e\x5f\x72\xc2\xa5" - "\xed\x4a\xb6\x85\x97\x49\x4e\x8d\x28\x93\x16\x52\xa6\x5e\xd5\x93" - "\x3c\x37\xa2\x4c\x4e\x44\x99\xc2\x4b\xf9\x2a\xb9\x2c\xa2\x4c\x75" - "\x44\x99\x3d\x5f\x41\x0b\x9e\x8f\x95\x2f\xc2\x48\xd6\x79\x1f\xc4" - "\x5c\x7f\xeb\xd5\x6c\xcb\x60\x2e\xf1\xfc\xb2\xd7\x37\x84\xe7\x14" - "\x9e\x7f\x8e\x14\xf9\xa0\x2f\x25\xfb\xdc\x74\x47\x81\x31\x07\xf1" - "\x3e\x26\x8f\x67\xa5\x2b\x27\xb7\x0f\xa6\x53\x72\x3d\x86\x6f\x02" - "\xd7\x75\x64\x34\xeb\x5e\xb7\xa6\xf7\xeb\xb6\x6a\xbf\x9e\x14\x9c" - "\x5b\xb7\x31\x1c\xae\xbf\x4e\xed\x8f\xc6\xb0\x6e\x7d\xa4\x48\x96" - "\x29\x0a\xd1\x87\xb9\x7e\xef\xa1\x55\x3e\x53\x38\x1e\xb7\x66\x5e" - "\x06\x8f\x04\xe8\x38\x93\x5a\xa1\x7f\xf0\x3e\x50\x4b\x0d\x74\x19" - "\xe8\xef\x8c\xdb\x49\xba\xd5\x2d\x75\xab\xc5\xbd\xc4\xf7\xae\xe2" - "\xfb\xe4\x3e\x91\xd2\x2d\x6f\xb3\x36\xa1\x7e\xd6\xc1\x9b\x0a\xce" - "\x53\xb7\xd4\xff\x59\x07\xbb\xed\xa1\x23\xc5\x1e\xe0\x75\x5b\xa2" - "\xb1\x6f\xea\xa6\xdb\xd2\xa5\xde\x50\x76\x20\x95\xf7\xb0\x78\xdd" - "\xf7\x88\x77\x12\xe7\x01\xff\xdf\x3a\xda\x68\x2f\x6c\x40\x8c\xa9" - "\x5b\xbb\x2e\x47\x33\xd5\x87\xb7\xe5\x87\xf3\xe4\x10\xf0\xca\x6d" - "\xa5\xe1\xfd\x7e\x5b\x65\x78\xbf\xdf\x56\x1f\xce\x93\x1a\x78\xf2" - "\xb6\x43\x11\x65\x9a\x22\xca\x1c\x0b\x29\x53\xa9\xd7\xd3\x19\x51" - "\xc6\x17\x5e\xe6\x76\x73\xc8\x33\xda\x78\xbb\xb5\xdf\x86\x91\x7b" - "\xf2\xb7\x27\x87\x3c\x6b\x55\x52\x7e\xde\x3e\xd9\x48\xe3\x7d\xb4" - "\xda\x2d\x6a\x4f\x58\x87\x97\x19\x31\xde\x39\x7f\x7e\x38\x0e\xb7" - "\x17\x47\xe0\xd0\x3f\xfe\x2b\x94\x0d\xf6\x87\x53\x94\x92\x23\x79" - "\x08\x63\x04\xf3\xf5\x1c\x7e\x06\xac\x6a\xe4\x07\x1d\x6e\x3f\x1c" - "\x01\xaf\x39\x02\xde\xf1\x90\xe7\x44\x3c\x77\x85\xb4\x21\x31\xd6" - "\x2a\xfd\x62\xa0\x8f\xa5\x98\x8c\x74\xb6\x0d\x81\x6f\xa7\x5d\xce" - "\x33\x69\xec\xeb\x30\xe2\x24\xdd\xfe\x05\xdb\x91\x0a\x66\x4a\xe8" - "\xf8\x27\xd5\xae\x94\xf4\x70\x3c\x52\xe6\x86\xe3\x91\x92\x13\xd2" - "\x2e\xaf\x65\x0d\x3d\x62\xf1\x3f\xfa\x23\xd6\x71\xd8\x87\x46\xfa" - "\x1c\xac\x86\x5e\x76\x81\x12\xd9\xd7\xe3\x54\x21\xc5\xba\x8a\x3a" - "\x61\x93\xed\x6e\x1a\x94\x9f\xe2\x0f\xa4\xe9\xfe\x29\xb0\x37\x53" - "\x9a\x0c\x7e\x0c\xae\x3f\x90\x16\x2c\x7f\x3b\x1f\x69\x90\x7f\xb7" - "\x65\xa8\x35\xf6\x7d\x8d\xc2\x9e\x59\x0d\x7a\xc2\xbe\x19\xff\xa1" - "\x6e\x0f\xcc\x65\x9f\x05\xc8\x9e\x4e\xcc\xef\x09\x6a\x7f\x6b\x7c" - "\x42\x08\x5f\x7b\x6d\xab\xa6\x8a\x93\x34\xfe\x23\x9e\xff\x79\x8c" - "\xb2\xef\xc3\x11\xbf\x87\xd8\x86\x76\xf9\x4f\x4b\x1d\x0d\xef\xdb" - "\xf4\xb2\xd3\x43\xca\x7a\x74\x1b\xb7\x93\xdf\x4d\xf0\x93\xe9\x88" - "\xd7\x43\x80\x93\xa4\xf4\xba\xf1\x1f\x1d\xc1\x78\x45\x99\x62\xa3" - "\x0c\xdb\xc3\x5c\xc6\x52\x48\xa6\x3b\x8a\xc9\xe4\x5c\x75\x52\xc2" - "\xd6\xfb\xbe\x93\xf5\x63\x57\x71\x27\xb9\xbc\xed\xbc\x36\x65\x52" - "\x7b\xc9\xe3\xdb\x62\x7d\x64\xee\x2e\x3f\x80\x3e\x19\xdf\x16\x28" - "\x3f\x30\x09\xb8\xc1\xfe\x4a\x91\x72\x2e\x94\x76\x0f\x3d\x94\xf1" - "\xe8\x9c\x59\xe3\x7f\xf8\xe8\x8c\xb9\x0f\xdd\x67\x9b\xbb\xe8\x85" - "\xdc\x9c\xf1\x4b\x5e\x2a\xb4\xad\x58\xba\xa8\x70\xd1\xe2\x67\x6d" - "\xa9\x45\xe3\x8a\x6c\x0b\x0a\xd5\x35\x39\x7f\xc1\xb2\xc2\x29\x7c" - "\x9b\x62\x2b\x58\x9a\xbb\x5c\xde\xde\x1a\x4f\xe1\x40\x16\x15\xe6" - "\x2e\xb5\x8d\xcb\x49\xb1\x3d\xbc\x60\x51\xfe\x4b\x4b\x73\xa3\xc2" - "\xba\xcf\xb6\x34\x77\x69\xee\x82\x1c\xdb\x14\x5b\x2a\x43\x0e\x05" - "\x17\xd2\x9f\xa9\xc6\x3c\xc6\xf3\x57\x85\x43\xb4\xe9\xf3\x99\x5b" - "\xf1\xcf\x1d\xbb\x2e\x9d\xcb\xee\x68\x0c\xe7\xb9\x3b\x8e\x86\xf3" - "\xdc\x1d\xed\x97\xce\x65\x77\x44\xcc\x7f\x77\x44\xcc\x7f\x13\x12" - "\x2e\x9d\xcb\x26\x44\xcc\x7f\x13\x22\xe6\xbf\x09\xfd\xf3\x1f\x78" - "\xc9\xbd\x56\xca\x85\x09\x11\xf3\xdf\x84\x88\xf9\x6f\x42\x61\xc4" - "\xf3\xba\x90\xe7\x6b\xf0\x5c\x15\x3a\x3f\xe2\x79\x97\x31\x3e\x07" - "\xe4\xcb\x84\x46\x23\x0f\xcb\x7a\xc8\xe6\x0e\x3d\x6f\x5b\x48\xde" - "\x4e\x3d\x6f\x47\xff\xf8\x03\x1f\xb1\x8f\x88\xb2\xbb\x53\x67\xb0" - "\x4c\x67\xff\x10\x9e\x9b\x30\x3e\x6e\x3a\x4b\x13\x3e\x60\x58\xcc" - "\xc3\x72\xfd\x70\xeb\x13\x3d\x75\x23\xc8\xcc\x65\xea\x5e\x23\x93" - "\x70\x8c\x3f\x8e\x2b\x21\x2d\x01\x3f\xc8\x94\xd4\x34\xb7\xb6\xb9" - "\x50\xcd\x17\xa9\x95\x52\xdf\x47\x19\x1d\xfe\xcf\xf8\x19\x70\xac" - "\x28\x63\xae\x50\x73\x71\x07\xee\x13\x98\xa7\x51\xde\x24\xb4\x3b" - "\xc6\xe0\x4a\x48\x4b\xc4\x2f\x09\xf0\x2a\x0d\x78\xbc\x0f\x16\x6d" - "\xfc\x47\xae\x2f\xf7\xdb\x7c\x1a\x59\x2a\x1c\xc1\x76\x57\x90\xf5" - "\xea\xd4\x26\xb5\x46\xf0\x66\xa7\x70\xbc\x9f\x59\x87\xf4\xe8\x36" - "\xd2\x9d\xd0\xff\x52\x1b\xd5\xba\xc9\x9d\xe8\xff\x87\x3b\xd4\xda" - "\xe6\x9b\x6c\x23\xf6\x9e\xa2\x3b\xdf\xc0\xb5\x0f\xd7\x72\x03\xbe" - "\x53\xda\xce\x77\xf2\x9a\xc7\x63\x0c\x37\x22\x7d\x32\xe4\x5b\xaf" - "\xc5\x5f\x9a\x19\xe5\x5d\xa6\x70\xc4\x3e\x1a\x25\x9d\x6d\xe9\x5e" - "\x37\xdd\xb9\x8b\xf1\x0d\x49\x2f\x13\x8e\xe1\x73\x39\xbf\x9b\xeb" - "\x43\x99\xc1\x74\x6d\xc3\x1f\x4c\xf9\x5d\xde\x79\x2c\xa2\x1d\x5f" - "\x9e\xa2\xbb\x1e\x51\xed\xb8\x6b\x5f\x44\xdd\x5d\xd1\xdb\x71\x97" - "\x09\xed\xf8\x32\x7a\x3b\xee\xb2\x49\xda\x6a\x68\x8b\x76\xc9\xbb" - "\xc9\x68\xcb\x97\x92\xee\xe1\xe9\x73\x75\x5d\xc8\x0b\x1b\x2c\x11" - "\xef\x64\xd9\xc7\x8a\x07\xfa\x4d\xcf\x57\x6c\xa9\xa6\x8c\x28\x75" - "\x56\x09\xc7\xb0\xc7\xdc\x74\x57\xb3\x84\x33\x90\xbe\x57\xe1\x02" - "\x3a\x69\x92\x4e\x5d\x5c\x6e\xb0\xfe\x36\xec\x12\xb5\xae\x71\x17" - "\x78\xf6\xce\x06\x63\x4d\x72\x59\xb1\xf0\x18\x74\xec\x71\xdc\x6d" - "\x8d\x78\xe7\x0b\x79\x37\x31\xec\xdd\xea\xfe\xf4\x99\x46\xfa\xd7" - "\xeb\xa7\xbb\x8b\x23\xfa\x09\xfd\x33\xf1\xaa\xf0\x76\xdf\xbd\x41" - "\xb5\x0f\x7d\x74\x09\xad\xef\xde\x83\x3e\xea\x8b\xde\x47\x77\x37" - "\x45\xe7\xb5\xbb\x8f\x4b\x78\x23\x28\x1a\x3c\x1f\xfa\xae\x4f\xf2" - "\xa0\xde\x4f\x97\xf6\xcf\xc4\xd1\x46\xff\x7c\xbd\x36\x4e\xcc\x8e" - "\x68\x63\x00\x30\x3e\x53\x6d\xbd\x67\x7c\x04\xec\xa2\xe8\xbc\x38" - "\xb1\x12\xed\x0c\x44\x6f\xe7\xc4\xbd\x83\xf3\xe2\xc4\xa3\x68\x4f" - "\xe0\x52\x5e\x44\xf7\xc9\x32\x14\xad\x8c\x5f\x38\xa2\xd5\x73\x4f" - "\x92\xdd\xcf\x7a\xee\x3d\x33\x79\x0d\x29\x24\x3d\x25\x9c\xff\xd0" - "\x06\x2e\xc7\xf4\xf3\x2b\x39\xcb\xfd\x70\xca\x46\xda\x57\xf1\x64" - "\x8f\xe3\x9e\x0d\x11\xb4\x3a\x77\x8a\xbe\x73\x55\xb7\x16\xb3\x4b" - "\xd1\xeb\x3b\x1f\x45\xe0\xb4\x27\x3a\xbd\xee\x71\x82\x5e\xe7\xa2" - "\xd3\xeb\x9e\xe3\x83\xd3\xeb\x1e\xee\xff\x73\x97\xd2\xeb\x3b\x89" - "\xa1\xf4\x82\xae\x2b\xdb\x77\x8b\x15\xbc\xd1\x97\x25\x78\x0d\x0e" - "\x34\x49\xb4\x80\x57\x54\x99\x2e\x2e\x93\x6e\xf1\x29\x3e\x81\x0e" - "\x69\x3e\x4b\xdf\x49\x31\xc6\xff\xf0\x6a\x1a\x26\xfa\x9e\x10\x80" - "\x17\xc3\xe5\x5c\x45\xe7\x9c\x2e\x7f\x2a\xb1\xfd\x11\x51\x6f\x59" - "\x74\x59\xf0\x9d\x7a\xd0\xf4\xb5\x28\xe9\x8d\xca\x27\xe4\x3b\x9e" - "\x70\x19\xf1\x9d\xb6\xf0\x3e\x02\xdd\x50\x8e\x06\x7c\xda\x2f\xfb" - "\xbb\x7c\x9f\x7d\x37\xed\xd2\x3e\xfb\xee\x09\xd5\x5f\xdf\xfd\x20" - "\x1c\xbf\xef\x66\x46\xef\xaf\xef\x16\x0c\xde\x5f\xdf\xdd\x30\x78" - "\x7f\x7d\x77\x0f\xf7\x97\x9b\xbe\xeb\x0e\x9f\x37\xbe\xeb\x0c\x6f" - "\x2f\xea\x45\x39\xa1\x0d\xbd\x86\x9f\xbf\x6e\xbb\x8d\x1f\xcb\x38" - "\xee\xab\xba\x12\x02\x2f\xc7\x8c\x61\x1c\xaf\x14\xc6\xa0\xb0\x41" - "\xc3\xca\x55\xd1\xf7\x47\xd9\xc6\x6d\xad\x26\xde\x0b\x27\xdb\x8d" - "\xac\xbb\x4f\xfa\x4d\x50\xa3\x76\xdc\x6b\xa7\xe8\xbe\x35\x41\x4d" - "\x2b\x66\x3f\x4b\xe9\x5f\x29\xd7\x10\x26\x35\x87\xf6\x05\xfb\xe2" - "\xb0\x6d\xba\x49\xd9\x4e\x7f\x3b\x45\xf7\xce\x53\xfd\x72\xdf\x82" - "\x70\x3a\x4e\xf2\x44\xef\x97\x7b\xcd\xe8\x97\xbf\x45\xef\x97\x7b" - "\xc7\x0e\xde\x2f\xf7\xa6\xa1\x5f\xfe\x76\xe9\x38\xba\x37\x53\x1f" - "\x47\x6b\xb9\x8c\x6d\x31\xdb\xe3\xf7\xfe\x91\xf3\xe0\x1e\x63\xe4" - "\xde\x77\xf8\xfd\xf8\x2e\x63\x1c\xc9\x32\x1b\x00\x4b\xd6\xaf\xe7" - "\x29\xd3\x61\x84\xc2\x6d\xb0\x74\x45\x1b\x27\xf7\x1e\xe5\xbc\x77" - "\x14\x90\x19\x34\xcc\xdc\xc9\x30\x96\x12\x9d\xa5\xfb\x6e\xe0\x7c" - "\x9c\x7e\x87\x37\x74\x9c\xdc\xeb\x33\xf2\xb1\xac\x53\x79\xef\xf5" - "\x88\x9e\x3c\xe2\x7c\xe1\xb0\xef\xd3\xdb\x3f\x4c\xce\x23\x9c\x9f" - "\xf3\x45\xe4\x99\xae\xc6\xe3\x7d\x1b\xc2\xc7\xe3\x7d\xd9\xe1\xfc" - "\x09\xfa\xa3\x5c\x10\x72\x0e\xf7\x87\x80\xc3\xd7\xe6\xaf\xcb\x8f" - "\xcd\xfb\x8e\x47\x8c\x4d\xf0\xc0\xf7\x56\x2b\x1e\xf8\xde\x93\x11" - "\xb8\x7a\xa3\xf3\xc0\xf7\x12\x06\xe7\x81\xef\x25\x0f\xce\x03\xdf" - "\x4b\x67\x1e\x70\xd3\xf7\x8a\xc3\xc7\xe6\xf7\xe6\x87\xb7\xfd\x3e" - "\xaf\x1a\x9b\x74\xf5\x95\x8c\x4d\xe8\x42\xd7\x0c\x36\x0e\x79\x4c" - "\xa1\xee\x98\xba\x5e\x63\x3f\xe3\x6b\xd1\xcc\x8c\x71\x05\xfc\x26" - "\x27\xf2\x9a\x12\x64\xfc\x24\xa6\x61\xad\x3c\x6b\x33\x79\x6c\x28" - "\x1d\x37\xa9\x73\x2f\x76\xe4\x7d\x8b\xf7\x87\x15\x3d\xa7\xbc\x18" - "\xde\xfe\xc9\xe9\xd1\xe9\x39\x79\x3e\xe8\x69\x8f\x4e\xcf\xc9\x45" - "\x83\xd3\x73\x72\x15\xfb\xec\x5f\x3a\xa6\x26\xef\xb5\x2d\x97\x3a" - "\x8a\x2c\x73\x96\xa6\x0c\xf9\x7a\xf3\xd3\xe4\x8e\xf0\xf9\x69\x72" - "\xf3\x95\xcf\x4f\x53\x92\xa3\xcf\x4f\x53\xd2\xa2\xcf\x4f\x53\x32" - "\xd5\x78\x98\x52\x19\x3e\x1e\xa6\x14\x84\xf3\x04\x68\xf7\x3f\x36" - "\x3f\x4d\x71\x47\x8c\x81\x8a\x53\x74\xff\x02\xe8\x14\xa5\xaa\xdf" - "\xa6\x8e\x8b\xc0\xd1\x1f\xbd\xdf\xee\x4f\x42\xbf\x55\x44\xef\xb7" - "\xfb\x53\x07\xef\xb7\xfb\x67\xa2\xdf\x2a\x2e\xed\xb7\xfb\x73\xae" - "\x5c\xa7\xb8\xbf\x3a\xbc\xcf\xee\x2f\xbd\xf2\x3e\xbb\xff\x78\xf4" - "\x3e\xbb\xdf\x1b\xbd\xcf\xa6\x26\xa8\x3e\x9b\x9a\x1e\xde\x67\x53" - "\xc7\x86\xf7\xd9\x14\xff\x3f\xdb\x67\xe8\x9f\x2e\xe5\x67\x30\xf5" - "\x0d\xd8\xed\xc3\x7a\x1c\x53\x6b\xdc\x94\xa6\xef\xe1\xa6\xa9\xb9" - "\x43\xf5\xe1\x7e\xe4\xa9\xbc\x74\x1e\x98\xda\xa8\xa7\xfd\xf0\xd2" - "\x7e\x98\x7a\x0c\x32\xba\xab\xa9\x58\xee\x6b\xa9\x3e\x64\x9a\x23" - "\x9f\x73\x15\xef\x4d\x4d\xf5\x72\x59\xf4\xb1\x70\xf9\xfc\xc4\x72" - "\x1d\xf9\xbd\x0c\x87\xcf\x2a\x85\xc3\x4a\xb3\x5d\xc9\x1c\x3f\xb8" - "\x6f\xcc\x9b\x5d\xce\x92\xbb\x00\xef\x81\x7b\x14\xaf\xa6\x45\xea" - "\xbf\x75\x78\x17\xa7\xf8\xf4\xc1\xbf\x44\xe0\xb0\x2b\x3a\x9f\xa6" - "\x1d\x46\x1b\xea\xa2\xf3\x69\x5a\xfb\xe0\x7c\x9a\xc6\x32\xb3\x2e" - "\xc4\xf6\x19\xf1\x94\xdf\x1d\x61\xfb\x3c\x60\xb5\x78\x15\xef\x48" - "\x9d\xa8\xfc\x4d\xe8\x1c\x0f\x44\xea\x7f\xe8\x9b\x07\xde\xd5\x71" - "\xfe\x4d\x44\xf9\x41\xf4\xbf\x07\x58\xff\xdb\x1f\x1d\xe7\x07\x2e" - "\xa3\xff\x3d\xc0\xfa\xdf\xfe\x4b\xc7\xd6\x03\xba\xfe\x17\xcd\xc6" - "\x7b\xe0\x78\xf4\xfe\x7f\x20\xa2\xff\x29\xb3\x10\xf6\xb0\x2c\x1f" - "\x96\xef\xc1\xd1\xa1\xf9\xd8\xc7\x88\xf3\x32\x8f\x44\xc9\x3b\x3d" - "\x12\xe6\x20\xf9\x0a\x2e\xe1\x3d\xf6\x89\x8a\xca\x7b\x0f\xd6\xa8" - "\xf1\xf8\xa0\x37\x7c\x3c\x3e\x78\x28\x7c\x3c\x3e\x90\x19\x51\xee" - "\x58\xf8\x7b\xf0\xcf\xff\x98\x8c\x9d\x96\x1e\xc1\x03\xef\x9f\xa2" - "\x69\x1f\x28\x1e\x48\xbf\x2e\x1c\x8f\x69\xf3\xa3\xf3\xc0\xb4\x42" - "\xb4\xff\xfd\xe8\x3c\x30\xad\x72\x70\x1e\x98\xb6\x17\xb4\x7c\x3f" - "\x94\x6f\x1f\x2b\x4e\x1b\x16\x91\xa7\x2d\xba\xcc\x9b\xd6\x19\x7d" - "\x8d\x20\x9d\x14\x8d\xd3\x27\x85\xd3\x38\xdd\x1a\x4e\x43\xb4\xe5" - "\x9f\xa7\x61\xff\x59\xdf\x1e\x47\x7a\xe4\xf8\x77\x9d\xa2\x87\xf4" - "\xf1\xff\x70\x84\xac\x4b\xdf\xa5\x70\x89\xb6\x2e\x92\xce\xf6\xaf" - "\x2b\x3a\x2d\xd3\x8f\x0f\xd2\x66\xf6\x69\x73\x05\x2f\x19\x4b\x0f" - "\x25\x20\xfd\x31\x5e\x0f\xe5\xf5\x90\x5a\xa4\x3f\xe6\x27\xb3\x9c" - "\xaf\xfa\xe7\xa5\x87\xf8\xec\xa5\x60\xfa\x33\xff\x5a\x46\x53\x06" - "\xcf\x41\x8c\x57\x56\xb1\xf4\x59\xb0\xac\x63\x5e\xbf\x99\x79\xfd" - "\x21\xa9\xff\xf1\x3e\x0b\xfb\x03\x5a\x8a\x28\xc3\xe5\xf5\x93\xc1" - "\xef\x9c\x3f\x02\xf6\x06\x1e\x17\x9c\xdf\xc8\xab\xd6\xcd\x4a\x23" - "\x64\xd3\x43\x87\xa2\xf7\xf1\x43\xcd\x83\xf3\xce\x43\x9d\xaa\x9f" - "\x1f\x1e\x1d\xde\xcf\x0f\x43\xff\x1b\x3e\x97\xdb\x0a\x1e\xb8\xa2" - "\x71\x52\x68\x13\x9e\x41\xe5\xfd\xda\x27\xda\x0b\x4a\xe8\xc6\xd3" - "\xf4\xf0\x3a\x59\x9f\x26\x7c\x96\x35\x31\xd4\x24\x65\xc0\xc3\x9f" - "\x48\x3c\x91\x27\xcb\x4f\x9a\x58\xfb\x7c\x3b\xbf\xab\x73\x08\x1f" - "\xf2\xb5\xf1\x9e\x00\x9f\xf5\x03\x2f\x5c\x73\x92\x1e\xde\x19\x56" - "\xde\x44\xe4\x52\x30\xda\xeb\xe4\x78\x7c\xf8\x98\xb1\xa6\xbb\x6e" - "\x10\xff\x20\xe4\xf1\x19\xbe\x0f\xca\xf7\xeb\xe1\x41\xf7\x2f\x19" - "\x27\xf6\x8f\x67\x9c\x2e\x2f\x07\xbe\x3f\xd3\xe0\x5f\xe5\x33\xf9" - "\xfd\xf9\x03\x3e\x79\xdf\xcf\x73\xd3\xf7\x07\x3d\xcf\x11\x3e\x0e" - "\xbe\x5f\x15\x0a\x47\x9d\x77\xff\xfe\x1e\xc3\xaf\x0e\xf7\x87\xbe" - "\x02\x96\x81\xcf\xf1\x08\x7c\xba\xa0\xa7\x34\xe9\x30\x7c\x97\x83" - "\xc1\x7d\xae\x78\x96\xf9\x61\x7a\xe2\xe5\xd6\xfc\x62\xad\x94\xb1" - "\xf9\x12\xde\x9a\x2e\xf5\x25\x86\x71\x79\x1c\xa7\x97\x86\xd9\x16" - "\x72\xef\x9e\xf7\xb6\x66\xcc\x52\xe3\x7e\x46\xc4\x1a\xe1\xf4\x1a" - "\xe9\x37\xa5\x8f\xfb\xa7\xfc\x91\xe3\x60\xfa\x61\x63\x8e\x8e\x48" - "\x3f\x66\x8c\x7b\xd8\xb5\x0c\x37\x62\x9d\x75\xba\x57\x8d\x85\x19" - "\x33\x83\x71\xa1\xf6\xda\x0c\xa9\xff\x19\xeb\xa5\x6e\xe4\x0b\x2f" - "\x37\x23\x62\xfd\x6f\x7a\x8d\x18\x7c\x9d\x3e\x01\xfd\xeb\xe5\xbd" - "\x2d\x75\x76\x78\x46\x71\xc4\x7a\x85\x67\x93\x3c\x27\xfa\x29\xe0" - "\xfe\x40\x97\x7b\x3f\xf8\x22\xa2\xbe\x1a\xfb\x99\xcb\xb5\x7f\xc6" - "\x20\xed\x9f\x31\xd0\xfe\xc5\x12\x6e\xc4\x5a\xe2\x0c\xd9\xfe\xc0" - "\x25\xf2\xef\x07\x09\x90\x5f\x06\xdd\xa0\x73\xff\x20\xd7\xd0\xd5" - "\x79\xfd\x60\x70\x5d\xfd\x07\x03\xeb\x7f\xaa\xdc\xc0\xfa\x9f\x27" - "\x9a\xae\xee\x26\xb9\xb7\x1a\x5e\x77\x99\xa5\x26\x5a\x5b\x7e\x30" - "\xc8\xfa\xdf\x0f\xf4\xf5\xbf\x7f\x4b\x0c\x97\x67\x3f\x68\x0b\xef" - "\xc3\x19\x11\x7d\xf8\x03\x4f\x78\x1f\xce\xa8\xf9\xef\xce\x6b\x3c" - "\x71\xc6\xc6\xc6\x6a\xb1\x31\x5a\x4c\x2c\x5e\xa3\x89\x34\x2c\xd6" - "\x14\x3b\x04\xbf\xa1\xfa\x75\x98\x16\xab\x99\xf0\x1b\xa2\x5f\x87" - "\x46\x3c\x0f\xe3\xb2\xf8\x99\xf4\xeb\x90\x88\xe7\xa1\x5f\xf1\x7e" - "\x98\x5e\xaf\x51\xbf\x29\xe2\x79\xc8\x57\xbc\x1f\xfa\x4f\x96\xa7" - "\x4b\x9e\xc3\xfd\xd0\x66\x2c\x5e\xbe\x20\x7f\x51\x8e\xdc\x2f\xce" - "\xb5\x2d\x78\xe6\x99\xdc\x65\xcb\x6c\x85\x4b\x6c\x0f\x3e\xf0\xe8" - "\x5d\xf7\xd9\xd4\xb6\x73\xfe\x94\x71\x39\xf1\x34\x6b\xc5\x52\x7e" - "\x31\xeb\xb1\x19\x99\xb6\x8c\x07\x1f\x08\x7f\x69\x80\x91\xdb\xcb" - "\x97\x83\x12\x32\xfe\xd2\xca\x47\x12\x6d\x18\x29\x65\x4f\x47\x4b" - "\x3d\x91\x5a\xf3\x78\x64\x41\x33\xb4\x09\xd1\x6b\x17\xce\x9b\x79" - "\x4f\x7f\x96\xf4\x11\x1e\x5f\x5f\x4a\x05\x0b\xf9\xbc\xc9\xac\x3b" - "\xc5\x7b\x1e\xb2\xfd\x80\xb4\x93\xf4\xf8\x8b\x4d\xd0\x6a\xf9\xd9" - "\xd5\xe1\x27\x9b\x9d\xcc\x28\x7f\x35\xde\xc5\x88\xfb\x83\x48\xf3" - "\xea\x3e\xcd\x19\x63\x64\xda\x7b\xa5\x46\x3e\xcb\x29\x9a\xf5\x17" - "\xf1\x9e\x90\xcf\xe2\xfe\x4a\x3d\xdf\xac\xb7\x82\x8e\x99\x79\x2c" - "\x1b\x6a\x5e\x23\x53\xed\x6b\x44\xdb\x46\x90\x79\xdb\x48\x3e\x43" - "\x3f\xab\xc6\xd8\x0b\x2d\xc7\xb3\x9b\x1e\x2f\xe0\xba\x39\x6f\x50" - "\x9b\xf9\x9a\xcc\x3f\x22\x2c\x7f\xf3\xc0\x5e\xec\xac\x1a\x0d\xf9" - "\xe6\x7c\x4e\x16\x5f\x7c\xed\x51\x57\x71\x29\x59\x02\xe2\x8b\x3b" - "\xa6\x53\x4c\x2b\x66\xdf\x95\x7e\xe1\x77\x2e\x3d\x8d\xfa\x67\x5f" - "\x67\x59\x29\xbe\x70\x61\xf4\xcf\xea\xb2\x8b\x4d\x67\xc8\x84\x71" - "\x1d\xe3\x5c\xca\x7e\x0a\xb3\xa9\xf6\x4b\x32\x81\x06\xa3\x4f\xd3" - "\x9c\xd4\xe2\x59\x22\x60\x9f\x45\xa6\xff\x2c\x62\x7f\xc3\xdd\x0b" - "\x37\xfd\x99\x4c\xbf\xee\x2d\xd5\x7a\x85\x95\x8a\x0b\x05\xe4\x86" - "\x20\xbb\x57\xf8\xd8\x5f\xbf\x39\x3b\xc0\x79\x1e\xef\xb1\x5b\xa9" - "\xb5\xd0\x4b\xab\x8f\x0b\x5f\xd9\x9f\x95\x9f\x7f\x4b\x97\x97\xfd" - "\x17\xcd\xab\x67\x51\xec\xa9\x4c\xd2\x5a\xf2\xaa\xc9\x35\xdf\x4b" - "\xc5\xc7\x45\x67\x73\xf6\xe7\xd4\x9a\xd7\x40\x59\xed\xa4\x35\x77" - "\x7c\x46\x32\x3e\xc4\xfa\xbf\xb2\xdf\xa3\x75\xf5\x22\x4e\xbb\x40" - "\xab\x56\xd3\x55\xab\xfe\x42\x16\x57\x67\x3b\xea\x39\x43\x3f\x3e" - "\x46\x31\x80\xa7\xbd\xfc\x19\x59\x5f\xfe\x11\xfb\xf3\xa6\x51\x4d" - "\x09\x59\x85\x3d\x39\xa1\xd7\x9e\x9c\xd8\x2b\x92\x47\xf4\xd8\x93" - "\x93\x5a\x0b\x90\xbf\xe3\x5d\x1a\xde\x4e\x49\xef\x9d\x6e\xd7\xaa" - "\xcf\xd3\x68\xdb\x6c\xee\xff\x39\x29\x35\xe7\x91\x7f\xfd\xc1\xd2" - "\x20\xca\x86\x96\xf1\xc7\x1d\xac\x76\x65\xfa\x28\x08\x58\xd5\xbd" - "\x34\xba\xa6\x97\xac\xc1\xf2\x83\xa5\x4c\x8b\xbe\xf5\x6f\x1e\x85" - "\x2c\x1c\xb6\xff\xe9\x46\x93\xab\xb9\x8b\x5a\xbc\xbd\xd4\x4a\x9f" - "\x92\xab\xe8\xef\xce\x5f\x3f\xdd\x38\x24\x08\xe6\x77\xae\xea\x00" - "\x7c\xc5\x33\xf6\x16\x3e\x97\x58\x4a\x15\x25\x94\x50\xb0\x8a\x86" - "\x9d\x46\xba\xb2\xe9\xb7\x41\xb7\xf9\xbb\x73\x95\xf4\xc1\x7d\xbc" - "\xa0\xa4\x85\x62\x5b\xbd\xd5\xdc\x66\x2d\x10\xff\x57\x72\x79\xdb" - "\xc8\x55\xf0\x37\x67\xd0\xfc\x59\xe7\x86\x20\x99\xf7\x5d\x6c\xd3" - "\x5c\xa6\x8b\xe4\xca\xf4\xd2\xfb\xa8\x5b\xac\xff\x6b\x02\xe4\x55" - "\x5a\xab\xd7\xc7\xe7\x92\x52\x45\xb7\x35\xbe\x62\x29\xa5\xd4\x9e" - "\xa7\xb1\x3b\xcf\x53\xb2\xe8\x49\xd6\xd8\xaf\xf6\xc9\x33\x89\xb4" - "\x13\xd7\x84\x0e\x32\xa3\xbd\xca\xa7\x3a\x4e\xf7\xaf\xed\x4b\xa6" - "\xba\xde\x01\xff\xda\xde\xee\x01\xff\x5a\xf0\x52\x3d\xfb\xd8\x62" - "\x5c\x64\x32\x3f\x57\x9c\x25\xd3\xda\xb3\x44\x77\x94\x6a\x64\x7b" - "\x9a\xcf\x47\x3c\x32\xc4\x95\x73\x46\xde\x9f\xa4\x8c\xc3\xb8\x26" - "\xe0\x17\x83\x31\x20\xd7\xb3\x3b\x74\xbe\x45\x9a\x86\xb4\x37\x70" - "\x8d\xc5\x75\xa7\xbd\x46\x78\x44\xd9\x9e\xd1\xdd\x1a\xc5\x33\xff" - "\x2a\x5f\xde\x3d\xa3\x7b\x1c\x19\xd0\x7f\x72\x93\x0c\x3e\x56\x32" - "\x7d\x56\xfd\xfb\xa7\xce\x70\xbc\x16\x8f\xc4\xa7\x2f\x2f\x86\x63" - "\xb7\xe8\xe9\xc0\x21\x23\xc0\xf5\xa2\x7e\x37\xae\x16\xfc\x30\x2e" - "\x33\x0a\x8d\xb2\xdd\x7d\x79\x5c\xe7\x05\xa4\x0b\x23\x1d\xed\x35" - "\xf1\xbb\x83\xa7\xce\x68\x2a\x4f\xb2\x06\x98\x3e\x1d\x3e\xc6\xfa" - "\xac\x74\x1e\xd3\xdd\x9a\x45\x1c\xc9\x99\x48\x35\x23\x45\xdb\xce" - "\x2d\xa2\x49\x8d\xb5\x47\x26\xb9\x69\xa1\x8d\x71\xc4\xbc\xdd\xb4" - "\x01\xef\x8e\xd8\x88\x98\x2e\x4d\xd9\xec\x3f\xf6\x48\xa6\x9b\xe2" - "\x8f\x87\xb6\x41\x38\xfe\x6d\x3a\xcf\x9d\x6f\x97\x38\x87\x08\x6d" - "\xe6\xf4\x56\x77\x17\xfd\xba\xb7\x73\x88\xfd\x8f\xa4\xb9\xfc\x27" - "\x69\x42\x12\x59\x59\xff\xab\xdb\x22\xdc\xb8\x76\xb2\x3f\x27\xf8" - "\xe4\x86\xd3\xf4\xc8\x1b\xb7\x27\x51\xd2\x9f\x8a\x48\x97\x47\x8f" - "\xbc\x1b\x22\x8f\x1e\x6a\xe9\x68\x0c\x91\x45\xf3\x2e\x5c\x2a\x8b" - "\xe6\x7e\xa1\x64\x91\xf0\x2b\xd9\x13\x70\xeb\xe9\x9f\x45\xa4\xeb" - "\x7e\x21\x73\x3f\x88\x48\xf7\xe9\xe9\xfb\x22\xd2\x3d\x2a\xfd\xb1" - "\x33\x86\xac\x6b\x65\x3c\x56\xb0\xac\x7b\xec\x23\x96\x75\xad\x39" - "\xba\xac\x93\x3e\x86\x8f\xfd\x46\xfc\xa2\x94\xf8\xec\x11\xee\x37" - "\x32\xfe\xe2\x3d\x32\x70\x8f\x43\xda\x2c\x4e\xab\xfc\x94\x4c\xf8" - "\x49\x39\x27\x1c\x33\xf7\xb3\x9c\x63\x19\xc7\x7e\x27\x3b\x46\x8a" - "\xf6\x1d\x5b\xc4\xb1\x9a\x2d\xa2\xb9\xc7\xf1\xe8\x61\x43\xde\xfd" - "\x14\x69\x1b\x90\xf6\x53\xbc\x67\xb9\xc7\x34\x69\xc9\x6c\xe4\x73" - "\xfa\x1d\xe0\xe3\x1c\x4b\x0c\x15\x6c\x02\xcf\xf3\x79\xc0\x75\xa0" - "\xaf\x0b\x32\x89\xcf\x72\xc9\x38\x27\x5a\x2a\x64\x54\x07\x8f\xb7" - "\x91\x6b\x31\xbe\x5c\x45\x9f\x53\x89\x57\x9c\xe6\x73\x71\x8c\x43" - "\xd6\xca\x1f\x70\x1c\x8f\x98\xa6\x3c\x22\xf6\x01\x67\x7f\x15\xc8" - "\x5d\x53\x25\x70\x3a\x92\xcf\x7d\xfd\x18\xec\xff\x6d\xfa\x79\xa4" - "\xc7\x0b\x38\x2e\xd0\x49\x7a\xb4\x0c\xf6\x9d\x8f\xdb\x66\x09\x94" - "\x12\x9f\x5f\xc1\x18\x65\x1b\x2f\x6f\x07\x7e\x95\xc6\x19\x16\x8e" - "\xed\x84\x3c\xae\x76\x1f\x31\xce\x6e\x7a\xf4\x58\x4b\x71\x23\x97" - "\x2f\x62\xda\x08\x87\xdd\x80\x11\x23\xcf\xc0\x38\xc8\xcc\x67\x60" - "\xdc\xf4\x58\x9e\x2c\x1f\xff\xe6\xd1\x96\xf9\x1e\x62\x39\xef\xea" - "\x04\x8c\xe2\x93\x0a\x06\x60\x09\xc8\xfd\xb0\x77\x3a\xfc\xab\x56" - "\x8b\x2f\x00\x3f\x9d\xfb\x8b\xcf\x2d\xf2\xfe\x1a\xe8\x92\xc0\x7e" - "\xf1\x4a\xf7\x7c\xb4\xa5\xee\x53\x22\xfd\xec\x25\xf8\xed\xd1\x66" - "\x3e\x6f\xc4\xe7\x2d\xe5\x59\x4b\x6d\x22\x89\x15\xc9\x09\xfd\xe7" - "\x2d\xff\x7f\x38\x6b\x09\xfa\x5b\x6b\x35\xd1\x00\xfc\x9b\xf9\xbc" - "\x25\xf0\x4f\x61\x3e\xd4\xdb\xd4\xf6\xf3\x1f\x4b\x9a\x27\x71\x1a" - "\x6c\xc5\xa3\x46\xff\x73\x7b\xb9\x2d\x27\xe9\x11\x9f\xd2\x09\x45" - "\x9b\x9b\xe6\xb6\xf1\x7b\xa4\x75\x70\xfe\x09\x90\x63\xae\x9c\x00" - "\xed\x3f\x15\xd0\x2a\x56\x91\x49\xc9\xb4\x79\xff\xe0\xf2\x4a\xa6" - "\xcd\xab\x1f\x90\x69\xf3\x7e\xae\x64\x9a\xa2\xb1\x92\x69\xf3\xca" - "\x95\x4c\x9b\xb7\x46\xee\x83\x41\xa6\xf1\x3b\x96\x6b\x86\x4c\xdb" - "\x39\x52\x1c\x65\xd9\xd1\xe3\x98\x57\x60\xc8\xb6\x8d\x48\x63\xd9" - "\xc1\x38\x2a\x39\xf5\xd8\x51\xf1\xbf\x92\x49\xf9\x19\xf0\x7d\x1e" - "\x9f\x55\xe8\xd4\xef\xd1\x2f\xf3\x4e\x28\x19\x37\xaf\x69\x40\xc6" - "\xcd\x9b\x3e\x50\x96\x65\xdc\xbc\x4f\x94\x8c\x53\xe9\x75\x3f\x66" - "\x19\xf7\xd8\x51\xa6\x81\x0e\x5f\xe3\x35\x3b\x3d\x3f\xe8\xf8\x48" - "\x5b\xa8\x8c\x0b\x1f\x5f\x8f\x8f\x36\x64\x1c\xcb\x36\x3c\xa7\x40" - "\xa6\x49\xdf\x60\x1e\x67\x55\xa0\xb9\x31\xee\xb8\x0f\xb8\xcd\x1c" - "\xff\x87\xe9\x36\xed\x0c\x0d\xd3\xcf\xfd\xe8\xed\x7e\x3c\xcf\xf0" - "\x75\x74\xd3\xbc\x82\x68\x7a\xb3\xa1\xa7\x81\x1f\x6f\x0a\x60\xbc" - "\xb9\x4a\x31\x97\x56\x8b\xd2\x56\xff\x31\x7a\xaa\x90\xb4\x60\xec" - "\xf3\x27\xb8\x6f\x61\x67\x0c\xe5\x2b\xcb\x1e\xcc\xa1\xfb\xb2\xbc" - "\x34\x14\xb6\xf9\x89\x0a\x0d\xef\x8a\xe8\x7b\x21\xef\xfe\xc8\xf5" - "\x84\x94\x1b\x1f\xf2\xee\x73\xa9\xe3\x9d\xe5\xd8\x4f\x8f\x57\x0e" - "\x66\xfb\x5f\x19\x2e\x3f\xbc\x77\x70\x5c\x7e\x38\x6f\x70\x5c\x7e" - "\x28\xf5\x80\xf1\x5d\x14\x03\xdb\xec\xea\xb3\xf4\x43\xb9\x1e\x23" - "\x63\x57\xac\x8d\x5a\xcf\xeb\xfa\xfb\x21\x21\xef\x43\xeb\xfa\x20" - "\x4a\xf9\xd0\xfa\x4e\x5c\x1e\x7e\x66\xcc\xe5\xe1\x67\x8e\xb9\x3c" - "\xfc\xcc\x07\x58\x06\x82\x76\x96\xa0\x16\x9e\xef\x0e\xbf\x1c\x83" - "\x47\xf9\xdc\x1d\xf2\x2d\xd2\xd7\x7c\x4e\xd8\xc7\x48\x5b\x50\x9e" - "\xcd\xda\x84\xf7\x7c\x96\x9c\xe5\x73\xfa\x4a\x22\xb5\x47\xdd\x5f" - "\x66\x67\x24\x6e\xc3\xfd\x06\x6e\xf2\xfd\xbb\x91\xb8\xe1\xfd\xf8" - "\x90\xf7\x9f\x0d\xf4\x7b\xe6\x65\xfd\xeb\x5d\xd5\x44\x1c\x43\xef" - "\x08\xcc\x17\xcc\xc9\x1c\x8f\x4b\x5f\x9f\xf9\xd1\x44\xc8\xf9\xd2" - "\x10\xbf\x5d\xf6\x39\xbb\xa9\xd5\xcb\xe7\x54\xbd\x32\x56\x0a\xda" - "\xf2\x4d\xcc\x27\x23\xf8\xac\x0e\x9f\xdb\xc9\x0a\x64\x68\x2a\x26" - "\xce\x8f\x0a\x8c\xb2\x83\xad\x03\x71\xbd\x7a\x9d\xec\x03\xeb\x45" - "\x99\x5d\x46\x19\x86\xcd\x7e\x94\x98\x07\x6e\x92\x67\x57\xfd\x5d" - "\x2c\x77\xbf\x09\x3d\x79\x84\xaa\x27\x9b\xf4\x7a\x60\xc7\xfe\x30" - "\xe1\x72\x67\x47\x06\x6f\xdf\x8f\x93\xae\xbc\x7d\xa4\xb7\xef\xc7" - "\x19\x5f\xd1\xbe\xcb\xd5\xbb\xe1\xca\xeb\x4d\x34\xea\x3d\x7a\xe5" - "\x74\xfd\xb1\xff\xeb\xd3\x35\x55\xa7\xeb\x13\xa9\x5f\x41\xd7\x28" - "\xf5\x3c\x91\xf3\xf5\xeb\xb1\x19\xf5\x54\x47\xab\x87\xe4\xdf\xa0" - "\xe7\xba\xcc\x46\x6c\x3a\x8e\x0b\xa9\x62\x52\x3d\xe1\x0e\x8d\x9d" - "\xa9\xe2\x45\x3e\xe1\x35\x62\x67\xea\x31\x2c\x31\xb7\xcc\xbf\x3a" - "\xab\x9e\xf5\x11\x11\x74\xd3\xfc\x24\x8e\x7b\x98\xbe\x3a\x34\xc6" - "\xe4\xfc\xe4\xcb\xc5\xec\xe4\x58\x39\x42\x64\xd2\x91\x6a\xe9\x0f" - "\x80\x79\x68\xfe\x02\x3e\x1f\xa0\xf6\x33\xe7\xe7\xab\x31\x39\x3f" - "\xdf\x4d\x4f\x34\x0e\x0e\xe3\x40\xc1\xae\x92\xd4\x21\x83\xf9\xfc" - "\xa3\xfc\x5e\x37\x3d\x2b\xd7\x2f\x03\xeb\x1b\x2a\xc5\x39\xab\x1e" - "\x8b\x2b\x2b\x2e\x24\x56\x18\xe6\xee\xa7\xee\xd5\xcf\x26\x80\x06" - "\xa5\xa0\xe5\xfc\x0e\x83\x06\x46\x3a\xd2\x7c\x06\x0d\xa0\xaf\x24" - "\xb8\xea\xfd\x7c\x76\xc8\xab\xce\x7b\x3f\x79\x83\x28\x3f\x90\xad" - "\x60\x3f\xa9\xf6\x19\xe2\x1b\x2a\xbd\x2f\x5b\x35\xa3\xfc\x58\x9b" - "\xfd\x4b\xe6\x61\x4f\xdc\x81\xec\x1e\xc7\x93\xe9\x06\x7c\xc1\x78" - "\x89\x81\x7c\x75\xd2\x2f\xe9\x49\xf4\xff\x13\x93\x25\x5f\xa3\x0e" - "\x89\xbb\x46\xb1\x41\xe0\x8f\x36\x68\xae\x02\x2f\xeb\xa9\x5d\x01" - "\xb4\x9f\x65\xdd\xa1\xc5\x6e\x13\xe7\x91\xba\xc3\xb9\x64\x4d\xc5" - "\x39\x7b\xf2\xdd\xe0\x39\x8e\xb7\x21\xf1\x4a\x40\x9b\xcd\x8c\x93" - "\x1b\x57\xcf\xcb\xc9\x34\xe7\x02\xe9\xb4\x78\xf2\x8d\x20\xd2\x83" - "\xcb\x06\x70\xa8\x95\x67\x3c\x9e\xec\x34\x70\x08\x72\xfd\x3d\x56" - "\x0d\xba\x18\xd7\xdb\x29\xcf\x59\xa2\xee\x09\x1c\x97\x8a\x63\x59" - "\xac\x48\x26\xc6\xa1\xc7\xf1\xd4\x68\x83\xde\x7a\x19\xa3\x8e\xe6" - "\xa0\xac\x5b\xd1\x46\xd1\xf9\x08\xf4\xc1\xa7\x66\x5e\x4a\xe7\xa7" - "\xb2\x43\xe8\x1c\xcb\x7c\xc5\x6b\x2c\xe8\xa3\x00\xd3\x9b\xf7\x35" - "\x6c\xcb\x59\xaf\x7a\xea\x67\x47\xbc\xd2\xef\x24\x81\xe1\x06\x41" - "\x7f\x86\x01\xb8\xdf\x50\x34\x7e\x6a\x4f\x3f\x8d\x51\xb7\x40\x5f" - "\xac\x55\x67\x52\xd8\xf7\x1d\xb2\xe3\xa9\xa3\xfd\xf5\x30\xae\x76" - "\xab\x16\x14\x56\x8e\x6b\xe7\x61\x5c\x0b\x6d\xc2\xc7\x7a\xa5\xf4" - "\x63\x42\x5b\x0f\x95\xb4\x9b\xa0\x5b\x6a\xb2\xae\xee\x64\xd6\xef" - "\xcd\xf2\x1e\x75\x0d\xc2\xdf\x9f\x70\xec\x38\xa3\x5d\x68\x8b\x99" - "\x79\x0b\xb8\x43\xff\xcb\xbe\x4a\xf2\xcb\x72\xee\xa7\xac\x2f\x38" - "\xcd\xc8\x87\xe7\x0f\x39\x9f\xf1\x8c\x77\xe0\xaf\xac\x57\xd0\xae" - "\x78\xc6\xd3\xc3\xf1\xf2\x64\x9b\xb3\x93\x19\x46\x8f\x23\xab\x32" - "\xac\x9d\x7d\x99\x26\x83\xef\x78\x8f\xa8\xc9\xe6\x93\xb2\x53\xd1" - "\x36\xeb\xb0\x31\x26\xb9\xbc\x1a\x63\x59\x6d\xa1\xbc\xe8\xb5\x0f" - "\xf0\x41\xe1\x18\x32\x9b\x6c\x1c\xef\x2e\xab\x41\xc5\xd5\xcd\xf2" - "\x47\xf6\x17\xbf\xe3\xd8\x70\x3a\x0d\x79\x3c\x25\x9e\xa4\x2c\x0f" - "\xb7\x0d\xef\xd2\x2f\x37\x5f\x72\x8c\x36\x8e\xb7\xb7\x59\x8d\x23" - "\xd0\x65\xc1\xa2\xcd\xea\x7c\x8f\x57\xc5\x48\xcb\x7e\x41\x68\xaf" - "\xcb\xfe\x62\xbf\x3c\x19\x0f\x43\xc6\x9e\xc8\x66\x1f\x37\x31\xbc" - "\xe0\x75\x19\x2b\x51\xf7\xd9\xf3\x34\x15\xf8\x65\x9c\x35\x7b\x21" - "\x9f\x83\xf5\xb3\x4d\x26\x7d\xd2\x8e\x14\xfa\xe9\x31\x1f\xd3\x36" - "\xfb\x30\x9f\x57\xf7\x4a\x5a\x64\x1f\x35\xce\xa8\x73\xdc\x37\x8e" - "\x25\x38\xc1\x4f\xb1\xac\x53\xd8\xec\x1c\x5b\x60\x41\x3d\xeb\x24" - "\x8a\xa6\xe0\x7b\x4d\xb4\x29\x5e\x5e\x70\x35\xc7\x66\x54\xfb\x4b" - "\x27\xc1\xdf\xb1\x7f\x47\xde\x5b\xd5\xba\x8c\x31\xd6\x16\xbc\xce" - "\x7b\x4c\x6e\x1d\x46\x8f\x63\x01\xe6\xff\xf9\x55\x97\x8e\x8b\x05" - "\x57\x1b\x36\x06\x9f\x8b\x53\xfb\x55\x03\xf0\x50\x5e\xae\x4b\x0f" - "\xc8\xa6\x3f\x30\xac\xd2\x4b\xc7\xcc\x82\x2a\x83\x97\x0b\x6e\xe6" - "\x73\xd5\xd9\x99\x5c\xff\x60\x32\x53\xd8\x7f\xc4\xfd\x64\x3e\x65" - "\xa3\xd8\xaf\x3a\x2f\x31\xb0\xff\xb5\xc0\x67\xb4\xc1\xa0\x89\x6a" - "\xc3\xd3\x8f\x74\xc7\xbf\xe9\x19\x68\xfb\xd3\x8f\x48\x5a\x0c\xbc" - "\x2f\x0f\xa1\x0d\x3f\x97\x29\xbe\x7b\x7a\x3a\xf8\x43\x5f\xb3\x51" - "\x69\x22\xfe\xc0\x33\x1c\xa7\x51\xe1\xb8\x88\x0c\x7e\x47\xde\x42" - "\x37\x9d\x4a\x56\xfb\x50\x4f\xa3\xfd\x0b\xda\xf4\x72\xa3\x19\x97" - "\xa8\xed\x0c\xc3\xf1\x19\xe2\x39\x56\xc5\x2d\x78\x26\x86\xf1\xb5" - "\x7d\x8b\xfb\xf8\xe9\x16\xae\x97\x79\x42\xf4\xe5\x0d\xf1\xf6\x25" - "\x53\x77\x5f\x1e\xc6\x4f\xb2\x86\x7a\x20\xff\x3e\x37\xe9\x75\x7a" - "\x0d\x5c\x19\x37\xe8\x8a\xe6\x1e\xb1\x28\x3a\x7d\xb9\x5e\x1e\xef" - "\x7d\x79\xc3\xf0\x33\xe3\x37\xf4\xeb\xce\xc7\xd0\x6b\x3b\x3d\xe5" - "\xfb\xe6\x07\x97\x8b\xa3\x73\xfc\x22\x08\xbb\xa0\xb3\x02\xfc\x3b" - "\x7c\x8d\x93\x86\x7b\x9f\xd4\xb2\x56\x52\x1a\x6c\x5b\x12\x17\xc5" - "\xa4\xda\x20\xae\xcb\xc5\x44\x8e\x47\x8b\xe7\x54\xfd\x39\x85\x9f" - "\xbb\x97\x8b\xf9\x3d\x8e\x67\xf6\x18\x7b\x77\x2a\xf6\xcc\x33\x8d" - "\xfd\x71\x78\x62\x9f\xe0\x73\x3e\x34\xa7\x08\x75\xc4\x3e\xdf\xc9" - "\xf5\x66\xf1\xdc\x81\xfa\x90\x0f\xf3\xff\xfc\x89\x9c\xcf\x13\x7b" - "\xdb\x08\xfc\x92\x07\xd9\xe3\xec\x64\xbc\xba\xe3\xf6\xcd\x37\x70" - "\x1d\xee\x4d\xd3\xbe\x1e\x6e\x39\xe9\x06\x6e\x48\x3f\x5a\xa1\xd2" - "\xfd\x1c\x8b\x8c\x7d\x10\xf1\x3e\xc7\xc0\xd5\xc0\x81\xeb\xe3\x73" - "\x95\x22\x7e\xb7\x8c\xed\xc2\xf5\x79\x5e\xce\xe3\xbc\x95\x06\xbe" - "\x5f\x7d\xf6\x27\x3a\xdd\xdd\x94\x73\x5c\xf1\x64\xce\x71\x63\xfe" - "\xc2\x7d\x67\xf8\x7e\x6f\x4e\x5b\xa4\x2c\x7b\x7a\xc9\x92\xc2\xac" - "\xa5\xb9\x7c\x49\x1e\xf7\xd2\xad\xf1\xa1\x36\x29\xcb\x37\x15\x1b" - "\x20\x97\xcf\x3e\xd1\xe6\x11\xc6\xfe\x65\x6e\xff\xf9\x27\xdd\x4f" - "\x7a\x2a\xeb\xaa\xac\xd3\xe1\xdd\xfc\x0f\x8a\x57\x33\x98\x98\x13" - "\x66\xd2\x06\x93\x9d\x2c\x2f\xba\xe3\x3e\x49\x95\xf4\x28\xf7\xd4" - "\xa3\x5c\xff\xfa\x67\x74\x3f\xb1\xdd\x69\x81\xf5\x07\x9d\xb6\x51" - "\x32\xc6\x91\x76\x70\x55\xbb\xc6\x73\x78\x09\xee\xd9\x76\x92\x7a" - "\x83\x1e\x37\xe7\xbd\xf3\xed\x90\xc3\xb9\x9d\xa2\x7c\x77\x1a\x60" - "\xba\x07\xc5\x21\x64\x8f\x9d\x7d\xb2\x3a\x68\x21\x0d\xba\x1f\x5e" - "\xd6\x50\xaf\xc6\xe1\xc2\x79\x4d\x56\xe2\x33\xa2\x3f\x39\x49\x0b" - "\x1f\x31\x59\x21\x6b\x47\xd1\x6e\xdc\x4b\x5b\x97\xdf\x85\xf5\xd7" - "\x0d\x67\xea\x4d\xb1\x42\x13\x42\xc4\x08\xf5\x47\x26\xfd\x26\x16" - "\x3f\x4d\xc4\xc8\xdd\xa2\x58\x50\x6a\xd8\x50\x13\x59\x86\x27\x98" - "\x6f\xba\x71\xb4\x75\xea\xfd\x93\x27\xd9\x4b\x8a\xc1\xdd\x7e\x9f" - "\x45\x84\xc6\x79\x6a\x6f\x9b\x77\x6b\x29\x49\x7f\x81\xf2\xf6\xb6" - "\x68\xb8\x6e\x74\x88\x02\x3e\x9b\x1b\x8c\xf7\x24\xda\x5f\x22\x6d" - "\x7f\xaf\x5b\xe3\xd8\xc1\x3c\x47\x73\xcc\x32\xe0\x7a\xe2\x7d\xa4" - "\xa1\xfd\x45\xa2\xcc\x93\xa8\xf6\x03\x9f\x1d\x13\x5c\xef\x49\x1c" - "\x80\x6f\x22\x86\x6f\xdf\x46\xda\xae\x92\x4e\xcd\x65\xba\x9f\x5c" - "\x36\x2f\xbd\x8f\xfb\x41\xfa\xb3\x00\xf4\x27\x86\x51\xe7\x08\x96" - "\xd9\xbf\x24\x4d\x3f\x5f\xa7\x9d\xa5\x67\x7f\xd4\x30\x48\x39\x3e" - "\xcf\xda\x1d\xbf\xef\xe6\x1e\xc7\xb3\xe8\xff\xef\x79\xf5\x39\x01" - "\xb2\xeb\x59\xd8\x7f\xb9\xea\x39\x7e\xdf\x98\x6e\x19\xd7\xf2\xd9" - "\x46\x23\x4f\xf4\x79\x81\xd7\x1c\x85\x93\xfb\x55\x5c\xfc\x47\x27" - "\xfb\xee\x0f\xb2\xcf\x3f\xcc\x55\x74\x17\xef\xb3\x0c\x19\xee\xa3" - "\x04\xfb\x05\xd1\x07\xbb\x3d\x09\x6c\xab\x05\x60\x7b\xf9\x2f\x8a" - "\xcc\x96\xae\xf3\xc4\xb1\xfe\x78\xbf\xf6\xed\x85\x7f\xd0\x5c\xbe" - "\x73\x4e\xd7\xba\x20\xb5\x62\x7e\x76\xd5\x9c\x73\xb6\x74\x1d\xc3" - "\x7d\x80\x5a\xe8\x53\x6a\x29\xfa\xb8\x54\xae\x95\xd4\x88\x52\xa6" - "\x73\xdf\x45\x31\xd7\x65\xfa\xff\x88\xe3\xd5\xb3\xac\x00\xdd\x6d" - "\x67\x29\x6f\xcd\x7b\x80\xb3\xff\xaf\x80\x25\x63\x3b\x4d\xa1\xf7" - "\x71\xdf\xe3\xc8\xdb\x60\xc8\x91\xa8\x71\x34\x62\x9c\x1b\x2d\x45" - "\x4f\x6a\x41\xc8\x24\x8e\xc1\x05\x59\x34\x91\xdb\x85\xe7\x54\x7e" - "\xc6\x35\x85\xaf\x96\x35\xce\x9d\x16\xff\x93\x2c\xa3\x32\x59\xfe" - "\x20\x7d\x6e\xdd\x45\x29\xb3\x32\xf4\xe7\x99\xfa\xf3\x74\xfd\x39" - "\x5d\x7f\x4e\xd3\x9f\x27\xf3\xb3\x92\x6d\x8b\x6c\xfd\x72\x57\x1b" - "\xd6\x86\xe7\x54\xa3\x2f\x80\xcf\x55\x96\xa2\xd5\x52\x46\xea\x78" - "\x4c\xd4\xf1\x4a\xd5\x9f\x0d\x7c\x6e\xb0\xf8\x57\xff\x4f\xe1\xd3" - "\x10\x81\x8f\x33\x04\x1f\xb2\x14\xa5\x7d\x1d\x7c\x12\x2d\x1c\xaf" - "\xf9\x9f\xc0\x87\x71\xe1\xb4\x1e\xc7\x73\x69\xe1\xf8\x3c\x97\x61" - "\xe0\x13\x95\xdf\x96\x8b\x4e\x9e\x1f\x96\x5d\x27\x63\x55\x0e\x63" - "\xd9\x5f\xd7\x6b\xc4\x53\x7b\x6e\xc3\xe5\xe2\xa9\x61\x2c\x58\x91" - "\x07\xed\x7f\x6e\xbe\x3e\x0f\x1e\x56\xfa\xd2\x73\x4d\x86\x6f\x0c" - "\xda\xba\xa7\x42\xb5\x75\xef\x3a\x8e\x29\xb6\x92\xae\xb7\x17\x89" - "\x4e\xe8\xff\xff\xd5\x64\xf3\x84\x8d\x81\xfc\xc2\x65\xcb\x5e\xb8" - "\xcf\x96\xbf\x60\x71\xae\x6d\x5c\x8e\x6d\x59\xde\xa2\x85\x85\xb9" - "\xe1\xfb\xc5\x89\x7a\xbc\x7c\xe9\x07\xcf\x3a\x29\x8f\x01\xe6\x7f" - "\xb6\xe3\x95\xef\xe2\xf3\xaf\x08\xc7\x73\x7c\x56\xd6\x5c\xfb\x1a" - "\x99\x78\x8f\xa2\xc7\xf1\xfc\x5c\x63\x4e\x50\xf1\xa1\x29\x46\x4b" - "\x64\x9d\xeb\x79\xd8\xbf\xcf\x76\x85\xa4\x73\xde\x52\x23\x8d\xe1" - "\xeb\xb2\x69\xd8\x49\x7a\x7e\x0c\xd7\x19\x95\x86\x17\x45\x3d\x6c" - "\xdd\x18\xd8\x23\x6c\x1b\x0a\x8e\x1f\xc4\xe7\xcb\x50\x4e\x00\x9f" - "\x8f\x58\xf6\xf2\x37\x20\x94\xee\x2b\x18\xc7\xcf\x51\x66\x17\xd2" - "\x4c\x9b\x90\x17\xfa\x74\x27\x97\x43\x7a\x80\xcf\xf9\x23\xdd\xac" - "\xc7\x44\x42\x5a\xfe\xd5\x7c\x0e\x1f\x69\x89\x21\x69\xe3\x38\x4e" - "\x2f\xd2\x6c\x0a\x5e\xfe\x3d\x4c\x67\x3c\xa7\xe9\x36\x37\xe7\x99" - "\xa1\xd7\x1b\x16\x2f\x8b\xa3\xa8\xdf\x75\x47\xaa\x6d\xee\x63\xdf" - "\x99\x72\xff\x33\x4b\x16\x2f\x8c\x27\x49\xf6\xe4\xd4\xa2\x71\xa9" - "\x77\x15\xdd\x7a\x9f\xad\x20\x37\x77\xa9\x6d\x45\xee\xe2\x42\xdb" - "\x82\x15\x0b\x56\xc6\xd3\xc2\x25\x4b\x9f\xe1\x53\xe4\xdc\x2d\xcb" - "\xb2\x9e\x59\xf8\x2c\x6f\xea\xab\xdc\xf1\x61\xf3\xf1\x5c\x96\x6d" - "\x7a\xdc\x85\xa3\x90\xb9\x3e\x11\xf7\x4e\x36\xee\x39\x16\x91\x15" - "\xd7\x26\xfc\x0e\xe3\xd7\x88\xdf\x31\xfc\xda\x4e\xd3\xd2\x24\x5c" - "\x0f\xf5\x38\xf2\xbd\x86\x5e\x30\xc0\x43\x2f\x98\x0d\x1e\xc2\x3c" - "\x7e\x48\xcd\x6f\x2f\x4c\x6a\xf5\xcb\xf1\xd3\xcf\x53\x15\x17\x07" - "\x78\x4a\xc6\x3b\x64\x9f\x95\xe5\x78\x0f\x1e\x66\x3b\x16\x34\x8f" - "\x63\xba\x9d\xa2\x82\xf1\xb0\xfd\x9b\x39\x16\x08\xae\x4d\xe0\x97" - "\x66\x15\x7f\xe3\x85\x43\xc8\x37\x06\x75\x1c\xd6\xeb\x50\xcf\x23" - "\xc5\x51\xb6\xf3\x4f\xea\xcf\xca\x26\x5e\xf2\x21\xdf\xf3\x55\xdf" - "\x2b\xb2\xb0\xff\x9f\xb2\xad\x8c\x77\x8b\x9f\xd4\xeb\x70\x82\x16" - "\xa5\xb5\x0e\xd1\xbf\xcf\xc1\x6b\x4c\x96\x98\xa9\x02\xf8\x9c\x0b" - "\xc6\x3e\xd1\x2e\xe3\xf4\x95\xf6\x42\x46\xdc\x7d\xb7\xab\x48\xe6" - "\x8f\xe1\x35\xa8\xd9\x05\x22\xc8\x71\x51\x83\xb1\xcf\xb7\x73\x39" - "\x61\x7e\x27\x3b\xb8\xe9\xaa\x34\xa5\x0b\x70\x7c\xb4\xc5\xba\x1f" - "\xa8\xf0\x31\x6d\x4f\x53\xfe\x3f\x94\x3d\xb3\x34\x49\xe9\x59\x8b" - "\xd3\x0d\x5f\x32\x8c\xd1\x64\x3c\xcf\x35\x64\x80\x9b\x16\xdb\x74" - "\xbf\x1f\xa7\x6a\xff\xe2\x0d\xfa\x73\xa3\x8e\x63\x0c\xc7\x7a\x00" - "\xfe\x6d\xdc\x77\xb0\x0d\x1b\x71\x7f\x0c\xf4\x69\x56\xf4\x59\x2c" - "\xd7\x18\xa0\xd7\xf0\xfb\x63\x1c\x77\x1e\xef\x8e\xa9\x38\x0a\x2f" - "\x34\x71\x9b\x07\x7c\x03\x6b\xd2\x40\xbf\x0f\x79\x4f\x0d\x63\xa9" - "\xd1\x75\x91\xc7\xe7\x0b\x4e\xc0\x6b\x30\xe4\x0e\xcb\x99\xac\x00" - "\xc6\xa9\xd4\x4b\x17\xfb\x0d\x79\x33\xc0\x07\x4b\x12\xa3\xc9\x92" - "\x68\xfd\xae\xf7\xcd\x4a\xe1\xc8\x9f\x0b\x9c\x1a\x64\x1f\x70\xdc" - "\xc8\x8b\xfd\xfa\x6f\x9f\x92\x91\x4b\xfa\xf5\x5f\x03\x0f\x8e\x77" - "\xeb\x66\xdc\x7a\xe5\x3e\xa7\x2e\x37\x96\x6c\x30\xe4\x86\x01\xc7" - "\x12\x23\x82\x96\x22\xfc\x2b\xdb\x7d\x9c\xd7\x58\x79\xbe\x94\xfa" - "\x08\xe0\x0c\xbf\xa0\xce\xf8\x04\xcb\x77\x43\xcf\x5d\x92\x0e\x19" - "\x63\x92\x3a\xaa\x23\xff\xd9\x01\x59\xb4\xc4\x1d\x0a\x53\x98\x77" - "\x1f\x67\xb8\x2c\x8f\x58\x27\xc9\x0a\x98\x38\xce\xc6\x71\x7d\x7e" - "\x81\x0c\x2e\x48\x34\x70\x05\x0d\x8f\x1a\xf8\xea\xdf\xf8\x80\x8d" - "\xbd\xa4\x60\x4e\xa0\x8f\x7d\x5d\x9b\x54\x7f\xbe\x28\xe5\x0d\xde" - "\xed\x45\xd9\x99\x6e\x7a\xbe\x5e\x1f\x43\xcd\x28\xbf\xf7\x48\x49" - "\x3a\xf2\x14\xe4\xe9\xfe\x9a\x6d\xe8\xdf\x63\x21\xbc\xff\x64\x88" - "\xbd\x7c\x4c\xf5\xe1\xfd\xa5\x27\xa9\x60\x4f\x48\xba\xde\xb7\x47" - "\x32\x4e\xd2\x8b\x4f\x2a\xdb\x73\x77\x8d\x2a\x5f\x20\x7d\x36\x0d" - "\x1c\x59\x16\xf0\x79\x24\x1e\xe3\x92\xf6\xb2\x8f\x0b\xdc\xc6\x7c" - "\x01\x58\x87\x24\xcd\x47\x8a\xc3\x4c\x27\x15\xcf\x20\xff\x55\x45" - "\xa7\x17\xcd\x61\xb4\xe7\x79\x13\xf5\x30\x9d\x86\xaf\x11\xc1\xe1" - "\xde\x18\x91\xb5\xd2\x24\x63\x37\xf3\x18\xe7\xbd\x09\xf0\x87\xd4" - "\xab\x14\xdd\x5e\x9c\x6e\xd0\xcd\xe8\x3b\xa6\x93\x9b\x0a\x1a\x99" - "\xb6\xe1\x6d\x1c\xd6\x76\xd2\x68\x3b\x68\xca\xeb\xa5\x78\x9e\xaf" - "\x8f\x8b\x66\xe7\x28\xde\x2b\x7f\x61\xc1\x11\xd3\x77\xe8\x48\xd1" - "\x44\x52\xb4\x7d\x11\xf6\xdf\xf3\x66\xd9\x0e\x05\xeb\x28\xd3\x97" - "\xc7\x0a\xf0\x6c\xd7\x63\x0b\xe9\xfe\x1a\x2f\xcc\x87\xbe\xaf\xc6" - "\xf2\x72\x19\x03\x82\xe3\x8b\xb6\x31\x8d\x58\x2e\xf2\x58\xe2\x31" - "\xc0\xe3\x49\xd1\x68\xa9\x29\x84\x46\x4d\x4c\x1f\x9d\x4e\x87\x22" - "\x64\x79\xae\x2d\x7f\x8a\x92\xc5\xb6\xe4\x71\x39\x13\x64\x20\x0f" - "\xdb\xc3\xd3\xee\xb3\x65\x4c\x19\x57\x94\x97\x32\x5b\x5d\xa6\x65" - "\xcc\xe4\x6b\x7c\xb8\xfd\x64\x43\x3d\xf9\xe1\x36\xd8\x8a\x2e\x25" - "\x3f\x96\xae\x73\x93\x5f\xf2\x0d\x6c\xe5\xae\x8a\xf3\x44\x01\xa6" - "\xe1\x62\xf4\x69\xd9\xee\xa2\x39\x90\xc1\x73\x56\x8a\x2f\xeb\x90" - "\xce\x31\x6a\x99\x17\xc1\xf3\x45\x6c\xf3\x7a\xe2\xda\xdb\xf0\xab" - "\xf4\xc4\xed\x9b\xf8\xd0\xad\x76\x01\x58\x6d\x46\x5b\xd8\x2e\x16" - "\x5c\xbe\x48\x04\x98\x2e\x59\x45\xe8\x6f\x94\x63\x1b\x19\xf9\x7c" - "\x98\x03\xd2\x94\x6d\xb8\x0c\xed\xcf\xdf\xa5\xcb\xaf\x0c\x3c\x27" - "\xb9\x29\x55\xe1\xe3\xb0\xf2\xfa\x9c\x29\xb8\xf6\xb6\x47\x61\x03" - "\x54\x1a\x30\x01\x6b\xa8\x1e\x7b\x4e\xc2\xfb\xba\xbe\x82\xc1\xf5" - "\x7b\x0a\x2c\x31\x2a\xce\x1d\xc6\x75\x69\x9d\x16\xcc\xec\xf7\x05" - "\xc0\xbb\xe1\x6b\x12\xd9\x57\x20\x13\xfc\xc6\xb1\x2e\xfb\xdf\x55" - "\x38\x82\xee\x0a\x2d\xe8\x43\xdf\x25\x2a\x9d\xb9\x8b\x65\x26\xec" - "\xcf\x65\x4e\x63\x2e\x93\x73\xa0\x46\xa5\xca\x86\x59\x26\xf7\xf8" - "\xce\x3b\x4c\x04\x39\x3d\xff\xe6\x24\x69\x97\xf8\x82\x8e\x18\x52" - "\xfe\x99\xcb\x7e\x63\xc8\x55\xde\x63\xb1\xac\x11\x1e\x5e\x5f\xb3" - "\xf8\x85\x87\xf7\x5b\xe4\x7c\x41\xa7\xc9\x55\xdc\x53\xca\x71\x48" - "\xa5\xde\x83\x7a\xd5\x5c\x11\x50\x73\x05\xea\x87\x2d\x9f\x8d\x39" - "\x21\xe6\x34\x2d\x5b\xc7\xf8\x33\x6d\x78\x0d\x37\x08\x5a\xb9\x78" - "\x6e\x64\xfa\xc4\xbf\xe5\xe1\x7d\x7e\x6e\xab\xc5\x8f\x36\x87\xb6" - "\x4b\x0b\xba\x37\x39\xd0\x2e\x0d\xed\x2a\x3a\xc3\xe3\xc4\xc7\xfe" - "\x17\x18\x63\x23\x65\xac\x5d\x69\x63\x17\xee\x0a\x6d\x23\xcb\x7c" - "\xd5\x86\xc2\x0f\xa3\xb5\x51\x68\xdc\x46\xa6\x41\xe1\x36\x7d\x8c" - "\x49\x3c\x59\x66\x74\x51\x61\xe6\xf0\x35\xec\xf7\xb0\xbb\x08\x7c" - "\x34\x8d\xfb\x10\x73\x66\x25\xe3\x19\xad\xbf\x18\x9e\x82\xf5\x52" - "\x8e\x65\x4d\x69\x76\x8f\xe3\xa5\xd4\xe8\xf4\x7e\xe9\x91\xcb\xd3" - "\xfb\xa5\x71\x5c\x9e\xf1\x60\x3f\x10\x8b\x1f\x06\x3a\xf8\x16\x36" - "\x5a\x59\xb4\x7a\x87\xaf\xa9\x67\xbc\xa2\xbe\x83\xdc\xe9\xaa\xd0" - "\xe5\x0e\xf8\x50\xcc\xc1\x8f\xe5\x10\x70\x6b\x36\x64\x90\x25\xc6" - "\x16\x2b\x65\x82\x26\x2a\xa3\xc1\xb0\xac\xa9\x64\xbf\x8b\x69\xa8" - "\x3f\xea\x7b\xd0\xd8\x06\x1a\xe5\x05\xd7\xde\x7e\xb3\x25\x86\xa6" - "\x7a\x62\x6f\x8f\xb7\x14\xf9\xc7\x32\x0d\x01\xb3\x08\x63\xf7\x13" - "\xb6\x4d\x55\x6c\xac\xe5\x98\xff\x5f\x95\xeb\x79\x9e\xb8\xdd\x79" - "\x2a\x7e\xd6\xf2\x4c\x37\x6d\x38\x6e\xac\x6b\xe2\x39\xcf\x4d\x9f" - "\xea\xeb\x55\xd7\x6f\x17\xeb\xf7\x41\x5e\x5b\x84\x6d\x95\x05\xba" - "\xe3\x0a\x8e\x43\xae\x89\xf8\x7d\x34\xc0\x27\xca\x27\xc4\xe0\x13" - "\x94\xdf\x13\x9d\x07\x96\xff\xf1\xf2\x3c\xb0\x5c\xee\x17\x33\xdd" - "\x95\x7d\xb2\xdc\x63\xe8\x26\x62\xed\xf5\xdb\x6d\x25\x5c\xff\xf2" - "\x75\xaa\x6e\xa6\x49\x1a\xaf\xd5\xcf\x04\x5d\x4a\x7b\x1c\x2b\x46" - "\x1b\x72\x80\xf9\xc5\x12\xa0\x18\x96\x45\xcc\x2b\x78\x37\x09\x72" - "\xa6\x5a\xad\x21\xee\x6b\x94\xdf\x88\x72\x2c\xb5\x79\xec\x79\x3b" - "\xd8\x87\xd3\x1b\xb7\xdb\x8d\x3c\xf3\xdd\xf4\xdb\xb1\x32\x8f\x79" - "\x77\x3b\x60\x1c\xaf\x1a\x81\x79\x59\xf9\x32\x25\xf0\x98\xe6\xb8" - "\x37\x3c\xae\x91\x96\x04\xbc\x39\x06\x0e\x6c\x9c\x15\x55\xfd\x73" - "\x91\x23\x0d\xb2\x42\xc8\xf9\x10\x73\xd1\xe8\x6e\xd0\xee\xe7\x5a" - "\x70\xcf\xc5\x09\x56\xe2\x36\x5f\x5c\x3b\x6a\xcf\x4f\xee\x20\xd3" - "\xff\x63\x7d\x9a\x0a\xee\xa2\xa4\x35\xdf\x31\xd1\xff\x9e\x44\x1a" - "\xd3\xc1\x4d\x2b\x76\x29\xda\xad\xe8\x30\xfa\xc7\x4d\xcb\x67\x72" - "\x7f\xf0\xfa\xdb\x1c\xbf\xf8\x52\xad\x11\x16\x41\xfe\xe5\x38\xd5" - "\xfb\xa5\x45\x91\xeb\x3e\xac\xc3\xdb\x16\x2d\xb3\xe5\x2c\x59\xb1" - "\x78\xcc\x98\x30\xfb\xc8\x24\xcf\x75\x38\x8a\xac\x6a\x0e\x2d\x9a" - "\x69\xe0\xcd\xba\x08\x9e\xd1\xfe\xa5\x97\xc4\xf9\x9e\x99\xa5\xbb" - "\xee\x66\xa5\xd2\xc0\xfd\x9d\x34\xf3\xce\x90\xc7\xbb\x69\xe6\x5d" - "\x77\x67\x3d\x9a\xbb\x20\x67\x65\x48\xea\x3d\xa1\x6b\x72\x15\xdb" - "\x51\x77\xec\xa8\x07\x21\x2b\x62\x66\xbf\xcc\xf3\xc9\xca\x07\x4a" - "\xfc\xe2\xef\x90\xd7\x93\x30\xc6\xb2\x5a\x0a\xfd\xd4\x02\x59\x26" - "\xae\x67\x19\x3e\x4c\x9d\x57\x83\x0e\x05\xde\xb2\xa0\xed\x1e\xe8" - "\x72\x17\x78\x4d\x06\xe5\x72\x5b\xab\x39\xf6\xec\xbe\xc9\x4a\xaf" - "\x58\x69\x43\xfa\xd5\xb8\xce\xc0\x75\x28\xae\xb3\x6c\x8b\x61\xeb" - "\xb0\x7f\xf0\x72\xf6\x0f\x5e\xc9\x78\xc4\xdc\xe1\x2d\xa5\x3b\x96" - "\xb2\x9e\x5e\xd4\xce\x7a\x87\x9b\x56\x96\xf1\xfe\x00\xe7\x45\x99" - "\x31\xb6\xe7\x28\x95\xaf\x42\xee\xab\xac\xb4\x89\xf2\x7d\x93\xc5" - "\x8e\x4c\xfe\x76\xcb\x58\xa4\xbf\x12\x1b\x73\x82\x62\xad\xc3\xbe" - "\xdf\xe3\x58\x89\xf9\x2f\x57\x8e\x8d\xc1\xbe\xf7\xc6\xba\x06\x8f" - "\xf9\x01\x5d\x04\xba\x20\x74\x91\xac\xa2\xf5\x84\x7b\xd3\x80\x1e" - "\xb2\xb2\xad\x5f\xa7\xd5\x28\x1e\xcf\x6e\x83\xdf\x71\xdf\x65\xf0" - "\x63\x58\x6c\xb0\xc5\x85\xb9\x4b\x73\x73\x6c\xe3\x96\xc5\x53\x48" - "\x64\xb0\xbc\xdc\xc5\xb6\xa5\xb9\x2f\xbe\x94\xbb\x4c\x46\xf5\xe2" - "\xb7\x61\xf3\x79\x92\x88\xff\x75\x81\x71\x66\xc5\x36\x8a\xe9\xb8" - "\xea\x11\x8e\x27\x25\xd6\xff\x9a\x7d\x18\xbb\x94\x2d\xe1\x49\x0e" - "\xb7\x25\x5e\xee\x50\x3a\xdc\xbe\x14\x65\xc7\xbc\xbc\x92\x9f\x4f" - "\xd2\x2a\xff\x40\x0c\xea\x55\xfb\xf8\x3b\x08\x3a\x7d\xda\x7b\x1c" - "\xab\x76\x19\xf4\x71\x53\xb1\x71\x8e\xa0\x4b\xca\x09\xcc\xa5\x90" - "\x73\x61\xf3\xa8\xfa\x9e\xdb\xaa\xbd\xbc\xc7\x2a\xd7\x64\xe3\xf6" - "\xa5\x72\x5d\x0c\xf3\x14\xca\xa3\x1f\x52\x20\x1f\x59\x8e\x95\x19" - "\xf0\x50\x67\x15\xd7\xa7\xdb\x38\xdf\x3c\x4d\x2f\xcb\x3d\xeb\x60" - "\xd9\xbe\x54\x96\x1d\x77\x48\x9d\x03\x70\xe4\x3e\x56\x71\x0a\xeb" - "\x8f\x32\x0e\x3a\x60\xf1\x1a\x2c\x64\x40\x1a\x7f\xfb\x8f\xd3\x54" - "\x5c\xab\x95\xd2\x4f\x10\x75\xc1\x1e\x7a\x39\x67\xc0\x2f\xbb\x38" - "\x85\x75\x4a\x86\xeb\xa6\x97\x93\x19\x9e\x8a\xdb\xf5\x32\x70\x29" - "\xda\x33\xa0\x1b\xbd\xdc\x1c\x62\x73\x01\x1f\x85\xa7\x17\xb8\xc8" - "\x18\x91\xca\x6f\x4e\xb6\x9b\xe5\x64\x95\xde\x76\xa3\x3d\x80\xd7" - "\x0e\x9e\xab\x32\xf6\x5d\xdd\x7a\xbb\x19\x3f\xc6\x3d\x14\x67\x85" - "\xef\x2a\x96\x4b\x18\xc3\xc5\x89\x21\x63\x98\xd7\x5c\x86\x20\x6d" - "\xec\x80\x3f\xee\xaa\xfc\x48\xf9\xf0\xe0\x82\x67\x9e\x67\x23\x7d" - "\x66\x6a\x8a\x8d\x65\x45\xd6\xa3\x0f\x4d\x7b\x3c\x6b\xda\x9c\x79" - "\xb3\xe7\x4a\xff\xfb\xfe\xf7\xe9\x8b\xa3\x67\x08\xe7\xab\x44\xf0" - "\x46\x32\xfa\x6b\xc8\x49\x2a\x71\xab\xf8\xcc\xc5\x7b\xc2\xe3\x33" - "\x17\x3b\xf1\x3b\x8e\x1f\x34\x93\xd5\x6e\xfc\xa0\x47\x96\x1c\xd3" - "\xf9\xa5\x0b\xf8\x1e\x1b\xe0\x97\x12\xb9\xe6\xcd\x7e\x09\x6a\x2d" - "\xb5\x18\xf2\x7f\xd5\xd8\xd0\x77\x03\xb6\xdf\xea\x84\x7e\xdb\xaf" - "\x5f\x16\xac\x9e\x64\xd8\x81\x48\x9b\x08\x1b\x30\x8e\x6d\x40\xb5" - "\xf6\x53\x22\x75\xac\x48\x5b\x6d\xc0\x4e\x33\x93\x61\x03\x72\x6c" - "\x48\xde\xf7\x54\x63\x74\x75\x61\x88\x8d\xe5\x95\xf1\x02\x2f\x2a" - "\x9b\x90\xcb\xc9\xb5\x36\xb3\x27\x89\xd7\x9f\xa1\xd7\x26\x63\x8e" - "\xc7\xbc\xd3\x23\x44\x9c\x27\x49\xc7\xe9\x10\xaf\x47\xb3\xbe\xab" - "\xec\xbd\xe2\x49\x2c\x7f\xc5\xda\x51\x0f\xce\x09\xc8\x58\x6a\x90" - "\xbd\xab\xdb\x07\x78\xae\xc4\xcd\x7d\xc9\x34\x00\x1f\x74\x80\x0e" - "\xa6\x81\x36\x97\x50\x7f\x9b\xf5\x75\x0c\x63\x0d\x43\xd5\x55\x72" - "\x62\xb0\xf6\x45\x6f\x5b\x49\xc6\x57\xb6\x8d\xbf\x99\x83\x71\x61" - "\xb4\xf1\xd2\xf6\x95\x54\x45\xb4\x2f\xf3\xd2\xf6\x95\x34\xf6\xef" - "\xbb\xf4\xaf\x4b\x94\x9c\xe0\x76\x32\x1f\xa0\x9d\x47\x63\xad\xe6" - "\x6f\x85\xdc\xa7\x44\x93\xab\xc3\xd7\x68\xfa\x19\x10\xfb\x3d\x4d" - "\xa3\xa5\x9d\xe6\xdb\xac\x05\xf3\x36\x3b\xf0\xc3\x95\xf5\xec\x01" - "\x5d\x55\xf8\x14\x7e\xf6\x89\x4d\x90\xbd\xbc\xd6\x32\xd8\xd9\x36" - "\xd0\xec\xb8\xb1\x0e\x80\xfb\x76\xb6\x27\xe7\x04\xa6\x0a\x4e\x67" - "\x1a\xc0\x26\xf1\x80\xaf\xda\x95\xde\x66\x5f\xd7\x2f\xb3\xbf\x35" - "\x35\x3b\x76\x0d\xd9\x8e\xd4\xdc\xc5\xe9\x35\xe8\x3b\xb9\x36\x28" - "\xbf\x91\x37\x08\xcc\xac\x40\x1a\x0d\x02\xf7\xb8\x01\x77\xb0\x73" - "\x90\xa1\x69\x4b\x16\xdb\xf2\x16\x2c\xce\x59\xb2\x70\x61\x8a\xed" - "\xa5\xc5\x4f\xe7\x2f\x79\xe6\x79\x16\xfc\xcb\x0a\x5f\xc2\xf8\x95" - "\xe3\x36\x7d\xe6\xcc\xac\x07\xe7\x3d\xf6\xa3\x30\x1d\xc0\x5c\xe9" - "\x08\x96\xc9\x6f\x64\xad\x7d\x6e\x55\x8f\xa3\x14\xfd\xff\x6c\x91" - "\x9a\x6f\x4a\x31\xff\x3f\x93\xa0\x74\xad\x27\x3a\xd5\xd9\xcf\xd2" - "\xc6\x10\xb9\x36\x1c\xcf\x4d\xfc\xad\x83\x81\x35\x90\xd2\xca\x50" - "\x1d\xa2\x5b\x7e\xa7\xae\x74\x97\x11\x07\xa1\x70\x0c\x69\xa6\x31" - "\x95\x54\xa5\x89\x52\x37\x95\x1e\x85\xbd\x78\x1c\xef\x9b\xdc\x94" - "\x57\xad\xdb\x8f\xc7\x79\x8f\x95\xed\xc7\x00\x6c\xc9\x39\x2b\x9d" - "\x53\xb3\x56\xc6\xb0\x0f\xb1\xfc\x6e\x82\xff\xa2\xe8\xe0\x7d\x4e" - "\xde\x33\xe2\xef\x26\x54\x3c\x27\xed\xc9\x58\x99\x07\xf7\x15\xa7" - "\x48\xda\x56\x78\x6f\xab\x3b\x25\xbf\xdd\x08\xfb\x63\xcd\x58\x43" - "\xf7\xb4\xac\xb1\xc9\x33\xa9\x9b\x54\x7f\xb4\x73\x5f\x70\x7d\x59" - "\x2b\x9d\xaa\x0e\xf4\x01\xca\x5a\xd4\xba\xcf\x9a\xf9\x97\x5d\xcf" - "\x8e\x6b\x6f\x1c\x34\x06\xb9\xa3\x74\xd8\x66\x15\xaf\x98\xfd\xe0" - "\x3c\x86\x1f\x16\xfb\x64\x01\xee\xa1\x48\x9f\x2e\xe5\x97\xb0\xa6" - "\xd9\xf0\x07\xc1\x7d\x7b\xbf\xbe\xcc\xdf\xda\x80\x9d\x63\x2b\x59" - "\x33\xf4\x2c\xad\xd9\x56\x37\xc8\xba\xb2\x71\x06\x55\xf7\x9b\x1a" - "\xd6\xe3\x70\x8c\xee\xf7\x25\xc1\x33\x8f\xf1\x01\x7f\x30\xc7\x24" - "\xc3\x9f\x48\xfa\x90\x61\xce\xe2\xef\x79\x9c\x22\xc7\x8f\xe4\xf7" - "\x43\x6e\xe6\x35\x61\x47\x51\x93\xf4\x65\x73\xe4\x84\xe2\xa2\xf0" - "\x70\x8c\xe3\x75\x4b\x7e\x1f\x8a\x4b\xd1\x82\x97\x16\x4d\x28\x5a" - "\xb8\xc8\xf6\x4c\xde\xa2\x82\xac\x45\x32\x6e\xa8\x0c\x49\x5a\xb8" - "\xb2\x80\x57\xe9\x6f\x8d\x8f\x98\x2b\x74\xbf\xb3\x7e\xff\x1a\xe9" - "\x7b\xe6\xf8\x0c\xf4\xd0\x94\xef\xd9\xda\x36\x35\x1f\x3a\x3a\x2f" - "\xf5\xb3\x70\xf8\x0d\x3f\x0b\xf0\x55\x62\x95\x8a\x57\xae\xfb\x66" - "\x30\xdf\xad\x1d\x7d\x69\x99\xb5\xa9\xfd\x7e\x46\xec\xef\xd2\x97" - "\x29\xcf\x08\xc8\xd8\xd2\xaf\x71\xbf\x39\xd6\xb9\x8a\x1e\xe2\x3d" - "\x62\x9d\x9f\xd7\x66\x1b\xfc\x6c\xf8\xa8\x31\x2c\x3e\xa3\x30\xc1" - "\x17\xea\x9f\xb2\xf6\x43\xcc\x2d\xd6\xfe\x76\xbc\xac\x11\xe3\xee" - "\xd5\x9c\x8c\xc7\xae\x48\x3c\x80\xdf\x18\xa4\x87\xf8\xff\x18\xed" - "\x5c\x0b\xfd\x6f\xdd\x25\x3a\xde\x03\x0f\xcd\x84\x32\xb7\x2c\xb7" - "\x30\x9e\xa6\x2d\xc8\xcf\xe7\x71\xbd\x20\x37\xff\xa5\xa5\x4b\x96" - "\x65\x2d\x5a\xbc\x08\xa9\x0f\x2c\xe4\x70\xae\x32\xcb\x7d\xfa\x1b" - "\xdb\xe2\xdc\xdc\x1c\x95\xa4\x77\x43\xf8\xde\x88\xda\xff\x5e\x97" - "\xe6\xa6\x35\xbe\x01\xbd\x65\x5d\xb5\xd0\xd6\x1e\xc7\xef\xef\x72" - "\x4c\x4b\x9d\x62\x5d\x4e\xb8\x5d\xb0\xae\xd0\xe0\x07\xd9\x7f\x76" - "\xf6\x11\x79\xf3\x93\x6e\x21\xf7\x12\xd0\x67\xaf\xfc\x91\xbf\x7b" - "\xea\xa6\x57\x8e\xb2\x3e\x1c\x02\x67\x6f\x3f\x2d\xd7\x3e\x21\xbf" - "\x9b\xc9\xf0\xf8\x7b\x6f\x7c\x36\x1b\xef\xc1\xff\x6b\x4a\x15\xff" - "\xaf\xeb\xe7\xff\x6e\x2d\x16\x36\xce\xba\x4e\x43\x0f\x0e\x1f\x33" - "\xaf\xd0\xa5\x63\x89\x7d\x06\x5f\xb1\x1a\xb4\x35\xfa\x59\xf1\xd6" - "\x2b\xbf\x31\xd6\x26\xeb\xf4\xd8\xe2\x7c\xcf\x65\x59\xc7\x15\xc3" - "\xaf\x9a\xca\x3e\xd0\x27\xe9\x95\x75\x8a\x5f\x5e\xc9\x0e\xf1\xe5" - "\x49\x3c\x4d\xaf\xe8\xf6\xec\x2b\x45\x06\x7e\x68\xe7\x44\x4e\x63" - "\x18\x6a\xec\xaf\x0d\x28\xde\x79\xa5\xc6\xa0\x2d\xdb\x8d\x78\xde" - "\x3b\x30\xa7\xaf\x9b\xc9\x73\x9d\x7e\x36\xbd\x8f\xdb\x0f\x38\x29" - "\x06\x1c\xe4\xc5\xb3\xb9\xc9\xa0\x95\x91\x27\x94\x27\xa6\x2d\x28" - "\x80\x51\xb7\x68\xe1\xc2\xdc\xa5\xcb\x8c\x78\xbd\xc9\x4b\xf2\x73" - "\x54\x7c\xde\xfb\xd0\xfd\x2b\x30\x02\xa7\x70\x88\x5f\xa4\xaa\xdb" - "\x08\x1b\x20\x85\xed\x70\xe9\xef\x25\xf5\xff\xf5\xf7\xd4\xea\xb6" - "\xc0\x49\xfa\xc9\x44\x5c\x21\x0f\x5e\xbd\xa0\xf4\xb2\xb8\x73\x3d" - "\x8e\x57\xf3\x0d\xbd\xac\x7b\xe8\x24\xd8\xd7\xaf\x16\x1b\xdf\x61" - "\x32\x74\x05\x3e\x8b\xe2\x5c\xcc\xb1\xcf\xd7\x6f\x0b\x96\xef\xce" - "\x14\xf1\x5b\xca\xa0\x93\x24\x30\xdf\x5f\xd5\xc5\x71\xd1\x39\x5e" - "\xcc\xab\x47\x59\x97\x61\x59\xc2\x31\xce\x3b\xe8\xd5\x6a\xfe\x76" - "\xb3\x9b\xd6\xd7\x78\xe2\x76\x67\xae\x5b\x45\xe6\x9d\x5b\xe4\xf7" - "\x6f\xdd\x4d\xf5\x4c\xc7\x57\x3b\x3e\x28\x56\xdf\xd3\xe6\xef\x10" - "\x6f\xc4\x3b\xd8\xc3\x0d\xfa\x5a\x72\xbe\xbe\x8e\x97\xdf\xe3\xf8" - "\x09\xf4\xbf\x84\x46\xc5\x97\x5b\xc5\xb7\x4b\xa9\x88\xbf\xcf\xa6" - "\x62\xbd\x34\xd4\x8b\xb2\x6a\xd6\x63\x3c\xd0\x7f\xa0\x67\xbf\x9a" - "\x2f\xca\xab\x49\xc5\x89\x66\xbe\x78\x75\x3e\xb7\x13\xf0\x0a\x79" - "\x7d\x87\xd7\x76\x74\xb8\x85\x6c\xff\x41\x8f\x1b\xcb\xba\x1c\x9e" - "\x33\x82\x17\xcf\xd4\x63\xee\x36\x63\xae\xf2\xe8\xdf\xfd\x99\xcb" - "\x6b\x9e\xc3\xd7\xb8\x31\x17\xdd\x24\xb2\xfc\x89\xbc\xd7\x70\x95" - "\xf1\x5d\x25\x5e\xf7\x04\x6e\x7b\x06\xf6\x10\x50\x1e\x34\x01\x3f" - "\x96\x76\xd0\x4f\xa4\xaf\x3f\xf3\x22\xd3\xae\x17\xf4\xe2\xef\xef" - "\x8a\x8b\x67\x1a\x60\x87\x5e\x75\x8a\x7e\xf2\x39\xd3\x8d\xf7\xfd" - "\xd8\x5f\x07\x69\x16\x8e\x1f\x8d\xfe\xf9\x88\x69\xc6\xb8\x88\xb2" - "\xad\xd9\xfe\x9e\xcc\xef\xf3\x19\x42\x96\x47\xab\x8b\xa1\xfb\x2d" - "\xe4\xb1\x5c\x3e\x8f\xed\x39\xfe\xe6\x07\xdf\xdb\x73\x44\x50\xd2" - "\x7c\x15\xd3\xbc\x7c\xde\xea\x4e\x11\xfc\xd2\x41\xe2\xa8\x97\xe8" - "\x4b\x8d\xfc\x3e\x2d\x86\xf1\xd6\xec\x67\xf8\x9c\x63\x3d\xb9\x8a" - "\xca\x08\xf5\x9a\x37\xad\xa2\x44\x3e\x17\xca\xdf\xb3\x68\xf5\xd6" - "\x50\x6b\x41\x0d\xfd\xa7\xbf\x8a\x9c\xcb\xf9\x9c\x7f\xb9\xff\x4f" - "\x45\x55\xbc\x97\x12\x87\xfb\x77\x6d\x8f\x73\x5d\x65\x55\x7f\x3a" - "\xf6\x67\xfa\x93\xf3\xcf\x64\xfb\xb1\x7c\xde\xd5\x9c\xf9\x9f\xd4" - "\x9c\xf6\x9f\x64\xef\x10\x41\xb6\x09\x4a\x5e\xe0\x3a\xca\x00\xab" - "\x9e\xcf\x53\x26\x06\xbb\xad\xf1\x68\xbf\x69\x4e\x11\x51\xab\xd7" - "\x03\x1e\xfa\x3d\xe3\x38\xae\xf6\x3c\x99\x9d\x8b\xff\x20\xef\x95" - "\xae\x7e\xa6\xde\x95\xd3\xce\x7a\x92\x9f\xcf\x8f\xf2\xde\x13\x74" - "\xdd\x60\x05\xe3\x18\x50\x78\xf3\x77\xa4\x8d\xf2\xd0\xa3\xf4\xf2" - "\x65\x72\x8d\x77\x27\xd3\x03\x38\xb5\xcc\x55\x34\x69\x6e\x07\x4d" - "\x1f\xd7\xe9\x93\x19\x4a\x9f\xb2\x74\xa6\x0f\xc7\x1e\x0c\xa2\xbf" - "\x80\x5b\x1a\x68\x10\x34\xea\x00\xce\x66\x7d\xdd\xce\xbc\xe9\x3c" - "\x25\x38\x17\xf3\xb7\x89\xca\xdf\xb2\x64\x98\xcc\xc1\x8b\x67\x1b" - "\x2a\x2e\x90\x89\xfb\x8d\xd7\xe7\x2b\xe4\x7b\x49\xf3\x0d\xdc\x67" - "\xa1\xdf\x33\x67\x3e\xe4\x6f\x9a\xa3\xbf\xca\x80\xc3\x58\xf4\x55" - "\x3d\x5f\x15\x6f\x57\xb3\x2e\x6f\xec\xe3\x0e\xa4\x83\xb7\xfd\xfc" - "\xdd\x41\xb9\x2e\x51\x3e\x36\x08\xde\x66\x7b\xbe\xf6\x35\x4a\x08" - "\x3a\x5e\xf1\xec\x84\xac\xa9\xc1\x5c\x56\x3b\x82\x12\x79\x2d\x6b" - "\xbb\xf4\x1f\x5e\x9f\x6c\xc8\x9e\xf5\x23\xf9\x4c\x52\xf9\x5c\x4d" - "\x7e\x5f\x6e\x77\x81\xce\xe7\x05\xc8\x33\xd3\x4d\xd7\xee\x52\xf2" - "\x77\x7d\xa6\x31\x96\xa0\x27\x79\x0c\xfe\xc7\xf8\xcc\xf0\x30\xbf" - "\x4b\x3f\x04\x37\x6c\x58\x8b\x60\xdf\xce\x81\x6f\xaa\xad\xaf\x34" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 21:30:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E802210656CA; Thu, 14 Jan 2010 21:30:22 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D62FB8FC14; Thu, 14 Jan 2010 21:30:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ELUMjE051501; Thu, 14 Jan 2010 21:30:22 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ELUMr9051498; Thu, 14 Jan 2010 21:30:22 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001142130.o0ELUMr9051498@svn.freebsd.org> From: Andrew Gallatin Date: Thu, 14 Jan 2010 21:30:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202306 - in stable/7/sys/dev: mxge ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 21:30:23 -0000 Author: gallatin Date: Thu Jan 14 21:30:22 2010 New Revision: 202306 URL: http://svn.freebsd.org/changeset/base/202306 Log: MFC: r194747,r202120: Update mxge(4) firmware to 1.4.48b (latest available) from Myricom. Modified: stable/7/sys/dev/mxge/eth_z8e.h stable/7/sys/dev/mxge/ethp_z8e.h stable/7/sys/dev/mxge/rss_eth_z8e.h stable/7/sys/dev/mxge/rss_ethp_z8e.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ste/if_ste.c (props changed) stable/7/sys/dev/ste/if_stereg.h (props changed) Modified: stable/7/sys/dev/mxge/eth_z8e.h ============================================================================== --- stable/7/sys/dev/mxge/eth_z8e.h Thu Jan 14 21:30:06 2010 (r202305) +++ stable/7/sys/dev/mxge/eth_z8e.h Thu Jan 14 21:30:22 2010 (r202306) @@ -28,6951 +28,7255 @@ POSSIBILITY OF SUCH DAMAGE. $FreeBSD$ ***************************************************************************/ -static unsigned int eth_z8e_uncompressed_length = 357812 ; -static unsigned int eth_z8e_length = 111096 ; -static unsigned char eth_z8e[111096 + 1] = - "\x78\x9c\xec\xbd\x7f\x78\x54\xd5\xb5\x37\xbe\x72\x32\xc0\x24\x0d" - "\xcc\x88\x29\x1d\x11\x75\x50\xb4\xd1\xf2\x23\x2a\xb6\x68\x41\xa3" - "\x80\xc5\x5e\x7e\xa4\x8a\x6d\xaa\x68\x82\x26\x34\x68\x84\x08\x11" - "\x07\x08\x99\x61\xc0\x36\x41\x20\x51\x02\x44\x08\x49\x6c\x43\x8b" - "\x14\x24\x56\xda\xd2\xb7\x56\xa7\x25\xbe\x0f\xbd\x0d\x19\x6e\xbf" - "\xd0\x37\x57\xf1\x76\xe4\x46\x9a\x72\x13\x18\xc9\x40\xc6\x64\x66" - "\xf6\xfb\x59\x7b\x9f\x93\xcc\x0c\x13\x94\xdb\xfb\x7c\xdf\x7f\x9a" - "\xe7\x99\x9c\x73\xf6\x8f\xb5\xd7\x5e\x7b\xed\xb5\xd7\xda\x3f\xd6" - "\x26\xfa\x07\xfe\xb4\xbd\xbe\x7f\x24\xfb\x3f\xff\xfe\xf9\xf7\xcf" - "\xbf\x7f\xfe\xfd\xf3\xef\x9f\x7f\xff\xfc\xfb\x7f\xf3\x77\x5e\x33" - "\xd1\x1f\xaa\x88\x7a\xdc\x66\x9b\x8f\xba\xde\xd9\xbe\x45\x84\x10" - "\x9c\xe4\x23\xb3\x8d\x9f\xfa\x8f\x5e\x45\xb8\x56\x45\xe6\x1b\xad" - "\x94\x36\x7d\x17\x51\xf5\x28\xd1\xb9\x65\x9b\xf0\xaf\xdb\x26\x3a" - "\x67\xec\x26\x6a\x1e\x47\xb4\x65\x94\x08\x00\xce\x02\x1f\x7d\x7f" - "\x1c\xc3\x59\x87\x6f\x8e\x5f\x3f\x4a\xf8\x11\x5e\x82\xf0\x5a\x0e" - "\x5f\x3b\x0a\xb0\xd2\x89\xdc\xdb\x44\x30\x0a\xae\x99\xf3\x33\xcc" - "\x19\x63\x25\x3e\x8d\x71\x70\x18\xc6\x21\x1f\x3d\x96\x7e\x19\x18" - "\x69\x06\x5e\x01\x8d\x92\x18\x5e\xb7\x9b\x6c\x01\xb7\xe7\xcb\xc8" - "\x1b\x40\x9d\x32\x38\x6f\x25\xd2\x08\x37\x25\x37\x3b\x42\x64\xbf" - "\x91\x92\x4e\x53\xca\xdf\xf1\xd4\xf0\xfc\x88\xeb\xbb\x4e\xe5\x1b" - "\xc7\x30\x90\x37\xa9\xc7\x9d\x92\xd9\x9f\x17\xb0\xed\x65\x64\x42" - "\xda\xb7\x02\x9a\x47\x53\x69\xad\x29\x7a\x5a\x0d\x69\x17\x18\x69" - "\x55\x9c\xf6\x90\x1e\xf7\x25\xc4\x39\x62\xe3\x4c\xaf\xea\x71\x69" - "\x88\xab\x8e\xc3\xcf\xe4\xed\x0d\x11\xca\x61\x5c\xec\x3e\x3c\x0f" - "\xa3\x65\x74\xdc\x18\xa7\x66\xa4\x77\x71\xfa\x19\x76\x11\x9a\x6f" - "\x27\x89\x0b\xd3\x0e\x69\x67\x1d\x6e\x50\x69\xf1\x3e\x86\xf3\xeb" - "\xef\x76\xbc\xcb\x70\xbd\xdc\xab\x7a\xdc\xa9\x69\xb1\x38\x11\xe9" - "\x71\x23\x11\x97\x11\x1b\xf7\x6e\xa6\x1e\xf7\x15\xc4\xcd\x88\x8d" - "\x4b\x32\xf2\xd9\x10\x97\x67\xc4\x45\xb7\x93\xe2\x38\x13\x7e\x43" - "\xcc\x44\x43\xf1\x1b\x66\x36\xda\x6e\xb9\x4d\x44\x9c\xd7\x90\x49" - "\x6c\xd8\xd2\x11\x71\x0b\xf2\x3a\x82\x64\x1f\x4d\xce\x53\x94\x7a" - "\x0c\x70\x69\xf3\x2a\x32\x3b\x8b\x45\xd0\xeb\xe8\xa4\x56\x7f\x27" - "\x39\xfd\xa2\xc3\x1b\xba\x40\x65\x17\xc8\xec\x0d\x75\x51\xd9\xf3" - "\x64\x6b\x2e\xfd\x84\x12\xf1\x45\x44\x13\xe4\x1c\xc3\x79\xdb\xa9" - "\xb5\xb6\x9d\x9c\xb5\xb1\x79\x9d\xd7\x91\xed\x28\xbe\x41\x73\x0b" - "\xe3\xd1\x6c\x0f\x51\x28\x75\x4b\x47\xe9\x6b\x64\x72\x8e\x25\xed" - "\x68\xbe\x47\xc7\xe5\x4b\x35\x8c\xcb\xfa\x33\x64\xfe\xc9\x22\xb4" - "\xfd\x19\xc6\x77\x67\xc7\x81\x55\x41\xed\xb0\x6d\x36\x1d\xb6\x9d" - "\xa4\x66\xdb\x34\x6a\x76\xcc\xa0\xcd\x67\x28\xed\x70\x70\x2a\x35" - "\x9b\x1e\x44\xdf\x98\x41\xde\x4e\xbc\xdb\xc3\x48\x13\x20\xfb\x0a" - "\x42\xbb\x7e\xa9\xbc\xfa\x19\x32\xfb\x14\x4c\xb4\xe7\x97\xaa\x7f" - "\x5f\x42\xc4\x34\xe3\xef\x44\xf5\x58\x7e\x0d\xd9\x80\x5f\x07\x70" - "\xb9\x1b\xb8\x1c\x1d\x67\xa3\x4c\xe0\x3c\xcc\x5b\x13\x22\x53\x29" - "\xa5\x0c\xd2\x27\xd2\x23\x6e\xd9\x37\x3b\xeb\xb6\x89\x0e\xe6\xad" - "\xee\xd5\x39\xe8\x5f\x69\x26\x94\xdd\xc8\xe5\x6d\x46\x1f\x75\xbe" - "\x4e\xa6\xee\x17\x73\x92\xea\xb7\x89\x76\xc4\xd9\x8d\x38\xf0\x7b" - "\x3b\xe2\x3b\x26\xa5\x93\xd5\x1b\xca\xa2\xf7\x7a\x3b\x4c\x0c\x63" - "\x44\x80\x92\x18\x9e\xc5\x41\xc9\xa8\xcf\x10\xe0\xf3\x69\x3d\xc2" - "\x6f\x42\x3a\xe4\x47\xfb\x57\x04\x38\xbf\xf8\xca\xe3\x9f\x46\xbe" - "\xf2\xb8\x3f\xb2\xfd\xf1\xf3\x62\xfb\xe3\xdd\xe1\xed\x8f\x07\x9c" - "\x2b\xc9\x1c\xfe\xca\xe3\x17\x5a\x8b\x65\x1b\x58\x5b\x8b\xd1\x06" - "\x61\x32\xaf\xe9\x22\xeb\x93\xcf\xa3\xed\x43\x1f\xd1\x9a\xc5\x64" - "\x8b\xa4\xec\x68\xf0\x86\x4e\xd0\x93\xa5\x24\xf0\xde\x94\xa8\x7e" - "\xdd\xa9\xb5\x19\x8a\x67\xcd\x5c\xa7\x36\x9f\xf6\xaa\x8f\xcb\xf5" - "\xa7\x34\x66\xe0\x37\x1e\xbf\x4c\xfc\x26\x8b\xd4\xda\xc9\xa0\x95" - "\x73\xc4\xda\x24\xaa\xeb\x25\x9a\x14\xa1\x24\x34\x51\x00\xf8\x5b" - "\x07\xa1\xdb\x98\xc8\x86\x37\x9b\xbe\xea\xa2\xb2\x9e\x9e\x42\x62" - "\x99\xc2\xf2\x84\xe5\x4b\x8f\x7b\x78\x96\x4f\xdb\x62\x97\xbc\xbf" - "\x4d\x04\x44\xea\x9b\x4d\x08\xef\x08\xac\x2e\x4c\xf2\xaf\x2e\xd4" - "\xba\x53\xdf\x7c\x1b\x69\xf2\x91\x26\x47\xa7\x61\x07\xc3\x42\x3f" - "\xf1\x0f\x0f\x51\x32\x60\x16\xff\xfa\x62\x9b\x69\xd7\x36\x71\x12" - "\xe9\x36\xf6\xc3\x02\x6c\xc0\x01\xfd\x87\x37\x18\x61\xa0\x75\xfb" - "\x26\xa4\xe3\xfc\xde\x60\x16\xcb\x5d\x9f\xb7\xa8\x83\x2c\x21\x4a" - "\x15\x7d\xaa\x3c\xa4\xe9\x60\xf9\x38\x3c\x48\x43\x7b\xdc\x94\xcd" - "\xb0\x39\x9f\xb7\xb3\x83\x90\xef\x6d\xe1\x2c\x84\x5c\xa2\xb9\x3d" - "\xa2\x30\x09\xb2\xb8\xfd\x30\xf2\xab\xb2\x47\x98\x0d\x1c\xb9\x0c" - "\x6e\x6b\x89\x27\xf8\xe1\x70\x51\x90\x86\xd7\x50\x32\xf2\x3d\xc2" - "\xf0\x18\x16\xf8\xc0\x87\xba\xbe\x7d\xb8\xc8\x4f\x11\x11\x03\xd3" - "\xa7\xc3\xcb\x89\x81\x87\x70\x01\x78\xcc\x7f\xcd\xc8\x33\xbc\x41" - "\xc2\x7b\xf8\xd7\x11\x86\x17\x24\x93\x5d\xe2\xfb\x5d\x86\xd1\xc3" - "\x32\x0d\x30\x3d\x2b\x1e\xa0\x4e\x1a\xe1\xf1\x3b\x0b\x93\x5b\x4b" - "\x89\x38\xff\x81\xb2\x8e\x21\xa2\x3b\x27\x99\x79\x8e\xe3\xbd\xa1" - "\xf3\x9c\xe6\x75\xd1\x5d\x98\x3c\xbc\x93\x4c\x8c\x33\xf2\x3b\x18" - "\xcf\xe8\xb6\x7c\x78\xe6\x77\xa7\xd1\x9c\xfb\xa7\x4f\xa3\xec\xef" - "\x3d\x8c\x7f\x73\xa7\xd1\x23\xf8\x65\xde\x3d\x21\xf3\xce\x6f\x4c" - "\xb9\x93\x72\x1e\x7c\x08\xa1\xd3\xa7\xdd\x9e\xf9\xad\x09\xd9\xd3" - "\x1f\x9a\x49\xdf\x99\x7f\x47\xe6\x1d\x77\xd0\xfd\x33\x67\xdf\x9e" - "\x99\xa9\x3f\x6f\xcf\xe4\x24\x8f\x4d\x99\xf9\xc8\x84\xec\x65\x4b" - "\x4b\x96\x4e\x98\xfb\xd0\xf4\xd8\xf1\xd0\x16\x59\x11\xa1\x3a\xf0" - "\x86\xe8\x9e\x45\x02\xf2\x01\xfd\xc0\xcf\x7d\xc1\x53\x76\x1e\xfd" - "\xdc\x7a\x73\x3d\xb7\x8f\x94\x91\x23\x4e\xa2\x6f\x9b\x7a\xdc\x16" - "\x17\xe8\x54\xc3\x74\xc2\xb8\x83\x34\xe9\xaf\x21\xee\x63\x5d\x2e" - "\x73\x7c\x43\x5c\xfc\x1a\xc4\x9f\x8e\x8a\xf7\xc4\xc5\x2f\x44\xfc" - "\x7f\xe9\xf1\xa0\xb1\xc5\x17\x1b\x7f\x15\xe4\xfe\x88\x73\x9b\x11" - "\x3f\xa2\x98\x92\x81\xab\x7f\x9d\x1c\xab\xad\xe6\x7e\x3e\x03\x1f" - "\x37\x97\x66\x91\xf8\xc9\xac\x24\xb4\x4b\x12\xc6\x38\xe4\xb3\x14" - "\x82\xdf\x02\x91\xd4\xc6\x29\xa0\x3f\xa9\x30\xeb\x7c\xc1\xdf\x1b" - "\x1a\xef\x16\x4e\x84\xad\x92\x61\x8f\x72\x18\xda\x20\xb9\xa7\xbb" - "\x90\xc4\x6a\x19\x9e\x8c\xf0\x3f\xd6\x33\x0f\x70\xfa\x3e\x99\x7f" - "\x18\xc2\xde\xc0\xf7\xdd\x80\x79\x8f\x0e\x13\xe3\x6e\xfa\x21\xc0" - "\xfb\x66\x44\xe4\x90\x30\x9f\x6b\xc3\xfb\x54\xcf\xaa\x4e\x3a\x5d" - "\x4c\x9a\x0f\x71\x11\x27\x60\xf6\xf5\x97\xef\xe0\xbc\x28\xcb\xd4" - "\xd3\x57\x88\xb1\xce\x5a\xca\x63\x36\xc2\xee\x8e\xc2\xb1\x90\xcb" - "\xe4\xfe\x86\x7a\x77\x83\x26\x29\xa8\x6b\x20\x8e\x26\x56\xce\x53" - "\x29\x79\xba\xf1\x6e\xc0\xc9\x47\x7f\x82\x0c\x21\x8d\xeb\xe0\x1b" - "\x80\xa1\xd3\xf4\xaa\xc9\x71\xf9\xb3\x01\x9b\xfb\x27\xcb\x90\x64" - "\x1f\x59\x82\x46\x3b\xab\x36\xba\x2a\x3f\x36\xfd\xc8\xf1\xdd\x6e" - "\x4b\x12\xd3\x19\xcf\xe1\x48\x33\x0c\x7d\xd8\xc4\xf2\xf6\x70\x29" - "\xeb\x3b\x57\x55\xc7\xc1\x3f\x88\x74\xe9\x8c\xe3\x00\x4e\x96\xa0" - "\xae\x9f\xb4\x23\xbf\x19\x79\x8e\xc4\xe5\xe9\x40\x9e\x31\x42\xe5" - "\x49\x56\xf4\xb9\x24\x4f\x28\x0e\xaf\x31\x92\x76\x1b\x64\x1e\x13" - "\xfa\x60\x7f\x1e\xd9\x27\x63\xcb\xe5\xba\x41\x8f\x19\x99\x15\xc7" - "\x7f\xd0\x31\x2c\xe3\x98\x16\xa2\x6f\xd6\x97\xd0\x06\x77\x20\x6c" - "\x38\xf0\x98\xc6\xed\xc6\x7c\xe7\xf5\x07\x21\x33\x66\xa5\xa9\xb1" - "\x6f\xe4\xeb\x96\x52\xe2\xf7\x09\xfc\xce\xb0\x45\xdf\x6c\x9d\xe7" - "\x46\xbe\x8e\x27\x87\x97\x73\x38\x68\x8b\xb8\x7f\x89\x28\x98\x23" - "\xdf\x87\x2c\xd1\xf0\x1d\xd6\xcb\x18\x82\xef\x24\xe0\x7e\x0f\xe4" - "\x11\x78\x64\x16\xb7\xff\xe4\xd3\x74\xb5\x1e\x7f\xf5\x05\x4e\x8f" - "\xf7\xdb\xf5\xf7\xa4\x58\xbe\xbb\xba\x4b\x96\x2d\x79\x4f\xe5\x8f" - "\x28\x3e\x9b\x8e\xb8\x7f\xc7\xf3\x21\x3c\xdf\xc7\xf3\x3b\x78\xbe" - "\xee\xbc\x40\x36\x67\x18\xe3\xaf\xfa\xde\x84\xe7\xc3\x78\xae\xc4" - "\xf3\x11\x3c\x0b\x98\x5f\x20\x8f\x89\xdb\x18\x6d\xab\x78\x02\xb2" - "\x34\xa2\xfa\xc6\x30\x45\xcb\xab\xe7\xeb\x65\xaa\xfe\x22\xa2\xc2" - "\x54\x3a\x4d\xb5\x9b\x1e\xd6\x37\x8b\xe9\x92\x0d\xf8\x99\x5c\xbe" - "\x0e\x6b\x48\x02\x58\xa6\x04\xb0\x92\xa2\x61\xe1\x69\x2a\x0b\x08" - "\xe1\xa3\x91\x7e\xa6\x2b\xbe\x03\xa0\x09\xf4\x80\x91\xcd\x4c\xa7" - "\x81\xf4\x23\xf3\xa2\xda\x1b\x7a\x60\x7a\x66\x6c\x7b\x5b\x82\x4c" - "\xb3\x4a\x5d\x36\x30\xff\x4b\xbc\x85\xec\x3f\x43\x0d\x9e\x61\x19" - "\xc8\xb4\x48\x2e\xe5\xfe\x90\x0e\xfd\xff\x27\x7e\x86\xc1\x71\x81" - "\x94\x03\x99\x9c\x3f\xd9\x21\xe3\xaa\xa0\x6f\xb4\x19\x71\x5c\x76" - "\x54\xbe\x7d\x46\xbe\x48\x6a\xb5\x55\xe6\x5d\x5e\x98\xcc\x63\x25" - "\x8f\x79\x18\x7b\x3a\x90\xe6\x98\x8f\x86\x5b\x07\xb3\x0b\xfa\xb4" - "\xf4\xdf\x43\xaf\x3c\xdf\xe7\xcc\x20\x51\x5e\x4d\x13\x88\xb4\xf1" - "\x2e\x4a\xf1\x86\x8e\xd3\xbc\x90\x08\xe3\xd7\x97\xe1\xa2\xab\xbc" - "\xa1\x16\xfa\x2a\xd1\x58\x6f\x68\x23\xc6\x98\x12\x8e\x7b\xef\x26" - "\x4a\x4a\xc2\xd3\x79\x1b\x69\x49\xde\xd0\x64\x84\x37\xd2\x4d\x2e" - "\x53\xd2\x83\x2f\x89\x1e\x6f\x68\x2a\xbe\x8b\x68\xc6\x4b\xe2\xaf" - "\xb9\x61\xb2\xce\x1e\x22\x9c\xde\xd0\x6c\x7a\x70\x48\x44\x78\x43" - "\xcd\x88\xcb\xa7\x79\xe1\xcf\xc4\xbc\x70\x8f\x10\xe6\x6a\xeb\xbc" - "\xf0\x39\xbc\xff\x55\x80\xd6\x78\xbe\x27\x58\x97\x9d\x17\x76\x0a" - "\x51\x51\x4d\xb9\x2b\x35\xea\xc3\x38\x29\x52\xaa\xad\x62\x43\xb5" - "\xbd\x4f\x14\x26\x8b\xd4\xea\x1b\xfa\xfa\xf0\xdc\x50\x7d\xbd\xfc" - "\x2e\xaf\xce\x04\x1c\xfb\x04\x17\x74\x3e\xe0\x1e\x81\x9c\xf1\x86" - "\x4e\xa2\x9c\x4f\x68\xde\x4a\xbf\x60\xfc\x47\xac\x15\x78\x7f\x4f" - "\x60\xac\xb4\xcc\x5b\xe9\x14\xb9\x21\x32\x03\xa6\xdd\x1b\xea\x24" - "\x94\x93\x09\x98\x13\x24\xcc\xf2\xea\x6c\xa4\xf5\x73\x3a\x86\x65" - "\xc0\x61\x18\x9c\x76\x5e\x98\x2c\x48\x9f\xdd\x57\x51\x9d\x85\x5f" - "\x1e\x7e\x55\xc8\xfb\xe3\xbe\xd5\x92\x86\x4d\x78\xf7\x7c\x06\x7e" - "\x91\x34\x0c\xd3\x30\xa4\xe5\x31\x78\x46\x8f\xc2\xd7\x27\xf1\xdd" - "\x50\xfd\xd7\xcf\x54\x3d\xfe\x43\xaf\xc7\x47\x1c\x0e\x9e\x1a\x22" - "\x36\x6c\xa5\x80\x53\xc6\x09\xe4\x9b\x2f\xf3\x95\x6f\x85\xfc\xdf" - "\x6a\x05\x7d\x92\xe7\x85\x85\x8b\x69\x08\xba\xba\x98\x8e\x4c\x2b" - "\x51\x81\xf8\x94\xad\xa0\xcf\xd6\x3b\xfa\x2a\xb6\x82\x46\xc0\x25" - "\x75\x6b\xd6\x67\x12\xf6\xd6\xfb\x00\x67\x41\x0f\x97\x67\xde\x9a" - "\x05\x58\xd9\x9f\x69\x76\xd0\x42\x04\xe7\x85\xd6\x86\x72\x57\x52" - "\x72\x06\xb9\x80\xef\x56\xc0\x2a\x42\x1d\xd7\xe3\x39\x1b\xf1\x74" - "\x35\xca\x7a\x0f\x70\xb3\xb8\x3c\x94\x91\x0d\x98\x73\x00\x2b\x9f" - "\x71\xea\x75\x93\x15\xdf\x79\xbd\x0a\x3f\x57\xa4\x7c\x6b\x43\xc4" - "\xbc\xb5\x2a\x9a\x77\x14\xcd\x98\x67\xf6\x73\x98\xd5\xe0\x93\x70" - "\xf9\xd6\xe2\xaf\x11\x59\xe7\x06\x44\x88\x79\x65\x12\x15\x27\xb5" - "\x06\x5a\x28\x37\x64\xa6\xd6\xe2\x83\x74\x1b\xb1\xfd\x11\xa0\xd6" - "\xc0\x46\x7c\xef\xc2\xb3\x84\x8e\x76\x36\x12\xe3\x38\xb7\x38\xb0" - "\x36\x6c\xde\xea\x3f\xda\x39\x93\x90\xff\x3d\xe0\x18\x79\xb2\xd8" - "\xe4\x6a\x2d\x0e\xf0\xb7\xf3\x68\x27\xf8\x33\x2c\xc2\xa1\xf2\xad" - "\x79\x21\xf3\x36\x9a\x7b\x41\xf8\xe7\x74\xba\x86\x20\xac\xcf\x92" - "\x24\x42\x16\x87\x53\x1c\xed\x5c\x4f\x4f\x5e\xa0\xa4\xa3\x85\x07" - "\x25\x9f\x3e\x59\x5c\x4c\x32\xff\x85\x90\xe5\x89\x4e\x17\x3d\x51" - "\x48\x23\x90\xfe\x1c\xf3\xac\x18\xe1\xa2\x96\xf6\x7c\x9a\xd3\x15" - "\x4a\x9e\x7b\xa1\x4f\xb4\xe4\x6d\xa4\xa3\x85\x1b\x99\x1e\x2e\xd6" - "\xd3\xe7\x74\x75\x8b\xb9\x17\x7a\xc4\xd1\xc2\xfd\xd4\x92\x77\x90" - "\x66\x7f\xe2\xb1\x84\x2b\xb6\x16\x47\x52\xb6\x56\x45\x2a\xb6\x36" - "\x84\x2a\xb6\xe6\x85\x53\xb6\xfa\x43\x29\xdb\xa0\xb3\x6d\x2b\x06" - "\xfd\x52\x64\x5b\xa4\x6e\x5b\x82\x77\xbb\x6c\x5f\xf3\x36\x17\x74" - "\x70\xc9\xff\x5e\xd8\xde\xa2\x7c\x5b\x83\x48\xd9\xe6\xea\xab\xd8" - "\x56\xa5\xf8\x13\xdf\xa9\xdb\x1a\x14\xaf\x6c\x6b\x52\x7d\x60\xdb" - "\x01\x6e\x5f\xa4\xf1\xe0\x77\x0c\x3f\xe8\x94\xdb\x33\x01\xf3\x2a" - "\x86\x1f\x31\x6f\xcf\x8c\x94\x6f\xcf\x12\xe6\xed\xd9\x80\xad\xcd" - "\x7d\x3e\x08\x3a\x82\x86\x0e\xd0\x9f\x6d\x23\x47\x18\xdf\x61\x7a" - "\xf2\x79\x72\x7a\x1d\x27\xf1\x7e\x92\xc4\xbb\x55\x34\xf7\x79\xee" - "\x7f\x61\x3c\x9d\x02\x34\xb2\x44\x52\x00\xa7\x02\x70\x52\x00\x67" - "\xc3\xf6\x62\x5d\x36\x03\x8f\xed\x4b\x15\x1e\xdb\x8b\xfb\xfa\x32" - "\x58\xbf\x33\x21\x8d\x0b\xe1\xe7\xe5\x78\xc2\x3c\x58\xbe\xdd\x3f" - "\xe7\x25\xe1\x17\xe6\x9a\xec\xc8\x50\x92\x7d\x29\xf2\xae\x10\xaa" - "\x3f\x75\x82\x87\x47\xbb\x72\x1d\xd4\x20\x2a\xb6\xfb\x45\x4a\x0d" - "\xe0\xef\x78\x15\x70\x92\x85\x94\x47\x3b\xaa\xfa\x2a\x76\x34\xe1" - "\xd7\x30\xd0\x07\x99\x16\x3b\xaa\x62\x6d\xe7\xc4\x76\x73\x8f\xfb" - "\x9a\x16\x1f\xed\x3f\xc6\xb2\x0f\xef\x6d\x3e\x7a\xb3\x51\x7f\x6f" - "\xf7\x51\xb5\xb4\xc1\x59\xe6\x15\x97\xd1\x97\xcf\xd0\xe8\x1a\xd0" - "\x84\xdf\xd3\xf0\x5e\x3b\xef\xd6\xf7\x44\xa4\xfc\x43\x33\x78\xa0" - "\x87\x65\x90\x70\x4f\x66\xf9\x9d\x05\x7b\xc7\x2c\x7a\x32\xd2\x30" - "\x86\x6c\x16\x7d\x36\xb6\xcd\x2c\xf8\x1e\x01\xfa\x8e\xc3\x73\xe4" - "\xae\x8b\x94\x8e\x9f\x6d\x97\x3b\xe2\x62\x59\x8d\xf7\x4c\xf1\xa2" - "\x2d\x75\xf3\x0a\x1a\x6f\x09\x90\xb9\xde\x1d\xc9\xb1\xac\xb5\xb2" - "\x8d\x92\xce\xef\xc2\x5d\x33\xbb\xfe\x22\x99\x78\xcc\x89\xa4\xa0" - "\x3c\x87\x45\x88\xe5\x19\x54\xbf\x0c\xb2\xc9\x4d\xb6\x7a\xb7\x68" - "\x0a\xf7\x64\x68\x8c\xa7\x81\x0b\xe3\x06\x3c\xaf\x03\x9e\xfb\x1e" - "\x5d\x99\x45\xef\x3b\x28\xa1\x6d\xdf\xe3\x1e\xdd\x5f\xff\x41\xe2" - "\x3b\x0d\x9a\x24\x8e\xbf\x36\xcd\xa0\xd3\x60\xf6\x33\xf7\xfb\xf0" - "\x45\xe1\xaf\x5c\x42\x4c\x0b\x9b\x33\x24\xfe\x13\xb2\xd7\x55\x16" - "\xa6\xeb\xe6\xad\xbc\x41\x78\xfd\xc2\xe3\x75\x74\xc9\xf9\xaf\x7a" - "\xa4\x29\x0b\x89\x08\xdb\x8b\x6c\x2b\x56\xb3\xed\x57\xd1\x58\x2c" - "\x2a\x1a\x8b\xba\x57\x88\x50\x9d\xb4\xef\xae\x75\xf9\x68\x72\x93" - "\x6a\x9b\xad\x2e\xe8\x47\xed\xdd\xe6\xc6\x22\xc0\xbe\x8a\x61\xb7" - "\x16\x0b\x4f\x24\xa5\xb1\x04\xe9\xf6\xf8\xe8\x7f\x99\xa3\xe7\xc0" - "\x30\xde\x75\xae\xdf\xc6\x63\xde\xb5\xcd\x3e\xba\xfe\x92\x7a\xa9" - "\xd9\x3a\x42\xbb\xd8\x07\x26\xf9\x92\xf4\x69\x17\xe3\xcf\x8a\x5f" - "\x56\xe2\x68\xa3\xde\xe8\x9b\xd4\x0d\x5b\xc6\xb9\x86\xc6\xa0\x1d" - "\xae\x3d\x43\x63\xee\x76\x3a\xc4\x69\xe1\xbe\xf6\xd8\x4f\x56\x05" - "\xa1\x2b\x8c\x99\xe1\x23\xd7\x9e\xc1\xe8\x26\x58\x4e\x5e\x14\x1d" - "\x95\x2b\xfa\x69\xf6\xf1\xbc\x95\x11\xc1\xef\xdc\xef\xea\x11\xce" - "\xf4\x00\x9c\x8d\x06\x2d\x06\xa1\xbf\x49\x94\x37\xba\x94\x6e\x38" - "\xa6\x53\xb8\x05\x79\xae\xe7\x79\xb1\x31\x4a\x77\x2b\xdf\x56\xd5" - "\x0d\xb9\xc2\xf3\x07\xd0\xb5\x02\xcb\x6d\x22\x08\x98\x3e\x1f\xdd" - "\x9c\x69\xd8\x35\xde\xd0\x4c\x96\x2d\x55\x83\xcd\x3b\x0e\xc0\xbf" - "\x3e\xad\x75\x0c\x29\xb9\x64\x3e\x50\x52\xa6\xf0\x66\x1d\x2e\xc0" - "\xb6\x5c\x3b\xe2\x97\x07\x44\x87\x28\x3f\x50\xb8\x99\xc3\x56\xf4" - "\x72\xd8\x70\x96\x69\x9e\x65\x8c\xd3\xf5\xc3\x3d\xd7\xf7\xd2\x69" - "\xe8\x43\x6c\x03\x2a\xdb\xe8\xba\xe0\xe1\x12\x35\xe7\xd6\xe3\xbe" - "\xce\xe1\xa3\x5b\x82\x06\x5e\x2c\x07\x41\x5f\xa6\xb5\x8b\xfb\x3c" - "\xcf\x49\x2d\x2f\x15\x41\xe0\xea\x42\xda\x46\xa3\x0e\x5c\x3f\x55" - "\xaf\xeb\x0e\x45\xd7\x0b\x38\xf8\xa1\x47\x4b\x1a\x2c\x5f\x49\x66" - "\xbb\xa2\xb5\x99\xeb\xcb\x75\xe1\x3a\xcb\xba\x68\x90\xb7\x18\x67" - "\xbc\xa1\xbb\xa0\x97\xc9\xf0\x86\x1e\xf7\xf5\xd0\xfb\x6e\xae\x56" - "\x3a\xd7\x75\x0e\xa6\x65\xc2\x76\x34\x6f\xcd\x76\x7e\x46\xd7\x3b" - "\x23\xe2\x14\x60\xbe\x02\x3a\x25\xf3\x53\x8e\xd1\x41\xf0\xaf\x79" - "\xef\x6c\x1e\x9b\xbd\xa5\x17\x78\x6c\xe6\xb4\x57\x23\x6d\x3b\xd2" - "\xac\xd5\xd3\xae\x55\xf3\xa5\xf2\x39\x8c\x9f\x18\xab\xe7\x00\x8f" - "\x1a\xb6\xf1\x41\xe7\x4c\xe3\x5b\xe0\x1b\xcf\x6c\x51\xb1\x77\x76" - "\x62\x5c\x20\x5f\x55\x5f\xec\x44\x39\x5f\x61\x9e\x72\xae\xa4\x6b" - "\xc0\x97\x1f\x97\xad\xa1\xab\x99\x9f\x44\x4a\xe3\x46\x45\xf7\xeb" - "\xdb\x85\xdb\x45\x5e\x48\xce\xe2\x15\x74\x2d\xfa\xdf\xfa\x33\x74" - "\xfd\x67\xb9\xa5\x76\xe0\x4a\x54\x79\x96\x94\xac\x49\x69\x2c\x67" - "\x99\x5b\x7f\x96\x6d\xb0\x1b\x6c\x06\x2f\xe2\x7d\xdc\xe5\xe4\x02" - "\xe8\x7a\x4c\xd9\x10\x37\xbc\xc2\xf3\x4f\xa7\xe8\x86\x52\xae\x2f" - "\x7e\x49\x08\x7b\x4e\x5c\x14\x0b\x04\xeb\x73\x18\xb7\x7c\x74\xc3" - "\x1e\x3c\x8f\xc9\x9f\x9b\xf2\xf4\x6f\x0f\xd2\x2d\x10\x17\x23\x9c" - "\x06\xfa\xeb\x0d\x25\xc2\x9d\xc4\x7d\xe2\x1d\x94\xdd\xe0\xa3\x6f" - "\x1c\x51\x6d\x73\x43\x11\xc3\x1a\x04\x07\x0f\xcf\x37\xa8\x79\x06" - "\x7b\x8a\xbd\x2c\x89\xf1\x90\x73\xd8\x0c\xab\x5e\x53\xf2\x39\x02" - "\x5c\xeb\xdc\x91\x42\xc8\xe2\xc2\xc8\x86\x7d\x0d\xf2\x5d\x8f\x63" - "\x3c\x22\x28\x3f\x31\xfc\x03\x25\x9e\xd1\xcc\xe3\xf6\x7c\x05\xe7" - "\x40\xa1\x67\xf4\x19\xfe\x2e\xe0\xef\x80\x79\x7f\x83\xb7\x26\x0b" - "\xe5\x9f\x41\xb9\xf6\x7c\x65\x1b\xd8\x0b\xba\x51\x46\x8f\xdb\x9e" - "\xef\xa3\x0c\x93\x9a\x8b\xdb\xdf\x30\x48\xdf\xb3\x72\xdf\x39\x5a" - "\x4b\x7a\x9f\xbe\x31\x85\xe7\x1b\x50\xaf\xa6\xb0\x79\xdb\x31\x5d" - "\x6e\xb0\xbd\xf5\xa5\x53\x74\xa3\xb9\xb5\x50\xf2\xb7\x26\x34\x7b" - "\xf3\x9b\x11\xbf\xc6\xf3\xa5\x4a\x7c\xdd\x68\xbe\xf4\x67\x0f\x40" - "\x95\x87\x58\x1b\x6b\x55\xdf\x63\xd1\xb3\xc7\x66\xe2\xe7\x92\x74" - "\xeb\xce\x87\xfd\x73\xa3\x39\x92\x82\x36\x29\xe7\x36\xb2\x87\x44" - "\xf7\x38\x2d\xa2\xbf\xd7\x7d\xca\xb6\xc7\xd8\x0c\xd0\xff\xa0\x6a" - "\x07\x86\x41\x49\xe8\x8b\x4c\x73\xe1\xac\x11\xc1\xe6\xb2\x00\x70" - "\x1e\x9b\xd3\x5c\x13\x20\xfb\x2d\x5c\xf7\xb1\x0b\x96\xd7\x08\x7f" - "\x00\xb4\xe7\x27\xd7\xed\x70\x6d\x88\x78\xce\x16\xb0\x60\xff\x2c" - "\x3c\x2e\x65\x7e\xea\x81\x2a\x86\x27\x52\x24\x3f\x08\xa3\xee\x4a" - "\x9e\xed\x6f\xe0\x76\x04\xac\x37\x50\x6f\xcb\x59\x1a\x2b\xdb\xf3" - "\x30\xea\xbe\x0b\x32\x65\x17\xec\xc9\x7a\x29\xff\xc7\x42\xfe\xdb" - "\xd3\x8d\xf9\xc5\x4d\x88\xdb\x84\xb8\xa3\x85\x41\x62\x18\x61\xc0" - "\x96\xf6\x19\xda\x62\x4d\xa7\x08\xbe\x57\xd6\x61\xc2\x78\x8c\xf6" - "\xde\xdf\xc0\x65\x3a\xa1\x17\x7b\x96\x70\xb9\x63\xab\x20\xab\x02" - "\x09\xdb\xbf\x1f\xb7\x9b\x86\x1f\x1e\x27\xe5\x62\x53\x04\xf5\x8f" - "\x6d\x97\x9b\xd2\x54\x9b\xdc\x98\x13\xdb\x26\x37\xa5\x81\xee\x68" - "\xd9\x1b\x0f\xe2\xd7\xac\xbe\xa3\x7f\x37\x96\x47\xbd\x1f\xef\x71" - "\xdf\x58\x0d\x5a\x67\x2a\x5a\x73\x18\x70\x65\x1e\xf8\x94\xcc\x6c" - "\x93\xf3\x3c\x3d\x87\x33\xbf\x72\x78\x04\x7a\x09\x68\xb8\x07\xf1" - "\x56\xee\x8b\x95\x11\x8a\x89\xf7\xae\x07\x4f\xad\xea\x65\xba\x7e" - "\x26\xe7\x11\xd6\x96\x97\x33\x1f\x22\xcf\x3e\x4b\xa8\xbc\xbc\xc7" - "\x7d\x93\xc9\xa0\x1f\xc2\x3a\x39\x3e\xb1\x7e\x70\xd3\xf8\x7e\x3d" - "\x0a\xba\x26\xcb\x96\x4e\x1a\x37\x05\xf2\x07\x6d\xb5\xaf\x46\x8d" - "\x1b\xe3\xee\xe6\x6f\xc8\xbd\x8f\xf1\x3e\xf9\x28\xe4\x4b\xef\x86" - "\xc6\x8c\x3e\x8d\x86\xf5\x6a\x94\x15\xda\xf0\xe1\xf8\x50\x6a\xed" - "\x64\x6f\xc7\x41\x6a\x0d\xfd\x82\xec\xcf\x48\x18\x13\xbc\xcc\xcf" - "\x2b\x45\xf8\x40\xef\x1e\xd8\x71\xe7\x3c\x18\x67\x6f\x38\x43\xe3" - "\x64\xdd\x5f\x3e\x05\x0e\x7e\x52\xc2\xd6\x69\xf1\xa1\x79\xf3\x22" - "\x11\xda\x7c\x9a\xe7\x58\x6c\xa9\x9b\x7a\x69\xfc\x8e\x55\x94\x59" - "\xdb\x4b\xe3\xea\x7a\x29\x43\xfc\x2d\x43\xab\x85\xae\xf5\xe4\x05" - "\x2b\xa1\x7f\xe7\x8c\x28\x26\x73\xdd\x2a\x92\x6d\x1e\xae\x80\xce" - "\x15\x82\xce\x75\x2e\x83\xe5\x5c\xbf\xce\x05\x7d\x16\x3a\x57\xa3" - "\x5f\xf1\x45\xa3\x7f\x78\x21\x25\xa5\xe5\x91\x15\xf8\x39\xcf\xd2" - "\x4d\xcf\xa5\xb5\x43\xdf\x43\x9d\x7d\x7a\x7d\x41\x5f\x97\xa5\x90" - "\x86\xc9\xba\x42\xf6\x8a\x8a\x7d\x35\x83\x8e\xa9\x1a\xf3\x4e\x80" - "\xd7\x54\xb8\x0e\x2f\xf1\xba\xc0\xc1\xd1\x41\xd3\xf2\x5a\xf0\x1d" - "\xc2\x4b\xc6\x8a\x20\xc2\x8b\xb8\xec\x26\x84\xf7\xb8\xc7\x55\xfb" - "\xb4\x2a\xd3\x60\xf2\xd6\xb2\xd6\x18\xf7\x6f\xfe\xb2\xd0\x5c\xac" - "\x73\x17\xaf\x09\x09\xbf\xf7\x2c\xf7\xc1\x9b\xd3\xe7\x15\x89\x90" - "\x7d\x09\xaf\xd1\xdc\x6c\xe2\xf5\x23\x9e\x37\x7e\x13\x7a\xca\xe7" - "\xad\x19\xb1\xec\x87\x5e\xee\xb2\x14\x01\x26\xf4\x7e\xd6\xc9\xbf" - "\x88\xde\xcd\x6b\x8d\x5b\xe4\xba\xe6\xcd\xb3\x7d\x34\x53\x8e\xa3" - "\xac\xef\xb1\x0c\x84\xde\x74\x35\x70\x2a\x87\x9d\x0b\xdb\xf6\xe6" - "\x22\x1f\x3d\x50\xa8\xeb\x70\x72\xbd\x14\x61\xd0\xff\xa6\xef\xe3" - "\xb0\x92\xb1\x64\x2b\xb1\x8b\x8e\xc1\x74\x1f\xb9\x86\xa9\xd1\x57" - "\x90\xe7\xa0\x01\x07\xe3\xcd\xde\x6e\xed\xd1\x47\x11\x76\xc4\x80" - "\x83\x34\x5f\xc6\x77\x5b\x7f\x1a\x95\xa7\x23\x2a\xcf\xa3\xdd\xda" - "\x6d\x7b\x11\x16\x8a\xcd\x73\x4b\x5a\x6c\x9e\x5b\xc6\x44\xe5\x71" - "\xa9\x72\x6e\xc9\x8c\xcb\x93\x15\x97\x27\xfb\x52\xdc\x6e\xc9\x8f" - "\xcb\x53\x12\x97\x67\xfd\xa5\xb8\xdd\x52\x13\x97\x67\x4f\x5c\x9e" - "\x43\x51\xb4\xe4\xb5\x4a\xd8\x81\xb7\xb4\xc4\xe5\x39\x19\x97\xa7" - "\xd3\xf8\x1e\x6c\xcd\x78\xf9\x2e\xb2\x81\x2f\x3b\xb8\x3d\xa1\xb7" - "\x77\x76\x6f\x7f\xb6\x47\xe5\xfd\x6a\xc6\xa5\xf5\xfa\xea\xd4\xd8" - "\xf2\xbe\x3a\x3b\xb6\xbc\xaf\x2e\xb8\xb4\x5e\x5f\x2d\x8e\xcb\xe3" - "\x8a\xcb\x53\x15\x95\xa7\x41\x2f\xa7\x31\x2e\xcf\xc1\xb8\x3c\xcd" - "\x97\xf2\xd5\x57\xdb\xe2\xf2\x74\xc4\xe5\x09\x7e\x0e\x2d\x78\x3c" - "\x56\x6b\xfb\xa3\x58\xe7\x7d\x00\x63\x7d\xc6\x42\xb6\x65\x30\x96" - "\xf8\x7f\xd2\x1b\x1c\xc2\x63\x0a\x8f\x3f\x87\x1d\x41\xe8\x4b\x19" - "\xb3\x7c\x34\xe1\xa0\x31\x06\xf1\xba\x20\xf7\x67\xa5\x2b\x67\x64" - "\x0c\xa6\x53\x72\x39\xc6\x5a\x3f\x97\x75\x78\x0c\xeb\x5e\x19\xd5" - "\xfd\xba\xad\x5a\xff\x26\x1d\xce\xdf\xe5\x7c\x20\xaf\xa9\xa8\xf5" - "\xc6\x24\xd6\xad\x0f\x3b\x64\x9e\x23\x51\xfa\x30\x97\x1f\x38\xb8" - "\x2a\x68\x8a\xc3\x63\xcf\x65\xf0\x48\x83\x8e\x93\xd3\x8a\x51\xaa" - "\x15\xe6\xd2\xd1\x5a\xe8\x32\xd0\xdf\x19\xb7\x53\x74\x6b\xa6\xd4" - "\xad\x96\xf4\x12\xbf\x7b\x4b\xef\x21\x2f\xd2\x28\xdd\xf2\xd6\xc2" - "\x66\x94\x2f\xd7\x4c\x8a\xcf\x53\xb7\xd4\xff\x59\x07\xbb\x75\xeb" - "\xe1\x52\x3f\xf0\xba\x35\xcf\x58\x87\xf4\xd1\xad\xd5\x52\x6f\x28" - "\x3f\x90\x5d\xa7\xaf\x0b\x1d\x0e\x4c\xe1\x34\xe0\xff\x8c\x22\xa3" - "\xbe\xb0\x01\xfd\x48\x3b\xf5\x72\x34\x53\x6d\x78\xeb\x3b\xb1\x3c" - "\x39\x04\xbc\x72\xeb\xb1\xd8\x76\xbf\xd5\x17\xdb\xee\xb7\xfa\x63" - "\x79\x52\x03\x4f\xde\x66\x8a\xcd\x73\x5b\x7a\x6c\x9e\xdb\xc6\x45" - "\xe5\xa9\x52\xe5\xdc\x36\x25\x2e\xcf\xac\xb8\x3c\x39\x51\xdf\xa8" - "\xe3\x6d\x85\xfd\x36\x8c\x5c\xe3\xbe\xcd\x11\xf5\xad\x55\x4b\xf9" - "\x79\xdb\x46\x23\x8c\xd7\x09\xeb\xb6\xa9\x35\x56\x1d\xde\x9e\xb8" - "\xfe\xce\xe9\xdf\x89\xc3\xa1\x25\x0e\x87\xfe\xfe\x5f\xa9\x6c\xb0" - "\x3f\x9c\xa6\xaf\x1d\xd4\xe7\x94\x3b\x31\x5e\xcf\xe3\x6f\xc0\xaa" - "\x41\x7a\xd0\xe1\x6b\x69\xb1\xf0\xbe\x36\x26\x16\xde\xd7\xc6\x47" - "\x7d\x5b\xf1\x3d\x35\xaa\x0e\xd6\x64\x9b\xdc\x67\x02\x7d\xec\x6b" - "\xf3\x8d\x70\xb6\x0d\x81\x6f\x87\x53\x8e\x33\x59\xbc\x77\x60\xe4" - "\x29\xfa\xda\xfd\x6c\x47\xea\x30\xa3\xfb\x3f\xa9\x7a\x7d\xad\x3a" - "\x0e\x8f\xc6\x38\x3c\x0e\x46\xd5\x2b\x60\x59\x4b\xdf\xb1\x84\x1e" - "\xfe\x3e\xeb\x38\xbc\x27\x45\xae\xe1\xaf\x81\x5e\x76\x81\xac\xbc" - "\x77\xe2\x74\x09\x25\x7b\x1d\x1d\xb0\xc9\x1a\x3b\x07\xe5\xa7\xd4" - "\x03\x79\xfa\x7e\x0f\x7b\x8f\x7b\x7c\xba\xc1\x8f\x78\xb7\x83\x17" - "\x1b\xa4\xce\xb3\x61\xaf\x4f\x38\x73\x6a\x40\x47\xd8\x35\x13\x74" - "\x1d\xf5\x40\x09\xf7\x45\xc8\x9c\x0e\x8c\xeb\x69\x6a\xbd\x6b\xfc" - "\xfc\x28\x7e\x0e\xd8\x57\xdd\x27\x4e\xd1\x84\x2f\xf3\xb8\xcf\xfb" - "\x07\xd8\x66\x3e\x1c\xf0\x43\x8f\x3b\x23\xf5\x32\xc4\xa5\xeb\xf9" - "\x36\x46\xe5\xf3\xeb\x76\x6d\x07\xc7\x4d\x0a\x91\x89\xf3\x00\x46" - "\xba\xd2\xe5\x26\x7c\xf9\x30\xfa\x28\xf2\x78\x8c\x3c\x6c\x03\xcb" - "\xf5\x96\x12\x32\x4d\x2c\x25\x93\x67\xd5\x29\x09\x5b\x6f\xef\x0e" - "\xd6\x89\xbd\xa5\x1d\xe4\x0d\xb4\xf1\x7c\x94\xc9\x53\x76\x8a\xe1" - "\xa4\x27\x07\xc9\xdc\x5d\x71\x00\xe3\xd6\x84\xf4\x70\xc5\x81\x1c" - "\xd8\x36\x90\xd1\xe3\xa7\xf2\x9e\x86\x68\x7a\xcd\x9c\x99\xfd\xf0" - "\xbc\x39\x13\xbe\xf7\xf0\x43\xf3\x67\xde\x63\x9f\xbf\xf8\xb9\x82" - "\xfc\x09\x4b\x5f\x28\xb1\xbf\xb8\x6c\x71\xc9\xe2\x25\x3f\xb0\x67" - "\x3a\x6e\x76\xd8\x17\x96\xa8\x67\x46\xd1\xc2\xe5\x25\xd3\xf8\x75" - "\xbc\xbd\x78\x59\xc1\x0a\xf9\x7a\x6b\x2a\xc5\x02\x59\x5c\x52\xb0" - "\xcc\x7e\x73\xfe\x78\xfb\x83\x0b\x17\x17\xbd\xb0\xac\x20\x21\xac" - "\x7b\xec\xcb\x0a\x96\x15\x2c\xcc\xb7\x4f\xb3\x67\x32\xe4\x68\x70" - "\x51\x6d\x98\x69\x8c\x5d\x3c\x66\x55\xba\xc5\x31\x7d\x0c\xf3\x29" - "\x9e\x99\xd0\x71\xe9\xf8\x35\x21\x6e\xfc\x9f\x18\x37\xfe\x4f\x1c" - "\x73\xe9\xf8\x35\x31\x6e\xfc\x9f\x18\x37\xfe\x4f\xcc\xbe\x74\xfc" - "\x9a\x18\x37\xfe\x4f\x8c\x1b\xff\x27\xf6\x8f\xff\xe0\x23\xdf\x3a" - "\x29\x0b\x26\xc6\x8d\xff\x13\xe3\xc6\xff\x89\x87\xe2\xbe\x8f\x44" - "\x7d\x5f\x8d\xef\xb6\xe8\x31\x11\xdf\x1d\x46\x9f\x1c\x90\x29\x13" - "\x43\x46\x1a\x7d\xad\xbe\x5d\xa5\x9d\x94\x1e\x95\xb6\x43\xa5\x9d" - "\xd4\x3f\xfe\xb3\xec\xe0\x7d\x16\xca\xd6\x9e\xb4\x49\xae\x6d\x21" - "\x2f\x8f\x47\xe8\x1b\x37\x9c\xa5\x49\x43\x18\x16\xf3\xb0\x9c\x33" - "\xdc\xfe\x78\x4f\xfd\x48\x32\x73\x9e\xfa\x57\xc9\x24\xdc\x13\xec" - "\x78\x12\xc2\xd2\xf0\x83\x1c\x99\xb4\x1e\xfa\xee\x71\x35\x46\x4c" - "\x3a\x2e\xfb\x15\xf2\xe8\xf0\x4f\xf0\x37\xef\x2d\x40\x1e\x73\xa5" - "\x1a\x7f\xdb\xf1\x9e\xc6\x3c\x8d\xfc\x26\xa1\x4d\x28\xc0\x93\x10" - "\x66\xc5\x2f\x1d\xf0\x8e\x1b\xf0\x78\x4d\x2c\x51\x9f\x4f\x68\xe3" - "\x69\x64\xa9\x74\x47\xda\xbc\x11\xd6\xa3\x33\x4d\x6a\x4e\xa0\x71" - "\x96\x70\xbf\x97\x53\x8f\xf0\xc4\x36\x51\x26\xda\x7f\x52\x50\xc9" - "\x8a\x4c\xe8\x3f\x0f\x8e\x53\x73\x99\x8d\xb3\x20\x5f\x7b\x01\xe7" - "\x13\x3c\xfb\xf0\xfc\xa3\x01\xdf\x23\x6d\xe5\xcc\x7c\xe1\x4e\x7a" - "\x84\xe1\xc6\x85\x97\x42\x9e\xf5\x5a\x42\xae\x9c\x04\x71\x35\xc2" - "\x9d\xfc\x70\x82\xf0\x26\xe8\x08\xbd\x3e\xca\x6c\x67\x7c\xa3\xc2" - "\x8f\x08\xf7\x88\xf9\x9c\xde\xc7\xe5\x21\xcf\x60\xba\xb5\xb1\x9f" - "\x4a\xed\x5b\xbc\x3d\x3d\xae\x1e\x9f\x9d\xa6\xdb\x5f\x51\xf5\xb8" - "\xbd\x2b\xb6\xec\xdb\xc7\x27\xae\xc7\xed\x33\x50\x8f\xcf\x12\xd7" - "\xe3\x76\xb9\xa6\x2a\x34\xd4\x45\xbb\x24\xae\x14\x75\xf9\x4c\xd2" - "\x3d\x36\xbc\x5a\xd7\x7d\x02\xb0\xb9\xac\x88\x93\x79\x1f\x29\x1d" - "\x68\x37\x3d\xdd\x3b\x96\x1a\xca\x4e\x50\xe6\x71\xe1\x1e\xf6\x88" - "\x8f\xee\x90\x36\x64\x54\x78\xa7\xc2\x05\x74\xd2\x98\x4e\xa8\x0f" - "\xf2\x0d\xd6\xde\x86\x1d\xa2\xe6\x31\xee\xc0\xf8\x97\xe9\x37\xe6" - "\x20\x97\x97\x0a\xbf\x41\x47\xc4\xe5\xc4\xc5\x05\xa3\xe2\x4a\x62" - "\xe2\xd6\xf4\x87\x6f\x34\xc2\xbf\x58\x3b\xdd\xf1\x4e\x5c\x3b\xa1" - "\x7d\xee\x9c\x13\x5b\xef\x3b\x5a\x54\xfd\xd0\x46\x97\xd0\xfa\x8e" - "\x0e\xb4\x51\x5f\xe2\x36\xba\xd3\x94\x98\xd7\xee\x1c\x23\xe1\x8d" - "\xa4\x04\xf0\xee\x9c\x82\xb6\xeb\x93\x3c\xa8\xb7\xd3\xa5\xed\x73" - "\xe7\x02\xa3\x7d\xbe\x58\x1d\xef\x6c\x88\xab\x63\xf8\x34\x4d\xbe" - "\x4e\xd5\x75\xf2\x73\x71\xb0\x0f\x25\xe6\xc5\x3b\x8f\xa1\x9e\xe1" - "\x41\xea\xd9\x39\x38\x2f\x4e\xe6\xf9\x81\xf0\xa5\xbc\x38\xd9\xae" - "\xf2\x50\xa2\x3c\x53\x85\x3b\x51\x39\x93\xe7\x3b\x43\xac\xd7\x4e" - "\xde\xc8\x73\x46\x51\xe1\x45\xb1\xfc\x87\x3a\x70\x3e\xa6\x5f\x48" - "\xc9\x58\x6e\x87\xd3\x76\xd2\x3e\x8f\x27\x7b\xdc\x93\x5b\xe2\x68" - "\x75\xee\x34\xdd\x35\xa7\x5b\x4b\x6a\x54\xf4\xfa\xfa\x55\x71\x38" - "\x75\x24\xa6\xd7\x5d\x10\x14\x74\x2e\x31\xbd\xee\x1a\x33\x38\xbd" - "\xee\xe2\xf6\x3f\x77\x29\xbd\xee\xca\x8e\xa6\x17\x74\x5b\x59\xbf" - "\x9b\x6c\xe0\x8d\xbe\x5c\xc1\x73\x6e\xa0\x89\xd5\x02\x5e\x51\x79" - "\x3a\x39\xcf\x7a\x4b\x50\xf1\x09\x74\x46\xf3\x59\xba\xab\xc8\xe8" - "\xff\x23\x6a\x68\x98\xe8\x7b\x5c\x00\x5e\x12\xe7\xf3\x3a\xce\x79" - "\xbc\xa1\x4c\x62\x7b\x23\xae\xdc\x23\x89\x65\xc1\x5d\x3e\xd0\xf4" - "\xd5\x04\xe1\x41\xb5\x37\xe4\xeb\x99\xb1\x32\xe2\xeb\xd6\xd8\x36" - "\x02\xdd\x90\x2f\x6a\x4f\xf8\x65\x7f\x97\x6f\xb3\xaf\xbb\x2e\x6d" - "\xb3\x6f\x8c\x55\xed\xf5\x8d\xa4\x58\xfc\xbe\x5e\x93\xb8\xbd\xbe" - "\xde\x34\x78\x7b\x7d\xbd\x65\xf0\xf6\xfa\x7a\x07\xb7\x97\x8f\xbe" - "\x61\x8f\x1d\x37\xbe\x41\xb1\xf5\x45\xb9\xc8\x27\xb4\xa1\x57\xf3" - "\xf7\x17\xad\xb7\xf1\x63\x19\xc7\x6d\x55\x5f\x46\xe0\xe5\xa4\xb1" - "\x8c\xe3\x95\xc2\x18\x14\x36\x68\x58\xb5\x2a\xf1\x7a\x28\xdb\xb4" - "\xad\x35\xc4\x6b\xdf\x64\xbf\x9e\x75\xf6\x6f\x5c\x88\x68\xd4\x86" - "\x77\xed\x34\xdd\xfd\xfb\x88\xa6\x95\xee\x02\x6e\x6c\x8b\xd6\xc9" - "\x39\x83\x29\x69\xd1\x6d\xb1\x89\xf5\xef\x51\xca\x9e\x40\x7b\xfc" - "\xf5\x34\x4d\xd9\xaa\xda\xe5\xee\xd7\x63\xe9\x38\x25\x33\x71\xbb" - "\x4c\x99\x85\x76\xf9\x6b\xe2\x76\x99\x92\x3f\x78\xbb\x4c\xe1\xbd" - "\x01\x7f\xbd\xb4\x1f\x4d\xa9\xd1\xfb\xd1\x3a\xce\x63\x5f\xc2\xf6" - "\xf7\xdd\x29\x9c\x06\xef\xe8\x23\x53\x3e\xe5\xf8\x09\x9d\x46\x3f" - "\x92\x79\x5a\x00\x4b\x96\xaf\xa7\x39\xa2\xc3\x88\x86\xeb\xb7\x74" - "\x26\xea\x27\x77\xcb\x79\xfe\x89\xc5\x64\x06\x0d\x73\x76\x31\x8c" - "\x65\x44\x67\xe9\xee\x27\x38\x1d\x87\x4f\x0c\x44\xf7\x93\xbb\xa7" - "\x18\xe9\x58\xd6\xe9\x69\x33\x45\x4f\x21\x71\xba\x38\xd8\x7a\xfd" - "\x87\xc9\x71\x84\xd3\x73\xba\xb8\x34\xe5\xaa\x3f\xde\xdd\x12\xdb" - "\x1f\xef\x6e\x88\xe5\xcf\x29\x3c\x3f\x61\x89\x40\xce\x81\x97\x03" - "\xc0\xe1\x0b\xf3\xd7\xe5\xfb\xe6\x3d\x63\xe2\xfa\x26\x78\xe0\x9e" - "\xdf\x29\x1e\xb8\x67\x57\x2c\xae\xf7\x4c\x4e\xcc\x03\xf7\xcc\x1e" - "\x9c\x07\xee\x29\x1c\x9c\x07\xee\x59\xcf\x3c\xe0\xa3\x7b\xde\x89" - "\xed\x9b\xf7\xd4\xc6\xd6\x1d\xe5\xca\xbe\x49\x57\x5d\x49\xdf\x84" - "\x2e\x74\xf5\x60\xfd\x50\xee\x5d\x74\xa3\xbf\xf6\x1a\xeb\x17\x5f" - "\x88\x66\x66\xf4\x2b\xe0\xf7\xcd\x6c\x9e\x43\x82\x8c\x9f\xc2\x34" - "\xac\x93\x67\x55\xbe\x99\x1f\x4d\xc7\xcd\xea\xdc\x88\x13\x69\xff" - "\xce\xeb\xc1\x8a\x9e\x53\xdf\x8a\xad\xff\x37\xd7\x27\xa6\xe7\x37" - "\x6b\x41\x4f\x67\x62\x7a\x7e\xf3\xd0\xe0\xf4\xfc\xe6\x71\xde\xf3" - "\x7e\x69\x9f\xfa\x66\xa7\x7d\x85\xd4\x51\x64\x9e\xb3\x34\x75\xe6" - "\x17\x1b\x9f\xa6\x8e\x8b\x1d\x9f\xa6\xa6\x5d\xf9\xf8\x34\xb5\x30" - "\xf1\xf8\x34\xd5\x95\x78\x7c\x9a\x5a\xa3\xfa\xc3\xd4\x63\xb1\xfd" - "\x61\x6a\x53\x2c\x4f\x80\x76\xff\x63\xe3\xd3\x34\x7b\x5c\x1f\xa8" - "\x3c\x4d\xd3\x5e\x87\x4e\xe1\x52\xed\x76\x6f\x41\x2c\x8e\xd3\xa6" - "\x26\x6e\xb7\x69\xf3\xd1\x6e\x95\x89\xdb\x6d\x5a\xf1\xe0\xed\x36" - "\x6d\x23\xda\xad\xf2\xd2\x76\x9b\xd6\x78\xe5\x3a\xc5\xb4\xb6\xd8" - "\x36\x9b\xe6\xb9\xf2\x36\xbb\x77\x4c\xe2\x36\xbb\x77\x72\xe2\x36" - "\xbb\x77\xb6\x6a\xb3\x7b\xd7\xc7\xb6\xd9\xbd\xf9\xb1\x6d\x06\xba" - "\xfd\x83\x6d\x86\xf6\x99\xad\xf6\x15\xdc\xfb\x09\x6c\xf6\x61\x3d" - "\xee\x7b\x4f\xfa\xe8\xbe\x46\x65\x57\xdf\xa7\xc6\x0e\xd5\x86\x07" - "\x90\xe6\xd8\xa5\xe3\xc0\xbd\x41\x3d\xec\x7b\x97\xb6\xc3\x7d\xe9" - "\x90\xd1\x9d\xcd\xa5\x72\x1d\x4b\xb5\x21\xd3\x1c\xe9\x3c\xab\x78" - "\x2d\xea\xbe\xc9\x9c\x17\x6d\x2c\xbc\xc1\x10\xb1\x5c\x47\xfa\x00" - "\xc3\xe1\xb3\x3e\x71\xb0\xf2\xae\x64\x8c\xbf\xcc\x5e\x98\xd9\x9e" - "\xb2\x3b\x00\x2f\xeb\x05\xc5\xab\xf7\xc5\xeb\xbf\xf5\x88\x7b\x48" - "\xf1\xe9\x03\x5f\x8e\xc3\xa1\x3d\x31\x9f\xde\x17\x42\x1d\xea\x13" - "\xf3\x69\x96\x6d\x70\x3e\xcd\xe2\x33\x35\xf5\x51\xb6\xcf\xc8\x27" - "\x43\xbe\x38\xdb\x27\x2b\xc7\x12\x50\xbc\x23\x75\xa2\x8a\xc6\xd9" - "\x3d\xee\xac\x78\xfd\x0f\x6d\x93\x15\x56\x38\xdf\x7f\x21\x2e\xff" - "\x20\xfa\x5f\x16\xeb\x7f\x07\x06\xc1\xf9\x32\xfa\x5f\x16\xeb\x7f" - "\x07\x2e\xed\x5b\xf7\xeb\xfa\x5f\x22\x1b\xef\xfe\x31\x89\xdb\xff" - "\xfe\xb8\xf6\xa7\x9c\x12\xd8\xc3\x32\x7f\x6c\xba\x05\xd1\xe9\x78" - "\x4f\x11\xa7\x65\x1e\x49\x90\xb6\x3c\x1e\xe6\x20\xe9\x9a\x2e\xe1" - "\x3d\xde\x03\x95\x90\xf7\xee\x3f\xa9\xfa\xe3\x03\x93\x63\xfb\xe3" - "\xfd\x81\xd8\xfe\x98\x55\x13\x9b\xef\x81\xf4\xd8\x78\xf0\xcf\xff" - "\x98\x8c\x7d\x60\x7d\x1c\x0f\xbc\x77\x9a\xa6\x27\x29\x1e\x98\xfe" - "\xfd\x38\x3c\x6a\x13\xf3\xc0\x03\x07\x51\xff\xf7\x12\xf3\xc0\x03" - "\xc7\x06\xe7\x81\x07\x78\x7d\xe9\xbd\x68\xbe\x7d\xa4\x34\x6b\x58" - "\x6c\x9a\xe9\xd6\xc4\x32\x6f\x7a\x46\xe2\x39\x82\xe9\x59\x8a\xc6" - "\xd3\x1d\xb1\x34\x9e\x9e\x13\x4b\x43\xd4\xe5\x1f\xa7\x61\xff\x59" - "\xd9\x1e\xf7\xf4\xf8\xfe\xef\x3d\x4d\x33\xf4\xfe\x3f\xf3\xfe\x38" - "\x1c\xdb\x15\x2e\x89\xe6\x45\x66\xb0\xfd\xeb\x4d\x4c\xcb\x19\x63" - "\x12\xd7\x79\xc6\x64\x8c\x41\xde\xc8\x25\x7d\x69\xc6\x6c\x84\x3f" - "\xc2\x73\xa1\x3c\x1f\x52\x87\xf0\x47\x42\x64\x96\xe3\x55\xff\xb8" - "\x34\xa3\x98\xf7\x97\x30\xfd\x99\x7f\x2d\x63\x28\x9b\xc7\x20\xc6" - "\x2b\xb7\x54\xee\x51\xb0\xac\x67\x5e\xbf\x91\x79\x7d\x86\xd4\xff" - "\x78\x5d\x85\xf7\xff\x59\x1c\x94\xed\x0d\x84\xc8\xe0\x77\x4e\x1f" - "\x07\xbb\x85\xfb\x05\xa7\x37\xd2\xaa\x79\x33\x57\x9c\x6c\x9a\x11" - "\x48\xdc\xc6\x33\xd3\x06\xe7\x9d\x99\x19\xaa\x9d\x67\x2e\x88\x6d" - "\xe7\x99\x59\x11\xf7\x88\xf9\x5c\x57\xf0\xc0\x15\xf5\x93\x12\xbb" - "\xf0\x0f\x2a\xef\xd7\x3d\xde\x56\x5c\x46\xd7\x9f\xa1\x99\xcd\xb2" - "\x3c\x4d\x04\x2d\x6b\x93\xa8\x59\xca\x80\x07\xaf\x91\x78\x22\x4d" - "\x6e\x88\x34\xb1\xee\xd9\x36\x8e\xab\x77\x8b\x20\xd2\x1d\xe3\xf5" - "\x00\x3e\x2b\x07\x5e\xb8\xfa\x14\xcd\xfc\x28\x26\xbf\x89\xc8\xab" - "\x60\xd8\xea\x65\x7f\x7c\x30\xdd\x98\xd3\x5d\x3f\xc8\x7e\x20\xa4" - "\x99\x62\xec\x75\x50\x7b\xbd\x1e\x1c\x3f\xe8\xb8\x0c\x9c\x78\x7f" - "\x3c\xe3\x74\x79\x39\xf0\xe0\x46\x83\x7f\xd5\x1e\xc9\x07\x6b\x07" - "\xf6\xe0\x3d\xb8\x07\x71\xd9\x97\x99\x1b\x8c\xea\x07\x0f\x1e\x8f" - "\x86\xa3\xce\x8b\x3f\xd8\x61\xec\xa3\xc3\x7b\xe0\x73\x60\xe9\xf8" - "\x7c\x6b\x4c\x2c\x3e\xdf\x1a\x0f\x3d\xc5\xa4\x60\x7c\x6b\xca\xe5" - "\x60\x70\x9b\x2b\x9e\x65\x7e\xf8\x56\xf6\xe5\xe6\xfc\x92\x6d\x94" - "\xbd\xe5\x12\xde\xfa\x96\xd4\x97\x18\xc6\xe7\xe0\xe8\x89\xb1\x2d" - "\xe4\x5a\x3d\xaf\x6b\xcd\xda\xa4\xfa\xfd\xac\xb8\x39\xc2\x6f\x9d" - "\x94\xfb\xa4\xf4\x7e\xff\x64\x28\xbe\x1f\x7c\x2b\x64\x8c\xd1\xb1" - "\xe1\xb3\xd2\x8d\x7e\x0f\xbb\x96\xe1\xc6\xcd\xb3\xce\x9a\xac\xfa" - "\xc2\xac\x8d\x91\x94\x68\x7b\x6d\x96\xd4\xff\x8c\xf9\x52\xc4\x4f" - "\x8e\xcb\x17\x37\xff\xf7\xad\x93\x62\xf0\x79\xfa\x34\xb4\x6f\x80" - "\xd7\xb5\xd4\xd9\xdb\x59\xef\xc4\xcd\x57\xf8\x37\xcb\xb3\x96\x1f" - "\x00\xee\x43\xba\xdc\xfb\xf6\xed\x71\xe5\x9d\x74\x76\x5d\xae\xfe" - "\xb3\x06\xa9\xff\x43\x03\xf5\x5f\x22\xe1\xc6\xcd\x25\x3e\x24\xeb" - "\x1f\xbe\x44\xfe\x3d\x34\x1b\xf2\xcb\xa0\x1b\x74\xee\x87\x76\x1b" - "\xba\x3a\xcf\x1f\x0c\xae\xab\x3f\x34\x30\xff\xa7\xf2\x0d\xcc\xff" - "\xf9\x13\xe9\xea\x3e\x3a\x1c\x8a\xd7\xd5\x1f\x3a\x62\xa9\x4d\x58" - "\x97\x41\xe6\xff\x1e\xd2\xe7\xff\xbe\x9d\x1d\x2b\xcf\xbe\x6d\x8d" - "\x6d\xc3\x87\xe2\xda\xf0\xdb\x99\xb1\x6d\x38\xeb\xe4\x7f\x77\x5c" - "\x63\xc5\x2b\x39\x39\x59\x4b\x4e\xd2\x92\x92\x11\x8d\x2a\xd2\xb0" - "\x64\x53\xf2\x10\xfc\x86\xea\xcf\x61\x5a\xb2\x66\xc2\x6f\x88\xfe" - "\x1c\x1a\xf7\x3d\x8c\xf3\xe2\x67\xd2\x9f\x43\xe2\xbe\x87\x7e\x4e" - "\xfc\x30\xbd\x5c\xa3\x7c\x53\xdc\xf7\x90\xcf\x89\x1f\xfa\x0f\xe6" - "\xa7\x4b\xbe\x63\xf7\x9d\x3d\xb4\x64\xc5\xc2\xa2\xc5\xf9\x72\xad" - "\xb8\xc0\xbe\xf0\xe9\xa7\x0b\x96\x2f\xb7\x97\x2c\xb5\x3f\x70\xff" - "\xc3\x77\xdc\x63\x57\x4b\xce\x45\xd3\x6e\xce\x4f\xa5\x39\x2f\x2e" - "\xe3\x88\x39\x8f\x3c\x94\x63\xcf\x7e\xe0\xfe\xd8\x48\x03\x8c\x5c" - "\x5a\xbe\x1c\x94\xa8\xfe\x97\x55\x31\x8a\x68\xe3\x28\x29\x7b\xda" - "\x8f\x36\x10\xa9\x39\x8f\xec\xd7\x5b\x60\x8d\x8a\x5e\xa7\xf0\xdc" - "\xc8\xeb\xf9\xb3\x1f\xe5\x4a\x4c\x68\x70\x51\xf1\x22\x3e\x5f\x32" - "\xfb\x79\xf1\xae\x9f\xec\xdf\x26\xed\x14\x3d\xfa\x56\xf3\x2c\xa4" - "\xc5\xb7\xb7\x3d\x44\x76\x27\x99\x91\xff\x3b\x88\x4b\x12\xf7\x46" - "\x10\x16\xd0\xf7\x30\xcf\x5b\x28\xc3\xde\x75\x19\xe9\x2c\xa7\x69" - "\xce\x97\xc5\xbb\x42\x7e\x8b\x7b\xab\xf4\x74\xb3\xff\x1e\x71\xff" - "\xcb\x1e\x96\x0d\xb5\xaf\x92\xa9\xee\x55\xa2\xd7\x46\x92\xf9\xb5" - "\x51\x7c\x06\x7d\xf6\x49\x63\x1d\xb4\x02\xdf\x3e\x7a\xb4\x89\xcb" - "\xe6\xb4\x11\xed\x5f\xfe\x2c\xd3\x8f\x8c\x4e\x3f\x27\x6d\x60\x1d" - "\x76\xf6\x49\x0d\xe9\xe6\x7d\x42\x96\x60\x6a\x6d\x86\xb7\xd4\x45" - "\x96\xb0\xf8\x74\xe2\x2c\x4a\x6a\x85\x64\x5e\x19\x12\x21\xcf\xb2" - "\x33\x28\x7f\xce\xf7\x2d\x2b\xc5\xa7\x5e\x68\xcf\x73\x3a\x9d\x62" - "\x73\x17\x99\xd0\xaf\x93\x3c\xcb\x78\x8f\xc2\x9c\xac\xba\xcf\xc8" - "\x04\x1a\x8c\x39\x43\x73\x8b\x4b\xe7\x88\xb0\x73\x0e\x99\xfe\xd5" - "\xc1\xfb\x0b\x1b\x37\x6f\xfe\x33\x99\x7e\xde\xeb\xd2\x7a\x85\x8d" - "\x4a\x4b\x44\x87\x60\xdf\x14\x01\x11\xe4\xfd\xf9\x2d\x79\x61\x4e" - "\x53\xd6\xe3\xb4\x51\x6b\x49\x80\xd6\x9c\x14\xc1\xf2\x3f\xab\x7d" - "\xfd\x47\x3b\x03\xbc\x5f\xd1\xbc\x66\x0e\x25\x9f\xce\x21\xed\x68" - "\x61\x0d\x79\x17\x04\xa8\xf4\xa4\xe8\x68\xc9\xfb\x84\x5a\x0b\x9b" - "\x28\xb7\x8d\xb4\x96\xf6\x8f\x48\xfa\x57\xd8\xf0\xa1\xbd\xec\x02" - "\xd9\xd6\x2c\xe6\xb0\x0b\xb4\x6a\x0d\x0d\x5f\x75\x82\x2c\xde\x8e" - "\x36\x94\xd3\x45\x8f\x1d\xa7\x24\xc0\xd3\x56\x7f\x44\xb6\xd5\xdf" - "\xe7\xfd\xbb\x59\x54\x5b\x46\x36\xe1\xcc\x48\xeb\x75\x66\x58\x7b" - "\x45\xc6\xc8\x1e\x67\x46\x7a\x6b\x31\xd2\xb7\xff\x8e\x46\xb4\x51" - "\xfa\xbb\x67\xda\xb4\x9a\xf3\x34\xc6\x3e\x97\xdb\x7f\x6e\x51\xed" - "\x79\xa4\xdf\xd0\xd4\x10\x41\xde\xe8\x3c\xa1\x94\xa6\x43\xde\x9c" - "\x20\x45\x00\xab\xa6\x97\xc6\xd4\xf6\x92\x2d\x52\xd1\xd4\xc0\xb4" - "\xe8\xdb\xd0\x98\x01\x59\x38\xec\xc0\x53\x87\x4c\xde\x96\x4e\x3a" - "\x1a\xe8\xa5\x56\xfa\x80\xbc\x8e\xbf\x79\x7e\xfe\xd4\xa1\x21\x11" - "\x30\xbf\x67\x55\x3b\xe0\x2b\x9e\x71\x1e\xe5\x33\x8e\x2e\xaa\x2c" - "\xa3\xb4\xe2\x55\x34\xec\x0c\xc2\x95\x4d\xbf\x3d\xd3\x1b\xfa\x9b" - "\x67\x95\xdc\x73\xfb\x68\x53\xd9\x51\x4a\x6e\x0d\xd4\xf0\xde\x4e" - "\x2d\x9c\xfa\xa1\xdd\x1b\x38\x46\xde\xe2\xbf\x7a\x22\xe6\x0f\xcd" - "\x1b\x23\x64\xde\x7f\xf1\x98\xe6\x35\x5d\x24\x6f\x4e\x80\xde\x43" - "\xd9\x62\xc3\x87\xbc\xe6\x99\xd5\x1a\x08\xf2\x39\xa4\x4c\xd1\x6d" - "\x4b\xad\x5c\x46\xe3\xeb\xce\xd3\xb8\x5d\xe7\x29\x43\xf4\x64\x68" - "\xbc\x8f\xf6\x89\x2e\x2b\xed\xc2\x33\xad\x9d\xcc\xa8\xaf\xda\x43" - "\x9d\xa2\xef\xa7\xed\xcb\xa0\xfa\xde\x81\xfd\xb4\xbd\xdd\x03\xfb" - "\x69\xc1\x4b\x3e\xde\x53\x8b\x7e\x51\xc3\xfc\x5c\x79\x96\x4c\xeb" - "\xce\x12\x4d\x74\x69\x64\x7f\x8a\xcf\x43\x64\xcf\xf4\xe6\x77\xc9" - "\xf7\x53\x34\x2f\x84\x67\x1a\x7e\x49\xe8\x03\x72\x3e\xbb\x5d\xe7" - "\x5b\x84\x69\x08\xfb\x04\xcf\x64\x3c\x3f\x72\xd6\x0a\xbf\x28\xdf" - "\x3d\xa3\x5b\xa3\x54\xe6\x5f\xb5\x77\x77\xf7\x8c\x1e\xf7\x3c\xe8" - "\x3f\xf9\xf3\x0d\x3e\x56\x32\x7d\xb6\xef\xbd\xd3\x5d\xec\xef\xc4" - "\x2f\xf1\xe9\x2b\x4c\x62\xdf\x27\x7a\x38\xe3\x30\x8d\xcb\x3d\x45" - "\xd9\x76\x3c\x2d\xf8\xa1\x5f\xce\x3b\x68\xe4\xed\xee\x2b\x44\x99" - "\xd9\x77\x21\x5c\x18\xe1\xa8\xaf\x89\xe3\xde\x3e\xdd\xa5\xa9\x34" - "\x19\x1a\x60\x06\x75\xf8\xe8\xeb\xb3\xd7\x73\x9f\xee\xd6\x2c\xe2" - "\x70\xfe\x64\xaa\x1d\x25\x8e\xed\xda\x26\x9a\x55\x5f\xcb\x76\xf8" - "\xa8\x20\x8f\x71\xc4\xb8\xdd\xbc\x11\x71\x87\xed\x44\x4c\x97\xe6" - "\x3c\xde\x2f\x96\x5d\xe3\xa3\xd4\x93\xd1\x75\x10\xee\x6f\x97\xf3" - "\xd8\xf9\x66\x99\x67\x88\xd0\xfe\xa5\xbc\xd5\xd7\x49\x3f\xef\xed" - "\x18\xe2\xfc\x23\x69\xde\xd0\x29\x9a\x94\x4e\x36\xd6\xff\xea\xb7" - "\x09\x1f\x9e\x1d\xbc\x7f\x13\x7c\x72\xdd\x19\xca\xfe\xe4\x6b\xe9" - "\x94\xfe\x27\x58\x63\x4a\x1e\x65\x87\xa3\xe4\xd1\x4b\x47\xdb\x0f" - "\x45\xc9\xa2\x47\xef\xba\x54\x16\xcd\xbf\x5d\xc9\x22\x11\x52\xb2" - "\x27\xec\xd3\xc3\xaf\x8b\x0b\xd7\xf7\x84\xcc\x4f\x8a\x0b\x0f\xaa" - "\xf0\x47\xba\xe2\xc2\xfd\x7a\xf8\x04\x43\xd6\xb5\x32\x1e\x2f\xb2" - "\xac\x7b\xe4\x2a\x96\x75\xad\xf9\xba\xac\x93\x7b\x0a\x1f\xbe\x20" - "\x7e\xec\x22\x3e\x6b\x84\xf7\xa3\x8c\xbf\x78\x97\x0c\xdc\x53\x10" - "\xb6\x89\xc3\xaa\x3e\x20\x13\x7e\x52\xce\x09\xf7\xbf\x9c\x63\x39" - "\xc7\x32\x8e\xf7\x9c\xec\x1c\x25\xda\x76\x6e\x13\xc7\x6b\xb7\x89" - "\x96\x1e\xf7\x77\x42\x86\xbc\x7b\x19\x61\x1b\x11\xf6\x32\xe2\x59" - "\xee\x31\x4d\x8e\xe6\x1c\xe2\xf3\xfa\xed\xe0\xe3\x8d\x96\x24\x2a" - "\xde\x0c\x9e\xe7\xf3\x7f\xeb\x41\x5f\x2f\x64\x12\x9f\xdd\x92\x7e" - "\x42\xb4\x4c\xc8\xa8\x76\xee\x6f\xa3\xd6\xa1\x7f\x79\x1d\x9f\x50" - "\x59\x40\x9c\xe1\x73\x70\x8c\x43\xee\xca\x6f\xf3\xf9\xe4\xa4\xe6" - "\x42\x22\xde\xf3\xcd\x7b\x55\x20\x77\x4d\x55\xc0\xe9\x70\x11\xb7" - "\xf5\xc3\xb0\xff\x6b\xaa\x54\x5b\x3f\xda\xc4\x7e\x75\x4e\xd1\x77" - "\x8e\xc0\xbe\x0b\x72\xdd\x2c\x61\x17\xf1\x79\x15\xf4\x51\xb6\xf1" - "\x0a\x77\xe2\x57\x65\x9c\x59\x61\xdf\x48\x48\xe3\x6d\x0b\x12\xe3" - "\xec\xa3\x87\xd3\x8f\x96\x1e\xe2\xfc\x87\x98\x36\xc2\xed\x34\x60" - "\x24\xc9\x33\x2f\x6e\x32\xf3\x99\x17\xa4\x93\x7b\x41\x45\x6a\x63" - "\xc6\xd1\x05\x7e\x62\x39\xef\xed\x00\x8c\xd2\x53\x0a\x06\x60\x09" - "\xc8\xfd\x98\x38\x1d\xfe\xf0\x35\xe2\x53\xc0\x5f\xcf\xed\xc5\xe7" - "\x14\x79\x7d\x0d\x74\x49\xe3\x7d\xf0\x4a\xf7\x7c\x78\x78\xfd\x07" - "\x44\xfa\x59\x4b\xf0\xdb\xc3\x69\x7c\xbe\x88\xcf\x57\xca\xb3\x95" - "\xda\x64\x12\x2f\x66\xa4\xf5\x9f\xaf\xfc\xff\xe1\x6c\x25\xe8\x6f" - "\xab\xd3\x44\x13\xf0\x4f\xe3\xf3\x95\xc0\xbf\x88\xf9\x50\xaf\x93" - "\x75\xeb\x63\x92\xe6\xf3\x39\x0c\xb6\xe2\x11\xa3\xfd\xb9\xbe\x5c" - "\x17\xc4\x4d\x51\x3a\xa1\x38\xe6\xa3\xf9\x56\x8e\x47\xd8\x38\x4e" - "\x3f\x09\x72\xcc\x9b\x1f\xa6\x03\xa7\xc3\x5a\xe5\x2a\x32\x29\x99" - "\xf6\xe8\xad\x9c\x5f\xc9\xb4\xf9\xbe\x01\x99\x36\xff\x84\x92\x69" - "\x8a\xc6\x4a\xa6\xcd\xff\xa3\x92\x69\xf3\x7f\x2f\xd7\xc1\x20\xd3" - "\x38\x8e\xe5\x9a\x21\xd3\x76\x8d\x12\x47\x58\x76\xf4\xb8\xe7\x37" - "\x19\xb2\x6d\x13\xc2\x58\x76\x30\x8e\x4a\x4e\x3d\x62\x16\x1f\x66" - "\x90\xda\x67\xc0\xef\x85\x7c\x36\xa1\x43\x7f\xe7\x71\x64\xac\x92" - "\x71\x8f\x9a\x06\x64\xdc\xfc\xf2\x81\xbc\x2c\xe3\x1e\xbd\x46\xc9" - "\x38\x15\x5e\xff\x18\xcb\xb8\x47\xcc\x4c\x03\x1d\xbe\xc6\x73\x76" - "\x7a\x7a\xa6\xa3\x35\x5a\xc6\xc5\xf6\xaf\x47\x17\x18\x32\x8e\x65" - "\x1b\xbe\x8b\x20\xd3\xa4\x9f\x2e\xee\x67\xd5\xa0\xb9\xd1\xef\xb8" - "\x0d\xb8\xce\xec\x3f\x87\xe9\x36\xbd\x8b\x86\xe9\xe7\x7c\xf4\x7a" - "\x3f\xba\xc7\xd8\xe7\x08\xfa\x37\x25\xd2\x9b\x0d\x3d\x0d\xfc\x78" - "\x43\x18\xfd\xcd\xeb\xc2\x58\x5a\x23\x5c\xad\xa1\xe3\xf4\x64\x09" - "\x69\x91\xe4\x67\x3f\xe6\xb6\x85\x9d\x31\x94\x9f\x2c\x7b\x30\x86" - "\x76\xe5\x06\x68\x28\x6c\xf3\x8f\x2b\x35\xc4\x39\xe8\x9b\x03\x71" - "\xdf\x95\x7b\x3c\xa3\xf2\x4d\x88\x8a\xbb\x59\xea\x78\x67\xd9\x77" - "\xd2\xa3\xc7\x06\xb3\xfd\xaf\x0c\x97\xef\xae\xbc\x0c\x2e\x5b\x2f" - "\x83\x8b\xd4\x03\x26\x74\x52\x12\x6c\xb3\xab\xce\xd2\x77\xe5\x7c" - "\x8c\xf4\x61\xb1\x2e\x61\x39\x1f\xeb\xf1\x43\xa2\xe2\xa3\xca\xfa" - "\x5e\x52\x82\xfc\x51\xe5\x7d\x6f\xec\xe5\xe1\x7f\xef\xfe\xcf\x81" - "\xbf\xf0\x73\xe0\xaf\x65\x19\x08\xda\x59\x22\x5a\x6c\xba\x89\x21" - "\xd9\x07\x8f\xf0\x39\x3b\xa4\x7b\x43\x9f\xf3\xf9\xd8\x39\x56\xda" - "\x82\xf2\x2c\xd6\x66\xc4\x7b\x43\xed\x52\x3e\xcf\x58\x49\xa4\xd6" - "\xa8\xfb\xf3\x7c\x14\x8f\xdb\x88\x90\x81\x9b\x8c\x0f\xc7\xe3\x86" - "\xf8\x09\x03\xf1\x39\xd7\x0d\xb4\xfb\xf7\x6a\x2e\x33\x2f\x99\xe6" - "\x45\x2c\xfb\xa0\x3b\x0c\xf3\x85\x7d\x9f\x54\xf7\xcf\xcf\xe4\x94" - "\x40\xce\x7b\xa2\xf6\xec\x76\x42\xb6\xdf\xd0\x1a\xe0\x73\xa9\x01" - "\xaa\x54\xf6\xf0\x57\x30\x9e\x8c\xe4\xb3\x39\x7c\x4e\x27\x37\x9c" - "\xad\x29\xdf\x38\x39\x4d\x46\xde\xc1\xe6\x81\xb8\x5c\xbd\x4c\xde" - "\xff\x1a\x40\x9e\x76\x23\x0f\xc3\xe6\x3d\x94\x18\x07\x6e\x90\x67" - "\x55\x43\x9d\x2c\x77\xbf\x02\x3d\x79\xa4\x2a\x27\x8f\x54\x39\xdf" - "\xb7\xf9\xe8\xbb\xb3\x2f\x77\x56\x64\xf0\xfa\x7d\x7f\xfe\x95\xd7" - "\x8f\xf4\xfa\x7d\xbf\xea\x73\xea\x77\xb9\x72\x5b\xae\xbc\x5c\xab" - "\x5e\xee\x63\xe6\x2b\xa7\xeb\x63\x53\xbf\x38\x5d\x33\x75\xba\x3e" - "\x56\xfc\x39\x74\x4d\x54\x4e\xe3\x17\x2f\xc7\x6e\x94\xd3\x96\xa8" - "\x1c\x92\x7f\x83\x9e\xe3\x32\x1b\xbe\xdd\xd8\xaf\xa2\xf2\x15\xf5" - "\xb8\x3d\xda\xf7\xa4\xf2\xb7\xf8\xf8\x64\xc3\xf7\xa4\xee\x03\x12" - "\x63\xcb\xe3\xdf\xc9\x6d\x60\x7d\x44\x44\x7c\xf4\xf8\x7c\xf6\x1b" - "\x38\x63\x4d\xb4\x8f\xc6\xc7\x0b\x2f\xe7\xf3\x92\xfd\xf6\x08\x91" - "\x43\x87\x6b\xe4\x7e\x00\x8c\x43\x8f\xbf\xce\xe7\x01\xd4\x7a\xe6" - "\xe3\xfb\x54\x9f\x7c\x7c\x1f\xca\x0d\x0e\x0e\xe3\x40\x55\x63\x59" - "\xe6\x90\xc1\xf6\xf8\x23\x7f\xa7\x8f\x7e\x20\xe7\x2f\xc3\x1b\xf6" - "\x37\x89\x73\x36\xdd\x47\xd6\x93\x0f\x45\xf9\xf0\xc2\xd8\xfd\xc4" - "\x4a\xfd\x2c\x02\x68\xe0\x02\x2d\x17\x8c\x33\x68\x60\x84\x23\x6c" - "\x8a\x41\x03\xe8\x2b\x69\xde\x86\x10\x9f\x15\x0a\xa8\xf3\xdd\x0b" - "\x9e\x10\x15\x07\xf4\x73\xf4\x0b\xd4\x3a\x43\xea\xfe\xa6\xc0\x6a" - "\x9b\x66\xe4\x1f\x67\x77\x7e\xc6\x3c\xec\x4f\x39\xe0\x02\xac\xf5" - "\x06\x7c\xc1\x78\x89\x81\x74\xf5\x72\x5f\xd2\x02\xb4\xff\x63\xa5" - "\x92\xaf\x51\x86\xc4\x5d\xa3\xe4\x08\xf0\x47\x1d\x34\x6f\x71\x80" - "\xf5\xd4\xce\x30\xea\xcf\xb2\xee\xe0\x12\x9f\x89\xd3\x48\xdd\xe1" - "\x5c\x86\xa6\xfc\x8f\x2d\x08\x47\xce\xb1\x8f\x0d\x89\x57\x1a\xea" - "\x3c\x8b\x71\xf2\xe1\xe9\x5f\x9d\x41\xf3\x2e\x90\x4e\x8b\x05\x9f" - "\x44\x10\x1e\x59\x3e\x80\x43\x9d\x3c\xd3\xf1\x44\x86\x81\x43\x84" - "\xcb\xef\xb1\x69\xd0\xc5\xb8\xdc\x0e\x79\xae\x12\x65\x4f\x62\xff" - "\x54\xec\xbb\xe2\xc5\x0c\x62\x1c\x90\x67\x81\x41\x6f\x3d\x8f\x5e" - "\xc6\x13\x69\x11\x59\xb6\xa2\x8d\xa2\xf3\x61\xe8\x83\x4f\x6c\xbc" - "\x94\xce\x4f\x34\x44\xd1\x39\x99\xf9\x8a\xe7\x58\x80\xff\x34\xa6" - "\x37\xaf\x6b\xd8\x57\xb0\x5e\xf5\xc4\xbf\x1d\x0e\xc8\x7d\x27\x69" - "\x0c\x37\x02\xfa\x33\x0c\xc0\xfd\x92\xa2\xf1\x13\x1d\xfd\x34\x46" - "\xd9\x02\x6d\xb1\x4e\x9d\x41\x91\x3e\xea\x7a\xdc\x4f\x9a\xfb\xcb" - "\x61\x5c\x9d\x36\x2d\x22\x6c\xc4\x73\xaa\x8c\x6b\x89\x5d\x04\x59" - "\xaf\x94\xfb\x98\x50\xd7\x83\x65\x6d\x26\xe8\x96\x9a\x2c\xab\x3b" - "\x83\xf5\x7b\xb3\x7c\x47\x59\x83\xf0\xf7\xdd\xec\xd3\xcd\xa8\x17" - "\xea\x62\x66\xde\x02\xee\xd0\xff\x72\xe7\x48\x7e\x59\xc1\xed\x94" - "\x7b\x3b\x87\x19\xe9\xf0\x3d\x84\xd3\x19\xdf\x88\x03\x7f\x3d\xf9" - "\x3e\xea\x95\xca\x78\xfa\xd9\x6f\x8a\xac\x73\x6e\x21\xc3\x40\x3d" - "\x8e\xc5\xd4\xb3\x2f\xc7\x64\xf0\x1d\xaf\x11\x35\xdb\x83\x52\x76" - "\x2a\xda\x3e\x19\x32\xfa\x24\xe7\x57\x7d\x2c\xd7\x1a\xcd\x8b\x01" - "\xe7\x00\x1f\x94\x8c\x25\xb3\xc9\xce\x7e\xe8\x9e\xd4\xfd\xd2\xe6" - "\x4e\x8d\x6f\x2f\x8e\x63\x1f\x71\x3a\x0d\xb9\x3f\x59\x4f\x51\x6e" - "\x26\xd7\x0d\x71\xeb\x2f\x37\x5e\x1a\x7e\xeb\xb6\xa8\x7e\x04\xba" - "\xe4\xbd\xb1\x45\x9d\xe7\x09\x28\x5f\x69\xb9\xfb\x85\xf6\xba\x6c" - "\x2f\xde\x97\x27\xfd\x5f\x48\x5f\x13\xb9\xbc\xc7\x4d\x8c\x28\x7e" - "\x9d\x7d\x0f\xfa\xf5\x3d\x7b\xfe\xe6\xe2\x90\xf4\xb7\xe6\x2c\xe1" - "\x73\xaf\x21\xb6\xc9\xe4\x9e\xb4\xc3\x25\x21\x7a\x24\x28\x69\x1b" - "\xe2\xf3\xe9\x01\x49\x8b\x3c\xb3\x71\x26\x3d\xc2\xb2\xa0\x27\x87" - "\x26\x85\x28\x99\x75\x0a\xbb\x93\x7d\x09\xe4\xf9\x58\x27\x51\x34" - "\x05\xdf\x6b\xe2\x98\xe2\xe5\xbc\xef\xd4\xf1\xf9\x07\xb9\xbe\x74" - "\x0a\xfc\x9d\xfc\x37\xa4\x5d\xac\xe6\x65\x8c\xbe\x96\xf7\x31\xaf" - "\x31\xf9\x74\x18\x28\x0b\xe3\xff\xe3\xc7\x2f\xed\x17\x79\xdf\x31" - "\x6c\x0c\x3e\x07\xa7\xd6\xab\x06\xe0\x21\xbf\x9c\x97\x1e\x90\x4d" - "\x7f\x60\x58\x9e\x4b\xfb\x4c\xde\x71\x83\x97\x8b\x6f\xe4\x73\xd4" - "\xb9\x35\x5c\xfe\x60\x32\x53\x38\xbf\xcf\xed\x64\x3e\x6d\xa7\xe4" - "\x2f\x7a\x56\xa2\xc7\xbd\x70\x8a\x51\x07\x83\x26\xaa\x0e\x0b\x5f" - "\xe9\x4e\x6d\xcc\x1e\xa8\xfb\xc2\x57\x24\x2d\x06\xe2\xff\x18\x45" - "\x1b\xfe\x3e\xa2\xf8\x6e\x61\x39\xf8\x43\x9f\xb3\x51\x61\x22\xf5" - "\xc0\x3a\xf6\x9f\xa8\x70\x5c\x4c\x06\xbf\x23\xed\x41\x1f\x7d\xd2" - "\xac\xd6\xa1\x16\xa2\xfe\x0b\xad\x7a\xbe\x05\x8c\x4b\xc2\x7a\xc6" - "\xe0\xf8\x54\x16\x8f\xb1\xca\x4f\xc1\x53\xf7\x33\xbe\xf6\x5b\xb8" - "\x8d\x9f\x1a\xce\xe5\x32\x4f\x88\xbe\xc2\x21\x81\xbe\x0c\xea\xee" - "\x2b\x44\xff\xc9\xd0\x7a\xdc\x4f\x41\xfe\xb5\x37\xa8\x32\x9f\x9a" - "\x6c\xe0\xca\xb8\x41\x57\x34\xf7\x88\xc5\x89\xe9\xcb\xe5\x72\x7f" - "\xef\x2b\x1c\x86\x9f\x19\xbf\xa1\x5f\x74\x3c\x86\x5e\xdb\xe1\xaf" - "\xd8\xbb\x3e\xb2\x42\x1c\x99\x17\x12\x11\xd8\x05\x1d\x95\xe0\xdf" - "\x11\x6b\x3d\x34\x22\xf0\x84\x96\xbb\x92\xb2\x60\xdb\x92\xb8\x28" - "\xa6\xd4\x45\xf0\x5c\x21\x26\xb3\x3f\x57\x7c\x67\xea\xdf\xe3\xf9" - "\xbb\x7b\x85\x58\x00\x9c\x3b\x8c\xb5\x3b\xe5\x6b\xe6\xa9\x60\xbf" - "\xdf\x9d\xe4\xc7\xf9\x8c\x0f\xcd\x73\xa0\x8c\xe4\x67\x3b\xb8\xdc" - "\x5c\x1e\x3b\x50\x5e\x8f\xfb\x69\x8c\xff\x8f\x97\x70\x3a\x7f\xf2" - "\x6d\x23\xf1\xcb\x18\x64\x8d\xb3\x83\xf1\xea\x4e\xd9\xbb\xde\xc0" - "\x75\x44\x20\x4b\xfb\x62\xb8\x3d\xbd\xde\xc0\x0d\xe1\x47\x2a\x55" - "\x78\x88\x7d\x91\xf1\x1e\x44\xc4\x37\x1a\xb8\x1a\x38\x70\x79\x7c" - "\x8e\x52\xa4\x36\xe6\xb1\x2f\x17\x2e\x8f\xfd\x0d\x22\xed\x31\x03" - "\xdf\xcf\xe3\xe5\xc1\xe8\x0e\xfb\x7a\x8c\xe2\xc9\xfc\x31\xc6\xf8" - "\x85\xf7\x8c\xd8\xf5\xde\x7c\x6b\xbc\x2c\x7b\x6a\xe9\xd2\x92\xdc" - "\x65\x05\xfc\xc8\xb8\xf9\x85\x5b\x53\xa3\x6d\x52\x96\x6f\xca\x17" - "\x40\x7e\x16\xcf\xff\x6c\x19\x69\xac\x5f\xe6\xbb\x8c\x39\x28\x7d" - "\x9f\xf4\x7d\xac\xab\xb2\x4e\x87\xb8\xda\xdf\x97\xae\x61\x30\x49" - "\x1f\x9b\x49\x1b\x4c\x76\xb2\xbc\xe8\x4e\xf9\x4b\xb6\xa4\x47\x45" - "\x97\x07\xf9\xfa\xe7\x3f\x07\xd9\x27\x56\x18\xde\xd0\xe4\xb3\x8f" - "\x96\x3e\x8d\xb4\xb7\x57\xb5\x69\x3c\x86\x97\xe1\x9d\x6d\x27\xa9" - "\x37\xe8\x7e\x72\xde\x3d\xdf\x06\x39\x5c\x90\x21\x2a\x1a\xa1\xbf" - "\x15\xd8\x07\xc5\x21\x6a\x8d\x9d\xf7\x64\xb5\x53\x41\xd6\xa0\xeb" - "\xe1\xe5\xfb\x3d\xaa\x1f\x16\x6c\x6d\xb6\x11\x9f\x09\xfd\xd1\x29" - "\x2a\x78\xc5\x64\x83\xac\x1d\x4d\x3f\xc3\xbb\xb4\x75\x39\x2e\xa6" - "\xbd\xae\xeb\x6a\x30\x25\x0b\x4d\x08\x91\x24\xd4\x1f\x99\xf4\x97" - "\x64\xfc\x34\x91\x24\x57\x8b\x92\x41\xa9\x61\x43\x4d\x64\x19\x91" - "\x66\xbe\xe1\xfa\x31\xb6\xfb\xee\x9d\x3a\xc5\x59\x56\x0a\xee\x0e" - "\x05\x2d\x22\xda\xaf\xd3\x09\xff\xa3\xb7\xba\x48\xee\x17\xa8\x38" - "\x91\x70\xdf\xc1\x26\xb7\x28\xe6\xb3\xb8\x91\xd4\xae\x4c\xe7\x0b" - "\xa4\x1d\xe8\xf5\x69\xec\x7b\x97\xc7\x68\xf6\xcd\x7c\x8a\x16\x8d" - "\x7d\x0f\x61\xa8\xbf\x43\x94\x77\x65\xaa\xf5\xc0\x45\x0b\x23\x1b" - "\xba\x32\x07\xe0\x9b\x88\xe1\x3b\x5f\x23\xad\xb1\xac\x43\xf3\x9a" - "\xee\x25\xaf\x3d\x40\xef\xe1\x7d\x90\xf6\x2c\x06\xfd\x89\x61\xd4" - "\xbb\x23\xe5\xce\xcf\x48\xd3\xcf\xd6\x69\x67\x69\xd1\x6b\x4d\x83" - "\xe4\xe3\xf3\xab\xdd\xa9\x7b\xbf\xdd\xe3\x5e\x84\xf6\xff\xe6\x64" - "\x7d\x4c\x80\xec\x5a\x04\xfb\xaf\x40\x7d\xa7\xee\x7d\xa8\x5b\xfa" - "\xb7\x5c\x14\x34\xd2\x24\x1e\x17\x78\xce\x51\x78\xb8\x5d\xc5\xc5" - "\xbf\x77\xf0\xde\xfd\x41\xd6\xf9\x87\x79\x1d\x77\xf0\x3a\xcb\x90" - "\x11\x41\x4a\x73\x5e\x10\x7d\xb0\xdb\xd3\xc1\xb6\x5a\x18\xb6\x57" - "\xe8\xa2\xc8\x39\xda\x79\x9e\x5a\x03\xc7\x79\x6d\x36\xe9\xcd\x45" - "\x7f\xd0\xbc\xc1\x73\x1e\xef\xfa\x08\xb5\x62\x7c\xf6\xd6\x9e\xf3" - "\x1c\xed\x3c\x8e\xf7\x30\x1d\xa5\x0f\xe8\xa8\xe3\xff\xb8\xe4\x5c" - "\x49\xad\x70\x31\x9d\xfb\x2e\x8a\xf9\x5e\xd3\x5f\x88\xfd\xbd\xb3" - "\xac\x00\xdd\xed\x67\xe9\x07\xbf\x7f\x17\x70\x0e\xfc\x07\x60\x49" - "\x5f\x4e\xd3\xe8\x3d\xbc\xf7\xb8\x7f\xd0\x62\xc8\x91\x84\x7e\x33" - "\x92\x3c\x9b\x2c\x8e\x27\xb4\x08\x64\x12\xfb\xdc\x82\x2c\x9a\xcc" - "\xf5\xc2\x77\x26\x7f\xe3\x39\x9e\x9f\x96\xb5\x9e\x5d\x96\xd0\x13" - "\x2c\xa3\x72\x58\xfe\x20\x7c\x7e\xfd\x45\x29\xb3\xb2\xf5\xef\xd9" - "\xfa\xf7\x2c\xfd\x7b\x86\xfe\x9d\xa5\x7f\x4f\xe5\x6f\x25\xdb\x0a" - "\xf3\xfa\xe5\xae\x36\xec\x18\xbe\x8b\x8d\xb6\x00\x3e\xc3\x2d\x8e" - "\x35\x52\x46\xea\x78\x4c\xd6\xf1\xca\xd4\xbf\x0d\x7c\xae\xb3\x84" - "\xd6\xfc\x4f\xe1\xe3\x8f\xc5\x67\x31\x45\xe1\x43\x16\x47\xd6\x17" - "\xc1\xc7\x6a\x09\x65\xfd\x43\xf8\x30\x2e\x1c\x86\xf2\x5d\x71\xf8" - "\x54\x19\xf8\x24\xe4\xb7\x15\xa2\x83\xc7\x87\xe5\xd7\x48\x5f\x95" - "\xc3\x58\xf6\xd7\xf7\x1a\xfe\xd3\x16\xb7\x5c\xce\x7f\x1a\xfa\x82" - "\x0d\x69\x50\xff\xc5\xb5\xfa\x38\xf8\x8e\xd2\x97\x9e\x31\x19\x7b" - "\x63\x50\xd7\x3d\x95\xaa\xae\xfb\xd6\xb3\x0f\xb1\x95\x74\xad\xd3" - "\x21\x3a\xa0\xff\xff\x67\xb3\xdd\x1f\xd3\x07\x8a\x4a\x96\x2f\x7f" - "\xee\x1e\x7b\xd1\xc2\x25\x05\xf6\x9b\xf3\xed\xcb\x0b\x17\x2f\x2a" - "\x29\x88\x5d\x2f\xb6\xea\xfe\xe6\xe5\x3e\x78\xd6\x49\xb9\x0f\x30" - "\xff\xb3\x1d\xaf\xf6\x2e\x3e\xf3\xbe\x70\x3f\x93\xc9\x63\x43\xdd" - "\xab\x64\xe2\x35\x0a\xe0\x53\x6d\x8c\x09\xca\x6f\x33\x25\x69\x56" - "\xd6\xb9\x9e\x81\xfd\xfb\x83\xf1\x51\xe1\x9c\xd6\x63\x84\x31\x7c" - "\x5d\x36\x0d\x3b\x45\xcf\x2c\xe4\x32\x13\xd2\xf0\xa2\x68\x80\xad" - "\x9b\x04\x7b\x84\x6d\x43\xc1\xfe\x82\xf8\x7c\x19\xf2\x89\xd3\xf4" - "\xec\x55\x2c\x7b\xf9\x0e\x05\xa5\xfb\x0a\xe0\xf8\xec\xcd\xc8\xd3" - "\x88\x30\xd3\x66\xa4\x85\x3e\xdd\xc1\xf9\x10\x3e\x8d\xcf\xf5\x23" - "\xdc\xac\xfb\x40\xe2\xb0\xef\xf0\xb9\x7b\x84\x59\xa3\xc2\x0a\xd8" - "\x5f\x2f\xc2\xec\x3a\xbc\x17\x98\xce\xf8\xce\xd2\x6d\x6e\x4e\x53" - "\xa1\x97\x1b\x63\x3f\xb1\x2f\xf2\x3b\x26\x66\xda\xe7\x3f\xf2\xf5" - "\x69\xf7\x3e\xbd\x74\xc9\xa2\x54\x92\x64\xcf\xc8\x74\xdc\x9c\x79" - "\x87\xe3\xd6\x7b\xec\xc5\x05\x05\xcb\xec\x2f\x16\x2c\x29\xb1\x2f" - "\x7c\x71\xe1\xca\x54\x5a\xb4\x74\xd9\xd3\x7c\x82\x9c\x9b\x65\x79" - "\xee\xd3\x8b\x7e\xc0\x8b\xfa\x2a\x75\x6a\xcc\x78\x3c\x9f\x65\x9b" - "\xee\x67\xe1\x08\x64\x6e\x50\xa4\xbc\xe9\xc2\x3b\xfb\x1e\xb2\xe1" - "\xd9\x8c\xdf\x3b\xf8\x1d\xc2\xef\x38\x7e\xc7\xce\xd0\xf3\xf3\xf1" - "\x3c\xd8\xe3\x2e\x9a\x6c\xe8\x05\x03\x3c\x54\x34\xcb\xe0\x21\x8c" - "\xe3\x07\xd5\xf8\x56\xe4\x68\x0d\xc9\xfe\xd3\xcf\x53\x95\x17\x07" - "\x78\x4a\xfa\x37\xe4\x3d\x2b\x2b\x10\x0f\x1e\x66\x3b\x16\x34\x4f" - "\x61\xba\x9d\xa6\xa5\xcf\xc1\xf6\x67\xbb\x86\xe7\x81\x9a\xc1\x2f" - "\x2d\xca\xdf\x46\x11\xdb\x42\x63\x51\xc6\x3b\x7a\x19\xea\x7b\x94" - "\x38\xc2\x76\xfe\x29\xfd\x5b\xd9\xc4\x4b\x87\xf0\x3b\x3f\xf5\xb5" - "\x22\x0b\xef\xff\x53\xb6\x95\x11\xf7\xdc\x2e\xbd\x0c\x0f\x68\xe1" - "\xaa\x73\x8b\xa0\x61\x83\xf0\x1c\x93\x25\xe9\x3e\x01\x7c\xce\x45" - "\x92\x1f\x6f\x93\x7e\xf9\x5c\xbd\x90\x11\x77\xde\xe9\x75\xc8\xf4" - "\x49\x3c\x07\x35\xb7\x58\x44\xd8\x2f\x6a\x24\xf9\xd9\x36\xce\x27" - "\xcc\x6f\xba\x22\x9b\x87\x67\x29\x5d\x80\xfd\xa1\x3d\xa7\xef\x03" - "\x15\x41\xa6\xed\x19\x2a\xba\x55\xd9\x33\xcf\xcf\x57\x7a\xd6\x73" - "\xeb\x8d\xbd\x64\xe8\xa3\x19\xf8\xae\x36\x64\x80\x8f\x9e\xcb\xd3" - "\xf7\xfd\x78\x54\xfd\x9f\x6b\xd1\xbf\x0f\xe9\x38\x26\xb1\x6f\x07" - "\xe0\x7f\x8c\xdb\x0e\xb6\xe1\x21\xbc\x1f\x07\x7d\x5a\x14\x7d\x9e" - "\x93\x73\x0c\xd0\x6b\x38\xfe\x38\xf2\x1d\x43\xdc\x71\xe5\x43\xe1" - "\x39\x13\xd7\x79\x60\x6f\x60\x6d\x16\x70\x1d\xc2\x6b\x6a\xe8\x4b" - "\x87\xbc\x17\xb9\x7f\x3e\xc7\xb0\x9b\x0c\xb9\xc3\x72\x26\x37\x8c" - "\x7e\x2a\xf5\xd2\x25\x53\x0d\x79\x33\xc0\x07\x4b\xb2\x13\xc9\x92" - "\x44\xed\xae\xe8\xbf\xe4\x37\xc2\xfd\x6c\x35\x70\x6a\x92\x6d\xc0" - "\x7e\x22\x2f\xf6\xeb\xbf\x7d\x4a\x46\x2e\xe9\xd7\x7f\x0d\x3c\xd8" - "\xdf\xad\x8f\x71\xeb\x95\xeb\x9c\xba\xdc\x58\xd2\x62\xc8\x0d\x03" - "\x8e\x25\x49\x44\x2c\x0e\xfc\x2b\xdf\x6d\xe2\x39\x56\x1e\x2f\xa5" - "\x3e\x02\x38\x23\x2e\xa8\x33\x3e\x91\x8a\xdd\x90\x7f\x4b\xd6\x43" - "\xc6\x98\xa4\x8e\xea\x7e\xf6\x67\x03\xb2\x68\xa9\x3d\x1a\xa6\x30" - "\xef\x36\x31\x5c\x96\x47\xac\x93\xe4\x86\x01\x2b\x65\xb7\x49\x1f" - "\x5f\x20\x83\x97\x66\x1b\xb8\x82\x86\x47\x0c\x7c\xf5\x3b\x32\x8e" - "\xa0\x9c\xa6\x79\xe1\x3e\xde\xeb\xda\xac\xda\xf3\x79\x29\x6f\x10" - "\xb7\x0f\x79\x37\xfa\xe8\x19\x9f\xde\x87\x5a\x90\x7f\xdf\xe1\xb2" - "\x19\x48\xb3\x74\x8f\xbe\x5f\xf3\x18\xda\xf7\x78\x14\xef\xef\x8a" - "\xb2\x97\x8f\xab\x36\xbc\xd7\x75\x8a\x96\x76\x44\x85\xeb\x6d\x7b" - "\x38\xfb\x14\x15\xef\x52\xb6\x67\x63\xb3\xca\x5f\x2c\xf7\x6c\x1a" - "\x38\xb2\x2c\xe0\xf3\x48\xdc\xc7\x25\xed\x65\x1b\x17\xdb\x8d\xf1" - "\x02\xb0\x0e\x4a\x9a\x8f\x12\xef\x30\x9d\x94\x2f\x83\x67\xff\xb7" - "\xa2\x53\xf1\xac\x18\xda\xf3\xb8\x89\x72\x98\x4e\x23\xd6\x8a\xc8" - "\x88\x40\x92\xc8\x5d\x69\x92\xbe\x9b\xb9\x8f\xf3\xda\x04\xf8\x43" - "\xea\x55\x8a\x6e\xc5\xe5\x06\xdd\x8c\xb6\x63\x3a\xf9\x68\x69\x90" - "\x69\x1b\x5b\xc7\x61\xc7\x4e\x19\x75\x07\x4d\x79\xbe\x14\xdf\xb5" - "\x7a\xbf\x68\xf1\x8c\xe6\xb5\xf2\xa2\xd7\x0f\x9b\xbe\x4e\x87\x1d" - "\x93\x49\xd1\xb6\x18\xf6\xdf\x33\xb3\x64\x3d\x14\xac\x23\x4c\x5f" - "\xee\x2b\xa2\x7c\x37\xe9\xbe\x84\x8e\xa8\xfd\x1a\x45\xb5\xa2\x62" - "\xb7\x2c\x93\x69\xd3\xad\x49\x7f\xa2\xc7\x98\x46\x2c\x17\xb9\x2f" - "\x71\x1f\xe0\xfe\xa4\x68\xf4\xfc\x8c\x28\x1a\x35\x33\x7d\x74\x3a" - "\x1d\x8c\x93\xe5\x05\xf6\xa2\x69\x4a\x16\xdb\x33\x6e\xce\x9f\x24" - "\x9d\x78\xd8\x1f\x9c\x7e\x8f\x3d\x7b\xda\xcd\x8e\xc2\xf1\x73\xd5" - "\x63\x7a\xf6\x6c\x7e\xa6\xc6\xda\x4f\x76\x94\xb3\x2f\xd6\x06\x7b" - "\x71\xbc\x92\x1f\xcf\x37\xfb\xa8\x57\xf2\x0d\x6c\xe5\xce\xca\xf3" - "\x44\x61\xa6\xe1\x12\xb4\x69\x79\x63\xc3\x3c\xc8\xe0\x79\x2b\xc5" - "\x67\xf5\x08\x67\x9f\xb4\xcc\x8b\x91\x8a\xc6\x06\xb6\x79\xfd\x29" - "\x27\xfc\xf8\x35\xf9\x53\xf6\x2e\x98\x79\xab\x53\xf4\xb8\x97\x59" - "\x8d\xba\xb0\x5d\x2c\x38\xbf\x43\x84\x99\x2e\xb9\x0e\xb4\x37\xf2" - "\xb1\x8d\x8c\x74\x53\x7c\xb4\xc8\xa5\x6c\xc3\x65\xa8\xff\xb3\xed" - "\xba\xfc\xca\xc6\xf7\x7c\x1f\x4d\x92\xdf\x11\xb7\x8d\xe7\xe7\x4c" - "\x91\x75\xb7\x3d\x0c\x1b\xa0\xc9\x80\x09\x58\x43\x75\x5f\x73\x12" - "\xde\x17\xdd\x2b\x18\xd9\xb0\xbb\xc6\x92\xa4\xfc\xda\xa1\x5f\xbb" - "\xea\xb5\x48\x4e\xff\x5e\x00\xc4\x8d\x58\x6b\xe5\xbd\x02\x39\xe0" - "\x37\x17\xa7\x31\xe2\x2a\xdd\x11\x5f\xa5\x16\x09\xa2\xed\xac\x4a" - "\x67\xee\x64\xb9\x06\xfb\x73\x39\x19\x63\x99\x1c\x03\x35\x72\x29" - "\x1b\x66\xb9\x5c\xe3\x3b\xef\x36\x21\xfe\xf9\xda\x1b\xd3\xa5\x5d" - "\x12\x8c\xb8\x93\x48\xed\xcf\x5c\x76\xc1\x90\xab\xbc\xc6\x62\x59" - "\x2b\xfc\x3c\xbf\x66\x09\x09\x3f\xaf\xb7\xc8\xf1\x82\xce\x90\xb7" - "\xb4\xc7\xc5\x7e\x47\xa5\xde\x83\x72\xd5\x58\x11\x56\x63\x05\xca" - "\x87\x2d\x9f\x87\x31\x21\xe9\x0c\x2d\x6b\x66\xfc\x99\x36\x3c\x87" - "\x1b\x01\xad\xbc\x3c\x36\x32\x7d\x52\x7f\x66\xe3\x75\x7e\xae\xab" - "\x25\x84\x3a\x47\xd7\x4b\x8b\xf8\x36\xbb\x51\x2f\x0d\xf5\x72\x74" - "\x31\xcf\x06\x79\xff\x05\xfa\xd8\x28\xe9\x5b\x57\xda\xd8\xcb\xdb" - "\xa3\xeb\xc8\x32\x5f\xd5\xa1\x64\x48\xa2\x3a\x0a\x8d\xeb\x28\x69" - "\xf0\xef\x7a\x1f\x93\x78\xb2\xcc\xe8\xa4\xe5\xa0\x31\xef\x7b\x68" - "\x6c\x00\x1f\x4d\xe7\x36\xc4\x98\x59\xc5\x78\x26\x6a\x2f\x86\xa7" - "\x60\x95\x34\x5a\xd6\xba\xf2\x7a\xdc\x25\xc5\x89\xe9\x5d\xf2\xca" - "\xe5\xe9\x5d\x52\xc0\xf9\x19\x0f\xde\x07\x62\x09\xc1\x40\x07\xdf" - "\xc2\x46\x2b\x4f\x54\xee\x88\xb5\x0d\x8c\x57\xc2\x38\xc8\x9d\xce" - "\x4a\x5d\xee\x80\x0f\xc5\x3c\xfc\x58\x0e\xf5\xb8\x5f\x48\x33\x64" - "\x90\x25\xc9\x9e\x2c\x65\x82\x26\xaa\x12\xc1\xb0\xac\xad\xe2\x7d" - "\x17\xd3\x51\x7e\xc2\x78\xd0\xd8\x0e\x1a\x55\x45\xd6\x7d\xed\x46" - "\x4b\x12\xdd\xe7\x4f\xfe\x5a\xaa\xc5\x11\x1a\xc7\x34\x04\x4c\x07" - "\xfa\xee\x35\x6c\x9b\x2a\x5f\x58\x2f\x60\xfc\x7f\x49\xfa\x96\xf1" - "\xa7\x34\x56\x29\x7f\x59\x2f\xd4\xf8\x68\x63\x86\x31\xaf\x89\xef" - "\x3d\x3e\xfa\x20\x4d\xf5\xcb\x6b\x77\x88\x0d\x7b\x33\x22\x6e\x8b" - "\xb0\xaf\xb2\x40\x77\x5c\x71\x7f\x44\x64\x68\x22\x75\x6f\xc6\x00" - "\x9f\xa8\x3d\x21\x06\x9f\x20\x7f\x47\x62\x1e\x58\x91\x72\x79\x1e" - "\x78\x41\xae\x17\x33\xdd\x95\x7d\xb2\x22\xd3\xd0\x4d\xc4\xba\x6b" - "\x77\xd8\xcb\xb8\xfc\x17\x9a\x55\xd9\x4c\x93\x2c\x9e\xab\x9f\x0d" - "\xba\xb8\x90\x76\x81\x21\x07\x98\x5f\x2c\x61\x4a\x62\x59\xc4\xbc" - "\x82\x38\x07\xe4\x4c\x9b\x9a\x43\xdc\xeb\x93\x77\x2c\xb9\x9f\xcf" - "\xf3\x3b\x0b\x77\xf2\x1e\xce\x40\xca\x6e\xe8\xfb\x2b\x6a\x7d\xf4" - "\x4b\x25\x8b\xcc\xbb\xc1\x73\xbb\x4d\xd5\x23\x31\x2e\xab\xbd\x4c" - "\x69\xdc\xa7\xd9\xe7\x0d\xf7\x6b\x84\xa5\x03\x6f\xf6\x7f\x03\x1b" - "\x67\x45\xbf\xff\x9b\x88\x3b\x0b\xb2\x42\xc8\xf1\x13\x63\xd1\x98" - "\x6e\xd0\x6e\xab\x16\xd9\x73\x71\x92\x8d\xb8\xce\x17\xd7\x8d\xde" - "\xf3\xa3\x89\x64\xfa\xdf\xb6\xa7\xa8\xf8\x0e\x4a\x5f\xfb\x75\x13" - "\xfd\xd7\x14\xd2\x98\x0e\x3e\x5a\xd1\xae\x68\xf7\xe2\x38\xa3\x7d" - "\x7c\xf4\xc2\x46\x6e\x0f\x9e\x7f\x9b\x17\x12\x9f\xa9\x39\xc2\x17" - "\x21\xff\xf2\x49\xc5\x3f\x7f\x28\x7e\xde\x87\x75\x78\xfb\xe2\xe5" - "\xf6\xfc\xa5\x2f\x2e\x19\x3b\x36\xc6\x3e\x32\xc9\x73\x1d\xee\x17" - "\x73\xd4\x18\xfa\xe2\x46\x03\x6f\xd6\x45\xf0\x8d\xfa\x3f\x5f\x1d" - "\x6f\xcf\xcd\xce\xd5\xb7\xee\xe6\x66\xd2\xc0\xfb\xed\x34\xfb\xf6" - "\xa8\xcf\x3b\x69\xf6\x1d\x77\xe6\x3e\x5c\xb0\x30\x7f\x65\x54\xe8" - "\x5d\xd1\x73\x72\x95\x3b\x50\x76\xf2\xe8\x07\x20\x2b\x92\xe6\xae" - "\xe6\xf1\xc4\xb1\xb6\x2c\x24\xfe\x06\x79\x3d\x05\x7d\x2c\xf7\x68" - "\x49\x88\x8e\x42\x96\x89\x6b\x59\x86\x0f\x53\xe7\xd5\xa0\x43\x81" - "\xb7\x2c\xa8\xbb\x1f\xba\xdc\x05\x9e\x93\x41\xbe\xdd\xad\x35\xec" - "\x6b\x76\x6f\xbe\xd2\x2b\x1c\x79\x08\xbf\x0a\xcf\x0a\x3c\x87\xe2" - "\xb9\xc9\xbe\x04\xb6\x0e\xef\x0f\x5e\xc1\xfb\x83\x1d\x2f\x30\x8d" - "\x26\x06\x5c\x34\x71\x19\xeb\xe9\x0e\x1b\xeb\x1d\x3e\x72\x1c\xe1" - "\xf5\x01\x4e\x8b\xb0\x85\xf6\x67\x28\x93\x9f\x42\xae\xab\x38\xf2" - "\x44\xc5\xde\x7c\xb1\x33\x87\xef\x70\x19\x87\xf0\xf7\x93\x93\x3e" - "\xa6\x64\xdb\xb0\xfb\x7b\xdc\x0e\x8c\x7f\xf9\xb2\xdf\x0e\x76\x5f" - "\x1a\xeb\x1a\xdc\xe7\x07\x74\x11\xe8\x82\xd0\x45\x72\x1d\x1b\x08" - "\xef\xa6\x01\x3d\x64\xa5\xb5\x5f\xa7\xd5\x28\x15\xdf\x76\x83\xdf" - "\xf1\x3e\xde\xe0\xc7\x18\xbf\x60\x4b\x4a\x0a\x96\x15\xe4\xdb\x6f" - "\x5e\x9e\x4a\x51\x5e\xc1\x0a\x0b\x96\xd8\x97\x15\x3c\xff\x42\xc1" - "\x72\xe9\xd1\x8b\x63\x63\xc6\xf3\x74\x91\xba\xa7\xc6\x38\xb3\x62" - "\x1f\xcd\x74\x5c\xf9\x0a\xfb\x92\x12\x1b\xde\xb0\xf1\xba\xa7\xb2" - "\x25\xba\x66\xc5\xda\x12\xab\xc7\x29\x1d\x6e\xef\x7c\x65\xc7\xac" - "\xfa\x0d\x7f\x9f\xa2\x55\x53\x07\x7c\x4e\xaf\xec\xe2\xfb\x0f\x74" - "\xfa\xfc\x19\x78\xb7\x1b\xf4\xf1\xd1\x6a\xe3\x1c\x41\xa7\x94\x13" - "\x18\x4b\x21\xe7\x62\xc6\x51\x75\x1f\xda\x4a\xde\x3b\x90\x2c\xe7" - "\x64\x53\xf6\xe6\x70\x59\x0c\xf3\x34\xf2\xa3\x1d\xe6\x43\x3e\xb2" - "\x1c\x2b\x37\xe0\xa1\xcc\xe3\x5c\x9e\x6e\xe3\x7c\xe5\x0c\xad\x92" - "\x6b\xd6\x91\xf2\xbd\x39\x2c\x3b\x26\x4a\x9d\x03\x70\xe4\x3a\xd6" - "\xea\x22\xd6\x1f\xa5\xdf\x73\xc0\xe2\x39\x58\xc8\x80\x42\xbe\x3b" - "\x8f\xc3\x94\x4f\xab\x95\x53\x78\x9e\x18\x65\x41\x9f\x58\xd5\x38" - "\xb0\x2f\x7b\x75\x11\xeb\x94\x0c\xd7\x47\xab\x0a\x19\x9e\xf2\xd9" - "\xb5\x0a\xba\xf5\x8b\x1d\x03\xba\xd1\xea\xb4\x28\x9b\x0b\xf8\x28" - "\x3c\x03\xc0\x45\xfa\x84\x54\xfb\xe6\x64\xbd\x59\x4e\x56\xeb\x75" - "\x37\xea\xd3\xe3\x5e\x6d\x03\xcf\x1d\x37\xd6\x5d\x7d\x7a\xbd\x19" - "\x3f\xc6\x3d\x1a\x67\x1d\xdf\x19\x8c\x2f\xf2\x65\x47\xf5\x61\x9e" - "\x73\x19\x82\xb0\xfc\x81\xfd\xb8\x2b\xf7\xc5\xcb\x87\x07\x16\x3e" - "\xfd\x2c\x1b\xe9\xb3\x33\xc7\xdb\x59\x56\xe4\x3e\x3c\x73\xfa\x77" - "\x73\xa7\xcf\x7b\x74\xee\x7c\xb9\xff\xbe\x3f\x7e\xc6\x92\xc4\x09" - "\x62\xf9\xca\x0a\xde\xc8\x46\x7b\x0d\x39\x45\x65\x76\xe5\x8f\x79" - "\x75\x47\xac\x3f\x66\xbe\x26\xab\x74\x0c\x7e\x53\x88\xd6\xd8\xf1" - "\x83\x1e\x59\x96\xae\xf3\xcb\xe9\x1e\x77\x69\xfa\x00\xbf\x94\xc9" - "\x39\x6f\xde\x97\xa0\xe6\x52\x4b\x21\xff\x57\xe6\x47\xc7\x0d\xd8" - "\x7e\xa5\xb3\xfb\x6d\xbf\x7e\x59\x50\xea\x30\xec\x40\x84\x2d\x80" - "\x0d\x98\xc2\x36\xa0\x9a\xfb\x29\x93\x3a\x56\xbc\xad\x36\x60\xa7" - "\x99\xc9\xb0\x01\xd9\x17\x24\xaf\x7b\xaa\x3e\x5a\x7a\x30\xca\xc6" - "\x0a\x48\x5f\x81\x17\x95\x4d\xc8\xf9\xe4\x5c\x9b\xb9\x6b\x32\xcf" - "\x3f\x43\xaf\xcd\xc6\x18\x8f\x71\xa7\x47\x88\x94\xae\xc9\x3a\x4e" - "\x01\x9e\x8f\x66\x7d\x57\xd9\x7b\xab\x1d\x2c\x7f\xc5\xba\xd1\x0f" - "\xcc\x0b\x4b\x3f\x6a\x90\xbd\x6b\x6c\x03\x3c\x57\x66\xe7\xb6\x64" - "\x1a\xf8\xa8\x74\x1c\xe8\x60\x1a\xa8\xf3\x9a\xac\xfe\x3a\xeb\xf3" - "\x18\xc6\x1c\x86\x2a\xab\x6c\xec\x60\xf5\x4b\x5c\xb7\x35\x55\x9f" - "\x5b\x37\x37\x0d\xe1\x7e\x61\xd4\xf1\xd2\xfa\xad\x39\x1e\x57\xbf" - "\x9a\x04\xf5\x0b\xf6\xaf\xbb\xf4\xcf\x4b\x94\x8d\xe5\x7a\x32\x1f" - "\xa0\x9e\xe6\x64\x9b\xd9\x1e\xf5\x7e\x4b\x22\xb9\x3a\x62\xad\xa6" - "\x9f\x01\x29\x7b\xa1\x79\x8c\xb4\xd3\x82\x5b\xb4\x48\xe1\x16\x37" - "\x7e\x78\xb2\x9e\x3d\xa0\xab\x8a\xa0\x4e\x93\x92\x66\xc8\x5e\x9e" - "\x6b\x19\xec\x6c\x1b\x68\x76\xd2\x98\x07\xc0\x7b\x1b\xdb\x93\xf3" - "\xc2\xf7\x09\x0e\x67\x1a\xc0\x26\xf1\x83\xaf\xda\x94\xde\x56\xd6" - "\xdc\x2f\xb3\x6f\x99\xea\x4a\x5e\x4b\xf6\xc3\xb5\x77\x70\xf8\x49" - "\xb4\x9d\x9c\x1b\x94\x77\xd7\x0d\x02\x33\x37\x9c\x45\x89\xe1\x3a" - "\xc7\x18\x70\x07\x3b\x07\x19\x1d\xb6\x74\x89\xbd\x70\xe1\x92\xfc" - "\xa5\x8b\x16\x8d\xb7\xbf\xb0\xe4\xa9\xa2\xa5\x4f\x3f\xcb\x82\x7f" - "\x79\xc9\x0b\xe8\xbf\xb2\xdf\xce\x98\x3d\x3b\xf7\x81\x47\x1f\xf9" - "\x7e\x8c\x0e\x60\xae\x72\x47\xca\xe5\x5d\x59\xeb\x9e\x59\x85\x32" - "\xd1\xfe\x8b\x0e\xa9\xf1\xc6\x89\xf1\xff\xa9\xd9\x4a\xd7\x7a\xbc" - "\x43\x9d\xfd\x74\x06\xa3\xe4\xda\x88\x33\xe4\x82\xfe\xe0\xcc\x1a" - "\x98\x03\x71\x1e\x8b\xd6\x21\xba\xe5\x7d\x75\xce\x76\xc3\x0f\x42" - "\xc9\x58\xd2\x4c\x63\xab\xa8\x5a\x13\x2e\x1f\xb9\xcc\xb0\x17\x4f" - "\xf6\xb8\x5d\x26\xe8\x86\x6d\xba\xfd\x78\x92\xd7\x58\xd9\x7e\x0c" - "\xc3\x96\x9c\xb7\xd2\x73\x5f\xee\xca\x24\xde\x43\x2c\xef\x49\x08" - "\x5d\x14\xed\xbc\xce\xc9\x6b\x46\x7c\x4f\x42\xe5\x33\xd2\x9e\x4c" - "\x96\x69\xf0\x5e\x79\x9a\xd4\x3d\x37\x21\xb2\xd7\xe3\xbd\x4e\xda" - "\x1f\xae\x7c\x43\xf7\xb4\xac\xb5\xcb\x33\xa9\x9b\x55\x7b\xb4\x71" - "\x5b\x70\x79\xb9\x2b\x3d\xaa\x0c\xb4\x01\xf2\x5a\xd4\xbc\x8f\xab" - "\xf6\xb2\xf3\xd9\x29\x27\x06\x3b\x1b\x09\x9e\x77\x0d\xdb\xa2\xfc" - "\x13\xf3\x3e\x38\xbf\xb1\x0f\x8b\xf7\x64\x01\x6e\x20\x7e\x4f\x97" - "\xda\x97\xb0\x36\xcd\xd8\x0f\x82\x77\x5b\xbf\xbe\xcc\x77\x6b\xc0" - "\xce\xb1\x97\xad\x1d\x7a\x96\x5c\xff\x5e\x3f\xc8\xbc\xb2\x71\x06" - "\x55\xdf\x37\x35\x0c\x30\xfa\xef\x3f\x16\xf8\xae\x1f\x35\x80\x07" - "\xe2\x1c\xc6\x7e\x22\xb9\x87\x0c\x63\x16\xdf\xdf\x71\x9a\xd6\xbe" - "\x26\xef\x0b\xb9\x91\xe7\x84\xd7\x1e\x6a\x96\x7b\xd9\xd6\x36\x46" - "\xe3\xa2\xf0\x58\x5b\xc0\xf3\x96\x1c\x1f\x8d\x8b\x63\xe1\x0b\x8b" - "\x27\x39\x16\x2d\xb6\x3f\x5d\xb8\xb8\x38\x77\xb1\xf4\x19\x2a\xdd" - "\x91\x96\xac\x2c\xe6\x59\xfa\x5b\x53\xe3\xc6\x0a\x7d\xdf\x59\xff" - "\xfe\x1a\xb9\xf7\xcc\x7d\x1d\xe8\xa1\xa9\xbd\x67\xeb\xac\x6a\x3c" - "\x74\x67\x5c\xba\xcf\xc2\x3d\xd5\xd8\x67\x01\xbe\xb2\x56\x2b\xff" - "\xe4\xfa\xde\x0c\xe6\x3b\xf7\x82\x04\x79\x8a\xfb\xf7\x19\xf1\x7e" - "\x97\xbe\x1c\x79\x46\x40\xfa\x92\x7e\x95\xdb\x6d\x6d\xb3\xd7\x31" - "\x93\x7d\x63\xea\xfc\xec\x6e\x30\xf8\xd9\xd8\xa3\xc6\xb0\xf8\x8c" - "\xc2\xa4\x60\xf4\xfe\x94\x75\x43\x30\xb6\xd8\xfa\xeb\xb1\x5a\x23" - "\xc6\x3d\xa0\x79\x18\x8f\xf6\x78\x3c\x80\xdf\x58\x84\x47\xed\xff" - "\x31\xea\xb9\x0e\xfa\xdf\xba\xfc\x78\x9e\xbb\x7f\xe6\x6c\x28\x73" - "\xcb\x0b\x4a\x52\x69\xfa\xc2\xa2\x22\xee\xd7\x0b\x0b\x8a\x5e\x58" - "\xb6\x74\x79\xee\xe2\x25\x8b\x11\x7a\xff\x22\x76\xe5\x2a\x93\xdc" - "\xa3\xc7\xd8\x97\x14\x14\xe4\xab\x20\xbd\x19\x62\xd7\x46\xd4\xfa" - "\xf7\x3a\xf4\xc3\xb5\x53\x06\xf4\x96\x75\x6d\x42\x5b\x37\x06\xbf" - "\xaf\xca\x3e\x2d\x75\x8a\x75\x8d\xb1\x76\xc1\xba\x83\x06\x3f\xc8" - "\xf6\x73\xf2\x1e\x91\xc6\xbb\xbb\x85\x5c\x4b\x40\x9b\xbd\xc4\x77" - "\x50\x0f\x81\xcd\x62\x66\x7d\x38\x0a\x4e\x67\x3f\x2d\xd7\x3d\xde" - "\xc6\xbc\xc8\xf0\xd0\xdf\x4c\x7c\x36\xbb\xc7\xbd\x1e\xfc\xef\xf2" - "\x28\xfe\x5f\xdf\xcf\xff\xdd\x5a\x32\x6c\x9c\xf5\x19\x86\x1e\x1c" - "\xdb\x67\xd6\x67\x5d\xda\x97\x78\xcf\xe0\xfa\x1c\x83\xb6\x46\x3b" - "\x2b\xde\x5a\x7f\xc1\x98\x9b\xac\xd7\x7d\x89\xf3\x3b\xe7\x65\x1d" - "\x57\x8c\x18\x7e\x1f\xef\x81\x3e\x45\xeb\x9b\x15\xbf\xac\x6f\x88" - "\xda\xcb\x63\x3d\x43\xeb\x3d\xaa\x9d\xd6\x1f\x32\xf0\xf3\xd1\x7a" - "\xd6\x6c\xe4\x1d\x85\xaa\xef\xaf\x9b\xa6\x78\x67\xfd\x49\x83\xb6" - "\x6c\x37\xe2\xbb\x73\x60\x4c\x5f\xb7\x91\xc7\x3a\xfd\x6c\x7a\x1f" - "\xd7\x1f\x70\x8a\x0c\x38\x3d\xee\x97\x50\x7f\x73\xb3\x41\x2b\x23" - "\x4d\x34\x4f\x4c\x5f\x58\x0c\xa3\x6e\xf1\xa2\x45\x05\xcb\x96\x1b" - "\xbe\x7a\x33\x96\x16\xe5\x2b\xdf\xbc\xf7\xa0\xf9\x5f\x44\x0f\x9c" - "\xc6\xee\x7d\x11\xaa\x5e\xe3\x6c\x80\xf1\x6c\x87\xcb\xfd\x5e\x52" - "\xff\xaf\x58\x5b\xa7\xdb\x02\xa7\xe8\x87\x2e\x3c\x21\x0f\x7e\x78" - "\x97\xd2\xcb\x52\xfe\x0b\x38\xed\x33\xf4\xb2\xee\xa1\x53\x60\x5f" - "\xbf\xf4\x8e\x71\xef\x92\xa1\x2b\xf0\x59\x14\xcf\x12\xf6\x75\x5e" - "\xf1\x49\xa4\xa2\xd1\x25\x52\xb7\xf0\xdc\x6e\x1a\xf3\xfd\xf0\x4e" - "\xf6\x83\xce\xfe\x62\x7e\x28\x75\x19\x96\x25\xec\xd3\xbc\x9d\x5e" - "\x6a\xe3\xbb\x8f\x7d\x54\xd1\xe1\x4f\x69\x74\xad\x5f\x45\xe6\x5d" - "\xdb\x44\x3b\xdf\xd7\xda\xdc\xc0\x74\xfc\xe1\xb8\xdf\x97\xaa\xfb" - "\xa8\xf9\x1e\xdf\x4d\x88\x03\x6f\xf9\xf5\xb9\xe4\x6a\x7d\x1e\xaf" - "\x1a\xe9\xa0\xff\xa5\x1d\x52\x7c\xb9\x35\xf7\xab\x2e\x72\xc8\x7b" - "\xd3\xdc\xbc\x0f\x68\x8b\x9f\xcf\xc8\x89\xf2\xad\x79\x8c\x2b\xf4" - "\x19\x3f\xf4\x20\xe4\xdb\x9a\x07\x58\xfb\x22\x15\xfb\x3d\xca\x57" - "\x34\xf3\xc8\x4b\xb5\x5c\x67\x99\x8f\xe7\x0c\xcb\x1b\x6b\xe5\xfd" - "\x6a\x15\x8d\x0e\xbd\xac\x5a\xe8\x75\xb3\x59\xb7\x13\x17\xbb\x1a" - "\xa0\x5b\xf2\x38\xe6\x1f\xb1\xd6\xc7\x3e\xae\x4b\x79\xfe\x73\x44" - "\xe0\x06\x01\x79\x30\x3c\x37\x64\x25\xe3\x3e\x25\x9e\xff\x54\x3a" - "\xd6\x0f\x03\x03\x73\xcd\xc8\x7f\x91\xd2\xc0\x9b\xae\x76\xfa\x91" - "\xdc\xff\xc4\x7c\xc9\x74\xec\x05\xed\x24\xde\x17\xbb\x9a\x60\x93" - "\x0e\x3f\x4d\x3f\xba\x9d\x69\xc8\x6b\x80\xbc\x77\x07\x61\x16\xf6" - "\x23\x7d\x8a\x7e\x74\x1d\xd3\x8f\x61\x89\xf2\x6a\x4f\xa8\x27\xe7" - "\x5b\x7c\x9e\x90\x65\xd3\x9a\x52\xe8\x81\x8b\xb8\x5f\x97\xbf\xce" - "\xb6\x1d\xdf\xf7\xc1\xef\xce\x7c\x11\x91\xf4\x5f\xc5\xf4\x2f\x7f" - "\x7d\x4d\x87\x88\x7c\xe6\x26\x71\x24\x40\xf4\x99\x46\xa1\xa0\x96" - "\xc4\xeb\x25\x9a\xb3\x8b\xcf\x3c\x36\x90\xd7\x51\x4e\x28\xd7\xbc" - "\x79\x15\x59\xf9\x8c\x28\xdf\x65\xd1\x1a\xa8\xa5\xd6\xe2\x5a\xfa" - "\xd7\x50\x35\x79\x56\xf0\x99\xff\x8a\x59\x7f\x72\x54\xf3\xba\x4a" - "\x0a\xde\x53\xec\xdf\xe5\xb2\x7e\xe4\xfb\xd3\xf1\x3f\xd3\x9f\x3c" - "\x7f\x26\xfb\x63\xf2\xdb\xdf\x92\xf3\xaf\xd4\x92\xf5\xaf\xe4\x6c" - "\x17\x11\xb6\x0f\xca\x9e\xe3\x32\xca\x01\xab\x81\xcf\x56\x5a\x23" - "\xdd\xb6\x54\xd4\xdf\x34\xcf\x41\xd4\x1a\xf0\x83\x9f\xfe\x17\xe3" - "\xf8\x7c\xdd\x79\x32\x7b\x96\xfc\x41\xbe\x2b\xbd\xbd\xab\xc1\x9b" - "\xdf\xc6\x3a\x53\x88\xcf\x92\xf2\x3a\x14\xf4\xde\x48\x25\xe3\x18" - "\x56\x78\xf3\x9d\xcc\x46\x7e\xe8\x54\x46\x7e\x79\x56\x7e\x17\xd3" - "\x03\x38\x1d\x9d\xaf\x68\xd2\xd2\x06\x9a\x7e\x57\xa7\x4f\x4e\x34" - "\x7d\x7e\x54\xc5\xf4\x61\x3f\x84\x91\x15\x5d\x0d\xc0\x2d\x0b\x34" - "\x88\x18\x65\x70\xfb\xeb\x73\x78\xe6\xcd\xe7\x29\xcd\xb3\x84\xef" - "\x25\x2a\xbf\x60\xc9\x36\x99\x23\x17\xcf\x36\x55\x5e\x20\x13\xb7" - "\x1b\xcf\xd5\x57\xca\x78\x49\x73\xc9\xf3\xd1\x77\x83\x33\x1f\xf2" - "\xfd\xe0\x68\xaf\x72\xe0\x50\x8c\xb6\x6a\xe0\xa7\xe2\xf3\xad\x79" - "\x7c\xd6\x5e\xd7\xeb\x07\xc2\xc1\xe7\x21\xbe\x7b\x50\xce\x51\x94" - "\x17\x33\x1f\x4b\xdb\x5e\x7b\x29\x73\x17\x64\x4e\xed\xab\x72\x5d" - "\x3b\xad\x6e\x24\x59\x59\x06\xef\x90\x7b\x89\x2b\x4a\x0c\x39\xb4" - "\x61\x14\x9f\x4f\x2a\x6f\xd0\xe4\xdd\x72\x8d\x35\x3a\x7f\xd7\x20" - "\x4d\x8d\x8f\xd2\x4f\x2a\x59\x5c\xd1\x68\xf4\x2b\xe8\x4c\x7e\x83" - "\xf7\x81\xab\xc3\xcf\xfc\x2e\xf7\x24\xf8\x60\xcf\x5a\xe4\x5d\x8a" - "\x03\xf7\xa9\x55\x9c\x34\xf8\x1c\x75\x6b\x62\x99\xc1\xfd\x7b\x30" - "\x9d\x1b\xfa\x5e\x8b\xd8\x99\xc3\xf7\xd5\x53\xda\x5a\xe1\x4f\x6b" - "\xb7\x08\xbe\xa3\x92\xcf\xb6\xf1\xbd\x89\x75\x08\x47\x7c\xd2\xdc" - "\x80\xdf\x02\xfd\x90\xef\x64\x32\x19\xe1\xbc\xd6\xc0\x73\x33\x73" - "\x03\xc2\x3f\x6f\xa5\x85\xef\x76\x1b\x23\xe7\x9f\xf5\xf0\x56\x1b" - "\xaf\x41\xf8\x2d\xa0\x5f\xa8\x1f\x56\x77\x4e\x32\xe3\x89\xb4\xe9" - "\xfd\x69\xbb\x73\x4c\x5e\x87\x2a\x33\x2a\x6c\xc8\x3c\x07\xf2\x72" - "\x7b\xeb\x61\x4a\xaf\xdc\xf0\x4e\xbf\xad\xc4\x3e\xfb\xba\x31\x0e" - "\x2e\xcf\x49\x8a\x74\xe7\x68\x61\xc0\x46\xff\xb1\xca\x3b\xe6\x42" - "\x7e\xfd\x9e\x97\x0e\xc8\x81\x36\x12\x15\x5d\xd9\x48\x67\x62\xb8" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 21:37:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F62A106566C; Thu, 14 Jan 2010 21:37:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D2ED8FC14; Thu, 14 Jan 2010 21:37:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ELbfOo053193; Thu, 14 Jan 2010 21:37:41 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ELbfir053190; Thu, 14 Jan 2010 21:37:41 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142137.o0ELbfir053190@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 21:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202308 - stable/7/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 21:37:41 -0000 Author: yongari Date: Thu Jan 14 21:37:40 2010 New Revision: 202308 URL: http://svn.freebsd.org/changeset/base/202308 Log: MFC r200798,200801,200803-200804,200808,200810 r200798: Use ANSI function definations. r200801: o Remove unnecessary return statement. o Remove register keyword. r200803: s/u_intXX_t/uintXX_t/g r200804: Remove trailing white spaces. r200808: style(9) r200810: Sort function prototyes. Also remove mergeinfo recorded in if_ste.c/if_stereg.h. Modified: stable/7/sys/dev/ste/if_ste.c (contents, props changed) stable/7/sys/dev/ste/if_stereg.h (contents, props changed) Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ste/if_ste.c ============================================================================== --- stable/7/sys/dev/ste/if_ste.c Thu Jan 14 21:34:12 2010 (r202307) +++ stable/7/sys/dev/ste/if_ste.c Thu Jan 14 21:37:40 2010 (r202308) @@ -91,45 +91,44 @@ static struct ste_type ste_devs[] = { { 0, 0, NULL } }; -static int ste_probe(device_t); -static int ste_attach(device_t); -static int ste_detach(device_t); -static void ste_init(void *); -static void ste_init_locked(struct ste_softc *); -static void ste_intr(void *); -static void ste_rxeoc(struct ste_softc *); -static void ste_rxeof(struct ste_softc *); -static void ste_txeoc(struct ste_softc *); -static void ste_txeof(struct ste_softc *); -static void ste_stats_update(void *); -static void ste_stop(struct ste_softc *); -static void ste_reset(struct ste_softc *); -static int ste_ioctl(struct ifnet *, u_long, caddr_t); -static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *); -static void ste_start(struct ifnet *); -static void ste_start_locked(struct ifnet *); -static void ste_watchdog(struct ste_softc *); -static int ste_shutdown(device_t); -static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *, - struct mbuf *); -static int ste_ifmedia_upd(struct ifnet *); -static void ste_ifmedia_upd_locked(struct ifnet *); -static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *); - -static void ste_mii_sync(struct ste_softc *); -static void ste_mii_send(struct ste_softc *, u_int32_t, int); -static int ste_mii_readreg(struct ste_softc *, struct ste_mii_frame *); -static int ste_mii_writereg(struct ste_softc *, struct ste_mii_frame *); -static int ste_miibus_readreg(device_t, int, int); -static int ste_miibus_writereg(device_t, int, int, int); -static void ste_miibus_statchg(device_t); - -static int ste_eeprom_wait(struct ste_softc *); -static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); -static void ste_wait(struct ste_softc *); -static void ste_setmulti(struct ste_softc *); -static int ste_init_rx_list(struct ste_softc *); -static void ste_init_tx_list(struct ste_softc *); +static int ste_attach(device_t); +static int ste_detach(device_t); +static int ste_probe(device_t); +static int ste_shutdown(device_t); + +static int ste_eeprom_wait(struct ste_softc *); +static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *); +static int ste_ifmedia_upd(struct ifnet *); +static void ste_ifmedia_upd_locked(struct ifnet *); +static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static void ste_init(void *); +static void ste_init_locked(struct ste_softc *); +static int ste_init_rx_list(struct ste_softc *); +static void ste_init_tx_list(struct ste_softc *); +static void ste_intr(void *); +static int ste_ioctl(struct ifnet *, u_long, caddr_t); +static int ste_mii_readreg(struct ste_softc *, struct ste_mii_frame *); +static void ste_mii_send(struct ste_softc *, uint32_t, int); +static void ste_mii_sync(struct ste_softc *); +static int ste_mii_writereg(struct ste_softc *, struct ste_mii_frame *); +static int ste_miibus_readreg(device_t, int, int); +static void ste_miibus_statchg(device_t); +static int ste_miibus_writereg(device_t, int, int, int); +static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *, + struct mbuf *); +static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); +static void ste_reset(struct ste_softc *); +static void ste_rxeoc(struct ste_softc *); +static void ste_rxeof(struct ste_softc *); +static void ste_setmulti(struct ste_softc *); +static void ste_start(struct ifnet *); +static void ste_start_locked(struct ifnet *); +static void ste_stats_update(void *); +static void ste_stop(struct ste_softc *); +static void ste_txeoc(struct ste_softc *); +static void ste_txeof(struct ste_softc *); +static void ste_wait(struct ste_softc *); +static void ste_watchdog(struct ste_softc *); #ifdef STE_USEIOSPACE #define STE_RES SYS_RES_IOPORT @@ -194,16 +193,15 @@ SYSCTL_INT(_hw_ste, OID_AUTO, rxsyncs, C #define MII_SET(x) STE_SETBIT1(sc, STE_PHYCTL, x) -#define MII_CLR(x) STE_CLRBIT1(sc, STE_PHYCTL, x) +#define MII_CLR(x) STE_CLRBIT1(sc, STE_PHYCTL, x) /* * Sync the PHYs by setting data bit and strobing the clock 32 times. */ static void -ste_mii_sync(sc) - struct ste_softc *sc; +ste_mii_sync(struct ste_softc *sc) { - register int i; + int i; MII_SET(STE_PHYCTL_MDIR|STE_PHYCTL_MDATA); @@ -213,20 +211,15 @@ ste_mii_sync(sc) MII_CLR(STE_PHYCTL_MCLK); DELAY(1); } - - return; } /* * Clock a series of bits through the MII. */ static void -ste_mii_send(sc, bits, cnt) - struct ste_softc *sc; - u_int32_t bits; - int cnt; +ste_mii_send(struct ste_softc *sc, uint32_t bits, int cnt) { - int i; + int i; MII_CLR(STE_PHYCTL_MCLK); @@ -247,12 +240,9 @@ ste_mii_send(sc, bits, cnt) * Read an PHY register through the MII. */ static int -ste_mii_readreg(sc, frame) - struct ste_softc *sc; - struct ste_mii_frame *frame; - +ste_mii_readreg(struct ste_softc *sc, struct ste_mii_frame *frame) { - int i, ack; + int i, ack; /* * Set up frame for RX. @@ -261,7 +251,7 @@ ste_mii_readreg(sc, frame) frame->mii_opcode = STE_MII_READOP; frame->mii_turnaround = 0; frame->mii_data = 0; - + CSR_WRITE_2(sc, STE_PHYCTL, 0); /* * Turn on data xmit. @@ -299,7 +289,7 @@ ste_mii_readreg(sc, frame) * need to clock through 16 cycles to keep the PHY(s) in sync. */ if (ack) { - for(i = 0; i < 16; i++) { + for (i = 0; i < 16; i++) { MII_CLR(STE_PHYCTL_MCLK); DELAY(1); MII_SET(STE_PHYCTL_MCLK); @@ -328,18 +318,15 @@ fail: DELAY(1); if (ack) - return(1); - return(0); + return (1); + return (0); } /* * Write to a PHY register through the MII. */ static int -ste_mii_writereg(sc, frame) - struct ste_softc *sc; - struct ste_mii_frame *frame; - +ste_mii_writereg(struct ste_softc *sc, struct ste_mii_frame *frame) { /* @@ -349,7 +336,7 @@ ste_mii_writereg(sc, frame) frame->mii_stdelim = STE_MII_STARTDELIM; frame->mii_opcode = STE_MII_WRITEOP; frame->mii_turnaround = STE_MII_TURNAROUND; - + /* * Turn on data output. */ @@ -375,16 +362,14 @@ ste_mii_writereg(sc, frame) */ MII_CLR(STE_PHYCTL_MDIR); - return(0); + return (0); } static int -ste_miibus_readreg(dev, phy, reg) - device_t dev; - int phy, reg; +ste_miibus_readreg(device_t dev, int phy, int reg) { - struct ste_softc *sc; - struct ste_mii_frame frame; + struct ste_softc *sc; + struct ste_mii_frame frame; sc = device_get_softc(dev); @@ -397,16 +382,14 @@ ste_miibus_readreg(dev, phy, reg) frame.mii_regaddr = reg; ste_mii_readreg(sc, &frame); - return(frame.mii_data); + return (frame.mii_data); } static int -ste_miibus_writereg(dev, phy, reg, data) - device_t dev; - int phy, reg, data; +ste_miibus_writereg(device_t dev, int phy, int reg, int data) { - struct ste_softc *sc; - struct ste_mii_frame frame; + struct ste_softc *sc; + struct ste_mii_frame frame; sc = device_get_softc(dev); bzero((char *)&frame, sizeof(frame)); @@ -417,15 +400,14 @@ ste_miibus_writereg(dev, phy, reg, data) ste_mii_writereg(sc, &frame); - return(0); + return (0); } static void -ste_miibus_statchg(dev) - device_t dev; +ste_miibus_statchg(device_t dev) { - struct ste_softc *sc; - struct mii_data *mii; + struct ste_softc *sc; + struct mii_data *mii; sc = device_get_softc(dev); @@ -436,30 +418,26 @@ ste_miibus_statchg(dev) } else { STE_CLRBIT2(sc, STE_MACCTL0, STE_MACCTL0_FULLDUPLEX); } - - return; } - + static int -ste_ifmedia_upd(ifp) - struct ifnet *ifp; +ste_ifmedia_upd(struct ifnet *ifp) { - struct ste_softc *sc; + struct ste_softc *sc; sc = ifp->if_softc; STE_LOCK(sc); ste_ifmedia_upd_locked(ifp); STE_UNLOCK(sc); - return(0); + return (0); } static void -ste_ifmedia_upd_locked(ifp) - struct ifnet *ifp; +ste_ifmedia_upd_locked(struct ifnet *ifp) { - struct ste_softc *sc; - struct mii_data *mii; + struct ste_softc *sc; + struct mii_data *mii; sc = ifp->if_softc; STE_LOCK_ASSERT(sc); @@ -474,12 +452,10 @@ ste_ifmedia_upd_locked(ifp) } static void -ste_ifmedia_sts(ifp, ifmr) - struct ifnet *ifp; - struct ifmediareq *ifmr; +ste_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { - struct ste_softc *sc; - struct mii_data *mii; + struct ste_softc *sc; + struct mii_data *mii; sc = ifp->if_softc; mii = device_get_softc(sc->ste_miibus); @@ -489,15 +465,12 @@ ste_ifmedia_sts(ifp, ifmr) ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; STE_UNLOCK(sc); - - return; } static void -ste_wait(sc) - struct ste_softc *sc; +ste_wait(struct ste_softc *sc) { - register int i; + int i; for (i = 0; i < STE_TIMEOUT; i++) { if (!(CSR_READ_4(sc, STE_DMACTL) & STE_DMACTL_DMA_HALTINPROG)) @@ -506,8 +479,6 @@ ste_wait(sc) if (i == STE_TIMEOUT) device_printf(sc->ste_dev, "command never completed!\n"); - - return; } /* @@ -515,10 +486,9 @@ ste_wait(sc) * it a command. */ static int -ste_eeprom_wait(sc) - struct ste_softc *sc; +ste_eeprom_wait(struct ste_softc *sc) { - int i; + int i; DELAY(1000); @@ -531,10 +501,10 @@ ste_eeprom_wait(sc) if (i == 100) { device_printf(sc->ste_dev, "eeprom failed to come ready\n"); - return(1); + return (1); } - return(0); + return (0); } /* @@ -542,18 +512,13 @@ ste_eeprom_wait(sc) * data is stored in the EEPROM in network byte order. */ static int -ste_read_eeprom(sc, dest, off, cnt, swap) - struct ste_softc *sc; - caddr_t dest; - int off; - int cnt; - int swap; +ste_read_eeprom(struct ste_softc *sc, caddr_t dest, int off, int cnt, int swap) { - int err = 0, i; - u_int16_t word = 0, *ptr; + uint16_t word, *ptr; + int err = 0, i; if (ste_eeprom_wait(sc)) - return(1); + return (1); for (i = 0; i < cnt; i++) { CSR_WRITE_2(sc, STE_EEPROM_CTL, STE_EEOPCODE_READ | (off + i)); @@ -561,24 +526,23 @@ ste_read_eeprom(sc, dest, off, cnt, swap if (err) break; word = CSR_READ_2(sc, STE_EEPROM_DATA); - ptr = (u_int16_t *)(dest + (i * 2)); + ptr = (uint16_t *)(dest + (i * 2)); if (swap) *ptr = ntohs(word); else - *ptr = word; + *ptr = word; } - return(err ? 1 : 0); + return (err ? 1 : 0); } static void -ste_setmulti(sc) - struct ste_softc *sc; +ste_setmulti(struct ste_softc *sc) { - struct ifnet *ifp; - int h = 0; - u_int32_t hashes[2] = { 0, 0 }; - struct ifmultiaddr *ifma; + struct ifnet *ifp; + struct ifmultiaddr *ifma; + uint32_t hashes[2] = { 0, 0 }; + int h; ifp = sc->ste_ifp; if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { @@ -613,8 +577,6 @@ ste_setmulti(sc) CSR_WRITE_2(sc, STE_MAR3, (hashes[1] >> 16) & 0xFFFF); STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_ALLMULTI); STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_MULTIHASH); - - return; } #ifdef DEVICE_POLLING @@ -647,7 +609,7 @@ ste_poll_locked(struct ifnet *ifp, enum ste_start_locked(ifp); if (cmd == POLL_AND_CHECK_STATUS) { - u_int16_t status; + uint16_t status; status = CSR_READ_2(sc, STE_ISR_ACK); @@ -671,12 +633,11 @@ ste_poll_locked(struct ifnet *ifp, enum #endif /* DEVICE_POLLING */ static void -ste_intr(xsc) - void *xsc; +ste_intr(void *xsc) { - struct ste_softc *sc; - struct ifnet *ifp; - u_int16_t status; + struct ste_softc *sc; + struct ifnet *ifp; + uint16_t status; sc = xsc; STE_LOCK(sc); @@ -734,8 +695,6 @@ ste_intr(xsc) ste_start_locked(ifp); STE_UNLOCK(sc); - - return; } static void @@ -766,20 +725,19 @@ ste_rxeoc(struct ste_softc *sc) * the higher level protocols. */ static void -ste_rxeof(sc) - struct ste_softc *sc; +ste_rxeof(struct ste_softc *sc) { - struct mbuf *m; - struct ifnet *ifp; - struct ste_chain_onefrag *cur_rx; - int total_len = 0, count=0; - u_int32_t rxstat; + struct mbuf *m; + struct ifnet *ifp; + struct ste_chain_onefrag *cur_rx; + uint32_t rxstat; + int total_len = 0, count = 0; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; - while((rxstat = sc->ste_cdata.ste_rx_head->ste_ptr->ste_status) + while ((rxstat = sc->ste_cdata.ste_rx_head->ste_ptr->ste_status) & STE_RXSTAT_DMADONE) { #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) { @@ -820,7 +778,7 @@ ste_rxeof(sc) continue; } - /* No errors; receive the packet. */ + /* No errors; receive the packet. */ m = cur_rx->ste_mbuf; total_len = cur_rx->ste_ptr->ste_status & STE_RXSTAT_FRAMELEN; @@ -853,11 +811,10 @@ ste_rxeof(sc) } static void -ste_txeoc(sc) - struct ste_softc *sc; +ste_txeoc(struct ste_softc *sc) { - u_int8_t txstat; - struct ifnet *ifp; + struct ifnet *ifp; + uint8_t txstat; ifp = sc->ste_ifp; @@ -888,22 +845,19 @@ ste_txeoc(sc) ste_init_locked(sc); CSR_WRITE_2(sc, STE_TX_STATUS, txstat); } - - return; } static void -ste_txeof(sc) - struct ste_softc *sc; +ste_txeof(struct ste_softc *sc) { - struct ste_chain *cur_tx; - struct ifnet *ifp; - int idx; + struct ifnet *ifp; + struct ste_chain *cur_tx; + int idx; ifp = sc->ste_ifp; idx = sc->ste_cdata.ste_tx_cons; - while(idx != sc->ste_cdata.ste_tx_prod) { + while (idx != sc->ste_cdata.ste_tx_prod) { cur_tx = &sc->ste_cdata.ste_tx_chain[idx]; if (!(cur_tx->ste_ptr->ste_ctl & STE_TXCTL_DMADONE)) @@ -923,12 +877,11 @@ ste_txeof(sc) } static void -ste_stats_update(xsc) - void *xsc; +ste_stats_update(void *xsc) { - struct ste_softc *sc; - struct ifnet *ifp; - struct mii_data *mii; + struct ste_softc *sc; + struct ifnet *ifp; + struct mii_data *mii; sc = xsc; STE_LOCK_ASSERT(sc); @@ -958,8 +911,6 @@ ste_stats_update(xsc) if (sc->ste_timer > 0 && --sc->ste_timer == 0) ste_watchdog(sc); callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc); - - return; } @@ -968,14 +919,13 @@ ste_stats_update(xsc) * IDs against our list and return a device name if we find a match. */ static int -ste_probe(dev) - device_t dev; +ste_probe(device_t dev) { - struct ste_type *t; + struct ste_type *t; t = ste_devs; - while(t->ste_name != NULL) { + while (t->ste_name != NULL) { if ((pci_get_vendor(dev) == t->ste_vid) && (pci_get_device(dev) == t->ste_did)) { device_set_desc(dev, t->ste_name); @@ -984,7 +934,7 @@ ste_probe(dev) t++; } - return(ENXIO); + return (ENXIO); } /* @@ -992,13 +942,12 @@ ste_probe(dev) * setup and ethernet/BPF attach. */ static int -ste_attach(dev) - device_t dev; +ste_attach(device_t dev) { - struct ste_softc *sc; - struct ifnet *ifp; - int error = 0, rid; - u_char eaddr[6]; + struct ste_softc *sc; + struct ifnet *ifp; + u_char eaddr[6]; + int error = 0, rid; sc = device_get_softc(dev); sc->ste_dev = dev; @@ -1127,7 +1076,7 @@ fail: if (error) ste_detach(dev); - return(error); + return (error); } /* @@ -1138,11 +1087,10 @@ fail: * allocated. */ static int -ste_detach(dev) - device_t dev; +ste_detach(device_t dev) { - struct ste_softc *sc; - struct ifnet *ifp; + struct ste_softc *sc; + struct ifnet *ifp; sc = device_get_softc(dev); KASSERT(mtx_initialized(&sc->ste_mtx), ("ste mutex not initialized")); @@ -1182,25 +1130,22 @@ ste_detach(dev) mtx_destroy(&sc->ste_mtx); - return(0); + return (0); } static int -ste_newbuf(sc, c, m) - struct ste_softc *sc; - struct ste_chain_onefrag *c; - struct mbuf *m; +ste_newbuf(struct ste_softc *sc, struct ste_chain_onefrag *c, struct mbuf *m) { - struct mbuf *m_new = NULL; + struct mbuf *m_new = NULL; if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) - return(ENOBUFS); + return (ENOBUFS); MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); - return(ENOBUFS); + return (ENOBUFS); } m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; } else { @@ -1216,16 +1161,15 @@ ste_newbuf(sc, c, m) c->ste_ptr->ste_frag.ste_addr = vtophys(mtod(m_new, caddr_t)); c->ste_ptr->ste_frag.ste_len = (1536 + ETHER_VLAN_ENCAP_LEN) | STE_FRAG_LAST; - return(0); + return (0); } static int -ste_init_rx_list(sc) - struct ste_softc *sc; +ste_init_rx_list(struct ste_softc *sc) { - struct ste_chain_data *cd; - struct ste_list_data *ld; - int i; + struct ste_chain_data *cd; + struct ste_list_data *ld; + int i; cd = &sc->ste_cdata; ld = sc->ste_ldata; @@ -1233,7 +1177,7 @@ ste_init_rx_list(sc) for (i = 0; i < STE_RX_LIST_CNT; i++) { cd->ste_rx_chain[i].ste_ptr = &ld->ste_rx_list[i]; if (ste_newbuf(sc, &cd->ste_rx_chain[i], NULL) == ENOBUFS) - return(ENOBUFS); + return (ENOBUFS); if (i == (STE_RX_LIST_CNT - 1)) { cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[0]; @@ -1250,16 +1194,15 @@ ste_init_rx_list(sc) cd->ste_rx_head = &cd->ste_rx_chain[0]; - return(0); + return (0); } static void -ste_init_tx_list(sc) - struct ste_softc *sc; +ste_init_tx_list(struct ste_softc *sc) { - struct ste_chain_data *cd; - struct ste_list_data *ld; - int i; + struct ste_chain_data *cd; + struct ste_list_data *ld; + int i; cd = &sc->ste_cdata; ld = sc->ste_ldata; @@ -1278,15 +1221,12 @@ ste_init_tx_list(sc) cd->ste_tx_prod = 0; cd->ste_tx_cons = 0; - - return; } static void -ste_init(xsc) - void *xsc; +ste_init(void *xsc) { - struct ste_softc *sc; + struct ste_softc *sc; sc = xsc; STE_LOCK(sc); @@ -1295,11 +1235,10 @@ ste_init(xsc) } static void -ste_init_locked(sc) - struct ste_softc *sc; +ste_init_locked(struct ste_softc *sc) { - int i; - struct ifnet *ifp; + struct ifnet *ifp; + int i; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; @@ -1389,7 +1328,7 @@ ste_init_locked(sc) /* Disable interrupts if we are polling. */ if (ifp->if_capenable & IFCAP_POLLING) CSR_WRITE_2(sc, STE_IMR, 0); - else + else #endif /* Enable interrupts. */ CSR_WRITE_2(sc, STE_IMR, STE_INTRS); @@ -1403,16 +1342,13 @@ ste_init_locked(sc) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc); - - return; } static void -ste_stop(sc) - struct ste_softc *sc; +ste_stop(struct ste_softc *sc) { - int i; - struct ifnet *ifp; + struct ifnet *ifp; + int i; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; @@ -1427,8 +1363,8 @@ ste_stop(sc) STE_SETBIT2(sc, STE_DMACTL, STE_DMACTL_TXDMA_STALL); STE_SETBIT2(sc, STE_DMACTL, STE_DMACTL_RXDMA_STALL); ste_wait(sc); - /* - * Try really hard to stop the RX engine or under heavy RX + /* + * Try really hard to stop the RX engine or under heavy RX * data chip will write into de-allocated memory. */ ste_reset(sc); @@ -1450,15 +1386,12 @@ ste_stop(sc) } bzero(sc->ste_ldata, sizeof(struct ste_list_data)); - - return; } static void -ste_reset(sc) - struct ste_softc *sc; +ste_reset(struct ste_softc *sc) { - int i; + int i; STE_SETBIT4(sc, STE_ASICCTL, STE_ASICCTL_GLOBAL_RESET|STE_ASICCTL_RX_RESET| @@ -1476,25 +1409,20 @@ ste_reset(sc) if (i == STE_TIMEOUT) device_printf(sc->ste_dev, "global reset never completed\n"); - - return; } static int -ste_ioctl(ifp, command, data) - struct ifnet *ifp; - u_long command; - caddr_t data; -{ - struct ste_softc *sc; - struct ifreq *ifr; - struct mii_data *mii; - int error = 0; +ste_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +{ + struct ste_softc *sc; + struct ifreq *ifr; + struct mii_data *mii; + int error = 0; sc = ifp->if_softc; ifr = (struct ifreq *)data; - switch(command) { + switch (command) { case SIOCSIFFLAGS: STE_LOCK(sc); if (ifp->if_flags & IFF_UP) { @@ -1508,7 +1436,7 @@ ste_ioctl(ifp, command, data) sc->ste_if_flags & IFF_PROMISC) { STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_PROMISC); - } + } if (ifp->if_drv_flags & IFF_DRV_RUNNING && (ifp->if_flags ^ sc->ste_if_flags) & IFF_ALLMULTI) ste_setmulti(sc); @@ -1542,14 +1470,14 @@ ste_ioctl(ifp, command, data) !(ifp->if_capenable & IFCAP_POLLING)) { error = ether_poll_register(ste_poll, ifp); if (error) - return(error); + return (error); STE_LOCK(sc); /* Disable interrupts */ CSR_WRITE_2(sc, STE_IMR, 0); ifp->if_capenable |= IFCAP_POLLING; STE_UNLOCK(sc); return (error); - + } if (!(ifr->ifr_reqcap & IFCAP_POLLING) && ifp->if_capenable & IFCAP_POLLING) { @@ -1568,19 +1496,16 @@ ste_ioctl(ifp, command, data) break; } - return(error); + return (error); } static int -ste_encap(sc, c, m_head) - struct ste_softc *sc; - struct ste_chain *c; - struct mbuf *m_head; -{ - int frag = 0; - struct ste_frag *f = NULL; - struct mbuf *m; - struct ste_desc *d; +ste_encap(struct ste_softc *sc, struct ste_chain *c, struct mbuf *m_head) +{ + struct mbuf *m; + struct ste_desc *d; + struct ste_frag *f = NULL; + int frag = 0; d = c->ste_ptr; d->ste_ctl = 0; @@ -1618,14 +1543,13 @@ encap_retry: d->ste_frags[frag - 1].ste_len |= STE_FRAG_LAST; d->ste_ctl = 1; - return(0); + return (0); } static void -ste_start(ifp) - struct ifnet *ifp; +ste_start(struct ifnet *ifp) { - struct ste_softc *sc; + struct ste_softc *sc; sc = ifp->if_softc; STE_LOCK(sc); @@ -1634,13 +1558,12 @@ ste_start(ifp) } static void -ste_start_locked(ifp) - struct ifnet *ifp; +ste_start_locked(struct ifnet *ifp) { - struct ste_softc *sc; - struct mbuf *m_head = NULL; - struct ste_chain *cur_tx; - int idx; + struct ste_softc *sc; + struct ste_chain *cur_tx; + struct mbuf *m_head = NULL; + int idx; sc = ifp->if_softc; STE_LOCK_ASSERT(sc); @@ -1653,7 +1576,7 @@ ste_start_locked(ifp) idx = sc->ste_cdata.ste_tx_prod; - while(sc->ste_cdata.ste_tx_chain[idx].ste_mbuf == NULL) { + while (sc->ste_cdata.ste_tx_chain[idx].ste_mbuf == NULL) { /* * We cannot re-use the last (free) descriptor; * the chip may not have read its ste_next yet. @@ -1686,7 +1609,7 @@ ste_start_locked(ifp) /* Set TX polling interval to start TX engine */ CSR_WRITE_1(sc, STE_TX_DMAPOLL_PERIOD, 64); - + STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); ste_wait(sc); }else{ @@ -1707,14 +1630,12 @@ ste_start_locked(ifp) sc->ste_timer = 5; } sc->ste_cdata.ste_tx_prod = idx; - - return; } static void ste_watchdog(struct ste_softc *sc) { - struct ifnet *ifp; + struct ifnet *ifp; ifp = sc->ste_ifp; STE_LOCK_ASSERT(sc); @@ -1731,15 +1652,12 @@ ste_watchdog(struct ste_softc *sc) if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ste_start_locked(ifp); - - return; } static int -ste_shutdown(dev) - device_t dev; +ste_shutdown(device_t dev) { - struct ste_softc *sc; + struct ste_softc *sc; sc = device_get_softc(dev); Modified: stable/7/sys/dev/ste/if_stereg.h ============================================================================== --- stable/7/sys/dev/ste/if_stereg.h Thu Jan 14 21:34:12 2010 (r202307) +++ stable/7/sys/dev/ste/if_stereg.h Thu Jan 14 21:37:40 2010 (r202308) @@ -96,7 +96,7 @@ #define STE_LATE_COLLS 0x75 #define STE_MULTI_COLLS 0x76 -#define STE_SINGLE_COLLS 0x77 +#define STE_SINGLE_COLLS 0x77 #define STE_DMACTL_RXDMA_STOPPED 0x00000001 #define STE_DMACTL_TXDMA_CMPREQ 0x00000002 @@ -386,27 +386,27 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 21:45:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5813C1065672; Thu, 14 Jan 2010 21:45:39 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45B958FC13; Thu, 14 Jan 2010 21:45:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ELjdxZ055004; Thu, 14 Jan 2010 21:45:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ELjdj2055001; Thu, 14 Jan 2010 21:45:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142145.o0ELjdj2055001@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 21:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202309 - stable/8/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 21:45:39 -0000 Author: yongari Date: Thu Jan 14 21:45:39 2010 New Revision: 202309 URL: http://svn.freebsd.org/changeset/base/202309 Log: MFC r200853: Add bus_dma(9) and endianness support to ste(4). o Sorted includes and added missing header files. o Added basic endianness support. In theory ste(4) should work on any architectures. o Remove the use of contigmalloc(9), contigfree(9) and vtophys(9). o Added 8 byte alignment limitation of TX/RX descriptor. o Added 1 byte alignment requirement for TX/RX buffers. o ste(4) controllers does not support DAC. Limit DMA address space to be within 32bit address. o Added spare DMA map to gracefully recover from DMA map failure. o Removed dead code for checking STE_RXSTAT_DMADONE bit. The bit was already checked in each iteration of loop so it can't be true. o Added second argument count to ste_rxeof(). It is used to limit number of iterations done in RX handler. ATM polling is the only consumer. o Removed ste_rxeoc() which was added to address RX stuck issue (cvs rev 1.66). Unlike TX descriptors, ST201 supports chaining descriptors to form a ring for RX descriptors. If RX descriptor chaining is not supported it's possible for controller to stop receiving incoming frames once controller pass the end of RX descriptor which in turn requires driver post new RX descriptors to receive more frames. For TX descriptors which does not support chaning, we exactly do manual chaining in driver by concatenating new descriptors to the end of previous TX chain. Maybe the workaround was borrowed from other drivers that does not support RX descriptor chaining, which is not valid for ST201 controllers. I still have no idea how this address RX stuck issue and I can't reproduce the RX stuck issue on DFE-550TX controller. o Removed hw.ste_rxsyncs sysctl as the workaround was removed. o TX/RX side bus_dmamap_load_mbuf_sg(9) support. o Reimplemented optimized ste_encap(). o Simplified TX logic of ste_start_locked(). o Added comments for TFD/RFD requirements. o Increased number of RX descriptors to 128 from 64. 128 gave much better performance than 64 under high network loads. Modified: stable/8/sys/dev/ste/if_ste.c stable/8/sys/dev/ste/if_stereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ste/if_ste.c ============================================================================== --- stable/8/sys/dev/ste/if_ste.c Thu Jan 14 21:37:40 2010 (r202308) +++ stable/8/sys/dev/ste/if_ste.c Thu Jan 14 21:45:39 2010 (r202309) @@ -39,14 +39,19 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include +#include +#include #include +#include +#include +#include #include +#include #include +#include #include +#include #include #include #include @@ -55,14 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include - -#include /* for vtophys */ -#include /* for vtophys */ #include #include -#include -#include #include #include @@ -70,13 +69,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include + /* "device miibus" required. See GENERIC if you get errors here. */ #include "miibus_if.h" #define STE_USEIOSPACE -#include - MODULE_DEPEND(ste, pci, 1, 1, 1); MODULE_DEPEND(ste, ether, 1, 1, 1); MODULE_DEPEND(ste, miibus, 1, 1, 1); @@ -96,8 +95,12 @@ static int ste_detach(device_t); static int ste_probe(device_t); static int ste_shutdown(device_t); +static int ste_dma_alloc(struct ste_softc *); +static void ste_dma_free(struct ste_softc *); +static void ste_dmamap_cb(void *, bus_dma_segment_t *, int, int); static int ste_eeprom_wait(struct ste_softc *); -static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *); +static int ste_encap(struct ste_softc *, struct mbuf **, + struct ste_chain *); static int ste_ifmedia_upd(struct ifnet *); static void ste_ifmedia_upd_locked(struct ifnet *); static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -114,12 +117,10 @@ static int ste_mii_writereg(struct ste_s static int ste_miibus_readreg(device_t, int, int); static void ste_miibus_statchg(device_t); static int ste_miibus_writereg(device_t, int, int, int); -static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *, - struct mbuf *); +static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *); static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); static void ste_reset(struct ste_softc *); -static void ste_rxeoc(struct ste_softc *); -static int ste_rxeof(struct ste_softc *); +static int ste_rxeof(struct ste_softc *, int); static void ste_setmulti(struct ste_softc *); static void ste_start(struct ifnet *); static void ste_start_locked(struct ifnet *); @@ -168,11 +169,6 @@ static devclass_t ste_devclass; DRIVER_MODULE(ste, pci, ste_driver, ste_devclass, 0, 0); DRIVER_MODULE(miibus, ste, miibus_driver, miibus_devclass, 0, 0); -SYSCTL_NODE(_hw, OID_AUTO, ste, CTLFLAG_RD, 0, "if_ste parameters"); - -static int ste_rxsyncs; -SYSCTL_INT(_hw_ste, OID_AUTO, rxsyncs, CTLFLAG_RW, &ste_rxsyncs, 0, ""); - #define STE_SETBIT4(sc, reg, x) \ CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | (x)) @@ -603,10 +599,7 @@ ste_poll_locked(struct ifnet *ifp, enum STE_LOCK_ASSERT(sc); - sc->rxcycles = count; - if (cmd == POLL_AND_CHECK_STATUS) - ste_rxeoc(sc); - rx_npkts = ste_rxeof(sc); + rx_npkts = ste_rxeof(sc, count); ste_txeof(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ste_start_locked(ifp); @@ -666,10 +659,8 @@ ste_intr(void *xsc) if (!(status & STE_INTRS)) break; - if (status & STE_ISR_RX_DMADONE) { - ste_rxeoc(sc); - ste_rxeof(sc); - } + if (status & STE_ISR_RX_DMADONE) + ste_rxeof(sc, -1); if (status & STE_ISR_TX_DMADONE) ste_txeof(sc); @@ -701,62 +692,40 @@ ste_intr(void *xsc) STE_UNLOCK(sc); } -static void -ste_rxeoc(struct ste_softc *sc) -{ - struct ste_chain_onefrag *cur_rx; - - STE_LOCK_ASSERT(sc); - - if (sc->ste_cdata.ste_rx_head->ste_ptr->ste_status == 0) { - cur_rx = sc->ste_cdata.ste_rx_head; - do { - cur_rx = cur_rx->ste_next; - /* If the ring is empty, just return. */ - if (cur_rx == sc->ste_cdata.ste_rx_head) - return; - } while (cur_rx->ste_ptr->ste_status == 0); - if (sc->ste_cdata.ste_rx_head->ste_ptr->ste_status == 0) { - /* We've fallen behind the chip: catch it. */ - sc->ste_cdata.ste_rx_head = cur_rx; - ++ste_rxsyncs; - } - } -} - /* * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ static int -ste_rxeof(struct ste_softc *sc) +ste_rxeof(struct ste_softc *sc, int count) { struct mbuf *m; struct ifnet *ifp; struct ste_chain_onefrag *cur_rx; uint32_t rxstat; - int total_len = 0, count = 0, rx_npkts = 0; - - STE_LOCK_ASSERT(sc); + int total_len, rx_npkts; ifp = sc->ste_ifp; - while ((rxstat = sc->ste_cdata.ste_rx_head->ste_ptr->ste_status) - & STE_RXSTAT_DMADONE) { + bus_dmamap_sync(sc->ste_cdata.ste_rx_list_tag, + sc->ste_cdata.ste_rx_list_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + + cur_rx = sc->ste_cdata.ste_rx_head; + for (rx_npkts = 0; rx_npkts < STE_RX_LIST_CNT; rx_npkts++, + cur_rx = cur_rx->ste_next) { + rxstat = le32toh(cur_rx->ste_ptr->ste_status); + if ((rxstat & STE_RXSTAT_DMADONE) == 0) + break; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) { - if (sc->rxcycles <= 0) + if (count == 0) break; - sc->rxcycles--; + count--; } #endif - if ((STE_RX_LIST_CNT - count) < 3) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) break; - } - - cur_rx = sc->ste_cdata.ste_rx_head; - sc->ste_cdata.ste_rx_head = cur_rx->ste_next; - /* * If an error occurs, update stats, clear the * status word and leave the mbuf cluster in place: @@ -769,22 +738,9 @@ ste_rxeof(struct ste_softc *sc) continue; } - /* - * If there error bit was not set, the upload complete - * bit should be set which means we have a valid packet. - * If not, something truly strange has happened. - */ - if (!(rxstat & STE_RXSTAT_DMADONE)) { - device_printf(sc->ste_dev, - "bad receive status -- packet dropped\n"); - ifp->if_ierrors++; - cur_rx->ste_ptr->ste_status = 0; - continue; - } - /* No errors; receive the packet. */ m = cur_rx->ste_mbuf; - total_len = cur_rx->ste_ptr->ste_status & STE_RXSTAT_FRAMELEN; + total_len = STE_RX_BYTES(rxstat); /* * Try to conjure up a new mbuf cluster. If that @@ -793,7 +749,7 @@ ste_rxeof(struct ste_softc *sc) * result in a lost packet, but there's little else we * can do in this situation. */ - if (ste_newbuf(sc, cur_rx, NULL) == ENOBUFS) { + if (ste_newbuf(sc, cur_rx) != 0) { ifp->if_ierrors++; cur_rx->ste_ptr->ste_status = 0; continue; @@ -806,10 +762,13 @@ ste_rxeof(struct ste_softc *sc) STE_UNLOCK(sc); (*ifp->if_input)(ifp, m); STE_LOCK(sc); + } - cur_rx->ste_ptr->ste_status = 0; - count++; - rx_npkts++; + if (rx_npkts > 0) { + sc->ste_cdata.ste_rx_head = cur_rx; + bus_dmamap_sync(sc->ste_cdata.ste_rx_list_tag, + sc->ste_cdata.ste_rx_list_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } return (rx_npkts); @@ -857,27 +816,40 @@ ste_txeof(struct ste_softc *sc) { struct ifnet *ifp; struct ste_chain *cur_tx; + uint32_t txstat; int idx; - ifp = sc->ste_ifp; + STE_LOCK_ASSERT(sc); + ifp = sc->ste_ifp; idx = sc->ste_cdata.ste_tx_cons; + if (idx == sc->ste_cdata.ste_tx_prod) + return; + + bus_dmamap_sync(sc->ste_cdata.ste_tx_list_tag, + sc->ste_cdata.ste_tx_list_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + while (idx != sc->ste_cdata.ste_tx_prod) { cur_tx = &sc->ste_cdata.ste_tx_chain[idx]; - - if (!(cur_tx->ste_ptr->ste_ctl & STE_TXCTL_DMADONE)) + txstat = le32toh(cur_tx->ste_ptr->ste_ctl); + if ((txstat & STE_TXCTL_DMADONE) == 0) break; - + bus_dmamap_sync(sc->ste_cdata.ste_tx_tag, cur_tx->ste_map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->ste_cdata.ste_tx_tag, cur_tx->ste_map); + KASSERT(cur_tx->ste_mbuf != NULL, + ("%s: freeing NULL mbuf!\n", __func__)); m_freem(cur_tx->ste_mbuf); cur_tx->ste_mbuf = NULL; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ifp->if_opackets++; - + sc->ste_cdata.ste_tx_cnt--; STE_INC(idx, STE_TX_LIST_CNT); } sc->ste_cdata.ste_tx_cons = idx; - if (idx == sc->ste_cdata.ste_tx_prod) + if (sc->ste_cdata.ste_tx_cnt == 0) sc->ste_timer = 0; } @@ -1012,17 +984,8 @@ ste_attach(device_t dev) goto fail; } - /* Allocate the descriptor queues. */ - sc->ste_ldata = contigmalloc(sizeof(struct ste_list_data), M_DEVBUF, - M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); - - if (sc->ste_ldata == NULL) { - device_printf(dev, "no memory for list buffers!\n"); - error = ENXIO; + if ((error = ste_dma_alloc(sc)) != 0) goto fail; - } - - bzero(sc->ste_ldata, sizeof(struct ste_list_data)); ifp = sc->ste_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { @@ -1128,44 +1091,325 @@ ste_detach(device_t dev) if (ifp) if_free(ifp); - if (sc->ste_ldata) { - contigfree(sc->ste_ldata, sizeof(struct ste_list_data), - M_DEVBUF); - } - + ste_dma_free(sc); mtx_destroy(&sc->ste_mtx); return (0); } +struct ste_dmamap_arg { + bus_addr_t ste_busaddr; +}; + +static void +ste_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + struct ste_dmamap_arg *ctx; + + if (error != 0) + return; + + KASSERT(nsegs == 1, ("%s: %d segments returned!", __func__, nsegs)); + + ctx = (struct ste_dmamap_arg *)arg; + ctx->ste_busaddr = segs[0].ds_addr; +} + static int -ste_newbuf(struct ste_softc *sc, struct ste_chain_onefrag *c, struct mbuf *m) +ste_dma_alloc(struct ste_softc *sc) { - struct mbuf *m_new = NULL; + struct ste_chain *txc; + struct ste_chain_onefrag *rxc; + struct ste_dmamap_arg ctx; + int error, i; + + /* Create parent DMA tag. */ + error = bus_dma_tag_create( + bus_get_dma_tag(sc->ste_dev), /* parent */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + 0, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ste_cdata.ste_parent_tag); + if (error != 0) { + device_printf(sc->ste_dev, + "could not create parent DMA tag.\n"); + goto fail; + } + + /* Create DMA tag for Tx descriptor list. */ + error = bus_dma_tag_create( + sc->ste_cdata.ste_parent_tag, /* parent */ + STE_DESC_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + STE_TX_LIST_SZ, /* maxsize */ + 1, /* nsegments */ + STE_TX_LIST_SZ, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ste_cdata.ste_tx_list_tag); + if (error != 0) { + device_printf(sc->ste_dev, + "could not create Tx list DMA tag.\n"); + goto fail; + } + + /* Create DMA tag for Rx descriptor list. */ + error = bus_dma_tag_create( + sc->ste_cdata.ste_parent_tag, /* parent */ + STE_DESC_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + STE_RX_LIST_SZ, /* maxsize */ + 1, /* nsegments */ + STE_RX_LIST_SZ, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ste_cdata.ste_rx_list_tag); + if (error != 0) { + device_printf(sc->ste_dev, + "could not create Rx list DMA tag.\n"); + goto fail; + } + + /* Create DMA tag for Tx buffers. */ + error = bus_dma_tag_create( + sc->ste_cdata.ste_parent_tag, /* parent */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MCLBYTES * STE_MAXFRAGS, /* maxsize */ + STE_MAXFRAGS, /* nsegments */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ste_cdata.ste_tx_tag); + if (error != 0) { + device_printf(sc->ste_dev, "could not create Tx DMA tag.\n"); + goto fail; + } - if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) - return (ENOBUFS); - MCLGET(m_new, M_DONTWAIT); - if (!(m_new->m_flags & M_EXT)) { - m_freem(m_new); - return (ENOBUFS); + /* Create DMA tag for Rx buffers. */ + error = bus_dma_tag_create( + sc->ste_cdata.ste_parent_tag, /* parent */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MCLBYTES, /* maxsize */ + 1, /* nsegments */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ste_cdata.ste_rx_tag); + if (error != 0) { + device_printf(sc->ste_dev, "could not create Rx DMA tag.\n"); + goto fail; + } + + /* Allocate DMA'able memory and load the DMA map for Tx list. */ + error = bus_dmamem_alloc(sc->ste_cdata.ste_tx_list_tag, + (void **)&sc->ste_ldata.ste_tx_list, + BUS_DMA_WAITOK | BUS_DMA_ZERO | BUS_DMA_COHERENT, + &sc->ste_cdata.ste_tx_list_map); + if (error != 0) { + device_printf(sc->ste_dev, + "could not allocate DMA'able memory for Tx list.\n"); + goto fail; + } + ctx.ste_busaddr = 0; + error = bus_dmamap_load(sc->ste_cdata.ste_tx_list_tag, + sc->ste_cdata.ste_tx_list_map, sc->ste_ldata.ste_tx_list, + STE_TX_LIST_SZ, ste_dmamap_cb, &ctx, 0); + if (error != 0 || ctx.ste_busaddr == 0) { + device_printf(sc->ste_dev, + "could not load DMA'able memory for Tx list.\n"); + goto fail; + } + sc->ste_ldata.ste_tx_list_paddr = ctx.ste_busaddr; + + /* Allocate DMA'able memory and load the DMA map for Rx list. */ + error = bus_dmamem_alloc(sc->ste_cdata.ste_rx_list_tag, + (void **)&sc->ste_ldata.ste_rx_list, + BUS_DMA_WAITOK | BUS_DMA_ZERO | BUS_DMA_COHERENT, + &sc->ste_cdata.ste_rx_list_map); + if (error != 0) { + device_printf(sc->ste_dev, + "could not allocate DMA'able memory for Rx list.\n"); + goto fail; + } + ctx.ste_busaddr = 0; + error = bus_dmamap_load(sc->ste_cdata.ste_rx_list_tag, + sc->ste_cdata.ste_rx_list_map, sc->ste_ldata.ste_rx_list, + STE_RX_LIST_SZ, ste_dmamap_cb, &ctx, 0); + if (error != 0 || ctx.ste_busaddr == 0) { + device_printf(sc->ste_dev, + "could not load DMA'able memory for Rx list.\n"); + goto fail; + } + sc->ste_ldata.ste_rx_list_paddr = ctx.ste_busaddr; + + /* Create DMA maps for Tx buffers. */ + for (i = 0; i < STE_TX_LIST_CNT; i++) { + txc = &sc->ste_cdata.ste_tx_chain[i]; + txc->ste_ptr = NULL; + txc->ste_mbuf = NULL; + txc->ste_next = NULL; + txc->ste_phys = 0; + txc->ste_map = NULL; + error = bus_dmamap_create(sc->ste_cdata.ste_tx_tag, 0, + &txc->ste_map); + if (error != 0) { + device_printf(sc->ste_dev, + "could not create Tx dmamap.\n"); + goto fail; + } + } + /* Create DMA maps for Rx buffers. */ + if ((error = bus_dmamap_create(sc->ste_cdata.ste_rx_tag, 0, + &sc->ste_cdata.ste_rx_sparemap)) != 0) { + device_printf(sc->ste_dev, + "could not create spare Rx dmamap.\n"); + goto fail; + } + for (i = 0; i < STE_RX_LIST_CNT; i++) { + rxc = &sc->ste_cdata.ste_rx_chain[i]; + rxc->ste_ptr = NULL; + rxc->ste_mbuf = NULL; + rxc->ste_next = NULL; + rxc->ste_map = NULL; + error = bus_dmamap_create(sc->ste_cdata.ste_rx_tag, 0, + &rxc->ste_map); + if (error != 0) { + device_printf(sc->ste_dev, + "could not create Rx dmamap.\n"); + goto fail; } - m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; - } else { - m_new = m; - m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; - m_new->m_data = m_new->m_ext.ext_buf; } - m_adj(m_new, ETHER_ALIGN); +fail: + return (error); +} - c->ste_mbuf = m_new; - c->ste_ptr->ste_status = 0; - c->ste_ptr->ste_frag.ste_addr = vtophys(mtod(m_new, caddr_t)); - c->ste_ptr->ste_frag.ste_len = (1536 + ETHER_VLAN_ENCAP_LEN) | STE_FRAG_LAST; +static void +ste_dma_free(struct ste_softc *sc) +{ + struct ste_chain *txc; + struct ste_chain_onefrag *rxc; + int i; + /* Tx buffers. */ + if (sc->ste_cdata.ste_tx_tag != NULL) { + for (i = 0; i < STE_TX_LIST_CNT; i++) { + txc = &sc->ste_cdata.ste_tx_chain[i]; + if (txc->ste_map != NULL) { + bus_dmamap_destroy(sc->ste_cdata.ste_tx_tag, + txc->ste_map); + txc->ste_map = NULL; + } + } + bus_dma_tag_destroy(sc->ste_cdata.ste_tx_tag); + sc->ste_cdata.ste_tx_tag = NULL; + } + /* Rx buffers. */ + if (sc->ste_cdata.ste_rx_tag != NULL) { + for (i = 0; i < STE_RX_LIST_CNT; i++) { + rxc = &sc->ste_cdata.ste_rx_chain[i]; + if (rxc->ste_map != NULL) { + bus_dmamap_destroy(sc->ste_cdata.ste_rx_tag, + rxc->ste_map); + rxc->ste_map = NULL; + } + } + if (sc->ste_cdata.ste_rx_sparemap != NULL) { + bus_dmamap_destroy(sc->ste_cdata.ste_rx_tag, + sc->ste_cdata.ste_rx_sparemap); + sc->ste_cdata.ste_rx_sparemap = NULL; + } + bus_dma_tag_destroy(sc->ste_cdata.ste_rx_tag); + sc->ste_cdata.ste_rx_tag = NULL; + } + /* Tx descriptor list. */ + if (sc->ste_cdata.ste_tx_list_tag != NULL) { + if (sc->ste_cdata.ste_tx_list_map != NULL) + bus_dmamap_unload(sc->ste_cdata.ste_tx_list_tag, + sc->ste_cdata.ste_tx_list_map); + if (sc->ste_cdata.ste_tx_list_map != NULL && + sc->ste_ldata.ste_tx_list != NULL) + bus_dmamem_free(sc->ste_cdata.ste_tx_list_tag, + sc->ste_ldata.ste_tx_list, + sc->ste_cdata.ste_tx_list_map); + sc->ste_ldata.ste_tx_list = NULL; + sc->ste_cdata.ste_tx_list_map = NULL; + bus_dma_tag_destroy(sc->ste_cdata.ste_tx_list_tag); + sc->ste_cdata.ste_tx_list_tag = NULL; + } + /* Rx descriptor list. */ + if (sc->ste_cdata.ste_rx_list_tag != NULL) { + if (sc->ste_cdata.ste_rx_list_map != NULL) + bus_dmamap_unload(sc->ste_cdata.ste_rx_list_tag, + sc->ste_cdata.ste_rx_list_map); + if (sc->ste_cdata.ste_rx_list_map != NULL && + sc->ste_ldata.ste_rx_list != NULL) + bus_dmamem_free(sc->ste_cdata.ste_rx_list_tag, + sc->ste_ldata.ste_rx_list, + sc->ste_cdata.ste_rx_list_map); + sc->ste_ldata.ste_rx_list = NULL; + sc->ste_cdata.ste_rx_list_map = NULL; + bus_dma_tag_destroy(sc->ste_cdata.ste_rx_list_tag); + sc->ste_cdata.ste_rx_list_tag = NULL; + } + if (sc->ste_cdata.ste_parent_tag != NULL) { + bus_dma_tag_destroy(sc->ste_cdata.ste_parent_tag); + sc->ste_cdata.ste_parent_tag = NULL; + } +} + +static int +ste_newbuf(struct ste_softc *sc, struct ste_chain_onefrag *rxc) +{ + struct mbuf *m; + bus_dma_segment_t segs[1]; + bus_dmamap_t map; + int error, nsegs; + + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) + return (ENOBUFS); + m->m_len = m->m_pkthdr.len = MCLBYTES; + m_adj(m, ETHER_ALIGN); + + if ((error = bus_dmamap_load_mbuf_sg(sc->ste_cdata.ste_rx_tag, + sc->ste_cdata.ste_rx_sparemap, m, segs, &nsegs, 0)) != 0) { + m_freem(m); + return (error); + } + KASSERT(nsegs == 1, ("%s: %d segments returned!", __func__, nsegs)); + + if (rxc->ste_mbuf != NULL) { + bus_dmamap_sync(sc->ste_cdata.ste_rx_tag, rxc->ste_map, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->ste_cdata.ste_rx_tag, rxc->ste_map); + } + map = rxc->ste_map; + rxc->ste_map = sc->ste_cdata.ste_rx_sparemap; + sc->ste_cdata.ste_rx_sparemap = map; + bus_dmamap_sync(sc->ste_cdata.ste_rx_tag, rxc->ste_map, + BUS_DMASYNC_PREREAD); + rxc->ste_mbuf = m; + rxc->ste_ptr->ste_status = 0; + rxc->ste_ptr->ste_frag.ste_addr = htole32(segs[0].ds_addr); + rxc->ste_ptr->ste_frag.ste_len = htole32(segs[0].ds_len | + STE_FRAG_LAST); return (0); } @@ -1174,30 +1418,31 @@ ste_init_rx_list(struct ste_softc *sc) { struct ste_chain_data *cd; struct ste_list_data *ld; - int i; + int error, i; cd = &sc->ste_cdata; - ld = sc->ste_ldata; - + ld = &sc->ste_ldata; + bzero(ld->ste_rx_list, STE_RX_LIST_SZ); for (i = 0; i < STE_RX_LIST_CNT; i++) { cd->ste_rx_chain[i].ste_ptr = &ld->ste_rx_list[i]; - if (ste_newbuf(sc, &cd->ste_rx_chain[i], NULL) == ENOBUFS) - return (ENOBUFS); + error = ste_newbuf(sc, &cd->ste_rx_chain[i]); + if (error != 0) + return (error); if (i == (STE_RX_LIST_CNT - 1)) { - cd->ste_rx_chain[i].ste_next = - &cd->ste_rx_chain[0]; - ld->ste_rx_list[i].ste_next = - vtophys(&ld->ste_rx_list[0]); + cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[0]; + ld->ste_rx_list[i].ste_next = ld->ste_rx_list_paddr + + (sizeof(struct ste_desc_onefrag) * 0); } else { - cd->ste_rx_chain[i].ste_next = - &cd->ste_rx_chain[i + 1]; - ld->ste_rx_list[i].ste_next = - vtophys(&ld->ste_rx_list[i + 1]); + cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[i + 1]; + ld->ste_rx_list[i].ste_next = ld->ste_rx_list_paddr + + (sizeof(struct ste_desc_onefrag) * (i + 1)); } - ld->ste_rx_list[i].ste_status = 0; } cd->ste_rx_head = &cd->ste_rx_chain[0]; + bus_dmamap_sync(sc->ste_cdata.ste_rx_list_tag, + sc->ste_cdata.ste_rx_list_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); return (0); } @@ -1210,22 +1455,32 @@ ste_init_tx_list(struct ste_softc *sc) int i; cd = &sc->ste_cdata; - ld = sc->ste_ldata; + ld = &sc->ste_ldata; + bzero(ld->ste_tx_list, STE_TX_LIST_SZ); for (i = 0; i < STE_TX_LIST_CNT; i++) { cd->ste_tx_chain[i].ste_ptr = &ld->ste_tx_list[i]; - cd->ste_tx_chain[i].ste_ptr->ste_next = 0; - cd->ste_tx_chain[i].ste_ptr->ste_ctl = 0; - cd->ste_tx_chain[i].ste_phys = vtophys(&ld->ste_tx_list[i]); - if (i == (STE_TX_LIST_CNT - 1)) - cd->ste_tx_chain[i].ste_next = - &cd->ste_tx_chain[0]; - else - cd->ste_tx_chain[i].ste_next = - &cd->ste_tx_chain[i + 1]; + cd->ste_tx_chain[i].ste_mbuf = NULL; + if (i == (STE_TX_LIST_CNT - 1)) { + cd->ste_tx_chain[i].ste_next = &cd->ste_tx_chain[0]; + cd->ste_tx_chain[i].ste_phys = htole32(STE_ADDR_LO( + ld->ste_tx_list_paddr + + (sizeof(struct ste_desc) * 0))); + } else { + cd->ste_tx_chain[i].ste_next = &cd->ste_tx_chain[i + 1]; + cd->ste_tx_chain[i].ste_phys = htole32(STE_ADDR_LO( + ld->ste_tx_list_paddr + + (sizeof(struct ste_desc) * (i + 1)))); + } } + cd->ste_last_tx = NULL; cd->ste_tx_prod = 0; cd->ste_tx_cons = 0; + cd->ste_tx_cnt = 0; + + bus_dmamap_sync(sc->ste_cdata.ste_tx_list_tag, + sc->ste_cdata.ste_tx_list_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } static void @@ -1258,7 +1513,7 @@ ste_init_locked(struct ste_softc *sc) } /* Init RX list */ - if (ste_init_rx_list(sc) == ENOBUFS) { + if (ste_init_rx_list(sc) != 0) { device_printf(sc->ste_dev, "initialization failed: no memory for RX buffers\n"); ste_stop(sc); @@ -1303,11 +1558,11 @@ ste_init_locked(struct ste_softc *sc) STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_RXDMA_STALL); ste_wait(sc); CSR_WRITE_4(sc, STE_RX_DMALIST_PTR, - vtophys(&sc->ste_ldata->ste_rx_list[0])); + STE_ADDR_LO(sc->ste_ldata.ste_rx_list_paddr)); STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_RXDMA_UNSTALL); STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_RXDMA_UNSTALL); - /* Set TX polling interval (defer until we TX first packet */ + /* Set TX polling interval(defer until we TX first packet). */ CSR_WRITE_1(sc, STE_TX_DMAPOLL_PERIOD, 0); /* Load address of the TX list */ @@ -1317,7 +1572,6 @@ ste_init_locked(struct ste_softc *sc) STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); ste_wait(sc); - sc->ste_tx_prev = NULL; /* Enable receiver and transmitter */ CSR_WRITE_2(sc, STE_MACCTL0, 0); @@ -1353,6 +1607,8 @@ static void ste_stop(struct ste_softc *sc) { struct ifnet *ifp; + struct ste_chain_onefrag *cur_rx; + struct ste_chain *cur_tx; int i; STE_LOCK_ASSERT(sc); @@ -1377,20 +1633,28 @@ ste_stop(struct ste_softc *sc) sc->ste_link = 0; for (i = 0; i < STE_RX_LIST_CNT; i++) { - if (sc->ste_cdata.ste_rx_chain[i].ste_mbuf != NULL) { - m_freem(sc->ste_cdata.ste_rx_chain[i].ste_mbuf); - sc->ste_cdata.ste_rx_chain[i].ste_mbuf = NULL; + cur_rx = &sc->ste_cdata.ste_rx_chain[i]; + if (cur_rx->ste_mbuf != NULL) { + bus_dmamap_sync(sc->ste_cdata.ste_rx_tag, + cur_rx->ste_map, BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->ste_cdata.ste_rx_tag, + cur_rx->ste_map); + m_freem(cur_rx->ste_mbuf); + cur_rx->ste_mbuf = NULL; } } for (i = 0; i < STE_TX_LIST_CNT; i++) { - if (sc->ste_cdata.ste_tx_chain[i].ste_mbuf != NULL) { - m_freem(sc->ste_cdata.ste_tx_chain[i].ste_mbuf); - sc->ste_cdata.ste_tx_chain[i].ste_mbuf = NULL; + cur_tx = &sc->ste_cdata.ste_tx_chain[i]; + if (cur_tx->ste_mbuf != NULL) { + bus_dmamap_sync(sc->ste_cdata.ste_tx_tag, + cur_tx->ste_map, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->ste_cdata.ste_tx_tag, + cur_tx->ste_map); + m_freem(cur_tx->ste_mbuf); + cur_tx->ste_mbuf = NULL; } } - - bzero(sc->ste_ldata, sizeof(struct ste_list_data)); } static void @@ -1505,48 +1769,60 @@ ste_ioctl(struct ifnet *ifp, u_long comm } static int -ste_encap(struct ste_softc *sc, struct ste_chain *c, struct mbuf *m_head) +ste_encap(struct ste_softc *sc, struct mbuf **m_head, struct ste_chain *txc) { + struct ste_frag *frag; struct mbuf *m; - struct ste_desc *d; - struct ste_frag *f = NULL; - int frag = 0; - - d = c->ste_ptr; - d->ste_ctl = 0; - -encap_retry: - for (m = m_head, frag = 0; m != NULL; m = m->m_next) { - if (m->m_len != 0) { - if (frag == STE_MAXFRAGS) - break; - f = &d->ste_frags[frag]; - f->ste_addr = vtophys(mtod(m, vm_offset_t)); - f->ste_len = m->m_len; - frag++; - } - } + struct ste_desc *desc; + bus_dma_segment_t txsegs[STE_MAXFRAGS]; + int error, i, nsegs; - if (m != NULL) { - struct mbuf *mn; + STE_LOCK_ASSERT(sc); + M_ASSERTPKTHDR((*m_head)); - /* - * We ran out of segments. We have to recopy this - * mbuf chain first. Bail out if we can't get the - * new buffers. - */ - mn = m_defrag(m_head, M_DONTWAIT); - if (mn == NULL) { - m_freem(m_head); - return ENOMEM; - } - m_head = mn; - goto encap_retry; + error = bus_dmamap_load_mbuf_sg(sc->ste_cdata.ste_tx_tag, + txc->ste_map, *m_head, txsegs, &nsegs, 0); + if (error == EFBIG) { + m = m_collapse(*m_head, M_DONTWAIT, STE_MAXFRAGS); + if (m == NULL) { + m_freem(*m_head); + *m_head = NULL; + return (ENOMEM); + } + *m_head = m; + error = bus_dmamap_load_mbuf_sg(sc->ste_cdata.ste_tx_tag, + txc->ste_map, *m_head, txsegs, &nsegs, 0); + if (error != 0) { + m_freem(*m_head); + *m_head = NULL; + return (error); + } + } else if (error != 0) + return (error); + if (nsegs == 0) { + m_freem(*m_head); + *m_head = NULL; + return (EIO); + } + bus_dmamap_sync(sc->ste_cdata.ste_tx_tag, txc->ste_map, + BUS_DMASYNC_PREWRITE); + + desc = txc->ste_ptr; + for (i = 0; i < nsegs; i++) { + frag = &desc->ste_frags[i]; + frag->ste_addr = htole32(STE_ADDR_LO(txsegs[i].ds_addr)); + frag->ste_len = htole32(txsegs[i].ds_len); } - - c->ste_mbuf = m_head; - d->ste_frags[frag - 1].ste_len |= STE_FRAG_LAST; - d->ste_ctl = 1; + desc->ste_frags[i - 1].ste_len |= htole32(STE_FRAG_LAST); + /* + * Because we use Tx polling we can't chain multiple + * Tx descriptors here. Otherwise we race with controller. + */ + desc->ste_next = 0; + desc->ste_ctl = htole32(STE_TXCTL_ALIGN_DIS | STE_TXCTL_DMAINTR); + txc->ste_mbuf = *m_head; + STE_INC(sc->ste_cdata.ste_tx_prod, STE_TX_LIST_CNT); + sc->ste_cdata.ste_tx_cnt++; return (0); } @@ -1568,7 +1844,7 @@ ste_start_locked(struct ifnet *ifp) struct ste_softc *sc; struct ste_chain *cur_tx; struct mbuf *m_head = NULL; - int idx; + int enq; sc = ifp->if_softc; STE_LOCK_ASSERT(sc); @@ -1579,62 +1855,56 @@ ste_start_locked(struct ifnet *ifp) if (ifp->if_drv_flags & IFF_DRV_OACTIVE) return; - idx = sc->ste_cdata.ste_tx_prod; - - while (sc->ste_cdata.ste_tx_chain[idx].ste_mbuf == NULL) { - /* - * We cannot re-use the last (free) descriptor; - * the chip may not have read its ste_next yet. - */ - if (STE_NEXT(idx, STE_TX_LIST_CNT) == - sc->ste_cdata.ste_tx_cons) { + for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd);) { + if (sc->ste_cdata.ste_tx_cnt == STE_TX_LIST_CNT - 1) { + /* + * Controller may have cached copy of the last used + * next ptr so we have to reserve one TFD to avoid + * TFD overruns. + */ ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } - IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; - - cur_tx = &sc->ste_cdata.ste_tx_chain[idx]; - - if (ste_encap(sc, cur_tx, m_head) != 0) + cur_tx = &sc->ste_cdata.ste_tx_chain[sc->ste_cdata.ste_tx_prod]; + if (ste_encap(sc, &m_head, cur_tx) != 0) { + if (m_head == NULL) + break; + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); break; - - cur_tx->ste_ptr->ste_next = 0; - - if (sc->ste_tx_prev == NULL) { - cur_tx->ste_ptr->ste_ctl = STE_TXCTL_DMAINTR | 1; - /* Load address of the TX list */ + } + if (sc->ste_cdata.ste_last_tx == NULL) { + bus_dmamap_sync(sc->ste_cdata.ste_tx_list_tag, + sc->ste_cdata.ste_tx_list_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_STALL); ste_wait(sc); - CSR_WRITE_4(sc, STE_TX_DMALIST_PTR, - vtophys(&sc->ste_ldata->ste_tx_list[0])); - - /* Set TX polling interval to start TX engine */ + STE_ADDR_LO(sc->ste_ldata.ste_tx_list_paddr)); CSR_WRITE_1(sc, STE_TX_DMAPOLL_PERIOD, 64); - STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); ste_wait(sc); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 21:54:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C8541065670; Thu, 14 Jan 2010 21:54:21 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1D18FC15; Thu, 14 Jan 2010 21:54:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ELsLxD056964; Thu, 14 Jan 2010 21:54:21 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ELsLLg056961; Thu, 14 Jan 2010 21:54:21 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142154.o0ELsLLg056961@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 21:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202310 - stable/7/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 21:54:21 -0000 Author: yongari Date: Thu Jan 14 21:54:20 2010 New Revision: 202310 URL: http://svn.freebsd.org/changeset/base/202310 Log: MFC r200853: Add bus_dma(9) and endianness support to ste(4). o Sorted includes and added missing header files. o Added basic endianness support. In theory ste(4) should work on any architectures. o Remove the use of contigmalloc(9), contigfree(9) and vtophys(9). o Added 8 byte alignment limitation of TX/RX descriptor. o Added 1 byte alignment requirement for TX/RX buffers. o ste(4) controllers does not support DAC. Limit DMA address space to be within 32bit address. o Added spare DMA map to gracefully recover from DMA map failure. o Removed dead code for checking STE_RXSTAT_DMADONE bit. The bit was already checked in each iteration of loop so it can't be true. o Added second argument count to ste_rxeof(). It is used to limit number of iterations done in RX handler. ATM polling is the only consumer. o Removed ste_rxeoc() which was added to address RX stuck issue (cvs rev 1.66). Unlike TX descriptors, ST201 supports chaining descriptors to form a ring for RX descriptors. If RX descriptor chaining is not supported it's possible for controller to stop receiving incoming frames once controller pass the end of RX descriptor which in turn requires driver post new RX descriptors to receive more frames. For TX descriptors which does not support chaning, we exactly do manual chaining in driver by concatenating new descriptors to the end of previous TX chain. Maybe the workaround was borrowed from other drivers that does not support RX descriptor chaining, which is not valid for ST201 controllers. I still have no idea how this address RX stuck issue and I can't reproduce the RX stuck issue on DFE-550TX controller. o Removed hw.ste_rxsyncs sysctl as the workaround was removed. o TX/RX side bus_dmamap_load_mbuf_sg(9) support. o Reimplemented optimized ste_encap(). o Simplified TX logic of ste_start_locked(). o Added comments for TFD/RFD requirements. o Increased number of RX descriptors to 128 from 64. 128 gave much better performance than 64 under high network loads. Modified: stable/7/sys/dev/ste/if_ste.c stable/7/sys/dev/ste/if_stereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ste/if_ste.c ============================================================================== --- stable/7/sys/dev/ste/if_ste.c Thu Jan 14 21:45:39 2010 (r202309) +++ stable/7/sys/dev/ste/if_ste.c Thu Jan 14 21:54:20 2010 (r202310) @@ -39,14 +39,19 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include +#include +#include #include +#include +#include +#include #include +#include #include +#include #include +#include #include #include #include @@ -55,14 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include - -#include /* for vtophys */ -#include /* for vtophys */ #include #include -#include -#include #include #include @@ -70,13 +69,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include + /* "device miibus" required. See GENERIC if you get errors here. */ #include "miibus_if.h" #define STE_USEIOSPACE -#include - MODULE_DEPEND(ste, pci, 1, 1, 1); MODULE_DEPEND(ste, ether, 1, 1, 1); MODULE_DEPEND(ste, miibus, 1, 1, 1); @@ -96,8 +95,12 @@ static int ste_detach(device_t); static int ste_probe(device_t); static int ste_shutdown(device_t); +static int ste_dma_alloc(struct ste_softc *); +static void ste_dma_free(struct ste_softc *); +static void ste_dmamap_cb(void *, bus_dma_segment_t *, int, int); static int ste_eeprom_wait(struct ste_softc *); -static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *); +static int ste_encap(struct ste_softc *, struct mbuf **, + struct ste_chain *); static int ste_ifmedia_upd(struct ifnet *); static void ste_ifmedia_upd_locked(struct ifnet *); static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -114,12 +117,10 @@ static int ste_mii_writereg(struct ste_s static int ste_miibus_readreg(device_t, int, int); static void ste_miibus_statchg(device_t); static int ste_miibus_writereg(device_t, int, int, int); -static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *, - struct mbuf *); +static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *); static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); static void ste_reset(struct ste_softc *); -static void ste_rxeoc(struct ste_softc *); -static void ste_rxeof(struct ste_softc *); +static void ste_rxeof(struct ste_softc *, int); static void ste_setmulti(struct ste_softc *); static void ste_start(struct ifnet *); static void ste_start_locked(struct ifnet *); @@ -168,11 +169,6 @@ static devclass_t ste_devclass; DRIVER_MODULE(ste, pci, ste_driver, ste_devclass, 0, 0); DRIVER_MODULE(miibus, ste, miibus_driver, miibus_devclass, 0, 0); -SYSCTL_NODE(_hw, OID_AUTO, ste, CTLFLAG_RD, 0, "if_ste parameters"); - -static int ste_rxsyncs; -SYSCTL_INT(_hw_ste, OID_AUTO, rxsyncs, CTLFLAG_RW, &ste_rxsyncs, 0, ""); - #define STE_SETBIT4(sc, reg, x) \ CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | (x)) @@ -600,10 +596,7 @@ ste_poll_locked(struct ifnet *ifp, enum STE_LOCK_ASSERT(sc); - sc->rxcycles = count; - if (cmd == POLL_AND_CHECK_STATUS) - ste_rxeoc(sc); - ste_rxeof(sc); + ste_rxeof(sc, count); ste_txeof(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ste_start_locked(ifp); @@ -662,10 +655,8 @@ ste_intr(void *xsc) if (!(status & STE_INTRS)) break; - if (status & STE_ISR_RX_DMADONE) { - ste_rxeoc(sc); - ste_rxeof(sc); - } + if (status & STE_ISR_RX_DMADONE) + ste_rxeof(sc, -1); if (status & STE_ISR_TX_DMADONE) ste_txeof(sc); @@ -697,62 +688,40 @@ ste_intr(void *xsc) STE_UNLOCK(sc); } -static void -ste_rxeoc(struct ste_softc *sc) -{ - struct ste_chain_onefrag *cur_rx; - - STE_LOCK_ASSERT(sc); - - if (sc->ste_cdata.ste_rx_head->ste_ptr->ste_status == 0) { - cur_rx = sc->ste_cdata.ste_rx_head; - do { - cur_rx = cur_rx->ste_next; - /* If the ring is empty, just return. */ - if (cur_rx == sc->ste_cdata.ste_rx_head) - return; - } while (cur_rx->ste_ptr->ste_status == 0); - if (sc->ste_cdata.ste_rx_head->ste_ptr->ste_status == 0) { - /* We've fallen behind the chip: catch it. */ - sc->ste_cdata.ste_rx_head = cur_rx; - ++ste_rxsyncs; - } - } -} - /* * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ static void -ste_rxeof(struct ste_softc *sc) +ste_rxeof(struct ste_softc *sc, int count) { struct mbuf *m; struct ifnet *ifp; struct ste_chain_onefrag *cur_rx; uint32_t rxstat; - int total_len = 0, count = 0; - - STE_LOCK_ASSERT(sc); + int total_len, rx_npkts; ifp = sc->ste_ifp; - while ((rxstat = sc->ste_cdata.ste_rx_head->ste_ptr->ste_status) - & STE_RXSTAT_DMADONE) { + bus_dmamap_sync(sc->ste_cdata.ste_rx_list_tag, + sc->ste_cdata.ste_rx_list_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + + cur_rx = sc->ste_cdata.ste_rx_head; + for (rx_npkts = 0; rx_npkts < STE_RX_LIST_CNT; rx_npkts++, + cur_rx = cur_rx->ste_next) { + rxstat = le32toh(cur_rx->ste_ptr->ste_status); + if ((rxstat & STE_RXSTAT_DMADONE) == 0) + break; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) { - if (sc->rxcycles <= 0) + if (count == 0) break; - sc->rxcycles--; + count--; } #endif - if ((STE_RX_LIST_CNT - count) < 3) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) break; - } - - cur_rx = sc->ste_cdata.ste_rx_head; - sc->ste_cdata.ste_rx_head = cur_rx->ste_next; - /* * If an error occurs, update stats, clear the * status word and leave the mbuf cluster in place: @@ -765,22 +734,9 @@ ste_rxeof(struct ste_softc *sc) continue; } - /* - * If there error bit was not set, the upload complete - * bit should be set which means we have a valid packet. - * If not, something truly strange has happened. - */ - if (!(rxstat & STE_RXSTAT_DMADONE)) { - device_printf(sc->ste_dev, - "bad receive status -- packet dropped\n"); - ifp->if_ierrors++; - cur_rx->ste_ptr->ste_status = 0; - continue; - } - /* No errors; receive the packet. */ m = cur_rx->ste_mbuf; - total_len = cur_rx->ste_ptr->ste_status & STE_RXSTAT_FRAMELEN; + total_len = STE_RX_BYTES(rxstat); /* * Try to conjure up a new mbuf cluster. If that @@ -789,7 +745,7 @@ ste_rxeof(struct ste_softc *sc) * result in a lost packet, but there's little else we * can do in this situation. */ - if (ste_newbuf(sc, cur_rx, NULL) == ENOBUFS) { + if (ste_newbuf(sc, cur_rx) != 0) { ifp->if_ierrors++; cur_rx->ste_ptr->ste_status = 0; continue; @@ -802,12 +758,14 @@ ste_rxeof(struct ste_softc *sc) STE_UNLOCK(sc); (*ifp->if_input)(ifp, m); STE_LOCK(sc); - - cur_rx->ste_ptr->ste_status = 0; - count++; } - return; + if (rx_npkts > 0) { + sc->ste_cdata.ste_rx_head = cur_rx; + bus_dmamap_sync(sc->ste_cdata.ste_rx_list_tag, + sc->ste_cdata.ste_rx_list_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + } } static void @@ -852,27 +810,40 @@ ste_txeof(struct ste_softc *sc) { struct ifnet *ifp; struct ste_chain *cur_tx; + uint32_t txstat; int idx; - ifp = sc->ste_ifp; + STE_LOCK_ASSERT(sc); + ifp = sc->ste_ifp; idx = sc->ste_cdata.ste_tx_cons; + if (idx == sc->ste_cdata.ste_tx_prod) + return; + + bus_dmamap_sync(sc->ste_cdata.ste_tx_list_tag, + sc->ste_cdata.ste_tx_list_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + while (idx != sc->ste_cdata.ste_tx_prod) { cur_tx = &sc->ste_cdata.ste_tx_chain[idx]; - - if (!(cur_tx->ste_ptr->ste_ctl & STE_TXCTL_DMADONE)) + txstat = le32toh(cur_tx->ste_ptr->ste_ctl); + if ((txstat & STE_TXCTL_DMADONE) == 0) break; - + bus_dmamap_sync(sc->ste_cdata.ste_tx_tag, cur_tx->ste_map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->ste_cdata.ste_tx_tag, cur_tx->ste_map); + KASSERT(cur_tx->ste_mbuf != NULL, + ("%s: freeing NULL mbuf!\n", __func__)); m_freem(cur_tx->ste_mbuf); cur_tx->ste_mbuf = NULL; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ifp->if_opackets++; - + sc->ste_cdata.ste_tx_cnt--; STE_INC(idx, STE_TX_LIST_CNT); } sc->ste_cdata.ste_tx_cons = idx; - if (idx == sc->ste_cdata.ste_tx_prod) + if (sc->ste_cdata.ste_tx_cnt == 0) sc->ste_timer = 0; } @@ -1007,17 +978,8 @@ ste_attach(device_t dev) goto fail; } - /* Allocate the descriptor queues. */ - sc->ste_ldata = contigmalloc(sizeof(struct ste_list_data), M_DEVBUF, - M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); - - if (sc->ste_ldata == NULL) { - device_printf(dev, "no memory for list buffers!\n"); - error = ENXIO; + if ((error = ste_dma_alloc(sc)) != 0) goto fail; - } - - bzero(sc->ste_ldata, sizeof(struct ste_list_data)); ifp = sc->ste_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { @@ -1123,44 +1085,325 @@ ste_detach(device_t dev) if (ifp) if_free(ifp); - if (sc->ste_ldata) { - contigfree(sc->ste_ldata, sizeof(struct ste_list_data), - M_DEVBUF); - } - + ste_dma_free(sc); mtx_destroy(&sc->ste_mtx); return (0); } +struct ste_dmamap_arg { + bus_addr_t ste_busaddr; +}; + +static void +ste_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + struct ste_dmamap_arg *ctx; + + if (error != 0) + return; + + KASSERT(nsegs == 1, ("%s: %d segments returned!", __func__, nsegs)); + + ctx = (struct ste_dmamap_arg *)arg; + ctx->ste_busaddr = segs[0].ds_addr; +} + static int -ste_newbuf(struct ste_softc *sc, struct ste_chain_onefrag *c, struct mbuf *m) +ste_dma_alloc(struct ste_softc *sc) { - struct mbuf *m_new = NULL; + struct ste_chain *txc; + struct ste_chain_onefrag *rxc; + struct ste_dmamap_arg ctx; + int error, i; + + /* Create parent DMA tag. */ + error = bus_dma_tag_create( + bus_get_dma_tag(sc->ste_dev), /* parent */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + 0, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ste_cdata.ste_parent_tag); + if (error != 0) { + device_printf(sc->ste_dev, + "could not create parent DMA tag.\n"); + goto fail; + } + + /* Create DMA tag for Tx descriptor list. */ + error = bus_dma_tag_create( + sc->ste_cdata.ste_parent_tag, /* parent */ + STE_DESC_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + STE_TX_LIST_SZ, /* maxsize */ + 1, /* nsegments */ + STE_TX_LIST_SZ, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ste_cdata.ste_tx_list_tag); + if (error != 0) { + device_printf(sc->ste_dev, + "could not create Tx list DMA tag.\n"); + goto fail; + } + + /* Create DMA tag for Rx descriptor list. */ + error = bus_dma_tag_create( + sc->ste_cdata.ste_parent_tag, /* parent */ + STE_DESC_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + STE_RX_LIST_SZ, /* maxsize */ + 1, /* nsegments */ + STE_RX_LIST_SZ, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ste_cdata.ste_rx_list_tag); + if (error != 0) { + device_printf(sc->ste_dev, + "could not create Rx list DMA tag.\n"); + goto fail; + } + + /* Create DMA tag for Tx buffers. */ + error = bus_dma_tag_create( + sc->ste_cdata.ste_parent_tag, /* parent */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MCLBYTES * STE_MAXFRAGS, /* maxsize */ + STE_MAXFRAGS, /* nsegments */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ste_cdata.ste_tx_tag); + if (error != 0) { + device_printf(sc->ste_dev, "could not create Tx DMA tag.\n"); + goto fail; + } - if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); - if (m_new == NULL) - return (ENOBUFS); - MCLGET(m_new, M_DONTWAIT); - if (!(m_new->m_flags & M_EXT)) { - m_freem(m_new); - return (ENOBUFS); + /* Create DMA tag for Rx buffers. */ + error = bus_dma_tag_create( + sc->ste_cdata.ste_parent_tag, /* parent */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MCLBYTES, /* maxsize */ + 1, /* nsegments */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ste_cdata.ste_rx_tag); + if (error != 0) { + device_printf(sc->ste_dev, "could not create Rx DMA tag.\n"); + goto fail; + } + + /* Allocate DMA'able memory and load the DMA map for Tx list. */ + error = bus_dmamem_alloc(sc->ste_cdata.ste_tx_list_tag, + (void **)&sc->ste_ldata.ste_tx_list, + BUS_DMA_WAITOK | BUS_DMA_ZERO | BUS_DMA_COHERENT, + &sc->ste_cdata.ste_tx_list_map); + if (error != 0) { + device_printf(sc->ste_dev, + "could not allocate DMA'able memory for Tx list.\n"); + goto fail; + } + ctx.ste_busaddr = 0; + error = bus_dmamap_load(sc->ste_cdata.ste_tx_list_tag, + sc->ste_cdata.ste_tx_list_map, sc->ste_ldata.ste_tx_list, + STE_TX_LIST_SZ, ste_dmamap_cb, &ctx, 0); + if (error != 0 || ctx.ste_busaddr == 0) { + device_printf(sc->ste_dev, + "could not load DMA'able memory for Tx list.\n"); + goto fail; + } + sc->ste_ldata.ste_tx_list_paddr = ctx.ste_busaddr; + + /* Allocate DMA'able memory and load the DMA map for Rx list. */ + error = bus_dmamem_alloc(sc->ste_cdata.ste_rx_list_tag, + (void **)&sc->ste_ldata.ste_rx_list, + BUS_DMA_WAITOK | BUS_DMA_ZERO | BUS_DMA_COHERENT, + &sc->ste_cdata.ste_rx_list_map); + if (error != 0) { + device_printf(sc->ste_dev, + "could not allocate DMA'able memory for Rx list.\n"); + goto fail; + } + ctx.ste_busaddr = 0; + error = bus_dmamap_load(sc->ste_cdata.ste_rx_list_tag, + sc->ste_cdata.ste_rx_list_map, sc->ste_ldata.ste_rx_list, + STE_RX_LIST_SZ, ste_dmamap_cb, &ctx, 0); + if (error != 0 || ctx.ste_busaddr == 0) { + device_printf(sc->ste_dev, + "could not load DMA'able memory for Rx list.\n"); + goto fail; + } + sc->ste_ldata.ste_rx_list_paddr = ctx.ste_busaddr; + + /* Create DMA maps for Tx buffers. */ + for (i = 0; i < STE_TX_LIST_CNT; i++) { + txc = &sc->ste_cdata.ste_tx_chain[i]; + txc->ste_ptr = NULL; + txc->ste_mbuf = NULL; + txc->ste_next = NULL; + txc->ste_phys = 0; + txc->ste_map = NULL; + error = bus_dmamap_create(sc->ste_cdata.ste_tx_tag, 0, + &txc->ste_map); + if (error != 0) { + device_printf(sc->ste_dev, + "could not create Tx dmamap.\n"); + goto fail; + } + } + /* Create DMA maps for Rx buffers. */ + if ((error = bus_dmamap_create(sc->ste_cdata.ste_rx_tag, 0, + &sc->ste_cdata.ste_rx_sparemap)) != 0) { + device_printf(sc->ste_dev, + "could not create spare Rx dmamap.\n"); + goto fail; + } + for (i = 0; i < STE_RX_LIST_CNT; i++) { + rxc = &sc->ste_cdata.ste_rx_chain[i]; + rxc->ste_ptr = NULL; + rxc->ste_mbuf = NULL; + rxc->ste_next = NULL; + rxc->ste_map = NULL; + error = bus_dmamap_create(sc->ste_cdata.ste_rx_tag, 0, + &rxc->ste_map); + if (error != 0) { + device_printf(sc->ste_dev, + "could not create Rx dmamap.\n"); + goto fail; } - m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; - } else { - m_new = m; - m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; - m_new->m_data = m_new->m_ext.ext_buf; } - m_adj(m_new, ETHER_ALIGN); +fail: + return (error); +} - c->ste_mbuf = m_new; - c->ste_ptr->ste_status = 0; - c->ste_ptr->ste_frag.ste_addr = vtophys(mtod(m_new, caddr_t)); - c->ste_ptr->ste_frag.ste_len = (1536 + ETHER_VLAN_ENCAP_LEN) | STE_FRAG_LAST; +static void +ste_dma_free(struct ste_softc *sc) +{ + struct ste_chain *txc; + struct ste_chain_onefrag *rxc; + int i; + /* Tx buffers. */ + if (sc->ste_cdata.ste_tx_tag != NULL) { + for (i = 0; i < STE_TX_LIST_CNT; i++) { + txc = &sc->ste_cdata.ste_tx_chain[i]; + if (txc->ste_map != NULL) { + bus_dmamap_destroy(sc->ste_cdata.ste_tx_tag, + txc->ste_map); + txc->ste_map = NULL; + } + } + bus_dma_tag_destroy(sc->ste_cdata.ste_tx_tag); + sc->ste_cdata.ste_tx_tag = NULL; + } + /* Rx buffers. */ + if (sc->ste_cdata.ste_rx_tag != NULL) { + for (i = 0; i < STE_RX_LIST_CNT; i++) { + rxc = &sc->ste_cdata.ste_rx_chain[i]; + if (rxc->ste_map != NULL) { + bus_dmamap_destroy(sc->ste_cdata.ste_rx_tag, + rxc->ste_map); + rxc->ste_map = NULL; + } + } + if (sc->ste_cdata.ste_rx_sparemap != NULL) { + bus_dmamap_destroy(sc->ste_cdata.ste_rx_tag, + sc->ste_cdata.ste_rx_sparemap); + sc->ste_cdata.ste_rx_sparemap = NULL; + } + bus_dma_tag_destroy(sc->ste_cdata.ste_rx_tag); + sc->ste_cdata.ste_rx_tag = NULL; + } + /* Tx descriptor list. */ + if (sc->ste_cdata.ste_tx_list_tag != NULL) { + if (sc->ste_cdata.ste_tx_list_map != NULL) + bus_dmamap_unload(sc->ste_cdata.ste_tx_list_tag, + sc->ste_cdata.ste_tx_list_map); + if (sc->ste_cdata.ste_tx_list_map != NULL && + sc->ste_ldata.ste_tx_list != NULL) + bus_dmamem_free(sc->ste_cdata.ste_tx_list_tag, + sc->ste_ldata.ste_tx_list, + sc->ste_cdata.ste_tx_list_map); + sc->ste_ldata.ste_tx_list = NULL; + sc->ste_cdata.ste_tx_list_map = NULL; + bus_dma_tag_destroy(sc->ste_cdata.ste_tx_list_tag); + sc->ste_cdata.ste_tx_list_tag = NULL; + } + /* Rx descriptor list. */ + if (sc->ste_cdata.ste_rx_list_tag != NULL) { + if (sc->ste_cdata.ste_rx_list_map != NULL) + bus_dmamap_unload(sc->ste_cdata.ste_rx_list_tag, + sc->ste_cdata.ste_rx_list_map); + if (sc->ste_cdata.ste_rx_list_map != NULL && + sc->ste_ldata.ste_rx_list != NULL) + bus_dmamem_free(sc->ste_cdata.ste_rx_list_tag, + sc->ste_ldata.ste_rx_list, + sc->ste_cdata.ste_rx_list_map); + sc->ste_ldata.ste_rx_list = NULL; + sc->ste_cdata.ste_rx_list_map = NULL; + bus_dma_tag_destroy(sc->ste_cdata.ste_rx_list_tag); + sc->ste_cdata.ste_rx_list_tag = NULL; + } + if (sc->ste_cdata.ste_parent_tag != NULL) { + bus_dma_tag_destroy(sc->ste_cdata.ste_parent_tag); + sc->ste_cdata.ste_parent_tag = NULL; + } +} + +static int +ste_newbuf(struct ste_softc *sc, struct ste_chain_onefrag *rxc) +{ + struct mbuf *m; + bus_dma_segment_t segs[1]; + bus_dmamap_t map; + int error, nsegs; + + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) + return (ENOBUFS); + m->m_len = m->m_pkthdr.len = MCLBYTES; + m_adj(m, ETHER_ALIGN); + + if ((error = bus_dmamap_load_mbuf_sg(sc->ste_cdata.ste_rx_tag, + sc->ste_cdata.ste_rx_sparemap, m, segs, &nsegs, 0)) != 0) { + m_freem(m); + return (error); + } + KASSERT(nsegs == 1, ("%s: %d segments returned!", __func__, nsegs)); + + if (rxc->ste_mbuf != NULL) { + bus_dmamap_sync(sc->ste_cdata.ste_rx_tag, rxc->ste_map, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->ste_cdata.ste_rx_tag, rxc->ste_map); + } + map = rxc->ste_map; + rxc->ste_map = sc->ste_cdata.ste_rx_sparemap; + sc->ste_cdata.ste_rx_sparemap = map; + bus_dmamap_sync(sc->ste_cdata.ste_rx_tag, rxc->ste_map, + BUS_DMASYNC_PREREAD); + rxc->ste_mbuf = m; + rxc->ste_ptr->ste_status = 0; + rxc->ste_ptr->ste_frag.ste_addr = htole32(segs[0].ds_addr); + rxc->ste_ptr->ste_frag.ste_len = htole32(segs[0].ds_len | + STE_FRAG_LAST); return (0); } @@ -1169,30 +1412,31 @@ ste_init_rx_list(struct ste_softc *sc) { struct ste_chain_data *cd; struct ste_list_data *ld; - int i; + int error, i; cd = &sc->ste_cdata; - ld = sc->ste_ldata; - + ld = &sc->ste_ldata; + bzero(ld->ste_rx_list, STE_RX_LIST_SZ); for (i = 0; i < STE_RX_LIST_CNT; i++) { cd->ste_rx_chain[i].ste_ptr = &ld->ste_rx_list[i]; - if (ste_newbuf(sc, &cd->ste_rx_chain[i], NULL) == ENOBUFS) - return (ENOBUFS); + error = ste_newbuf(sc, &cd->ste_rx_chain[i]); + if (error != 0) + return (error); if (i == (STE_RX_LIST_CNT - 1)) { - cd->ste_rx_chain[i].ste_next = - &cd->ste_rx_chain[0]; - ld->ste_rx_list[i].ste_next = - vtophys(&ld->ste_rx_list[0]); + cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[0]; + ld->ste_rx_list[i].ste_next = ld->ste_rx_list_paddr + + (sizeof(struct ste_desc_onefrag) * 0); } else { - cd->ste_rx_chain[i].ste_next = - &cd->ste_rx_chain[i + 1]; - ld->ste_rx_list[i].ste_next = - vtophys(&ld->ste_rx_list[i + 1]); + cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[i + 1]; + ld->ste_rx_list[i].ste_next = ld->ste_rx_list_paddr + + (sizeof(struct ste_desc_onefrag) * (i + 1)); } - ld->ste_rx_list[i].ste_status = 0; } cd->ste_rx_head = &cd->ste_rx_chain[0]; + bus_dmamap_sync(sc->ste_cdata.ste_rx_list_tag, + sc->ste_cdata.ste_rx_list_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); return (0); } @@ -1205,22 +1449,32 @@ ste_init_tx_list(struct ste_softc *sc) int i; cd = &sc->ste_cdata; - ld = sc->ste_ldata; + ld = &sc->ste_ldata; + bzero(ld->ste_tx_list, STE_TX_LIST_SZ); for (i = 0; i < STE_TX_LIST_CNT; i++) { cd->ste_tx_chain[i].ste_ptr = &ld->ste_tx_list[i]; - cd->ste_tx_chain[i].ste_ptr->ste_next = 0; - cd->ste_tx_chain[i].ste_ptr->ste_ctl = 0; - cd->ste_tx_chain[i].ste_phys = vtophys(&ld->ste_tx_list[i]); - if (i == (STE_TX_LIST_CNT - 1)) - cd->ste_tx_chain[i].ste_next = - &cd->ste_tx_chain[0]; - else - cd->ste_tx_chain[i].ste_next = - &cd->ste_tx_chain[i + 1]; + cd->ste_tx_chain[i].ste_mbuf = NULL; + if (i == (STE_TX_LIST_CNT - 1)) { + cd->ste_tx_chain[i].ste_next = &cd->ste_tx_chain[0]; + cd->ste_tx_chain[i].ste_phys = htole32(STE_ADDR_LO( + ld->ste_tx_list_paddr + + (sizeof(struct ste_desc) * 0))); + } else { + cd->ste_tx_chain[i].ste_next = &cd->ste_tx_chain[i + 1]; + cd->ste_tx_chain[i].ste_phys = htole32(STE_ADDR_LO( + ld->ste_tx_list_paddr + + (sizeof(struct ste_desc) * (i + 1)))); + } } + cd->ste_last_tx = NULL; cd->ste_tx_prod = 0; cd->ste_tx_cons = 0; + cd->ste_tx_cnt = 0; + + bus_dmamap_sync(sc->ste_cdata.ste_tx_list_tag, + sc->ste_cdata.ste_tx_list_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } static void @@ -1253,7 +1507,7 @@ ste_init_locked(struct ste_softc *sc) } /* Init RX list */ - if (ste_init_rx_list(sc) == ENOBUFS) { + if (ste_init_rx_list(sc) != 0) { device_printf(sc->ste_dev, "initialization failed: no memory for RX buffers\n"); ste_stop(sc); @@ -1298,11 +1552,11 @@ ste_init_locked(struct ste_softc *sc) STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_RXDMA_STALL); ste_wait(sc); CSR_WRITE_4(sc, STE_RX_DMALIST_PTR, - vtophys(&sc->ste_ldata->ste_rx_list[0])); + STE_ADDR_LO(sc->ste_ldata.ste_rx_list_paddr)); STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_RXDMA_UNSTALL); STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_RXDMA_UNSTALL); - /* Set TX polling interval (defer until we TX first packet */ + /* Set TX polling interval(defer until we TX first packet). */ CSR_WRITE_1(sc, STE_TX_DMAPOLL_PERIOD, 0); /* Load address of the TX list */ @@ -1312,7 +1566,6 @@ ste_init_locked(struct ste_softc *sc) STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); ste_wait(sc); - sc->ste_tx_prev = NULL; /* Enable receiver and transmitter */ CSR_WRITE_2(sc, STE_MACCTL0, 0); @@ -1348,6 +1601,8 @@ static void ste_stop(struct ste_softc *sc) { struct ifnet *ifp; + struct ste_chain_onefrag *cur_rx; + struct ste_chain *cur_tx; int i; STE_LOCK_ASSERT(sc); @@ -1372,20 +1627,28 @@ ste_stop(struct ste_softc *sc) sc->ste_link = 0; for (i = 0; i < STE_RX_LIST_CNT; i++) { - if (sc->ste_cdata.ste_rx_chain[i].ste_mbuf != NULL) { - m_freem(sc->ste_cdata.ste_rx_chain[i].ste_mbuf); - sc->ste_cdata.ste_rx_chain[i].ste_mbuf = NULL; + cur_rx = &sc->ste_cdata.ste_rx_chain[i]; + if (cur_rx->ste_mbuf != NULL) { + bus_dmamap_sync(sc->ste_cdata.ste_rx_tag, + cur_rx->ste_map, BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->ste_cdata.ste_rx_tag, + cur_rx->ste_map); + m_freem(cur_rx->ste_mbuf); + cur_rx->ste_mbuf = NULL; } } for (i = 0; i < STE_TX_LIST_CNT; i++) { - if (sc->ste_cdata.ste_tx_chain[i].ste_mbuf != NULL) { - m_freem(sc->ste_cdata.ste_tx_chain[i].ste_mbuf); - sc->ste_cdata.ste_tx_chain[i].ste_mbuf = NULL; + cur_tx = &sc->ste_cdata.ste_tx_chain[i]; + if (cur_tx->ste_mbuf != NULL) { + bus_dmamap_sync(sc->ste_cdata.ste_tx_tag, + cur_tx->ste_map, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->ste_cdata.ste_tx_tag, + cur_tx->ste_map); + m_freem(cur_tx->ste_mbuf); + cur_tx->ste_mbuf = NULL; } } - - bzero(sc->ste_ldata, sizeof(struct ste_list_data)); } static void @@ -1500,48 +1763,60 @@ ste_ioctl(struct ifnet *ifp, u_long comm } static int -ste_encap(struct ste_softc *sc, struct ste_chain *c, struct mbuf *m_head) +ste_encap(struct ste_softc *sc, struct mbuf **m_head, struct ste_chain *txc) { + struct ste_frag *frag; struct mbuf *m; - struct ste_desc *d; - struct ste_frag *f = NULL; - int frag = 0; - - d = c->ste_ptr; - d->ste_ctl = 0; - -encap_retry: - for (m = m_head, frag = 0; m != NULL; m = m->m_next) { - if (m->m_len != 0) { - if (frag == STE_MAXFRAGS) - break; - f = &d->ste_frags[frag]; - f->ste_addr = vtophys(mtod(m, vm_offset_t)); - f->ste_len = m->m_len; - frag++; - } - } + struct ste_desc *desc; + bus_dma_segment_t txsegs[STE_MAXFRAGS]; + int error, i, nsegs; - if (m != NULL) { - struct mbuf *mn; + STE_LOCK_ASSERT(sc); + M_ASSERTPKTHDR((*m_head)); - /* - * We ran out of segments. We have to recopy this - * mbuf chain first. Bail out if we can't get the - * new buffers. - */ - mn = m_defrag(m_head, M_DONTWAIT); - if (mn == NULL) { - m_freem(m_head); - return ENOMEM; - } - m_head = mn; - goto encap_retry; + error = bus_dmamap_load_mbuf_sg(sc->ste_cdata.ste_tx_tag, + txc->ste_map, *m_head, txsegs, &nsegs, 0); + if (error == EFBIG) { + m = m_collapse(*m_head, M_DONTWAIT, STE_MAXFRAGS); + if (m == NULL) { + m_freem(*m_head); + *m_head = NULL; + return (ENOMEM); + } + *m_head = m; + error = bus_dmamap_load_mbuf_sg(sc->ste_cdata.ste_tx_tag, + txc->ste_map, *m_head, txsegs, &nsegs, 0); + if (error != 0) { + m_freem(*m_head); + *m_head = NULL; + return (error); + } + } else if (error != 0) + return (error); + if (nsegs == 0) { + m_freem(*m_head); + *m_head = NULL; + return (EIO); + } + bus_dmamap_sync(sc->ste_cdata.ste_tx_tag, txc->ste_map, + BUS_DMASYNC_PREWRITE); + + desc = txc->ste_ptr; + for (i = 0; i < nsegs; i++) { + frag = &desc->ste_frags[i]; + frag->ste_addr = htole32(STE_ADDR_LO(txsegs[i].ds_addr)); + frag->ste_len = htole32(txsegs[i].ds_len); } - - c->ste_mbuf = m_head; - d->ste_frags[frag - 1].ste_len |= STE_FRAG_LAST; - d->ste_ctl = 1; + desc->ste_frags[i - 1].ste_len |= htole32(STE_FRAG_LAST); + /* + * Because we use Tx polling we can't chain multiple + * Tx descriptors here. Otherwise we race with controller. + */ + desc->ste_next = 0; + desc->ste_ctl = htole32(STE_TXCTL_ALIGN_DIS | STE_TXCTL_DMAINTR); + txc->ste_mbuf = *m_head; + STE_INC(sc->ste_cdata.ste_tx_prod, STE_TX_LIST_CNT); + sc->ste_cdata.ste_tx_cnt++; return (0); } @@ -1563,7 +1838,7 @@ ste_start_locked(struct ifnet *ifp) struct ste_softc *sc; struct ste_chain *cur_tx; struct mbuf *m_head = NULL; - int idx; + int enq; sc = ifp->if_softc; STE_LOCK_ASSERT(sc); @@ -1574,62 +1849,56 @@ ste_start_locked(struct ifnet *ifp) if (ifp->if_drv_flags & IFF_DRV_OACTIVE) return; - idx = sc->ste_cdata.ste_tx_prod; - - while (sc->ste_cdata.ste_tx_chain[idx].ste_mbuf == NULL) { - /* - * We cannot re-use the last (free) descriptor; - * the chip may not have read its ste_next yet. - */ - if (STE_NEXT(idx, STE_TX_LIST_CNT) == - sc->ste_cdata.ste_tx_cons) { + for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd);) { + if (sc->ste_cdata.ste_tx_cnt == STE_TX_LIST_CNT - 1) { + /* + * Controller may have cached copy of the last used + * next ptr so we have to reserve one TFD to avoid + * TFD overruns. + */ ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } - IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; - - cur_tx = &sc->ste_cdata.ste_tx_chain[idx]; - - if (ste_encap(sc, cur_tx, m_head) != 0) + cur_tx = &sc->ste_cdata.ste_tx_chain[sc->ste_cdata.ste_tx_prod]; + if (ste_encap(sc, &m_head, cur_tx) != 0) { + if (m_head == NULL) + break; + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); break; - - cur_tx->ste_ptr->ste_next = 0; - - if (sc->ste_tx_prev == NULL) { - cur_tx->ste_ptr->ste_ctl = STE_TXCTL_DMAINTR | 1; - /* Load address of the TX list */ + } + if (sc->ste_cdata.ste_last_tx == NULL) { + bus_dmamap_sync(sc->ste_cdata.ste_tx_list_tag, + sc->ste_cdata.ste_tx_list_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_STALL); ste_wait(sc); - CSR_WRITE_4(sc, STE_TX_DMALIST_PTR, - vtophys(&sc->ste_ldata->ste_tx_list[0])); - - /* Set TX polling interval to start TX engine */ + STE_ADDR_LO(sc->ste_ldata.ste_tx_list_paddr)); CSR_WRITE_1(sc, STE_TX_DMAPOLL_PERIOD, 64); - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:00:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64C8E106568F; Thu, 14 Jan 2010 22:00:33 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 531E98FC1E; Thu, 14 Jan 2010 22:00:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EM0Xe3058500; Thu, 14 Jan 2010 22:00:33 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EM0Xe1058497; Thu, 14 Jan 2010 22:00:33 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142200.o0EM0Xe1058497@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 22:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202311 - stable/8/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:00:33 -0000 Author: yongari Date: Thu Jan 14 22:00:33 2010 New Revision: 202311 URL: http://svn.freebsd.org/changeset/base/202311 Log: MFC r200854,200856,200865,200873,200875,200877,200884 r200854: Add minimal dealy while ste(4) is waiting for the end of active DMA cycle. r200856: Introduce sc_flags member variable and use it to keep track of link state and PHY related information. Remove ste_link and ste_one_phy variable of softc as it's not used anymore. While I'm here add IFF_DRV_RUNNING check in ste_start_locked(). r200865: Reimplement miibus_statchg method. Don't rely on link state change interrupt. If we want to use link state change interrupt ste(4) should also implement auto-negotiation complete handler as well as various PHY access handling. Now link state change is handled by mii(4) polling so it will automatically update link state UP/DOWN events which in turn make ste(4) usable with lagg(4). r199559 added a private timer to drive watchdog and the timer also used to drive MAC statistics update. Because the MAC statistics update is called whenever statistics counter reaches near-full, it drove watchdog timer too fast such that it caused false watchdog timeouts under heavy TX traffic conditions. Fix the regression by separating ste_stats_update() from driving watchdog timer and introduce a new function ste_tick() that handles periodic job such as driving watchdog, MAC statistics update and link state check etc. While I'm here clear armed watchdog timer in ste_stop(). r200873: Instead of relying on hard resetting of controller to stop receiving incoming traffics, try harder to gracefully stop active DMA cycles and then stop MACs. This is the way what datasheet recommends and seems to work reliably. Resetting controller while active DMAs are in progress is bad thing as we can't predict how DMAs touche allocated TX/RX buffers. This change ensures controller stop state before attempting to release allocated TX/RX buffers. Also update MAC statistics which could have been updated during the wait time of MAC stop. While I'm here remove unnecessary controller resets in various location. ste(4) no longer relies on hard controller reset to stop controller and resetting controller also clears all configured settings which makes it hard to implement WOL in near future. Now resetting a controller is performed in ste_init_locked(). r200875: Prefer memory space register mapping over io space. If memory space mapping fails fall back to old io space mapping. While I'm here use PCIR_BAR macro. r200877: Prefer bus_write_{1,2,4}/bus_read_{1,2,4} to bus_space_write_{1,2,4}/bus_space_read_{1,2,4}. Remove unused ste_bhandle and ste_btag in softc. r200884: Reimplement Tx status error handler as recommended by datasheet. If ste(4) encounter TX underrun or excessive collisions the TX MAC of controller is stalled so driver should wake it up again. TX underrun requires increasing TX threshold value to minimize further TX underruns. Previously ste(4) used to reset controller to recover from TX underrun, excessive collision and reclaiming error. However datasheet says only TX underrun requires resetting entire controller. So implement ste_restart_tx() that restarts TX MAC and do not perform full reset except TX underrun case. Now ste(4) uses CSR_READ_2 instead of CSR_READ_1 to read STE_TX_STATUS register. This way ste(4) will also read frame id value and we can write the same value back to STE_TX_FRAMEID register instead of overwriting it to 0. The datasheet was wrong in write back of STE_TX_STATUS so add some comments why we do so. Also always invoke ste_txeoc() after ste_txeof() in ste_poll as without reading TX status register can stall TX MAC. Modified: stable/8/sys/dev/ste/if_ste.c stable/8/sys/dev/ste/if_stereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ste/if_ste.c ============================================================================== --- stable/8/sys/dev/ste/if_ste.c Thu Jan 14 21:54:20 2010 (r202310) +++ stable/8/sys/dev/ste/if_ste.c Thu Jan 14 22:00:33 2010 (r202311) @@ -74,12 +74,13 @@ __FBSDID("$FreeBSD$"); /* "device miibus" required. See GENERIC if you get errors here. */ #include "miibus_if.h" -#define STE_USEIOSPACE - MODULE_DEPEND(ste, pci, 1, 1, 1); MODULE_DEPEND(ste, ether, 1, 1, 1); MODULE_DEPEND(ste, miibus, 1, 1, 1); +/* Define to show Tx error status. */ +#define STE_SHOW_TXERRORS + /* * Various supported device vendors/types and their names. */ @@ -120,25 +121,19 @@ static int ste_miibus_writereg(device_t, static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *); static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); static void ste_reset(struct ste_softc *); +static void ste_restart_tx(struct ste_softc *); static int ste_rxeof(struct ste_softc *, int); static void ste_setmulti(struct ste_softc *); static void ste_start(struct ifnet *); static void ste_start_locked(struct ifnet *); -static void ste_stats_update(void *); +static void ste_stats_update(struct ste_softc *); static void ste_stop(struct ste_softc *); +static void ste_tick(void *); static void ste_txeoc(struct ste_softc *); static void ste_txeof(struct ste_softc *); static void ste_wait(struct ste_softc *); static void ste_watchdog(struct ste_softc *); -#ifdef STE_USEIOSPACE -#define STE_RES SYS_RES_IOPORT -#define STE_RID STE_PCI_LOIO -#else -#define STE_RES SYS_RES_MEMORY -#define STE_RID STE_PCI_LOMEM -#endif - static device_method_t ste_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ste_probe), @@ -369,7 +364,7 @@ ste_miibus_readreg(device_t dev, int phy sc = device_get_softc(dev); - if ( sc->ste_one_phy && phy != 0 ) + if ((sc->ste_flags & STE_FLAG_ONE_PHY) != 0 && phy != 0) return (0); bzero((char *)&frame, sizeof(frame)); @@ -404,15 +399,49 @@ ste_miibus_statchg(device_t dev) { struct ste_softc *sc; struct mii_data *mii; + struct ifnet *ifp; + uint16_t cfg; sc = device_get_softc(dev); mii = device_get_softc(sc->ste_miibus); + ifp = sc->ste_ifp; + if (mii == NULL || ifp == NULL || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; - if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) { - STE_SETBIT2(sc, STE_MACCTL0, STE_MACCTL0_FULLDUPLEX); - } else { - STE_CLRBIT2(sc, STE_MACCTL0, STE_MACCTL0_FULLDUPLEX); + sc->ste_flags &= ~STE_FLAG_LINK; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + case IFM_100_FX: + case IFM_100_T4: + sc->ste_flags |= STE_FLAG_LINK; + default: + break; + } + } + + /* Program MACs with resolved speed/duplex/flow-control. */ + if ((sc->ste_flags & STE_FLAG_LINK) != 0) { + cfg = CSR_READ_2(sc, STE_MACCTL0); + cfg &= ~(STE_MACCTL0_FLOWCTL_ENABLE | STE_MACCTL0_FULLDUPLEX); + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { + /* + * ST201 data sheet says driver should enable receiving + * MAC control frames bit of receive mode register to + * receive flow-control frames but the register has no + * such bits. In addition the controller has no ability + * to send pause frames so it should be handled in + * driver. Implementing pause timer handling in driver + * layer is not trivial, so don't enable flow-control + * here. + */ + cfg |= STE_MACCTL0_FULLDUPLEX; + } + CSR_WRITE_2(sc, STE_MACCTL0, cfg); } } @@ -438,7 +467,7 @@ ste_ifmedia_upd_locked(struct ifnet *ifp sc = ifp->if_softc; STE_LOCK_ASSERT(sc); mii = device_get_softc(sc->ste_miibus); - sc->ste_link = 0; + sc->ste_flags &= ~STE_FLAG_LINK; if (mii->mii_instance) { struct mii_softc *miisc; LIST_FOREACH(miisc, &mii->mii_phys, mii_list) @@ -471,6 +500,7 @@ ste_wait(struct ste_softc *sc) for (i = 0; i < STE_TIMEOUT; i++) { if (!(CSR_READ_4(sc, STE_DMACTL) & STE_DMACTL_DMA_HALTINPROG)) break; + DELAY(1); } if (i == STE_TIMEOUT) @@ -601,6 +631,7 @@ ste_poll_locked(struct ifnet *ifp, enum rx_npkts = ste_rxeof(sc, count); ste_txeof(sc); + ste_txeoc(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ste_start_locked(ifp); @@ -609,21 +640,11 @@ ste_poll_locked(struct ifnet *ifp, enum status = CSR_READ_2(sc, STE_ISR_ACK); - if (status & STE_ISR_TX_DONE) - ste_txeoc(sc); - - if (status & STE_ISR_STATS_OFLOW) { - callout_stop(&sc->ste_stat_callout); + if (status & STE_ISR_STATS_OFLOW) ste_stats_update(sc); - } - - if (status & STE_ISR_LINKEVENT) - mii_pollstat(device_get_softc(sc->ste_miibus)); - if (status & STE_ISR_HOSTERR) { - ste_reset(sc); + if (status & STE_ISR_HOSTERR) ste_init_locked(sc); - } } return (rx_npkts); } @@ -668,19 +689,11 @@ ste_intr(void *xsc) if (status & STE_ISR_TX_DONE) ste_txeoc(sc); - if (status & STE_ISR_STATS_OFLOW) { - callout_stop(&sc->ste_stat_callout); + if (status & STE_ISR_STATS_OFLOW) ste_stats_update(sc); - } - - if (status & STE_ISR_LINKEVENT) - mii_pollstat(device_get_softc(sc->ste_miibus)); - - if (status & STE_ISR_HOSTERR) { - ste_reset(sc); + if (status & STE_ISR_HOSTERR) ste_init_locked(sc); - } } /* Re-enable interrupts */ @@ -777,41 +790,92 @@ ste_rxeof(struct ste_softc *sc, int coun static void ste_txeoc(struct ste_softc *sc) { + uint16_t txstat; struct ifnet *ifp; - uint8_t txstat; + + STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; - while ((txstat = CSR_READ_1(sc, STE_TX_STATUS)) & - STE_TXSTATUS_TXDONE) { - if (txstat & STE_TXSTATUS_UNDERRUN || - txstat & STE_TXSTATUS_EXCESSCOLLS || - txstat & STE_TXSTATUS_RECLAIMERR) { + /* + * STE_TX_STATUS register implements a queue of up to 31 + * transmit status byte. Writing an arbitrary value to the + * register will advance the queue to the next transmit + * status byte. This means if driver does not read + * STE_TX_STATUS register after completing sending more + * than 31 frames the controller would be stalled so driver + * should re-wake the Tx MAC. This is the most severe + * limitation of ST201 based controller. + */ + for (;;) { + txstat = CSR_READ_2(sc, STE_TX_STATUS); + if ((txstat & STE_TXSTATUS_TXDONE) == 0) + break; + if ((txstat & (STE_TXSTATUS_UNDERRUN | + STE_TXSTATUS_EXCESSCOLLS | STE_TXSTATUS_RECLAIMERR | + STE_TXSTATUS_STATSOFLOW)) != 0) { ifp->if_oerrors++; - device_printf(sc->ste_dev, - "transmission error: %x\n", txstat); - - ste_reset(sc); - ste_init_locked(sc); - - if (txstat & STE_TXSTATUS_UNDERRUN && +#ifdef STE_SHOW_TXERRORS + device_printf(sc->ste_dev, "TX error : 0x%b\n", + txstat & 0xFF, STE_ERR_BITS); +#endif + if ((txstat & STE_TXSTATUS_UNDERRUN) != 0 && sc->ste_tx_thresh < STE_PACKET_SIZE) { sc->ste_tx_thresh += STE_MIN_FRAMELEN; + if (sc->ste_tx_thresh > STE_PACKET_SIZE) + sc->ste_tx_thresh = STE_PACKET_SIZE; device_printf(sc->ste_dev, - "tx underrun, increasing tx" + "TX underrun, increasing TX" " start threshold to %d bytes\n", sc->ste_tx_thresh); + /* Make sure to disable active DMA cycles. */ + STE_SETBIT4(sc, STE_DMACTL, + STE_DMACTL_TXDMA_STALL); + ste_wait(sc); + ste_init_locked(sc); + break; } - CSR_WRITE_2(sc, STE_TX_STARTTHRESH, sc->ste_tx_thresh); - CSR_WRITE_2(sc, STE_TX_RECLAIM_THRESH, - (STE_PACKET_SIZE >> 4)); + /* Restart Tx. */ + ste_restart_tx(sc); } - ste_init_locked(sc); + /* + * Advance to next status and ACK TxComplete + * interrupt. ST201 data sheet was wrong here, to + * get next Tx status, we have to write both + * STE_TX_STATUS and STE_TX_FRAMEID register. + * Otherwise controller returns the same status + * as well as not acknowledge Tx completion + * interrupt. + */ CSR_WRITE_2(sc, STE_TX_STATUS, txstat); } } static void +ste_tick(void *arg) +{ + struct ste_softc *sc; + struct mii_data *mii; + + sc = (struct ste_softc *)arg; + + STE_LOCK_ASSERT(sc); + + mii = device_get_softc(sc->ste_miibus); + mii_tick(mii); + /* + * ukphy(4) does not seem to generate CB that reports + * resolved link state so if we know we lost a link, + * explicitly check the link state. + */ + if ((sc->ste_flags & STE_FLAG_LINK) == 0) + ste_miibus_statchg(sc->ste_dev); + ste_stats_update(sc); + ste_watchdog(sc); + callout_reset(&sc->ste_callout, hz, ste_tick, sc); +} + +static void ste_txeof(struct ste_softc *sc) { struct ifnet *ifp; @@ -854,43 +918,18 @@ ste_txeof(struct ste_softc *sc) } static void -ste_stats_update(void *xsc) +ste_stats_update(struct ste_softc *sc) { - struct ste_softc *sc; struct ifnet *ifp; - struct mii_data *mii; - sc = xsc; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; - mii = device_get_softc(sc->ste_miibus); - ifp->if_collisions += CSR_READ_1(sc, STE_LATE_COLLS) + CSR_READ_1(sc, STE_MULTI_COLLS) + CSR_READ_1(sc, STE_SINGLE_COLLS); - - if (!sc->ste_link) { - mii_pollstat(mii); - if (mii->mii_media_status & IFM_ACTIVE && - IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { - sc->ste_link++; - /* - * we don't get a call-back on re-init so do it - * otherwise we get stuck in the wrong link state - */ - ste_miibus_statchg(sc->ste_dev); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - ste_start_locked(ifp); - } - } - - if (sc->ste_timer > 0 && --sc->ste_timer == 0) - ste_watchdog(sc); - callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc); } - /* * Probe for a Sundance ST201 chip. Check the PCI vendor and device * IDs against our list and return a device name if we find a match. @@ -937,7 +976,7 @@ ste_attach(device_t dev) if (pci_get_vendor(dev) == DL_VENDORID && pci_get_device(dev) == DL_DEVICEID_DL10050 && pci_get_revid(dev) == 0x12 ) - sc->ste_one_phy = 1; + sc->ste_flags |= STE_FLAG_ONE_PHY; mtx_init(&sc->ste_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); @@ -946,18 +985,23 @@ ste_attach(device_t dev) */ pci_enable_busmaster(dev); - rid = STE_RID; - sc->ste_res = bus_alloc_resource_any(dev, STE_RES, &rid, RF_ACTIVE); - + /* Prefer memory space register mapping over IO space. */ + sc->ste_res_id = PCIR_BAR(1); + sc->ste_res_type = SYS_RES_MEMORY; + sc->ste_res = bus_alloc_resource_any(dev, sc->ste_res_type, + &sc->ste_res_id, RF_ACTIVE); + if (sc->ste_res == NULL) { + sc->ste_res_id = PCIR_BAR(0); + sc->ste_res_type = SYS_RES_IOPORT; + sc->ste_res = bus_alloc_resource_any(dev, sc->ste_res_type, + &sc->ste_res_id, RF_ACTIVE); + } if (sc->ste_res == NULL) { device_printf(dev, "couldn't map ports/memory\n"); error = ENXIO; goto fail; } - sc->ste_btag = rman_get_bustag(sc->ste_res); - sc->ste_bhandle = rman_get_bushandle(sc->ste_res); - /* Allocate interrupt */ rid = 0; sc->ste_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -969,7 +1013,7 @@ ste_attach(device_t dev) goto fail; } - callout_init_mtx(&sc->ste_stat_callout, &sc->ste_mtx, 0); + callout_init_mtx(&sc->ste_callout, &sc->ste_mtx, 0); /* Reset the adapter. */ ste_reset(sc); @@ -1075,7 +1119,7 @@ ste_detach(device_t dev) STE_LOCK(sc); ste_stop(sc); STE_UNLOCK(sc); - callout_drain(&sc->ste_stat_callout); + callout_drain(&sc->ste_callout); } if (sc->ste_miibus) device_delete_child(dev, sc->ste_miibus); @@ -1086,7 +1130,8 @@ ste_detach(device_t dev) if (sc->ste_irq) bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ste_irq); if (sc->ste_res) - bus_release_resource(dev, STE_RES, STE_RID, sc->ste_res); + bus_release_resource(dev, sc->ste_res_type, sc->ste_res_id, + sc->ste_res); if (ifp) if_free(ifp); @@ -1504,6 +1549,8 @@ ste_init_locked(struct ste_softc *sc) ifp = sc->ste_ifp; ste_stop(sc); + /* Reset the chip to a known state. */ + ste_reset(sc); /* Init our MAC address */ for (i = 0; i < ETHER_ADDR_LEN; i += 2) { @@ -1600,7 +1647,7 @@ ste_init_locked(struct ste_softc *sc) ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc); + callout_reset(&sc->ste_callout, hz, ste_tick, sc); } static void @@ -1609,28 +1656,44 @@ ste_stop(struct ste_softc *sc) struct ifnet *ifp; struct ste_chain_onefrag *cur_rx; struct ste_chain *cur_tx; + uint32_t val; int i; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; - callout_stop(&sc->ste_stat_callout); + callout_stop(&sc->ste_callout); + sc->ste_timer = 0; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING|IFF_DRV_OACTIVE); CSR_WRITE_2(sc, STE_IMR, 0); - STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_TX_DISABLE); - STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_RX_DISABLE); - STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_STATS_DISABLE); - STE_SETBIT2(sc, STE_DMACTL, STE_DMACTL_TXDMA_STALL); - STE_SETBIT2(sc, STE_DMACTL, STE_DMACTL_RXDMA_STALL); + /* Stop pending DMA. */ + val = CSR_READ_4(sc, STE_DMACTL); + val |= STE_DMACTL_TXDMA_STALL | STE_DMACTL_RXDMA_STALL; + CSR_WRITE_4(sc, STE_DMACTL, val); ste_wait(sc); - /* - * Try really hard to stop the RX engine or under heavy RX - * data chip will write into de-allocated memory. - */ - ste_reset(sc); - - sc->ste_link = 0; + /* Disable auto-polling. */ + CSR_WRITE_1(sc, STE_RX_DMAPOLL_PERIOD, 0); + CSR_WRITE_1(sc, STE_TX_DMAPOLL_PERIOD, 0); + /* Nullify DMA address to stop any further DMA. */ + CSR_WRITE_4(sc, STE_RX_DMALIST_PTR, 0); + CSR_WRITE_4(sc, STE_TX_DMALIST_PTR, 0); + /* Stop TX/RX MAC. */ + val = CSR_READ_2(sc, STE_MACCTL1); + val |= STE_MACCTL1_TX_DISABLE | STE_MACCTL1_RX_DISABLE | + STE_MACCTL1_STATS_DISABLE; + CSR_WRITE_2(sc, STE_MACCTL1, val); + for (i = 0; i < STE_TIMEOUT; i++) { + DELAY(10); + if ((CSR_READ_2(sc, STE_MACCTL1) & (STE_MACCTL1_TX_DISABLE | + STE_MACCTL1_RX_DISABLE | STE_MACCTL1_STATS_DISABLE)) == 0) + break; + } + if (i == STE_TIMEOUT) + device_printf(sc->ste_dev, "Stopping MAC timed out\n"); + /* Acknowledge any pending interrupts. */ + CSR_READ_2(sc, STE_ISR_ACK); + ste_stats_update(sc); for (i = 0; i < STE_RX_LIST_CNT; i++) { cur_rx = &sc->ste_cdata.ste_rx_chain[i]; @@ -1680,6 +1743,26 @@ ste_reset(struct ste_softc *sc) device_printf(sc->ste_dev, "global reset never completed\n"); } +static void +ste_restart_tx(struct ste_softc *sc) +{ + uint16_t mac; + int i; + + for (i = 0; i < STE_TIMEOUT; i++) { + mac = CSR_READ_2(sc, STE_MACCTL1); + mac |= STE_MACCTL1_TX_ENABLE; + CSR_WRITE_2(sc, STE_MACCTL1, mac); + mac = CSR_READ_2(sc, STE_MACCTL1); + if ((mac & STE_MACCTL1_TX_ENABLED) != 0) + break; + DELAY(10); + } + + if (i == STE_TIMEOUT) + device_printf(sc->ste_dev, "starting Tx failed"); +} + static int ste_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { @@ -1849,10 +1932,8 @@ ste_start_locked(struct ifnet *ifp) sc = ifp->if_softc; STE_LOCK_ASSERT(sc); - if (!sc->ste_link) - return; - - if (ifp->if_drv_flags & IFF_DRV_OACTIVE) + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING || (sc->ste_flags & STE_FLAG_LINK) == 0) return; for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd);) { @@ -1915,13 +1996,15 @@ ste_watchdog(struct ste_softc *sc) ifp = sc->ste_ifp; STE_LOCK_ASSERT(sc); + if (sc->ste_timer == 0 || --sc->ste_timer) + return; + ifp->if_oerrors++; if_printf(ifp, "watchdog timeout\n"); - ste_txeoc(sc); ste_txeof(sc); + ste_txeoc(sc); ste_rxeof(sc, -1); - ste_reset(sc); ste_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) Modified: stable/8/sys/dev/ste/if_stereg.h ============================================================================== --- stable/8/sys/dev/ste/if_stereg.h Thu Jan 14 21:54:20 2010 (r202310) +++ stable/8/sys/dev/ste/if_stereg.h Thu Jan 14 22:00:33 2010 (r202311) @@ -253,6 +253,11 @@ #define STE_TXSTATUS_TXINTR_REQ 0x40 #define STE_TXSTATUS_TXDONE 0x80 +#define STE_ERR_BITS "\20" \ + "\2RECLAIM\3STSOFLOW" \ + "\4EXCESSCOLLS\5UNDERRUN" \ + "\6INTREQ\7DONE" + #define STE_ISRACK_INTLATCH 0x0001 #define STE_ISRACK_HOSTERR 0x0002 #define STE_ISRACK_TX_DONE 0x0004 @@ -276,10 +281,9 @@ #define STE_IMR_TX_DMADONE 0x0200 #define STE_IMR_RX_DMADONE 0x0400 -#define STE_INTRS \ +#define STE_INTRS \ (STE_IMR_RX_DMADONE|STE_IMR_TX_DMADONE| \ - STE_IMR_TX_DONE|STE_IMR_HOSTERR| \ - STE_IMR_LINKEVENT) + STE_IMR_TX_DONE|STE_IMR_HOSTERR) #define STE_ISR_INTLATCH 0x0001 #define STE_ISR_HOSTERR 0x0002 @@ -466,18 +470,18 @@ struct ste_desc_onefrag { * register space access macros */ #define CSR_WRITE_4(sc, reg, val) \ - bus_space_write_4(sc->ste_btag, sc->ste_bhandle, reg, val) + bus_write_4((sc)->ste_res, reg, val) #define CSR_WRITE_2(sc, reg, val) \ - bus_space_write_2(sc->ste_btag, sc->ste_bhandle, reg, val) + bus_write_2((sc)->ste_res, reg, val) #define CSR_WRITE_1(sc, reg, val) \ - bus_space_write_1(sc->ste_btag, sc->ste_bhandle, reg, val) + bus_write_1((sc)->ste_res, reg, val) #define CSR_READ_4(sc, reg) \ - bus_space_read_4(sc->ste_btag, sc->ste_bhandle, reg) + bus_read_4((sc)->ste_res, reg) #define CSR_READ_2(sc, reg) \ - bus_space_read_2(sc->ste_btag, sc->ste_bhandle, reg) + bus_read_2((sc)->ste_res, reg) #define CSR_READ_1(sc, reg) \ - bus_space_read_1(sc->ste_btag, sc->ste_bhandle, reg) + bus_read_1((sc)->ste_res, reg) #define STE_DESC_ALIGN 8 #define STE_RX_LIST_CNT 128 @@ -545,23 +549,24 @@ struct ste_chain_data { struct ste_softc { struct ifnet *ste_ifp; - bus_space_tag_t ste_btag; - bus_space_handle_t ste_bhandle; struct resource *ste_res; + int ste_res_id; + int ste_res_type; struct resource *ste_irq; void *ste_intrhand; struct ste_type *ste_info; device_t ste_miibus; device_t ste_dev; int ste_tx_thresh; - uint8_t ste_link; + int ste_flags; +#define STE_FLAG_ONE_PHY 0x0001 +#define STE_FLAG_LINK 0x8000 int ste_if_flags; int ste_timer; struct ste_list_data ste_ldata; struct ste_chain_data ste_cdata; - struct callout ste_stat_callout; + struct callout ste_callout; struct mtx ste_mtx; - uint8_t ste_one_phy; }; #define STE_LOCK(_sc) mtx_lock(&(_sc)->ste_mtx) From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:04:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA29E106568D; Thu, 14 Jan 2010 22:04:08 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90E6F8FC23; Thu, 14 Jan 2010 22:04:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EM480s059395; Thu, 14 Jan 2010 22:04:08 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EM48fQ059393; Thu, 14 Jan 2010 22:04:08 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201001142204.o0EM48fQ059393@svn.freebsd.org> From: Joel Dahl Date: Thu, 14 Jan 2010 22:04:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202312 - head/usr.sbin/adduser X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:04:08 -0000 Author: joel (doc committer) Date: Thu Jan 14 22:04:08 2010 New Revision: 202312 URL: http://svn.freebsd.org/changeset/base/202312 Log: Fix a few whitespace issues and comment typos that I found while reading through this file. Modified: head/usr.sbin/adduser/adduser.sh Modified: head/usr.sbin/adduser/adduser.sh ============================================================================== --- head/usr.sbin/adduser/adduser.sh Thu Jan 14 22:00:33 2010 (r202311) +++ head/usr.sbin/adduser/adduser.sh Thu Jan 14 22:04:08 2010 (r202312) @@ -28,20 +28,20 @@ # # err msg -# Display $msg on stderr, unless we're being quiet. -# +# Display $msg on stderr, unless we're being quiet. +# err() { if [ -z "$quietflag" ]; then - echo 1>&2 ${THISCMD}: ERROR: $* + echo 1>&2 ${THISCMD}: ERROR: $* fi } # info msg -# Display $msg on stdout, unless we're being quiet. -# +# Display $msg on stdout, unless we're being quiet. +# info() { if [ -z "$quietflag" ]; then - echo ${THISCMD}: INFO: $* + echo ${THISCMD}: INFO: $* fi } @@ -50,7 +50,7 @@ info() { # is not, output the value of the next higher uid that is available. # If a uid is not specified, output the first available uid, as indicated # by pw(8). -# +# get_nextuid () { _uid=$1 _nextuid= @@ -163,8 +163,7 @@ fullpath_from_shell() { # the path is invalid or it is not executable it # will emit an informational message saying so. # -shell_exists() -{ +shell_exists() { _sh="$1" _shellchk="${GREPCMD} '^$_sh$' ${ETCSHELLS} > /dev/null 2>&1" @@ -647,7 +646,6 @@ input_from_file() { # the user database. # input_interactive() { - _disable= _pass= _passconfirm= @@ -887,7 +885,7 @@ defaultshell="${DEFAULTSHELL}" defaultHomePerm= # Make sure the user running this program is root. This isn't a security -# measure as much as it is a usefull method of reminding the user to +# measure as much as it is a useful method of reminding the user to # 'su -' before he/she wastes time entering data that won't be saved. # procowner=${procowner:-`/usr/bin/id -u`} From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:04:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD92E106566B; Thu, 14 Jan 2010 22:04:32 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BD8E8FC0C; Thu, 14 Jan 2010 22:04:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EM4WVU059527; Thu, 14 Jan 2010 22:04:32 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EM4WIr059524; Thu, 14 Jan 2010 22:04:32 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142204.o0EM4WIr059524@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 22:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202313 - stable/7/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:04:32 -0000 Author: yongari Date: Thu Jan 14 22:04:32 2010 New Revision: 202313 URL: http://svn.freebsd.org/changeset/base/202313 Log: MFC r200854,200856,200865,200873,200875,200877,200884 r200854: Add minimal dealy while ste(4) is waiting for the end of active DMA cycle. r200856: Introduce sc_flags member variable and use it to keep track of link state and PHY related information. Remove ste_link and ste_one_phy variable of softc as it's not used anymore. While I'm here add IFF_DRV_RUNNING check in ste_start_locked(). r200865: Reimplement miibus_statchg method. Don't rely on link state change interrupt. If we want to use link state change interrupt ste(4) should also implement auto-negotiation complete handler as well as various PHY access handling. Now link state change is handled by mii(4) polling so it will automatically update link state UP/DOWN events which in turn make ste(4) usable with lagg(4). r199559 added a private timer to drive watchdog and the timer also used to drive MAC statistics update. Because the MAC statistics update is called whenever statistics counter reaches near-full, it drove watchdog timer too fast such that it caused false watchdog timeouts under heavy TX traffic conditions. Fix the regression by separating ste_stats_update() from driving watchdog timer and introduce a new function ste_tick() that handles periodic job such as driving watchdog, MAC statistics update and link state check etc. While I'm here clear armed watchdog timer in ste_stop(). r200873: Instead of relying on hard resetting of controller to stop receiving incoming traffics, try harder to gracefully stop active DMA cycles and then stop MACs. This is the way what datasheet recommends and seems to work reliably. Resetting controller while active DMAs are in progress is bad thing as we can't predict how DMAs touche allocated TX/RX buffers. This change ensures controller stop state before attempting to release allocated TX/RX buffers. Also update MAC statistics which could have been updated during the wait time of MAC stop. While I'm here remove unnecessary controller resets in various location. ste(4) no longer relies on hard controller reset to stop controller and resetting controller also clears all configured settings which makes it hard to implement WOL in near future. Now resetting a controller is performed in ste_init_locked(). r200875: Prefer memory space register mapping over io space. If memory space mapping fails fall back to old io space mapping. While I'm here use PCIR_BAR macro. r200877: Prefer bus_write_{1,2,4}/bus_read_{1,2,4} to bus_space_write_{1,2,4}/bus_space_read_{1,2,4}. Remove unused ste_bhandle and ste_btag in softc. r200884: Reimplement Tx status error handler as recommended by datasheet. If ste(4) encounter TX underrun or excessive collisions the TX MAC of controller is stalled so driver should wake it up again. TX underrun requires increasing TX threshold value to minimize further TX underruns. Previously ste(4) used to reset controller to recover from TX underrun, excessive collision and reclaiming error. However datasheet says only TX underrun requires resetting entire controller. So implement ste_restart_tx() that restarts TX MAC and do not perform full reset except TX underrun case. Now ste(4) uses CSR_READ_2 instead of CSR_READ_1 to read STE_TX_STATUS register. This way ste(4) will also read frame id value and we can write the same value back to STE_TX_FRAMEID register instead of overwriting it to 0. The datasheet was wrong in write back of STE_TX_STATUS so add some comments why we do so. Also always invoke ste_txeoc() after ste_txeof() in ste_poll as without reading TX status register can stall TX MAC. Modified: stable/7/sys/dev/ste/if_ste.c stable/7/sys/dev/ste/if_stereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ste/if_ste.c ============================================================================== --- stable/7/sys/dev/ste/if_ste.c Thu Jan 14 22:04:08 2010 (r202312) +++ stable/7/sys/dev/ste/if_ste.c Thu Jan 14 22:04:32 2010 (r202313) @@ -74,12 +74,13 @@ __FBSDID("$FreeBSD$"); /* "device miibus" required. See GENERIC if you get errors here. */ #include "miibus_if.h" -#define STE_USEIOSPACE - MODULE_DEPEND(ste, pci, 1, 1, 1); MODULE_DEPEND(ste, ether, 1, 1, 1); MODULE_DEPEND(ste, miibus, 1, 1, 1); +/* Define to show Tx error status. */ +#define STE_SHOW_TXERRORS + /* * Various supported device vendors/types and their names. */ @@ -120,25 +121,19 @@ static int ste_miibus_writereg(device_t, static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *); static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); static void ste_reset(struct ste_softc *); +static void ste_restart_tx(struct ste_softc *); static void ste_rxeof(struct ste_softc *, int); static void ste_setmulti(struct ste_softc *); static void ste_start(struct ifnet *); static void ste_start_locked(struct ifnet *); -static void ste_stats_update(void *); +static void ste_stats_update(struct ste_softc *); static void ste_stop(struct ste_softc *); +static void ste_tick(void *); static void ste_txeoc(struct ste_softc *); static void ste_txeof(struct ste_softc *); static void ste_wait(struct ste_softc *); static void ste_watchdog(struct ste_softc *); -#ifdef STE_USEIOSPACE -#define STE_RES SYS_RES_IOPORT -#define STE_RID STE_PCI_LOIO -#else -#define STE_RES SYS_RES_MEMORY -#define STE_RID STE_PCI_LOMEM -#endif - static device_method_t ste_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ste_probe), @@ -369,7 +364,7 @@ ste_miibus_readreg(device_t dev, int phy sc = device_get_softc(dev); - if ( sc->ste_one_phy && phy != 0 ) + if ((sc->ste_flags & STE_FLAG_ONE_PHY) != 0 && phy != 0) return (0); bzero((char *)&frame, sizeof(frame)); @@ -404,15 +399,49 @@ ste_miibus_statchg(device_t dev) { struct ste_softc *sc; struct mii_data *mii; + struct ifnet *ifp; + uint16_t cfg; sc = device_get_softc(dev); mii = device_get_softc(sc->ste_miibus); + ifp = sc->ste_ifp; + if (mii == NULL || ifp == NULL || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; - if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) { - STE_SETBIT2(sc, STE_MACCTL0, STE_MACCTL0_FULLDUPLEX); - } else { - STE_CLRBIT2(sc, STE_MACCTL0, STE_MACCTL0_FULLDUPLEX); + sc->ste_flags &= ~STE_FLAG_LINK; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + case IFM_100_FX: + case IFM_100_T4: + sc->ste_flags |= STE_FLAG_LINK; + default: + break; + } + } + + /* Program MACs with resolved speed/duplex/flow-control. */ + if ((sc->ste_flags & STE_FLAG_LINK) != 0) { + cfg = CSR_READ_2(sc, STE_MACCTL0); + cfg &= ~(STE_MACCTL0_FLOWCTL_ENABLE | STE_MACCTL0_FULLDUPLEX); + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { + /* + * ST201 data sheet says driver should enable receiving + * MAC control frames bit of receive mode register to + * receive flow-control frames but the register has no + * such bits. In addition the controller has no ability + * to send pause frames so it should be handled in + * driver. Implementing pause timer handling in driver + * layer is not trivial, so don't enable flow-control + * here. + */ + cfg |= STE_MACCTL0_FULLDUPLEX; + } + CSR_WRITE_2(sc, STE_MACCTL0, cfg); } } @@ -438,7 +467,7 @@ ste_ifmedia_upd_locked(struct ifnet *ifp sc = ifp->if_softc; STE_LOCK_ASSERT(sc); mii = device_get_softc(sc->ste_miibus); - sc->ste_link = 0; + sc->ste_flags &= ~STE_FLAG_LINK; if (mii->mii_instance) { struct mii_softc *miisc; LIST_FOREACH(miisc, &mii->mii_phys, mii_list) @@ -471,6 +500,7 @@ ste_wait(struct ste_softc *sc) for (i = 0; i < STE_TIMEOUT; i++) { if (!(CSR_READ_4(sc, STE_DMACTL) & STE_DMACTL_DMA_HALTINPROG)) break; + DELAY(1); } if (i == STE_TIMEOUT) @@ -598,6 +628,7 @@ ste_poll_locked(struct ifnet *ifp, enum ste_rxeof(sc, count); ste_txeof(sc); + ste_txeoc(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ste_start_locked(ifp); @@ -606,21 +637,11 @@ ste_poll_locked(struct ifnet *ifp, enum status = CSR_READ_2(sc, STE_ISR_ACK); - if (status & STE_ISR_TX_DONE) - ste_txeoc(sc); - - if (status & STE_ISR_STATS_OFLOW) { - callout_stop(&sc->ste_stat_callout); + if (status & STE_ISR_STATS_OFLOW) ste_stats_update(sc); - } - - if (status & STE_ISR_LINKEVENT) - mii_pollstat(device_get_softc(sc->ste_miibus)); - if (status & STE_ISR_HOSTERR) { - ste_reset(sc); + if (status & STE_ISR_HOSTERR) ste_init_locked(sc); - } } } #endif /* DEVICE_POLLING */ @@ -664,19 +685,11 @@ ste_intr(void *xsc) if (status & STE_ISR_TX_DONE) ste_txeoc(sc); - if (status & STE_ISR_STATS_OFLOW) { - callout_stop(&sc->ste_stat_callout); + if (status & STE_ISR_STATS_OFLOW) ste_stats_update(sc); - } - - if (status & STE_ISR_LINKEVENT) - mii_pollstat(device_get_softc(sc->ste_miibus)); - - if (status & STE_ISR_HOSTERR) { - ste_reset(sc); + if (status & STE_ISR_HOSTERR) ste_init_locked(sc); - } } /* Re-enable interrupts */ @@ -771,41 +784,92 @@ ste_rxeof(struct ste_softc *sc, int coun static void ste_txeoc(struct ste_softc *sc) { + uint16_t txstat; struct ifnet *ifp; - uint8_t txstat; + + STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; - while ((txstat = CSR_READ_1(sc, STE_TX_STATUS)) & - STE_TXSTATUS_TXDONE) { - if (txstat & STE_TXSTATUS_UNDERRUN || - txstat & STE_TXSTATUS_EXCESSCOLLS || - txstat & STE_TXSTATUS_RECLAIMERR) { + /* + * STE_TX_STATUS register implements a queue of up to 31 + * transmit status byte. Writing an arbitrary value to the + * register will advance the queue to the next transmit + * status byte. This means if driver does not read + * STE_TX_STATUS register after completing sending more + * than 31 frames the controller would be stalled so driver + * should re-wake the Tx MAC. This is the most severe + * limitation of ST201 based controller. + */ + for (;;) { + txstat = CSR_READ_2(sc, STE_TX_STATUS); + if ((txstat & STE_TXSTATUS_TXDONE) == 0) + break; + if ((txstat & (STE_TXSTATUS_UNDERRUN | + STE_TXSTATUS_EXCESSCOLLS | STE_TXSTATUS_RECLAIMERR | + STE_TXSTATUS_STATSOFLOW)) != 0) { ifp->if_oerrors++; - device_printf(sc->ste_dev, - "transmission error: %x\n", txstat); - - ste_reset(sc); - ste_init_locked(sc); - - if (txstat & STE_TXSTATUS_UNDERRUN && +#ifdef STE_SHOW_TXERRORS + device_printf(sc->ste_dev, "TX error : 0x%b\n", + txstat & 0xFF, STE_ERR_BITS); +#endif + if ((txstat & STE_TXSTATUS_UNDERRUN) != 0 && sc->ste_tx_thresh < STE_PACKET_SIZE) { sc->ste_tx_thresh += STE_MIN_FRAMELEN; + if (sc->ste_tx_thresh > STE_PACKET_SIZE) + sc->ste_tx_thresh = STE_PACKET_SIZE; device_printf(sc->ste_dev, - "tx underrun, increasing tx" + "TX underrun, increasing TX" " start threshold to %d bytes\n", sc->ste_tx_thresh); + /* Make sure to disable active DMA cycles. */ + STE_SETBIT4(sc, STE_DMACTL, + STE_DMACTL_TXDMA_STALL); + ste_wait(sc); + ste_init_locked(sc); + break; } - CSR_WRITE_2(sc, STE_TX_STARTTHRESH, sc->ste_tx_thresh); - CSR_WRITE_2(sc, STE_TX_RECLAIM_THRESH, - (STE_PACKET_SIZE >> 4)); + /* Restart Tx. */ + ste_restart_tx(sc); } - ste_init_locked(sc); + /* + * Advance to next status and ACK TxComplete + * interrupt. ST201 data sheet was wrong here, to + * get next Tx status, we have to write both + * STE_TX_STATUS and STE_TX_FRAMEID register. + * Otherwise controller returns the same status + * as well as not acknowledge Tx completion + * interrupt. + */ CSR_WRITE_2(sc, STE_TX_STATUS, txstat); } } static void +ste_tick(void *arg) +{ + struct ste_softc *sc; + struct mii_data *mii; + + sc = (struct ste_softc *)arg; + + STE_LOCK_ASSERT(sc); + + mii = device_get_softc(sc->ste_miibus); + mii_tick(mii); + /* + * ukphy(4) does not seem to generate CB that reports + * resolved link state so if we know we lost a link, + * explicitly check the link state. + */ + if ((sc->ste_flags & STE_FLAG_LINK) == 0) + ste_miibus_statchg(sc->ste_dev); + ste_stats_update(sc); + ste_watchdog(sc); + callout_reset(&sc->ste_callout, hz, ste_tick, sc); +} + +static void ste_txeof(struct ste_softc *sc) { struct ifnet *ifp; @@ -848,43 +912,18 @@ ste_txeof(struct ste_softc *sc) } static void -ste_stats_update(void *xsc) +ste_stats_update(struct ste_softc *sc) { - struct ste_softc *sc; struct ifnet *ifp; - struct mii_data *mii; - sc = xsc; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; - mii = device_get_softc(sc->ste_miibus); - ifp->if_collisions += CSR_READ_1(sc, STE_LATE_COLLS) + CSR_READ_1(sc, STE_MULTI_COLLS) + CSR_READ_1(sc, STE_SINGLE_COLLS); - - if (!sc->ste_link) { - mii_pollstat(mii); - if (mii->mii_media_status & IFM_ACTIVE && - IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { - sc->ste_link++; - /* - * we don't get a call-back on re-init so do it - * otherwise we get stuck in the wrong link state - */ - ste_miibus_statchg(sc->ste_dev); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - ste_start_locked(ifp); - } - } - - if (sc->ste_timer > 0 && --sc->ste_timer == 0) - ste_watchdog(sc); - callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc); } - /* * Probe for a Sundance ST201 chip. Check the PCI vendor and device * IDs against our list and return a device name if we find a match. @@ -931,7 +970,7 @@ ste_attach(device_t dev) if (pci_get_vendor(dev) == DL_VENDORID && pci_get_device(dev) == DL_DEVICEID_DL10050 && pci_get_revid(dev) == 0x12 ) - sc->ste_one_phy = 1; + sc->ste_flags |= STE_FLAG_ONE_PHY; mtx_init(&sc->ste_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); @@ -940,18 +979,23 @@ ste_attach(device_t dev) */ pci_enable_busmaster(dev); - rid = STE_RID; - sc->ste_res = bus_alloc_resource_any(dev, STE_RES, &rid, RF_ACTIVE); - + /* Prefer memory space register mapping over IO space. */ + sc->ste_res_id = PCIR_BAR(1); + sc->ste_res_type = SYS_RES_MEMORY; + sc->ste_res = bus_alloc_resource_any(dev, sc->ste_res_type, + &sc->ste_res_id, RF_ACTIVE); + if (sc->ste_res == NULL) { + sc->ste_res_id = PCIR_BAR(0); + sc->ste_res_type = SYS_RES_IOPORT; + sc->ste_res = bus_alloc_resource_any(dev, sc->ste_res_type, + &sc->ste_res_id, RF_ACTIVE); + } if (sc->ste_res == NULL) { device_printf(dev, "couldn't map ports/memory\n"); error = ENXIO; goto fail; } - sc->ste_btag = rman_get_bustag(sc->ste_res); - sc->ste_bhandle = rman_get_bushandle(sc->ste_res); - /* Allocate interrupt */ rid = 0; sc->ste_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -963,7 +1007,7 @@ ste_attach(device_t dev) goto fail; } - callout_init_mtx(&sc->ste_stat_callout, &sc->ste_mtx, 0); + callout_init_mtx(&sc->ste_callout, &sc->ste_mtx, 0); /* Reset the adapter. */ ste_reset(sc); @@ -1069,7 +1113,7 @@ ste_detach(device_t dev) STE_LOCK(sc); ste_stop(sc); STE_UNLOCK(sc); - callout_drain(&sc->ste_stat_callout); + callout_drain(&sc->ste_callout); } if (sc->ste_miibus) device_delete_child(dev, sc->ste_miibus); @@ -1080,7 +1124,8 @@ ste_detach(device_t dev) if (sc->ste_irq) bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ste_irq); if (sc->ste_res) - bus_release_resource(dev, STE_RES, STE_RID, sc->ste_res); + bus_release_resource(dev, sc->ste_res_type, sc->ste_res_id, + sc->ste_res); if (ifp) if_free(ifp); @@ -1498,6 +1543,8 @@ ste_init_locked(struct ste_softc *sc) ifp = sc->ste_ifp; ste_stop(sc); + /* Reset the chip to a known state. */ + ste_reset(sc); /* Init our MAC address */ for (i = 0; i < ETHER_ADDR_LEN; i += 2) { @@ -1594,7 +1641,7 @@ ste_init_locked(struct ste_softc *sc) ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - callout_reset(&sc->ste_stat_callout, hz, ste_stats_update, sc); + callout_reset(&sc->ste_callout, hz, ste_tick, sc); } static void @@ -1603,28 +1650,44 @@ ste_stop(struct ste_softc *sc) struct ifnet *ifp; struct ste_chain_onefrag *cur_rx; struct ste_chain *cur_tx; + uint32_t val; int i; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; - callout_stop(&sc->ste_stat_callout); + callout_stop(&sc->ste_callout); + sc->ste_timer = 0; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING|IFF_DRV_OACTIVE); CSR_WRITE_2(sc, STE_IMR, 0); - STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_TX_DISABLE); - STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_RX_DISABLE); - STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_STATS_DISABLE); - STE_SETBIT2(sc, STE_DMACTL, STE_DMACTL_TXDMA_STALL); - STE_SETBIT2(sc, STE_DMACTL, STE_DMACTL_RXDMA_STALL); + /* Stop pending DMA. */ + val = CSR_READ_4(sc, STE_DMACTL); + val |= STE_DMACTL_TXDMA_STALL | STE_DMACTL_RXDMA_STALL; + CSR_WRITE_4(sc, STE_DMACTL, val); ste_wait(sc); - /* - * Try really hard to stop the RX engine or under heavy RX - * data chip will write into de-allocated memory. - */ - ste_reset(sc); - - sc->ste_link = 0; + /* Disable auto-polling. */ + CSR_WRITE_1(sc, STE_RX_DMAPOLL_PERIOD, 0); + CSR_WRITE_1(sc, STE_TX_DMAPOLL_PERIOD, 0); + /* Nullify DMA address to stop any further DMA. */ + CSR_WRITE_4(sc, STE_RX_DMALIST_PTR, 0); + CSR_WRITE_4(sc, STE_TX_DMALIST_PTR, 0); + /* Stop TX/RX MAC. */ + val = CSR_READ_2(sc, STE_MACCTL1); + val |= STE_MACCTL1_TX_DISABLE | STE_MACCTL1_RX_DISABLE | + STE_MACCTL1_STATS_DISABLE; + CSR_WRITE_2(sc, STE_MACCTL1, val); + for (i = 0; i < STE_TIMEOUT; i++) { + DELAY(10); + if ((CSR_READ_2(sc, STE_MACCTL1) & (STE_MACCTL1_TX_DISABLE | + STE_MACCTL1_RX_DISABLE | STE_MACCTL1_STATS_DISABLE)) == 0) + break; + } + if (i == STE_TIMEOUT) + device_printf(sc->ste_dev, "Stopping MAC timed out\n"); + /* Acknowledge any pending interrupts. */ + CSR_READ_2(sc, STE_ISR_ACK); + ste_stats_update(sc); for (i = 0; i < STE_RX_LIST_CNT; i++) { cur_rx = &sc->ste_cdata.ste_rx_chain[i]; @@ -1674,6 +1737,26 @@ ste_reset(struct ste_softc *sc) device_printf(sc->ste_dev, "global reset never completed\n"); } +static void +ste_restart_tx(struct ste_softc *sc) +{ + uint16_t mac; + int i; + + for (i = 0; i < STE_TIMEOUT; i++) { + mac = CSR_READ_2(sc, STE_MACCTL1); + mac |= STE_MACCTL1_TX_ENABLE; + CSR_WRITE_2(sc, STE_MACCTL1, mac); + mac = CSR_READ_2(sc, STE_MACCTL1); + if ((mac & STE_MACCTL1_TX_ENABLED) != 0) + break; + DELAY(10); + } + + if (i == STE_TIMEOUT) + device_printf(sc->ste_dev, "starting Tx failed"); +} + static int ste_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { @@ -1843,10 +1926,8 @@ ste_start_locked(struct ifnet *ifp) sc = ifp->if_softc; STE_LOCK_ASSERT(sc); - if (!sc->ste_link) - return; - - if (ifp->if_drv_flags & IFF_DRV_OACTIVE) + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING || (sc->ste_flags & STE_FLAG_LINK) == 0) return; for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd);) { @@ -1909,13 +1990,15 @@ ste_watchdog(struct ste_softc *sc) ifp = sc->ste_ifp; STE_LOCK_ASSERT(sc); + if (sc->ste_timer == 0 || --sc->ste_timer) + return; + ifp->if_oerrors++; if_printf(ifp, "watchdog timeout\n"); - ste_txeoc(sc); ste_txeof(sc); + ste_txeoc(sc); ste_rxeof(sc, -1); - ste_reset(sc); ste_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) Modified: stable/7/sys/dev/ste/if_stereg.h ============================================================================== --- stable/7/sys/dev/ste/if_stereg.h Thu Jan 14 22:04:08 2010 (r202312) +++ stable/7/sys/dev/ste/if_stereg.h Thu Jan 14 22:04:32 2010 (r202313) @@ -253,6 +253,11 @@ #define STE_TXSTATUS_TXINTR_REQ 0x40 #define STE_TXSTATUS_TXDONE 0x80 +#define STE_ERR_BITS "\20" \ + "\2RECLAIM\3STSOFLOW" \ + "\4EXCESSCOLLS\5UNDERRUN" \ + "\6INTREQ\7DONE" + #define STE_ISRACK_INTLATCH 0x0001 #define STE_ISRACK_HOSTERR 0x0002 #define STE_ISRACK_TX_DONE 0x0004 @@ -276,10 +281,9 @@ #define STE_IMR_TX_DMADONE 0x0200 #define STE_IMR_RX_DMADONE 0x0400 -#define STE_INTRS \ +#define STE_INTRS \ (STE_IMR_RX_DMADONE|STE_IMR_TX_DMADONE| \ - STE_IMR_TX_DONE|STE_IMR_HOSTERR| \ - STE_IMR_LINKEVENT) + STE_IMR_TX_DONE|STE_IMR_HOSTERR) #define STE_ISR_INTLATCH 0x0001 #define STE_ISR_HOSTERR 0x0002 @@ -466,18 +470,18 @@ struct ste_desc_onefrag { * register space access macros */ #define CSR_WRITE_4(sc, reg, val) \ - bus_space_write_4(sc->ste_btag, sc->ste_bhandle, reg, val) + bus_write_4((sc)->ste_res, reg, val) #define CSR_WRITE_2(sc, reg, val) \ - bus_space_write_2(sc->ste_btag, sc->ste_bhandle, reg, val) + bus_write_2((sc)->ste_res, reg, val) #define CSR_WRITE_1(sc, reg, val) \ - bus_space_write_1(sc->ste_btag, sc->ste_bhandle, reg, val) + bus_write_1((sc)->ste_res, reg, val) #define CSR_READ_4(sc, reg) \ - bus_space_read_4(sc->ste_btag, sc->ste_bhandle, reg) + bus_read_4((sc)->ste_res, reg) #define CSR_READ_2(sc, reg) \ - bus_space_read_2(sc->ste_btag, sc->ste_bhandle, reg) + bus_read_2((sc)->ste_res, reg) #define CSR_READ_1(sc, reg) \ - bus_space_read_1(sc->ste_btag, sc->ste_bhandle, reg) + bus_read_1((sc)->ste_res, reg) #define STE_DESC_ALIGN 8 #define STE_RX_LIST_CNT 128 @@ -545,23 +549,24 @@ struct ste_chain_data { struct ste_softc { struct ifnet *ste_ifp; - bus_space_tag_t ste_btag; - bus_space_handle_t ste_bhandle; struct resource *ste_res; + int ste_res_id; + int ste_res_type; struct resource *ste_irq; void *ste_intrhand; struct ste_type *ste_info; device_t ste_miibus; device_t ste_dev; int ste_tx_thresh; - uint8_t ste_link; + int ste_flags; +#define STE_FLAG_ONE_PHY 0x0001 +#define STE_FLAG_LINK 0x8000 int ste_if_flags; int ste_timer; struct ste_list_data ste_ldata; struct ste_chain_data ste_cdata; - struct callout ste_stat_callout; + struct callout ste_callout; struct mtx ste_mtx; - uint8_t ste_one_phy; }; #define STE_LOCK(_sc) mtx_lock(&(_sc)->ste_mtx) From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:15:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98D521065670; Thu, 14 Jan 2010 22:15:51 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86A918FC13; Thu, 14 Jan 2010 22:15:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EMFpIT062164; Thu, 14 Jan 2010 22:15:51 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EMFpAl062161; Thu, 14 Jan 2010 22:15:51 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142215.o0EMFpAl062161@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 22:15:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202314 - stable/8/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:15:51 -0000 Author: yongari Date: Thu Jan 14 22:15:51 2010 New Revision: 202314 URL: http://svn.freebsd.org/changeset/base/202314 Log: MFC r200904-200908,200910-200913 r200904: Don't reinitialize controller if driver is already running. This reduces number of link state UP/DOWN changes. r200905: Reimplement controller reset. Datasheet says full reset takes about 1ms. Since we switched to memory register mapping make sure to flush PCI posted write by reading the register again. While I'm here add additional delays in loop while driver waits the completion of the reset. r200906: Overhaul RX filter programming. o Let RX filter handler program promiscuous/multicast filter as well as broadcasting. o Remove unnecessary register access. o Simplify ioctl handler and have set_rxfilter to handle IFF_PROMISC and IFF_ALLMULTI change instead of directly programming the controller. o Removed unnecessary error variable reinitialization in ioctl handler. o Add IFF_DRV_RUNNING check before programming multicast filter. o Configure maximum allowed frame length before enabling MAC. Datasheet didn't say the exact ordering of programming sequence but it looks more natural to set maximum allowed frame length first prior to enabling controller. r200907: Don't report link status if driver is not running. r200908: Report the correct result of mii_mediachg(). Previously it always used to return success without respect to the result. While I'm here use mii_mediachg() in ste_init_locked which allows driver to use currently configured media. ste_ifmedia_upd() is supposed to be called whenever user changes current media settings. r200910: Implement hardware MAC statistics counter support. The counters could be accessed with dev.ste.0.stats sysctl node. r200911: Remove unused duplicated register definition. It seems the definition was made to access STE_ASICCTL register as 16bits but ste(4) always access the register as 32bits so it was never used before. r200912: Correct STE_COUNTDOWN register offset. The datasheet was wrong. r200913: We don't need to generate DMA complete interrupt for every transmitted frames. So request interrupt for every 16th frames. Due to the limitation of hardware we can't suppress the interrupt as driver should have to check TX status register. The TX status register can store up to 31 TX status so driver can't send more than 31 frames without reading TX status register. With this change controller would not generate TX completion interrupt for every frame, so reclaim transmitted frames in ste_tick(). Modified: stable/8/sys/dev/ste/if_ste.c stable/8/sys/dev/ste/if_stereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ste/if_ste.c ============================================================================== --- stable/8/sys/dev/ste/if_ste.c Thu Jan 14 22:04:32 2010 (r202313) +++ stable/8/sys/dev/ste/if_ste.c Thu Jan 14 22:15:51 2010 (r202314) @@ -103,7 +103,6 @@ static int ste_eeprom_wait(struct ste_s static int ste_encap(struct ste_softc *, struct mbuf **, struct ste_chain *); static int ste_ifmedia_upd(struct ifnet *); -static void ste_ifmedia_upd_locked(struct ifnet *); static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *); static void ste_init(void *); static void ste_init_locked(struct ste_softc *); @@ -123,11 +122,13 @@ static int ste_read_eeprom(struct ste_so static void ste_reset(struct ste_softc *); static void ste_restart_tx(struct ste_softc *); static int ste_rxeof(struct ste_softc *, int); -static void ste_setmulti(struct ste_softc *); +static void ste_rxfilter(struct ste_softc *); static void ste_start(struct ifnet *); static void ste_start_locked(struct ifnet *); +static void ste_stats_clear(struct ste_softc *); static void ste_stats_update(struct ste_softc *); static void ste_stop(struct ste_softc *); +static void ste_sysctl_node(struct ste_softc *); static void ste_tick(void *); static void ste_txeoc(struct ste_softc *); static void ste_txeof(struct ste_softc *); @@ -449,31 +450,21 @@ static int ste_ifmedia_upd(struct ifnet *ifp) { struct ste_softc *sc; + struct mii_data *mii; + struct mii_softc *miisc; + int error; sc = ifp->if_softc; STE_LOCK(sc); - ste_ifmedia_upd_locked(ifp); - STE_UNLOCK(sc); - - return (0); -} - -static void -ste_ifmedia_upd_locked(struct ifnet *ifp) -{ - struct ste_softc *sc; - struct mii_data *mii; - - sc = ifp->if_softc; - STE_LOCK_ASSERT(sc); mii = device_get_softc(sc->ste_miibus); - sc->ste_flags &= ~STE_FLAG_LINK; if (mii->mii_instance) { - struct mii_softc *miisc; LIST_FOREACH(miisc, &mii->mii_phys, mii_list) mii_phy_reset(miisc); } - mii_mediachg(mii); + error = mii_mediachg(mii); + STE_UNLOCK(sc); + + return (error); } static void @@ -486,6 +477,10 @@ ste_ifmedia_sts(struct ifnet *ifp, struc mii = device_get_softc(sc->ste_miibus); STE_LOCK(sc); + if ((ifp->if_flags & IFF_UP) == 0) { + STE_UNLOCK(sc); + return; + } mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; @@ -563,27 +558,33 @@ ste_read_eeprom(struct ste_softc *sc, ca } static void -ste_setmulti(struct ste_softc *sc) +ste_rxfilter(struct ste_softc *sc) { struct ifnet *ifp; struct ifmultiaddr *ifma; uint32_t hashes[2] = { 0, 0 }; + uint8_t rxcfg; int h; + STE_LOCK_ASSERT(sc); + ifp = sc->ste_ifp; - if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { - STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_ALLMULTI); - STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_MULTIHASH); - return; + rxcfg = CSR_READ_1(sc, STE_RX_MODE); + rxcfg |= STE_RXMODE_UNICAST; + rxcfg &= ~(STE_RXMODE_ALLMULTI | STE_RXMODE_MULTIHASH | + STE_RXMODE_BROADCAST | STE_RXMODE_PROMISC); + if (ifp->if_flags & IFF_BROADCAST) + rxcfg |= STE_RXMODE_BROADCAST; + if ((ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) != 0) { + if ((ifp->if_flags & IFF_ALLMULTI) != 0) + rxcfg |= STE_RXMODE_ALLMULTI; + if ((ifp->if_flags & IFF_PROMISC) != 0) + rxcfg |= STE_RXMODE_PROMISC; + goto chipit; } - /* first, zot all the existing hash bits */ - CSR_WRITE_2(sc, STE_MAR0, 0); - CSR_WRITE_2(sc, STE_MAR1, 0); - CSR_WRITE_2(sc, STE_MAR2, 0); - CSR_WRITE_2(sc, STE_MAR3, 0); - - /* now program new ones */ + rxcfg |= STE_RXMODE_MULTIHASH; + /* Now program new ones. */ if_maddr_rlock(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) @@ -597,12 +598,13 @@ ste_setmulti(struct ste_softc *sc) } if_maddr_runlock(ifp); +chipit: CSR_WRITE_2(sc, STE_MAR0, hashes[0] & 0xFFFF); CSR_WRITE_2(sc, STE_MAR1, (hashes[0] >> 16) & 0xFFFF); CSR_WRITE_2(sc, STE_MAR2, hashes[1] & 0xFFFF); CSR_WRITE_2(sc, STE_MAR3, (hashes[1] >> 16) & 0xFFFF); - STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_ALLMULTI); - STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_MULTIHASH); + CSR_WRITE_1(sc, STE_RX_MODE, rxcfg); + CSR_READ_1(sc, STE_RX_MODE); } #ifdef DEVICE_POLLING @@ -643,8 +645,10 @@ ste_poll_locked(struct ifnet *ifp, enum if (status & STE_ISR_STATS_OFLOW) ste_stats_update(sc); - if (status & STE_ISR_HOSTERR) + if (status & STE_ISR_HOSTERR) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; ste_init_locked(sc); + } } return (rx_npkts); } @@ -692,8 +696,10 @@ ste_intr(void *xsc) if (status & STE_ISR_STATS_OFLOW) ste_stats_update(sc); - if (status & STE_ISR_HOSTERR) + if (status & STE_ISR_HOSTERR) { ste_init_locked(sc); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + } } /* Re-enable interrupts */ @@ -832,6 +838,7 @@ ste_txeoc(struct ste_softc *sc) STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_STALL); ste_wait(sc); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; ste_init_locked(sc); break; } @@ -870,6 +877,13 @@ ste_tick(void *arg) */ if ((sc->ste_flags & STE_FLAG_LINK) == 0) ste_miibus_statchg(sc->ste_dev); + /* + * Because we are not generating Tx completion + * interrupt for every frame, reclaim transmitted + * buffers here. + */ + ste_txeof(sc); + ste_txeoc(sc); ste_stats_update(sc); ste_watchdog(sc); callout_reset(&sc->ste_callout, hz, ste_tick, sc); @@ -918,16 +932,74 @@ ste_txeof(struct ste_softc *sc) } static void +ste_stats_clear(struct ste_softc *sc) +{ + + STE_LOCK_ASSERT(sc); + + /* Rx stats. */ + CSR_READ_2(sc, STE_STAT_RX_OCTETS_LO); + CSR_READ_2(sc, STE_STAT_RX_OCTETS_HI); + CSR_READ_2(sc, STE_STAT_RX_FRAMES); + CSR_READ_1(sc, STE_STAT_RX_BCAST); + CSR_READ_1(sc, STE_STAT_RX_MCAST); + CSR_READ_1(sc, STE_STAT_RX_LOST); + /* Tx stats. */ + CSR_READ_2(sc, STE_STAT_TX_OCTETS_LO); + CSR_READ_2(sc, STE_STAT_TX_OCTETS_HI); + CSR_READ_2(sc, STE_STAT_TX_FRAMES); + CSR_READ_1(sc, STE_STAT_TX_BCAST); + CSR_READ_1(sc, STE_STAT_TX_MCAST); + CSR_READ_1(sc, STE_STAT_CARRIER_ERR); + CSR_READ_1(sc, STE_STAT_SINGLE_COLLS); + CSR_READ_1(sc, STE_STAT_MULTI_COLLS); + CSR_READ_1(sc, STE_STAT_LATE_COLLS); + CSR_READ_1(sc, STE_STAT_TX_DEFER); + CSR_READ_1(sc, STE_STAT_TX_EXDEFER); + CSR_READ_1(sc, STE_STAT_TX_ABORT); +} + +static void ste_stats_update(struct ste_softc *sc) { struct ifnet *ifp; + struct ste_hw_stats *stats; + uint32_t val; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; - ifp->if_collisions += CSR_READ_1(sc, STE_LATE_COLLS) - + CSR_READ_1(sc, STE_MULTI_COLLS) - + CSR_READ_1(sc, STE_SINGLE_COLLS); + stats = &sc->ste_stats; + /* Rx stats. */ + val = (uint32_t)CSR_READ_2(sc, STE_STAT_RX_OCTETS_LO) | + ((uint32_t)CSR_READ_2(sc, STE_STAT_RX_OCTETS_HI)) << 16; + val &= 0x000FFFFF; + stats->rx_bytes += val; + stats->rx_frames += CSR_READ_2(sc, STE_STAT_RX_FRAMES); + stats->rx_bcast_frames += CSR_READ_1(sc, STE_STAT_RX_BCAST); + stats->rx_mcast_frames += CSR_READ_1(sc, STE_STAT_RX_MCAST); + stats->rx_lost_frames += CSR_READ_1(sc, STE_STAT_RX_LOST); + /* Tx stats. */ + val = (uint32_t)CSR_READ_2(sc, STE_STAT_TX_OCTETS_LO) | + ((uint32_t)CSR_READ_2(sc, STE_STAT_TX_OCTETS_HI)) << 16; + val &= 0x000FFFFF; + stats->tx_bytes += val; + stats->tx_frames += CSR_READ_2(sc, STE_STAT_TX_FRAMES); + stats->tx_bcast_frames += CSR_READ_1(sc, STE_STAT_TX_BCAST); + stats->tx_mcast_frames += CSR_READ_1(sc, STE_STAT_TX_MCAST); + stats->tx_carrsense_errs += CSR_READ_1(sc, STE_STAT_CARRIER_ERR); + val = CSR_READ_1(sc, STE_STAT_SINGLE_COLLS); + stats->tx_single_colls += val; + ifp->if_collisions += val; + val = CSR_READ_1(sc, STE_STAT_MULTI_COLLS); + stats->tx_multi_colls += val; + ifp->if_collisions += val; + val += CSR_READ_1(sc, STE_STAT_LATE_COLLS); + stats->tx_late_colls += val; + ifp->if_collisions += val; + stats->tx_frames_defered += CSR_READ_1(sc, STE_STAT_TX_DEFER); + stats->tx_excess_defers += CSR_READ_1(sc, STE_STAT_TX_EXDEFER); + stats->tx_abort += CSR_READ_1(sc, STE_STAT_TX_ABORT); } /* @@ -1027,6 +1099,7 @@ ste_attach(device_t dev) error = ENXIO;; goto fail; } + ste_sysctl_node(sc); if ((error = ste_dma_alloc(sc)) != 0) goto fail; @@ -1543,10 +1616,15 @@ static void ste_init_locked(struct ste_softc *sc) { struct ifnet *ifp; + struct mii_data *mii; int i; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; + mii = device_get_softc(sc->ste_miibus); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; ste_stop(sc); /* Reset the chip to a known state. */ @@ -1582,24 +1660,11 @@ ste_init_locked(struct ste_softc *sc) /* Set the TX reclaim threshold. */ CSR_WRITE_1(sc, STE_TX_RECLAIM_THRESH, (STE_PACKET_SIZE >> 4)); - /* Set up the RX filter. */ - CSR_WRITE_1(sc, STE_RX_MODE, STE_RXMODE_UNICAST); - - /* If we want promiscuous mode, set the allframes bit. */ - if (ifp->if_flags & IFF_PROMISC) { - STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_PROMISC); - } else { - STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_PROMISC); - } - - /* Set capture broadcast bit to accept broadcast frames. */ - if (ifp->if_flags & IFF_BROADCAST) { - STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_BROADCAST); - } else { - STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_BROADCAST); - } + /* Accept VLAN length packets */ + CSR_WRITE_2(sc, STE_MAX_FRAMELEN, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); - ste_setmulti(sc); + /* Set up the RX filter. */ + ste_rxfilter(sc); /* Load the address of the RX list. */ STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_RXDMA_STALL); @@ -1628,6 +1693,8 @@ ste_init_locked(struct ste_softc *sc) /* Enable stats counters. */ STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_STATS_ENABLE); + /* Clear stats counters. */ + ste_stats_clear(sc); CSR_WRITE_2(sc, STE_ISR, 0xFFFF); #ifdef DEVICE_POLLING @@ -1639,10 +1706,9 @@ ste_init_locked(struct ste_softc *sc) /* Enable interrupts. */ CSR_WRITE_2(sc, STE_IMR, STE_INTRS); - /* Accept VLAN length packets */ - CSR_WRITE_2(sc, STE_MAX_FRAMELEN, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); - - ste_ifmedia_upd_locked(ifp); + sc->ste_flags &= ~STE_FLAG_LINK; + /* Switch to the current media. */ + mii_mediachg(mii); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -1723,20 +1789,27 @@ ste_stop(struct ste_softc *sc) static void ste_reset(struct ste_softc *sc) { + uint32_t ctl; int i; - STE_SETBIT4(sc, STE_ASICCTL, - STE_ASICCTL_GLOBAL_RESET|STE_ASICCTL_RX_RESET| - STE_ASICCTL_TX_RESET|STE_ASICCTL_DMA_RESET| - STE_ASICCTL_FIFO_RESET|STE_ASICCTL_NETWORK_RESET| - STE_ASICCTL_AUTOINIT_RESET|STE_ASICCTL_HOST_RESET| - STE_ASICCTL_EXTRESET_RESET); - - DELAY(100000); + ctl = CSR_READ_4(sc, STE_ASICCTL); + ctl |= STE_ASICCTL_GLOBAL_RESET | STE_ASICCTL_RX_RESET | + STE_ASICCTL_TX_RESET | STE_ASICCTL_DMA_RESET | + STE_ASICCTL_FIFO_RESET | STE_ASICCTL_NETWORK_RESET | + STE_ASICCTL_AUTOINIT_RESET |STE_ASICCTL_HOST_RESET | + STE_ASICCTL_EXTRESET_RESET; + CSR_WRITE_4(sc, STE_ASICCTL, ctl); + CSR_READ_4(sc, STE_ASICCTL); + /* + * Due to the need of accessing EEPROM controller can take + * up to 1ms to complete the global reset. + */ + DELAY(1000); for (i = 0; i < STE_TIMEOUT; i++) { if (!(CSR_READ_4(sc, STE_ASICCTL) & STE_ASICCTL_RESET_BUSY)) break; + DELAY(10); } if (i == STE_TIMEOUT) @@ -1777,39 +1850,24 @@ ste_ioctl(struct ifnet *ifp, u_long comm switch (command) { case SIOCSIFFLAGS: STE_LOCK(sc); - if (ifp->if_flags & IFF_UP) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING && - ifp->if_flags & IFF_PROMISC && - !(sc->ste_if_flags & IFF_PROMISC)) { - STE_SETBIT1(sc, STE_RX_MODE, - STE_RXMODE_PROMISC); - } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && - !(ifp->if_flags & IFF_PROMISC) && - sc->ste_if_flags & IFF_PROMISC) { - STE_CLRBIT1(sc, STE_RX_MODE, - STE_RXMODE_PROMISC); - } - if (ifp->if_drv_flags & IFF_DRV_RUNNING && - (ifp->if_flags ^ sc->ste_if_flags) & IFF_ALLMULTI) - ste_setmulti(sc); - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - sc->ste_tx_thresh = STE_TXSTART_THRESH; + if ((ifp->if_flags & IFF_UP) != 0) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 && + ((ifp->if_flags ^ sc->ste_if_flags) & + (IFF_PROMISC | IFF_ALLMULTI)) != 0) + ste_rxfilter(sc); + else ste_init_locked(sc); - } - } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - ste_stop(sc); - } + } else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + ste_stop(sc); sc->ste_if_flags = ifp->if_flags; STE_UNLOCK(sc); - error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: STE_LOCK(sc); - ste_setmulti(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + ste_rxfilter(sc); STE_UNLOCK(sc); - error = 0; break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: @@ -1902,7 +1960,11 @@ ste_encap(struct ste_softc *sc, struct m * Tx descriptors here. Otherwise we race with controller. */ desc->ste_next = 0; - desc->ste_ctl = htole32(STE_TXCTL_ALIGN_DIS | STE_TXCTL_DMAINTR); + if ((sc->ste_cdata.ste_tx_prod % STE_TX_INTR_FRAMES) == 0) + desc->ste_ctl = htole32(STE_TXCTL_ALIGN_DIS | + STE_TXCTL_DMAINTR); + else + desc->ste_ctl = htole32(STE_TXCTL_ALIGN_DIS); txc->ste_mbuf = *m_head; STE_INC(sc->ste_cdata.ste_tx_prod, STE_TX_LIST_CNT); sc->ste_cdata.ste_tx_cnt++; @@ -2005,6 +2067,7 @@ ste_watchdog(struct ste_softc *sc) ste_txeof(sc); ste_txeoc(sc); ste_rxeof(sc, -1); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; ste_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) @@ -2024,3 +2087,70 @@ ste_shutdown(device_t dev) return (0); } + +#define STE_SYSCTL_STAT_ADD32(c, h, n, p, d) \ + SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) +#define STE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ + SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) + +static void +ste_sysctl_node(struct ste_softc *sc) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *child, *parent; + struct sysctl_oid *tree; + struct ste_hw_stats *stats; + + stats = &sc->ste_stats; + ctx = device_get_sysctl_ctx(sc->ste_dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->ste_dev)); + + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, + NULL, "STE statistics"); + parent = SYSCTL_CHILDREN(tree); + + /* Rx statistics. */ + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "rx", CTLFLAG_RD, + NULL, "Rx MAC statistics"); + child = SYSCTL_CHILDREN(tree); + STE_SYSCTL_STAT_ADD64(ctx, child, "good_octets", + &stats->rx_bytes, "Good octets"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_frames", + &stats->rx_frames, "Good frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_bcast_frames", + &stats->rx_bcast_frames, "Good broadcast frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_mcast_frames", + &stats->rx_mcast_frames, "Good multicast frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "lost_frames", + &stats->rx_lost_frames, "Lost frames"); + + /* Tx statistics. */ + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "tx", CTLFLAG_RD, + NULL, "Tx MAC statistics"); + child = SYSCTL_CHILDREN(tree); + STE_SYSCTL_STAT_ADD64(ctx, child, "good_octets", + &stats->tx_bytes, "Good octets"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_frames", + &stats->tx_frames, "Good frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_bcast_frames", + &stats->tx_bcast_frames, "Good broadcast frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_mcast_frames", + &stats->tx_mcast_frames, "Good multicast frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "carrier_errs", + &stats->tx_carrsense_errs, "Carrier sense errors"); + STE_SYSCTL_STAT_ADD32(ctx, child, "single_colls", + &stats->tx_single_colls, "Single collisions"); + STE_SYSCTL_STAT_ADD32(ctx, child, "multi_colls", + &stats->tx_multi_colls, "Multiple collisions"); + STE_SYSCTL_STAT_ADD32(ctx, child, "late_colls", + &stats->tx_late_colls, "Late collisions"); + STE_SYSCTL_STAT_ADD32(ctx, child, "defers", + &stats->tx_frames_defered, "Frames with deferrals"); + STE_SYSCTL_STAT_ADD32(ctx, child, "excess_defers", + &stats->tx_excess_defers, "Frames with excessive derferrals"); + STE_SYSCTL_STAT_ADD32(ctx, child, "abort", + &stats->tx_abort, "Aborted frames due to Excessive collisions"); +} + +#undef STE_SYSCTL_STAT_ADD32 +#undef STE_SYSCTL_STAT_ADD64 Modified: stable/8/sys/dev/ste/if_stereg.h ============================================================================== --- stable/8/sys/dev/ste/if_stereg.h Thu Jan 14 22:04:32 2010 (r202313) +++ stable/8/sys/dev/ste/if_stereg.h Thu Jan 14 22:15:51 2010 (r202314) @@ -63,6 +63,7 @@ #define STE_RX_DMABURST_THRESH 0x14 #define STE_RX_DMAURG_THRESH 0x15 #define STE_RX_DMAPOLL_PERIOD 0x16 +#define STE_COUNTDOWN 0x18 #define STE_DEBUGCTL 0x1A #define STE_ASICCTL 0x30 #define STE_EEPROM_DATA 0x34 @@ -75,7 +76,6 @@ #define STE_WAKE_EVENT 0x45 #define STE_TX_STATUS 0x46 #define STE_TX_FRAMEID 0x47 -#define STE_COUNTDOWN 0x48 #define STE_ISR_ACK 0x4A #define STE_IMR 0x4C #define STE_ISR 0x4E @@ -92,11 +92,25 @@ #define STE_MAR1 0x62 #define STE_MAR2 0x64 #define STE_MAR3 0x66 -#define STE_STATS 0x68 -#define STE_LATE_COLLS 0x75 -#define STE_MULTI_COLLS 0x76 -#define STE_SINGLE_COLLS 0x77 +#define STE_STAT_RX_OCTETS_LO 0x68 +#define STE_STAT_RX_OCTETS_HI 0x6A +#define STE_STAT_TX_OCTETS_LO 0x6C +#define STE_STAT_TX_OCTETS_HI 0x6E +#define STE_STAT_TX_FRAMES 0x70 +#define STE_STAT_RX_FRAMES 0x72 +#define STE_STAT_CARRIER_ERR 0x74 +#define STE_STAT_LATE_COLLS 0x75 +#define STE_STAT_MULTI_COLLS 0x76 +#define STE_STAT_SINGLE_COLLS 0x77 +#define STE_STAT_TX_DEFER 0x78 +#define STE_STAT_RX_LOST 0x79 +#define STE_STAT_TX_EXDEFER 0x7A +#define STE_STAT_TX_ABORT 0x7B +#define STE_STAT_TX_BCAST 0x7C +#define STE_STAT_RX_BCAST 0x7D +#define STE_STAT_TX_MCAST 0x7E +#define STE_STAT_RX_MCAST 0x7F #define STE_DMACTL_RXDMA_STOPPED 0x00000001 #define STE_DMACTL_TXDMA_CMPREQ 0x00000002 @@ -199,18 +213,6 @@ #define STE_ASICCTL_SOFTINTR 0x02000000 #define STE_ASICCTL_RESET_BUSY 0x04000000 -#define STE_ASICCTL1_GLOBAL_RESET 0x0001 -#define STE_ASICCTL1_RX_RESET 0x0002 -#define STE_ASICCTL1_TX_RESET 0x0004 -#define STE_ASICCTL1_DMA_RESET 0x0008 -#define STE_ASICCTL1_FIFO_RESET 0x0010 -#define STE_ASICCTL1_NETWORK_RESET 0x0020 -#define STE_ASICCTL1_HOST_RESET 0x0040 -#define STE_ASICCTL1_AUTOINIT_RESET 0x0080 -#define STE_ASICCTL1_EXTRESET_RESET 0x0100 -#define STE_ASICCTL1_SOFTINTR 0x0200 -#define STE_ASICCTL1_RESET_BUSY 0x0400 - #define STE_EECTL_ADDR 0x00FF #define STE_EECTL_OPCODE 0x0300 #define STE_EECTL_BUSY 0x1000 @@ -388,24 +390,23 @@ #define STE_PME_EN 0x0010 #define STE_PME_STATUS 0x8000 - -struct ste_stats { - uint32_t ste_rx_bytes; - uint32_t ste_tx_bytes; - uint16_t ste_tx_frames; - uint16_t ste_rx_frames; - uint8_t ste_carrsense_errs; - uint8_t ste_late_colls; - uint8_t ste_multi_colls; - uint8_t ste_single_colls; - uint8_t ste_tx_frames_defered; - uint8_t ste_rx_lost_frames; - uint8_t ste_tx_excess_defers; - uint8_t ste_tx_abort_excess_colls; - uint8_t ste_tx_bcast_frames; - uint8_t ste_rx_bcast_frames; - uint8_t ste_tx_mcast_frames; - uint8_t ste_rx_mcast_frames; +struct ste_hw_stats { + uint64_t rx_bytes; + uint32_t rx_frames; + uint32_t rx_bcast_frames; + uint32_t rx_mcast_frames; + uint32_t rx_lost_frames; + uint64_t tx_bytes; + uint32_t tx_frames; + uint32_t tx_bcast_frames; + uint32_t tx_mcast_frames; + uint32_t tx_carrsense_errs; + uint32_t tx_single_colls; + uint32_t tx_multi_colls; + uint32_t tx_late_colls; + uint32_t tx_frames_defered; + uint32_t tx_excess_defers; + uint32_t tx_abort; }; struct ste_frag { @@ -493,6 +494,12 @@ struct ste_desc_onefrag { #define STE_ADDR_LO(x) ((uint64_t)(x) & 0xFFFFFFFF) #define STE_ADDR_HI(x) ((uint64_t)(x) >> 32) +/* + * Since Tx status can hold up to 31 status bytes we should + * check Tx status before controller fills it up. Otherwise + * Tx MAC stalls. + */ +#define STE_TX_INTR_FRAMES 16 #define STE_TX_TIMEOUT 5 #define STE_TIMEOUT 1000 #define STE_MIN_FRAMELEN 60 @@ -566,6 +573,7 @@ struct ste_softc { struct ste_list_data ste_ldata; struct ste_chain_data ste_cdata; struct callout ste_callout; + struct ste_hw_stats ste_stats; struct mtx ste_mtx; }; From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:18:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F419D106566C; Thu, 14 Jan 2010 22:18:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1D3C8FC1A; Thu, 14 Jan 2010 22:18:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EMItwF062988; Thu, 14 Jan 2010 22:18:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EMItSo062985; Thu, 14 Jan 2010 22:18:55 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142218.o0EMItSo062985@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 22:18:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202315 - stable/7/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:18:56 -0000 Author: yongari Date: Thu Jan 14 22:18:55 2010 New Revision: 202315 URL: http://svn.freebsd.org/changeset/base/202315 Log: MFC r200904-200908,200910-200913 r200904: Don't reinitialize controller if driver is already running. This reduces number of link state UP/DOWN changes. r200905: Reimplement controller reset. Datasheet says full reset takes about 1ms. Since we switched to memory register mapping make sure to flush PCI posted write by reading the register again. While I'm here add additional delays in loop while driver waits the completion of the reset. r200906: Overhaul RX filter programming. o Let RX filter handler program promiscuous/multicast filter as well as broadcasting. o Remove unnecessary register access. o Simplify ioctl handler and have set_rxfilter to handle IFF_PROMISC and IFF_ALLMULTI change instead of directly programming the controller. o Removed unnecessary error variable reinitialization in ioctl handler. o Add IFF_DRV_RUNNING check before programming multicast filter. o Configure maximum allowed frame length before enabling MAC. Datasheet didn't say the exact ordering of programming sequence but it looks more natural to set maximum allowed frame length first prior to enabling controller. r200907: Don't report link status if driver is not running. r200908: Report the correct result of mii_mediachg(). Previously it always used to return success without respect to the result. While I'm here use mii_mediachg() in ste_init_locked which allows driver to use currently configured media. ste_ifmedia_upd() is supposed to be called whenever user changes current media settings. r200910: Implement hardware MAC statistics counter support. The counters could be accessed with dev.ste.0.stats sysctl node. r200911: Remove unused duplicated register definition. It seems the definition was made to access STE_ASICCTL register as 16bits but ste(4) always access the register as 32bits so it was never used before. r200912: Correct STE_COUNTDOWN register offset. The datasheet was wrong. r200913: We don't need to generate DMA complete interrupt for every transmitted frames. So request interrupt for every 16th frames. Due to the limitation of hardware we can't suppress the interrupt as driver should have to check TX status register. The TX status register can store up to 31 TX status so driver can't send more than 31 frames without reading TX status register. With this change controller would not generate TX completion interrupt for every frame, so reclaim transmitted frames in ste_tick(). Modified: stable/7/sys/dev/ste/if_ste.c stable/7/sys/dev/ste/if_stereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ste/if_ste.c ============================================================================== --- stable/7/sys/dev/ste/if_ste.c Thu Jan 14 22:15:51 2010 (r202314) +++ stable/7/sys/dev/ste/if_ste.c Thu Jan 14 22:18:55 2010 (r202315) @@ -103,7 +103,6 @@ static int ste_eeprom_wait(struct ste_s static int ste_encap(struct ste_softc *, struct mbuf **, struct ste_chain *); static int ste_ifmedia_upd(struct ifnet *); -static void ste_ifmedia_upd_locked(struct ifnet *); static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *); static void ste_init(void *); static void ste_init_locked(struct ste_softc *); @@ -123,11 +122,13 @@ static int ste_read_eeprom(struct ste_so static void ste_reset(struct ste_softc *); static void ste_restart_tx(struct ste_softc *); static void ste_rxeof(struct ste_softc *, int); -static void ste_setmulti(struct ste_softc *); +static void ste_rxfilter(struct ste_softc *); static void ste_start(struct ifnet *); static void ste_start_locked(struct ifnet *); +static void ste_stats_clear(struct ste_softc *); static void ste_stats_update(struct ste_softc *); static void ste_stop(struct ste_softc *); +static void ste_sysctl_node(struct ste_softc *); static void ste_tick(void *); static void ste_txeoc(struct ste_softc *); static void ste_txeof(struct ste_softc *); @@ -449,31 +450,21 @@ static int ste_ifmedia_upd(struct ifnet *ifp) { struct ste_softc *sc; + struct mii_data *mii; + struct mii_softc *miisc; + int error; sc = ifp->if_softc; STE_LOCK(sc); - ste_ifmedia_upd_locked(ifp); - STE_UNLOCK(sc); - - return (0); -} - -static void -ste_ifmedia_upd_locked(struct ifnet *ifp) -{ - struct ste_softc *sc; - struct mii_data *mii; - - sc = ifp->if_softc; - STE_LOCK_ASSERT(sc); mii = device_get_softc(sc->ste_miibus); - sc->ste_flags &= ~STE_FLAG_LINK; if (mii->mii_instance) { - struct mii_softc *miisc; LIST_FOREACH(miisc, &mii->mii_phys, mii_list) mii_phy_reset(miisc); } - mii_mediachg(mii); + error = mii_mediachg(mii); + STE_UNLOCK(sc); + + return (error); } static void @@ -486,6 +477,10 @@ ste_ifmedia_sts(struct ifnet *ifp, struc mii = device_get_softc(sc->ste_miibus); STE_LOCK(sc); + if ((ifp->if_flags & IFF_UP) == 0) { + STE_UNLOCK(sc); + return; + } mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; @@ -563,27 +558,33 @@ ste_read_eeprom(struct ste_softc *sc, ca } static void -ste_setmulti(struct ste_softc *sc) +ste_rxfilter(struct ste_softc *sc) { struct ifnet *ifp; struct ifmultiaddr *ifma; uint32_t hashes[2] = { 0, 0 }; + uint8_t rxcfg; int h; + STE_LOCK_ASSERT(sc); + ifp = sc->ste_ifp; - if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { - STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_ALLMULTI); - STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_MULTIHASH); - return; + rxcfg = CSR_READ_1(sc, STE_RX_MODE); + rxcfg |= STE_RXMODE_UNICAST; + rxcfg &= ~(STE_RXMODE_ALLMULTI | STE_RXMODE_MULTIHASH | + STE_RXMODE_BROADCAST | STE_RXMODE_PROMISC); + if (ifp->if_flags & IFF_BROADCAST) + rxcfg |= STE_RXMODE_BROADCAST; + if ((ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) != 0) { + if ((ifp->if_flags & IFF_ALLMULTI) != 0) + rxcfg |= STE_RXMODE_ALLMULTI; + if ((ifp->if_flags & IFF_PROMISC) != 0) + rxcfg |= STE_RXMODE_PROMISC; + goto chipit; } - /* first, zot all the existing hash bits */ - CSR_WRITE_2(sc, STE_MAR0, 0); - CSR_WRITE_2(sc, STE_MAR1, 0); - CSR_WRITE_2(sc, STE_MAR2, 0); - CSR_WRITE_2(sc, STE_MAR3, 0); - - /* now program new ones */ + rxcfg |= STE_RXMODE_MULTIHASH; + /* Now program new ones. */ IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) @@ -597,12 +598,13 @@ ste_setmulti(struct ste_softc *sc) } IF_ADDR_UNLOCK(ifp); +chipit: CSR_WRITE_2(sc, STE_MAR0, hashes[0] & 0xFFFF); CSR_WRITE_2(sc, STE_MAR1, (hashes[0] >> 16) & 0xFFFF); CSR_WRITE_2(sc, STE_MAR2, hashes[1] & 0xFFFF); CSR_WRITE_2(sc, STE_MAR3, (hashes[1] >> 16) & 0xFFFF); - STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_ALLMULTI); - STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_MULTIHASH); + CSR_WRITE_1(sc, STE_RX_MODE, rxcfg); + CSR_READ_1(sc, STE_RX_MODE); } #ifdef DEVICE_POLLING @@ -640,8 +642,10 @@ ste_poll_locked(struct ifnet *ifp, enum if (status & STE_ISR_STATS_OFLOW) ste_stats_update(sc); - if (status & STE_ISR_HOSTERR) + if (status & STE_ISR_HOSTERR) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; ste_init_locked(sc); + } } } #endif /* DEVICE_POLLING */ @@ -688,8 +692,10 @@ ste_intr(void *xsc) if (status & STE_ISR_STATS_OFLOW) ste_stats_update(sc); - if (status & STE_ISR_HOSTERR) + if (status & STE_ISR_HOSTERR) { ste_init_locked(sc); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + } } /* Re-enable interrupts */ @@ -826,6 +832,7 @@ ste_txeoc(struct ste_softc *sc) STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_STALL); ste_wait(sc); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; ste_init_locked(sc); break; } @@ -864,6 +871,13 @@ ste_tick(void *arg) */ if ((sc->ste_flags & STE_FLAG_LINK) == 0) ste_miibus_statchg(sc->ste_dev); + /* + * Because we are not generating Tx completion + * interrupt for every frame, reclaim transmitted + * buffers here. + */ + ste_txeof(sc); + ste_txeoc(sc); ste_stats_update(sc); ste_watchdog(sc); callout_reset(&sc->ste_callout, hz, ste_tick, sc); @@ -912,16 +926,74 @@ ste_txeof(struct ste_softc *sc) } static void +ste_stats_clear(struct ste_softc *sc) +{ + + STE_LOCK_ASSERT(sc); + + /* Rx stats. */ + CSR_READ_2(sc, STE_STAT_RX_OCTETS_LO); + CSR_READ_2(sc, STE_STAT_RX_OCTETS_HI); + CSR_READ_2(sc, STE_STAT_RX_FRAMES); + CSR_READ_1(sc, STE_STAT_RX_BCAST); + CSR_READ_1(sc, STE_STAT_RX_MCAST); + CSR_READ_1(sc, STE_STAT_RX_LOST); + /* Tx stats. */ + CSR_READ_2(sc, STE_STAT_TX_OCTETS_LO); + CSR_READ_2(sc, STE_STAT_TX_OCTETS_HI); + CSR_READ_2(sc, STE_STAT_TX_FRAMES); + CSR_READ_1(sc, STE_STAT_TX_BCAST); + CSR_READ_1(sc, STE_STAT_TX_MCAST); + CSR_READ_1(sc, STE_STAT_CARRIER_ERR); + CSR_READ_1(sc, STE_STAT_SINGLE_COLLS); + CSR_READ_1(sc, STE_STAT_MULTI_COLLS); + CSR_READ_1(sc, STE_STAT_LATE_COLLS); + CSR_READ_1(sc, STE_STAT_TX_DEFER); + CSR_READ_1(sc, STE_STAT_TX_EXDEFER); + CSR_READ_1(sc, STE_STAT_TX_ABORT); +} + +static void ste_stats_update(struct ste_softc *sc) { struct ifnet *ifp; + struct ste_hw_stats *stats; + uint32_t val; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; - ifp->if_collisions += CSR_READ_1(sc, STE_LATE_COLLS) - + CSR_READ_1(sc, STE_MULTI_COLLS) - + CSR_READ_1(sc, STE_SINGLE_COLLS); + stats = &sc->ste_stats; + /* Rx stats. */ + val = (uint32_t)CSR_READ_2(sc, STE_STAT_RX_OCTETS_LO) | + ((uint32_t)CSR_READ_2(sc, STE_STAT_RX_OCTETS_HI)) << 16; + val &= 0x000FFFFF; + stats->rx_bytes += val; + stats->rx_frames += CSR_READ_2(sc, STE_STAT_RX_FRAMES); + stats->rx_bcast_frames += CSR_READ_1(sc, STE_STAT_RX_BCAST); + stats->rx_mcast_frames += CSR_READ_1(sc, STE_STAT_RX_MCAST); + stats->rx_lost_frames += CSR_READ_1(sc, STE_STAT_RX_LOST); + /* Tx stats. */ + val = (uint32_t)CSR_READ_2(sc, STE_STAT_TX_OCTETS_LO) | + ((uint32_t)CSR_READ_2(sc, STE_STAT_TX_OCTETS_HI)) << 16; + val &= 0x000FFFFF; + stats->tx_bytes += val; + stats->tx_frames += CSR_READ_2(sc, STE_STAT_TX_FRAMES); + stats->tx_bcast_frames += CSR_READ_1(sc, STE_STAT_TX_BCAST); + stats->tx_mcast_frames += CSR_READ_1(sc, STE_STAT_TX_MCAST); + stats->tx_carrsense_errs += CSR_READ_1(sc, STE_STAT_CARRIER_ERR); + val = CSR_READ_1(sc, STE_STAT_SINGLE_COLLS); + stats->tx_single_colls += val; + ifp->if_collisions += val; + val = CSR_READ_1(sc, STE_STAT_MULTI_COLLS); + stats->tx_multi_colls += val; + ifp->if_collisions += val; + val += CSR_READ_1(sc, STE_STAT_LATE_COLLS); + stats->tx_late_colls += val; + ifp->if_collisions += val; + stats->tx_frames_defered += CSR_READ_1(sc, STE_STAT_TX_DEFER); + stats->tx_excess_defers += CSR_READ_1(sc, STE_STAT_TX_EXDEFER); + stats->tx_abort += CSR_READ_1(sc, STE_STAT_TX_ABORT); } /* @@ -1021,6 +1093,7 @@ ste_attach(device_t dev) error = ENXIO;; goto fail; } + ste_sysctl_node(sc); if ((error = ste_dma_alloc(sc)) != 0) goto fail; @@ -1537,10 +1610,15 @@ static void ste_init_locked(struct ste_softc *sc) { struct ifnet *ifp; + struct mii_data *mii; int i; STE_LOCK_ASSERT(sc); ifp = sc->ste_ifp; + mii = device_get_softc(sc->ste_miibus); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; ste_stop(sc); /* Reset the chip to a known state. */ @@ -1576,24 +1654,11 @@ ste_init_locked(struct ste_softc *sc) /* Set the TX reclaim threshold. */ CSR_WRITE_1(sc, STE_TX_RECLAIM_THRESH, (STE_PACKET_SIZE >> 4)); - /* Set up the RX filter. */ - CSR_WRITE_1(sc, STE_RX_MODE, STE_RXMODE_UNICAST); - - /* If we want promiscuous mode, set the allframes bit. */ - if (ifp->if_flags & IFF_PROMISC) { - STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_PROMISC); - } else { - STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_PROMISC); - } - - /* Set capture broadcast bit to accept broadcast frames. */ - if (ifp->if_flags & IFF_BROADCAST) { - STE_SETBIT1(sc, STE_RX_MODE, STE_RXMODE_BROADCAST); - } else { - STE_CLRBIT1(sc, STE_RX_MODE, STE_RXMODE_BROADCAST); - } + /* Accept VLAN length packets */ + CSR_WRITE_2(sc, STE_MAX_FRAMELEN, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); - ste_setmulti(sc); + /* Set up the RX filter. */ + ste_rxfilter(sc); /* Load the address of the RX list. */ STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_RXDMA_STALL); @@ -1622,6 +1687,8 @@ ste_init_locked(struct ste_softc *sc) /* Enable stats counters. */ STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_STATS_ENABLE); + /* Clear stats counters. */ + ste_stats_clear(sc); CSR_WRITE_2(sc, STE_ISR, 0xFFFF); #ifdef DEVICE_POLLING @@ -1633,10 +1700,9 @@ ste_init_locked(struct ste_softc *sc) /* Enable interrupts. */ CSR_WRITE_2(sc, STE_IMR, STE_INTRS); - /* Accept VLAN length packets */ - CSR_WRITE_2(sc, STE_MAX_FRAMELEN, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); - - ste_ifmedia_upd_locked(ifp); + sc->ste_flags &= ~STE_FLAG_LINK; + /* Switch to the current media. */ + mii_mediachg(mii); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -1717,20 +1783,27 @@ ste_stop(struct ste_softc *sc) static void ste_reset(struct ste_softc *sc) { + uint32_t ctl; int i; - STE_SETBIT4(sc, STE_ASICCTL, - STE_ASICCTL_GLOBAL_RESET|STE_ASICCTL_RX_RESET| - STE_ASICCTL_TX_RESET|STE_ASICCTL_DMA_RESET| - STE_ASICCTL_FIFO_RESET|STE_ASICCTL_NETWORK_RESET| - STE_ASICCTL_AUTOINIT_RESET|STE_ASICCTL_HOST_RESET| - STE_ASICCTL_EXTRESET_RESET); - - DELAY(100000); + ctl = CSR_READ_4(sc, STE_ASICCTL); + ctl |= STE_ASICCTL_GLOBAL_RESET | STE_ASICCTL_RX_RESET | + STE_ASICCTL_TX_RESET | STE_ASICCTL_DMA_RESET | + STE_ASICCTL_FIFO_RESET | STE_ASICCTL_NETWORK_RESET | + STE_ASICCTL_AUTOINIT_RESET |STE_ASICCTL_HOST_RESET | + STE_ASICCTL_EXTRESET_RESET; + CSR_WRITE_4(sc, STE_ASICCTL, ctl); + CSR_READ_4(sc, STE_ASICCTL); + /* + * Due to the need of accessing EEPROM controller can take + * up to 1ms to complete the global reset. + */ + DELAY(1000); for (i = 0; i < STE_TIMEOUT; i++) { if (!(CSR_READ_4(sc, STE_ASICCTL) & STE_ASICCTL_RESET_BUSY)) break; + DELAY(10); } if (i == STE_TIMEOUT) @@ -1771,39 +1844,24 @@ ste_ioctl(struct ifnet *ifp, u_long comm switch (command) { case SIOCSIFFLAGS: STE_LOCK(sc); - if (ifp->if_flags & IFF_UP) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING && - ifp->if_flags & IFF_PROMISC && - !(sc->ste_if_flags & IFF_PROMISC)) { - STE_SETBIT1(sc, STE_RX_MODE, - STE_RXMODE_PROMISC); - } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && - !(ifp->if_flags & IFF_PROMISC) && - sc->ste_if_flags & IFF_PROMISC) { - STE_CLRBIT1(sc, STE_RX_MODE, - STE_RXMODE_PROMISC); - } - if (ifp->if_drv_flags & IFF_DRV_RUNNING && - (ifp->if_flags ^ sc->ste_if_flags) & IFF_ALLMULTI) - ste_setmulti(sc); - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - sc->ste_tx_thresh = STE_TXSTART_THRESH; + if ((ifp->if_flags & IFF_UP) != 0) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 && + ((ifp->if_flags ^ sc->ste_if_flags) & + (IFF_PROMISC | IFF_ALLMULTI)) != 0) + ste_rxfilter(sc); + else ste_init_locked(sc); - } - } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - ste_stop(sc); - } + } else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + ste_stop(sc); sc->ste_if_flags = ifp->if_flags; STE_UNLOCK(sc); - error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: STE_LOCK(sc); - ste_setmulti(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + ste_rxfilter(sc); STE_UNLOCK(sc); - error = 0; break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: @@ -1896,7 +1954,11 @@ ste_encap(struct ste_softc *sc, struct m * Tx descriptors here. Otherwise we race with controller. */ desc->ste_next = 0; - desc->ste_ctl = htole32(STE_TXCTL_ALIGN_DIS | STE_TXCTL_DMAINTR); + if ((sc->ste_cdata.ste_tx_prod % STE_TX_INTR_FRAMES) == 0) + desc->ste_ctl = htole32(STE_TXCTL_ALIGN_DIS | + STE_TXCTL_DMAINTR); + else + desc->ste_ctl = htole32(STE_TXCTL_ALIGN_DIS); txc->ste_mbuf = *m_head; STE_INC(sc->ste_cdata.ste_tx_prod, STE_TX_LIST_CNT); sc->ste_cdata.ste_tx_cnt++; @@ -1999,6 +2061,7 @@ ste_watchdog(struct ste_softc *sc) ste_txeof(sc); ste_txeoc(sc); ste_rxeof(sc, -1); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; ste_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) @@ -2018,3 +2081,70 @@ ste_shutdown(device_t dev) return (0); } + +#define STE_SYSCTL_STAT_ADD32(c, h, n, p, d) \ + SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) +#define STE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ + SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) + +static void +ste_sysctl_node(struct ste_softc *sc) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *child, *parent; + struct sysctl_oid *tree; + struct ste_hw_stats *stats; + + stats = &sc->ste_stats; + ctx = device_get_sysctl_ctx(sc->ste_dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->ste_dev)); + + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, + NULL, "STE statistics"); + parent = SYSCTL_CHILDREN(tree); + + /* Rx statistics. */ + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "rx", CTLFLAG_RD, + NULL, "Rx MAC statistics"); + child = SYSCTL_CHILDREN(tree); + STE_SYSCTL_STAT_ADD64(ctx, child, "good_octets", + &stats->rx_bytes, "Good octets"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_frames", + &stats->rx_frames, "Good frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_bcast_frames", + &stats->rx_bcast_frames, "Good broadcast frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_mcast_frames", + &stats->rx_mcast_frames, "Good multicast frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "lost_frames", + &stats->rx_lost_frames, "Lost frames"); + + /* Tx statistics. */ + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "tx", CTLFLAG_RD, + NULL, "Tx MAC statistics"); + child = SYSCTL_CHILDREN(tree); + STE_SYSCTL_STAT_ADD64(ctx, child, "good_octets", + &stats->tx_bytes, "Good octets"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_frames", + &stats->tx_frames, "Good frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_bcast_frames", + &stats->tx_bcast_frames, "Good broadcast frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "good_mcast_frames", + &stats->tx_mcast_frames, "Good multicast frames"); + STE_SYSCTL_STAT_ADD32(ctx, child, "carrier_errs", + &stats->tx_carrsense_errs, "Carrier sense errors"); + STE_SYSCTL_STAT_ADD32(ctx, child, "single_colls", + &stats->tx_single_colls, "Single collisions"); + STE_SYSCTL_STAT_ADD32(ctx, child, "multi_colls", + &stats->tx_multi_colls, "Multiple collisions"); + STE_SYSCTL_STAT_ADD32(ctx, child, "late_colls", + &stats->tx_late_colls, "Late collisions"); + STE_SYSCTL_STAT_ADD32(ctx, child, "defers", + &stats->tx_frames_defered, "Frames with deferrals"); + STE_SYSCTL_STAT_ADD32(ctx, child, "excess_defers", + &stats->tx_excess_defers, "Frames with excessive derferrals"); + STE_SYSCTL_STAT_ADD32(ctx, child, "abort", + &stats->tx_abort, "Aborted frames due to Excessive collisions"); +} + +#undef STE_SYSCTL_STAT_ADD32 +#undef STE_SYSCTL_STAT_ADD64 Modified: stable/7/sys/dev/ste/if_stereg.h ============================================================================== --- stable/7/sys/dev/ste/if_stereg.h Thu Jan 14 22:15:51 2010 (r202314) +++ stable/7/sys/dev/ste/if_stereg.h Thu Jan 14 22:18:55 2010 (r202315) @@ -63,6 +63,7 @@ #define STE_RX_DMABURST_THRESH 0x14 #define STE_RX_DMAURG_THRESH 0x15 #define STE_RX_DMAPOLL_PERIOD 0x16 +#define STE_COUNTDOWN 0x18 #define STE_DEBUGCTL 0x1A #define STE_ASICCTL 0x30 #define STE_EEPROM_DATA 0x34 @@ -75,7 +76,6 @@ #define STE_WAKE_EVENT 0x45 #define STE_TX_STATUS 0x46 #define STE_TX_FRAMEID 0x47 -#define STE_COUNTDOWN 0x48 #define STE_ISR_ACK 0x4A #define STE_IMR 0x4C #define STE_ISR 0x4E @@ -92,11 +92,25 @@ #define STE_MAR1 0x62 #define STE_MAR2 0x64 #define STE_MAR3 0x66 -#define STE_STATS 0x68 -#define STE_LATE_COLLS 0x75 -#define STE_MULTI_COLLS 0x76 -#define STE_SINGLE_COLLS 0x77 +#define STE_STAT_RX_OCTETS_LO 0x68 +#define STE_STAT_RX_OCTETS_HI 0x6A +#define STE_STAT_TX_OCTETS_LO 0x6C +#define STE_STAT_TX_OCTETS_HI 0x6E +#define STE_STAT_TX_FRAMES 0x70 +#define STE_STAT_RX_FRAMES 0x72 +#define STE_STAT_CARRIER_ERR 0x74 +#define STE_STAT_LATE_COLLS 0x75 +#define STE_STAT_MULTI_COLLS 0x76 +#define STE_STAT_SINGLE_COLLS 0x77 +#define STE_STAT_TX_DEFER 0x78 +#define STE_STAT_RX_LOST 0x79 +#define STE_STAT_TX_EXDEFER 0x7A +#define STE_STAT_TX_ABORT 0x7B +#define STE_STAT_TX_BCAST 0x7C +#define STE_STAT_RX_BCAST 0x7D +#define STE_STAT_TX_MCAST 0x7E +#define STE_STAT_RX_MCAST 0x7F #define STE_DMACTL_RXDMA_STOPPED 0x00000001 #define STE_DMACTL_TXDMA_CMPREQ 0x00000002 @@ -199,18 +213,6 @@ #define STE_ASICCTL_SOFTINTR 0x02000000 #define STE_ASICCTL_RESET_BUSY 0x04000000 -#define STE_ASICCTL1_GLOBAL_RESET 0x0001 -#define STE_ASICCTL1_RX_RESET 0x0002 -#define STE_ASICCTL1_TX_RESET 0x0004 -#define STE_ASICCTL1_DMA_RESET 0x0008 -#define STE_ASICCTL1_FIFO_RESET 0x0010 -#define STE_ASICCTL1_NETWORK_RESET 0x0020 -#define STE_ASICCTL1_HOST_RESET 0x0040 -#define STE_ASICCTL1_AUTOINIT_RESET 0x0080 -#define STE_ASICCTL1_EXTRESET_RESET 0x0100 -#define STE_ASICCTL1_SOFTINTR 0x0200 -#define STE_ASICCTL1_RESET_BUSY 0x0400 - #define STE_EECTL_ADDR 0x00FF #define STE_EECTL_OPCODE 0x0300 #define STE_EECTL_BUSY 0x1000 @@ -388,24 +390,23 @@ #define STE_PME_EN 0x0010 #define STE_PME_STATUS 0x8000 - -struct ste_stats { - uint32_t ste_rx_bytes; - uint32_t ste_tx_bytes; - uint16_t ste_tx_frames; - uint16_t ste_rx_frames; - uint8_t ste_carrsense_errs; - uint8_t ste_late_colls; - uint8_t ste_multi_colls; - uint8_t ste_single_colls; - uint8_t ste_tx_frames_defered; - uint8_t ste_rx_lost_frames; - uint8_t ste_tx_excess_defers; - uint8_t ste_tx_abort_excess_colls; - uint8_t ste_tx_bcast_frames; - uint8_t ste_rx_bcast_frames; - uint8_t ste_tx_mcast_frames; - uint8_t ste_rx_mcast_frames; +struct ste_hw_stats { + uint64_t rx_bytes; + uint32_t rx_frames; + uint32_t rx_bcast_frames; + uint32_t rx_mcast_frames; + uint32_t rx_lost_frames; + uint64_t tx_bytes; + uint32_t tx_frames; + uint32_t tx_bcast_frames; + uint32_t tx_mcast_frames; + uint32_t tx_carrsense_errs; + uint32_t tx_single_colls; + uint32_t tx_multi_colls; + uint32_t tx_late_colls; + uint32_t tx_frames_defered; + uint32_t tx_excess_defers; + uint32_t tx_abort; }; struct ste_frag { @@ -493,6 +494,12 @@ struct ste_desc_onefrag { #define STE_ADDR_LO(x) ((uint64_t)(x) & 0xFFFFFFFF) #define STE_ADDR_HI(x) ((uint64_t)(x) >> 32) +/* + * Since Tx status can hold up to 31 status bytes we should + * check Tx status before controller fills it up. Otherwise + * Tx MAC stalls. + */ +#define STE_TX_INTR_FRAMES 16 #define STE_TX_TIMEOUT 5 #define STE_TIMEOUT 1000 #define STE_MIN_FRAMELEN 60 @@ -566,6 +573,7 @@ struct ste_softc { struct ste_list_data ste_ldata; struct ste_chain_data ste_cdata; struct callout ste_callout; + struct ste_hw_stats ste_stats; struct mtx ste_mtx; }; From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:21:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8CE6106566C; Thu, 14 Jan 2010 22:21:20 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8FDF8FC0C; Thu, 14 Jan 2010 22:21:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EMLKi8063553; Thu, 14 Jan 2010 22:21:20 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EMLKYO063551; Thu, 14 Jan 2010 22:21:20 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001142221.o0EMLKYO063551@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 Jan 2010 22:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202316 - head/usr.bin/wtmpcvt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:21:20 -0000 Author: ed Date: Thu Jan 14 22:21:20 2010 New Revision: 202316 URL: http://svn.freebsd.org/changeset/base/202316 Log: Fix a typo: accouting -> accounting. Modified: head/usr.bin/wtmpcvt/wtmpcvt.1 Modified: head/usr.bin/wtmpcvt/wtmpcvt.1 ============================================================================== --- head/usr.bin/wtmpcvt/wtmpcvt.1 Thu Jan 14 22:18:55 2010 (r202315) +++ head/usr.bin/wtmpcvt/wtmpcvt.1 Thu Jan 14 22:21:20 2010 (r202316) @@ -41,7 +41,7 @@ utility converts traditional .Pa wtmp user accounting database files to the same format that is used by .Pa /var/log/utx.log . -This makes it possible to view their contents using existing accouting +This makes it possible to view their contents using existing accounting utilities, such as .Xr last 1 and From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:21:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13CF11065694; Thu, 14 Jan 2010 22:21:44 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5EEA8FC1A; Thu, 14 Jan 2010 22:21:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EMLh2Q063703; Thu, 14 Jan 2010 22:21:43 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EMLhOb063699; Thu, 14 Jan 2010 22:21:43 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001142221.o0EMLhOb063699@svn.freebsd.org> From: Christian Brueffer Date: Thu, 14 Jan 2010 22:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202317 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:21:44 -0000 Author: brueffer Date: Thu Jan 14 22:21:43 2010 New Revision: 202317 URL: http://svn.freebsd.org/changeset/base/202317 Log: Add manpages for ipwfw(4) and iwifw(4), based on iwnfw(4). MFC after: 2 weeks Added: head/share/man/man4/ipwfw.4 (contents, props changed) head/share/man/man4/iwifw.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Jan 14 22:21:20 2010 (r202316) +++ head/share/man/man4/Makefile Thu Jan 14 22:21:43 2010 (r202317) @@ -156,10 +156,12 @@ MAN= aac.4 \ ips.4 \ ipsec.4 \ ipw.4 \ + ipwfw.4 \ iscsi_initiator.4 \ isp.4 \ ispfw.4 \ iwi.4 \ + iwifw.4 \ iwn.4 \ iwnfw.4 \ ixgb.4 \ Added: head/share/man/man4/ipwfw.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ipwfw.4 Thu Jan 14 22:21:43 2010 (r202317) @@ -0,0 +1,75 @@ +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting +.\" 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. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 14, 2010 +.Dt IPWFW 4 +.Os +.Sh NAME +.Nm ipwfw +.Nd "Firmware Module for Intel PRO/Wireless 2100 driver" +.Sh SYNOPSIS +To compile this module into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ipwfw" +.Ed +.Pp +This will include three firmware images inside the kernel. +If you want to pick only the firmware image for the mode you want to operate +your network adapter in choose one of the following: +.Bd -ragged -offset indent +.Cd "device ipwbssfw" +.Cd "device ipwibssfw" +.Cd "device ipwmonitorfw" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +ipw_bss_load="YES" +ipw_ibss_load="YES" +ipw_monitor_load="YES" +.Ed +.Sh DESCRIPTION +This module provides access to firmware sets for the +Intel PRO/Wireless 2100 series of IEEE 802.11 adapters. +It may be statically linked into the kernel, or loaded as a module. +.Pp +For the loaded firmware to be enabled for use the license at +.Pa /usr/share/doc/legal/intel_ipw/LICENSE +must be agreed to by adding the following line to +.Xr loader.conf 5 : +.Pp +.Dl "legal.intel_ipw.license_ack=1" +.Sh FILES +.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw/LICENSE" -compact +.It Pa /usr/share/doc/legal/intel_ipw/LICENSE +.Nm +firmware license +.El +.Sh SEE ALSO +.Xr ipw 4 , +.Xr firmware 9 Added: head/share/man/man4/iwifw.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/iwifw.4 Thu Jan 14 22:21:43 2010 (r202317) @@ -0,0 +1,75 @@ +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting +.\" 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. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 14, 2010 +.Dt IWIFW 4 +.Os +.Sh NAME +.Nm iwifw +.Nd "Firmware Module for Intel PRO/Wireless 2200BG/2225BG/2915ABG driver" +.Sh SYNOPSIS +To compile this module into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device iwifw" +.Ed +.Pp +This will include three firmware images inside the kernel. +If you want to pick only the firmware image for the mode you want to operate +your network adapter in choose one of the following: +.Bd -ragged -offset indent +.Cd "device iwibssfw" +.Cd "device iwiibssfw" +.Cd "device iwimonitorfw" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +iwi_bss_load="YES" +iwi_ibss_load="YES" +iwi_monitor_load="YES" +.Ed +.Sh DESCRIPTION +This module provides access to firmware sets for the +Intel PRO/Wireless 2200BG/2225BG/2915ABG series of IEEE 802.11 adapters. +It may be statically linked into the kernel, or loaded as a module. +.Pp +For the loaded firmware to be enabled for use the license at +.Pa /usr/share/doc/legal/intel_iwi/LICENSE +must be agreed to by adding the following line to +.Xr loader.conf 5 : +.Pp +.Dl "legal.intel_iwi.license_ack=1" +.Sh FILES +.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi/LICENSE" -compact +.It Pa /usr/share/doc/legal/intel_iwi/LICENSE +.Nm +firmware license +.El +.Sh SEE ALSO +.Xr iwi 4 , +.Xr firmware 9 From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:26:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9D5F106566B; Thu, 14 Jan 2010 22:26:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7B998FC1C; Thu, 14 Jan 2010 22:26:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EMQqsB065003; Thu, 14 Jan 2010 22:26:52 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EMQqwk065000; Thu, 14 Jan 2010 22:26:52 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142226.o0EMQqwk065000@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 22:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202318 - stable/8/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:26:52 -0000 Author: yongari Date: Thu Jan 14 22:26:52 2010 New Revision: 202318 URL: http://svn.freebsd.org/changeset/base/202318 Log: MFC r200950,200955,200965-200966,201767-201768 r200950: Implement RX interrupt moderation using one-shot timer interrupt. Unlike TX interrupt, ST201 does not provide any mechanism to suppress RX interrupts. ste(4) can generate more than 70k RX interrupts under heavy RX traffics such that these excessive interrupts make system useless to process other useful things. Maybe this was the major reason why polling support code was introduced to ste(4). The STE_COUNTDOWN register provides a programmable counter that will generate an interrupt upon its expiration. We program STE_DMACTL register to use 3.2us clock rate to drive the counter register. Whenever ste(4) serves RX interrupt, the driver rearm the timer to expire after STE_IM_RX_TIMER_DEFAULT time and disables further generation of RX interrupts. This trick seems to work well and ste(4) generates less than 8k RX interrupts even under 64 bytes UDP torture test. Combined with TX interrupts, the total number of interrupts are less than 10k which looks reasonable on heavily loaded controller. The default RX interrupt moderation time is 150us. Users can change the value at any time with dev.ste.%d.int_rx_mod sysctl node. Setting it 0 effectively disables the RX interrupt moderation feature. Now we have both TX/RX interrupt moderation code so remove loop of interrupt handler which resulted in sub-optimal performance as well as more register accesses. r200955: Add suspend/resume support as well as basic WOL. While I'm here simplify SIOCSIFCAP handler. r200965: Update if_iqdrops in case of RX buffer allocation failure. r200966: ether_ifattach sets if_mtu, remove unnecessary code. r201767: Fix EEPROM access code to return data in host byte order. EEPROM on ST201 always returns 16bits data with little endian format so conversion to host order is required. This change fixes inversed ethernet address on sparc64. r201768: Make sure to store dma address of RX buffer in little endian form. This fixes the last bug which keeps ste(4) from working on sparc64. Modified: stable/8/sys/dev/ste/if_ste.c stable/8/sys/dev/ste/if_stereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ste/if_ste.c ============================================================================== --- stable/8/sys/dev/ste/if_ste.c Thu Jan 14 22:21:43 2010 (r202317) +++ stable/8/sys/dev/ste/if_ste.c Thu Jan 14 22:26:52 2010 (r202318) @@ -94,7 +94,9 @@ static struct ste_type ste_devs[] = { static int ste_attach(device_t); static int ste_detach(device_t); static int ste_probe(device_t); +static int ste_resume(device_t); static int ste_shutdown(device_t); +static int ste_suspend(device_t); static int ste_dma_alloc(struct ste_softc *); static void ste_dma_free(struct ste_softc *); @@ -118,11 +120,12 @@ static int ste_miibus_readreg(device_t, static void ste_miibus_statchg(device_t); static int ste_miibus_writereg(device_t, int, int, int); static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *); -static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); +static int ste_read_eeprom(struct ste_softc *, uint16_t *, int, int); static void ste_reset(struct ste_softc *); static void ste_restart_tx(struct ste_softc *); static int ste_rxeof(struct ste_softc *, int); static void ste_rxfilter(struct ste_softc *); +static void ste_setwol(struct ste_softc *); static void ste_start(struct ifnet *); static void ste_start_locked(struct ifnet *); static void ste_stats_clear(struct ste_softc *); @@ -141,6 +144,8 @@ static device_method_t ste_methods[] = { DEVMETHOD(device_attach, ste_attach), DEVMETHOD(device_detach, ste_detach), DEVMETHOD(device_shutdown, ste_shutdown), + DEVMETHOD(device_suspend, ste_suspend), + DEVMETHOD(device_resume, ste_resume), /* bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), @@ -533,9 +538,8 @@ ste_eeprom_wait(struct ste_softc *sc) * data is stored in the EEPROM in network byte order. */ static int -ste_read_eeprom(struct ste_softc *sc, caddr_t dest, int off, int cnt, int swap) +ste_read_eeprom(struct ste_softc *sc, uint16_t *dest, int off, int cnt) { - uint16_t word, *ptr; int err = 0, i; if (ste_eeprom_wait(sc)) @@ -546,12 +550,8 @@ ste_read_eeprom(struct ste_softc *sc, ca err = ste_eeprom_wait(sc); if (err) break; - word = CSR_READ_2(sc, STE_EEPROM_DATA); - ptr = (uint16_t *)(dest + (i * 2)); - if (swap) - *ptr = ntohs(word); - else - *ptr = word; + *dest = le16toh(CSR_READ_2(sc, STE_EEPROM_DATA)); + dest++; } return (err ? 1 : 0); @@ -659,7 +659,7 @@ ste_intr(void *xsc) { struct ste_softc *sc; struct ifnet *ifp; - uint16_t status; + uint16_t intrs, status; sc = xsc; STE_LOCK(sc); @@ -671,43 +671,67 @@ ste_intr(void *xsc) return; } #endif - - /* See if this is really our interrupt. */ - if (!(CSR_READ_2(sc, STE_ISR) & STE_ISR_INTLATCH)) { + /* Reading STE_ISR_ACK clears STE_IMR register. */ + status = CSR_READ_2(sc, STE_ISR_ACK); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { STE_UNLOCK(sc); return; } - for (;;) { - status = CSR_READ_2(sc, STE_ISR_ACK); + intrs = STE_INTRS; + if (status == 0xFFFF || (status & intrs) == 0) + goto done; - if (!(status & STE_INTRS)) - break; - - if (status & STE_ISR_RX_DMADONE) - ste_rxeof(sc, -1); + if (sc->ste_int_rx_act > 0) { + status &= ~STE_ISR_RX_DMADONE; + intrs &= ~STE_IMR_RX_DMADONE; + } - if (status & STE_ISR_TX_DMADONE) + if ((status & (STE_ISR_SOFTINTR | STE_ISR_RX_DMADONE)) != 0) { + ste_rxeof(sc, -1); + /* + * The controller has no ability to Rx interrupt + * moderation feature. Receiving 64 bytes frames + * from wire generates too many interrupts which in + * turn make system useless to process other useful + * things. Fortunately ST201 supports single shot + * timer so use the timer to implement Rx interrupt + * moderation in driver. This adds more register + * access but it greatly reduces number of Rx + * interrupts under high network load. + */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 && + (sc->ste_int_rx_mod != 0)) { + if ((status & STE_ISR_RX_DMADONE) != 0) { + CSR_WRITE_2(sc, STE_COUNTDOWN, + STE_TIMER_USECS(sc->ste_int_rx_mod)); + intrs &= ~STE_IMR_RX_DMADONE; + sc->ste_int_rx_act = 1; + } else { + intrs |= STE_IMR_RX_DMADONE; + sc->ste_int_rx_act = 0; + } + } + } + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + if ((status & STE_ISR_TX_DMADONE) != 0) ste_txeof(sc); - - if (status & STE_ISR_TX_DONE) + if ((status & STE_ISR_TX_DONE) != 0) ste_txeoc(sc); - - if (status & STE_ISR_STATS_OFLOW) + if ((status & STE_ISR_STATS_OFLOW) != 0) ste_stats_update(sc); - - if (status & STE_ISR_HOSTERR) { - ste_init_locked(sc); + if ((status & STE_ISR_HOSTERR) != 0) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + ste_init_locked(sc); + STE_UNLOCK(sc); + return; } + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + ste_start_locked(ifp); +done: + /* Re-enable interrupts */ + CSR_WRITE_2(sc, STE_IMR, intrs); } - - /* Re-enable interrupts */ - CSR_WRITE_2(sc, STE_IMR, STE_INTRS); - - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - ste_start_locked(ifp); - STE_UNLOCK(sc); } @@ -769,7 +793,7 @@ ste_rxeof(struct ste_softc *sc, int coun * can do in this situation. */ if (ste_newbuf(sc, cur_rx) != 0) { - ifp->if_ierrors++; + ifp->if_iqdrops++; cur_rx->ste_ptr->ste_status = 0; continue; } @@ -1034,8 +1058,8 @@ ste_attach(device_t dev) { struct ste_softc *sc; struct ifnet *ifp; - u_char eaddr[6]; - int error = 0, rid; + uint16_t eaddr[ETHER_ADDR_LEN / 2]; + int error = 0, pmc, rid; sc = device_get_softc(dev); sc->ste_dev = dev; @@ -1093,8 +1117,7 @@ ste_attach(device_t dev) /* * Get station address from the EEPROM. */ - if (ste_read_eeprom(sc, eaddr, - STE_EEADDR_NODE0, 3, 0)) { + if (ste_read_eeprom(sc, eaddr, STE_EEADDR_NODE0, ETHER_ADDR_LEN / 2)) { device_printf(dev, "failed to read station address\n"); error = ENXIO;; goto fail; @@ -1121,7 +1144,6 @@ ste_attach(device_t dev) ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_mtu = ETHERMTU; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ste_ioctl; ifp->if_start = ste_start; @@ -1135,13 +1157,15 @@ ste_attach(device_t dev) /* * Call MI attach routine. */ - ether_ifattach(ifp, eaddr); + ether_ifattach(ifp, (uint8_t *)eaddr); /* * Tell the upper layer(s) we support long frames. */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_VLAN_MTU; + if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) + ifp->if_capabilities |= IFCAP_WOL_MAGIC; ifp->if_capenable = ifp->if_capabilities; #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; @@ -1538,6 +1562,7 @@ ste_init_rx_list(struct ste_softc *sc) struct ste_list_data *ld; int error, i; + sc->ste_int_rx_act = 0; cd = &sc->ste_cdata; ld = &sc->ste_ldata; bzero(ld->ste_rx_list, STE_RX_LIST_SZ); @@ -1548,12 +1573,14 @@ ste_init_rx_list(struct ste_softc *sc) return (error); if (i == (STE_RX_LIST_CNT - 1)) { cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[0]; - ld->ste_rx_list[i].ste_next = ld->ste_rx_list_paddr + - (sizeof(struct ste_desc_onefrag) * 0); + ld->ste_rx_list[i].ste_next = + htole32(ld->ste_rx_list_paddr + + (sizeof(struct ste_desc_onefrag) * 0)); } else { cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[i + 1]; - ld->ste_rx_list[i].ste_next = ld->ste_rx_list_paddr + - (sizeof(struct ste_desc_onefrag) * (i + 1)); + ld->ste_rx_list[i].ste_next = + htole32(ld->ste_rx_list_paddr + + (sizeof(struct ste_desc_onefrag) * (i + 1))); } } @@ -1617,6 +1644,7 @@ ste_init_locked(struct ste_softc *sc) { struct ifnet *ifp; struct mii_data *mii; + uint8_t val; int i; STE_LOCK_ASSERT(sc); @@ -1651,6 +1679,12 @@ ste_init_locked(struct ste_softc *sc) /* Init TX descriptors */ ste_init_tx_list(sc); + /* Clear and disable WOL. */ + val = CSR_READ_1(sc, STE_WAKE_EVENT); + val &= ~(STE_WAKEEVENT_WAKEPKT_ENB | STE_WAKEEVENT_MAGICPKT_ENB | + STE_WAKEEVENT_LINKEVT_ENB | STE_WAKEEVENT_WAKEONLAN_ENB); + CSR_WRITE_1(sc, STE_WAKE_EVENT, val); + /* Set the TX freethresh value */ CSR_WRITE_1(sc, STE_TX_DMABURST_THRESH, STE_PACKET_SIZE >> 8); @@ -1684,6 +1718,9 @@ ste_init_locked(struct ste_softc *sc) STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); ste_wait(sc); + /* Select 3.2us timer. */ + STE_CLRBIT4(sc, STE_DMACTL, STE_DMACTL_COUNTDOWN_SPEED | + STE_DMACTL_COUNTDOWN_MODE); /* Enable receiver and transmitter */ CSR_WRITE_2(sc, STE_MACCTL0, 0); @@ -1696,6 +1733,7 @@ ste_init_locked(struct ste_softc *sc) /* Clear stats counters. */ ste_stats_clear(sc); + CSR_WRITE_2(sc, STE_COUNTDOWN, 0); CSR_WRITE_2(sc, STE_ISR, 0xFFFF); #ifdef DEVICE_POLLING /* Disable interrupts if we are polling. */ @@ -1733,6 +1771,7 @@ ste_stop(struct ste_softc *sc) ifp->if_drv_flags &= ~(IFF_DRV_RUNNING|IFF_DRV_OACTIVE); CSR_WRITE_2(sc, STE_IMR, 0); + CSR_WRITE_2(sc, STE_COUNTDOWN, 0); /* Stop pending DMA. */ val = CSR_READ_4(sc, STE_DMACTL); val |= STE_DMACTL_TXDMA_STALL | STE_DMACTL_RXDMA_STALL; @@ -1842,7 +1881,7 @@ ste_ioctl(struct ifnet *ifp, u_long comm struct ste_softc *sc; struct ifreq *ifr; struct mii_data *mii; - int error = 0; + int error = 0, mask; sc = ifp->if_softc; ifr = (struct ifreq *)data; @@ -1875,31 +1914,31 @@ ste_ioctl(struct ifnet *ifp, u_long comm error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); break; case SIOCSIFCAP: + STE_LOCK(sc); + mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING - if (ifr->ifr_reqcap & IFCAP_POLLING && - !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(ste_poll, ifp); - if (error) - return (error); - STE_LOCK(sc); - /* Disable interrupts */ - CSR_WRITE_2(sc, STE_IMR, 0); - ifp->if_capenable |= IFCAP_POLLING; - STE_UNLOCK(sc); - return (error); - - } - if (!(ifr->ifr_reqcap & IFCAP_POLLING) && - ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); - /* Enable interrupts. */ - STE_LOCK(sc); - CSR_WRITE_2(sc, STE_IMR, STE_INTRS); - ifp->if_capenable &= ~IFCAP_POLLING; - STE_UNLOCK(sc); - return (error); + if ((mask & IFCAP_POLLING) != 0 && + (IFCAP_POLLING & ifp->if_capabilities) != 0) { + ifp->if_capenable ^= IFCAP_POLLING; + if ((IFCAP_POLLING & ifp->if_capenable) != 0) { + error = ether_poll_register(ste_poll, ifp); + if (error != 0) { + STE_UNLOCK(sc); + break; + } + /* Disable interrupts. */ + CSR_WRITE_2(sc, STE_IMR, 0); + } else { + error = ether_poll_deregister(ifp); + /* Enable interrupts. */ + CSR_WRITE_2(sc, STE_IMR, STE_INTRS); + } } #endif /* DEVICE_POLLING */ + if ((mask & IFCAP_WOL_MAGIC) != 0 && + (ifp->if_capabilities & IFCAP_WOL_MAGIC) != 0) + ifp->if_capenable ^= IFCAP_WOL_MAGIC; + STE_UNLOCK(sc); break; default: error = ether_ioctl(ifp, command, data); @@ -2077,12 +2116,50 @@ ste_watchdog(struct ste_softc *sc) static int ste_shutdown(device_t dev) { + + return (ste_suspend(dev)); +} + +static int +ste_suspend(device_t dev) +{ struct ste_softc *sc; sc = device_get_softc(dev); STE_LOCK(sc); ste_stop(sc); + ste_setwol(sc); + STE_UNLOCK(sc); + + return (0); +} + +static int +ste_resume(device_t dev) +{ + struct ste_softc *sc; + struct ifnet *ifp; + int pmc; + uint16_t pmstat; + + sc = device_get_softc(dev); + STE_LOCK(sc); + if (pci_find_extcap(sc->ste_dev, PCIY_PMG, &pmc) == 0) { + /* Disable PME and clear PME status. */ + pmstat = pci_read_config(sc->ste_dev, + pmc + PCIR_POWER_STATUS, 2); + if ((pmstat & PCIM_PSTAT_PMEENABLE) != 0) { + pmstat &= ~PCIM_PSTAT_PMEENABLE; + pci_write_config(sc->ste_dev, + pmc + PCIR_POWER_STATUS, pmstat, 2); + } + } + ifp = sc->ste_ifp; + if ((ifp->if_flags & IFF_UP) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + ste_init_locked(sc); + } STE_UNLOCK(sc); return (0); @@ -2105,6 +2182,13 @@ ste_sysctl_node(struct ste_softc *sc) ctx = device_get_sysctl_ctx(sc->ste_dev); child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->ste_dev)); + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "int_rx_mod", + CTLFLAG_RW, &sc->ste_int_rx_mod, 0, "ste RX interrupt moderation"); + /* Pull in device tunables. */ + sc->ste_int_rx_mod = STE_IM_RX_TIMER_DEFAULT; + resource_int_value(device_get_name(sc->ste_dev), + device_get_unit(sc->ste_dev), "int_rx_mod", &sc->ste_int_rx_mod); + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, NULL, "STE statistics"); parent = SYSCTL_CHILDREN(tree); @@ -2154,3 +2238,35 @@ ste_sysctl_node(struct ste_softc *sc) #undef STE_SYSCTL_STAT_ADD32 #undef STE_SYSCTL_STAT_ADD64 + +static void +ste_setwol(struct ste_softc *sc) +{ + struct ifnet *ifp; + uint16_t pmstat; + uint8_t val; + int pmc; + + STE_LOCK_ASSERT(sc); + + if (pci_find_extcap(sc->ste_dev, PCIY_PMG, &pmc) != 0) { + /* Disable WOL. */ + CSR_READ_1(sc, STE_WAKE_EVENT); + CSR_WRITE_1(sc, STE_WAKE_EVENT, 0); + return; + } + + ifp = sc->ste_ifp; + val = CSR_READ_1(sc, STE_WAKE_EVENT); + val &= ~(STE_WAKEEVENT_WAKEPKT_ENB | STE_WAKEEVENT_MAGICPKT_ENB | + STE_WAKEEVENT_LINKEVT_ENB | STE_WAKEEVENT_WAKEONLAN_ENB); + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) + val |= STE_WAKEEVENT_MAGICPKT_ENB | STE_WAKEEVENT_WAKEONLAN_ENB; + CSR_WRITE_1(sc, STE_WAKE_EVENT, val); + /* Request PME. */ + pmstat = pci_read_config(sc->ste_dev, pmc + PCIR_POWER_STATUS, 2); + pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) + pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; + pci_write_config(sc->ste_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); +} Modified: stable/8/sys/dev/ste/if_stereg.h ============================================================================== --- stable/8/sys/dev/ste/if_stereg.h Thu Jan 14 22:21:43 2010 (r202317) +++ stable/8/sys/dev/ste/if_stereg.h Thu Jan 14 22:26:52 2010 (r202318) @@ -285,7 +285,8 @@ #define STE_INTRS \ (STE_IMR_RX_DMADONE|STE_IMR_TX_DMADONE| \ - STE_IMR_TX_DONE|STE_IMR_HOSTERR) + STE_IMR_TX_DONE|STE_IMR_SOFTINTR| \ + STE_IMR_HOSTERR) #define STE_ISR_INTLATCH 0x0001 #define STE_ISR_HOSTERR 0x0002 @@ -349,6 +350,13 @@ #define STE_PHYCTL_SPEEDSTAT 0x40 #define STE_PHYCTL_LINKSTAT 0x80 +#define STE_TIMER_TICKS 32 +#define STE_TIMER_USECS(x) ((x * 10) / STE_TIMER_TICKS) + +#define STE_IM_RX_TIMER_MIN 0 +#define STE_IM_RX_TIMER_MAX 209712 +#define STE_IM_RX_TIMER_DEFAULT 150 + /* * EEPROM offsets. */ @@ -570,6 +578,8 @@ struct ste_softc { #define STE_FLAG_LINK 0x8000 int ste_if_flags; int ste_timer; + int ste_int_rx_act; + int ste_int_rx_mod; struct ste_list_data ste_ldata; struct ste_chain_data ste_cdata; struct callout ste_callout; From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:29:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B6A01065679; Thu, 14 Jan 2010 22:29:29 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 695D18FC0C; Thu, 14 Jan 2010 22:29:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EMTTRZ065667; Thu, 14 Jan 2010 22:29:29 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EMTTPD065664; Thu, 14 Jan 2010 22:29:29 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142229.o0EMTTPD065664@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 22:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202319 - stable/7/sys/dev/ste X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:29:29 -0000 Author: yongari Date: Thu Jan 14 22:29:29 2010 New Revision: 202319 URL: http://svn.freebsd.org/changeset/base/202319 Log: MFC r200950,200955,200965-200966,201767-201768 r200950: Implement RX interrupt moderation using one-shot timer interrupt. Unlike TX interrupt, ST201 does not provide any mechanism to suppress RX interrupts. ste(4) can generate more than 70k RX interrupts under heavy RX traffics such that these excessive interrupts make system useless to process other useful things. Maybe this was the major reason why polling support code was introduced to ste(4). The STE_COUNTDOWN register provides a programmable counter that will generate an interrupt upon its expiration. We program STE_DMACTL register to use 3.2us clock rate to drive the counter register. Whenever ste(4) serves RX interrupt, the driver rearm the timer to expire after STE_IM_RX_TIMER_DEFAULT time and disables further generation of RX interrupts. This trick seems to work well and ste(4) generates less than 8k RX interrupts even under 64 bytes UDP torture test. Combined with TX interrupts, the total number of interrupts are less than 10k which looks reasonable on heavily loaded controller. The default RX interrupt moderation time is 150us. Users can change the value at any time with dev.ste.%d.int_rx_mod sysctl node. Setting it 0 effectively disables the RX interrupt moderation feature. Now we have both TX/RX interrupt moderation code so remove loop of interrupt handler which resulted in sub-optimal performance as well as more register accesses. r200955: Add suspend/resume support as well as basic WOL. While I'm here simplify SIOCSIFCAP handler. r200965: Update if_iqdrops in case of RX buffer allocation failure. r200966: ether_ifattach sets if_mtu, remove unnecessary code. r201767: Fix EEPROM access code to return data in host byte order. EEPROM on ST201 always returns 16bits data with little endian format so conversion to host order is required. This change fixes inversed ethernet address on sparc64. r201768: Make sure to store dma address of RX buffer in little endian form. This fixes the last bug which keeps ste(4) from working on sparc64. Modified: stable/7/sys/dev/ste/if_ste.c stable/7/sys/dev/ste/if_stereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ste/if_ste.c ============================================================================== --- stable/7/sys/dev/ste/if_ste.c Thu Jan 14 22:26:52 2010 (r202318) +++ stable/7/sys/dev/ste/if_ste.c Thu Jan 14 22:29:29 2010 (r202319) @@ -94,7 +94,9 @@ static struct ste_type ste_devs[] = { static int ste_attach(device_t); static int ste_detach(device_t); static int ste_probe(device_t); +static int ste_resume(device_t); static int ste_shutdown(device_t); +static int ste_suspend(device_t); static int ste_dma_alloc(struct ste_softc *); static void ste_dma_free(struct ste_softc *); @@ -118,11 +120,12 @@ static int ste_miibus_readreg(device_t, static void ste_miibus_statchg(device_t); static int ste_miibus_writereg(device_t, int, int, int); static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *); -static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); +static int ste_read_eeprom(struct ste_softc *, uint16_t *, int, int); static void ste_reset(struct ste_softc *); static void ste_restart_tx(struct ste_softc *); static void ste_rxeof(struct ste_softc *, int); static void ste_rxfilter(struct ste_softc *); +static void ste_setwol(struct ste_softc *); static void ste_start(struct ifnet *); static void ste_start_locked(struct ifnet *); static void ste_stats_clear(struct ste_softc *); @@ -141,6 +144,8 @@ static device_method_t ste_methods[] = { DEVMETHOD(device_attach, ste_attach), DEVMETHOD(device_detach, ste_detach), DEVMETHOD(device_shutdown, ste_shutdown), + DEVMETHOD(device_suspend, ste_suspend), + DEVMETHOD(device_resume, ste_resume), /* bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), @@ -533,9 +538,8 @@ ste_eeprom_wait(struct ste_softc *sc) * data is stored in the EEPROM in network byte order. */ static int -ste_read_eeprom(struct ste_softc *sc, caddr_t dest, int off, int cnt, int swap) +ste_read_eeprom(struct ste_softc *sc, uint16_t *dest, int off, int cnt) { - uint16_t word, *ptr; int err = 0, i; if (ste_eeprom_wait(sc)) @@ -546,12 +550,8 @@ ste_read_eeprom(struct ste_softc *sc, ca err = ste_eeprom_wait(sc); if (err) break; - word = CSR_READ_2(sc, STE_EEPROM_DATA); - ptr = (uint16_t *)(dest + (i * 2)); - if (swap) - *ptr = ntohs(word); - else - *ptr = word; + *dest = le16toh(CSR_READ_2(sc, STE_EEPROM_DATA)); + dest++; } return (err ? 1 : 0); @@ -655,7 +655,7 @@ ste_intr(void *xsc) { struct ste_softc *sc; struct ifnet *ifp; - uint16_t status; + uint16_t intrs, status; sc = xsc; STE_LOCK(sc); @@ -667,43 +667,67 @@ ste_intr(void *xsc) return; } #endif - - /* See if this is really our interrupt. */ - if (!(CSR_READ_2(sc, STE_ISR) & STE_ISR_INTLATCH)) { + /* Reading STE_ISR_ACK clears STE_IMR register. */ + status = CSR_READ_2(sc, STE_ISR_ACK); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { STE_UNLOCK(sc); return; } - for (;;) { - status = CSR_READ_2(sc, STE_ISR_ACK); + intrs = STE_INTRS; + if (status == 0xFFFF || (status & intrs) == 0) + goto done; - if (!(status & STE_INTRS)) - break; - - if (status & STE_ISR_RX_DMADONE) - ste_rxeof(sc, -1); + if (sc->ste_int_rx_act > 0) { + status &= ~STE_ISR_RX_DMADONE; + intrs &= ~STE_IMR_RX_DMADONE; + } - if (status & STE_ISR_TX_DMADONE) + if ((status & (STE_ISR_SOFTINTR | STE_ISR_RX_DMADONE)) != 0) { + ste_rxeof(sc, -1); + /* + * The controller has no ability to Rx interrupt + * moderation feature. Receiving 64 bytes frames + * from wire generates too many interrupts which in + * turn make system useless to process other useful + * things. Fortunately ST201 supports single shot + * timer so use the timer to implement Rx interrupt + * moderation in driver. This adds more register + * access but it greatly reduces number of Rx + * interrupts under high network load. + */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 && + (sc->ste_int_rx_mod != 0)) { + if ((status & STE_ISR_RX_DMADONE) != 0) { + CSR_WRITE_2(sc, STE_COUNTDOWN, + STE_TIMER_USECS(sc->ste_int_rx_mod)); + intrs &= ~STE_IMR_RX_DMADONE; + sc->ste_int_rx_act = 1; + } else { + intrs |= STE_IMR_RX_DMADONE; + sc->ste_int_rx_act = 0; + } + } + } + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + if ((status & STE_ISR_TX_DMADONE) != 0) ste_txeof(sc); - - if (status & STE_ISR_TX_DONE) + if ((status & STE_ISR_TX_DONE) != 0) ste_txeoc(sc); - - if (status & STE_ISR_STATS_OFLOW) + if ((status & STE_ISR_STATS_OFLOW) != 0) ste_stats_update(sc); - - if (status & STE_ISR_HOSTERR) { - ste_init_locked(sc); + if ((status & STE_ISR_HOSTERR) != 0) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + ste_init_locked(sc); + STE_UNLOCK(sc); + return; } + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + ste_start_locked(ifp); +done: + /* Re-enable interrupts */ + CSR_WRITE_2(sc, STE_IMR, intrs); } - - /* Re-enable interrupts */ - CSR_WRITE_2(sc, STE_IMR, STE_INTRS); - - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - ste_start_locked(ifp); - STE_UNLOCK(sc); } @@ -765,7 +789,7 @@ ste_rxeof(struct ste_softc *sc, int coun * can do in this situation. */ if (ste_newbuf(sc, cur_rx) != 0) { - ifp->if_ierrors++; + ifp->if_iqdrops++; cur_rx->ste_ptr->ste_status = 0; continue; } @@ -1028,8 +1052,8 @@ ste_attach(device_t dev) { struct ste_softc *sc; struct ifnet *ifp; - u_char eaddr[6]; - int error = 0, rid; + uint16_t eaddr[ETHER_ADDR_LEN / 2]; + int error = 0, pmc, rid; sc = device_get_softc(dev); sc->ste_dev = dev; @@ -1087,8 +1111,7 @@ ste_attach(device_t dev) /* * Get station address from the EEPROM. */ - if (ste_read_eeprom(sc, eaddr, - STE_EEADDR_NODE0, 3, 0)) { + if (ste_read_eeprom(sc, eaddr, STE_EEADDR_NODE0, ETHER_ADDR_LEN / 2)) { device_printf(dev, "failed to read station address\n"); error = ENXIO;; goto fail; @@ -1115,7 +1138,6 @@ ste_attach(device_t dev) ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_mtu = ETHERMTU; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = ste_ioctl; ifp->if_start = ste_start; @@ -1129,13 +1151,15 @@ ste_attach(device_t dev) /* * Call MI attach routine. */ - ether_ifattach(ifp, eaddr); + ether_ifattach(ifp, (uint8_t *)eaddr); /* * Tell the upper layer(s) we support long frames. */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_VLAN_MTU; + if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) + ifp->if_capabilities |= IFCAP_WOL_MAGIC; ifp->if_capenable = ifp->if_capabilities; #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; @@ -1532,6 +1556,7 @@ ste_init_rx_list(struct ste_softc *sc) struct ste_list_data *ld; int error, i; + sc->ste_int_rx_act = 0; cd = &sc->ste_cdata; ld = &sc->ste_ldata; bzero(ld->ste_rx_list, STE_RX_LIST_SZ); @@ -1542,12 +1567,14 @@ ste_init_rx_list(struct ste_softc *sc) return (error); if (i == (STE_RX_LIST_CNT - 1)) { cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[0]; - ld->ste_rx_list[i].ste_next = ld->ste_rx_list_paddr + - (sizeof(struct ste_desc_onefrag) * 0); + ld->ste_rx_list[i].ste_next = + htole32(ld->ste_rx_list_paddr + + (sizeof(struct ste_desc_onefrag) * 0)); } else { cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[i + 1]; - ld->ste_rx_list[i].ste_next = ld->ste_rx_list_paddr + - (sizeof(struct ste_desc_onefrag) * (i + 1)); + ld->ste_rx_list[i].ste_next = + htole32(ld->ste_rx_list_paddr + + (sizeof(struct ste_desc_onefrag) * (i + 1))); } } @@ -1611,6 +1638,7 @@ ste_init_locked(struct ste_softc *sc) { struct ifnet *ifp; struct mii_data *mii; + uint8_t val; int i; STE_LOCK_ASSERT(sc); @@ -1645,6 +1673,12 @@ ste_init_locked(struct ste_softc *sc) /* Init TX descriptors */ ste_init_tx_list(sc); + /* Clear and disable WOL. */ + val = CSR_READ_1(sc, STE_WAKE_EVENT); + val &= ~(STE_WAKEEVENT_WAKEPKT_ENB | STE_WAKEEVENT_MAGICPKT_ENB | + STE_WAKEEVENT_LINKEVT_ENB | STE_WAKEEVENT_WAKEONLAN_ENB); + CSR_WRITE_1(sc, STE_WAKE_EVENT, val); + /* Set the TX freethresh value */ CSR_WRITE_1(sc, STE_TX_DMABURST_THRESH, STE_PACKET_SIZE >> 8); @@ -1678,6 +1712,9 @@ ste_init_locked(struct ste_softc *sc) STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); STE_SETBIT4(sc, STE_DMACTL, STE_DMACTL_TXDMA_UNSTALL); ste_wait(sc); + /* Select 3.2us timer. */ + STE_CLRBIT4(sc, STE_DMACTL, STE_DMACTL_COUNTDOWN_SPEED | + STE_DMACTL_COUNTDOWN_MODE); /* Enable receiver and transmitter */ CSR_WRITE_2(sc, STE_MACCTL0, 0); @@ -1690,6 +1727,7 @@ ste_init_locked(struct ste_softc *sc) /* Clear stats counters. */ ste_stats_clear(sc); + CSR_WRITE_2(sc, STE_COUNTDOWN, 0); CSR_WRITE_2(sc, STE_ISR, 0xFFFF); #ifdef DEVICE_POLLING /* Disable interrupts if we are polling. */ @@ -1727,6 +1765,7 @@ ste_stop(struct ste_softc *sc) ifp->if_drv_flags &= ~(IFF_DRV_RUNNING|IFF_DRV_OACTIVE); CSR_WRITE_2(sc, STE_IMR, 0); + CSR_WRITE_2(sc, STE_COUNTDOWN, 0); /* Stop pending DMA. */ val = CSR_READ_4(sc, STE_DMACTL); val |= STE_DMACTL_TXDMA_STALL | STE_DMACTL_RXDMA_STALL; @@ -1836,7 +1875,7 @@ ste_ioctl(struct ifnet *ifp, u_long comm struct ste_softc *sc; struct ifreq *ifr; struct mii_data *mii; - int error = 0; + int error = 0, mask; sc = ifp->if_softc; ifr = (struct ifreq *)data; @@ -1869,31 +1908,31 @@ ste_ioctl(struct ifnet *ifp, u_long comm error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); break; case SIOCSIFCAP: + STE_LOCK(sc); + mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING - if (ifr->ifr_reqcap & IFCAP_POLLING && - !(ifp->if_capenable & IFCAP_POLLING)) { - error = ether_poll_register(ste_poll, ifp); - if (error) - return (error); - STE_LOCK(sc); - /* Disable interrupts */ - CSR_WRITE_2(sc, STE_IMR, 0); - ifp->if_capenable |= IFCAP_POLLING; - STE_UNLOCK(sc); - return (error); - - } - if (!(ifr->ifr_reqcap & IFCAP_POLLING) && - ifp->if_capenable & IFCAP_POLLING) { - error = ether_poll_deregister(ifp); - /* Enable interrupts. */ - STE_LOCK(sc); - CSR_WRITE_2(sc, STE_IMR, STE_INTRS); - ifp->if_capenable &= ~IFCAP_POLLING; - STE_UNLOCK(sc); - return (error); + if ((mask & IFCAP_POLLING) != 0 && + (IFCAP_POLLING & ifp->if_capabilities) != 0) { + ifp->if_capenable ^= IFCAP_POLLING; + if ((IFCAP_POLLING & ifp->if_capenable) != 0) { + error = ether_poll_register(ste_poll, ifp); + if (error != 0) { + STE_UNLOCK(sc); + break; + } + /* Disable interrupts. */ + CSR_WRITE_2(sc, STE_IMR, 0); + } else { + error = ether_poll_deregister(ifp); + /* Enable interrupts. */ + CSR_WRITE_2(sc, STE_IMR, STE_INTRS); + } } #endif /* DEVICE_POLLING */ + if ((mask & IFCAP_WOL_MAGIC) != 0 && + (ifp->if_capabilities & IFCAP_WOL_MAGIC) != 0) + ifp->if_capenable ^= IFCAP_WOL_MAGIC; + STE_UNLOCK(sc); break; default: error = ether_ioctl(ifp, command, data); @@ -2071,12 +2110,50 @@ ste_watchdog(struct ste_softc *sc) static int ste_shutdown(device_t dev) { + + return (ste_suspend(dev)); +} + +static int +ste_suspend(device_t dev) +{ struct ste_softc *sc; sc = device_get_softc(dev); STE_LOCK(sc); ste_stop(sc); + ste_setwol(sc); + STE_UNLOCK(sc); + + return (0); +} + +static int +ste_resume(device_t dev) +{ + struct ste_softc *sc; + struct ifnet *ifp; + int pmc; + uint16_t pmstat; + + sc = device_get_softc(dev); + STE_LOCK(sc); + if (pci_find_extcap(sc->ste_dev, PCIY_PMG, &pmc) == 0) { + /* Disable PME and clear PME status. */ + pmstat = pci_read_config(sc->ste_dev, + pmc + PCIR_POWER_STATUS, 2); + if ((pmstat & PCIM_PSTAT_PMEENABLE) != 0) { + pmstat &= ~PCIM_PSTAT_PMEENABLE; + pci_write_config(sc->ste_dev, + pmc + PCIR_POWER_STATUS, pmstat, 2); + } + } + ifp = sc->ste_ifp; + if ((ifp->if_flags & IFF_UP) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + ste_init_locked(sc); + } STE_UNLOCK(sc); return (0); @@ -2099,6 +2176,13 @@ ste_sysctl_node(struct ste_softc *sc) ctx = device_get_sysctl_ctx(sc->ste_dev); child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->ste_dev)); + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "int_rx_mod", + CTLFLAG_RW, &sc->ste_int_rx_mod, 0, "ste RX interrupt moderation"); + /* Pull in device tunables. */ + sc->ste_int_rx_mod = STE_IM_RX_TIMER_DEFAULT; + resource_int_value(device_get_name(sc->ste_dev), + device_get_unit(sc->ste_dev), "int_rx_mod", &sc->ste_int_rx_mod); + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, NULL, "STE statistics"); parent = SYSCTL_CHILDREN(tree); @@ -2148,3 +2232,35 @@ ste_sysctl_node(struct ste_softc *sc) #undef STE_SYSCTL_STAT_ADD32 #undef STE_SYSCTL_STAT_ADD64 + +static void +ste_setwol(struct ste_softc *sc) +{ + struct ifnet *ifp; + uint16_t pmstat; + uint8_t val; + int pmc; + + STE_LOCK_ASSERT(sc); + + if (pci_find_extcap(sc->ste_dev, PCIY_PMG, &pmc) != 0) { + /* Disable WOL. */ + CSR_READ_1(sc, STE_WAKE_EVENT); + CSR_WRITE_1(sc, STE_WAKE_EVENT, 0); + return; + } + + ifp = sc->ste_ifp; + val = CSR_READ_1(sc, STE_WAKE_EVENT); + val &= ~(STE_WAKEEVENT_WAKEPKT_ENB | STE_WAKEEVENT_MAGICPKT_ENB | + STE_WAKEEVENT_LINKEVT_ENB | STE_WAKEEVENT_WAKEONLAN_ENB); + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) + val |= STE_WAKEEVENT_MAGICPKT_ENB | STE_WAKEEVENT_WAKEONLAN_ENB; + CSR_WRITE_1(sc, STE_WAKE_EVENT, val); + /* Request PME. */ + pmstat = pci_read_config(sc->ste_dev, pmc + PCIR_POWER_STATUS, 2); + pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) + pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; + pci_write_config(sc->ste_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); +} Modified: stable/7/sys/dev/ste/if_stereg.h ============================================================================== --- stable/7/sys/dev/ste/if_stereg.h Thu Jan 14 22:26:52 2010 (r202318) +++ stable/7/sys/dev/ste/if_stereg.h Thu Jan 14 22:29:29 2010 (r202319) @@ -285,7 +285,8 @@ #define STE_INTRS \ (STE_IMR_RX_DMADONE|STE_IMR_TX_DMADONE| \ - STE_IMR_TX_DONE|STE_IMR_HOSTERR) + STE_IMR_TX_DONE|STE_IMR_SOFTINTR| \ + STE_IMR_HOSTERR) #define STE_ISR_INTLATCH 0x0001 #define STE_ISR_HOSTERR 0x0002 @@ -349,6 +350,13 @@ #define STE_PHYCTL_SPEEDSTAT 0x40 #define STE_PHYCTL_LINKSTAT 0x80 +#define STE_TIMER_TICKS 32 +#define STE_TIMER_USECS(x) ((x * 10) / STE_TIMER_TICKS) + +#define STE_IM_RX_TIMER_MIN 0 +#define STE_IM_RX_TIMER_MAX 209712 +#define STE_IM_RX_TIMER_DEFAULT 150 + /* * EEPROM offsets. */ @@ -570,6 +578,8 @@ struct ste_softc { #define STE_FLAG_LINK 0x8000 int ste_if_flags; int ste_timer; + int ste_int_rx_act; + int ste_int_rx_mod; struct ste_list_data ste_ldata; struct ste_chain_data ste_cdata; struct callout ste_callout; From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:33:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04DDA106568D; Thu, 14 Jan 2010 22:33:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E81B08FC21; Thu, 14 Jan 2010 22:33:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EMXkTR066676; Thu, 14 Jan 2010 22:33:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EMXkIk066674; Thu, 14 Jan 2010 22:33:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142233.o0EMXkIk066674@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 22:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202320 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:33:47 -0000 Author: yongari Date: Thu Jan 14 22:33:46 2010 New Revision: 202320 URL: http://svn.freebsd.org/changeset/base/202320 Log: MFC r200958: Document newly added loader tunable/sysctl variable dev.ste.%d.int_rx_mod. While I'm here add .Xr vlan as ste(4) supports long frames. Modified: stable/8/share/man/man4/ste.4 Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) Modified: stable/8/share/man/man4/ste.4 ============================================================================== --- stable/8/share/man/man4/ste.4 Thu Jan 14 22:29:29 2010 (r202319) +++ stable/8/share/man/man4/ste.4 Thu Jan 14 22:33:46 2010 (r202320) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd December 24, 2009 .Dt STE 4 .Os .Sh NAME @@ -126,6 +126,23 @@ D-Link DFE-550TX .It D-Link DFE-580TX .El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width "xxxxxx" +.It Va dev.ste.%d.int_rx_mod +Maximum number of time to delay RX interrupts. +The valid range is 0 to 209712 in units of 1us, the default is +150 (150us). +The value 0 effectively disables the RX interrupt moderation. +The resolution of of timer is about 3.2us so finer tuning than +3.2us wouldn't be available. +The interface does not need to be brought down and up again before +a change takes effect. +.El .Sh DIAGNOSTICS .Bl -diag .It "ste%d: couldn't map ports/memory" @@ -171,6 +188,7 @@ the card should be configured correctly. .Xr netintro 4 , .Xr ng_ether 4 , .Xr polling 4 , +.Xr vlan 4 , .Xr ifconfig 8 .Rs .%T Sundance ST201 data sheet From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:34:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83852106568F; Thu, 14 Jan 2010 22:34:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E9A48FC1F; Thu, 14 Jan 2010 22:34:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EMYO7E066857; Thu, 14 Jan 2010 22:34:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EMYOBr066855; Thu, 14 Jan 2010 22:34:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142234.o0EMYOBr066855@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 22:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202321 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:34:26 -0000 Author: yongari Date: Thu Jan 14 22:34:24 2010 New Revision: 202321 URL: http://svn.freebsd.org/changeset/base/202321 Log: MFC r200958: Document newly added loader tunable/sysctl variable dev.ste.%d.int_rx_mod. While I'm here add .Xr vlan as ste(4) supports long frames. Modified: stable/7/share/man/man4/ste.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/ste.4 ============================================================================== --- stable/7/share/man/man4/ste.4 Thu Jan 14 22:33:46 2010 (r202320) +++ stable/7/share/man/man4/ste.4 Thu Jan 14 22:34:24 2010 (r202321) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd December 24, 2009 .Dt STE 4 .Os .Sh NAME @@ -126,6 +126,23 @@ D-Link DFE-550TX .It D-Link DFE-580TX .El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width "xxxxxx" +.It Va dev.ste.%d.int_rx_mod +Maximum number of time to delay RX interrupts. +The valid range is 0 to 209712 in units of 1us, the default is +150 (150us). +The value 0 effectively disables the RX interrupt moderation. +The resolution of of timer is about 3.2us so finer tuning than +3.2us wouldn't be available. +The interface does not need to be brought down and up again before +a change takes effect. +.El .Sh DIAGNOSTICS .Bl -diag .It "ste%d: couldn't map ports/memory" @@ -171,6 +188,7 @@ the card should be configured correctly. .Xr netintro 4 , .Xr ng_ether 4 , .Xr polling 4 , +.Xr vlan 4 , .Xr ifconfig 8 .Rs .%T Sundance ST201 data sheet From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:36:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F8DD106566B; Thu, 14 Jan 2010 22:36:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EC0D8FC16; Thu, 14 Jan 2010 22:36:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EMa69b067274; Thu, 14 Jan 2010 22:36:06 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EMa6dx067272; Thu, 14 Jan 2010 22:36:06 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142236.o0EMa6dx067272@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 22:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202322 - stable/8/sys/sparc64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:36:07 -0000 Author: yongari Date: Thu Jan 14 22:36:06 2010 New Revision: 202322 URL: http://svn.freebsd.org/changeset/base/202322 Log: MFC r201769: Enable ste(4). ste(4) should work on all architectures. Modified: stable/8/sys/sparc64/conf/GENERIC Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/conf/GENERIC ============================================================================== --- stable/8/sys/sparc64/conf/GENERIC Thu Jan 14 22:34:24 2010 (r202321) +++ stable/8/sys/sparc64/conf/GENERIC Thu Jan 14 22:36:06 2010 (r202322) @@ -181,7 +181,7 @@ device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (``Starfire'') #device sis # Silicon Integrated Systems SiS 900/SiS 7016 device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet -#device ste # Sundance ST201 (D-Link DFE-550TX) +device ste # Sundance ST201 (D-Link DFE-550TX) device stge # Sundance/Tamarack TC9021 gigabit Ethernet #device tl # Texas Instruments ThunderLAN #device tx # SMC EtherPower II (83c170 ``EPIC'') From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 22:37:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AE5B106566B; Thu, 14 Jan 2010 22:37:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79F9B8FC1F; Thu, 14 Jan 2010 22:37:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EMb7mj067553; Thu, 14 Jan 2010 22:37:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EMb7tp067551; Thu, 14 Jan 2010 22:37:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001142237.o0EMb7tp067551@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 14 Jan 2010 22:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202323 - stable/7/sys/sparc64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 22:37:07 -0000 Author: yongari Date: Thu Jan 14 22:37:06 2010 New Revision: 202323 URL: http://svn.freebsd.org/changeset/base/202323 Log: MFC r201769: Enable ste(4). ste(4) should work on all architectures. Modified: stable/7/sys/sparc64/conf/GENERIC Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/conf/GENERIC ============================================================================== --- stable/7/sys/sparc64/conf/GENERIC Thu Jan 14 22:36:06 2010 (r202322) +++ stable/7/sys/sparc64/conf/GENERIC Thu Jan 14 22:37:06 2010 (r202323) @@ -176,7 +176,7 @@ device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (``Starfire'') #device sis # Silicon Integrated Systems SiS 900/SiS 7016 device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet -#device ste # Sundance ST201 (D-Link DFE-550TX) +device ste # Sundance ST201 (D-Link DFE-550TX) device stge # Sundance/Tamarack TC9021 gigabit Ethernet device ti # Alteon Networks Tigon I/II gigabit Ethernet #device tl # Texas Instruments ThunderLAN From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 23:27:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9020E106568B; Thu, 14 Jan 2010 23:27:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F6308FC19; Thu, 14 Jan 2010 23:27:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ENRNrB078615; Thu, 14 Jan 2010 23:27:23 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ENRNF8078613; Thu, 14 Jan 2010 23:27:23 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201001142327.o0ENRNF8078613@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 14 Jan 2010 23:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202324 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 23:27:23 -0000 Author: jilles Date: Thu Jan 14 23:27:23 2010 New Revision: 202324 URL: http://svn.freebsd.org/changeset/base/202324 Log: In 'make delete-old', use 'exec' to redirect an fd persistently. That is, write 'exec 3<&0' instead of '3<&0'. Due to an sh(1) bug fixed in r199953, the latter also persisted, provided that fd 3 was not open before. With newer sh or fd 3 open, it would not delete orphaned catpages. MFC after: 2 weeks Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jan 14 22:37:06 2010 (r202323) +++ head/Makefile.inc1 Thu Jan 14 23:27:23 2010 (r202324) @@ -1266,7 +1266,7 @@ delete-old-files: fi; \ done # Remove catpages without corresponding manpages. - @3<&0; \ + @exec 3<&0; \ find ${DESTDIR}/usr/share/man/cat* ! -type d | \ sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \ while read catpage; do \ From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 01:19:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 150E11065676; Fri, 15 Jan 2010 01:19:59 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03EE58FC25; Fri, 15 Jan 2010 01:19:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F1JwW3003508; Fri, 15 Jan 2010 01:19:58 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F1JwXq003506; Fri, 15 Jan 2010 01:19:58 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001150119.o0F1JwXq003506@svn.freebsd.org> From: David Xu Date: Fri, 15 Jan 2010 01:19:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202326 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 01:19:59 -0000 Author: davidxu Date: Fri Jan 15 01:19:58 2010 New Revision: 202326 URL: http://svn.freebsd.org/changeset/base/202326 Log: Also call sem_module_init in sem_close to initialize mutex with some attributes. Modified: head/lib/libc/gen/sem_new.c Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Fri Jan 15 00:41:46 2010 (r202325) +++ head/lib/libc/gen/sem_new.c Fri Jan 15 01:19:58 2010 (r202326) @@ -255,6 +255,8 @@ _sem_close(sem_t *sem) return (-1); } + _pthread_once(&once, sem_module_init); + _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) { if (sem == ni->sem) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 01:51:05 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8ECB1065670; Fri, 15 Jan 2010 01:51:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 271048FC13; Fri, 15 Jan 2010 01:51:04 +0000 (UTC) Received: from c220-239-227-214.carlnfd1.nsw.optusnet.com.au (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0F1otJu012208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Jan 2010 12:50:58 +1100 Date: Fri, 15 Jan 2010 12:50:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "M. Warner Losh" In-Reply-To: <20100114.135930.80200584442733547.imp@bsdimp.com> Message-ID: <20100115114822.O63406@delplex.bde.org> References: <20100114.105622.457034909117828677.imp@bsdimp.com> <4B4F7810.2080003@FreeBSD.org> <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> <20100114.135930.80200584442733547.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: dougb@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, rwatson@FreeBSD.org, freebsd-arch@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 01:51:05 -0000 On Thu, 14 Jan 2010, M. Warner Losh wrote: > In message: <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> > "Robert N. M. Watson" writes: > : I agree. I see two kinds of users: > : > : - Desktop/server users who want their system to work without any > : special tuning or magic, and likely feel the comments they put in > : configuration files are important > : - Users who care a about a few hundred bytes of comments due to the > : nature of their special embedded hardware target environment "Stripping" comments has nothing to do with saving space. It is because it is technically difficult, and not implemented, to not strip them, except in the old limited code that just preserves the unprocessed top-level-only config file. > : As such, I see a reasonable "default" -- i.e., i386/amd64 GENERIC -- > : be to fully preserve the configuration and its comments. For the Your code to implement this is welcome :-). Even GENERIC is not quite complete, since it is missing the implicit include of DEFAULTS. OTOH, completing the config by merging with DEFAULTS, as I think the processed version must do, may give an unusable config by repeating things in DEFAULTS. The merge should probably have no processing at all, with include files concatenated and not replacing include directives, and DEFAULTS not included. > I think you are confusing two different things. > > The embedded folks omit this entirely. That's not the issue at all > here. Space is not the concern. We're putting it into GENERIC. > > Why are there two ways? Because there are two points in the process > one can squirt the data out of config. Let me explain (sorry for the > length, but it is necessary to clear up the confusion): > > The first way is "preserve the FILE the user used to create the > kernel" on the assumption that the FILE is what is important. No, it is on the non-assumption that the include directive didn't exist when the INCLUDE_CONFIG_FILE option was implemented. > This > will preserve the comments, but assumes that every single included > file from that file is recoverable in a trivial manner (eg, from cvs, > svn, p4, release ISOs, etc). This assumption is false, so this model became just broken when the include directive was implemented. History: INCLUDE_CONFIG_FILE option: 1996 include directive: 2001 processed output and -C: 2007 The -C option just preserves the breakage at its 2001-2007 level. > This model works well for the casual > user. Casual users presumably didn't notice the problem (until comments were lost in 2007) since they use GENERIC as is or with minor editing, and GENERIC doesn't use the include directive. Non-casual users don't notice since they know what is in their config files and don't use the INCLUDE_CONFIG_FILE option. (I use a combination of 3 levels of include files and 2 levels of symlinks to handle about 6 configurations times 2 arches times 4 FreeBSD versions.) > In this model, we're therefore able to preserve the kernel > config by copying the file, verbatim, into the kernel. I think this > is the model that best fits most user's needs, since they EITHER take > GENERIC and hack on it (in which case we preserve all that), OR they > include GENERIC and opt in/out of things based on that default. > Either way, this is the best way for users of releases to preserve the > data they need to recreate the kernel without losing data that's > important to the user, but not config (comments, spacing, order, etc). This may be enough, but it is a historical accident that config "works" this way. > The other way of preserving the config file is to say "I want > EVERYTHING applied, and I want a copy of that!" To get that, you have > to walk through config's internal data structures. By the time we get > to *THAT* point in the processing, comments are but a distant memory. Getting output from cpp has the same problems: - you can get fully preprocessed output fairly easily - cpp normally discards comments early, so you can't get them easily. I think gnu cpp now has an option to not discard them. - so you usually get only the fully preprocessed output - but sometimes you don't want so much preprocessing. None might be best. I don't know of any option in gnu cpp to get none. - the problem is harder in cpp than in config due to ifdefed out C code normally being completely removed, while config doesn't even have ifdef. Teaching cpp to preserve (only some) ifdefed out code, and presenting the results nicely (need to preserve the original ifdef structure) would be difficult. Except it might not be too difficult for either cpp or config to just concatenate all the files used. > Those are discarded early, along with the variations in spacing, blank > lines. By this point in the process, even the original ordering is > long gone, as is the origin of each of the remaining items in config's > internal data structures. However, the resulting config file that we > generate here is GUARANTEED to recreate the same kernel from the same > sources modulo any silly time/date/path stuff we encode. There's a I checked what happens with repeating DEFAULTS. Repeating it using "include" results in many warnings but the same generated files. > If space isn't an issue, we could save BOTH. That would be a bigger > patch, since we'd have to alter config to extract both kinds of data. > All I did was to move the -C option from an obscure src.conf variable > to be a full-fledged kernel option, leaving the rest of the > infrastructure intact. The advantage is that we cover both bases and > could export both views as a sysctl (right now we overload the two > different views with one sysctl). ISTR a long discussion about the -C option when it was implemented. Why didn't you complain back then? :-). I looked at my old mail about this. I wasn't involved with the initial discussion, but imp was :-). My mail was after the initial commit. I reported the following problems: - DEFAULTS wasn't processed - several ordering problems. Ones that reordered directives of the form: options FOO=bar nooptions FOO options FOO=baz made the generated file unusable. - many formatting problems in the generated file, making it a bad example. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 02:18:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 701951065672; Fri, 15 Jan 2010 02:18:09 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C27F8FC12; Fri, 15 Jan 2010 02:18:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F2I97F016302; Fri, 15 Jan 2010 02:18:09 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F2I7Q0016300; Fri, 15 Jan 2010 02:18:07 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150218.o0F2I7Q0016300@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 02:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202327 - stable/8/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 02:18:09 -0000 Author: dougb Date: Fri Jan 15 02:18:07 2010 New Revision: 202327 URL: http://svn.freebsd.org/changeset/base/202327 Log: MFC r201601: Remove more duplicates Minor reformatting on a few Modified: stable/8/games/fortune/datfiles/fortunes Directory Properties: stable/8/games/fortune/ (props changed) stable/8/games/fortune/datfiles/ (props changed) Modified: stable/8/games/fortune/datfiles/fortunes ============================================================================== --- stable/8/games/fortune/datfiles/fortunes Fri Jan 15 01:19:58 2010 (r202326) +++ stable/8/games/fortune/datfiles/fortunes Fri Jan 15 02:18:07 2010 (r202327) @@ -1696,14 +1696,6 @@ the Cat. "Then it doesn't matter which way you go," said the Cat. -- Lewis Carroll % - COMMENT - -Oh, life is a glorious cycle of song, -A medley of extemporanea; -And love is thing that can never go wrong; -And I am Marie of Roumania. - -- Dorothy Parker -% Concerning the war in Vietnam, Senator George Aiken of Vermont noted in January, 1966, "I'm not very keen for doves or hawks. I think we need more owls." @@ -1923,22 +1915,6 @@ Christmas tree. The piano is missing. you rent your home and own Firearms, in which case you can go to level 4. The best way to get to level 3 is egg-nog. % - FIGHTING WORDS - -Say my love is easy had, - Say I'm bitten raw with pride, -Say I am too often sad -- - Still behold me at your side. - -Say I'm neither brave nor young, - Say I woo and coddle care, -Say the devil touched my tongue -- - Still you have my heart to wear. - -But say my verses do not scan, - And I get me another man! - -- Dorothy Parker -% "For I perceive that behind this seemingly unrelated sequence of events, there lurks a singular, sinister attitude of mind." @@ -2210,20 +2186,6 @@ full of money before." "Didn't you see it?" "Damn kid had it under his coat." % - Hug O' War - -I will not play at tug o' war. -I'd rather play at hug o' war, -Where everyone hugs -Instead of tugs, -Where everyone giggles -And rolls on the rug, -Where everyone kisses, -And everyone grins, -And everyone cuddles, -And everyone wins. - -- Shel Silverstein -% Human thinking can skip over a great deal, leap over small misunderstandings, can contain ifs and buts in untroubled corners of the mind. But the machine has no corners. Despite all the attempts to @@ -2677,33 +2639,6 @@ right any day." life-style otherwise." -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" % - Insofar as I may be heard by anything, which may or may not care -what I say, I ask, if it matters, that you be forgiven for anything you -may have done or failed to do which requires forgiveness. Conversely, if -not forgiveness but something else may be required to insure any possible -benefit for which you may be eligible after the destruction of your body, -I ask this, whatever it may be, be granted or withheld, as the case may be, -in such a manner as to insure your receiving said benefit. I ask this in my -capacity as your elected intermediary between yourself and that which may -not be yourself, but which may have an interest in the matter of your -receiving as much as it is possible for you to receive of this thing, and -which may in some way be influenced by this ceremony. - Amen. - -- Roger Zelazny, "Creatures of Light and Darkness", 1969 -% - INVENTORY -Four be the things I am wiser to know: -Idleness, sorrow, a friend, and a foe. - -Four be the things I'd been better without: -Love, curiosity, freckles, and doubt. - -Three be the things I shall never attain: -Envy, content, and sufficient champagne. - -Three be the things I shall have till I die: -Laughter and hope and a sock in the eye. -% "Is there any point to which you would wish to draw my attention?" "To the curious incident of the dog in the night-time." "The dog did nothing in the night-time." @@ -3983,28 +3918,6 @@ almost succeeded in getting a VAX to thi organization say that each time the machine fails to think it ceases to exist. % - THE LESSER-KNOWN PROGRAMMING LANGUAGES #5: VALGOL -From its modest beginnings in Southern California's San Fernando Valley, -VALGOL is enjoying a dramatic surge of popularity across the industry. - -Here is a sample program: - LIKE, Y*KNOW(I MEAN)START - IF PIZZA = LIKE BITCHEN AND GUY = LIKE TUBULAR AND - VALLEY GIRL = LIKE GRODY**MAX(FERSURE)**2 THEN - FOR I = LIKE 1 TO OH*MAYBE 100 - DO*WAH - (DITTY**2) - BARF(I)=TOTALLY GROSS(OUT) - SURE - LIKE BAG THIS PROGRAM - REALLY - LIKE TOTALLY (Y*KNOW) - IM*SURE - GOTO THE MALL - -When the user makes a syntax error, the interpreter displays the message: - - GAG ME WITH A SPOON!! -% THE LESSER-KNOWN PROGRAMMING LANGUAGES #8: LAIDBACK This language was developed at the Marin County Center for T'ai Chi, @@ -5335,9 +5248,6 @@ that he didn't force you down on the ask -- A plethora of individuals wither expertise in culinary techniques vitiated the potable concoction produced by steeping certain coupestibles. -- Eleemosynary deeds have their initial incidence intramurally. --- Male cadavers are incapable of yielding testimony. --- Individuals who make their abode in vitreous edifices would be well - advised to refrain from catapulting projectiles. % =============== ALL FRESHMEN PLEASE NOTE =============== @@ -11076,9 +10986,6 @@ Armstrong's Collection Law: If the check is truly in the mail, it is surely made out to someone else. % -Arnold's Addendum: - Anything not fitting into these categories causes cancer in rats. -% Arnold's Laws of Documentation: 1.) If it should exist, it doesn't. 2.) If it does exist, it's out of date. @@ -12654,7 +12561,7 @@ Boren's Laws: (2) When in trouble, delegate. (3) When in doubt, mumble. % -boss, n: +Boss, n: According to the Oxford English Dictionary, in the Middle Ages the words "boss" and "botch" were largely synonymous, except that boss, in addition to meaning "a supervisor of workers" also meant "an @@ -12935,7 +12842,7 @@ wrote the program. Fortunately, the second-to-last bug has just been fixed. -- Ray Simard % -bug, n: +Bug, n: An elusive creature living in a program that makes it incorrect. The activity of "debugging", or removing bugs from a program, ends when people get tired of doing it, not when the bugs are removed. @@ -13524,14 +13431,14 @@ only robust persons doing this thing is others who have tried it. -- Ambrose Bierce, "The Devil's Dictionary" % - -Certain passages in several laws have always defied interpretation and the -most inexplicable must be a matter of opinion. A judge of the Court of -Session of Scotland has sent the editors of this book his candidate which -reads, "In the Nuts (unground), (other than ground nuts) Order, the expression -nuts shall have reference to such nuts, other than ground nuts, as would -but for this amending Order not qualify as nuts (unground) (other than ground -nuts) by reason of their being nuts (unground)." +Certain passages in several laws have always defied interpretation and +the most inexplicable must be a matter of opinion. A judge of the Court +of Session of Scotland has sent the editors of this book his candidate +which reads, "In the Nuts (unground), (other than ground nuts) Order, +the expression nuts shall have reference to such nuts, other than ground +nuts, as would but for this amending Order not qualify as nuts +(unground) (other than ground nuts) by reason of their being nuts +(unground)." -- Guinness Book of World Records, 1973 % Certainly the game is rigged. @@ -15057,17 +14964,6 @@ letter, or even 25 cents on a stamp! so post it as many places as you can. -- Emily Postnews Answers Your Questions on Netiquette % -Dear Sir, - I am firmly opposed to the spread of microchips either to the home or -to the office. We have more than enough of them foisted upon us in public -places. They are a disgusting Americanism, and can only result in the farmers -being forced to grow smaller potatoes, which in turn will cause massive un- -employment in the already severely depressed agricultural industry. - Yours faithfully, - Capt. Quinton D'Arcy, J.P. - Sevenoaks - -- Letters To The Editor, The Times of London -% Death before dishonor. But neither before breakfast. % @@ -17838,9 +17734,6 @@ Finagle's Eleventh Law: it happened according to his pet theory. % Finagle's First Law: - If an experiment works, something has gone wrong. -% -Finagle's First Law: To study a subject best, understand it thoroughly before you start. Finagle's Second Law: @@ -18173,9 +18066,6 @@ For children with short attention spans: For courage mounteth with occasion. -- William Shakespeare, "King John" % -For every action, there is an equal and opposite criticism. - -- Harrison -% For every bloke who makes his mark, there's half a dozen waiting to rub it out. -- Andy Capp @@ -19520,17 +19410,6 @@ Your butt is on the menu And the check is in the mail. -- The Piranha Club Anthem, to the tune of "De Camptown Races" % -From the "Guinness Book of World Records", 1973: - -Certain passages in several laws have always defied interpretation and -the most inexplicable must be a matter of opinion. A judge of the -Court of Session of Scotland has sent the editors of this book his -candidate which reads, "In the Nuts (unground), (other than ground -nuts) Order, the expression nuts shall have reference to such nuts, -other than ground nuts, as would but for this amending Order not -qualify as nuts (unground)(other than ground nuts) by reason of their -being nuts (unground)." -% From the moment I picked your book up until I put it down I was convulsed with laughter. Some day I intend reading it. -- Groucho Marx, from "The Book of Insults" @@ -24035,21 +23914,6 @@ I may not be totally perfect, but parts I met a wonderful new man. He's fictional, but you can't have everything. -- Cecelia, "The Purple Rose of Cairo" % -I met him in a swamp down in Dagobah -Where it bubbles all the time like a giant cabinet soda - S-O-D-A soda -I saw the little runt sitting there on a log -I asked him his name and in a raspy voice he said Yoda - Y-O-D-A Yoda, Yo-Yo-Yo-Yo Yoda - -Well I've been around but I ain't never seen -A guy who looks like a Muppet but he's wrinkled and green - Oh my Yoda, Yo-Yo-Yo-Yo Yoda -Well I'm not dumb but I can't understand -How he can raise me in the air just by raising his hand - Oh my Yoda, Yo-Yo-Yo-Yo Yoda, Yo-Yo-Yo-Yo Yoda - -- The STAR WARS Song, to "Lola", by the Kinks -% I met my latest girl friend in a department store. She was looking at clothes, and I was putting Slinkys on the escalators. -- Steven Wright @@ -24524,10 +24388,6 @@ are worth considering, to wit: "When paying tolls, remember that it is necessary to release the quarter a full 3 seconds before passing the basket if you are traveling more than 60 MPH." - -[110.13]: - "When traveling on a one-way street, stay to the right, so as not - to interfere with oncoming traffic." % I suppose some of the variation between Boston drivers and the rest of the country is due to the progressive Massachusetts Driver Education Manual which @@ -24621,12 +24481,6 @@ I think that I shall never see A billboard lovely as a tree. Indeed, unless the billboards fall I'll never see a tree at all. - -- Nash -% -I think that I shall never see -A billboard lovely as a tree. -Perhaps, unless the billboards fall -I'll never see a tree at all. -- Ogden Nash % I think that I shall never see @@ -25892,21 +25746,6 @@ this is the case, then programmers stand software engineers dig each other's graves. -- Unknown % -If I have seen farther than others, it is because I was standing on the -shoulders of giants. - -- Isaac Newton - -In the sciences, we are now uniquely privileged to sit side by side -with the giants on whose shoulders we stand. - -- Gerald Holton - -If I have not seen as far as others, it is because giants were standing -on my shoulders. - -- Hal Abelson - -In computer science, we stand on each other's feet. - -- Brian K. Reid -% If I have to lay an egg for my country, I'll do it. -- Bob Hope % @@ -37634,7 +37473,7 @@ Pardo's First Postulate: fattening. Arnold's Addendum: - Everything else causes cancer in rats. + Anything not fitting into these categories causes cancer in rats. % Parents often talk about the younger generation as if they didn't have much of anything to do with it. @@ -39431,10 +39270,6 @@ A: A dope ring. Q: Why do blondes put their hair in ponytails? A: To cover up the valve stem. - -Q: Why did the blonde get so excited after she finished her jigsaw - puzzle in only 6 months? -A: Because on the box it said "From 2-4 years". % Q: What do you call a blind pre-historic animal? A: Diyathinkhesaurus. @@ -41467,25 +41302,6 @@ Spock: Affirmative. Kirk: Mr. Sulu, go to pass two. Sulu: Aye aye, sir, going to pass two. % -Scratch the disks, dump the core, Shut it down, pull the plug -Roll the tapes across the floor, Give the core an extra tug -And the system is going to crash. And the system is going to crash. -Teletypes smashed to bits. Mem'ry cards, one and all, -Give the scopes some nasty hits Toss out halfway down the hall -And the system is going to crash. And the system is going to crash. -And we've also found Just flip one switch -When you turn the power down, And the lights will cease to twitch -You turn the disk readers into trash. And the tape drives will crumble -Oh, it's so much fun, in a flash. -Now the CPU won't run When the CPU -And the system is going to crash. Can print nothing out but "foo," - The system is going to crash. - -- To The Caissons Go Rolling Along -% -Scratch the disks! -Drop the core! -Roll the tapes across the floor! -% Screw up your courage! You've screwed up everything else. % Scribline, n.: @@ -46662,7 +46478,8 @@ often turn to a related (but infinitely % THE LESSER-KNOWN PROGRAMMING LANGUAGES #14 -- VALGOL - VALGOL is enjoying a dramatic surge of popularity across the + From its modest beginnings in Southern California's San Fernando +Valley VALGOL is enjoying a dramatic surge of popularity across the industry. VALGOL commands include REALLY, LIKE, WELL, and Y*KNOW. Variables are assigned with the =LIKE and =TOTALLY operators. Other operators include the "California booleans", AX and NOWAY. Loops are @@ -48369,9 +48186,6 @@ and peculiar sort of voluntary thinking. The solution of this problem is trivial and is left as an exercise for the reader. % -The solution to a problem changes the nature of the problem. - -- Peer -% The somewhat old and crusty vicar was taking a well-earned retirement from his rather old and crusty parish. As is usual in these cases, a locum was sent to cover the transition period. This particular man was young and @@ -52040,7 +51854,7 @@ yourself and that which may have an inte as much as it is possible for you to receive of this thing, and which may in some way be influenced by this ceremony. Amen. - -- Roger Zelazny, "Creatures of Light and Darkness" + -- Roger Zelazny, "Creatures of Light and Darkness", 1969 % To understand a program you must become both the machine and the program. % @@ -56789,22 +56603,6 @@ I'd LOVE to, but... -- I'm teaching my ferret to yodel. -- My crayons all melted together. % -Why I Can't Go Out With You: - -I'd LOVE to, but ... - -- I have to floss my cat. - -- I've dedicated my life to linguini. - -- I need to spend more time with my blender. - -- it wouldn't be fair to the other Beautiful People. - -- it's my night to pet the dog/ferret/goldfish. - -- I'm going downtown to try on some gloves. - -- I have to check the freshness dates on my dairy products. - -- I'm going down to the bakery to watch the buns rise. - -- I have an appointment with a cuticle specialist. - -- I have some really hard words to look up. - -- I've got a Friends of the Lowly Rutabaga meeting. - -- I promised to help a friend fold road maps. -% Why is it called a funny bone when it hurts so much? % Why is it taking so long for her to bring out all the good in you? @@ -57859,9 +57657,6 @@ a private eye. Yeah, there are more important things in life than money, but they won't go out with you if you don't have any. % -YEAR: - A period of three hundred and sixty-five disappointments. -% Year Name James Bond Book ---- -------------------------------- -------------- ---- 50's James Bond TV Series Barry Nelson From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 02:21:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2F081065670; Fri, 15 Jan 2010 02:21:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF04B8FC17; Fri, 15 Jan 2010 02:21:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F2LtkE017214; Fri, 15 Jan 2010 02:21:55 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F2Lsto017211; Fri, 15 Jan 2010 02:21:54 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150221.o0F2Lsto017211@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 02:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202328 - stable/7/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 02:21:55 -0000 Author: dougb Date: Fri Jan 15 02:21:54 2010 New Revision: 202328 URL: http://svn.freebsd.org/changeset/base/202328 Log: MFC r201601: Remove more duplicates Minor reformatting on a few Modified: stable/7/games/fortune/datfiles/fortunes Directory Properties: stable/7/games/fortune/ (props changed) stable/7/games/fortune/datfiles/ (props changed) stable/7/games/fortune/datfiles/freebsd-tips (props changed) stable/7/games/fortune/fortune/ (props changed) Modified: stable/7/games/fortune/datfiles/fortunes ============================================================================== --- stable/7/games/fortune/datfiles/fortunes Fri Jan 15 02:18:07 2010 (r202327) +++ stable/7/games/fortune/datfiles/fortunes Fri Jan 15 02:21:54 2010 (r202328) @@ -1696,14 +1696,6 @@ the Cat. "Then it doesn't matter which way you go," said the Cat. -- Lewis Carroll % - COMMENT - -Oh, life is a glorious cycle of song, -A medley of extemporanea; -And love is thing that can never go wrong; -And I am Marie of Roumania. - -- Dorothy Parker -% Concerning the war in Vietnam, Senator George Aiken of Vermont noted in January, 1966, "I'm not very keen for doves or hawks. I think we need more owls." @@ -1923,22 +1915,6 @@ Christmas tree. The piano is missing. you rent your home and own Firearms, in which case you can go to level 4. The best way to get to level 3 is egg-nog. % - FIGHTING WORDS - -Say my love is easy had, - Say I'm bitten raw with pride, -Say I am too often sad -- - Still behold me at your side. - -Say I'm neither brave nor young, - Say I woo and coddle care, -Say the devil touched my tongue -- - Still you have my heart to wear. - -But say my verses do not scan, - And I get me another man! - -- Dorothy Parker -% "For I perceive that behind this seemingly unrelated sequence of events, there lurks a singular, sinister attitude of mind." @@ -2210,20 +2186,6 @@ full of money before." "Didn't you see it?" "Damn kid had it under his coat." % - Hug O' War - -I will not play at tug o' war. -I'd rather play at hug o' war, -Where everyone hugs -Instead of tugs, -Where everyone giggles -And rolls on the rug, -Where everyone kisses, -And everyone grins, -And everyone cuddles, -And everyone wins. - -- Shel Silverstein -% Human thinking can skip over a great deal, leap over small misunderstandings, can contain ifs and buts in untroubled corners of the mind. But the machine has no corners. Despite all the attempts to @@ -2677,33 +2639,6 @@ right any day." life-style otherwise." -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" % - Insofar as I may be heard by anything, which may or may not care -what I say, I ask, if it matters, that you be forgiven for anything you -may have done or failed to do which requires forgiveness. Conversely, if -not forgiveness but something else may be required to insure any possible -benefit for which you may be eligible after the destruction of your body, -I ask this, whatever it may be, be granted or withheld, as the case may be, -in such a manner as to insure your receiving said benefit. I ask this in my -capacity as your elected intermediary between yourself and that which may -not be yourself, but which may have an interest in the matter of your -receiving as much as it is possible for you to receive of this thing, and -which may in some way be influenced by this ceremony. - Amen. - -- Roger Zelazny, "Creatures of Light and Darkness", 1969 -% - INVENTORY -Four be the things I am wiser to know: -Idleness, sorrow, a friend, and a foe. - -Four be the things I'd been better without: -Love, curiosity, freckles, and doubt. - -Three be the things I shall never attain: -Envy, content, and sufficient champagne. - -Three be the things I shall have till I die: -Laughter and hope and a sock in the eye. -% "Is there any point to which you would wish to draw my attention?" "To the curious incident of the dog in the night-time." "The dog did nothing in the night-time." @@ -3983,28 +3918,6 @@ almost succeeded in getting a VAX to thi organization say that each time the machine fails to think it ceases to exist. % - THE LESSER-KNOWN PROGRAMMING LANGUAGES #5: VALGOL -From its modest beginnings in Southern California's San Fernando Valley, -VALGOL is enjoying a dramatic surge of popularity across the industry. - -Here is a sample program: - LIKE, Y*KNOW(I MEAN)START - IF PIZZA = LIKE BITCHEN AND GUY = LIKE TUBULAR AND - VALLEY GIRL = LIKE GRODY**MAX(FERSURE)**2 THEN - FOR I = LIKE 1 TO OH*MAYBE 100 - DO*WAH - (DITTY**2) - BARF(I)=TOTALLY GROSS(OUT) - SURE - LIKE BAG THIS PROGRAM - REALLY - LIKE TOTALLY (Y*KNOW) - IM*SURE - GOTO THE MALL - -When the user makes a syntax error, the interpreter displays the message: - - GAG ME WITH A SPOON!! -% THE LESSER-KNOWN PROGRAMMING LANGUAGES #8: LAIDBACK This language was developed at the Marin County Center for T'ai Chi, @@ -5335,9 +5248,6 @@ that he didn't force you down on the ask -- A plethora of individuals wither expertise in culinary techniques vitiated the potable concoction produced by steeping certain coupestibles. -- Eleemosynary deeds have their initial incidence intramurally. --- Male cadavers are incapable of yielding testimony. --- Individuals who make their abode in vitreous edifices would be well - advised to refrain from catapulting projectiles. % =============== ALL FRESHMEN PLEASE NOTE =============== @@ -11076,9 +10986,6 @@ Armstrong's Collection Law: If the check is truly in the mail, it is surely made out to someone else. % -Arnold's Addendum: - Anything not fitting into these categories causes cancer in rats. -% Arnold's Laws of Documentation: 1.) If it should exist, it doesn't. 2.) If it does exist, it's out of date. @@ -12654,7 +12561,7 @@ Boren's Laws: (2) When in trouble, delegate. (3) When in doubt, mumble. % -boss, n: +Boss, n: According to the Oxford English Dictionary, in the Middle Ages the words "boss" and "botch" were largely synonymous, except that boss, in addition to meaning "a supervisor of workers" also meant "an @@ -12935,7 +12842,7 @@ wrote the program. Fortunately, the second-to-last bug has just been fixed. -- Ray Simard % -bug, n: +Bug, n: An elusive creature living in a program that makes it incorrect. The activity of "debugging", or removing bugs from a program, ends when people get tired of doing it, not when the bugs are removed. @@ -13524,14 +13431,14 @@ only robust persons doing this thing is others who have tried it. -- Ambrose Bierce, "The Devil's Dictionary" % - -Certain passages in several laws have always defied interpretation and the -most inexplicable must be a matter of opinion. A judge of the Court of -Session of Scotland has sent the editors of this book his candidate which -reads, "In the Nuts (unground), (other than ground nuts) Order, the expression -nuts shall have reference to such nuts, other than ground nuts, as would -but for this amending Order not qualify as nuts (unground) (other than ground -nuts) by reason of their being nuts (unground)." +Certain passages in several laws have always defied interpretation and +the most inexplicable must be a matter of opinion. A judge of the Court +of Session of Scotland has sent the editors of this book his candidate +which reads, "In the Nuts (unground), (other than ground nuts) Order, +the expression nuts shall have reference to such nuts, other than ground +nuts, as would but for this amending Order not qualify as nuts +(unground) (other than ground nuts) by reason of their being nuts +(unground)." -- Guinness Book of World Records, 1973 % Certainly the game is rigged. @@ -15057,17 +14964,6 @@ letter, or even 25 cents on a stamp! so post it as many places as you can. -- Emily Postnews Answers Your Questions on Netiquette % -Dear Sir, - I am firmly opposed to the spread of microchips either to the home or -to the office. We have more than enough of them foisted upon us in public -places. They are a disgusting Americanism, and can only result in the farmers -being forced to grow smaller potatoes, which in turn will cause massive un- -employment in the already severely depressed agricultural industry. - Yours faithfully, - Capt. Quinton D'Arcy, J.P. - Sevenoaks - -- Letters To The Editor, The Times of London -% Death before dishonor. But neither before breakfast. % @@ -17838,9 +17734,6 @@ Finagle's Eleventh Law: it happened according to his pet theory. % Finagle's First Law: - If an experiment works, something has gone wrong. -% -Finagle's First Law: To study a subject best, understand it thoroughly before you start. Finagle's Second Law: @@ -18173,9 +18066,6 @@ For children with short attention spans: For courage mounteth with occasion. -- William Shakespeare, "King John" % -For every action, there is an equal and opposite criticism. - -- Harrison -% For every bloke who makes his mark, there's half a dozen waiting to rub it out. -- Andy Capp @@ -19520,17 +19410,6 @@ Your butt is on the menu And the check is in the mail. -- The Piranha Club Anthem, to the tune of "De Camptown Races" % -From the "Guinness Book of World Records", 1973: - -Certain passages in several laws have always defied interpretation and -the most inexplicable must be a matter of opinion. A judge of the -Court of Session of Scotland has sent the editors of this book his -candidate which reads, "In the Nuts (unground), (other than ground -nuts) Order, the expression nuts shall have reference to such nuts, -other than ground nuts, as would but for this amending Order not -qualify as nuts (unground)(other than ground nuts) by reason of their -being nuts (unground)." -% From the moment I picked your book up until I put it down I was convulsed with laughter. Some day I intend reading it. -- Groucho Marx, from "The Book of Insults" @@ -24035,21 +23914,6 @@ I may not be totally perfect, but parts I met a wonderful new man. He's fictional, but you can't have everything. -- Cecelia, "The Purple Rose of Cairo" % -I met him in a swamp down in Dagobah -Where it bubbles all the time like a giant cabinet soda - S-O-D-A soda -I saw the little runt sitting there on a log -I asked him his name and in a raspy voice he said Yoda - Y-O-D-A Yoda, Yo-Yo-Yo-Yo Yoda - -Well I've been around but I ain't never seen -A guy who looks like a Muppet but he's wrinkled and green - Oh my Yoda, Yo-Yo-Yo-Yo Yoda -Well I'm not dumb but I can't understand -How he can raise me in the air just by raising his hand - Oh my Yoda, Yo-Yo-Yo-Yo Yoda, Yo-Yo-Yo-Yo Yoda - -- The STAR WARS Song, to "Lola", by the Kinks -% I met my latest girl friend in a department store. She was looking at clothes, and I was putting Slinkys on the escalators. -- Steven Wright @@ -24524,10 +24388,6 @@ are worth considering, to wit: "When paying tolls, remember that it is necessary to release the quarter a full 3 seconds before passing the basket if you are traveling more than 60 MPH." - -[110.13]: - "When traveling on a one-way street, stay to the right, so as not - to interfere with oncoming traffic." % I suppose some of the variation between Boston drivers and the rest of the country is due to the progressive Massachusetts Driver Education Manual which @@ -24621,12 +24481,6 @@ I think that I shall never see A billboard lovely as a tree. Indeed, unless the billboards fall I'll never see a tree at all. - -- Nash -% -I think that I shall never see -A billboard lovely as a tree. -Perhaps, unless the billboards fall -I'll never see a tree at all. -- Ogden Nash % I think that I shall never see @@ -25892,21 +25746,6 @@ this is the case, then programmers stand software engineers dig each other's graves. -- Unknown % -If I have seen farther than others, it is because I was standing on the -shoulders of giants. - -- Isaac Newton - -In the sciences, we are now uniquely privileged to sit side by side -with the giants on whose shoulders we stand. - -- Gerald Holton - -If I have not seen as far as others, it is because giants were standing -on my shoulders. - -- Hal Abelson - -In computer science, we stand on each other's feet. - -- Brian K. Reid -% If I have to lay an egg for my country, I'll do it. -- Bob Hope % @@ -37634,7 +37473,7 @@ Pardo's First Postulate: fattening. Arnold's Addendum: - Everything else causes cancer in rats. + Anything not fitting into these categories causes cancer in rats. % Parents often talk about the younger generation as if they didn't have much of anything to do with it. @@ -39431,10 +39270,6 @@ A: A dope ring. Q: Why do blondes put their hair in ponytails? A: To cover up the valve stem. - -Q: Why did the blonde get so excited after she finished her jigsaw - puzzle in only 6 months? -A: Because on the box it said "From 2-4 years". % Q: What do you call a blind pre-historic animal? A: Diyathinkhesaurus. @@ -41467,25 +41302,6 @@ Spock: Affirmative. Kirk: Mr. Sulu, go to pass two. Sulu: Aye aye, sir, going to pass two. % -Scratch the disks, dump the core, Shut it down, pull the plug -Roll the tapes across the floor, Give the core an extra tug -And the system is going to crash. And the system is going to crash. -Teletypes smashed to bits. Mem'ry cards, one and all, -Give the scopes some nasty hits Toss out halfway down the hall -And the system is going to crash. And the system is going to crash. -And we've also found Just flip one switch -When you turn the power down, And the lights will cease to twitch -You turn the disk readers into trash. And the tape drives will crumble -Oh, it's so much fun, in a flash. -Now the CPU won't run When the CPU -And the system is going to crash. Can print nothing out but "foo," - The system is going to crash. - -- To The Caissons Go Rolling Along -% -Scratch the disks! -Drop the core! -Roll the tapes across the floor! -% Screw up your courage! You've screwed up everything else. % Scribline, n.: @@ -46662,7 +46478,8 @@ often turn to a related (but infinitely % THE LESSER-KNOWN PROGRAMMING LANGUAGES #14 -- VALGOL - VALGOL is enjoying a dramatic surge of popularity across the + From its modest beginnings in Southern California's San Fernando +Valley VALGOL is enjoying a dramatic surge of popularity across the industry. VALGOL commands include REALLY, LIKE, WELL, and Y*KNOW. Variables are assigned with the =LIKE and =TOTALLY operators. Other operators include the "California booleans", AX and NOWAY. Loops are @@ -48369,9 +48186,6 @@ and peculiar sort of voluntary thinking. The solution of this problem is trivial and is left as an exercise for the reader. % -The solution to a problem changes the nature of the problem. - -- Peer -% The somewhat old and crusty vicar was taking a well-earned retirement from his rather old and crusty parish. As is usual in these cases, a locum was sent to cover the transition period. This particular man was young and @@ -52040,7 +51854,7 @@ yourself and that which may have an inte as much as it is possible for you to receive of this thing, and which may in some way be influenced by this ceremony. Amen. - -- Roger Zelazny, "Creatures of Light and Darkness" + -- Roger Zelazny, "Creatures of Light and Darkness", 1969 % To understand a program you must become both the machine and the program. % @@ -56789,22 +56603,6 @@ I'd LOVE to, but... -- I'm teaching my ferret to yodel. -- My crayons all melted together. % -Why I Can't Go Out With You: - -I'd LOVE to, but ... - -- I have to floss my cat. - -- I've dedicated my life to linguini. - -- I need to spend more time with my blender. - -- it wouldn't be fair to the other Beautiful People. - -- it's my night to pet the dog/ferret/goldfish. - -- I'm going downtown to try on some gloves. - -- I have to check the freshness dates on my dairy products. - -- I'm going down to the bakery to watch the buns rise. - -- I have an appointment with a cuticle specialist. - -- I have some really hard words to look up. - -- I've got a Friends of the Lowly Rutabaga meeting. - -- I promised to help a friend fold road maps. -% Why is it called a funny bone when it hurts so much? % Why is it taking so long for her to bring out all the good in you? @@ -57859,9 +57657,6 @@ a private eye. Yeah, there are more important things in life than money, but they won't go out with you if you don't have any. % -YEAR: - A period of three hundred and sixty-five disappointments. -% Year Name James Bond Book ---- -------------------------------- -------------- ---- 50's James Bond TV Series Barry Nelson From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 02:55:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFC9F10656C1; Fri, 15 Jan 2010 02:55:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A39CE8FC0C; Fri, 15 Jan 2010 02:55:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F2tJ6U024735; Fri, 15 Jan 2010 02:55:19 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F2tJw7024734; Fri, 15 Jan 2010 02:55:19 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150255.o0F2tJw7024734@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 02:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202329 - stable/8/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 02:55:19 -0000 Author: dougb Date: Fri Jan 15 02:55:19 2010 New Revision: 202329 URL: http://svn.freebsd.org/changeset/base/202329 Log: MFC r201626: - Move potentially offensive quotes I committed recently to fortunes-o. - Reference date. - Be more clear on context. MFC r201764: For the now-infamous Rumsfeld quote: Change "there're" to "there are" which is consistent with the vast majority of on line references. Remove a spurious trailing " Update the citation text with a suggestion from des. Modified: stable/8/games/fortune/datfiles/fortunes-o.real Directory Properties: stable/8/games/fortune/ (props changed) stable/8/games/fortune/datfiles/ (props changed) Modified: stable/8/games/fortune/datfiles/fortunes-o.real ============================================================================== --- stable/8/games/fortune/datfiles/fortunes-o.real Fri Jan 15 02:21:54 2010 (r202328) +++ stable/8/games/fortune/datfiles/fortunes-o.real Fri Jan 15 02:55:19 2010 (r202329) @@ -663,6 +663,13 @@ posh hotel. "Why, yes, young man," said the gentleman. "Would you bring me a postcard?" % + As we know, there are known knowns. There are things we know we +know. We also know there are known unknowns. That is to say, we know +there are some things we do not know. But there are also unknown +unknowns; the ones we don't know we don't know. + -- United States Secretary of Defense Donald Rumsfeld + 12 February 2002, Regarding the US invasion of Iraq +% "Are pirates an ethnic group? Or are they just people who burn illegal cds?" "Arrrr! We prefer to be called Buccaneer-Americans." @@ -12873,6 +12880,14 @@ Contraception", has been withdrawn after pull it out at the last minute. -- Not the Nine O'Clock News % +The investment community feels very putupon. They feel there is no +reason why they shouldn't earn $1 million to $200 million a year, +and they don't want to be held responsible for the global financial +meltdown. + -- Daniel Fass, Chairman of United States President + Barack Obama's financial-industry fundraising party + 20 October 2009 +% The king arranged a regal marriage for his daughter -- a bond that would unite two great kingdoms. Yet, because the young couple seemed so formal to each other, he posted a spy outside the royal wedding chamber and demanded a full From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 02:58:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20B8B1065695; Fri, 15 Jan 2010 02:58:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8E2B8FC1A; Fri, 15 Jan 2010 02:58:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F2wME3025441; Fri, 15 Jan 2010 02:58:22 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F2wMBO025439; Fri, 15 Jan 2010 02:58:22 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150258.o0F2wMBO025439@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 02:58:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202330 - stable/7/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 02:58:23 -0000 Author: dougb Date: Fri Jan 15 02:58:22 2010 New Revision: 202330 URL: http://svn.freebsd.org/changeset/base/202330 Log: MFC r201626: - Move potentially offensive quotes I committed recently to fortunes-o. - Reference date. - Be more clear on context. MFC r201764: For the now-infamous Rumsfeld quote: Change "there're" to "there are" which is consistent with the vast majority of on line references. Remove a spurious trailing " Update the citation text with a suggestion from des. Modified: stable/7/games/fortune/datfiles/fortunes-o.real Directory Properties: stable/7/games/fortune/ (props changed) stable/7/games/fortune/datfiles/ (props changed) stable/7/games/fortune/datfiles/freebsd-tips (props changed) stable/7/games/fortune/fortune/ (props changed) Modified: stable/7/games/fortune/datfiles/fortunes-o.real ============================================================================== --- stable/7/games/fortune/datfiles/fortunes-o.real Fri Jan 15 02:55:19 2010 (r202329) +++ stable/7/games/fortune/datfiles/fortunes-o.real Fri Jan 15 02:58:22 2010 (r202330) @@ -663,6 +663,13 @@ posh hotel. "Why, yes, young man," said the gentleman. "Would you bring me a postcard?" % + As we know, there are known knowns. There are things we know we +know. We also know there are known unknowns. That is to say, we know +there are some things we do not know. But there are also unknown +unknowns; the ones we don't know we don't know. + -- United States Secretary of Defense Donald Rumsfeld + 12 February 2002, Regarding the US invasion of Iraq +% "Are pirates an ethnic group? Or are they just people who burn illegal cds?" "Arrrr! We prefer to be called Buccaneer-Americans." @@ -12873,6 +12880,14 @@ Contraception", has been withdrawn after pull it out at the last minute. -- Not the Nine O'Clock News % +The investment community feels very putupon. They feel there is no +reason why they shouldn't earn $1 million to $200 million a year, +and they don't want to be held responsible for the global financial +meltdown. + -- Daniel Fass, Chairman of United States President + Barack Obama's financial-industry fundraising party + 20 October 2009 +% The king arranged a regal marriage for his daughter -- a bond that would unite two great kingdoms. Yet, because the young couple seemed so formal to each other, he posted a spy outside the royal wedding chamber and demanded a full From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 03:03:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CED01065694; Fri, 15 Jan 2010 03:03:02 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4999D8FC1A; Fri, 15 Jan 2010 03:03:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F332vv026647; Fri, 15 Jan 2010 03:03:02 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F332Ov026645; Fri, 15 Jan 2010 03:03:02 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150303.o0F332Ov026645@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 03:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202331 - stable/8/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 03:03:02 -0000 Author: dougb Date: Fri Jan 15 03:03:02 2010 New Revision: 202331 URL: http://svn.freebsd.org/changeset/base/202331 Log: MFC r201367, r201370: Virtualize the location of "the configuration directory" instead of hard-coding it to be /etc/namedb Modified: stable/8/etc/rc.d/named Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.d/named ============================================================================== --- stable/8/etc/rc.d/named Fri Jan 15 02:58:22 2010 (r202330) +++ stable/8/etc/rc.d/named Fri Jan 15 03:03:02 2010 (r202331) @@ -43,19 +43,19 @@ chroot_autoupdate() warn "chroot directory structure not updated" fi - # Create /etc/namedb symlink + # Create (or update) the configuration directory symlink # - if [ ! -L /etc/namedb ]; then - if [ -d /etc/namedb ]; then - warn "named chroot: /etc/namedb is a directory!" - elif [ -e /etc/namedb ]; then - warn "named chroot: /etc/namedb exists!" + if [ ! -L "${named_conf%/*}" ]; then + if [ -d "${named_conf%/*}" ]; then + warn "named chroot: ${named_conf%/*} is a directory!" + elif [ -e "${named_conf%/*}" ]; then + warn "named chroot: ${named_conf%/*} exists!" else - ln -s ${named_chrootdir}/etc/namedb /etc/namedb + ln -s ${named_confdir} ${named_conf%/*} fi else # Make sure it points to the right place. - ln -shf ${named_chrootdir}/etc/namedb /etc/namedb + ln -shf ${named_confdir} ${named_conf%/*} fi # Mount a devfs in the chroot directory if needed @@ -179,12 +179,12 @@ named_prestart() # Create an rndc.key file for the user if none exists # confgen_command="${command%/named}/rndc-confgen -a -b256 -u $named_uid \ - -c ${named_chrootdir}/etc/namedb/rndc.key" - if [ -s "${named_chrootdir}/etc/namedb/rndc.conf" ]; then + -c ${named_confdir}/rndc.key" + if [ -s "${named_confdir}/rndc.conf" ]; then unset confgen_command fi - if [ -s "${named_chrootdir}/etc/namedb/rndc.key" ]; then - case `stat -f%Su ${named_chrootdir}/etc/namedb/rndc.key` in + if [ -s "${named_confdir}/rndc.key" ]; then + case `stat -f%Su ${named_confdir}/rndc.key` in root|$named_uid) ;; *) $confgen_command ;; esac @@ -198,8 +198,8 @@ named_prestart() warn "named_auto_forward enabled, but no /etc/resolv.conf" # Empty the file in case it is included in named.conf - [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && - create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + [ -s "${named_confdir}/auto_forward.conf" ] && + create_file ${named_confdir}/auto_forward.conf ${command%/named}/named-checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' @@ -248,19 +248,19 @@ named_prestart() mv /var/run/naf-resolv.conf /etc/resolv.conf fi - if cmp -s ${named_chrootdir}/etc/namedb/auto_forward.conf \ + if cmp -s ${named_confdir}/auto_forward.conf \ /var/run/auto_forward.conf; then unlink /var/run/auto_forward.conf else - [ -e "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && - unlink ${named_chrootdir}/etc/namedb/auto_forward.conf + [ -e "${named_confdir}/auto_forward.conf" ] && + unlink ${named_confdir}/auto_forward.conf mv /var/run/auto_forward.conf \ - ${named_chrootdir}/etc/namedb/auto_forward.conf + ${named_confdir}/auto_forward.conf fi else # Empty the file in case it is included in named.conf - [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && - create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + [ -s "${named_confdir}/auto_forward.conf" ] && + create_file ${named_confdir}/auto_forward.conf fi ${command%/named}/named-checkconf $named_conf || @@ -274,5 +274,6 @@ load_rc_config $name required_dirs="$named_chrootdir" # if it is set, it must exist required_files="${named_conf:=/etc/namedb/named.conf}" pidfile="${named_pidfile:-/var/run/named/pid}" +named_confdir="${named_chrootdir}${named_conf%/*}" run_rc_command "$1" From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 03:04:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2644E106566B; Fri, 15 Jan 2010 03:04:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13DCD8FC14; Fri, 15 Jan 2010 03:04:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F34hqb027084; Fri, 15 Jan 2010 03:04:43 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F34hbj027082; Fri, 15 Jan 2010 03:04:43 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150304.o0F34hbj027082@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 03:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202332 - stable/8/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 03:04:44 -0000 Author: dougb Date: Fri Jan 15 03:04:43 2010 New Revision: 202332 URL: http://svn.freebsd.org/changeset/base/202332 Log: MFC r201368: Update named_flags comment regarding not using it for -u and -c Modified: stable/8/etc/defaults/rc.conf Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/defaults/rc.conf ============================================================================== --- stable/8/etc/defaults/rc.conf Fri Jan 15 03:03:02 2010 (r202331) +++ stable/8/etc/defaults/rc.conf Fri Jan 15 03:04:43 2010 (r202332) @@ -252,7 +252,7 @@ inetd_flags="-wW -C 60" # Optional flag named_enable="NO" # Run named, the DNS server (or NO). named_program="/usr/sbin/named" # Path to named, if you want a different one. named_conf="/etc/namedb/named.conf" # Path to the configuration file -#named_flags="-c /etc/namedb/named.conf" # Uncomment for named not in /usr/sbin +#named_flags="" # Use this for flags OTHER than -u and -c named_pidfile="/var/run/named/pid" # Must set this in named.conf as well named_uid="bind" # User to run named as named_chrootdir="/var/named" # Chroot directory (or "" not to auto-chroot it) From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 03:05:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BF4810656BF; Fri, 15 Jan 2010 03:05:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 597078FC25; Fri, 15 Jan 2010 03:05:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F35kbE027374; Fri, 15 Jan 2010 03:05:46 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F35kdE027372; Fri, 15 Jan 2010 03:05:46 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150305.o0F35kdE027372@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 03:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202333 - stable/7/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 03:05:46 -0000 Author: dougb Date: Fri Jan 15 03:05:46 2010 New Revision: 202333 URL: http://svn.freebsd.org/changeset/base/202333 Log: MFC r201367, r201370: Virtualize the location of "the configuration directory" instead of hard-coding it to be /etc/namedb Modified: stable/7/etc/rc.d/named Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.d/named ============================================================================== --- stable/7/etc/rc.d/named Fri Jan 15 03:04:43 2010 (r202332) +++ stable/7/etc/rc.d/named Fri Jan 15 03:05:46 2010 (r202333) @@ -43,19 +43,19 @@ chroot_autoupdate() warn "chroot directory structure not updated" fi - # Create /etc/namedb symlink + # Create (or update) the configuration directory symlink # - if [ ! -L /etc/namedb ]; then - if [ -d /etc/namedb ]; then - warn "named chroot: /etc/namedb is a directory!" - elif [ -e /etc/namedb ]; then - warn "named chroot: /etc/namedb exists!" + if [ ! -L "${named_conf%/*}" ]; then + if [ -d "${named_conf%/*}" ]; then + warn "named chroot: ${named_conf%/*} is a directory!" + elif [ -e "${named_conf%/*}" ]; then + warn "named chroot: ${named_conf%/*} exists!" else - ln -s ${named_chrootdir}/etc/namedb /etc/namedb + ln -s ${named_confdir} ${named_conf%/*} fi else # Make sure it points to the right place. - ln -shf ${named_chrootdir}/etc/namedb /etc/namedb + ln -shf ${named_confdir} ${named_conf%/*} fi # Mount a devfs in the chroot directory if needed @@ -179,12 +179,12 @@ named_prestart() # Create an rndc.key file for the user if none exists # confgen_command="${command%/named}/rndc-confgen -a -b256 -u $named_uid \ - -c ${named_chrootdir}/etc/namedb/rndc.key" - if [ -s "${named_chrootdir}/etc/namedb/rndc.conf" ]; then + -c ${named_confdir}/rndc.key" + if [ -s "${named_confdir}/rndc.conf" ]; then unset confgen_command fi - if [ -s "${named_chrootdir}/etc/namedb/rndc.key" ]; then - case `stat -f%Su ${named_chrootdir}/etc/namedb/rndc.key` in + if [ -s "${named_confdir}/rndc.key" ]; then + case `stat -f%Su ${named_confdir}/rndc.key` in root|$named_uid) ;; *) $confgen_command ;; esac @@ -198,8 +198,8 @@ named_prestart() warn "named_auto_forward enabled, but no /etc/resolv.conf" # Empty the file in case it is included in named.conf - [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && - create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + [ -s "${named_confdir}/auto_forward.conf" ] && + create_file ${named_confdir}/auto_forward.conf ${command%/named}/named-checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' @@ -248,19 +248,19 @@ named_prestart() mv /var/run/naf-resolv.conf /etc/resolv.conf fi - if cmp -s ${named_chrootdir}/etc/namedb/auto_forward.conf \ + if cmp -s ${named_confdir}/auto_forward.conf \ /var/run/auto_forward.conf; then unlink /var/run/auto_forward.conf else - [ -e "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && - unlink ${named_chrootdir}/etc/namedb/auto_forward.conf + [ -e "${named_confdir}/auto_forward.conf" ] && + unlink ${named_confdir}/auto_forward.conf mv /var/run/auto_forward.conf \ - ${named_chrootdir}/etc/namedb/auto_forward.conf + ${named_confdir}/auto_forward.conf fi else # Empty the file in case it is included in named.conf - [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && - create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + [ -s "${named_confdir}/auto_forward.conf" ] && + create_file ${named_confdir}/auto_forward.conf fi ${command%/named}/named-checkconf $named_conf || @@ -274,5 +274,6 @@ load_rc_config $name required_dirs="$named_chrootdir" # if it is set, it must exist required_files="${named_conf:=/etc/namedb/named.conf}" pidfile="${named_pidfile:-/var/run/named/pid}" +named_confdir="${named_chrootdir}${named_conf%/*}" run_rc_command "$1" From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 03:06:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D9AD106568B; Fri, 15 Jan 2010 03:06:39 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B5538FC19; Fri, 15 Jan 2010 03:06:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F36duN027617; Fri, 15 Jan 2010 03:06:39 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F36d0t027615; Fri, 15 Jan 2010 03:06:39 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150306.o0F36d0t027615@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 03:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202334 - stable/7/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 03:06:39 -0000 Author: dougb Date: Fri Jan 15 03:06:39 2010 New Revision: 202334 URL: http://svn.freebsd.org/changeset/base/202334 Log: MFC r201368: Update named_flags comment regarding not using it for -u and -c Modified: stable/7/etc/defaults/rc.conf Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/defaults/rc.conf ============================================================================== --- stable/7/etc/defaults/rc.conf Fri Jan 15 03:05:46 2010 (r202333) +++ stable/7/etc/defaults/rc.conf Fri Jan 15 03:06:39 2010 (r202334) @@ -244,7 +244,7 @@ inetd_flags="-wW -C 60" # Optional flag named_enable="NO" # Run named, the DNS server (or NO). named_program="/usr/sbin/named" # Path to named, if you want a different one. named_conf="/etc/namedb/named.conf" # Path to the configuration file -#named_flags="-c /etc/namedb/named.conf" # Uncomment for named not in /usr/sbin +#named_flags="" # Use this for flags OTHER than -u and -c named_pidfile="/var/run/named/pid" # Must set this in named.conf as well named_uid="bind" # User to run named as named_chrootdir="/var/named" # Chroot directory (or "" not to auto-chroot it) From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 03:07:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B91AB1065672; Fri, 15 Jan 2010 03:07:42 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A66AA8FC1C; Fri, 15 Jan 2010 03:07:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F37gvq027899; Fri, 15 Jan 2010 03:07:42 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F37g4K027897; Fri, 15 Jan 2010 03:07:42 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150307.o0F37g4K027897@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 03:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202335 - stable/6/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 03:07:42 -0000 Author: dougb Date: Fri Jan 15 03:07:42 2010 New Revision: 202335 URL: http://svn.freebsd.org/changeset/base/202335 Log: MFC r201367, r201370: Virtualize the location of "the configuration directory" instead of hard-coding it to be /etc/namedb Modified: stable/6/etc/rc.d/named Directory Properties: stable/6/etc/ (props changed) Modified: stable/6/etc/rc.d/named ============================================================================== --- stable/6/etc/rc.d/named Fri Jan 15 03:06:39 2010 (r202334) +++ stable/6/etc/rc.d/named Fri Jan 15 03:07:42 2010 (r202335) @@ -44,19 +44,19 @@ chroot_autoupdate() warn "chroot directory structure not updated" fi - # Create /etc/namedb symlink + # Create (or update) the configuration directory symlink # - if [ ! -L /etc/namedb ]; then - if [ -d /etc/namedb ]; then - warn "named chroot: /etc/namedb is a directory!" - elif [ -e /etc/namedb ]; then - warn "named chroot: /etc/namedb exists!" + if [ ! -L "${named_conf%/*}" ]; then + if [ -d "${named_conf%/*}" ]; then + warn "named chroot: ${named_conf%/*} is a directory!" + elif [ -e "${named_conf%/*}" ]; then + warn "named chroot: ${named_conf%/*} exists!" else - ln -s ${named_chrootdir}/etc/namedb /etc/namedb + ln -s ${named_confdir} ${named_conf%/*} fi else # Make sure it points to the right place. - ln -shf ${named_chrootdir}/etc/namedb /etc/namedb + ln -shf ${named_confdir} ${named_conf%/*} fi # Mount a devfs in the chroot directory if needed @@ -180,12 +180,12 @@ named_prestart() # Create an rndc.key file for the user if none exists # confgen_command="${command%/named}/rndc-confgen -a -b256 -u $named_uid \ - -c ${named_chrootdir}/etc/namedb/rndc.key" - if [ -s "${named_chrootdir}/etc/namedb/rndc.conf" ]; then + -c ${named_confdir}/rndc.key" + if [ -s "${named_confdir}/rndc.conf" ]; then unset confgen_command fi - if [ -s "${named_chrootdir}/etc/namedb/rndc.key" ]; then - case `stat -f%Su ${named_chrootdir}/etc/namedb/rndc.key` in + if [ -s "${named_confdir}/rndc.key" ]; then + case `stat -f%Su ${named_confdir}/rndc.key` in root|$named_uid) ;; *) $confgen_command ;; esac @@ -199,8 +199,8 @@ named_prestart() warn "named_auto_forward enabled, but no /etc/resolv.conf" # Empty the file in case it is included in named.conf - [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && - create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + [ -s "${named_confdir}/auto_forward.conf" ] && + create_file ${named_confdir}/auto_forward.conf ${command%/named}/named-checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' @@ -249,19 +249,19 @@ named_prestart() mv /var/run/naf-resolv.conf /etc/resolv.conf fi - if cmp -s ${named_chrootdir}/etc/namedb/auto_forward.conf \ + if cmp -s ${named_confdir}/auto_forward.conf \ /var/run/auto_forward.conf; then unlink /var/run/auto_forward.conf else - [ -e "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && - unlink ${named_chrootdir}/etc/namedb/auto_forward.conf + [ -e "${named_confdir}/auto_forward.conf" ] && + unlink ${named_confdir}/auto_forward.conf mv /var/run/auto_forward.conf \ - ${named_chrootdir}/etc/namedb/auto_forward.conf + ${named_confdir}/auto_forward.conf fi else # Empty the file in case it is included in named.conf - [ -s "${named_chrootdir}/etc/namedb/auto_forward.conf" ] && - create_file ${named_chrootdir}/etc/namedb/auto_forward.conf + [ -s "${named_confdir}/auto_forward.conf" ] && + create_file ${named_confdir}/auto_forward.conf fi ${command%/named}/named-checkconf $named_conf || @@ -275,5 +275,6 @@ load_rc_config $name required_dirs="$named_chrootdir" # if it is set, it must exist required_files="${named_conf:=/etc/namedb/named.conf}" pidfile="${named_pidfile:-/var/run/named/pid}" +named_confdir="${named_chrootdir}${named_conf%/*}" run_rc_command "$1" From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 03:10:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E690C106566B; Fri, 15 Jan 2010 03:10:09 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D48AF8FC16; Fri, 15 Jan 2010 03:10:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F3A935028647; Fri, 15 Jan 2010 03:10:09 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F3A9JF028645; Fri, 15 Jan 2010 03:10:09 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150310.o0F3A9JF028645@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 03:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202336 - stable/6/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 03:10:10 -0000 Author: dougb Date: Fri Jan 15 03:10:09 2010 New Revision: 202336 URL: http://svn.freebsd.org/changeset/base/202336 Log: MFC r201368: Update named_flags comment regarding not using it for -u and -c Modified: stable/6/etc/defaults/rc.conf Directory Properties: stable/6/etc/ (props changed) Modified: stable/6/etc/defaults/rc.conf ============================================================================== --- stable/6/etc/defaults/rc.conf Fri Jan 15 03:07:42 2010 (r202335) +++ stable/6/etc/defaults/rc.conf Fri Jan 15 03:10:09 2010 (r202336) @@ -222,7 +222,7 @@ inetd_flags="-wW -C 60" # Optional flag named_enable="NO" # Run named, the DNS server (or NO). named_program="/usr/sbin/named" # Path to named, if you want a different one. named_conf="/etc/namedb/named.conf" # Path to the configuration file -#named_flags="-c /etc/namedb/named.conf" # Uncomment for named not in /usr/sbin +#named_flags="" # Use this for flags OTHER than -u and -c named_pidfile="/var/run/named/pid" # Must set this in named.conf as well named_uid="bind" # User to run named as named_chrootdir="/var/named" # Chroot directory (or "" not to auto-chroot it) From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 03:28:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 391AC106566C; Fri, 15 Jan 2010 03:28:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 254908FC12; Fri, 15 Jan 2010 03:28:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F3SlXW032977; Fri, 15 Jan 2010 03:28:47 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F3Sl7X032974; Fri, 15 Jan 2010 03:28:47 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150328.o0F3Sl7X032974@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 03:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202337 - stable/8/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 03:28:47 -0000 Author: dougb Date: Fri Jan 15 03:28:46 2010 New Revision: 202337 URL: http://svn.freebsd.org/changeset/base/202337 Log: MFC r200416: Simplify handling of MTREEFILE relative to DESTDIR Make the message about a missing MTREEFILE combined with -U more informative MFC r200425: Over time things that used to be files/directories/links can change to something else. So add code to detect when things don't match and give the user choices about how to fix it. If we're using -P and something in the above check needs to be moved we need to have the directory there for it, so create it at the beginning and delete empty versions of it at the end. The case where something used to be a file or link and now is supposed to be a directory (e.g., /etc/security) is especially dangerous, so make failure to install a necessary directory in $DESTDIR a fatal error. MFC r200700: In the places where find is used that the user may see the results, first pipe it to sort so that order of processing will be deterministic and like things will be grouped together. MFC r200701: Fix an indentation issue, no functional changes MFC r200708: Fix a problem with how mergemaster handles the hard links for /.cshrc and /.profile. The problem is that install(1) will unlink the old file before it installs the new one, which means that in the best case we have to compare the changes for the old file twice. So, change the logic to first test to see if the link exists, then install the file. Then if the link was there and we're using -i, just create the link in /root and be done with it. Otherwise display the message to the user and give them the option. Because we are now sorting things before doing the comparison we can know conclusively that the files in / should be the sources, and the files in /root will be the targets, so adjust the paths accordingly. While I'm here, split a too-long error message into two lines and just return at the end of handling these files instead of setting the variable that says "do nothing" and then returning at the end of the function anyway. MFC r201291: Add some patches contributed by jhb: 1. Don't prompt the user for "-U but no db" error if we're using -a 2. Add an option to delete stale rc.d files automatically if the user has DELETE_STALE_RC_FILES in their rc file. Lack of command line option for this is not an oversight. 3. Add []'s around the terminal $ for the $FreeBSD$ test for -F For one bug raised by jhb I did a more thorough solution: There were a lot of things that "snuck in" between the end of the test for -r and the start of the comparison. One of them is the creation of the mtree db, as pointed out by jhb. Fix this problem more thoroughly by moving the end of the test down to where it should/used to be, right before the comparison. As a result, indent the interloping code to match. MFC r201292: Document the DELETE_STALE_RC_FILES option introduced in r201291. This is an "rc file only" option by design. While I'm here, update the comments in the example rc file to indicate which command line options they relate to, and correct the defaults for a couple of options. MFC r201293: It's not necessary to include both Op and Fl for command line options included in the text, so use only the latter. Clarify that using -U doesn't make sense in combination with -a MFC r201323: If we are using -p it does not make any sense to even create the MTREENEW file since it will never be used. MFC r201765: Update copyright date Update delete_temproot() to include the error message if it fails, and clean up the places where it's called. If there are no files left in temproot when the comparison is done delete it without prompting. This should make "automated" runs of mergemaster without -a a little easier. Document the new behavior in the man page. Modified: stable/8/usr.sbin/mergemaster/mergemaster.8 stable/8/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/8/usr.sbin/mergemaster/ (props changed) Modified: stable/8/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- stable/8/usr.sbin/mergemaster/mergemaster.8 Fri Jan 15 03:10:09 2010 (r202336) +++ stable/8/usr.sbin/mergemaster/mergemaster.8 Fri Jan 15 03:28:46 2010 (r202337) @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998-2009 Douglas Barton +.\" Copyright (c) 1998-2010 Douglas Barton .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2009 +.Dd January 7, 2010 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -61,10 +61,10 @@ down, populating that environment with t files. You can specify a different source directory with the -.Op Fl m +.Fl m command line option, or specify the destination directory with the -.Op Fl D +.Fl D option. It then compares each file in that environment to its installed counterpart. @@ -91,10 +91,10 @@ compares the files themselves. You can also specify that the script ignore the Id strings and compare every file with the -.Op Fl s +.Fl s option. Using the -.Op Fl F +.Fl F option .Nm will install the new file for you if they differ only by @@ -126,7 +126,7 @@ installing an updated version of this fi probably run .Xr pwd_mkdb 8 with the -.Op Fl p +.Fl p option to rebuild your password databases and recreate .Pa /etc/passwd . @@ -165,6 +165,14 @@ which will be read before Options specified on the command line are updated last, and therefore can override both files. .Pp +When the comparison is done if there are any files remaining +in the temproot directory they will be listed, and if the +.Fl a +option is not in use the user will be given the option of +deleting the temproot directory. +If there are no files remaining in the temproot directory +it will be deleted. +.Pp The options are as follows: .Bl -tag -width Fl .It Fl s @@ -198,11 +206,13 @@ If the directory exists, it creates a new one in a previously non-existent directory. This option unsets the verbose flag, -but is compatible with all other options. +but other than +.Fl U +it is compatible with all other options. Setting -.Op Fl a +.Fl a makes -.Op Fl w +.Fl w superfluous. .It Fl h Display usage and help information. @@ -253,7 +263,7 @@ instead of the default Add the date and time to the name of the temporary root directory. If -.Op Fl t +.Fl t is specified, this option must follow it if you want the date added too. .It Fl u Ar N @@ -320,44 +330,44 @@ with all values commented out: # These are options for mergemaster, with their default values listed # The following options have command line overrides # -# The target architecture (unset by default) +# The target architecture (-A, unset by default) #ARCHSTRING='TARGET_ARCH=' # -# Sourcedir is the directory to do the 'make' in (where the new files are) +# Sourcedir is the directory to do the 'make' in (-m) #SOURCEDIR='/usr/src' # -# Directory to install the temporary root environment into +# Directory to install the temporary root environment into (-t) #TEMPROOT='/var/tmp/temproot' # -# Specify the destination directory for the installed files +# Specify the destination directory for the installed files (-D) #DESTDIR= # -# Strict comparison skips the VCS Id test and compares every file +# Strict comparison skips the VCS Id test and compares every file (-s) #STRICT=no # -# Type of diff, such as unified, context, etc. +# Type of diff, such as unified, context, etc. (-c) #DIFF_FLAG='-u' # -# Install the new file if it differs only by VCS Id ($FreeBSD) +# Install the new file if it differs only by VCS Id ($FreeBSD, -F) #FREEBSD_ID= # -# Verbose mode includes more details and additional checks +# Verbose mode includes more details and additional checks (-v) #VERBOSE= # -# Automatically install files that do not exist on the system already +# Automatically install files that do not exist on the system already (-i) #AUTO_INSTALL= # -# Automatically upgrade files that have not been user modified +# Automatically upgrade files that have not been user modified (-U) #AUTO_UPGRADE= # -# Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf -#COMP_CONFS=yes +# Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf (-C) +#COMP_CONFS= # -# Preserve files that you replace -#PRESERVE_FILES=yes +# Preserve files that you replace (-P) +#PRESERVE_FILES= #PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` # -# The umask for mergemaster to compare the default file's modes to +# The umask for mergemaster to compare the default file's modes to (-u) #NEW_UMASK=022 # # The following options have no command line overrides @@ -377,6 +387,9 @@ with all values commented out: # If you set 'yes' above, make sure to include the PATH to your pager #PATH=/bin:/usr/bin:/usr/sbin # +# Delete stale files in /etc/rc.d without prompting +#DELETE_STALE_RC_FILES= +# # Specify the path to scripts to run before the comparison starts, # and/or after the script has finished its work #MM_PRE_COMPARE_SCRIPT= Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/8/usr.sbin/mergemaster/mergemaster.sh Fri Jan 15 03:10:09 2010 (r202336) +++ stable/8/usr.sbin/mergemaster/mergemaster.sh Fri Jan 15 03:28:46 2010 (r202337) @@ -5,7 +5,7 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2009 Douglas Barton +# Copyright 1998-2010 Douglas Barton # DougB@FreeBSD.org # $FreeBSD$ @@ -263,7 +263,7 @@ fi # Assign the location of the mtree database # -MTREEDB=${MTREEDB:-/var/db} +MTREEDB=${MTREEDB:-${DESTDIR}/var/db} MTREEFILE="${MTREEDB}/mergemaster.mtree" # Check the command line options @@ -345,18 +345,24 @@ done # Don't force the user to set this in the mergemaster rc file if [ -n "${PRESERVE_FILES}" -a -z "${PRESERVE_FILES_DIR}" ]; then PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` + mkdir -p ${PRESERVE_FILES_DIR} fi # Check for the mtree database in DESTDIR case "${AUTO_UPGRADE}" in '') ;; # If the option is not set no need to run the test or warn the user *) - if [ ! -s "${DESTDIR}${MTREEFILE}" ]; then + if [ ! -s "${MTREEFILE}" ]; then echo '' - echo "*** Unable to find mtree database. Skipping auto-upgrade on this run." + echo "*** Unable to find mtree database (${MTREEFILE})." + echo " Skipping auto-upgrade on this run." echo " It will be created for the next run when this one is complete." echo '' - press_to_continue + case "${AUTO_RUN}" in + '') + press_to_continue + ;; + esac unset AUTO_UPGRADE fi ;; @@ -463,9 +469,9 @@ MM_MAKE="make ${ARCHSTRING} -m ${SOURCED # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. # -if [ -n "${AUTO_UPGRADE}" -a -s "${DESTDIR}${MTREEFILE}" ]; then +if [ -n "${AUTO_UPGRADE}" -a -s "${MTREEFILE}" ]; then CHANGED=: - for file in `mtree -eqL -f ${DESTDIR}${MTREEFILE} -p ${DESTDIR}/ \ + for file in `mtree -eqL -f ${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED}${DESTDIR}/${file}:" @@ -505,7 +511,7 @@ CVS_ID_TAG=FreeBSD delete_temproot () { rm -rf "${TEMPROOT}" 2>/dev/null chflags -R 0 "${TEMPROOT}" 2>/dev/null - rm -rf "${TEMPROOT}" || exit 1 + rm -rf "${TEMPROOT}" || { echo "*** Unable to delete ${TEMPROOT}"; exit 1; } } case "${RERUN}" in @@ -536,7 +542,7 @@ case "${RERUN}" in echo '' echo " *** Deleting the old ${TEMPROOT}" echo '' - delete_temproot || exit 1 + delete_temproot unset TEST_TEMP_ROOT ;; [tT]) @@ -663,31 +669,32 @@ case "${RERUN}" in for file in ${IGNORE_FILES}; do test -e ${TEMPROOT}/${file} && unlink ${TEMPROOT}/${file} done - ;; # End of the "RERUN" test -esac -# We really don't want to have to deal with files like login.conf.db, pwd.db, -# or spwd.db. Instead, we want to compare the text versions, and run *_mkdb. -# Prompt the user to do so below, as needed. -# -rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd + # We really don't want to have to deal with files like login.conf.db, pwd.db, + # or spwd.db. Instead, we want to compare the text versions, and run *_mkdb. + # Prompt the user to do so below, as needed. + # + rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd -# We only need to compare things like freebsd.cf once -find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null + # We only need to compare things like freebsd.cf once + find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null -# Delete stuff we do not need to keep the mtree database small, -# and to make the actual comparison faster. -find ${TEMPROOT}/usr -type l -delete 2>/dev/null -find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null -find -d ${TEMPROOT} -type d -empty -delete 2>/dev/null + # Delete stuff we do not need to keep the mtree database small, + # and to make the actual comparison faster. + find ${TEMPROOT}/usr -type l -delete 2>/dev/null + find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null + find -d ${TEMPROOT} -type d -empty -delete 2>/dev/null -# Build the mtree database in a temporary location. -MTREENEW=`mktemp -t mergemaster.mtree` -case "${PRE_WORLD}" in -'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null - ;; -*) # We don't want to mess with the mtree database on a pre-world run. - ;; + # Build the mtree database in a temporary location. + case "${PRE_WORLD}" in + '') MTREENEW=`mktemp -t mergemaster.mtree` + mtree -ci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null + ;; + *) # We don't want to mess with the mtree database on a pre-world run or + # when re-scanning a previously-built tree. + ;; + esac + ;; # End of the "RERUN" test esac # Get ready to start comparing files @@ -818,7 +825,8 @@ mm_install () { if [ -n "${DESTDIR}${INSTALL_DIR}" -a ! -d "${DESTDIR}${INSTALL_DIR}" ]; then DIR_MODE=`find_mode "${TEMPROOT}/${INSTALL_DIR}"` - install -d -o root -g wheel -m "${DIR_MODE}" "${DESTDIR}${INSTALL_DIR}" + install -d -o root -g wheel -m "${DIR_MODE}" "${DESTDIR}${INSTALL_DIR}" || + install_error $1 ${DESTDIR}${INSTALL_DIR} fi FILE_MODE=`find_mode "${1}"` @@ -837,32 +845,39 @@ mm_install () { DONT_INSTALL=yes ;; /.cshrc | /.profile) - case "${AUTO_INSTALL}" in - '') - case "${LINK_EXPLAINED}" in - '') - echo " *** Historically BSD derived systems have had a" - echo " hard link from /.cshrc and /.profile to" - echo " their namesakes in /root. Please indicate" - echo " your preference below for bringing your" - echo " installed files up to date." - echo '' - LINK_EXPLAINED=yes - ;; - esac + local st_nlink - echo " Use 'd' to delete the temporary ${COMPFILE}" - echo " Use 'l' to delete the existing ${DESTDIR}${COMPFILE#.} and create the link" - echo '' - echo " Default is to leave the temporary file to deal with by hand" - echo '' - echo -n " How should I handle ${COMPFILE}? [Leave it to install later] " - read HANDLE_LINK - ;; - *) # Part of AUTO_INSTALL - HANDLE_LINK=l - ;; - esac + # install will unlink the file before it installs the new one, + # so we have to restore/create the link afterwards. + # + st_nlink=0 # In case the file does not yet exist + eval $(stat -s ${DESTDIR}${COMPFILE#.} 2>/dev/null) + + do_install_and_rm "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" + + if [ -n "${AUTO_INSTALL}" -a $st_nlink -gt 1 ]; then + HANDLE_LINK=l + else + case "${LINK_EXPLAINED}" in + '') + echo " *** Historically BSD derived systems have had a" + echo " hard link from /.cshrc and /.profile to" + echo " their namesakes in /root. Please indicate" + echo " your preference below for bringing your" + echo " installed files up to date." + echo '' + LINK_EXPLAINED=yes + ;; + esac + + echo " Use 'd' to delete the temporary ${COMPFILE}" + echo " Use 'l' to delete the existing ${DESTDIR}/root/${COMPFILE##*/} and create the link" + echo '' + echo " Default is to leave the temporary file to deal with by hand" + echo '' + echo -n " How should I handle ${COMPFILE}? [Leave it to install later] " + read HANDLE_LINK + fi case "${HANDLE_LINK}" in [dD]*) @@ -872,19 +887,19 @@ mm_install () { ;; [lL]*) echo '' - rm -f "${DESTDIR}${COMPFILE#.}" - if ln "${DESTDIR}/root/${COMPFILE##*/}" "${DESTDIR}${COMPFILE#.}"; then + unlink ${DESTDIR}/root/${COMPFILE##*/} + if ln ${DESTDIR}${COMPFILE#.} ${DESTDIR}/root/${COMPFILE##*/}; then echo " *** Link from ${DESTDIR}${COMPFILE#.} to ${DESTDIR}/root/${COMPFILE##*/} installed successfully" - rm "${COMPFILE}" else - echo " *** Error linking ${DESTDIR}${COMPFILE#.} to ${DESTDIR}/root/${COMPFILE##*/}, ${COMPFILE} will remain to install by hand" + echo " *** Error linking ${DESTDIR}${COMPFILE#.} to ${DESTDIR}/root/${COMPFILE##*/}" + echo " *** ${COMPFILE} will remain for your consideration" fi ;; *) echo " *** ${COMPFILE} will remain for your consideration" ;; esac - DONT_INSTALL=yes + return ;; esac @@ -955,6 +970,12 @@ if [ -z "${PRE_WORLD}" -a -z "${RERUN}" esac sleep 2 ;; + *) + if [ -n "${DELETE_STALE_RC_FILES}" ]; then + echo ' *** Deleting ... ' + rm ${STALE_RC_FILES} + echo ' done.' + fi esac ;; esac @@ -967,7 +988,58 @@ if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; th . "${MM_PRE_COMPARE_SCRIPT}" fi -for COMPFILE in `find . -type f`; do +# Things that were files/directories/links in one version can sometimes +# change to something else in a newer version. So we need to explicitly +# test for this, and warn the user if what we find does not match. +# +for COMPFILE in `find . | sort` ; do + if [ -e "${DESTDIR}${COMPFILE#.}" ]; then + INSTALLED_TYPE=`stat -f '%HT' ${DESTDIR}${COMPFILE#.}` + else + continue + fi + TEMPROOT_TYPE=`stat -f '%HT' $COMPFILE` + + if [ ! "$TEMPROOT_TYPE" = "$INSTALLED_TYPE" ]; then + [ "$COMPFILE" = '.' ] && continue + TEMPROOT_TYPE=`echo $TEMPROOT_TYPE | tr [:upper:] [:lower:]` + INSTALLED_TYPE=`echo $INSTALLED_TYPE | tr [:upper:] [:lower:]` + + echo "*** The installed file ${DESTDIR}${COMPFILE#.} has the type \"$INSTALLED_TYPE\"" + echo " but the new version has the type \"$TEMPROOT_TYPE\"" + echo '' + echo " How would you like to handle this?" + echo '' + echo " Use 'r' to remove ${DESTDIR}${COMPFILE#.}" + case "$TEMPROOT_TYPE" in + 'symbolic link') + TARGET=`readlink $COMPFILE` + echo " and create a link to $TARGET in its place" ;; + *) echo " You will be able to install it as a \"$TEMPROOT_TYPE\"" ;; + esac + echo '' + echo " Use 'i' to ignore this" + echo '' + echo -n " How to proceed? [i] " + read ANSWER + case "$ANSWER" in + [rR]) case "${PRESERVE_FILES}" in + [Yy][Ee][Ss]) + mv ${DESTDIR}${COMPFILE#.} ${PRESERVE_FILES_DIR}/ || exit 1 ;; + *) rm -rf ${DESTDIR}${COMPFILE#.} ;; + esac + case "$TEMPROOT_TYPE" in + 'symbolic link') ln -sf $TARGET ${DESTDIR}${COMPFILE#.} ;; + esac ;; + *) echo '' + echo "*** See the man page about adding ${COMPFILE#.} to the list of IGNORE_FILES" + press_to_continue ;; + esac + echo '' + fi +done + +for COMPFILE in `find . -type f | sort`; do # First, check to see if the file exists in DESTDIR. If not, the # diff_loop function knows how to handle it. @@ -1032,7 +1104,7 @@ for COMPFILE in `find . -type f`; do # If the user chose the -F option, test for that before proceeding # if [ -n "$FREEBSD_ID" ]; then - if diff -q -I'[$]FreeBSD:.*$' "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" > \ + if diff -q -I'[$]FreeBSD.*[$]' "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" > \ /dev/null 2>&1; then if mm_install "${COMPFILE}"; then echo "*** Updated revision control Id for ${DESTDIR}${COMPFILE#.}" @@ -1061,8 +1133,8 @@ echo "*** Comparison complete" if [ -s "${MTREENEW}" ]; then echo "*** Saving mtree database for future upgrades" - test -e "${DESTDIR}${MTREEFILE}" && unlink ${DESTDIR}${MTREEFILE} - mv ${MTREENEW} ${DESTDIR}${MTREEFILE} + test -e "${MTREEFILE}" && unlink ${MTREEFILE} + mv ${MTREENEW} ${MTREEFILE} fi echo '' @@ -1070,30 +1142,28 @@ echo '' TEST_FOR_FILES=`find ${TEMPROOT} -type f -size +0 2>/dev/null` if [ -n "${TEST_FOR_FILES}" ]; then echo "*** Files that remain for you to merge by hand:" - find "${TEMPROOT}" -type f -size +0 + find "${TEMPROOT}" -type f -size +0 | sort echo '' -fi - -case "${AUTO_RUN}" in -'') - echo -n "Do you wish to delete what is left of ${TEMPROOT}? [no] " - read DEL_TEMPROOT - case "${DEL_TEMPROOT}" in - [yY]*) - if delete_temproot; then - echo " *** ${TEMPROOT} has been deleted" - else - echo " *** Unable to delete ${TEMPROOT}" - fi - ;; - *) - echo " *** ${TEMPROOT} will remain" + case "${AUTO_RUN}" in + '') + echo -n "Do you wish to delete what is left of ${TEMPROOT}? [no] " + read DEL_TEMPROOT + case "${DEL_TEMPROOT}" in + [yY]*) + delete_temproot + ;; + *) + echo " *** ${TEMPROOT} will remain" + ;; + esac ;; + *) ;; esac - ;; -*) ;; -esac +else + echo "*** ${TEMPROOT} is empty, deleting" + delete_temproot +fi case "${AUTO_INSTALLED_FILES}" in '') ;; @@ -1268,5 +1338,9 @@ case "${PRE_WORLD}" in ;; esac -exit 0 +if [ -n "${PRESERVE_FILES}" ]; then + find -d $PRESERVE_FILES_DIR -type d -empty -delete 2>/dev/null + rmdir $PRESERVE_FILES_DIR 2>/dev/null +fi +exit 0 From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 03:39:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E30D1065670; Fri, 15 Jan 2010 03:39:04 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE9998FC15; Fri, 15 Jan 2010 03:39:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F3d3R4035299; Fri, 15 Jan 2010 03:39:03 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F3d3V4035296; Fri, 15 Jan 2010 03:39:03 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150339.o0F3d3V4035296@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 03:39:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202338 - stable/7/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 03:39:04 -0000 Author: dougb Date: Fri Jan 15 03:39:03 2010 New Revision: 202338 URL: http://svn.freebsd.org/changeset/base/202338 Log: MFC r200416: Simplify handling of MTREEFILE relative to DESTDIR Make the message about a missing MTREEFILE combined with -U more informative MFC r200425: Over time things that used to be files/directories/links can change to something else. So add code to detect when things don't match and give the user choices about how to fix it. If we're using -P and something in the above check needs to be moved we need to have the directory there for it, so create it at the beginning and delete empty versions of it at the end. The case where something used to be a file or link and now is supposed to be a directory (e.g., /etc/security) is especially dangerous, so make failure to install a necessary directory in $DESTDIR a fatal error. MFC r200700: In the places where find is used that the user may see the results, first pipe it to sort so that order of processing will be deterministic and like things will be grouped together. MFC r200701: Fix an indentation issue, no functional changes MFC r200708: Fix a problem with how mergemaster handles the hard links for /.cshrc and /.profile. The problem is that install(1) will unlink the old file before it installs the new one, which means that in the best case we have to compare the changes for the old file twice. So, change the logic to first test to see if the link exists, then install the file. Then if the link was there and we're using -i, just create the link in /root and be done with it. Otherwise display the message to the user and give them the option. Because we are now sorting things before doing the comparison we can know conclusively that the files in / should be the sources, and the files in /root will be the targets, so adjust the paths accordingly. While I'm here, split a too-long error message into two lines and just return at the end of handling these files instead of setting the variable that says "do nothing" and then returning at the end of the function anyway. MFC r201291: Add some patches contributed by jhb: 1. Don't prompt the user for "-U but no db" error if we're using -a 2. Add an option to delete stale rc.d files automatically if the user has DELETE_STALE_RC_FILES in their rc file. Lack of command line option for this is not an oversight. 3. Add []'s around the terminal $ for the $FreeBSD$ test for -F For one bug raised by jhb I did a more thorough solution: There were a lot of things that "snuck in" between the end of the test for -r and the start of the comparison. One of them is the creation of the mtree db, as pointed out by jhb. Fix this problem more thoroughly by moving the end of the test down to where it should/used to be, right before the comparison. As a result, indent the interloping code to match. MFC r201292: Document the DELETE_STALE_RC_FILES option introduced in r201291. This is an "rc file only" option by design. While I'm here, update the comments in the example rc file to indicate which command line options they relate to, and correct the defaults for a couple of options. MFC r201293: It's not necessary to include both Op and Fl for command line options included in the text, so use only the latter. Clarify that using -U doesn't make sense in combination with -a MFC r201323: If we are using -p it does not make any sense to even create the MTREENEW file since it will never be used. MFC r201765: Update copyright date Update delete_temproot() to include the error message if it fails, and clean up the places where it's called. If there are no files left in temproot when the comparison is done delete it without prompting. This should make "automated" runs of mergemaster without -a a little easier. Document the new behavior in the man page. Modified: stable/7/usr.sbin/mergemaster/mergemaster.8 stable/7/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/7/usr.sbin/mergemaster/ (props changed) Modified: stable/7/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.8 Fri Jan 15 03:28:46 2010 (r202337) +++ stable/7/usr.sbin/mergemaster/mergemaster.8 Fri Jan 15 03:39:03 2010 (r202338) @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998-2009 Douglas Barton +.\" Copyright (c) 1998-2010 Douglas Barton .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2009 +.Dd January 7, 2010 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -61,10 +61,10 @@ down, populating that environment with t files. You can specify a different source directory with the -.Op Fl m +.Fl m command line option, or specify the destination directory with the -.Op Fl D +.Fl D option. It then compares each file in that environment to its installed counterpart. @@ -91,10 +91,10 @@ compares the files themselves. You can also specify that the script ignore the Id strings and compare every file with the -.Op Fl s +.Fl s option. Using the -.Op Fl F +.Fl F option .Nm will install the new file for you if they differ only by @@ -126,7 +126,7 @@ installing an updated version of this fi probably run .Xr pwd_mkdb 8 with the -.Op Fl p +.Fl p option to rebuild your password databases and recreate .Pa /etc/passwd . @@ -165,6 +165,14 @@ which will be read before Options specified on the command line are updated last, and therefore can override both files. .Pp +When the comparison is done if there are any files remaining +in the temproot directory they will be listed, and if the +.Fl a +option is not in use the user will be given the option of +deleting the temproot directory. +If there are no files remaining in the temproot directory +it will be deleted. +.Pp The options are as follows: .Bl -tag -width Fl .It Fl s @@ -198,11 +206,13 @@ If the directory exists, it creates a new one in a previously non-existent directory. This option unsets the verbose flag, -but is compatible with all other options. +but other than +.Fl U +it is compatible with all other options. Setting -.Op Fl a +.Fl a makes -.Op Fl w +.Fl w superfluous. .It Fl h Display usage and help information. @@ -253,7 +263,7 @@ instead of the default Add the date and time to the name of the temporary root directory. If -.Op Fl t +.Fl t is specified, this option must follow it if you want the date added too. .It Fl u Ar N @@ -320,44 +330,44 @@ with all values commented out: # These are options for mergemaster, with their default values listed # The following options have command line overrides # -# The target architecture (unset by default) +# The target architecture (-A, unset by default) #ARCHSTRING='TARGET_ARCH=' # -# Sourcedir is the directory to do the 'make' in (where the new files are) +# Sourcedir is the directory to do the 'make' in (-m) #SOURCEDIR='/usr/src' # -# Directory to install the temporary root environment into +# Directory to install the temporary root environment into (-t) #TEMPROOT='/var/tmp/temproot' # -# Specify the destination directory for the installed files +# Specify the destination directory for the installed files (-D) #DESTDIR= # -# Strict comparison skips the VCS Id test and compares every file +# Strict comparison skips the VCS Id test and compares every file (-s) #STRICT=no # -# Type of diff, such as unified, context, etc. +# Type of diff, such as unified, context, etc. (-c) #DIFF_FLAG='-u' # -# Install the new file if it differs only by VCS Id ($FreeBSD) +# Install the new file if it differs only by VCS Id ($FreeBSD, -F) #FREEBSD_ID= # -# Verbose mode includes more details and additional checks +# Verbose mode includes more details and additional checks (-v) #VERBOSE= # -# Automatically install files that do not exist on the system already +# Automatically install files that do not exist on the system already (-i) #AUTO_INSTALL= # -# Automatically upgrade files that have not been user modified +# Automatically upgrade files that have not been user modified (-U) #AUTO_UPGRADE= # -# Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf -#COMP_CONFS=yes +# Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf (-C) +#COMP_CONFS= # -# Preserve files that you replace -#PRESERVE_FILES=yes +# Preserve files that you replace (-P) +#PRESERVE_FILES= #PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` # -# The umask for mergemaster to compare the default file's modes to +# The umask for mergemaster to compare the default file's modes to (-u) #NEW_UMASK=022 # # The following options have no command line overrides @@ -377,6 +387,9 @@ with all values commented out: # If you set 'yes' above, make sure to include the PATH to your pager #PATH=/bin:/usr/bin:/usr/sbin # +# Delete stale files in /etc/rc.d without prompting +#DELETE_STALE_RC_FILES= +# # Specify the path to scripts to run before the comparison starts, # and/or after the script has finished its work #MM_PRE_COMPARE_SCRIPT= Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Fri Jan 15 03:28:46 2010 (r202337) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Fri Jan 15 03:39:03 2010 (r202338) @@ -5,7 +5,7 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2009 Douglas Barton +# Copyright 1998-2010 Douglas Barton # DougB@FreeBSD.org # $FreeBSD$ @@ -263,7 +263,7 @@ fi # Assign the location of the mtree database # -MTREEDB=${MTREEDB:-/var/db} +MTREEDB=${MTREEDB:-${DESTDIR}/var/db} MTREEFILE="${MTREEDB}/mergemaster.mtree" # Check the command line options @@ -345,18 +345,24 @@ done # Don't force the user to set this in the mergemaster rc file if [ -n "${PRESERVE_FILES}" -a -z "${PRESERVE_FILES_DIR}" ]; then PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` + mkdir -p ${PRESERVE_FILES_DIR} fi # Check for the mtree database in DESTDIR case "${AUTO_UPGRADE}" in '') ;; # If the option is not set no need to run the test or warn the user *) - if [ ! -s "${DESTDIR}${MTREEFILE}" ]; then + if [ ! -s "${MTREEFILE}" ]; then echo '' - echo "*** Unable to find mtree database. Skipping auto-upgrade on this run." + echo "*** Unable to find mtree database (${MTREEFILE})." + echo " Skipping auto-upgrade on this run." echo " It will be created for the next run when this one is complete." echo '' - press_to_continue + case "${AUTO_RUN}" in + '') + press_to_continue + ;; + esac unset AUTO_UPGRADE fi ;; @@ -463,9 +469,9 @@ MM_MAKE="make ${ARCHSTRING} -m ${SOURCED # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. # -if [ -n "${AUTO_UPGRADE}" -a -s "${DESTDIR}${MTREEFILE}" ]; then +if [ -n "${AUTO_UPGRADE}" -a -s "${MTREEFILE}" ]; then CHANGED=: - for file in `mtree -eqL -f ${DESTDIR}${MTREEFILE} -p ${DESTDIR}/ \ + for file in `mtree -eqL -f ${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED}${DESTDIR}/${file}:" @@ -505,7 +511,7 @@ CVS_ID_TAG=FreeBSD delete_temproot () { rm -rf "${TEMPROOT}" 2>/dev/null chflags -R 0 "${TEMPROOT}" 2>/dev/null - rm -rf "${TEMPROOT}" || exit 1 + rm -rf "${TEMPROOT}" || { echo "*** Unable to delete ${TEMPROOT}"; exit 1; } } case "${RERUN}" in @@ -536,7 +542,7 @@ case "${RERUN}" in echo '' echo " *** Deleting the old ${TEMPROOT}" echo '' - delete_temproot || exit 1 + delete_temproot unset TEST_TEMP_ROOT ;; [tT]) @@ -663,31 +669,32 @@ case "${RERUN}" in for file in ${IGNORE_FILES}; do test -e ${TEMPROOT}/${file} && unlink ${TEMPROOT}/${file} done - ;; # End of the "RERUN" test -esac -# We really don't want to have to deal with files like login.conf.db, pwd.db, -# or spwd.db. Instead, we want to compare the text versions, and run *_mkdb. -# Prompt the user to do so below, as needed. -# -rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd + # We really don't want to have to deal with files like login.conf.db, pwd.db, + # or spwd.db. Instead, we want to compare the text versions, and run *_mkdb. + # Prompt the user to do so below, as needed. + # + rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd -# We only need to compare things like freebsd.cf once -find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null + # We only need to compare things like freebsd.cf once + find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null -# Delete stuff we do not need to keep the mtree database small, -# and to make the actual comparison faster. -find ${TEMPROOT}/usr -type l -delete 2>/dev/null -find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null -find -d ${TEMPROOT} -type d -empty -delete 2>/dev/null + # Delete stuff we do not need to keep the mtree database small, + # and to make the actual comparison faster. + find ${TEMPROOT}/usr -type l -delete 2>/dev/null + find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null + find -d ${TEMPROOT} -type d -empty -delete 2>/dev/null -# Build the mtree database in a temporary location. -MTREENEW=`mktemp -t mergemaster.mtree` -case "${PRE_WORLD}" in -'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null - ;; -*) # We don't want to mess with the mtree database on a pre-world run. - ;; + # Build the mtree database in a temporary location. + case "${PRE_WORLD}" in + '') MTREENEW=`mktemp -t mergemaster.mtree` + mtree -ci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null + ;; + *) # We don't want to mess with the mtree database on a pre-world run or + # when re-scanning a previously-built tree. + ;; + esac + ;; # End of the "RERUN" test esac # Get ready to start comparing files @@ -818,7 +825,8 @@ mm_install () { if [ -n "${DESTDIR}${INSTALL_DIR}" -a ! -d "${DESTDIR}${INSTALL_DIR}" ]; then DIR_MODE=`find_mode "${TEMPROOT}/${INSTALL_DIR}"` - install -d -o root -g wheel -m "${DIR_MODE}" "${DESTDIR}${INSTALL_DIR}" + install -d -o root -g wheel -m "${DIR_MODE}" "${DESTDIR}${INSTALL_DIR}" || + install_error $1 ${DESTDIR}${INSTALL_DIR} fi FILE_MODE=`find_mode "${1}"` @@ -837,32 +845,39 @@ mm_install () { DONT_INSTALL=yes ;; /.cshrc | /.profile) - case "${AUTO_INSTALL}" in - '') - case "${LINK_EXPLAINED}" in - '') - echo " *** Historically BSD derived systems have had a" - echo " hard link from /.cshrc and /.profile to" - echo " their namesakes in /root. Please indicate" - echo " your preference below for bringing your" - echo " installed files up to date." - echo '' - LINK_EXPLAINED=yes - ;; - esac + local st_nlink - echo " Use 'd' to delete the temporary ${COMPFILE}" - echo " Use 'l' to delete the existing ${DESTDIR}${COMPFILE#.} and create the link" - echo '' - echo " Default is to leave the temporary file to deal with by hand" - echo '' - echo -n " How should I handle ${COMPFILE}? [Leave it to install later] " - read HANDLE_LINK - ;; - *) # Part of AUTO_INSTALL - HANDLE_LINK=l - ;; - esac + # install will unlink the file before it installs the new one, + # so we have to restore/create the link afterwards. + # + st_nlink=0 # In case the file does not yet exist + eval $(stat -s ${DESTDIR}${COMPFILE#.} 2>/dev/null) + + do_install_and_rm "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" + + if [ -n "${AUTO_INSTALL}" -a $st_nlink -gt 1 ]; then + HANDLE_LINK=l + else + case "${LINK_EXPLAINED}" in + '') + echo " *** Historically BSD derived systems have had a" + echo " hard link from /.cshrc and /.profile to" + echo " their namesakes in /root. Please indicate" + echo " your preference below for bringing your" + echo " installed files up to date." + echo '' + LINK_EXPLAINED=yes + ;; + esac + + echo " Use 'd' to delete the temporary ${COMPFILE}" + echo " Use 'l' to delete the existing ${DESTDIR}/root/${COMPFILE##*/} and create the link" + echo '' + echo " Default is to leave the temporary file to deal with by hand" + echo '' + echo -n " How should I handle ${COMPFILE}? [Leave it to install later] " + read HANDLE_LINK + fi case "${HANDLE_LINK}" in [dD]*) @@ -872,19 +887,19 @@ mm_install () { ;; [lL]*) echo '' - rm -f "${DESTDIR}${COMPFILE#.}" - if ln "${DESTDIR}/root/${COMPFILE##*/}" "${DESTDIR}${COMPFILE#.}"; then + unlink ${DESTDIR}/root/${COMPFILE##*/} + if ln ${DESTDIR}${COMPFILE#.} ${DESTDIR}/root/${COMPFILE##*/}; then echo " *** Link from ${DESTDIR}${COMPFILE#.} to ${DESTDIR}/root/${COMPFILE##*/} installed successfully" - rm "${COMPFILE}" else - echo " *** Error linking ${DESTDIR}${COMPFILE#.} to ${DESTDIR}/root/${COMPFILE##*/}, ${COMPFILE} will remain to install by hand" + echo " *** Error linking ${DESTDIR}${COMPFILE#.} to ${DESTDIR}/root/${COMPFILE##*/}" + echo " *** ${COMPFILE} will remain for your consideration" fi ;; *) echo " *** ${COMPFILE} will remain for your consideration" ;; esac - DONT_INSTALL=yes + return ;; esac @@ -955,6 +970,12 @@ if [ -z "${PRE_WORLD}" -a -z "${RERUN}" esac sleep 2 ;; + *) + if [ -n "${DELETE_STALE_RC_FILES}" ]; then + echo ' *** Deleting ... ' + rm ${STALE_RC_FILES} + echo ' done.' + fi esac ;; esac @@ -967,7 +988,58 @@ if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; th . "${MM_PRE_COMPARE_SCRIPT}" fi -for COMPFILE in `find . -type f`; do +# Things that were files/directories/links in one version can sometimes +# change to something else in a newer version. So we need to explicitly +# test for this, and warn the user if what we find does not match. +# +for COMPFILE in `find . | sort` ; do + if [ -e "${DESTDIR}${COMPFILE#.}" ]; then + INSTALLED_TYPE=`stat -f '%HT' ${DESTDIR}${COMPFILE#.}` + else + continue + fi + TEMPROOT_TYPE=`stat -f '%HT' $COMPFILE` + + if [ ! "$TEMPROOT_TYPE" = "$INSTALLED_TYPE" ]; then + [ "$COMPFILE" = '.' ] && continue + TEMPROOT_TYPE=`echo $TEMPROOT_TYPE | tr [:upper:] [:lower:]` + INSTALLED_TYPE=`echo $INSTALLED_TYPE | tr [:upper:] [:lower:]` + + echo "*** The installed file ${DESTDIR}${COMPFILE#.} has the type \"$INSTALLED_TYPE\"" + echo " but the new version has the type \"$TEMPROOT_TYPE\"" + echo '' + echo " How would you like to handle this?" + echo '' + echo " Use 'r' to remove ${DESTDIR}${COMPFILE#.}" + case "$TEMPROOT_TYPE" in + 'symbolic link') + TARGET=`readlink $COMPFILE` + echo " and create a link to $TARGET in its place" ;; + *) echo " You will be able to install it as a \"$TEMPROOT_TYPE\"" ;; + esac + echo '' + echo " Use 'i' to ignore this" + echo '' + echo -n " How to proceed? [i] " + read ANSWER + case "$ANSWER" in + [rR]) case "${PRESERVE_FILES}" in + [Yy][Ee][Ss]) + mv ${DESTDIR}${COMPFILE#.} ${PRESERVE_FILES_DIR}/ || exit 1 ;; + *) rm -rf ${DESTDIR}${COMPFILE#.} ;; + esac + case "$TEMPROOT_TYPE" in + 'symbolic link') ln -sf $TARGET ${DESTDIR}${COMPFILE#.} ;; + esac ;; + *) echo '' + echo "*** See the man page about adding ${COMPFILE#.} to the list of IGNORE_FILES" + press_to_continue ;; + esac + echo '' + fi +done + +for COMPFILE in `find . -type f | sort`; do # First, check to see if the file exists in DESTDIR. If not, the # diff_loop function knows how to handle it. @@ -1032,7 +1104,7 @@ for COMPFILE in `find . -type f`; do # If the user chose the -F option, test for that before proceeding # if [ -n "$FREEBSD_ID" ]; then - if diff -q -I'[$]FreeBSD:.*$' "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" > \ + if diff -q -I'[$]FreeBSD.*[$]' "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" > \ /dev/null 2>&1; then if mm_install "${COMPFILE}"; then echo "*** Updated revision control Id for ${DESTDIR}${COMPFILE#.}" @@ -1061,8 +1133,8 @@ echo "*** Comparison complete" if [ -s "${MTREENEW}" ]; then echo "*** Saving mtree database for future upgrades" - test -e "${DESTDIR}${MTREEFILE}" && unlink ${DESTDIR}${MTREEFILE} - mv ${MTREENEW} ${DESTDIR}${MTREEFILE} + test -e "${MTREEFILE}" && unlink ${MTREEFILE} + mv ${MTREENEW} ${MTREEFILE} fi echo '' @@ -1070,30 +1142,28 @@ echo '' TEST_FOR_FILES=`find ${TEMPROOT} -type f -size +0 2>/dev/null` if [ -n "${TEST_FOR_FILES}" ]; then echo "*** Files that remain for you to merge by hand:" - find "${TEMPROOT}" -type f -size +0 + find "${TEMPROOT}" -type f -size +0 | sort echo '' -fi - -case "${AUTO_RUN}" in -'') - echo -n "Do you wish to delete what is left of ${TEMPROOT}? [no] " - read DEL_TEMPROOT - case "${DEL_TEMPROOT}" in - [yY]*) - if delete_temproot; then - echo " *** ${TEMPROOT} has been deleted" - else - echo " *** Unable to delete ${TEMPROOT}" - fi - ;; - *) - echo " *** ${TEMPROOT} will remain" + case "${AUTO_RUN}" in + '') + echo -n "Do you wish to delete what is left of ${TEMPROOT}? [no] " + read DEL_TEMPROOT + case "${DEL_TEMPROOT}" in + [yY]*) + delete_temproot + ;; + *) + echo " *** ${TEMPROOT} will remain" + ;; + esac ;; + *) ;; esac - ;; -*) ;; -esac +else + echo "*** ${TEMPROOT} is empty, deleting" + delete_temproot +fi case "${AUTO_INSTALLED_FILES}" in '') ;; @@ -1268,5 +1338,9 @@ case "${PRE_WORLD}" in ;; esac -exit 0 +if [ -n "${PRESERVE_FILES}" ]; then + find -d $PRESERVE_FILES_DIR -type d -empty -delete 2>/dev/null + rmdir $PRESERVE_FILES_DIR 2>/dev/null +fi +exit 0 From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 03:56:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE16B106566B; Fri, 15 Jan 2010 03:56:48 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCBAC8FC0A; Fri, 15 Jan 2010 03:56:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F3um2J039157; Fri, 15 Jan 2010 03:56:48 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F3um2s039155; Fri, 15 Jan 2010 03:56:48 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150356.o0F3um2s039155@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 03:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202339 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 03:56:48 -0000 Author: dougb Date: Fri Jan 15 03:56:48 2010 New Revision: 202339 URL: http://svn.freebsd.org/changeset/base/202339 Log: Now that we've officially arrived at FreeBSD 9, remove the IGNORE_MOTD compat shim as advertised. This change should not be MFC'ed. Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 15 03:39:03 2010 (r202338) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 15 03:56:48 2010 (r202339) @@ -651,17 +651,14 @@ case "${RERUN}" in ;; esac - # Avoid comparing the motd if the user specifies it in .mergemasterrc - # Compatibility shim to be removed in FreeBSD 9.x case "${IGNORE_MOTD}" in - '') ;; - *) IGNORE_FILES="${IGNORE_FILES} /etc/motd" + *) echo '' echo "*** You have the IGNORE_MOTD option set in your mergemaster rc file." echo " This option is deprecated in favor of the IGNORE_FILES option." echo " Please update your rc file accordingly." echo '' - press_to_continue + exit 1 ;; esac From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 04:09:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8CA6106566C; Fri, 15 Jan 2010 04:09:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7C7C8FC13; Fri, 15 Jan 2010 04:09:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F49MxR041950; Fri, 15 Jan 2010 04:09:22 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F49MUY041948; Fri, 15 Jan 2010 04:09:22 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001150409.o0F49MUY041948@svn.freebsd.org> From: Doug Barton Date: Fri, 15 Jan 2010 04:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202340 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 04:09:22 -0000 Author: dougb Date: Fri Jan 15 04:09:22 2010 New Revision: 202340 URL: http://svn.freebsd.org/changeset/base/202340 Log: Oops, deleted one line too many. Add back the null case for IGNORE_MOTD Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 15 03:56:48 2010 (r202339) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 15 04:09:22 2010 (r202340) @@ -652,6 +652,7 @@ case "${RERUN}" in esac case "${IGNORE_MOTD}" in + '') ;; *) echo '' echo "*** You have the IGNORE_MOTD option set in your mergemaster rc file." From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 07:05:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 893B7106566B; Fri, 15 Jan 2010 07:05:00 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 785178FC1E; Fri, 15 Jan 2010 07:05:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F750Rw080814; Fri, 15 Jan 2010 07:05:00 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F750Oh080811; Fri, 15 Jan 2010 07:05:00 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001150705.o0F750Oh080811@svn.freebsd.org> From: Brooks Davis Date: Fri, 15 Jan 2010 07:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202341 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 07:05:00 -0000 Author: brooks Date: Fri Jan 15 07:05:00 2010 New Revision: 202341 URL: http://svn.freebsd.org/changeset/base/202341 Log: Since all other comparisons involving ngroups_max use "ngroups_max + 1", use ">= ngroups_max+1" instead of the equivalent "> ngroups_max" to reduce confusion. Modified: head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_uid16.c Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Fri Jan 15 04:09:22 2010 (r202340) +++ head/sys/compat/linux/linux_misc.c Fri Jan 15 07:05:00 2010 (r202341) @@ -1138,7 +1138,7 @@ linux_setgroups(struct thread *td, struc struct proc *p; ngrp = args->gidsetsize; - if (ngrp < 0 || ngrp > ngroups_max) + if (ngrp < 0 || ngrp >= ngroups_max + 1) return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error = copyin(args->grouplist, linux_gidset, ngrp * sizeof(l_gid_t)); Modified: head/sys/compat/linux/linux_uid16.c ============================================================================== --- head/sys/compat/linux/linux_uid16.c Fri Jan 15 04:09:22 2010 (r202340) +++ head/sys/compat/linux/linux_uid16.c Fri Jan 15 07:05:00 2010 (r202341) @@ -109,7 +109,7 @@ linux_setgroups16(struct thread *td, str #endif ngrp = args->gidsetsize; - if (ngrp < 0 || ngrp > ngroups_max) + if (ngrp < 0 || ngrp >= ngroups_max + 1) return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 07:18:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B596A106566C; Fri, 15 Jan 2010 07:18:46 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B9308FC19; Fri, 15 Jan 2010 07:18:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F7IkXn084384; Fri, 15 Jan 2010 07:18:46 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0F7IkTM084381; Fri, 15 Jan 2010 07:18:46 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001150718.o0F7IkTM084381@svn.freebsd.org> From: Brooks Davis Date: Fri, 15 Jan 2010 07:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202342 - in head/sys: i386/ibcs2 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 07:18:46 -0000 Author: brooks Date: Fri Jan 15 07:18:46 2010 New Revision: 202342 URL: http://svn.freebsd.org/changeset/base/202342 Log: Only allocate the space we need before calling kern_getgroups instead of allocating what ever the user asks for up to "ngroups_max + 1". On systems with large values of kern.ngroups this will be more efficient. The now redundant check that the array is large enough in kern_getgroups() is deliberate to allow this change to be merged to stable/8 without breaking potential third party consumers of the API. Reported by: bde MFC after: 28 days Modified: head/sys/i386/ibcs2/ibcs2_misc.c head/sys/kern/kern_prot.c Modified: head/sys/i386/ibcs2/ibcs2_misc.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_misc.c Fri Jan 15 07:05:00 2010 (r202341) +++ head/sys/i386/ibcs2/ibcs2_misc.c Fri Jan 15 07:18:46 2010 (r202342) @@ -663,9 +663,13 @@ ibcs2_getgroups(td, uap) u_int i, ngrp; int error; - if (uap->gidsetsize < 0) - return (EINVAL); - ngrp = MIN(uap->gidsetsize, ngroups_max + 1); + if (uap->gidsetsize < td->td_ucred->cr_ngroups) { + if (uap->gidsetsize == 0) + ngrp = 0; + else + return (EINVAL); + } else + ngrp = td->td_ucred->cr_ngroups; gp = malloc(ngrp * sizeof(*gp), M_TEMP, M_WAITOK); error = kern_getgroups(td, &ngrp, gp); if (error) Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Fri Jan 15 07:05:00 2010 (r202341) +++ head/sys/kern/kern_prot.c Fri Jan 15 07:18:46 2010 (r202342) @@ -283,7 +283,13 @@ getgroups(struct thread *td, register st u_int ngrp; int error; - ngrp = MIN(uap->gidsetsize, ngroups_max + 1); + if (uap->gidsetsize < td->td_ucred->cr_ngroups) { + if (uap->gidsetsize == 0) + ngrp = 0; + else + return (EINVAL); + } else + ngrp = td->td_ucred->cr_ngroups; groups = malloc(ngrp * sizeof(*groups), M_TEMP, M_WAITOK); error = kern_getgroups(td, &ngrp, groups); if (error) From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 08:59:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32D6F106566B; Fri, 15 Jan 2010 08:59:04 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail12.syd.optusnet.com.au (mail12.syd.optusnet.com.au [211.29.132.193]) by mx1.freebsd.org (Postfix) with ESMTP id A65D48FC12; Fri, 15 Jan 2010 08:59:03 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-232-83.belrs3.nsw.optusnet.com.au [122.106.232.83]) by mail12.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0F8x0DF007625 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Jan 2010 19:59:01 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o0F8wvg3002662; Fri, 15 Jan 2010 19:58:57 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o0F8wvsT002661; Fri, 15 Jan 2010 19:58:57 +1100 (EST) (envelope-from peter) Date: Fri, 15 Jan 2010 19:58:57 +1100 From: Peter Jeremy To: "Robert N. M. Watson" Message-ID: <20100115085856.GA2556@server.vk2pj.dyndns.org> References: <4B4E1586.7090102@FreeBSD.org> <20100114.102142.328914705071816274.imp@bsdimp.com> <20100114.105622.457034909117828677.imp@bsdimp.com> <4B4F7810.2080003@FreeBSD.org> <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline In-Reply-To: <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 08:59:04 -0000 --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Jan-14 20:12:24 +0000, "Robert N. M. Watson" = wrote: >- Desktop/server users who want their system to work without any > special tuning or magic, and likely feel the comments they put in > configuration files are important As far as I'm concerned, the most critical bit of my kernel config file is the $Header...$ comment - which lets me extract the remainder of the file from my CVS repository. I don't currently use includes (because most of my config files have roots pre-dating the include directive). I find it a PITA that INCLUDE_CONFIG_FILE _doesn't_ include comments (or at least my $Header$ line) by default. IMO, it would be useful to have an "include this literal string in the kernel" config directive. This would allow config file version control information to be embedded without needing the comments. And that would resolve the issue of embedding fully expanded details of all included files without the hassle of keeping the comments around. --=20 Peter Jeremy --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAktQLlAACgkQ/opHv/APuIdnTACbBsmd1V4Uc0RiXeRtoShXcNj+ NNkAoKNtcWOc91kvt/28hBQRiuaaVO9T =8ot2 -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 11:26:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461F1106566B; Fri, 15 Jan 2010 11:26:21 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A2958FC08; Fri, 15 Jan 2010 11:26:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FBQLC6056792; Fri, 15 Jan 2010 11:26:21 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FBQLcZ056785; Fri, 15 Jan 2010 11:26:21 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001151126.o0FBQLcZ056785@svn.freebsd.org> From: Takahashi Yoshihiro Date: Fri, 15 Jan 2010 11:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202343 - in stable/8/sys/boot: common pc98 pc98/libpc98 pc98/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 11:26:21 -0000 Author: nyan Date: Fri Jan 15 11:26:20 2010 New Revision: 202343 URL: http://svn.freebsd.org/changeset/base/202343 Log: MFC: revision 201339 and 201340 - Add setting machine type support to the loader. - Don't use 15M-16M area on pc98. It's reserved for some devices. Added: stable/8/sys/boot/pc98/libpc98/libpc98.h - copied unchanged from r201339, head/sys/boot/pc98/libpc98/libpc98.h stable/8/sys/boot/pc98/libpc98/pc98_sys.c - copied unchanged from r201339, head/sys/boot/pc98/libpc98/pc98_sys.c Modified: stable/8/sys/boot/common/module.c stable/8/sys/boot/pc98/Makefile.inc stable/8/sys/boot/pc98/libpc98/Makefile stable/8/sys/boot/pc98/loader/main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/common/module.c ============================================================================== --- stable/8/sys/boot/common/module.c Fri Jan 15 07:18:46 2010 (r202342) +++ stable/8/sys/boot/common/module.c Fri Jan 15 11:26:20 2010 (r202343) @@ -351,6 +351,9 @@ file_loadraw(char *type, char *name) char *cp; int fd, got; vm_offset_t laddr; +#ifdef PC98 + struct stat st; +#endif /* We can't load first */ if ((file_findfile(NULL, NULL)) == NULL) { @@ -372,6 +375,14 @@ file_loadraw(char *type, char *name) return(CMD_ERROR); } +#ifdef PC98 + /* We cannot use 15M-16M area on pc98. */ + if (loadaddr < 0x1000000 && + fstat(fd, &st) == 0 && + (st.st_size == -1 || loadaddr + st.st_size > 0xf00000)) + loadaddr = 0x1000000; +#endif + laddr = loadaddr; for (;;) { /* read in 4k chunks; size is not really important */ @@ -477,6 +488,14 @@ mod_loadkld(const char *kldname, int arg ; do { +#ifdef PC98 + /* We cannot use 15M-16M area on pc98. */ + struct stat st; + if (loadaddr < 0x1000000 && + stat(filename, &st) == 0 && + (st.st_size == -1 || loadaddr + st.st_size > 0xf00000)) + loadaddr = 0x1000000; +#endif err = file_load(filename, loadaddr, &fp); if (err) break; Modified: stable/8/sys/boot/pc98/Makefile.inc ============================================================================== --- stable/8/sys/boot/pc98/Makefile.inc Fri Jan 15 07:18:46 2010 (r202342) +++ stable/8/sys/boot/pc98/Makefile.inc Fri Jan 15 11:26:20 2010 (r202343) @@ -7,7 +7,7 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 \ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \ - -Os + -Os -DPC98 LDFLAGS+= -nostdlib # BTX components Modified: stable/8/sys/boot/pc98/libpc98/Makefile ============================================================================== --- stable/8/sys/boot/pc98/libpc98/Makefile Fri Jan 15 07:18:46 2010 (r202342) +++ stable/8/sys/boot/pc98/libpc98/Makefile Fri Jan 15 11:26:20 2010 (r202343) @@ -8,7 +8,7 @@ INTERNALLIB= SRCS= bioscd.c biosdisk.c biosmem.c biospnp.c \ biospci.c biossmap.c bootinfo.c bootinfo32.c \ comconsole.c devicename.c elf32_freebsd.c \ - i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ + i386_copy.c i386_module.c nullconsole.c pc98_sys.c pxe.c pxetramp.s \ time.c vidconsole.c # Enable PXE TFTP or NFS support, not both. Copied: stable/8/sys/boot/pc98/libpc98/libpc98.h (from r201339, head/sys/boot/pc98/libpc98/libpc98.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/pc98/libpc98/libpc98.h Fri Jan 15 11:26:20 2010 (r202343, copy of r201339, head/sys/boot/pc98/libpc98/libpc98.h) @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 2009 TAKAHASHI Yoshihiro + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +void set_machine_type(void); Copied: stable/8/sys/boot/pc98/libpc98/pc98_sys.c (from r201339, head/sys/boot/pc98/libpc98/pc98_sys.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/pc98/libpc98/pc98_sys.c Fri Jan 15 11:26:20 2010 (r202343, copy of r201339, head/sys/boot/pc98/libpc98/pc98_sys.c) @@ -0,0 +1,78 @@ +/*- + * Copyright (c) 2009 TAKAHASHI Yoshihiro + * 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 +#define _KERNEL +#include + +/* + * Set machine type to PC98_SYSTEM_PARAMETER. + */ +void +set_machine_type(void) +{ + int i; + u_long ret, data; + + /* PC98_SYSTEM_PARAMETER (0x501) */ + ret = ((*(u_char *)PTOV(0xA1501)) & 0x08) >> 3; + + /* Wait V-SYNC */ + while (inb(0x60) & 0x20) {} + while (!(inb(0x60) & 0x20)) {} + + /* ANK 'A' font */ + outb(0xa1, 0x00); + outb(0xa3, 0x41); + + /* M_NORMAL, use CG window (all NEC OK) */ + for (i = data = 0; i < 4; i++) + data += *((u_long *)PTOV(0xA4000) + i); /* 0xa4000 */ + if (data == 0x6efc58fc) /* DA data */ + ret |= M_NEC_PC98; + else + ret |= M_EPSON_PC98; + ret |= (inb(0x42) & 0x20) ? M_8M : 0; + + /* PC98_SYSTEM_PARAMETER(0x400) */ + if ((*(u_char *)PTOV(0xA1400)) & 0x80) + ret |= M_NOTE; + if (ret & M_NEC_PC98) { + /* PC98_SYSTEM_PARAMETER(0x458) */ + if ((*(u_char *)PTOV(0xA1458)) & 0x80) + ret |= M_H98; + else + ret |= M_NOT_H98; + } else + ret |= M_NOT_H98; + + (*(u_long *)PTOV(0xA1620)) = ret; +} Modified: stable/8/sys/boot/pc98/loader/main.c ============================================================================== --- stable/8/sys/boot/pc98/loader/main.c Fri Jan 15 07:18:46 2010 (r202342) +++ stable/8/sys/boot/pc98/loader/main.c Fri Jan 15 11:26:20 2010 (r202343) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "libi386/libi386.h" +#include "libpc98/libpc98.h" #include "btxv86.h" #define KARGS_FLAGS_CD 0x1 @@ -81,6 +82,9 @@ main(void) { int i; + /* Set machine type to PC98_SYSTEM_PARAMETER. */ + set_machine_type(); + /* Pick up arguments */ kargs = (void *)__args; initial_howto = kargs->howto; From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 11:28:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 086C61065692; Fri, 15 Jan 2010 11:28:37 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8EC68FC13; Fri, 15 Jan 2010 11:28:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FBSa3n057343; Fri, 15 Jan 2010 11:28:36 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FBSa2X057336; Fri, 15 Jan 2010 11:28:36 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001151128.o0FBSa2X057336@svn.freebsd.org> From: Takahashi Yoshihiro Date: Fri, 15 Jan 2010 11:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202344 - in stable/7/sys/boot: common pc98 pc98/libpc98 pc98/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 11:28:37 -0000 Author: nyan Date: Fri Jan 15 11:28:36 2010 New Revision: 202344 URL: http://svn.freebsd.org/changeset/base/202344 Log: MFC: revision 201339 and 201340 - Add setting machine type support to the loader. - Don't use 15M-16M area on pc98. It's reserved for some devices. Added: stable/7/sys/boot/pc98/libpc98/libpc98.h - copied unchanged from r201339, head/sys/boot/pc98/libpc98/libpc98.h stable/7/sys/boot/pc98/libpc98/pc98_sys.c - copied unchanged from r201339, head/sys/boot/pc98/libpc98/pc98_sys.c Modified: stable/7/sys/boot/common/module.c stable/7/sys/boot/pc98/Makefile.inc stable/7/sys/boot/pc98/libpc98/Makefile stable/7/sys/boot/pc98/loader/main.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/common/module.c ============================================================================== --- stable/7/sys/boot/common/module.c Fri Jan 15 11:26:20 2010 (r202343) +++ stable/7/sys/boot/common/module.c Fri Jan 15 11:28:36 2010 (r202344) @@ -313,6 +313,9 @@ file_loadraw(char *type, char *name) char *cp; int fd, got; vm_offset_t laddr; +#ifdef PC98 + struct stat st; +#endif /* We can't load first */ if ((file_findfile(NULL, NULL)) == NULL) { @@ -334,6 +337,14 @@ file_loadraw(char *type, char *name) return(CMD_ERROR); } +#ifdef PC98 + /* We cannot use 15M-16M area on pc98. */ + if (loadaddr < 0x1000000 && + fstat(fd, &st) == 0 && + (st.st_size == -1 || loadaddr + st.st_size > 0xf00000)) + loadaddr = 0x1000000; +#endif + laddr = loadaddr; for (;;) { /* read in 4k chunks; size is not really important */ @@ -439,6 +450,14 @@ mod_loadkld(const char *kldname, int arg ; do { +#ifdef PC98 + /* We cannot use 15M-16M area on pc98. */ + struct stat st; + if (loadaddr < 0x1000000 && + stat(filename, &st) == 0 && + (st.st_size == -1 || loadaddr + st.st_size > 0xf00000)) + loadaddr = 0x1000000; +#endif err = file_load(filename, loadaddr, &fp); if (err) break; Modified: stable/7/sys/boot/pc98/Makefile.inc ============================================================================== --- stable/7/sys/boot/pc98/Makefile.inc Fri Jan 15 11:26:20 2010 (r202343) +++ stable/7/sys/boot/pc98/Makefile.inc Fri Jan 15 11:28:36 2010 (r202344) @@ -7,7 +7,7 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 \ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \ - -Os + -Os -DPC98 LDFLAGS+= -nostdlib # BTX components Modified: stable/7/sys/boot/pc98/libpc98/Makefile ============================================================================== --- stable/7/sys/boot/pc98/libpc98/Makefile Fri Jan 15 11:26:20 2010 (r202343) +++ stable/7/sys/boot/pc98/libpc98/Makefile Fri Jan 15 11:28:36 2010 (r202344) @@ -7,7 +7,7 @@ INTERNALLIB= SRCS= bioscd.c biosdisk.c biosmem.c biospnp.c biospci.c biossmap.c \ bootinfo.c bootinfo32.c comconsole.c devicename.c elf32_freebsd.c \ - i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ + i386_copy.c i386_module.c nullconsole.c pc98_sys.c pxe.c pxetramp.s \ time.c vidconsole.c BOOT_COMCONSOLE_PORT?= 0x238 Copied: stable/7/sys/boot/pc98/libpc98/libpc98.h (from r201339, head/sys/boot/pc98/libpc98/libpc98.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/boot/pc98/libpc98/libpc98.h Fri Jan 15 11:28:36 2010 (r202344, copy of r201339, head/sys/boot/pc98/libpc98/libpc98.h) @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 2009 TAKAHASHI Yoshihiro + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +void set_machine_type(void); Copied: stable/7/sys/boot/pc98/libpc98/pc98_sys.c (from r201339, head/sys/boot/pc98/libpc98/pc98_sys.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/boot/pc98/libpc98/pc98_sys.c Fri Jan 15 11:28:36 2010 (r202344, copy of r201339, head/sys/boot/pc98/libpc98/pc98_sys.c) @@ -0,0 +1,78 @@ +/*- + * Copyright (c) 2009 TAKAHASHI Yoshihiro + * 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 +#define _KERNEL +#include + +/* + * Set machine type to PC98_SYSTEM_PARAMETER. + */ +void +set_machine_type(void) +{ + int i; + u_long ret, data; + + /* PC98_SYSTEM_PARAMETER (0x501) */ + ret = ((*(u_char *)PTOV(0xA1501)) & 0x08) >> 3; + + /* Wait V-SYNC */ + while (inb(0x60) & 0x20) {} + while (!(inb(0x60) & 0x20)) {} + + /* ANK 'A' font */ + outb(0xa1, 0x00); + outb(0xa3, 0x41); + + /* M_NORMAL, use CG window (all NEC OK) */ + for (i = data = 0; i < 4; i++) + data += *((u_long *)PTOV(0xA4000) + i); /* 0xa4000 */ + if (data == 0x6efc58fc) /* DA data */ + ret |= M_NEC_PC98; + else + ret |= M_EPSON_PC98; + ret |= (inb(0x42) & 0x20) ? M_8M : 0; + + /* PC98_SYSTEM_PARAMETER(0x400) */ + if ((*(u_char *)PTOV(0xA1400)) & 0x80) + ret |= M_NOTE; + if (ret & M_NEC_PC98) { + /* PC98_SYSTEM_PARAMETER(0x458) */ + if ((*(u_char *)PTOV(0xA1458)) & 0x80) + ret |= M_H98; + else + ret |= M_NOT_H98; + } else + ret |= M_NOT_H98; + + (*(u_long *)PTOV(0xA1620)) = ret; +} Modified: stable/7/sys/boot/pc98/loader/main.c ============================================================================== --- stable/7/sys/boot/pc98/loader/main.c Fri Jan 15 11:26:20 2010 (r202343) +++ stable/7/sys/boot/pc98/loader/main.c Fri Jan 15 11:28:36 2010 (r202344) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "libi386/libi386.h" +#include "libpc98/libpc98.h" #include "btxv86.h" #define KARGS_FLAGS_CD 0x1 @@ -81,6 +82,9 @@ main(void) { int i; + /* Set machine type to PC98_SYSTEM_PARAMETER. */ + set_machine_type(); + /* Pick up arguments */ kargs = (void *)__args; initial_howto = kargs->howto; From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 11:32:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBEA9106566C; Fri, 15 Jan 2010 11:32:52 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A828C8FC14; Fri, 15 Jan 2010 11:32:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FBWq6F058317; Fri, 15 Jan 2010 11:32:52 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FBWqmM058310; Fri, 15 Jan 2010 11:32:52 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001151132.o0FBWqmM058310@svn.freebsd.org> From: Takahashi Yoshihiro Date: Fri, 15 Jan 2010 11:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202345 - in stable/6/sys/boot: common pc98 pc98/libpc98 pc98/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 11:32:52 -0000 Author: nyan Date: Fri Jan 15 11:32:52 2010 New Revision: 202345 URL: http://svn.freebsd.org/changeset/base/202345 Log: MFC: revision 201339 and 201340 - Add setting machine type support to the loader. - Don't use 15M-16M area on pc98. It's reserved for some devices. Added: stable/6/sys/boot/pc98/libpc98/libpc98.h - copied unchanged from r201339, head/sys/boot/pc98/libpc98/libpc98.h stable/6/sys/boot/pc98/libpc98/pc98_sys.c - copied unchanged from r201339, head/sys/boot/pc98/libpc98/pc98_sys.c Modified: stable/6/sys/boot/common/module.c stable/6/sys/boot/pc98/Makefile.inc stable/6/sys/boot/pc98/libpc98/Makefile stable/6/sys/boot/pc98/loader/main.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/common/module.c ============================================================================== --- stable/6/sys/boot/common/module.c Fri Jan 15 11:28:36 2010 (r202344) +++ stable/6/sys/boot/common/module.c Fri Jan 15 11:32:52 2010 (r202345) @@ -313,6 +313,9 @@ file_loadraw(char *type, char *name) char *cp; int fd, got; vm_offset_t laddr; +#ifdef PC98 + struct stat st; +#endif /* We can't load first */ if ((file_findfile(NULL, NULL)) == NULL) { @@ -334,6 +337,14 @@ file_loadraw(char *type, char *name) return(CMD_ERROR); } +#ifdef PC98 + /* We cannot use 15M-16M area on pc98. */ + if (loadaddr < 0x1000000 && + fstat(fd, &st) == 0 && + (st.st_size == -1 || loadaddr + st.st_size > 0xf00000)) + loadaddr = 0x1000000; +#endif + laddr = loadaddr; for (;;) { /* read in 4k chunks; size is not really important */ @@ -439,6 +450,14 @@ mod_loadkld(const char *kldname, int arg ; do { +#ifdef PC98 + /* We cannot use 15M-16M area on pc98. */ + struct stat st; + if (loadaddr < 0x1000000 && + stat(filename, &st) == 0 && + (st.st_size == -1 || loadaddr + st.st_size > 0xf00000)) + loadaddr = 0x1000000; +#endif err = file_load(filename, loadaddr, &fp); if (err) break; Modified: stable/6/sys/boot/pc98/Makefile.inc ============================================================================== --- stable/6/sys/boot/pc98/Makefile.inc Fri Jan 15 11:28:36 2010 (r202344) +++ stable/6/sys/boot/pc98/Makefile.inc Fri Jan 15 11:32:52 2010 (r202345) @@ -7,7 +7,7 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 \ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \ - -Os + -Os -DPC98 LDFLAGS+= -nostdlib # BTX components Modified: stable/6/sys/boot/pc98/libpc98/Makefile ============================================================================== --- stable/6/sys/boot/pc98/libpc98/Makefile Fri Jan 15 11:28:36 2010 (r202344) +++ stable/6/sys/boot/pc98/libpc98/Makefile Fri Jan 15 11:32:52 2010 (r202345) @@ -7,7 +7,7 @@ INTERNALLIB= SRCS= bioscd.c biosdisk.c biosmem.c biospnp.c biospci.c biossmap.c \ bootinfo.c bootinfo32.c comconsole.c devicename.c elf32_freebsd.c \ - i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ + i386_copy.c i386_module.c nullconsole.c pc98_sys.c pxe.c pxetramp.s \ time.c vidconsole.c BOOT_COMCONSOLE_PORT?= 0x238 Copied: stable/6/sys/boot/pc98/libpc98/libpc98.h (from r201339, head/sys/boot/pc98/libpc98/libpc98.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/6/sys/boot/pc98/libpc98/libpc98.h Fri Jan 15 11:32:52 2010 (r202345, copy of r201339, head/sys/boot/pc98/libpc98/libpc98.h) @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 2009 TAKAHASHI Yoshihiro + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +void set_machine_type(void); Copied: stable/6/sys/boot/pc98/libpc98/pc98_sys.c (from r201339, head/sys/boot/pc98/libpc98/pc98_sys.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/6/sys/boot/pc98/libpc98/pc98_sys.c Fri Jan 15 11:32:52 2010 (r202345, copy of r201339, head/sys/boot/pc98/libpc98/pc98_sys.c) @@ -0,0 +1,78 @@ +/*- + * Copyright (c) 2009 TAKAHASHI Yoshihiro + * 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 +#define _KERNEL +#include + +/* + * Set machine type to PC98_SYSTEM_PARAMETER. + */ +void +set_machine_type(void) +{ + int i; + u_long ret, data; + + /* PC98_SYSTEM_PARAMETER (0x501) */ + ret = ((*(u_char *)PTOV(0xA1501)) & 0x08) >> 3; + + /* Wait V-SYNC */ + while (inb(0x60) & 0x20) {} + while (!(inb(0x60) & 0x20)) {} + + /* ANK 'A' font */ + outb(0xa1, 0x00); + outb(0xa3, 0x41); + + /* M_NORMAL, use CG window (all NEC OK) */ + for (i = data = 0; i < 4; i++) + data += *((u_long *)PTOV(0xA4000) + i); /* 0xa4000 */ + if (data == 0x6efc58fc) /* DA data */ + ret |= M_NEC_PC98; + else + ret |= M_EPSON_PC98; + ret |= (inb(0x42) & 0x20) ? M_8M : 0; + + /* PC98_SYSTEM_PARAMETER(0x400) */ + if ((*(u_char *)PTOV(0xA1400)) & 0x80) + ret |= M_NOTE; + if (ret & M_NEC_PC98) { + /* PC98_SYSTEM_PARAMETER(0x458) */ + if ((*(u_char *)PTOV(0xA1458)) & 0x80) + ret |= M_H98; + else + ret |= M_NOT_H98; + } else + ret |= M_NOT_H98; + + (*(u_long *)PTOV(0xA1620)) = ret; +} Modified: stable/6/sys/boot/pc98/loader/main.c ============================================================================== --- stable/6/sys/boot/pc98/loader/main.c Fri Jan 15 11:28:36 2010 (r202344) +++ stable/6/sys/boot/pc98/loader/main.c Fri Jan 15 11:32:52 2010 (r202345) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "libi386/libi386.h" +#include "libpc98/libpc98.h" #include "btxv86.h" #define KARGS_FLAGS_CD 0x1 @@ -81,6 +82,9 @@ main(void) { int i; + /* Set machine type to PC98_SYSTEM_PARAMETER. */ + set_machine_type(); + /* Pick up arguments */ kargs = (void *)__args; initial_howto = kargs->howto; From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:00:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 763881065670; Fri, 15 Jan 2010 12:00:49 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC678FC1C; Fri, 15 Jan 2010 12:00:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FC0n6H064648; Fri, 15 Jan 2010 12:00:49 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FC0nKw064647; Fri, 15 Jan 2010 12:00:49 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151200.o0FC0nKw064647@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 12:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202346 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:00:49 -0000 Author: ru Date: Fri Jan 15 12:00:48 2010 New Revision: 202346 URL: http://svn.freebsd.org/changeset/base/202346 Log: Allow commits to vendor/groff. Modified: svnadmin/conf/paths Modified: svnadmin/conf/paths ============================================================================== --- svnadmin/conf/paths Fri Jan 15 11:32:52 2010 (r202345) +++ svnadmin/conf/paths Fri Jan 15 12:00:48 2010 (r202346) @@ -64,6 +64,7 @@ ^vendor/file ^vendor/gdb ^vendor/gdtoa +^vendor/groff ^vendor/less ^vendor/libbegemot ^vendor/libpcap From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:01:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5DC1106568F; Fri, 15 Jan 2010 12:01:25 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D6718FC38; Fri, 15 Jan 2010 12:01:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FC1PVO064831; Fri, 15 Jan 2010 12:01:25 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FC1PEN064826; Fri, 15 Jan 2010 12:01:25 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151201.o0FC1PEN064826@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 12:01:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202347 - in vendor/groff: 1.10 1.10/addftinfo 1.10/afmtodit 1.10/contrib 1.10/devX100 1.10/devX100-12 1.10/devX75 1.10/devX75-12 1.10/devascii 1.10/devdvi 1.10/devlatin1 1.10/devlj4 1.... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:01:25 -0000 Author: ru Date: Fri Jan 15 12:01:25 2010 New Revision: 202347 URL: http://svn.freebsd.org/changeset/base/202347 Log: Flatten out vendor tree. Added: vendor/groff/1.10/BUG-REPORT - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/BUG-REPORT vendor/groff/1.10/COPYING - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/COPYING vendor/groff/1.10/ChangeLog - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/ChangeLog vendor/groff/1.10/INSTALL - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/INSTALL vendor/groff/1.10/INSTALL.gen - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/INSTALL.gen vendor/groff/1.10/Makefile - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/Makefile vendor/groff/1.10/Makefile.ccpg - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/Makefile.ccpg vendor/groff/1.10/Makefile.comm - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/Makefile.comm vendor/groff/1.10/Makefile.cpg - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/Makefile.cpg vendor/groff/1.10/Makefile.dev - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/Makefile.dev vendor/groff/1.10/Makefile.in - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/Makefile.in vendor/groff/1.10/Makefile.init - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/Makefile.init vendor/groff/1.10/Makefile.lib - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/Makefile.lib vendor/groff/1.10/Makefile.man - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/Makefile.man vendor/groff/1.10/Makefile.sub - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/Makefile.sub vendor/groff/1.10/NEWS - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/NEWS vendor/groff/1.10/PROBLEMS - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/PROBLEMS vendor/groff/1.10/PROJECTS - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/PROJECTS vendor/groff/1.10/README - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/README vendor/groff/1.10/TODO - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/TODO vendor/groff/1.10/VERSION - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/VERSION vendor/groff/1.10/aclocal.m4 - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/aclocal.m4 vendor/groff/1.10/addftinfo/ - copied from r202342, vendor/groff/1.10/contrib/groff/addftinfo/ vendor/groff/1.10/afmtodit/ - copied from r202342, vendor/groff/1.10/contrib/groff/afmtodit/ vendor/groff/1.10/configure - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/configure vendor/groff/1.10/configure.in - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/configure.in vendor/groff/1.10/devX100/ - copied from r202342, vendor/groff/1.10/contrib/groff/devX100/ vendor/groff/1.10/devX100-12/ - copied from r202342, vendor/groff/1.10/contrib/groff/devX100-12/ vendor/groff/1.10/devX75/ - copied from r202342, vendor/groff/1.10/contrib/groff/devX75/ vendor/groff/1.10/devX75-12/ - copied from r202342, vendor/groff/1.10/contrib/groff/devX75-12/ vendor/groff/1.10/devascii/ - copied from r202342, vendor/groff/1.10/contrib/groff/devascii/ vendor/groff/1.10/devdvi/ - copied from r202342, vendor/groff/1.10/contrib/groff/devdvi/ vendor/groff/1.10/devlatin1/ - copied from r202342, vendor/groff/1.10/contrib/groff/devlatin1/ vendor/groff/1.10/devlj4/ - copied from r202342, vendor/groff/1.10/contrib/groff/devlj4/ vendor/groff/1.10/devps/ - copied from r202342, vendor/groff/1.10/contrib/groff/devps/ vendor/groff/1.10/doc/ - copied from r202342, vendor/groff/1.10/contrib/groff/doc/ vendor/groff/1.10/eqn/ - copied from r202342, vendor/groff/1.10/contrib/groff/eqn/ vendor/groff/1.10/gendef.sh - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/gendef.sh vendor/groff/1.10/grodvi/ - copied from r202342, vendor/groff/1.10/contrib/groff/grodvi/ vendor/groff/1.10/groff/ - copied from r202342, vendor/groff/1.10/contrib/groff/groff/ vendor/groff/1.10/grog/ - copied from r202342, vendor/groff/1.10/contrib/groff/grog/ vendor/groff/1.10/grolj4/ - copied from r202342, vendor/groff/1.10/contrib/groff/grolj4/ vendor/groff/1.10/grops/ - copied from r202342, vendor/groff/1.10/contrib/groff/grops/ vendor/groff/1.10/grotty/ - copied from r202342, vendor/groff/1.10/contrib/groff/grotty/ vendor/groff/1.10/hpftodit/ - copied from r202342, vendor/groff/1.10/contrib/groff/hpftodit/ vendor/groff/1.10/include/ - copied from r202342, vendor/groff/1.10/contrib/groff/include/ vendor/groff/1.10/indxbib/ - copied from r202342, vendor/groff/1.10/contrib/groff/indxbib/ vendor/groff/1.10/install-sh - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/install-sh vendor/groff/1.10/libbib/ - copied from r202342, vendor/groff/1.10/contrib/groff/libbib/ vendor/groff/1.10/libdriver/ - copied from r202342, vendor/groff/1.10/contrib/groff/libdriver/ vendor/groff/1.10/libgroff/ - copied from r202342, vendor/groff/1.10/contrib/groff/libgroff/ vendor/groff/1.10/lkbib/ - copied from r202342, vendor/groff/1.10/contrib/groff/lkbib/ vendor/groff/1.10/lookbib/ - copied from r202342, vendor/groff/1.10/contrib/groff/lookbib/ vendor/groff/1.10/man/ - copied from r202342, vendor/groff/1.10/contrib/groff/man/ vendor/groff/1.10/mdate.sh - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/mdate.sh vendor/groff/1.10/mm/ - copied from r202342, vendor/groff/1.10/contrib/groff/mm/ vendor/groff/1.10/nroff/ - copied from r202342, vendor/groff/1.10/contrib/groff/nroff/ vendor/groff/1.10/pfbtops/ - copied from r202342, vendor/groff/1.10/contrib/groff/pfbtops/ vendor/groff/1.10/pic/ - copied from r202342, vendor/groff/1.10/contrib/groff/pic/ vendor/groff/1.10/psbb/ - copied from r202342, vendor/groff/1.10/contrib/groff/psbb/ vendor/groff/1.10/refer/ - copied from r202342, vendor/groff/1.10/contrib/groff/refer/ vendor/groff/1.10/soelim/ - copied from r202342, vendor/groff/1.10/contrib/groff/soelim/ vendor/groff/1.10/tbl/ - copied from r202342, vendor/groff/1.10/contrib/groff/tbl/ vendor/groff/1.10/test-groff - copied unchanged from r202342, vendor/groff/1.10/contrib/groff/test-groff vendor/groff/1.10/tfmtodit/ - copied from r202342, vendor/groff/1.10/contrib/groff/tfmtodit/ vendor/groff/1.10/tmac/ - copied from r202342, vendor/groff/1.10/contrib/groff/tmac/ vendor/groff/1.10/troff/ - copied from r202342, vendor/groff/1.10/contrib/groff/troff/ vendor/groff/1.10/xditview/ - copied from r202342, vendor/groff/1.10/contrib/groff/xditview/ vendor/groff/1.11/BUG-REPORT - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/BUG-REPORT vendor/groff/1.11/COPYING - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/COPYING vendor/groff/1.11/ChangeLog - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/ChangeLog vendor/groff/1.11/INSTALL - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/INSTALL vendor/groff/1.11/INSTALL.gen - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/INSTALL.gen vendor/groff/1.11/Makefile - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/Makefile vendor/groff/1.11/Makefile.ccpg - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/Makefile.ccpg vendor/groff/1.11/Makefile.comm - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/Makefile.comm vendor/groff/1.11/Makefile.cpg - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/Makefile.cpg vendor/groff/1.11/Makefile.dev - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/Makefile.dev vendor/groff/1.11/Makefile.in - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/Makefile.in vendor/groff/1.11/Makefile.init - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/Makefile.init vendor/groff/1.11/Makefile.lib - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/Makefile.lib vendor/groff/1.11/Makefile.man - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/Makefile.man vendor/groff/1.11/Makefile.sub - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/Makefile.sub vendor/groff/1.11/NEWS - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/NEWS vendor/groff/1.11/PROBLEMS - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/PROBLEMS vendor/groff/1.11/PROJECTS - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/PROJECTS vendor/groff/1.11/README - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/README vendor/groff/1.11/TODO - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/TODO vendor/groff/1.11/VERSION - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/VERSION vendor/groff/1.11/aclocal.m4 - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/aclocal.m4 vendor/groff/1.11/addftinfo/ - copied from r202342, vendor/groff/1.11/contrib/groff/addftinfo/ vendor/groff/1.11/afmtodit/ - copied from r202342, vendor/groff/1.11/contrib/groff/afmtodit/ vendor/groff/1.11/configure - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/configure vendor/groff/1.11/configure.in - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/configure.in vendor/groff/1.11/devX100/ - copied from r202342, vendor/groff/1.11/contrib/groff/devX100/ vendor/groff/1.11/devX100-12/ - copied from r202342, vendor/groff/1.11/contrib/groff/devX100-12/ vendor/groff/1.11/devX75/ - copied from r202342, vendor/groff/1.11/contrib/groff/devX75/ vendor/groff/1.11/devX75-12/ - copied from r202342, vendor/groff/1.11/contrib/groff/devX75-12/ vendor/groff/1.11/devascii/ - copied from r202342, vendor/groff/1.11/contrib/groff/devascii/ vendor/groff/1.11/devdvi/ - copied from r202342, vendor/groff/1.11/contrib/groff/devdvi/ vendor/groff/1.11/devlatin1/ - copied from r202342, vendor/groff/1.11/contrib/groff/devlatin1/ vendor/groff/1.11/devlj4/ - copied from r202342, vendor/groff/1.11/contrib/groff/devlj4/ vendor/groff/1.11/devps/ - copied from r202342, vendor/groff/1.11/contrib/groff/devps/ vendor/groff/1.11/doc/ - copied from r202342, vendor/groff/1.11/contrib/groff/doc/ vendor/groff/1.11/eqn/ - copied from r202342, vendor/groff/1.11/contrib/groff/eqn/ vendor/groff/1.11/gendef.sh - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/gendef.sh vendor/groff/1.11/grodvi/ - copied from r202342, vendor/groff/1.11/contrib/groff/grodvi/ vendor/groff/1.11/groff/ - copied from r202342, vendor/groff/1.11/contrib/groff/groff/ vendor/groff/1.11/grog/ - copied from r202342, vendor/groff/1.11/contrib/groff/grog/ vendor/groff/1.11/grolj4/ - copied from r202342, vendor/groff/1.11/contrib/groff/grolj4/ vendor/groff/1.11/grops/ - copied from r202342, vendor/groff/1.11/contrib/groff/grops/ vendor/groff/1.11/grotty/ - copied from r202342, vendor/groff/1.11/contrib/groff/grotty/ vendor/groff/1.11/hpftodit/ - copied from r202342, vendor/groff/1.11/contrib/groff/hpftodit/ vendor/groff/1.11/include/ - copied from r202342, vendor/groff/1.11/contrib/groff/include/ vendor/groff/1.11/indxbib/ - copied from r202342, vendor/groff/1.11/contrib/groff/indxbib/ vendor/groff/1.11/install-sh - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/install-sh vendor/groff/1.11/libbib/ - copied from r202342, vendor/groff/1.11/contrib/groff/libbib/ vendor/groff/1.11/libdriver/ - copied from r202342, vendor/groff/1.11/contrib/groff/libdriver/ vendor/groff/1.11/libgroff/ - copied from r202342, vendor/groff/1.11/contrib/groff/libgroff/ vendor/groff/1.11/lkbib/ - copied from r202342, vendor/groff/1.11/contrib/groff/lkbib/ vendor/groff/1.11/lookbib/ - copied from r202342, vendor/groff/1.11/contrib/groff/lookbib/ vendor/groff/1.11/man/ - copied from r202342, vendor/groff/1.11/contrib/groff/man/ vendor/groff/1.11/mdate.sh - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/mdate.sh vendor/groff/1.11/mm/ - copied from r202342, vendor/groff/1.11/contrib/groff/mm/ vendor/groff/1.11/nroff/ - copied from r202342, vendor/groff/1.11/contrib/groff/nroff/ vendor/groff/1.11/pfbtops/ - copied from r202342, vendor/groff/1.11/contrib/groff/pfbtops/ vendor/groff/1.11/pic/ - copied from r202342, vendor/groff/1.11/contrib/groff/pic/ vendor/groff/1.11/psbb/ - copied from r202342, vendor/groff/1.11/contrib/groff/psbb/ vendor/groff/1.11/refer/ - copied from r202342, vendor/groff/1.11/contrib/groff/refer/ vendor/groff/1.11/soelim/ - copied from r202342, vendor/groff/1.11/contrib/groff/soelim/ vendor/groff/1.11/tbl/ - copied from r202342, vendor/groff/1.11/contrib/groff/tbl/ vendor/groff/1.11/test-groff - copied unchanged from r202342, vendor/groff/1.11/contrib/groff/test-groff vendor/groff/1.11/tfmtodit/ - copied from r202342, vendor/groff/1.11/contrib/groff/tfmtodit/ vendor/groff/1.11/tmac/ - copied from r202342, vendor/groff/1.11/contrib/groff/tmac/ vendor/groff/1.11/troff/ - copied from r202342, vendor/groff/1.11/contrib/groff/troff/ vendor/groff/1.11/xditview/ - copied from r202342, vendor/groff/1.11/contrib/groff/xditview/ vendor/groff/1.15/BUG-REPORT - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/BUG-REPORT vendor/groff/1.15/COPYING - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/COPYING vendor/groff/1.15/ChangeLog - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/ChangeLog vendor/groff/1.15/INSTALL - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/INSTALL vendor/groff/1.15/INSTALL.gen - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/INSTALL.gen vendor/groff/1.15/Makefile - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/Makefile vendor/groff/1.15/Makefile.ccpg - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/Makefile.ccpg vendor/groff/1.15/Makefile.comm - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/Makefile.comm vendor/groff/1.15/Makefile.cpg - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/Makefile.cpg vendor/groff/1.15/Makefile.dev - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/Makefile.dev vendor/groff/1.15/Makefile.in - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/Makefile.in vendor/groff/1.15/Makefile.init - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/Makefile.init vendor/groff/1.15/Makefile.lib - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/Makefile.lib vendor/groff/1.15/Makefile.man - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/Makefile.man vendor/groff/1.15/Makefile.sub - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/Makefile.sub vendor/groff/1.15/NEWS - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/NEWS vendor/groff/1.15/PROBLEMS - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/PROBLEMS vendor/groff/1.15/PROJECTS - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/PROJECTS vendor/groff/1.15/README - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/README vendor/groff/1.15/TODO - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/TODO vendor/groff/1.15/VERSION - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/VERSION vendor/groff/1.15/aclocal.m4 - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/aclocal.m4 vendor/groff/1.15/addftinfo/ - copied from r202342, vendor/groff/1.15/contrib/groff/addftinfo/ vendor/groff/1.15/afmtodit/ - copied from r202342, vendor/groff/1.15/contrib/groff/afmtodit/ vendor/groff/1.15/configure - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/configure vendor/groff/1.15/configure.in - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/configure.in vendor/groff/1.15/devX100/ - copied from r202342, vendor/groff/1.15/contrib/groff/devX100/ vendor/groff/1.15/devX100-12/ - copied from r202342, vendor/groff/1.15/contrib/groff/devX100-12/ vendor/groff/1.15/devX75/ - copied from r202342, vendor/groff/1.15/contrib/groff/devX75/ vendor/groff/1.15/devX75-12/ - copied from r202342, vendor/groff/1.15/contrib/groff/devX75-12/ vendor/groff/1.15/devascii/ - copied from r202342, vendor/groff/1.15/contrib/groff/devascii/ vendor/groff/1.15/devdvi/ - copied from r202342, vendor/groff/1.15/contrib/groff/devdvi/ vendor/groff/1.15/devhtml/ - copied from r202342, vendor/groff/1.15/contrib/groff/devhtml/ vendor/groff/1.15/devlatin1/ - copied from r202342, vendor/groff/1.15/contrib/groff/devlatin1/ vendor/groff/1.15/devlj4/ - copied from r202342, vendor/groff/1.15/contrib/groff/devlj4/ vendor/groff/1.15/devps/ - copied from r202342, vendor/groff/1.15/contrib/groff/devps/ vendor/groff/1.15/doc/ - copied from r202342, vendor/groff/1.15/contrib/groff/doc/ vendor/groff/1.15/eqn/ - copied from r202342, vendor/groff/1.15/contrib/groff/eqn/ vendor/groff/1.15/gendef.sh - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/gendef.sh vendor/groff/1.15/grodvi/ - copied from r202342, vendor/groff/1.15/contrib/groff/grodvi/ vendor/groff/1.15/groff/ - copied from r202342, vendor/groff/1.15/contrib/groff/groff/ vendor/groff/1.15/grog/ - copied from r202342, vendor/groff/1.15/contrib/groff/grog/ vendor/groff/1.15/grohtml/ - copied from r202342, vendor/groff/1.15/contrib/groff/grohtml/ vendor/groff/1.15/grolj4/ - copied from r202342, vendor/groff/1.15/contrib/groff/grolj4/ vendor/groff/1.15/grops/ - copied from r202342, vendor/groff/1.15/contrib/groff/grops/ vendor/groff/1.15/grotty/ - copied from r202342, vendor/groff/1.15/contrib/groff/grotty/ vendor/groff/1.15/hpftodit/ - copied from r202342, vendor/groff/1.15/contrib/groff/hpftodit/ vendor/groff/1.15/include/ - copied from r202342, vendor/groff/1.15/contrib/groff/include/ vendor/groff/1.15/indxbib/ - copied from r202342, vendor/groff/1.15/contrib/groff/indxbib/ vendor/groff/1.15/install-sh - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/install-sh vendor/groff/1.15/libbib/ - copied from r202342, vendor/groff/1.15/contrib/groff/libbib/ vendor/groff/1.15/libdriver/ - copied from r202342, vendor/groff/1.15/contrib/groff/libdriver/ vendor/groff/1.15/libgroff/ - copied from r202342, vendor/groff/1.15/contrib/groff/libgroff/ vendor/groff/1.15/lkbib/ - copied from r202342, vendor/groff/1.15/contrib/groff/lkbib/ vendor/groff/1.15/lookbib/ - copied from r202342, vendor/groff/1.15/contrib/groff/lookbib/ vendor/groff/1.15/man/ - copied from r202342, vendor/groff/1.15/contrib/groff/man/ vendor/groff/1.15/mdate.sh - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/mdate.sh vendor/groff/1.15/mm/ - copied from r202342, vendor/groff/1.15/contrib/groff/mm/ vendor/groff/1.15/nroff/ - copied from r202342, vendor/groff/1.15/contrib/groff/nroff/ vendor/groff/1.15/pfbtops/ - copied from r202342, vendor/groff/1.15/contrib/groff/pfbtops/ vendor/groff/1.15/pic/ - copied from r202342, vendor/groff/1.15/contrib/groff/pic/ vendor/groff/1.15/psbb/ - copied from r202342, vendor/groff/1.15/contrib/groff/psbb/ vendor/groff/1.15/refer/ - copied from r202342, vendor/groff/1.15/contrib/groff/refer/ vendor/groff/1.15/soelim/ - copied from r202342, vendor/groff/1.15/contrib/groff/soelim/ vendor/groff/1.15/tbl/ - copied from r202342, vendor/groff/1.15/contrib/groff/tbl/ vendor/groff/1.15/test-groff - copied unchanged from r202342, vendor/groff/1.15/contrib/groff/test-groff vendor/groff/1.15/tfmtodit/ - copied from r202342, vendor/groff/1.15/contrib/groff/tfmtodit/ vendor/groff/1.15/tmac/ - copied from r202342, vendor/groff/1.15/contrib/groff/tmac/ vendor/groff/1.15/troff/ - copied from r202342, vendor/groff/1.15/contrib/groff/troff/ vendor/groff/1.15/xditview/ - copied from r202342, vendor/groff/1.15/contrib/groff/xditview/ vendor/groff/1.16.1/BUG-REPORT - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/BUG-REPORT vendor/groff/1.16.1/COPYING - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/COPYING vendor/groff/1.16.1/ChangeLog - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/ChangeLog vendor/groff/1.16.1/FDL - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/FDL vendor/groff/1.16.1/INSTALL - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/INSTALL vendor/groff/1.16.1/INSTALL.gen - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/INSTALL.gen vendor/groff/1.16.1/MORE.STUFF - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/MORE.STUFF vendor/groff/1.16.1/Makefile - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/Makefile vendor/groff/1.16.1/Makefile.ccpg - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/Makefile.ccpg vendor/groff/1.16.1/Makefile.comm - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/Makefile.comm vendor/groff/1.16.1/Makefile.cpg - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/Makefile.cpg vendor/groff/1.16.1/Makefile.dev - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/Makefile.dev vendor/groff/1.16.1/Makefile.in - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/Makefile.in vendor/groff/1.16.1/Makefile.init - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/Makefile.init vendor/groff/1.16.1/Makefile.lib - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/Makefile.lib vendor/groff/1.16.1/Makefile.man - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/Makefile.man vendor/groff/1.16.1/Makefile.sub - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/Makefile.sub vendor/groff/1.16.1/NEWS - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/NEWS vendor/groff/1.16.1/PROBLEMS - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/PROBLEMS vendor/groff/1.16.1/PROJECTS - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/PROJECTS vendor/groff/1.16.1/README - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/README vendor/groff/1.16.1/README.WIN32 - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/README.WIN32 vendor/groff/1.16.1/REVISION - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/REVISION vendor/groff/1.16.1/TODO - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/TODO vendor/groff/1.16.1/VERSION - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/VERSION vendor/groff/1.16.1/aclocal.m4 - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/aclocal.m4 vendor/groff/1.16.1/addftinfo/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/addftinfo/ vendor/groff/1.16.1/afmtodit/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/afmtodit/ vendor/groff/1.16.1/configure - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/configure vendor/groff/1.16.1/configure.in - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/configure.in vendor/groff/1.16.1/devX100/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devX100/ vendor/groff/1.16.1/devX100-12/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devX100-12/ vendor/groff/1.16.1/devX75/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devX75/ vendor/groff/1.16.1/devX75-12/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devX75-12/ vendor/groff/1.16.1/devascii/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devascii/ vendor/groff/1.16.1/devcp1047/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devcp1047/ vendor/groff/1.16.1/devdvi/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devdvi/ vendor/groff/1.16.1/devhtml/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devhtml/ vendor/groff/1.16.1/devlatin1/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devlatin1/ vendor/groff/1.16.1/devlbp/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devlbp/ vendor/groff/1.16.1/devlj4/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devlj4/ vendor/groff/1.16.1/devps/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devps/ vendor/groff/1.16.1/devutf8/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/devutf8/ vendor/groff/1.16.1/doc/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/doc/ vendor/groff/1.16.1/eqn/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/eqn/ vendor/groff/1.16.1/gendef.sh - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/gendef.sh vendor/groff/1.16.1/grn/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/grn/ vendor/groff/1.16.1/grodvi/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/grodvi/ vendor/groff/1.16.1/groff/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/groff/ vendor/groff/1.16.1/grog/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/grog/ vendor/groff/1.16.1/grohtml/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/grohtml/ vendor/groff/1.16.1/grolbp/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/grolbp/ vendor/groff/1.16.1/grolj4/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/grolj4/ vendor/groff/1.16.1/grops/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/grops/ vendor/groff/1.16.1/grotty/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/grotty/ vendor/groff/1.16.1/hpftodit/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/hpftodit/ vendor/groff/1.16.1/include/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/include/ vendor/groff/1.16.1/indxbib/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/indxbib/ vendor/groff/1.16.1/install-sh - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/install-sh vendor/groff/1.16.1/libbib/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/libbib/ vendor/groff/1.16.1/libdriver/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/libdriver/ vendor/groff/1.16.1/libgroff/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/libgroff/ vendor/groff/1.16.1/lkbib/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/lkbib/ vendor/groff/1.16.1/lookbib/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/lookbib/ vendor/groff/1.16.1/man/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/man/ vendor/groff/1.16.1/mdate.sh - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/mdate.sh vendor/groff/1.16.1/mkinstalldirs - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/mkinstalldirs vendor/groff/1.16.1/mm/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/mm/ vendor/groff/1.16.1/nroff/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/nroff/ vendor/groff/1.16.1/pfbtops/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/pfbtops/ vendor/groff/1.16.1/pic/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/pic/ vendor/groff/1.16.1/refer/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/refer/ vendor/groff/1.16.1/soelim/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/soelim/ vendor/groff/1.16.1/tbl/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/tbl/ vendor/groff/1.16.1/test-groff - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/test-groff vendor/groff/1.16.1/tfmtodit/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/tfmtodit/ vendor/groff/1.16.1/tmac/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/tmac/ vendor/groff/1.16.1/troff/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/troff/ vendor/groff/1.16.1/win32-diffs - copied unchanged from r202342, vendor/groff/1.16.1/contrib/groff/win32-diffs vendor/groff/1.16.1/xditview/ - copied from r202342, vendor/groff/1.16.1/contrib/groff/xditview/ vendor/groff/1.17.2/BUG-REPORT - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/BUG-REPORT vendor/groff/1.17.2/COPYING - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/COPYING vendor/groff/1.17.2/ChangeLog - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/ChangeLog vendor/groff/1.17.2/FDL - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/FDL vendor/groff/1.17.2/INSTALL - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/INSTALL vendor/groff/1.17.2/INSTALL.gen - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/INSTALL.gen vendor/groff/1.17.2/MORE.STUFF - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/MORE.STUFF vendor/groff/1.17.2/Makefile - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/Makefile vendor/groff/1.17.2/Makefile.ccpg - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/Makefile.ccpg vendor/groff/1.17.2/Makefile.comm - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/Makefile.comm vendor/groff/1.17.2/Makefile.cpg - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/Makefile.cpg vendor/groff/1.17.2/Makefile.dev - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/Makefile.dev vendor/groff/1.17.2/Makefile.in - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/Makefile.in vendor/groff/1.17.2/Makefile.init - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/Makefile.init vendor/groff/1.17.2/Makefile.lib - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/Makefile.lib vendor/groff/1.17.2/Makefile.man - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/Makefile.man vendor/groff/1.17.2/Makefile.sub - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/Makefile.sub vendor/groff/1.17.2/NEWS - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/NEWS vendor/groff/1.17.2/PROBLEMS - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/PROBLEMS vendor/groff/1.17.2/PROJECTS - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/PROJECTS vendor/groff/1.17.2/README - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/README vendor/groff/1.17.2/README.WIN32 - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/README.WIN32 vendor/groff/1.17.2/REVISION - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/REVISION vendor/groff/1.17.2/TODO - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/TODO vendor/groff/1.17.2/VERSION - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/VERSION vendor/groff/1.17.2/aclocal.m4 - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/aclocal.m4 vendor/groff/1.17.2/configure - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/configure vendor/groff/1.17.2/configure.ac - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/configure.ac vendor/groff/1.17.2/contrib/mm/ - copied from r202342, vendor/groff/1.17.2/contrib/groff/contrib/mm/ vendor/groff/1.17.2/doc/ - copied from r202342, vendor/groff/1.17.2/contrib/groff/doc/ vendor/groff/1.17.2/font/ - copied from r202342, vendor/groff/1.17.2/contrib/groff/font/ vendor/groff/1.17.2/gendef.sh - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/gendef.sh vendor/groff/1.17.2/install-sh - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/install-sh vendor/groff/1.17.2/man/ - copied from r202342, vendor/groff/1.17.2/contrib/groff/man/ vendor/groff/1.17.2/mdate.sh - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/mdate.sh vendor/groff/1.17.2/mkinstalldirs - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/mkinstalldirs vendor/groff/1.17.2/src/ - copied from r202342, vendor/groff/1.17.2/contrib/groff/src/ vendor/groff/1.17.2/test-groff - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/test-groff vendor/groff/1.17.2/tmac/ - copied from r202342, vendor/groff/1.17.2/contrib/groff/tmac/ vendor/groff/1.17.2/win32-diffs - copied unchanged from r202342, vendor/groff/1.17.2/contrib/groff/win32-diffs vendor/groff/1.17/BUG-REPORT - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/BUG-REPORT vendor/groff/1.17/COPYING - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/COPYING vendor/groff/1.17/ChangeLog - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/ChangeLog vendor/groff/1.17/FDL - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/FDL vendor/groff/1.17/INSTALL - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/INSTALL vendor/groff/1.17/INSTALL.gen - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/INSTALL.gen vendor/groff/1.17/MORE.STUFF - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/MORE.STUFF vendor/groff/1.17/Makefile - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/Makefile vendor/groff/1.17/Makefile.ccpg - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/Makefile.ccpg vendor/groff/1.17/Makefile.comm - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/Makefile.comm vendor/groff/1.17/Makefile.cpg - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/Makefile.cpg vendor/groff/1.17/Makefile.dev - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/Makefile.dev vendor/groff/1.17/Makefile.in - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/Makefile.in vendor/groff/1.17/Makefile.init - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/Makefile.init vendor/groff/1.17/Makefile.lib - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/Makefile.lib vendor/groff/1.17/Makefile.man - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/Makefile.man vendor/groff/1.17/Makefile.sub - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/Makefile.sub vendor/groff/1.17/NEWS - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/NEWS vendor/groff/1.17/PROBLEMS - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/PROBLEMS vendor/groff/1.17/PROJECTS - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/PROJECTS vendor/groff/1.17/README - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/README vendor/groff/1.17/README.WIN32 - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/README.WIN32 vendor/groff/1.17/REVISION - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/REVISION vendor/groff/1.17/TODO - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/TODO vendor/groff/1.17/VERSION - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/VERSION vendor/groff/1.17/aclocal.m4 - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/aclocal.m4 vendor/groff/1.17/configure - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/configure vendor/groff/1.17/configure.in - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/configure.in vendor/groff/1.17/contrib/mm/ - copied from r202342, vendor/groff/1.17/contrib/groff/contrib/mm/ vendor/groff/1.17/doc/ - copied from r202342, vendor/groff/1.17/contrib/groff/doc/ vendor/groff/1.17/font/ - copied from r202342, vendor/groff/1.17/contrib/groff/font/ vendor/groff/1.17/gendef.sh - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/gendef.sh vendor/groff/1.17/install-sh - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/install-sh vendor/groff/1.17/man/ - copied from r202342, vendor/groff/1.17/contrib/groff/man/ vendor/groff/1.17/mdate.sh - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/mdate.sh vendor/groff/1.17/mkinstalldirs - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/mkinstalldirs vendor/groff/1.17/src/ - copied from r202342, vendor/groff/1.17/contrib/groff/src/ vendor/groff/1.17/test-groff - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/test-groff vendor/groff/1.17/tmac/ - copied from r202342, vendor/groff/1.17/contrib/groff/tmac/ vendor/groff/1.17/win32-diffs - copied unchanged from r202342, vendor/groff/1.17/contrib/groff/win32-diffs vendor/groff/1.18.1/BUG-REPORT - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/BUG-REPORT vendor/groff/1.18.1/COPYING - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/COPYING vendor/groff/1.18.1/ChangeLog - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/ChangeLog vendor/groff/1.18.1/FDL - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/FDL vendor/groff/1.18.1/INSTALL - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/INSTALL vendor/groff/1.18.1/INSTALL.gen - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/INSTALL.gen vendor/groff/1.18.1/MANIFEST - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/MANIFEST vendor/groff/1.18.1/MORE.STUFF - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/MORE.STUFF vendor/groff/1.18.1/Makefile - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/Makefile vendor/groff/1.18.1/Makefile.ccpg - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/Makefile.ccpg vendor/groff/1.18.1/Makefile.comm - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/Makefile.comm vendor/groff/1.18.1/Makefile.cpg - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/Makefile.cpg vendor/groff/1.18.1/Makefile.dev - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/Makefile.dev vendor/groff/1.18.1/Makefile.in - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/Makefile.in vendor/groff/1.18.1/Makefile.init - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/Makefile.init vendor/groff/1.18.1/Makefile.lib - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/Makefile.lib vendor/groff/1.18.1/Makefile.man - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/Makefile.man vendor/groff/1.18.1/Makefile.sub - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/Makefile.sub vendor/groff/1.18.1/NEWS - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/NEWS vendor/groff/1.18.1/PROBLEMS - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/PROBLEMS vendor/groff/1.18.1/PROJECTS - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/PROJECTS vendor/groff/1.18.1/README - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/README vendor/groff/1.18.1/README.WIN32 - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/README.WIN32 vendor/groff/1.18.1/REVISION - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/REVISION vendor/groff/1.18.1/TODO - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/TODO vendor/groff/1.18.1/VERSION - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/VERSION vendor/groff/1.18.1/aclocal.m4 - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/aclocal.m4 vendor/groff/1.18.1/configure - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/configure vendor/groff/1.18.1/configure.ac - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/configure.ac vendor/groff/1.18.1/contrib/eqn2graph/ - copied from r202342, vendor/groff/1.18.1/contrib/groff/contrib/eqn2graph/ vendor/groff/1.18.1/contrib/groffer/ - copied from r202342, vendor/groff/1.18.1/contrib/groff/contrib/groffer/ vendor/groff/1.18.1/contrib/mm/ - copied from r202342, vendor/groff/1.18.1/contrib/groff/contrib/mm/ vendor/groff/1.18.1/contrib/mom/ - copied from r202342, vendor/groff/1.18.1/contrib/groff/contrib/mom/ vendor/groff/1.18.1/contrib/pic2graph/ - copied from r202342, vendor/groff/1.18.1/contrib/groff/contrib/pic2graph/ vendor/groff/1.18.1/doc/ - copied from r202342, vendor/groff/1.18.1/contrib/groff/doc/ vendor/groff/1.18.1/font/ - copied from r202342, vendor/groff/1.18.1/contrib/groff/font/ vendor/groff/1.18.1/gendef.sh - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/gendef.sh vendor/groff/1.18.1/install-sh - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/install-sh vendor/groff/1.18.1/man/ - copied from r202342, vendor/groff/1.18.1/contrib/groff/man/ vendor/groff/1.18.1/mdate.sh - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/mdate.sh vendor/groff/1.18.1/mkinstalldirs - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/mkinstalldirs vendor/groff/1.18.1/src/ - copied from r202342, vendor/groff/1.18.1/contrib/groff/src/ vendor/groff/1.18.1/stamp-h.in - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/stamp-h.in vendor/groff/1.18.1/test-groff - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/test-groff vendor/groff/1.18.1/tmac/ - copied from r202342, vendor/groff/1.18.1/contrib/groff/tmac/ vendor/groff/1.18.1/win32-diffs - copied unchanged from r202342, vendor/groff/1.18.1/contrib/groff/win32-diffs vendor/groff/1.19.2/BUG-REPORT - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/BUG-REPORT vendor/groff/1.19.2/COPYING - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/COPYING vendor/groff/1.19.2/ChangeLog - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/ChangeLog vendor/groff/1.19.2/ChangeLog.115 - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/ChangeLog.115 vendor/groff/1.19.2/ChangeLog.116 - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/ChangeLog.116 vendor/groff/1.19.2/ChangeLog.117 - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/ChangeLog.117 vendor/groff/1.19.2/ChangeLog.118 - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/ChangeLog.118 vendor/groff/1.19.2/FDL - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/FDL vendor/groff/1.19.2/INSTALL - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/INSTALL vendor/groff/1.19.2/INSTALL.gen - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/INSTALL.gen vendor/groff/1.19.2/LICENSE - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/LICENSE vendor/groff/1.19.2/MANIFEST - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/MANIFEST vendor/groff/1.19.2/MORE.STUFF - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/MORE.STUFF vendor/groff/1.19.2/Makefile - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/Makefile vendor/groff/1.19.2/Makefile.ccpg - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/Makefile.ccpg vendor/groff/1.19.2/Makefile.comm - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/Makefile.comm vendor/groff/1.19.2/Makefile.cpg - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/Makefile.cpg vendor/groff/1.19.2/Makefile.dev - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/Makefile.dev vendor/groff/1.19.2/Makefile.in - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/Makefile.in vendor/groff/1.19.2/Makefile.init - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/Makefile.init vendor/groff/1.19.2/Makefile.lib - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/Makefile.lib vendor/groff/1.19.2/Makefile.man - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/Makefile.man vendor/groff/1.19.2/Makefile.sub - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/Makefile.sub vendor/groff/1.19.2/NEWS - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/NEWS vendor/groff/1.19.2/PROBLEMS - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/PROBLEMS vendor/groff/1.19.2/PROJECTS - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/PROJECTS vendor/groff/1.19.2/README - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/README vendor/groff/1.19.2/README.MinGW - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/README.MinGW vendor/groff/1.19.2/REVISION - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/REVISION vendor/groff/1.19.2/TODO - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/TODO vendor/groff/1.19.2/VERSION - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/VERSION vendor/groff/1.19.2/aclocal.m4 - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/aclocal.m4 vendor/groff/1.19.2/configure - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/configure vendor/groff/1.19.2/configure.ac - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/configure.ac vendor/groff/1.19.2/contrib/eqn2graph/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/contrib/eqn2graph/ vendor/groff/1.19.2/contrib/gdiffmk/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/contrib/gdiffmk/ vendor/groff/1.19.2/contrib/grap2graph/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/contrib/grap2graph/ vendor/groff/1.19.2/contrib/groffer/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/contrib/groffer/ vendor/groff/1.19.2/contrib/mm/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/contrib/mm/ vendor/groff/1.19.2/contrib/mom/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/contrib/mom/ vendor/groff/1.19.2/contrib/pdfmark/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/contrib/pdfmark/ vendor/groff/1.19.2/contrib/pic2graph/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/contrib/pic2graph/ vendor/groff/1.19.2/doc/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/doc/ vendor/groff/1.19.2/font/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/font/ vendor/groff/1.19.2/gendef.sh - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/gendef.sh vendor/groff/1.19.2/install-sh - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/install-sh vendor/groff/1.19.2/man/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/man/ vendor/groff/1.19.2/mdate.sh - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/mdate.sh vendor/groff/1.19.2/mkinstalldirs - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/mkinstalldirs vendor/groff/1.19.2/src/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/src/ vendor/groff/1.19.2/stamp-h.in - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/stamp-h.in vendor/groff/1.19.2/test-groff.in - copied unchanged from r202342, vendor/groff/1.19.2/contrib/groff/test-groff.in vendor/groff/1.19.2/tmac/ - copied from r202342, vendor/groff/1.19.2/contrib/groff/tmac/ vendor/groff/1.19/BUG-REPORT - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/BUG-REPORT vendor/groff/1.19/COPYING - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/COPYING vendor/groff/1.19/ChangeLog - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/ChangeLog vendor/groff/1.19/FDL - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/FDL vendor/groff/1.19/INSTALL - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/INSTALL vendor/groff/1.19/INSTALL.gen - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/INSTALL.gen vendor/groff/1.19/MANIFEST - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/MANIFEST vendor/groff/1.19/MORE.STUFF - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/MORE.STUFF vendor/groff/1.19/Makefile - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/Makefile vendor/groff/1.19/Makefile.ccpg - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/Makefile.ccpg vendor/groff/1.19/Makefile.comm - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/Makefile.comm vendor/groff/1.19/Makefile.cpg - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/Makefile.cpg vendor/groff/1.19/Makefile.dev - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/Makefile.dev vendor/groff/1.19/Makefile.in - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/Makefile.in vendor/groff/1.19/Makefile.init - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/Makefile.init vendor/groff/1.19/Makefile.lib - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/Makefile.lib vendor/groff/1.19/Makefile.man - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/Makefile.man vendor/groff/1.19/Makefile.sub - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/Makefile.sub vendor/groff/1.19/NEWS - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/NEWS vendor/groff/1.19/PROBLEMS - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/PROBLEMS vendor/groff/1.19/PROJECTS - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/PROJECTS vendor/groff/1.19/README - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/README vendor/groff/1.19/README.CVS - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/README.CVS vendor/groff/1.19/README.WIN32 - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/README.WIN32 vendor/groff/1.19/REVISION - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/REVISION vendor/groff/1.19/TODO - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/TODO vendor/groff/1.19/VERSION - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/VERSION vendor/groff/1.19/aclocal.m4 - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/aclocal.m4 vendor/groff/1.19/configure - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/configure vendor/groff/1.19/configure.ac - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/configure.ac vendor/groff/1.19/contrib/eqn2graph/ - copied from r202342, vendor/groff/1.19/contrib/groff/contrib/eqn2graph/ vendor/groff/1.19/contrib/groffer/ - copied from r202342, vendor/groff/1.19/contrib/groff/contrib/groffer/ vendor/groff/1.19/contrib/mm/ - copied from r202342, vendor/groff/1.19/contrib/groff/contrib/mm/ vendor/groff/1.19/contrib/mom/ - copied from r202342, vendor/groff/1.19/contrib/groff/contrib/mom/ vendor/groff/1.19/contrib/pic2graph/ - copied from r202342, vendor/groff/1.19/contrib/groff/contrib/pic2graph/ vendor/groff/1.19/doc/ - copied from r202342, vendor/groff/1.19/contrib/groff/doc/ vendor/groff/1.19/font/ - copied from r202342, vendor/groff/1.19/contrib/groff/font/ vendor/groff/1.19/gendef.sh - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/gendef.sh vendor/groff/1.19/install-sh - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/install-sh vendor/groff/1.19/man/ - copied from r202342, vendor/groff/1.19/contrib/groff/man/ vendor/groff/1.19/mdate.sh - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/mdate.sh vendor/groff/1.19/mkinstalldirs - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/mkinstalldirs vendor/groff/1.19/src/ - copied from r202342, vendor/groff/1.19/contrib/groff/src/ vendor/groff/1.19/stamp-h.in - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/stamp-h.in vendor/groff/1.19/test-groff - copied unchanged from r202342, vendor/groff/1.19/contrib/groff/test-groff vendor/groff/1.19/tmac/ - copied from r202342, vendor/groff/1.19/contrib/groff/tmac/ vendor/groff/dist/BUG-REPORT - copied unchanged from r202342, vendor/groff/dist/contrib/groff/BUG-REPORT vendor/groff/dist/COPYING - copied unchanged from r202342, vendor/groff/dist/contrib/groff/COPYING vendor/groff/dist/ChangeLog - copied unchanged from r202342, vendor/groff/dist/contrib/groff/ChangeLog vendor/groff/dist/ChangeLog.115 - copied unchanged from r202342, vendor/groff/dist/contrib/groff/ChangeLog.115 vendor/groff/dist/ChangeLog.116 - copied unchanged from r202342, vendor/groff/dist/contrib/groff/ChangeLog.116 vendor/groff/dist/ChangeLog.117 - copied unchanged from r202342, vendor/groff/dist/contrib/groff/ChangeLog.117 vendor/groff/dist/ChangeLog.118 - copied unchanged from r202342, vendor/groff/dist/contrib/groff/ChangeLog.118 vendor/groff/dist/FDL - copied unchanged from r202342, vendor/groff/dist/contrib/groff/FDL vendor/groff/dist/INSTALL - copied unchanged from r202342, vendor/groff/dist/contrib/groff/INSTALL vendor/groff/dist/INSTALL.gen - copied unchanged from r202342, vendor/groff/dist/contrib/groff/INSTALL.gen vendor/groff/dist/LICENSE - copied unchanged from r202342, vendor/groff/dist/contrib/groff/LICENSE vendor/groff/dist/MANIFEST - copied unchanged from r202342, vendor/groff/dist/contrib/groff/MANIFEST vendor/groff/dist/MORE.STUFF - copied unchanged from r202342, vendor/groff/dist/contrib/groff/MORE.STUFF vendor/groff/dist/Makefile - copied unchanged from r202342, vendor/groff/dist/contrib/groff/Makefile vendor/groff/dist/Makefile.ccpg - copied unchanged from r202342, vendor/groff/dist/contrib/groff/Makefile.ccpg vendor/groff/dist/Makefile.comm - copied unchanged from r202342, vendor/groff/dist/contrib/groff/Makefile.comm vendor/groff/dist/Makefile.cpg - copied unchanged from r202342, vendor/groff/dist/contrib/groff/Makefile.cpg vendor/groff/dist/Makefile.dev - copied unchanged from r202342, vendor/groff/dist/contrib/groff/Makefile.dev vendor/groff/dist/Makefile.in - copied unchanged from r202342, vendor/groff/dist/contrib/groff/Makefile.in vendor/groff/dist/Makefile.init - copied unchanged from r202342, vendor/groff/dist/contrib/groff/Makefile.init vendor/groff/dist/Makefile.lib - copied unchanged from r202342, vendor/groff/dist/contrib/groff/Makefile.lib vendor/groff/dist/Makefile.man - copied unchanged from r202342, vendor/groff/dist/contrib/groff/Makefile.man vendor/groff/dist/Makefile.sub - copied unchanged from r202342, vendor/groff/dist/contrib/groff/Makefile.sub vendor/groff/dist/NEWS - copied unchanged from r202342, vendor/groff/dist/contrib/groff/NEWS vendor/groff/dist/PROBLEMS - copied unchanged from r202342, vendor/groff/dist/contrib/groff/PROBLEMS vendor/groff/dist/PROJECTS - copied unchanged from r202342, vendor/groff/dist/contrib/groff/PROJECTS vendor/groff/dist/README - copied unchanged from r202342, vendor/groff/dist/contrib/groff/README vendor/groff/dist/README.MinGW - copied unchanged from r202342, vendor/groff/dist/contrib/groff/README.MinGW vendor/groff/dist/REVISION - copied unchanged from r202342, vendor/groff/dist/contrib/groff/REVISION vendor/groff/dist/TODO - copied unchanged from r202342, vendor/groff/dist/contrib/groff/TODO vendor/groff/dist/VERSION - copied unchanged from r202342, vendor/groff/dist/contrib/groff/VERSION vendor/groff/dist/aclocal.m4 - copied unchanged from r202342, vendor/groff/dist/contrib/groff/aclocal.m4 vendor/groff/dist/configure - copied unchanged from r202342, vendor/groff/dist/contrib/groff/configure vendor/groff/dist/configure.ac - copied unchanged from r202342, vendor/groff/dist/contrib/groff/configure.ac vendor/groff/dist/contrib/eqn2graph/ - copied from r202342, vendor/groff/dist/contrib/groff/contrib/eqn2graph/ vendor/groff/dist/contrib/gdiffmk/ - copied from r202342, vendor/groff/dist/contrib/groff/contrib/gdiffmk/ vendor/groff/dist/contrib/grap2graph/ - copied from r202342, vendor/groff/dist/contrib/groff/contrib/grap2graph/ vendor/groff/dist/contrib/groffer/ - copied from r202342, vendor/groff/dist/contrib/groff/contrib/groffer/ vendor/groff/dist/contrib/mm/ - copied from r202342, vendor/groff/dist/contrib/groff/contrib/mm/ vendor/groff/dist/contrib/mom/ - copied from r202342, vendor/groff/dist/contrib/groff/contrib/mom/ vendor/groff/dist/contrib/pdfmark/ - copied from r202342, vendor/groff/dist/contrib/groff/contrib/pdfmark/ vendor/groff/dist/contrib/pic2graph/ - copied from r202342, vendor/groff/dist/contrib/groff/contrib/pic2graph/ vendor/groff/dist/doc/ - copied from r202342, vendor/groff/dist/contrib/groff/doc/ vendor/groff/dist/font/ - copied from r202342, vendor/groff/dist/contrib/groff/font/ vendor/groff/dist/gendef.sh - copied unchanged from r202342, vendor/groff/dist/contrib/groff/gendef.sh vendor/groff/dist/install-sh - copied unchanged from r202342, vendor/groff/dist/contrib/groff/install-sh vendor/groff/dist/man/ - copied from r202342, vendor/groff/dist/contrib/groff/man/ vendor/groff/dist/mdate.sh - copied unchanged from r202342, vendor/groff/dist/contrib/groff/mdate.sh vendor/groff/dist/mkinstalldirs - copied unchanged from r202342, vendor/groff/dist/contrib/groff/mkinstalldirs vendor/groff/dist/src/ - copied from r202342, vendor/groff/dist/contrib/groff/src/ vendor/groff/dist/stamp-h.in - copied unchanged from r202342, vendor/groff/dist/contrib/groff/stamp-h.in vendor/groff/dist/test-groff.in - copied unchanged from r202342, vendor/groff/dist/contrib/groff/test-groff.in vendor/groff/dist/tmac/ - copied from r202342, vendor/groff/dist/contrib/groff/tmac/ Deleted: vendor/groff/1.10/contrib/ vendor/groff/1.11/contrib/ vendor/groff/1.15/contrib/ vendor/groff/1.16.1/contrib/ vendor/groff/1.17.2/contrib/groff/ vendor/groff/1.17/contrib/groff/ vendor/groff/1.18.1/contrib/groff/ vendor/groff/1.19.2/contrib/groff/ vendor/groff/1.19/contrib/groff/ vendor/groff/dist/contrib/groff/ Copied: vendor/groff/1.10/BUG-REPORT (from r202342, vendor/groff/1.10/contrib/groff/BUG-REPORT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/groff/1.10/BUG-REPORT Fri Jan 15 12:01:25 2010 (r202347, copy of r202342, vendor/groff/1.10/contrib/groff/BUG-REPORT) @@ -0,0 +1,55 @@ + Groff Bug Report + +Please read the PROBLEMS file before sending in a bug report. + +Please fill in all fields, even if you think they are not relevant. + +Please delete the text in brackets before sending it in. + +Please report separate bugs separately. + +Send the completed form to bug-groff@prep.ai.mit.edu. + +GROFF VERSION: +[The version of groff you are using. For example, `1.05'] + +MACHINE: +[The machine you are using. For example, `Sun SPARCstation 2'] + +OS: +[The operating system you are using. For example, `SunOS 4.1.1'] + +COMPILER: +[The compiler you are used to compile groff. For example, `g++ 1.40.3'] + +INPUT FILES: +[Include all the files necessary to reproduce the problem that are not +part of the standard groff distribution. This includes font +description files, DESC files and macro files (with the exception of +the -ms and -mm macros: I have them). Send them as as a shell archive +or as a uuencoded, compressed tar file. + +It's easier for me if you can provide an example that doesn't depend +on any macro package, but obviously if you're reporting a problem with +a macro package that won't be possible. Also a short example is more +convenient than a long one, but don't worry if you can't find a short +example. Don't say something like ``any file that X'': always send a +definite example.] + +COMMAND LINE: +[The command line that I should run in order to observe the bug. For +example, `gtroff -Tps bug.tr'. If the command line uses -ms or -mm, +say whether these refer to the groff versions or the Unix versions of +the macros.] + +DESCRIPTION OF INCORRECT BEHAVIOUR: +[What goes wrong when that command line is run? For example, `gtroff +gets a segmentation fault', or `The output looks bad because the bar +over the x is too long and is too far over to the left.' If you get +an error message, include it here without modification: don't edit it +to make it more readable.] + +SUGGESTED FIX [optional]: +[If you can suggest a fix for the problem, include a context diff +here. But don't delay sending in a bug report in the hope of finding +a fix. Guesses about the cause of the bug are not usually helpful.] Copied: vendor/groff/1.10/COPYING (from r202342, vendor/groff/1.10/contrib/groff/COPYING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/groff/1.10/COPYING Fri Jan 15 12:01:25 2010 (r202347, copy of r202342, vendor/groff/1.10/contrib/groff/COPYING) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Copied: vendor/groff/1.10/ChangeLog (from r202342, vendor/groff/1.10/contrib/groff/ChangeLog) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/groff/1.10/ChangeLog Fri Jan 15 12:01:25 2010 (r202347, copy of r202342, vendor/groff/1.10/contrib/groff/ChangeLog) @@ -0,0 +1,5717 @@ +Sun Nov 26 11:45:13 1995 James Clark + + * Version 1.10 released. + +Fri Nov 24 09:56:16 1995 James Clark + + * afmtodit/afmtodit.pl: Avoid comment on first line. + +Mon Nov 20 11:13:49 1995 James Clark + + * aclocal.m4 (GROFF_INSTALL_SH): New macro. + * configure.in: Call it. + + * Makefile.sub (configure): Depends on aclocal.m4 not acgroff.m4. + (distfiles): Doesn't depend on config.log or config.cache. + +Sun Oct 1 08:45:36 1995 James Clark + + * grog/grog.sh: Use print "" rather than print in END rule. + +Wed Aug 23 13:30:52 1995 James Clark + + * tbl/main.cc (process_data): Don't give error for excess data + entries that are comments. + +Fri Jul 28 11:00:27 1995 James Clark + + * tbl/main.cc (process_data): Fix case where new for-scope rules + silently change meaning of code. + +Tue Jul 4 23:39:51 1995 James Clark + + * troff/env.cc (hyphenate): Loop over all consecutive sequences + of non-zero hyphenation codes. + +Sat Jul 1 00:42:15 1995 James Clark + + * aclocal.m4 (GROFF_POSIX): Use conflicting declaration technique. + +Thu Jun 29 13:58:36 1995 James Clark + + * tmac/tmac.e (ip): Divert the tag so as to freeze the spaces. + +Tue Jun 27 12:30:16 1995 James Clark + + * tmac/tmac.andoc: Make it work in compatibility mode. + + * refer/token.h (token_info::is_range_sep): New function. + * refer/token.cc (init_special_chars): Make \(en a RANGE_SEP. + * refer/ref.cc (reference::output): More sophisticated check for + multiple pages. + + * devps/prologue.ps (MANUAL): New procedure. + * grops/ps.cc (main): New -m option. + (usage): Include -m. + (ps_printer::~ps_printer): Implement -m. + + * aclocal.m4 (GROFF_G): New macro. + * configure.in: Call it. + * Makefile.in (g): Provided by configure. + + * hpftodit/hpftodit.cc (basename): Rename to xbasename. + + * tmac/tmac.tty: Disable warning about bad fonts. Remove font + translations. + + * Makefile.in (tmacpath): Don't include /usr/lib/tmac. + (tmac_m, tmac_s): Deleted. + (sys_tmac_prefix, tmac_wrap, tmac_prefix, tmac_an_prefix, + tmac_s_prefix): New variables. + (MDEFINES): Change accordingly. + * Makefile.comm (.man.n): Use new TMAC_* variables. + * configure.in (GROFF_TMAC): Call. + * aclocal.m4 (GROFF_TMAC): Define. + * tmac/Makefile.sub (stamp_wrap): New target. + (install_data, uninstall_sub): Handle macro wrapping. + +Mon Jun 26 14:54:39 1995 James Clark + + * tbl/main.cc (main): Ignore -T option. + +Thu Jun 22 09:08:06 1995 James Clark + + * devlj4/generate/special.map: Add definition of \(nb. + + * tmac/tmac.dvi: Add definition of \(nb. + + * troff/dictionary.c (dictionary::dictionary): association::v gets + initialized by association::association. + + * tmac/Makefile.sub: Avoid using temporary files when installing. + + * troff/env.cc (environment::set_font): Make bad font number a + warning. + + * Makefile.in (fontpath): Remove $(prefix)/lib/font from fontpath. + + * Makefile.in (datadir): Use share rather than lib. + + * groff/groff.cc (basename): Rename to xbasename. + +Wed Jun 21 16:59:46 1995 James Clark + + * Makefile (CCLIBS): Don't use. + * Makefile.ccpg: Likewise. + + * acgroff.m4: Rename to... + * aclocal.m4: Modify extensively for autoconf 2. + * configure.in: Likewise. + * Makefile.in: Likewise. + + * groff/pipeline.c (const): Declare as empty if __STDC__ not + defined. + (xstrsignal): Check for definition of NSIG. Conditionalize + on SYS_SIGLIST_DECLARED. Make return type const. + +Sat Jun 10 12:28:16 1995 James Clark + + * troff/input.cc (interpolate_macro): Rephrase missing space + warning. + +Thu May 11 01:07:16 1995 Jason Merrill + + * addftinfo/addftinfo.cc, eqn/delim.cc, eqn/lex.cc, eqn/list.cc, + grodvi/dvi.cc, groff/groff.cc, grops/ps.cc, grops/psrm.cc, + grotty/tty.cc, include/ptable.h indxbib/indxbib.cc, + libbib/index.cc, libbib/linear.cc, libbib/search.cc, + libdriver/input.cc, libdriver/printer.cc, libgroff/font.cc, + libgroff/lf.cc, libgroff/nametoindex.cc, libgroff/ptable.cc, + libgroff/string.cc, lkbib/lkbib.cc, lookbib/lookbib.cc, + pic/lex.cc, pic/object.cc, pic/pic.y refer/label.y refer/ref.cc, + refer/refer.cc, refer/token.cc, tbl/main.cc, tbl/table.cc, + tfmtodit/tfmtodit.cc, troff/dictionary.cc, troff/div.cc, + troff/env.cc, troff/input.cc, troff/node.cc, troff/symbol.cc: + Fix 'for' scoping. + +Wed Apr 19 21:15:11 1995 James Clark + + * troff/input.cc (spring_trap): Push a macro_iterator rather than a + string_iterator. + (spring_trap, postpone_traps, unpostpone_traps): Move to later in + file. + (macro_iterator::macro_iterator): Add additional argument. + +Mon Apr 10 12:06:02 1995 James Clark + + * troff/div.cc (vertical_size::vertical_size): In place of integer + specifying line spacing use cunits specifying post vertical + space. + (macro_diversion::output, top_level_diversion::output): Likewise. + * troff/div.h: Change declarations accordingly. + * troff/env.cc (pending_output_line): Replace ls field by post_vs + field. + (pending_output_line::pending_output_line, + pending_output_line::output, environment::output, + environment::output_line, environment::output_title, + environment::hyphenate_line): In place of + integer specifying line spacing use cunits specifying post vertical + space. + (environment::environment): Add post_vertical_spacing and + prev_post_vertical_spacing arguments. + (environment::get_post_vertical_spacing): New function. + (environment::total_post_vertical_spacing): New function. + (environment::post_vertical_spacing): New function. + (init_env_requests): Initialize pvs request and .pvs register. + * troff/env.h: Change declarations. + +Tue Mar 28 09:52:07 1995 James Clark + + * tmac/tmac.pspic: Immediately remove the temporary file. + +Sat Mar 25 10:43:11 1995 James Clark + + * tmac/tmac.pspic (PSPIC): Scale graphic uniformly even when + height is specified. + +Thu Jan 26 16:20:13 1995 James Clark + + * tbl/table.c (struct vertical rule, class table_entry): Use int + not short for start_row and end_row. + +Fri Jan 13 13:53:05 1995 James Clark + + * troff/input.cc (trapping_blank_line, blank_line_macro): New + functions. + (diverted_space_node::reread, process_input_stack): Call + trapping_blank_line() rather than blank_line(). + (init_input_requests): Bind "blm" to blank_line_macro(). + + * tmac/tmac.s (XA): Use .br and par@reset rather than XA. + +Tue Jan 10 11:40:35 1995 James Clark + + * troff/env.cc (environment::possibly_break_line): Require that + width total excluding width of final space node be greater than + the target text length. + +Tue Jan 3 09:13:37 1995 James Clark + + * troff/node.cc (kern_pair_node::vertical_extent): New function. + +Sun Dec 4 13:19:07 1994 James Clark + + * troff/node.cc (charinfo_node): New class. + (glyph_node, composite_node): Derive from charinfo_node. Change + member functions accordingly. + +Wed Nov 30 10:29:29 1994 James Clark + + * nroff/nroff.sh: Use -Tlatin1 not -TLatin1. + +Mon Aug 8 10:17:59 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.tty-char: Add definitions for \(ab and \[arrowvertex]. + + * devps/generate/textmap (notsubset): Add. + + * tmac/tmac.a4: New file. + +Sun Jul 24 20:08:42 1994 James Clark (jjc@jclark.com) + + * pic/main.cc (had_parse_error): New variable. + (do_picture, do_whole_file): Set had_parse_error if yyparse() + returns non-zero. + (main): Return 1 if had_parse_error is true. + +Tue Jul 19 13:40:31 1994 James Clark (jjc@jclark.com) + + * grolj4/lj4.cc (main): Avoid use of strtoul. + +Mon Jul 18 15:03:02 1994 James Clark (jjc@jclark.com) + + * nroff/nroff.sh: Default device is -Tlatin1 if $LC_CTYPE is + iso_8859_1 or $LESSCHARSET is latin1. + +Sun Jul 10 13:38:35 1994 James Clark (jjc@jclark.com) + + * hpftodit: New directory. + * Makefile.in (CCPROGDIRS): Add hpftodit. + * devlj4/generate: New directory. + +Thu Jul 7 23:49:48 1994 James Clark (jjc@jclark.com) + + * configure.in: Don't use AC_VFORK. + * groff/pipeline.c (run_pipeline): Use fork() always. + +Wed Jul 6 11:13:17 1994 James Clark (jjc@jclark.com) + + * grops/ps.cc (main): Use %1 not %s in error message for -w. + + * Makefile.in (CCPROGDIRS): Add grolj4. + (DEVDIRS): Add devlj4. + * grolj4, devlj4: New directories. + * tmac/troffrc: Handle lj4. + * tmac/tmac.lj4: New file. + +Fri Jun 17 18:02:53 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.e (@n): Set indent to 0 before calling |h. + +Wed Jun 1 07:33:47 1994 James Clark (jjc@jclark.com) + + * troff/input.cc (do_if_request): At end of second string, switch + environments before getting next token. + +Fri May 20 07:39:18 1994 James Clark (jjc@jclark.com) + + * devps/psstrip.sed: Split rule that strips whitespace on either + side of delimiters. + +Wed May 18 08:13:47 1994 James Clark (jjc@jclark.com) + + * troff/node.h (font_family::make_definition): Add return value to + declaration. * troff/symbol.h (symbol::operator==, + symbol::operator!=): Likewise. + +Tue May 17 20:46:06 1994 James Clark (jjc@jclark.com) + + * groff/groff.cc (main, help, synopsis): Handle -S. + (possible_command::insert_arg): New function. + + * tmac/tmac.safer: New file. + * tmac/msafer.man: New file. + * tmac/Makefile.sub (FILES): Add tmac.safer and msafer.man. + +Thu Mar 10 01:58:30 1994 Paul Eggert (eggert@twinsun.com) + + * pic/pic.h, pic/main.cc (safer_flag): New variable. + * pic/pic.y (placeless_element): Avoid unsafe operations if + `safer_flag' is set. + * pic/main.cc (main): Add -S option, which sets `safer_flag'. + +Tue May 10 13:02:31 1994 James Clark (jjc@jclark.com) + + * eqn/lex.cc (get_token): Put call to add_context() in block to + work around Sun C++ 4.0 bug. + + * include/stringclass.h (operator +): Use ?: instead of `if' to + work around Sun C++ 4.0 bug. + +Thu May 5 11:18:03 1994 James Clark (jjc@jclark.com) + + * tbl/main.cc (process_format): Accept - as a synonym for the _ + key letter. + + * libbib/index.cc (minus_one): Don't declare as const. + +Fri Apr 29 09:32:48 1994 James Clark (jjc@jclark.com) + + * troff/input.cc (get_char_for_escape_name): Push back a newline. + +Wed Apr 27 21:14:18 1994 James Clark (jjc@jclark.com) + + * troff/input.cc (write_macro_request): New function. + (init_input_requests): Bind write_macro_request to writem. + +Sun Apr 17 11:15:38 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.s (@EN): Turn filling back on even if there was no + equation. + + * eqn/lex.cc (do_space): Supply missing argument to lex_error. + + * tmac/tmac.s (@TS): Renamed from TS. + (TS): Call LP then TS again. + (cov*ab-init): Alias @TS to TS. + + * tmac/tmac.s: Allow QP or RS to initialize. + + * tmac/tmac.s (par@load-init): New macro. Call at end of file. + Move initializations of PS and LL here. + (par@init): Don't initialize HY. Avoid changing environment 0. + (par*env-init): Don't all par@reset. + +Thu Apr 14 19:15:45 1994 James Clark (jjc@jclark.com) + + * include/posix.h: Include only if not using . + +Sun Apr 10 09:54:44 1994 James Clark (jjc@jclark.com) + + * Makefile.in (MDEFINES): Add LDFLAGS. + (LDFLAGS): Add definition line. + +Thu Apr 7 22:22:22 1994 James Clark (jjc@jclark.com) + + * troff/input.cc (get_optional_char): Split off error check into... + (check_missing_character): New function. + * troff/token.h: Declare it. + * troff/env.cc (margin_character): Don't call get_optional_char. + Only call tok.next() after making the node. + + * include/lib.h (getopt): Make 2nd argument char *const *. + +Fri Mar 11 07:28:03 1994 James Clark (jjc@jclark.com) + + * nroff/conftest.sh: Deleted. + +Fri Mar 4 10:51:36 1994 James Clark (jjc@jclark.com) + + * pic/make-dos-dist: Deleted. + +Wed Mar 2 20:59:16 1994 James Clark (jjc@jclark.com) + + * devps/psstrip.sed: Strip comments before stripping trailing + white space. + +Sat Feb 19 13:07:16 1994 James Clark (jjc@jclark.com) + + * Version 1.09 released. + +Wed Feb 16 16:53:49 1994 James Clark (jjc@jclark.com) + + * tmac/doc-ditroff (hK): Don't reset page number if \nC is > 0. + +Mon Feb 14 08:26:40 1994 James Clark (jjc@jclark.com) + + * libgroff/font.cc (font::load_desc): Fix typo in error message. + +Sun Feb 13 09:37:38 1994 James Clark (jjc@jclark.com) + + * libgroff/new.cc (operator new): Rewrite so as to avoid warning + about returning without a value. + + * troff/charinfo.h (charinfo::get_special_translation): Cast + TRANSLATE_NONE to int. + + * refer/token.cc (lookup_token, store_token): Remove bogus loop + test. Fix test so that it works with n unsigned. + + * pic/pic.y (defaults_table): Fully bracket initializer. + * pic/lex.cc (lookup_keyword): Likewise. + * eqn/lex.cc (token_table, def_table): Likewise. + * eqn/box.cc (param_table): Likewise. + * troff/input.cc (warning_table): Likewise. + * libgroff/font.cc (table): Likewise. + * grops/ps.cc (ps_printer::special): Likewise. + * grops/psrm.cc (resource_manager::process_file): Likewise. + * tfmtodit/tfmtodit.cc (lig_chars, lig_table): Likewise. + * refer/command.cc (command_table): Likewise. + * addftinfo/addftinfo.cc (param_table): Likewise. + + * troff/symbol.cc (symbol::symbol): Prevent compiler warnings + about temp's being unused. + (unused): New function. + + * groff/pipeline.cc: Declare c_fatal. + + * libbib/linear.cc (bmpattern::search): Cast patterrn[--j] to + uchar. + + * libbib/index.cc (index_search_item::load): Prevent compiler + warnings about fd_closer's being unused. + (unused): New function. + +Sat Feb 12 10:31:59 1994 James Clark (jjc@jclark.com) + + * troff/input.cc (copy_mode_error): Make `prefix' static. + Fix typo. + + * include/posix.h: Include is HAVE_CC_OSFCN_H is + defined. + * acgroff.m4, configure.in, Makefile: Rename HAVE_CC_UNISTD_H to + HAVE_CC_OSFCN_H and modify accordingly. + + * troff/input.cc (init_charset_table): radicalex overlaps + horizontally. + + * groff/acgroff.m4 (GROFF_ISC_SYSV3): New macro (from + udodo!hans@relay.NL.net). + * groff/configure.in: Call it. + + * groff/acgroff.m4 (GROFF_PCLOSE): New macro. + * groff/configure.in: Call it. + * include/lib.h: Conditionalize declaration of pclose. + + * troff/div.cc (last_page_number): New global variable. + (top_level_diversion::begin_page): Exit if we just printed the + last page. + * troff/div.h (last_page_number): Declare it. + * troff/input.cc (parse_output_page_list): Set last_page_number. + + * eqn/sqrt.cc: Rename \(rn to \[radicalex]. + * devps/S, devps/textmap, tmac/tmac.ps, tmac/tmac.dvi, + tmac/tmac.X: Likewise. + * tmac/tmac.ps, tmac/tmac.X, tmac.dvi: Add definitions of \(rn. + * tmac.dvi: Make \(ru and \(ul extend beyond their width by .04m. + +Fri Feb 11 11:45:40 1994 James Clark (jjc@jclark.com) + + * tmac/doc-ditroff (hK): Remove groff specific code which + prevented page-breaks between separate manual entries. If this is + the first page, don't set the page number to 1. + + * acgroff.m4 (GROFF_POSIX): New macro. + * configure.in: Use it. + + * troff/node.cc (class real_output_file, + real_output_file::real_output_file, + real_output_file::~real_output_file): Conditionalize use of + popen/pclose on POPEN_MISSING. + * troff/node.h: Conditionalize pipe_command on POPEN_MISSING. + * troff/input.cc (pipe_command): Give an error if POPEN_MISSING. + (pipe_source): Similarily. + + * acgroff.m4 (GROFF_PROG_CCC): Update message about libg++. + + * acgroff.m4 (GROFF_GETOPT, GROFF_PUTENV, GROFF_POPEN): Detect + presence of declarations by trying to compile example with + conflicting declarations. (gcc only gives a warning for missing + declarations.) + +Wed Feb 9 09:12:23 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.pspic (PSPIC): Allow options to specify alignment + (from Ulrich Lauther). + +Tue Feb 8 03:56:40 1994 James Clark (jjc@jclark.com) + + * libbib/linear.cc (file_buffer::load): Use S_ISREG macro. + +Thu Feb 3 09:34:35 1994 James Clark (jjc@jclark.com) + + * indxbib/indxbib.cc (write_hash_table): Add code for case where + pointers and ints have different sizes. + +Sun Jan 9 16:17:51 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.s (par*env-init): Call par@reset. + +Fri Jan 7 10:24:27 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.s (@IP): Switch to a new environment when diverting + tag. + (par*push-tag-env, par*pop-tag-env): New macros. + +Wed Jan 5 21:18:34 1994 James Clark (jjc@jclark.com) + + * grops/ps.cc (ps_printer::ps_printer): Use MAX_LINE_LENGTH for + initializing `out'. Reduce MAX_LINE_LENGTH from 79 to 72. + + * grops/ps.cc (ps_printer::~ps_printer): Output %%CreationDate + comment. Include . + +Wed Dec 15 14:14:00 1993 James Clark (jjc@jclark.com) + + * grops/ps.cc (is_small_h, is_small_v): Deleted. + (ps_printer::flush_sbuf): Use absolute motion only at beginning of + lines. + +Tue Dec 14 10:06:34 1993 James Clark (jjc@jclark.com) + + * troff/input.cc (read_request): Only print a prompt if reading + from the terminal. Also clearerr on EOF if reading from the + terminal. Declare isatty. + +Mon Nov 29 08:38:15 1993 James Clark (jjc@jclark.com) + + * refer/label.y: Rename map_t to map_func and extractor_t to + extractor_func. + +Sat Oct 30 06:38:12 1993 James Clark (jjc@jclark.com) + + * include/assert.h: Don't use volatile. + * libgroff/assert.cc: Likewise. + +Fri Oct 29 15:00:23 1993 James Clark (jjc@jclark.com) + + * troff/input.cc (abort_request): Look at character in tok before + calling get_copy(). + +Thu Oct 28 14:09:48 1993 James Clark (jjc@jclark.com) + + * troff/troff.h (NO_RETURN): Deleted. + * troff/div.cc (cleanup_and_exit): Don't declare aas NO_RETURN. + * troff/input.cc (exit_troff): Likewise + + * Makefile.in: Remove `Making ...' messages since GNU make now + gives these. + + * configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of AC_UNISTD_H. + +Wed Oct 27 11:12:51 1993 James Clark (jjc@jclark.com) + + * tmac/tmac.s (@init): Initialize PO to \n(.o here, rather than + to constant 1 inch. + +Sat Oct 23 10:03:52 1993 James Clark (jjc@jclark.com) + + * tmac/tmac.e (hl): Use \n[.in] rather than \n(.i. + +Thu Oct 14 12:09:45 1993 James Clark (jjc@jclark.com) + + * eqn/delim.cc (delim_box::compute_metrics): Don't increase + MARK_REG if there was no left delimiter. + +Sat Oct 2 19:54:47 1993 James Clark (jjc@jclark.com) + + * pic/troff.cc (troff_output::text): Set line thickness to + relative before outputting text. + + * tmac/tmac.e (@k): Don't zero ?T. + ((z): Likewise. + +Sat Sep 25 11:08:43 1993 James Clark (jjc@jclark.com) + + * tmac/tmac.e ($p): Handle possibility that $3 is empty. + +Wed Aug 18 08:51:41 1993 James Clark (jjc@jclark.com) + + * troff/input.cc (decode_args): Warn about unquoted tabs (from + Paul Eggert). + +Tue Aug 10 08:38:32 1993 James Clark (jjc@jclark.com) + + * troff/input.cc (ignoring): New variable. + (ignore): Set ignoring during call to do_define_macro. + (do_define_macro): Clear ignoring before interpolating terminating + macro. + (copy_mode_error): New function. + (get_char_for_escape_name, read_long_escape_name, + interpolate_arg): Use copy_mode_error. + (warning_table): Add WARN_IG. + * troff/troff.h (WARN_IG): Declare. + (WARN_TOTAL): Change accordingly. + + * groff/pipeline.c (strsignal): Rename to xstrsignal. + * groff/groff.cc (strsignal): Delete declaration. + +Fri Jul 16 01:43:12 1993 James Clark (jjc@jclark.com) + + * troff/div.cc (page_offset): Use 'm' as default scaling. + +Sat Jul 3 09:11:38 1993 James Clark (jjc@jclark.com) + + * nroff/nroff.sh: Ignore -u. + +Wed Jun 9 12:17:27 1993 James Clark (jjc@jclark.com) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:02:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DEF41065676; Fri, 15 Jan 2010 12:02:22 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BC288FC1A; Fri, 15 Jan 2010 12:02:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FC2MZg065069; Fri, 15 Jan 2010 12:02:22 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FC2MLi065067; Fri, 15 Jan 2010 12:02:22 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201001151202.o0FC2MLi065067@svn.freebsd.org> From: Dmitry Morozovsky Date: Fri, 15 Jan 2010 12:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202348 - stable/8/usr.sbin/ypserv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:02:22 -0000 Author: marck (doc committer) Date: Fri Jan 15 12:02:22 2010 New Revision: 202348 URL: http://svn.freebsd.org/changeset/base/202348 Log: MFH r201051: To remove a server, one should use double backslash, and half of them are eaten by shell. Fix this. Modified: stable/8/usr.sbin/ypserv/ypinit.sh Directory Properties: stable/8/usr.sbin/ypserv/ (props changed) Modified: stable/8/usr.sbin/ypserv/ypinit.sh ============================================================================== --- stable/8/usr.sbin/ypserv/ypinit.sh Fri Jan 15 12:01:25 2010 (r202347) +++ stable/8/usr.sbin/ypserv/ypinit.sh Fri Jan 15 12:02:22 2010 (r202348) @@ -298,7 +298,7 @@ do echo "Update the list of hosts running YP servers in domain ${DOMAIN}." echo "Master for this domain is ${MASTER_NAME}." echo "" - echo "First verify old servers, type \\ to remove a server." + echo "First verify old servers, type \\\\ to remove a server." echo "Then add new servers, one per line. When done type a ." echo "" echo " master server : ${HOST}" From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:07:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BDC11065670; Fri, 15 Jan 2010 12:07:00 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 489078FC12; Fri, 15 Jan 2010 12:07:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FC70DV066166; Fri, 15 Jan 2010 12:07:00 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FC704B066164; Fri, 15 Jan 2010 12:07:00 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201001151207.o0FC704B066164@svn.freebsd.org> From: Dmitry Morozovsky Date: Fri, 15 Jan 2010 12:07:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202349 - stable/7/usr.sbin/ypserv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:07:00 -0000 Author: marck (doc committer) Date: Fri Jan 15 12:07:00 2010 New Revision: 202349 URL: http://svn.freebsd.org/changeset/base/202349 Log: MFH r201051: To remove a server, one should use double backslash, and half of them are eaten by shell. Fix this. Modified: stable/7/usr.sbin/ypserv/ypinit.sh Directory Properties: stable/7/usr.sbin/ypserv/ (props changed) Modified: stable/7/usr.sbin/ypserv/ypinit.sh ============================================================================== --- stable/7/usr.sbin/ypserv/ypinit.sh Fri Jan 15 12:02:22 2010 (r202348) +++ stable/7/usr.sbin/ypserv/ypinit.sh Fri Jan 15 12:07:00 2010 (r202349) @@ -298,7 +298,7 @@ do echo "Update the list of hosts running YP servers in domain ${DOMAIN}." echo "Master for this domain is ${MASTER_NAME}." echo "" - echo "First verify old servers, type \\ to remove a server." + echo "First verify old servers, type \\\\ to remove a server." echo "Then add new servers, one per line. When done type a ." echo "" echo " master server : ${HOST}" From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:07:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1F0B1065676; Fri, 15 Jan 2010 12:07:30 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FE1E8FC15; Fri, 15 Jan 2010 12:07:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FC7UQr066303; Fri, 15 Jan 2010 12:07:30 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FC7U4q066301; Fri, 15 Jan 2010 12:07:30 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151207.o0FC7U4q066301@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 12:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202350 - stable/8/sys/boot/sparc64/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:07:30 -0000 Author: marius Date: Fri Jan 15 12:07:30 2010 New Revision: 202350 URL: http://svn.freebsd.org/changeset/base/202350 Log: MFC: r200944 Revert r183628 as with the current ata(4) ATAPI DMA with AcerLabs M5229 appears to be once again fixed. If this happens to return we probably should disable ATAPI DMA in ataacerlabs(4) instead just like the Linux libATA does. Modified: stable/8/sys/boot/sparc64/loader/main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/sparc64/loader/main.c ============================================================================== --- stable/8/sys/boot/sparc64/loader/main.c Fri Jan 15 12:07:00 2010 (r202349) +++ stable/8/sys/boot/sparc64/loader/main.c Fri Jan 15 12:07:30 2010 (r202350) @@ -261,7 +261,6 @@ static int sparc64_autoload(void) { - setenv("hw.ata.atapi_dma", "0", 0); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:17:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4E79106566C; Fri, 15 Jan 2010 12:17:30 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF55A8FC0A; Fri, 15 Jan 2010 12:17:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FCHUAK068620; Fri, 15 Jan 2010 12:17:30 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FCHUkF068619; Fri, 15 Jan 2010 12:17:30 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151217.o0FCHUkF068619@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 12:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202351 - in vendor/groff/dist: . contrib/eqn2graph contrib/gdiffmk contrib/gdiffmk/tests contrib/grap2graph contrib/groffer contrib/mm contrib/mm/examples contrib/mm/mm contrib/mom con... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:17:30 -0000 Author: ru Date: Fri Jan 15 12:17:29 2010 New Revision: 202351 URL: http://svn.freebsd.org/changeset/base/202351 Log: Clean up. Modified: Directory Properties: vendor/groff/dist/BUG-REPORT (props changed) vendor/groff/dist/COPYING (props changed) vendor/groff/dist/ChangeLog (props changed) vendor/groff/dist/ChangeLog.115 (props changed) vendor/groff/dist/ChangeLog.116 (props changed) vendor/groff/dist/ChangeLog.117 (props changed) vendor/groff/dist/ChangeLog.118 (props changed) vendor/groff/dist/FDL (props changed) vendor/groff/dist/INSTALL (props changed) vendor/groff/dist/INSTALL.gen (props changed) vendor/groff/dist/LICENSE (props changed) vendor/groff/dist/MANIFEST (props changed) vendor/groff/dist/MORE.STUFF (props changed) vendor/groff/dist/Makefile (props changed) vendor/groff/dist/Makefile.ccpg (props changed) vendor/groff/dist/Makefile.comm (props changed) vendor/groff/dist/Makefile.cpg (props changed) vendor/groff/dist/Makefile.dev (props changed) vendor/groff/dist/Makefile.in (props changed) vendor/groff/dist/Makefile.init (props changed) vendor/groff/dist/Makefile.lib (props changed) vendor/groff/dist/Makefile.man (props changed) vendor/groff/dist/Makefile.sub (props changed) vendor/groff/dist/NEWS (props changed) vendor/groff/dist/PROBLEMS (props changed) vendor/groff/dist/PROJECTS (props changed) vendor/groff/dist/README (props changed) vendor/groff/dist/README.MinGW (props changed) vendor/groff/dist/REVISION (props changed) vendor/groff/dist/TODO (props changed) vendor/groff/dist/VERSION (props changed) vendor/groff/dist/aclocal.m4 (props changed) vendor/groff/dist/configure (props changed) vendor/groff/dist/configure.ac (props changed) vendor/groff/dist/contrib/eqn2graph/Makefile.sub (props changed) vendor/groff/dist/contrib/eqn2graph/eqn2graph.man (props changed) vendor/groff/dist/contrib/eqn2graph/eqn2graph.sh (props changed) vendor/groff/dist/contrib/gdiffmk/ChangeLog (props changed) vendor/groff/dist/contrib/gdiffmk/Makefile.sub (props changed) vendor/groff/dist/contrib/gdiffmk/README (props changed) vendor/groff/dist/contrib/gdiffmk/gdiffmk.man (props changed) vendor/groff/dist/contrib/gdiffmk/gdiffmk.sh (props changed) vendor/groff/dist/contrib/gdiffmk/tests/file1 (props changed) vendor/groff/dist/contrib/gdiffmk/tests/file2 (props changed) vendor/groff/dist/contrib/gdiffmk/tests/runtests.in (props changed) vendor/groff/dist/contrib/gdiffmk/tests/test_baseline (props changed) vendor/groff/dist/contrib/gdiffmk/tests/test_baseline10 (props changed) vendor/groff/dist/contrib/gdiffmk/tests/test_baseline6 (props changed) vendor/groff/dist/contrib/gdiffmk/tests/test_baseline7 (props changed) vendor/groff/dist/contrib/gdiffmk/tests/test_baseline8 (props changed) vendor/groff/dist/contrib/gdiffmk/tests/test_baseline9 (props changed) vendor/groff/dist/contrib/grap2graph/Makefile.sub (props changed) vendor/groff/dist/contrib/grap2graph/grap2graph.man (props changed) vendor/groff/dist/contrib/grap2graph/grap2graph.sh (props changed) vendor/groff/dist/contrib/groffer/ChangeLog (props changed) vendor/groff/dist/contrib/groffer/Makefile.sub (props changed) vendor/groff/dist/contrib/groffer/README (props changed) vendor/groff/dist/contrib/groffer/README_SH (props changed) vendor/groff/dist/contrib/groffer/TODO (props changed) vendor/groff/dist/contrib/groffer/groffer.man (props changed) vendor/groff/dist/contrib/groffer/groffer.sh (props changed) vendor/groff/dist/contrib/groffer/groffer2.sh (props changed) vendor/groff/dist/contrib/mm/ChangeLog (props changed) vendor/groff/dist/contrib/mm/Makefile.sim (props changed) vendor/groff/dist/contrib/mm/Makefile.sub (props changed) vendor/groff/dist/contrib/mm/NOTES (props changed) vendor/groff/dist/contrib/mm/README (props changed) vendor/groff/dist/contrib/mm/examples/APP (props changed) vendor/groff/dist/contrib/mm/examples/B1B2 (props changed) vendor/groff/dist/contrib/mm/examples/COVER (props changed) vendor/groff/dist/contrib/mm/examples/IND (props changed) vendor/groff/dist/contrib/mm/examples/LT (props changed) vendor/groff/dist/contrib/mm/examples/LT.se (props changed) vendor/groff/dist/contrib/mm/examples/ML (props changed) vendor/groff/dist/contrib/mm/examples/MOVE (props changed) vendor/groff/dist/contrib/mm/examples/MUL (props changed) vendor/groff/dist/contrib/mm/examples/NCOL (props changed) vendor/groff/dist/contrib/mm/examples/ND (props changed) vendor/groff/dist/contrib/mm/examples/README (props changed) vendor/groff/dist/contrib/mm/examples/References (props changed) vendor/groff/dist/contrib/mm/examples/SETR (props changed) vendor/groff/dist/contrib/mm/groff_mm.man (props changed) vendor/groff/dist/contrib/mm/groff_mmse.man (props changed) vendor/groff/dist/contrib/mm/m.tmac (props changed) vendor/groff/dist/contrib/mm/mm.tmac (props changed) vendor/groff/dist/contrib/mm/mm/0.MT (props changed) vendor/groff/dist/contrib/mm/mm/4.MT (props changed) vendor/groff/dist/contrib/mm/mm/5.MT (props changed) vendor/groff/dist/contrib/mm/mm/ms.cov (props changed) vendor/groff/dist/contrib/mm/mm/se_ms.cov (props changed) vendor/groff/dist/contrib/mm/mmroff.man (props changed) vendor/groff/dist/contrib/mm/mmroff.pl (props changed) vendor/groff/dist/contrib/mm/mmse.tmac (props changed) vendor/groff/dist/contrib/mm/mse.tmac (props changed) vendor/groff/dist/contrib/mom/BUGS (props changed) vendor/groff/dist/contrib/mom/ChangeLog (props changed) vendor/groff/dist/contrib/mom/Makefile.sub (props changed) vendor/groff/dist/contrib/mom/NEWS (props changed) vendor/groff/dist/contrib/mom/TODO (props changed) vendor/groff/dist/contrib/mom/copyright (props changed) vendor/groff/dist/contrib/mom/examples/README.txt (props changed) vendor/groff/dist/contrib/mom/examples/elvis_syntax (props changed) vendor/groff/dist/contrib/mom/examples/elvis_syntax.new (props changed) vendor/groff/dist/contrib/mom/examples/letter.mom (props changed) vendor/groff/dist/contrib/mom/examples/penguin.ps (props changed) vendor/groff/dist/contrib/mom/examples/sample_docs.mom (props changed) vendor/groff/dist/contrib/mom/examples/typesetting.mom (props changed) vendor/groff/dist/contrib/mom/groff_mom.man (props changed) vendor/groff/dist/contrib/mom/mom.tmac (props changed) vendor/groff/dist/contrib/mom/momdoc/appendices.html (props changed) vendor/groff/dist/contrib/mom/momdoc/color.html (props changed) vendor/groff/dist/contrib/mom/momdoc/cover.html (props changed) vendor/groff/dist/contrib/mom/momdoc/definitions.html (props changed) vendor/groff/dist/contrib/mom/momdoc/docelement.html (props changed) vendor/groff/dist/contrib/mom/momdoc/docprocessing.html (props changed) vendor/groff/dist/contrib/mom/momdoc/goodies.html (props changed) vendor/groff/dist/contrib/mom/momdoc/headfootpage.html (props changed) vendor/groff/dist/contrib/mom/momdoc/inlines.html (props changed) vendor/groff/dist/contrib/mom/momdoc/intro.html (props changed) vendor/groff/dist/contrib/mom/momdoc/letters.html (props changed) vendor/groff/dist/contrib/mom/momdoc/macrolist.html (props changed) vendor/groff/dist/contrib/mom/momdoc/rectoverso.html (props changed) vendor/groff/dist/contrib/mom/momdoc/refer.html (props changed) vendor/groff/dist/contrib/mom/momdoc/reserved.html (props changed) vendor/groff/dist/contrib/mom/momdoc/toc.html (props changed) vendor/groff/dist/contrib/mom/momdoc/typemacdoc.html (props changed) vendor/groff/dist/contrib/mom/momdoc/typesetting.html (props changed) vendor/groff/dist/contrib/mom/momdoc/using.html (props changed) vendor/groff/dist/contrib/mom/om.tmac (props changed) vendor/groff/dist/contrib/pdfmark/ChangeLog (props changed) vendor/groff/dist/contrib/pdfmark/Makefile.sub (props changed) vendor/groff/dist/contrib/pdfmark/PROBLEMS (props changed) vendor/groff/dist/contrib/pdfmark/README (props changed) vendor/groff/dist/contrib/pdfmark/TODO (props changed) vendor/groff/dist/contrib/pdfmark/cover.ms (props changed) vendor/groff/dist/contrib/pdfmark/pdfmark.ms (props changed) vendor/groff/dist/contrib/pdfmark/pdfmark.tmac (props changed) vendor/groff/dist/contrib/pdfmark/pdfroff.man (props changed) vendor/groff/dist/contrib/pdfmark/pdfroff.sh (props changed) vendor/groff/dist/contrib/pdfmark/spdf.tmac (props changed) vendor/groff/dist/contrib/pic2graph/Makefile.sub (props changed) vendor/groff/dist/contrib/pic2graph/pic2graph.man (props changed) vendor/groff/dist/contrib/pic2graph/pic2graph.sh (props changed) vendor/groff/dist/doc/Makefile.in (props changed) vendor/groff/dist/doc/Makefile.sub (props changed) vendor/groff/dist/doc/fdl.texi (props changed) vendor/groff/dist/doc/fixinfo.sh (props changed) vendor/groff/dist/doc/gnu.eps (props changed) vendor/groff/dist/doc/gnu.xpm (props changed) vendor/groff/dist/doc/grnexmpl.g (props changed) vendor/groff/dist/doc/grnexmpl.me (props changed) vendor/groff/dist/doc/groff (props changed) vendor/groff/dist/doc/groff-1 (props changed) vendor/groff/dist/doc/groff-2 (props changed) vendor/groff/dist/doc/groff-3 (props changed) vendor/groff/dist/doc/groff.css (props changed) vendor/groff/dist/doc/groff.texinfo (props changed) vendor/groff/dist/doc/meintro.me (props changed) vendor/groff/dist/doc/meref.me (props changed) vendor/groff/dist/doc/pic.ms (props changed) vendor/groff/dist/doc/texinfo.tex (props changed) vendor/groff/dist/doc/webpage.ms (props changed) vendor/groff/dist/font/devX100-12/CB (props changed) vendor/groff/dist/font/devX100-12/CBI (props changed) vendor/groff/dist/font/devX100-12/CI (props changed) vendor/groff/dist/font/devX100-12/CR (props changed) vendor/groff/dist/font/devX100-12/DESC (props changed) vendor/groff/dist/font/devX100-12/HB (props changed) vendor/groff/dist/font/devX100-12/HBI (props changed) vendor/groff/dist/font/devX100-12/HI (props changed) vendor/groff/dist/font/devX100-12/HR (props changed) vendor/groff/dist/font/devX100-12/Makefile.sub (props changed) vendor/groff/dist/font/devX100-12/NB (props changed) vendor/groff/dist/font/devX100-12/NBI (props changed) vendor/groff/dist/font/devX100-12/NI (props changed) vendor/groff/dist/font/devX100-12/NR (props changed) vendor/groff/dist/font/devX100-12/S (props changed) vendor/groff/dist/font/devX100-12/TB (props changed) vendor/groff/dist/font/devX100-12/TBI (props changed) vendor/groff/dist/font/devX100-12/TI (props changed) vendor/groff/dist/font/devX100-12/TR (props changed) vendor/groff/dist/font/devX100/CB (props changed) vendor/groff/dist/font/devX100/CBI (props changed) vendor/groff/dist/font/devX100/CI (props changed) vendor/groff/dist/font/devX100/CR (props changed) vendor/groff/dist/font/devX100/DESC (props changed) vendor/groff/dist/font/devX100/HB (props changed) vendor/groff/dist/font/devX100/HBI (props changed) vendor/groff/dist/font/devX100/HI (props changed) vendor/groff/dist/font/devX100/HR (props changed) vendor/groff/dist/font/devX100/Makefile.sub (props changed) vendor/groff/dist/font/devX100/NB (props changed) vendor/groff/dist/font/devX100/NBI (props changed) vendor/groff/dist/font/devX100/NI (props changed) vendor/groff/dist/font/devX100/NR (props changed) vendor/groff/dist/font/devX100/S (props changed) vendor/groff/dist/font/devX100/TB (props changed) vendor/groff/dist/font/devX100/TBI (props changed) vendor/groff/dist/font/devX100/TI (props changed) vendor/groff/dist/font/devX100/TR (props changed) vendor/groff/dist/font/devX75-12/CB (props changed) vendor/groff/dist/font/devX75-12/CBI (props changed) vendor/groff/dist/font/devX75-12/CI (props changed) vendor/groff/dist/font/devX75-12/CR (props changed) vendor/groff/dist/font/devX75-12/DESC (props changed) vendor/groff/dist/font/devX75-12/HB (props changed) vendor/groff/dist/font/devX75-12/HBI (props changed) vendor/groff/dist/font/devX75-12/HI (props changed) vendor/groff/dist/font/devX75-12/HR (props changed) vendor/groff/dist/font/devX75-12/Makefile.sub (props changed) vendor/groff/dist/font/devX75-12/NB (props changed) vendor/groff/dist/font/devX75-12/NBI (props changed) vendor/groff/dist/font/devX75-12/NI (props changed) vendor/groff/dist/font/devX75-12/NR (props changed) vendor/groff/dist/font/devX75-12/S (props changed) vendor/groff/dist/font/devX75-12/TB (props changed) vendor/groff/dist/font/devX75-12/TBI (props changed) vendor/groff/dist/font/devX75-12/TI (props changed) vendor/groff/dist/font/devX75-12/TR (props changed) vendor/groff/dist/font/devX75/CB (props changed) vendor/groff/dist/font/devX75/CBI (props changed) vendor/groff/dist/font/devX75/CI (props changed) vendor/groff/dist/font/devX75/CR (props changed) vendor/groff/dist/font/devX75/DESC (props changed) vendor/groff/dist/font/devX75/HB (props changed) vendor/groff/dist/font/devX75/HBI (props changed) vendor/groff/dist/font/devX75/HI (props changed) vendor/groff/dist/font/devX75/HR (props changed) vendor/groff/dist/font/devX75/Makefile.sub (props changed) vendor/groff/dist/font/devX75/NB (props changed) vendor/groff/dist/font/devX75/NBI (props changed) vendor/groff/dist/font/devX75/NI (props changed) vendor/groff/dist/font/devX75/NR (props changed) vendor/groff/dist/font/devX75/S (props changed) vendor/groff/dist/font/devX75/TB (props changed) vendor/groff/dist/font/devX75/TBI (props changed) vendor/groff/dist/font/devX75/TI (props changed) vendor/groff/dist/font/devX75/TR (props changed) vendor/groff/dist/font/devascii/DESC.proto (props changed) vendor/groff/dist/font/devascii/Makefile.sub (props changed) vendor/groff/dist/font/devascii/R.proto (props changed) vendor/groff/dist/font/devcp1047/DESC.proto (props changed) vendor/groff/dist/font/devcp1047/Makefile.sub (props changed) vendor/groff/dist/font/devcp1047/R.proto (props changed) vendor/groff/dist/font/devdvi/CW (props changed) vendor/groff/dist/font/devdvi/CWEC (props changed) vendor/groff/dist/font/devdvi/CWI (props changed) vendor/groff/dist/font/devdvi/CWIEC (props changed) vendor/groff/dist/font/devdvi/CWITC (props changed) vendor/groff/dist/font/devdvi/CWTC (props changed) vendor/groff/dist/font/devdvi/DESC.in (props changed) vendor/groff/dist/font/devdvi/EX (props changed) vendor/groff/dist/font/devdvi/HB (props changed) vendor/groff/dist/font/devdvi/HBEC (props changed) vendor/groff/dist/font/devdvi/HBI (props changed) vendor/groff/dist/font/devdvi/HBIEC (props changed) vendor/groff/dist/font/devdvi/HBITC (props changed) vendor/groff/dist/font/devdvi/HBTC (props changed) vendor/groff/dist/font/devdvi/HI (props changed) vendor/groff/dist/font/devdvi/HIEC (props changed) vendor/groff/dist/font/devdvi/HITC (props changed) vendor/groff/dist/font/devdvi/HR (props changed) vendor/groff/dist/font/devdvi/HREC (props changed) vendor/groff/dist/font/devdvi/HRTC (props changed) vendor/groff/dist/font/devdvi/MI (props changed) vendor/groff/dist/font/devdvi/Makefile.sub (props changed) vendor/groff/dist/font/devdvi/S (props changed) vendor/groff/dist/font/devdvi/SA (props changed) vendor/groff/dist/font/devdvi/SB (props changed) vendor/groff/dist/font/devdvi/SC (props changed) vendor/groff/dist/font/devdvi/TB (props changed) vendor/groff/dist/font/devdvi/TBEC (props changed) vendor/groff/dist/font/devdvi/TBI (props changed) vendor/groff/dist/font/devdvi/TBIEC (props changed) vendor/groff/dist/font/devdvi/TBITC (props changed) vendor/groff/dist/font/devdvi/TBTC (props changed) vendor/groff/dist/font/devdvi/TI (props changed) vendor/groff/dist/font/devdvi/TIEC (props changed) vendor/groff/dist/font/devdvi/TITC (props changed) vendor/groff/dist/font/devdvi/TR (props changed) vendor/groff/dist/font/devdvi/TREC (props changed) vendor/groff/dist/font/devdvi/TRTC (props changed) vendor/groff/dist/font/devdvi/generate/CompileFonts (props changed) vendor/groff/dist/font/devdvi/generate/Makefile (props changed) vendor/groff/dist/font/devdvi/generate/ec.map (props changed) vendor/groff/dist/font/devdvi/generate/msam.map (props changed) vendor/groff/dist/font/devdvi/generate/msbm.map (props changed) vendor/groff/dist/font/devdvi/generate/tc.map (props changed) vendor/groff/dist/font/devdvi/generate/texb.map (props changed) vendor/groff/dist/font/devdvi/generate/texex.map (props changed) vendor/groff/dist/font/devdvi/generate/texi.map (props changed) vendor/groff/dist/font/devdvi/generate/texmi.map (props changed) vendor/groff/dist/font/devdvi/generate/texr.map (props changed) vendor/groff/dist/font/devdvi/generate/texsy.map (props changed) vendor/groff/dist/font/devdvi/generate/textex.map (props changed) vendor/groff/dist/font/devdvi/generate/textt.map (props changed) vendor/groff/dist/font/devhtml/DESC.proto (props changed) vendor/groff/dist/font/devhtml/Makefile.sub (props changed) vendor/groff/dist/font/devhtml/R.proto (props changed) vendor/groff/dist/font/devlatin1/DESC.proto (props changed) vendor/groff/dist/font/devlatin1/Makefile.sub (props changed) vendor/groff/dist/font/devlatin1/R.proto (props changed) vendor/groff/dist/font/devlbp/CB (props changed) vendor/groff/dist/font/devlbp/CI (props changed) vendor/groff/dist/font/devlbp/CR (props changed) vendor/groff/dist/font/devlbp/DESC.in (props changed) vendor/groff/dist/font/devlbp/EB (props changed) vendor/groff/dist/font/devlbp/EI (props changed) vendor/groff/dist/font/devlbp/ER (props changed) vendor/groff/dist/font/devlbp/HB (props changed) vendor/groff/dist/font/devlbp/HBI (props changed) vendor/groff/dist/font/devlbp/HI (props changed) vendor/groff/dist/font/devlbp/HNB (props changed) vendor/groff/dist/font/devlbp/HNBI (props changed) vendor/groff/dist/font/devlbp/HNI (props changed) vendor/groff/dist/font/devlbp/HNR (props changed) vendor/groff/dist/font/devlbp/HR (props changed) vendor/groff/dist/font/devlbp/Makefile.sub (props changed) vendor/groff/dist/font/devlbp/TB (props changed) vendor/groff/dist/font/devlbp/TBI (props changed) vendor/groff/dist/font/devlbp/TI (props changed) vendor/groff/dist/font/devlbp/TR (props changed) vendor/groff/dist/font/devlj4/AB (props changed) vendor/groff/dist/font/devlj4/ABI (props changed) vendor/groff/dist/font/devlj4/AI (props changed) vendor/groff/dist/font/devlj4/ALBB (props changed) vendor/groff/dist/font/devlj4/ALBR (props changed) vendor/groff/dist/font/devlj4/AOB (props changed) vendor/groff/dist/font/devlj4/AOI (props changed) vendor/groff/dist/font/devlj4/AOR (props changed) vendor/groff/dist/font/devlj4/AR (props changed) vendor/groff/dist/font/devlj4/CB (props changed) vendor/groff/dist/font/devlj4/CBI (props changed) vendor/groff/dist/font/devlj4/CI (props changed) vendor/groff/dist/font/devlj4/CLARENDON (props changed) vendor/groff/dist/font/devlj4/CORONET (props changed) vendor/groff/dist/font/devlj4/CR (props changed) vendor/groff/dist/font/devlj4/DESC.in (props changed) vendor/groff/dist/font/devlj4/GB (props changed) vendor/groff/dist/font/devlj4/GBI (props changed) vendor/groff/dist/font/devlj4/GI (props changed) vendor/groff/dist/font/devlj4/GR (props changed) vendor/groff/dist/font/devlj4/LGB (props changed) vendor/groff/dist/font/devlj4/LGI (props changed) vendor/groff/dist/font/devlj4/LGR (props changed) vendor/groff/dist/font/devlj4/MARIGOLD (props changed) vendor/groff/dist/font/devlj4/Makefile.sub (props changed) vendor/groff/dist/font/devlj4/OB (props changed) vendor/groff/dist/font/devlj4/OBI (props changed) vendor/groff/dist/font/devlj4/OI (props changed) vendor/groff/dist/font/devlj4/OR (props changed) vendor/groff/dist/font/devlj4/S (props changed) vendor/groff/dist/font/devlj4/SYMBOL (props changed) vendor/groff/dist/font/devlj4/TB (props changed) vendor/groff/dist/font/devlj4/TBI (props changed) vendor/groff/dist/font/devlj4/TI (props changed) vendor/groff/dist/font/devlj4/TNRB (props changed) vendor/groff/dist/font/devlj4/TNRBI (props changed) vendor/groff/dist/font/devlj4/TNRI (props changed) vendor/groff/dist/font/devlj4/TNRR (props changed) vendor/groff/dist/font/devlj4/TR (props changed) vendor/groff/dist/font/devlj4/UB (props changed) vendor/groff/dist/font/devlj4/UBI (props changed) vendor/groff/dist/font/devlj4/UCB (props changed) vendor/groff/dist/font/devlj4/UCBI (props changed) vendor/groff/dist/font/devlj4/UCI (props changed) vendor/groff/dist/font/devlj4/UCR (props changed) vendor/groff/dist/font/devlj4/UI (props changed) vendor/groff/dist/font/devlj4/UR (props changed) vendor/groff/dist/font/devlj4/WINGDINGS (props changed) vendor/groff/dist/font/devlj4/generate/Makefile (props changed) vendor/groff/dist/font/devlj4/generate/special.awk (props changed) vendor/groff/dist/font/devlj4/generate/special.map (props changed) vendor/groff/dist/font/devlj4/generate/symbol.map (props changed) vendor/groff/dist/font/devlj4/generate/text.map (props changed) vendor/groff/dist/font/devlj4/generate/wingdings.map (props changed) vendor/groff/dist/font/devps/AB (props changed) vendor/groff/dist/font/devps/ABI (props changed) vendor/groff/dist/font/devps/AI (props changed) vendor/groff/dist/font/devps/AR (props changed) vendor/groff/dist/font/devps/BMB (props changed) vendor/groff/dist/font/devps/BMBI (props changed) vendor/groff/dist/font/devps/BMI (props changed) vendor/groff/dist/font/devps/BMR (props changed) vendor/groff/dist/font/devps/CB (props changed) vendor/groff/dist/font/devps/CBI (props changed) vendor/groff/dist/font/devps/CI (props changed) vendor/groff/dist/font/devps/CR (props changed) vendor/groff/dist/font/devps/DESC.in (props changed) vendor/groff/dist/font/devps/EURO (props changed) vendor/groff/dist/font/devps/HB (props changed) vendor/groff/dist/font/devps/HBI (props changed) vendor/groff/dist/font/devps/HI (props changed) vendor/groff/dist/font/devps/HNB (props changed) vendor/groff/dist/font/devps/HNBI (props changed) vendor/groff/dist/font/devps/HNI (props changed) vendor/groff/dist/font/devps/HNR (props changed) vendor/groff/dist/font/devps/HR (props changed) vendor/groff/dist/font/devps/Makefile.sub (props changed) vendor/groff/dist/font/devps/NB (props changed) vendor/groff/dist/font/devps/NBI (props changed) vendor/groff/dist/font/devps/NI (props changed) vendor/groff/dist/font/devps/NR (props changed) vendor/groff/dist/font/devps/PB (props changed) vendor/groff/dist/font/devps/PBI (props changed) vendor/groff/dist/font/devps/PI (props changed) vendor/groff/dist/font/devps/PR (props changed) vendor/groff/dist/font/devps/S (props changed) vendor/groff/dist/font/devps/SS (props changed) vendor/groff/dist/font/devps/TB (props changed) vendor/groff/dist/font/devps/TBI (props changed) vendor/groff/dist/font/devps/TI (props changed) vendor/groff/dist/font/devps/TR (props changed) vendor/groff/dist/font/devps/ZCMI (props changed) vendor/groff/dist/font/devps/ZD (props changed) vendor/groff/dist/font/devps/ZDR (props changed) vendor/groff/dist/font/devps/download (props changed) vendor/groff/dist/font/devps/freeeuro.afm (props changed) vendor/groff/dist/font/devps/freeeuro.pfa (props changed) vendor/groff/dist/font/devps/generate/Makefile (props changed) vendor/groff/dist/font/devps/generate/afmname (props changed) vendor/groff/dist/font/devps/generate/dingbats.map (props changed) vendor/groff/dist/font/devps/generate/dingbats.rmap (props changed) vendor/groff/dist/font/devps/generate/freeeuro.sfd (props changed) vendor/groff/dist/font/devps/generate/lgreekmap (props changed) vendor/groff/dist/font/devps/generate/sfdtopfa.pe (props changed) vendor/groff/dist/font/devps/generate/symbol.sed (props changed) vendor/groff/dist/font/devps/generate/symbolchars (props changed) vendor/groff/dist/font/devps/generate/symbolsl.afm (props changed) vendor/groff/dist/font/devps/generate/textmap (props changed) vendor/groff/dist/font/devps/prologue.ps (props changed) vendor/groff/dist/font/devps/psstrip.sed (props changed) vendor/groff/dist/font/devps/symbol.afm (props changed) vendor/groff/dist/font/devps/symbolmap (props changed) vendor/groff/dist/font/devps/symbolsl.ps (props changed) vendor/groff/dist/font/devps/text.enc (props changed) vendor/groff/dist/font/devps/zapfdr.afm (props changed) vendor/groff/dist/font/devps/zapfdr.ps (props changed) vendor/groff/dist/font/devutf8/DESC.proto (props changed) vendor/groff/dist/font/devutf8/Makefile.sub (props changed) vendor/groff/dist/font/devutf8/NOTES (props changed) vendor/groff/dist/font/devutf8/R.proto (props changed) vendor/groff/dist/gendef.sh (props changed) vendor/groff/dist/install-sh (props changed) vendor/groff/dist/man/Makefile.sub (props changed) vendor/groff/dist/man/ditroff.man (props changed) vendor/groff/dist/man/groff.man (props changed) vendor/groff/dist/man/groff_char.man (props changed) vendor/groff/dist/man/groff_diff.man (props changed) vendor/groff/dist/man/groff_font.man (props changed) vendor/groff/dist/man/groff_out.man (props changed) vendor/groff/dist/man/groff_tmac.man (props changed) vendor/groff/dist/man/roff.man (props changed) vendor/groff/dist/mdate.sh (props changed) vendor/groff/dist/mkinstalldirs (props changed) vendor/groff/dist/src/devices/grodvi/Makefile.sub (props changed) vendor/groff/dist/src/devices/grodvi/dvi.cpp (props changed) vendor/groff/dist/src/devices/grodvi/grodvi.man (props changed) vendor/groff/dist/src/devices/grohtml/Makefile.sub (props changed) vendor/groff/dist/src/devices/grohtml/grohtml.man (props changed) vendor/groff/dist/src/devices/grohtml/html-table.cpp (props changed) vendor/groff/dist/src/devices/grohtml/html-table.h (props changed) vendor/groff/dist/src/devices/grohtml/html-text.cpp (props changed) vendor/groff/dist/src/devices/grohtml/html-text.h (props changed) vendor/groff/dist/src/devices/grohtml/html.h (props changed) vendor/groff/dist/src/devices/grohtml/output.cpp (props changed) vendor/groff/dist/src/devices/grohtml/post-html.cpp (props changed) vendor/groff/dist/src/devices/grolbp/Makefile.sub (props changed) vendor/groff/dist/src/devices/grolbp/charset.h (props changed) vendor/groff/dist/src/devices/grolbp/grolbp.man (props changed) vendor/groff/dist/src/devices/grolbp/lbp.cpp (props changed) vendor/groff/dist/src/devices/grolbp/lbp.h (props changed) vendor/groff/dist/src/devices/grolj4/Makefile.sub (props changed) vendor/groff/dist/src/devices/grolj4/grolj4.man (props changed) vendor/groff/dist/src/devices/grolj4/lj4.cpp (props changed) vendor/groff/dist/src/devices/grolj4/lj4_font.man (props changed) vendor/groff/dist/src/devices/grops/Makefile.sub (props changed) vendor/groff/dist/src/devices/grops/TODO (props changed) vendor/groff/dist/src/devices/grops/grops.man (props changed) vendor/groff/dist/src/devices/grops/ps.cpp (props changed) vendor/groff/dist/src/devices/grops/ps.h (props changed) vendor/groff/dist/src/devices/grops/psfig.diff (props changed) vendor/groff/dist/src/devices/grops/psrm.cpp (props changed) vendor/groff/dist/src/devices/grotty/Makefile.sub (props changed) vendor/groff/dist/src/devices/grotty/TODO (props changed) vendor/groff/dist/src/devices/grotty/grotty.man (props changed) vendor/groff/dist/src/devices/grotty/tty.cpp (props changed) vendor/groff/dist/src/devices/xditview/ChangeLog (props changed) vendor/groff/dist/src/devices/xditview/DESC.in (props changed) vendor/groff/dist/src/devices/xditview/Dvi.c (props changed) vendor/groff/dist/src/devices/xditview/Dvi.h (props changed) vendor/groff/dist/src/devices/xditview/DviP.h (props changed) vendor/groff/dist/src/devices/xditview/FontMap (props changed) vendor/groff/dist/src/devices/xditview/GXditview.ad (props changed) vendor/groff/dist/src/devices/xditview/Makefile.sub (props changed) vendor/groff/dist/src/devices/xditview/Menu.h (props changed) vendor/groff/dist/src/devices/xditview/README (props changed) vendor/groff/dist/src/devices/xditview/TODO (props changed) vendor/groff/dist/src/devices/xditview/ad2c (props changed) vendor/groff/dist/src/devices/xditview/device.c (props changed) vendor/groff/dist/src/devices/xditview/device.h (props changed) vendor/groff/dist/src/devices/xditview/draw.c (props changed) vendor/groff/dist/src/devices/xditview/font.c (props changed) vendor/groff/dist/src/devices/xditview/gray1.bm (props changed) vendor/groff/dist/src/devices/xditview/gray2.bm (props changed) vendor/groff/dist/src/devices/xditview/gray3.bm (props changed) vendor/groff/dist/src/devices/xditview/gray4.bm (props changed) vendor/groff/dist/src/devices/xditview/gray5.bm (props changed) vendor/groff/dist/src/devices/xditview/gray6.bm (props changed) vendor/groff/dist/src/devices/xditview/gray7.bm (props changed) vendor/groff/dist/src/devices/xditview/gray8.bm (props changed) vendor/groff/dist/src/devices/xditview/gxditview.man (props changed) vendor/groff/dist/src/devices/xditview/lex.c (props changed) vendor/groff/dist/src/devices/xditview/page.c (props changed) vendor/groff/dist/src/devices/xditview/parse.c (props changed) vendor/groff/dist/src/devices/xditview/xdit.bm (props changed) vendor/groff/dist/src/devices/xditview/xdit_mask.bm (props changed) vendor/groff/dist/src/devices/xditview/xditview.c (props changed) vendor/groff/dist/src/include/DviChar.h (props changed) vendor/groff/dist/src/include/Makefile.sub (props changed) vendor/groff/dist/src/include/XFontName.h (props changed) vendor/groff/dist/src/include/assert.h (props changed) vendor/groff/dist/src/include/cmap.h (props changed) vendor/groff/dist/src/include/color.h (props changed) vendor/groff/dist/src/include/config.hin (props changed) vendor/groff/dist/src/include/cset.h (props changed) vendor/groff/dist/src/include/device.h (props changed) vendor/groff/dist/src/include/driver.h (props changed) vendor/groff/dist/src/include/errarg.h (props changed) vendor/groff/dist/src/include/error.h (props changed) vendor/groff/dist/src/include/font.h (props changed) vendor/groff/dist/src/include/geometry.h (props changed) vendor/groff/dist/src/include/getopt.h (props changed) vendor/groff/dist/src/include/getopt_int.h (props changed) vendor/groff/dist/src/include/gettext.h (props changed) vendor/groff/dist/src/include/html-strings.h (props changed) vendor/groff/dist/src/include/htmlhint.h (props changed) vendor/groff/dist/src/include/index.h (props changed) vendor/groff/dist/src/include/lib.h (props changed) vendor/groff/dist/src/include/macropath.h (props changed) vendor/groff/dist/src/include/nonposix.h (props changed) vendor/groff/dist/src/include/paper.h (props changed) vendor/groff/dist/src/include/posix.h (props changed) vendor/groff/dist/src/include/printer.h (props changed) vendor/groff/dist/src/include/ptable.h (props changed) vendor/groff/dist/src/include/refid.h (props changed) vendor/groff/dist/src/include/relocate.h (props changed) vendor/groff/dist/src/include/search.h (props changed) vendor/groff/dist/src/include/searchpath.h (props changed) vendor/groff/dist/src/include/stringclass.h (props changed) vendor/groff/dist/src/include/symbol.h (props changed) vendor/groff/dist/src/include/unicode.h (props changed) vendor/groff/dist/src/libs/libbib/Makefile.sub (props changed) vendor/groff/dist/src/libs/libbib/common.cpp (props changed) vendor/groff/dist/src/libs/libbib/index.cpp (props changed) vendor/groff/dist/src/libs/libbib/linear.cpp (props changed) vendor/groff/dist/src/libs/libbib/map.c (props changed) vendor/groff/dist/src/libs/libbib/search.cpp (props changed) vendor/groff/dist/src/libs/libdriver/Makefile.sub (props changed) vendor/groff/dist/src/libs/libdriver/input.cpp (props changed) vendor/groff/dist/src/libs/libdriver/printer.cpp (props changed) vendor/groff/dist/src/libs/libgroff/Makefile.sub (props changed) vendor/groff/dist/src/libs/libgroff/assert.cpp (props changed) vendor/groff/dist/src/libs/libgroff/change_lf.cpp (props changed) vendor/groff/dist/src/libs/libgroff/cmap.cpp (props changed) vendor/groff/dist/src/libs/libgroff/color.cpp (props changed) vendor/groff/dist/src/libs/libgroff/cset.cpp (props changed) vendor/groff/dist/src/libs/libgroff/device.cpp (props changed) vendor/groff/dist/src/libs/libgroff/errarg.cpp (props changed) vendor/groff/dist/src/libs/libgroff/error.cpp (props changed) vendor/groff/dist/src/libs/libgroff/fatal.cpp (props changed) vendor/groff/dist/src/libs/libgroff/filename.cpp (props changed) vendor/groff/dist/src/libs/libgroff/fmod.c (props changed) vendor/groff/dist/src/libs/libgroff/font.cpp (props changed) vendor/groff/dist/src/libs/libgroff/fontfile.cpp (props changed) vendor/groff/dist/src/libs/libgroff/geometry.cpp (props changed) vendor/groff/dist/src/libs/libgroff/getcwd.c (props changed) vendor/groff/dist/src/libs/libgroff/getopt.c (props changed) vendor/groff/dist/src/libs/libgroff/getopt1.c (props changed) vendor/groff/dist/src/libs/libgroff/glyphuni.cpp (props changed) vendor/groff/dist/src/libs/libgroff/htmlhint.cpp (props changed) vendor/groff/dist/src/libs/libgroff/hypot.cpp (props changed) vendor/groff/dist/src/libs/libgroff/iftoa.c (props changed) vendor/groff/dist/src/libs/libgroff/invalid.cpp (props changed) vendor/groff/dist/src/libs/libgroff/itoa.c (props changed) vendor/groff/dist/src/libs/libgroff/lf.cpp (props changed) vendor/groff/dist/src/libs/libgroff/lineno.cpp (props changed) vendor/groff/dist/src/libs/libgroff/macropath.cpp (props changed) vendor/groff/dist/src/libs/libgroff/matherr.c (props changed) vendor/groff/dist/src/libs/libgroff/maxfilename.cpp (props changed) vendor/groff/dist/src/libs/libgroff/maxpathname.cpp (props changed) vendor/groff/dist/src/libs/libgroff/mksdir.cpp (props changed) vendor/groff/dist/src/libs/libgroff/mkstemp.cpp (props changed) vendor/groff/dist/src/libs/libgroff/nametoindex.cpp (props changed) vendor/groff/dist/src/libs/libgroff/new.cpp (props changed) vendor/groff/dist/src/libs/libgroff/paper.cpp (props changed) vendor/groff/dist/src/libs/libgroff/prime.cpp (props changed) vendor/groff/dist/src/libs/libgroff/progname.c (props changed) vendor/groff/dist/src/libs/libgroff/ptable.cpp (props changed) vendor/groff/dist/src/libs/libgroff/putenv.c (props changed) vendor/groff/dist/src/libs/libgroff/quotearg.c (props changed) vendor/groff/dist/src/libs/libgroff/relocate.cpp (props changed) vendor/groff/dist/src/libs/libgroff/searchpath.cpp (props changed) vendor/groff/dist/src/libs/libgroff/spawnvp.c (props changed) vendor/groff/dist/src/libs/libgroff/strcasecmp.c (props changed) vendor/groff/dist/src/libs/libgroff/strerror.c (props changed) vendor/groff/dist/src/libs/libgroff/string.cpp (props changed) vendor/groff/dist/src/libs/libgroff/strncasecmp.c (props changed) vendor/groff/dist/src/libs/libgroff/strsave.cpp (props changed) vendor/groff/dist/src/libs/libgroff/strtol.c (props changed) vendor/groff/dist/src/libs/libgroff/symbol.cpp (props changed) vendor/groff/dist/src/libs/libgroff/tmpfile.cpp (props changed) vendor/groff/dist/src/libs/libgroff/tmpname.cpp (props changed) vendor/groff/dist/src/libs/libgroff/unicode.cpp (props changed) vendor/groff/dist/src/libs/libgroff/uniglyph.cpp (props changed) vendor/groff/dist/src/libs/libgroff/uniuni.cpp (props changed) vendor/groff/dist/src/libs/libxutil/DviChar.c (props changed) vendor/groff/dist/src/libs/libxutil/Makefile.sub (props changed) vendor/groff/dist/src/libs/libxutil/XFontName.c (props changed) vendor/groff/dist/src/libs/libxutil/xmalloc.c (props changed) vendor/groff/dist/src/preproc/eqn/Makefile.sub (props changed) vendor/groff/dist/src/preproc/eqn/TODO (props changed) vendor/groff/dist/src/preproc/eqn/box.cpp (props changed) vendor/groff/dist/src/preproc/eqn/box.h (props changed) vendor/groff/dist/src/preproc/eqn/delim.cpp (props changed) vendor/groff/dist/src/preproc/eqn/eqn.cpp (props changed) vendor/groff/dist/src/preproc/eqn/eqn.h (props changed) vendor/groff/dist/src/preproc/eqn/eqn.man (props changed) vendor/groff/dist/src/preproc/eqn/eqn.y (props changed) vendor/groff/dist/src/preproc/eqn/eqn_tab.h (props changed) vendor/groff/dist/src/preproc/eqn/lex.cpp (props changed) vendor/groff/dist/src/preproc/eqn/limit.cpp (props changed) vendor/groff/dist/src/preproc/eqn/list.cpp (props changed) vendor/groff/dist/src/preproc/eqn/main.cpp (props changed) vendor/groff/dist/src/preproc/eqn/mark.cpp (props changed) vendor/groff/dist/src/preproc/eqn/neqn.man (props changed) vendor/groff/dist/src/preproc/eqn/neqn.sh (props changed) vendor/groff/dist/src/preproc/eqn/other.cpp (props changed) vendor/groff/dist/src/preproc/eqn/over.cpp (props changed) vendor/groff/dist/src/preproc/eqn/pbox.h (props changed) vendor/groff/dist/src/preproc/eqn/pile.cpp (props changed) vendor/groff/dist/src/preproc/eqn/script.cpp (props changed) vendor/groff/dist/src/preproc/eqn/special.cpp (props changed) vendor/groff/dist/src/preproc/eqn/sqrt.cpp (props changed) vendor/groff/dist/src/preproc/eqn/text.cpp (props changed) vendor/groff/dist/src/preproc/grn/Makefile.sub (props changed) vendor/groff/dist/src/preproc/grn/README (props changed) vendor/groff/dist/src/preproc/grn/gprint.h (props changed) vendor/groff/dist/src/preproc/grn/grn.man (props changed) vendor/groff/dist/src/preproc/grn/hdb.cpp (props changed) vendor/groff/dist/src/preproc/grn/hgraph.cpp (props changed) vendor/groff/dist/src/preproc/grn/hpoint.cpp (props changed) vendor/groff/dist/src/preproc/grn/main.cpp (props changed) vendor/groff/dist/src/preproc/html/Makefile.sub (props changed) vendor/groff/dist/src/preproc/html/pre-html.cpp (props changed) vendor/groff/dist/src/preproc/html/pre-html.h (props changed) vendor/groff/dist/src/preproc/html/pushback.cpp (props changed) vendor/groff/dist/src/preproc/html/pushback.h (props changed) vendor/groff/dist/src/preproc/pic/Makefile.sub (props changed) vendor/groff/dist/src/preproc/pic/TODO (props changed) vendor/groff/dist/src/preproc/pic/common.cpp (props changed) vendor/groff/dist/src/preproc/pic/common.h (props changed) vendor/groff/dist/src/preproc/pic/lex.cpp (props changed) vendor/groff/dist/src/preproc/pic/main.cpp (props changed) vendor/groff/dist/src/preproc/pic/object.cpp (props changed) vendor/groff/dist/src/preproc/pic/object.h (props changed) vendor/groff/dist/src/preproc/pic/output.h (props changed) vendor/groff/dist/src/preproc/pic/pic.cpp (props changed) vendor/groff/dist/src/preproc/pic/pic.h (props changed) vendor/groff/dist/src/preproc/pic/pic.man (props changed) vendor/groff/dist/src/preproc/pic/pic.y (props changed) vendor/groff/dist/src/preproc/pic/pic_tab.h (props changed) vendor/groff/dist/src/preproc/pic/position.h (props changed) vendor/groff/dist/src/preproc/pic/tex.cpp (props changed) vendor/groff/dist/src/preproc/pic/text.h (props changed) vendor/groff/dist/src/preproc/pic/troff.cpp (props changed) vendor/groff/dist/src/preproc/refer/Makefile.sub (props changed) vendor/groff/dist/src/preproc/refer/TODO (props changed) vendor/groff/dist/src/preproc/refer/command.cpp (props changed) vendor/groff/dist/src/preproc/refer/command.h (props changed) vendor/groff/dist/src/preproc/refer/label.cpp (props changed) vendor/groff/dist/src/preproc/refer/label.y (props changed) vendor/groff/dist/src/preproc/refer/ref.cpp (props changed) vendor/groff/dist/src/preproc/refer/ref.h (props changed) vendor/groff/dist/src/preproc/refer/refer.cpp (props changed) vendor/groff/dist/src/preproc/refer/refer.h (props changed) vendor/groff/dist/src/preproc/refer/refer.man (props changed) vendor/groff/dist/src/preproc/refer/token.cpp (props changed) vendor/groff/dist/src/preproc/refer/token.h (props changed) vendor/groff/dist/src/preproc/soelim/Makefile.sub (props changed) vendor/groff/dist/src/preproc/soelim/TODO (props changed) vendor/groff/dist/src/preproc/soelim/soelim.cpp (props changed) vendor/groff/dist/src/preproc/soelim/soelim.man (props changed) vendor/groff/dist/src/preproc/tbl/Makefile.sub (props changed) vendor/groff/dist/src/preproc/tbl/main.cpp (props changed) vendor/groff/dist/src/preproc/tbl/table.cpp (props changed) vendor/groff/dist/src/preproc/tbl/table.h (props changed) vendor/groff/dist/src/preproc/tbl/tbl.man (props changed) vendor/groff/dist/src/roff/groff/Makefile.sub (props changed) vendor/groff/dist/src/roff/groff/groff.cpp (props changed) vendor/groff/dist/src/roff/groff/groff.man (props changed) vendor/groff/dist/src/roff/groff/pipeline.c (props changed) vendor/groff/dist/src/roff/groff/pipeline.h (props changed) vendor/groff/dist/src/roff/grog/Makefile.sub (props changed) vendor/groff/dist/src/roff/grog/grog.man (props changed) vendor/groff/dist/src/roff/grog/grog.pl (props changed) vendor/groff/dist/src/roff/grog/grog.sh (props changed) vendor/groff/dist/src/roff/nroff/Makefile.sub (props changed) vendor/groff/dist/src/roff/nroff/nroff.man (props changed) vendor/groff/dist/src/roff/nroff/nroff.sh (props changed) vendor/groff/dist/src/roff/troff/Makefile.sub (props changed) vendor/groff/dist/src/roff/troff/TODO (props changed) vendor/groff/dist/src/roff/troff/charinfo.h (props changed) vendor/groff/dist/src/roff/troff/column.cpp (props changed) vendor/groff/dist/src/roff/troff/dictionary.cpp (props changed) vendor/groff/dist/src/roff/troff/dictionary.h (props changed) vendor/groff/dist/src/roff/troff/div.cpp (props changed) vendor/groff/dist/src/roff/troff/div.h (props changed) vendor/groff/dist/src/roff/troff/env.cpp (props changed) vendor/groff/dist/src/roff/troff/env.h (props changed) vendor/groff/dist/src/roff/troff/hvunits.h (props changed) vendor/groff/dist/src/roff/troff/input.cpp (props changed) vendor/groff/dist/src/roff/troff/input.h (props changed) vendor/groff/dist/src/roff/troff/mtsm.cpp (props changed) vendor/groff/dist/src/roff/troff/mtsm.h (props changed) vendor/groff/dist/src/roff/troff/node.cpp (props changed) vendor/groff/dist/src/roff/troff/node.h (props changed) vendor/groff/dist/src/roff/troff/number.cpp (props changed) vendor/groff/dist/src/roff/troff/reg.cpp (props changed) vendor/groff/dist/src/roff/troff/reg.h (props changed) vendor/groff/dist/src/roff/troff/request.h (props changed) vendor/groff/dist/src/roff/troff/token.h (props changed) vendor/groff/dist/src/roff/troff/troff.h (props changed) vendor/groff/dist/src/roff/troff/troff.man (props changed) vendor/groff/dist/src/utils/addftinfo/Makefile.sub (props changed) vendor/groff/dist/src/utils/addftinfo/addftinfo.cpp (props changed) vendor/groff/dist/src/utils/addftinfo/addftinfo.man (props changed) vendor/groff/dist/src/utils/addftinfo/guess.cpp (props changed) vendor/groff/dist/src/utils/addftinfo/guess.h (props changed) vendor/groff/dist/src/utils/afmtodit/Makefile.sub (props changed) vendor/groff/dist/src/utils/afmtodit/afmtodit.man (props changed) vendor/groff/dist/src/utils/afmtodit/afmtodit.pl (props changed) vendor/groff/dist/src/utils/hpftodit/Makefile.sub (props changed) vendor/groff/dist/src/utils/hpftodit/hpftodit.cpp (props changed) vendor/groff/dist/src/utils/hpftodit/hpftodit.man (props changed) vendor/groff/dist/src/utils/hpftodit/hpuni.cpp (props changed) vendor/groff/dist/src/utils/indxbib/Makefile.sub (props changed) vendor/groff/dist/src/utils/indxbib/eign (props changed) vendor/groff/dist/src/utils/indxbib/indxbib.cpp (props changed) vendor/groff/dist/src/utils/indxbib/indxbib.man (props changed) vendor/groff/dist/src/utils/indxbib/signal.c (props changed) vendor/groff/dist/src/utils/lkbib/Makefile.sub (props changed) vendor/groff/dist/src/utils/lkbib/lkbib.cpp (props changed) vendor/groff/dist/src/utils/lkbib/lkbib.man (props changed) vendor/groff/dist/src/utils/lookbib/Makefile.sub (props changed) vendor/groff/dist/src/utils/lookbib/lookbib.cpp (props changed) vendor/groff/dist/src/utils/lookbib/lookbib.man (props changed) vendor/groff/dist/src/utils/pfbtops/Makefile.sub (props changed) vendor/groff/dist/src/utils/pfbtops/pfbtops.c (props changed) vendor/groff/dist/src/utils/pfbtops/pfbtops.man (props changed) vendor/groff/dist/src/utils/tfmtodit/Makefile.sub (props changed) vendor/groff/dist/src/utils/tfmtodit/tfmtodit.cpp (props changed) vendor/groff/dist/src/utils/tfmtodit/tfmtodit.man (props changed) vendor/groff/dist/src/utils/xtotroff/Makefile.in (props changed) vendor/groff/dist/src/utils/xtotroff/Makefile.sub (props changed) vendor/groff/dist/src/utils/xtotroff/xtotroff.c (props changed) vendor/groff/dist/src/utils/xtotroff/xtotroff.man (props changed) vendor/groff/dist/stamp-h.in (props changed) vendor/groff/dist/test-groff.in (props changed) vendor/groff/dist/tmac/Makefile.sub (props changed) vendor/groff/dist/tmac/README (props changed) vendor/groff/dist/tmac/TODO (props changed) vendor/groff/dist/tmac/X.tmac (props changed) vendor/groff/dist/tmac/Xps.tmac (props changed) vendor/groff/dist/tmac/a4.tmac (props changed) vendor/groff/dist/tmac/an-old.tmac (props changed) vendor/groff/dist/tmac/an.tmac (props changed) vendor/groff/dist/tmac/andoc.tmac (props changed) vendor/groff/dist/tmac/composite.tmac (props changed) vendor/groff/dist/tmac/cp1047.tmac (props changed) vendor/groff/dist/tmac/devtag.tmac (props changed) vendor/groff/dist/tmac/doc-common (props changed) vendor/groff/dist/tmac/doc-ditroff (props changed) vendor/groff/dist/tmac/doc-nroff (props changed) vendor/groff/dist/tmac/doc-old.tmac (props changed) vendor/groff/dist/tmac/doc-syms (props changed) vendor/groff/dist/tmac/doc.tmac (props changed) vendor/groff/dist/tmac/dvi.tmac (props changed) vendor/groff/dist/tmac/e.tmac (props changed) vendor/groff/dist/tmac/ec.tmac (props changed) vendor/groff/dist/tmac/eqnrc (props changed) vendor/groff/dist/tmac/europs.tmac (props changed) vendor/groff/dist/tmac/fixmacros.sed (props changed) vendor/groff/dist/tmac/groff_man.man (props changed) vendor/groff/dist/tmac/groff_mdoc.man (props changed) vendor/groff/dist/tmac/groff_me.man (props changed) vendor/groff/dist/tmac/groff_ms.man (props changed) vendor/groff/dist/tmac/groff_trace.man (props changed) vendor/groff/dist/tmac/groff_www.man (props changed) vendor/groff/dist/tmac/html-end.tmac (props changed) vendor/groff/dist/tmac/html.tmac (props changed) vendor/groff/dist/tmac/hyphen.us (props changed) vendor/groff/dist/tmac/hyphenex.pl (props changed) vendor/groff/dist/tmac/hyphenex.us (props changed) vendor/groff/dist/tmac/latin1.tmac (props changed) vendor/groff/dist/tmac/latin2.tmac (props changed) vendor/groff/dist/tmac/latin5.tmac (props changed) vendor/groff/dist/tmac/latin9.tmac (props changed) vendor/groff/dist/tmac/lbp.tmac (props changed) vendor/groff/dist/tmac/lj4.tmac (props changed) vendor/groff/dist/tmac/man.local (props changed) vendor/groff/dist/tmac/man.tmac (props changed) vendor/groff/dist/tmac/man.ultrix (props changed) vendor/groff/dist/tmac/mandoc.tmac (props changed) vendor/groff/dist/tmac/mdoc.local (props changed) vendor/groff/dist/tmac/mdoc.tmac (props changed) vendor/groff/dist/tmac/me.tmac (props changed) vendor/groff/dist/tmac/ms.tmac (props changed) vendor/groff/dist/tmac/papersize.tmac (props changed) vendor/groff/dist/tmac/pic.tmac (props changed) vendor/groff/dist/tmac/ps.tmac (props changed) vendor/groff/dist/tmac/psatk.tmac (props changed) vendor/groff/dist/tmac/psfig.tmac (props changed) vendor/groff/dist/tmac/psold.tmac (props changed) vendor/groff/dist/tmac/pspic.tmac (props changed) vendor/groff/dist/tmac/s.tmac (props changed) vendor/groff/dist/tmac/safer.tmac (props changed) vendor/groff/dist/tmac/strip.sed (props changed) vendor/groff/dist/tmac/trace.tmac (props changed) vendor/groff/dist/tmac/troffrc (props changed) vendor/groff/dist/tmac/troffrc-end (props changed) vendor/groff/dist/tmac/tty-char.tmac (props changed) vendor/groff/dist/tmac/tty.tmac (props changed) vendor/groff/dist/tmac/unicode.tmac (props changed) vendor/groff/dist/tmac/www.tmac (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:27:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC0FC106566C; Fri, 15 Jan 2010 12:27:46 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7FE28FC1E; Fri, 15 Jan 2010 12:27:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FCRkqY071045; Fri, 15 Jan 2010 12:27:46 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FCRkfj071041; Fri, 15 Jan 2010 12:27:46 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001151227.o0FCRkfj071041@svn.freebsd.org> From: Takahashi Yoshihiro Date: Fri, 15 Jan 2010 12:27:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202352 - stable/8/sys/boot/pc98/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:27:46 -0000 Author: nyan Date: Fri Jan 15 12:27:46 2010 New Revision: 202352 URL: http://svn.freebsd.org/changeset/base/202352 Log: MFC: revision 201342 Reimplement the boot2 for pc98 completely. It's based on the newest i386's one and has the advantage of: - ELF binary support. - UFS2 filesystem support. - Many FreeBSD slices support on a disk. Added: stable/8/sys/boot/pc98/boot2/boot1.S - copied unchanged from r201342, head/sys/boot/pc98/boot2/boot1.S stable/8/sys/boot/pc98/boot2/boot2.c - copied unchanged from r201342, head/sys/boot/pc98/boot2/boot2.c Deleted: stable/8/sys/boot/pc98/boot2/asm.S stable/8/sys/boot/pc98/boot2/asm.h stable/8/sys/boot/pc98/boot2/bios.S stable/8/sys/boot/pc98/boot2/boot.c stable/8/sys/boot/pc98/boot2/boot.h stable/8/sys/boot/pc98/boot2/boot2.S stable/8/sys/boot/pc98/boot2/dinode.h stable/8/sys/boot/pc98/boot2/disk.c stable/8/sys/boot/pc98/boot2/fs.h stable/8/sys/boot/pc98/boot2/inode.h stable/8/sys/boot/pc98/boot2/io.c stable/8/sys/boot/pc98/boot2/probe_keyboard.c stable/8/sys/boot/pc98/boot2/quota.h stable/8/sys/boot/pc98/boot2/serial.S stable/8/sys/boot/pc98/boot2/serial_16550.S stable/8/sys/boot/pc98/boot2/serial_8251.S stable/8/sys/boot/pc98/boot2/start.S stable/8/sys/boot/pc98/boot2/sys.c stable/8/sys/boot/pc98/boot2/table.c Modified: stable/8/sys/boot/pc98/boot2/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/8/sys/boot/pc98/boot2/Makefile Fri Jan 15 12:17:29 2010 (r202351) +++ stable/8/sys/boot/pc98/boot2/Makefile Fri Jan 15 12:27:46 2010 (r202352) @@ -1,113 +1,104 @@ # $FreeBSD$ -# -PROG= boot -# Order is very important on the SRCS line for this prog -SRCS= start.S table.c boot2.S boot.c asm.S bios.S serial.S -SRCS+= probe_keyboard.c io.c disk.c sys.c - -BINMODE= 444 -CFLAGS= -Os -mrtd \ - -fno-guess-branch-probability \ - -fno-unit-at-a-time \ - -D_KERNEL -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT} -CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK} -CFLAGS+= -I${.CURDIR}/../../.. -I. - -# By default, if a serial port is going to be used as console, use COM1 -# (aka /dev/ttyd0). -#BOOT_COMCONSOLE_PORT?=0x30 -BOOT_COMCONSOLE_PORT?=0x238 -BOOT_COMCONSOLE_CLK?=16 -BOOT_COMCONSOLE_MODE=0x0c -CFLAGS+= -DCOMCONSOLE=${BOOT_COMCONSOLE_PORT} \ - -DCOMCONSOLE_CLK=${BOOT_COMCONSOLE_CLK} \ - -DCOMCONSOLE_MODE=${BOOT_COMCONSOLE_MODE} - -# feature not implemented -BOOT_COMCONSOLE_SPEED?=9600 -CFLAGS+= -DCOMSPEED=${BOOT_COMCONSOLE_SPEED} - -# Enable code to take the default boot string from a fixed location on the -# disk. See nextboot(8) and README.386BSD for more info. -#CFLAGS+= -DNAMEBLOCK -#CFLAGS+= -DNAMEBLOCK_WRITEBACK - -# Bias the conversion from the BIOS drive number to the FreeBSD unit number -# for hard disks. This may be useful for people booting in a mixed IDE/SCSI -# environment (set BOOT_HD_BIAS to the number of IDE drives). -#CFLAGS+= -DBOOT_HD_BIAS=1 -# -# Details: this only applies if BOOT_HD_BIAS > 0. If the BIOS drive number -# for the boot drive is >= BOOT_HD_BIAS, then the boot drive is assumed to -# be SCSI and have unit number (BIOS_drive_number - BOOT_HD_BIAS). E.g., -# BOOT_HD_BIAS=1 makes BIOS drive 1 correspond to 1:da(0,a) instead of -# 1:wd(1,a). If `da' is given explicitly, then the drive is assumed to be -# SCSI and have BIOS drive number (da_unit_number + BOOT_HD_BIAS). E.g., -# BOOT_HD_BIAS=1 makes da(0,a) correspond to 1:da(0,a) instead of 0:da(0,a). - -CLEANFILES+= boot.nohdr boot.strip boot.ldr boot1 boot2 sizetest -LDFLAGS+= -N -Ttext 0 -e start -NO_SHARED= YES -NO_MAN= -STRIP= - -# tunable timeout parameter, waiting for keypress, calibrated in ms -BOOTWAIT?= 5000 -# tunable timeout during string input, calibrated in ms -#TIMEOUT?= 30000 - -# Location that boot2 is loaded at -BOOTSEG= 0x1000 - -# Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned -BOOTSTACK= 0xFFF0 - -boot.nohdr: boot - objcopy -S -O binary boot boot.nohdr - ls -l boot.nohdr - -boot.ldr: boot.nohdr - dd if=boot.nohdr of=boot.ldr bs=8192 count=1 conv=sync - -boot1: boot.nohdr - dd if=boot.nohdr of=boot1 bs=512 count=1 - -boot2: boot.nohdr - dd if=boot.nohdr of=boot2 bs=512 skip=1 - @dd if=boot2 skip=14 of=sizetest 2> /dev/null - @if [ -s sizetest ] ; then \ - echo "boot2 is too big" >&2 ; \ - rm boot2 ; \ - exit 2 ; \ - fi - -all: boot.ldr boot1 boot2 - -install: - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - boot.ldr ${DESTDIR}${BINDIR}/boot - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - boot1 boot2 ${DESTDIR}${BINDIR} - -# If it's not there, don't consider it a target -.if exists(${.CURDIR}/../../../pc98/include) -beforedepend ${OBJS}: machine - -machine: - ln -sf ${.CURDIR}/../../../pc98/include machine - -.endif - -.if exists(${.CURDIR}/../../../i386/include) -beforedepend ${OBJS}: i386 +FILES= boot boot1 boot2 -i386: - ln -sf ${.CURDIR}/../../../i386/include i386 +NM?= nm -.endif +BOOT_COMCONSOLE_PORT?= 0x238 +BOOT_COMCONSOLE_SPEED?= 9600 +B2SIOFMT?= 0x3 + +REL1= 0x700 +ORG1= 0 +ORG2= 0x2000 + +# Decide level of UFS support. +BOOT2_UFS?= UFS1_AND_UFS2 +#BOOT2_UFS?= UFS2_ONLY +#BOOT2_UFS?= UFS1_ONLY + +CFLAGS= -Os \ + -fno-guess-branch-probability \ + -fomit-frame-pointer \ + -fno-unit-at-a-time \ + -mno-align-long-strings \ + -mrtd \ + -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \ + -D${BOOT2_UFS} \ + -DFLAGS=${BOOT_BOOT1_FLAGS} \ + -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ + -DSIOFMT=${B2SIOFMT} \ + -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \ + -I${.CURDIR}/../../.. \ + -I${.CURDIR}/../../i386/boot2 \ + -I${.CURDIR}/../../common \ + -I${.CURDIR}/../btx/lib -I. \ + -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ + -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ + -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ + -Winline --param max-inline-insns-single=100 + +# Set machine type to PC98_SYSTEM_PARAMETER +#CFLAGS+= -DSET_MACHINE_TYPE + +# Initialize the bi_bios_geom using the BIOS geometry +#CFLAGS+= -DGET_BIOSGEOM + +LDFLAGS=-static -N --gc-sections + +# Pick up ../Makefile.inc early. +.include + +.PATH: ${.CURDIR}/../../i386/boot2 + +CLEANFILES= boot + +boot: boot1 boot2 + cat boot1 boot2 > boot + +CLEANFILES+= boot1 boot1.out boot1.o + +boot1: boot1.out + objcopy -S -O binary boot1.out ${.TARGET} + +boot1.out: boot1.o + ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o + +CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ + boot2.s boot2.s.tmp boot2.h sio.o + +boot2: boot2.ld + @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \ + echo "$$x bytes available"; test $$x -ge 0 + dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync + +boot2.ld: boot2.ldr boot2.bin ${BTXKERN} + btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \ + -o ${.TARGET} -P 1 boot2.bin + +boot2.ldr: + dd if=/dev/zero of=${.TARGET} bs=276 count=1 + +boot2.bin: boot2.out + objcopy -S -O binary boot2.out ${.TARGET} + +boot2.out: ${BTXCRT} boot2.o sio.o + ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} + +boot2.o: boot2.s + +SRCS= boot2.c boot2.h + +boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c + ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c + sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s + rm -f boot2.s.tmp + +boot2.h: boot1.out + ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T (read|putc)/ \ + { x = $$1 - ORG1; \ + printf("#define %sORG %#x\n", toupper($$3), REL1 + x) }' \ + ORG1=`printf "%d" ${ORG1}` \ + REL1=`printf "%d" ${REL1}` > ${.TARGET} -CLEANFILES+= machine i386 - -CWARNFLAGS!= ${MAKE} -f bsd.own.mk -f ${.CURDIR}/../../../conf/kern.mk -V CWARNFLAGS .include Copied: stable/8/sys/boot/pc98/boot2/boot1.S (from r201342, head/sys/boot/pc98/boot2/boot1.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/pc98/boot2/boot1.S Fri Jan 15 12:27:46 2010 (r202352, copy of r201342, head/sys/boot/pc98/boot2/boot1.S) @@ -0,0 +1,395 @@ +/*- + * Copyright (c) 2008-2009 TAKAHASHI Yoshihiro + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* Memory Locations */ + .set STACK_OFF,0x6000 # Stack offset + .set LOAD_SIZE,8192 # Load size + .set DAUA,0x0584 # DA/UA + .set MEM_REL,0x700 # Relocation address + .set MEM_ARG,0x900 # Arguments + .set MEM_BUF,0x8cec # Load area + .set MEM_BTX,0x9000 # BTX start + .set MEM_JMP,0x9010 # BTX entry point + .set MEM_USR,0xa000 # Client start + +/* PC98 machine type from sys/pc98/pc98/pc98_machdep.h */ + .set MEM_SYS, 0xa100 # System common area segment + .set PC98_MACHINE_TYPE, 0x0620 # PC98 machine type + .set EPSON_ID, 0x0624 # EPSON machine id + + .set M_NEC_PC98, 0x0001 + .set M_EPSON_PC98, 0x0002 + .set M_NOT_H98, 0x0010 + .set M_H98, 0x0020 + .set M_NOTE, 0x0040 + .set M_NORMAL, 0x1000 + .set M_8M, 0x8000 + +/* Partition Constants */ + .set PRT_OFF,0x1be # Partition offset + +/* Misc. Constants */ + .set SIZ_PAG,0x1000 # Page size + .set SIZ_SEC,0x200 # Sector size + + .set NSECT,0x10 + + .globl start + .globl read + .globl putc + .code16 + +start: jmp main + +boot_cyl: .org 4 + .ascii "IPL1 " + +main: cld + + /* Setup the stack */ + xor %si,%si + mov %si,%ss + mov $STACK_OFF,%sp + + push %cx + + /* Relocate ourself to MEM_REL */ + push %cs + pop %ds + mov %si,%es + mov $MEM_REL,%di + mov $SIZ_SEC,%cx + rep + movsb + + /* Transfer PC-9801 system common area */ + xor %ax,%ax + mov %ax,%si + mov %ax,%ds + mov %ax,%di + mov $MEM_SYS,%ax + mov %ax,%es + mov $0x0600,%cx + rep + movsb + + /* Transfer EPSON machine type */ + mov $0xfd00,%ax + mov %ax,%ds + mov (0x804),%eax + and $0x00ffffff,%eax + mov %eax,%es:(EPSON_ID) + + /* Set machine type to PC98_SYSTEM_PARAMETER */ +#ifdef SET_MACHINE_TYPE + call set_machine_type +#else + mov $M_NEC_PC98+M_NOT_H98,%eax + mov %eax,%es:(PC98_MACHINE_TYPE) +#endif + + /* Setup graphic screen */ + mov $0x42,%ah /* 640x400 */ + mov $0xc0,%ch + int $0x18 + mov $0x40,%ah /* graph on */ + int $0x18 + + /* Setup text screen */ + mov $0x0a00,%ax /* 80x25 */ + int $0x18 + mov $0x0c,%ah /* text on */ + int $0x18 + mov $0x13,%ah /* cursor home */ + xor %dx,%dx + int $0x18 + mov $0x11,%ah /* cursor on */ + int $0x18 + + /* Setup keyboard */ + mov $0x03,%ah + int $0x18 + + pop %cx + + /* bootstrap passes */ + xor %edi,%edi + mov %di,%ds + mov %di,%es + mov %cs,%bx + cmp $0x1fe0,%bx + jz boot_fd + cmp $0x1fc0,%bx + jnz boot_hd + xor %cx,%cx + mov (DAUA),%al + and $0xf0,%al + cmp $0x30,%al + jz boot_fd + cmp $0x90,%al + jnz boot_hd +boot_fd: xor %cx,%cx + jmp boot_load +boot_hd: test %cx,%cx + jnz boot_load + mov %cs:(boot_cyl),%cx +boot_load: mov %cx,MEM_ARG /* Save cylinder number */ + mov %cx,%di + xor %dx,%dx + mov $LOAD_SIZE,%bx + mov $MEM_BUF,%bp + push %cs + callw read + jc error + + /* Transfer boot2.bin */ + mov $MEM_BTX,%bx + mov 0xa(%bx),%si /* BTX size */ + add %bx,%si /* start of boot2.bin */ + mov $MEM_USR+SIZ_PAG*2,%di + mov $MEM_BTX+(NSECT-1)*SIZ_SEC,%cx + sub %si,%cx + rep + movsb + + /* Enable A20 */ + xor %ax,%ax + outb %al,$0xf2 + mov $0x02,%al + outb %al,$0xf6 + + /* Start BTX */ + ljmp $0x0000,$MEM_JMP + +/* + * Reads sectors from the disk. + * Call with: + * + * %bx - bytes to read + * %cx - cylinder + * %dh - head + * %dl - sector + * %edi - lba + * %es:(%bp) - buffer to read data into + */ +read: xor %ax,%ax + mov %ax,%ds + mov $0x06,%ah + mov (DAUA),%al + mov %ax,%si + and $0xf0,%al + cmp $0x30,%al /* 1.44MB FDD */ + jz read_fd + cmp $0x90,%al /* 1MB FDD */ + jz read_fd + cmp $0xa0,%al /* Is SCSI device? */ + jnz read_load + push %cx + mov %si,%cx + and $0x0f,%cl + inc %cl + mov (0x482),%ah + shr %cl,%ah /* Is SCSI HDD? */ + pop %cx + jc read_load + and $0xff7f,%si /* SCSI MO */ + mov %di,%cx + shr $16,%di + mov %di,%dx + jmp read_load +read_fd: or $0xd000,%si + or $0x0200,%cx + inc %dx +read_load: mov %si,%ax + int $0x1b + lret + +/* + * Print out the error message, wait for a keypress, and then reboot + * the machine. + */ +error: push %cs + pop %ds + mov $msg_eread,%si + call putstr + xor %ax,%ax /* Get keypress */ + int $0x18 + xor %ax,%ax /* CPU reset */ + outb %al,$0xf0 +halt: hlt + jmp halt /* Spin */ + +/* + * Display a null-terminated string. + */ +putstr.0: push %cs + callw putc +putstr: lodsb + test %al,%al + jne putstr.0 + ret + +/* + * Display a single char. + */ +putc: pusha + xor %dx,%dx + mov %dx,%ds + mov MEM_REL+cursor-start,%di + mov $0xa000,%bx + mov %bx,%es + mov $(80*2),%cx + + cmp $0x08,%al + je putc.bs + cmp $0x0d,%al + je putc.cr + cmp $0x0a,%al + je putc.lf + cmp $0x5c,%al /* \ */ + jne 1f + mov $0xfc,%al +1: movb $0xe1,%es:0x2000(%di) + stosw + jmp putc.scr +putc.bs: test %di,%di + jz putc.move + dec %di + dec %di + movb $0xe1,%es:0x2000(%di) + movw $0x20,%es:(%di) + jmp putc.move +putc.cr: mov %di,%ax + div %cx + sub %dx,%di + jmp putc.move +putc.lf: add %cx,%di +putc.scr: cmp $(80*2*25),%di /* Scroll screen */ + jb putc.move + push %ds + mov %bx,%ds + mov $(80*2),%si + xor %di,%di + mov $(80*24/2),%cx + rep + movsl + xor %ax,%ax + mov $0x20,%al + mov $80,%cl + rep + stosw + pop %ds + mov $(80*24*2),%di +putc.move: mov %di,MEM_REL+cursor-start /* Move cursor */ + mov $0x13,%ah + mov %di,%dx + int $0x18 + popa + lret + +cursor: .word 0 + +#ifdef SET_MACHINE_TYPE +/* + * Set machine type to PC98_SYSTEM_PARAMETER. + */ +set_machine_type: + xor %edx,%edx + mov %dx,%ds +// mov $MEM_SYS,%ax +// mov %ax,%es + + /* Wait V-SYNC */ +vsync.1: inb $0x60,%al + test $0x20,%al + jnz vsync.1 +vsync.2: inb $0x60,%al + test $0x20,%al + jz vsync.2 + + /* ANK 'A' font */ + xor %al,%al + outb %al,$0xa1 + mov $0x41,%al + outb %al,$0xa3 + + /* Get 'A' font from CG window */ + push %ds + mov $0xa400,%ax + mov %ax,%ds + xor %eax,%eax + xor %bx,%bx + mov $4,%cx +font.1: add (%bx),%eax + add $4,%bx + loop font.1 + pop %ds + cmp $0x6efc58fc,%eax + jnz m_epson + +m_pc98: or $M_NEC_PC98,%edx + mov $0x0458,%bx + mov (%bx),%al + test $0x80,%al + jz m_not_h98 + or $M_H98,%edx + jmp 1f +m_epson: or $M_EPSON_PC98,%edx +m_not_h98: or $M_NOT_H98,%edx + +1: inb $0x42,%al + test $0x20,%al + jz 1f + or $M_8M,%edx + +1: mov $0x0400,%bx + mov (%bx),%al + test $0x80,%al + jz 1f + or $M_NOTE,%edx + +1: mov $PC98_MACHINE_TYPE,%bx + mov %edx,%es:(%bx) + ret +#endif + +/* Messages */ + +msg_eread: .asciz "Error\r\n" + + .org PRT_OFF,0x90 + +/* Partition table */ + + .fill 0x30,0x1,0x0 + .byte 0x80, 0x00, 0x01, 0x00 + .byte 0xa5, 0xff, 0xff, 0xff + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x50, 0xc3, 0x00, 0x00 + + .word 0xaa55 # Magic number Copied: stable/8/sys/boot/pc98/boot2/boot2.c (from r201342, head/sys/boot/pc98/boot2/boot2.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/pc98/boot2/boot2.c Fri Jan 15 12:27:46 2010 (r202352, copy of r201342, head/sys/boot/pc98/boot2/boot2.c) @@ -0,0 +1,842 @@ +/*- + * Copyright (c) 2008-2009 TAKAHASHI Yoshihiro + * Copyright (c) 1998 Robert Nordier + * All rights reserved. + * + * Redistribution and use in source and binary forms are freely + * permitted provided that the above copyright notice and this + * paragraph and the following disclaimer are duplicated in all + * such forms. + * + * This software is provided "AS IS" and without any express or + * implied warranties, including, without limitation, the implied + * warranties of merchantability and fitness for a particular + * purpose. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include + +#include + +#include "boot2.h" +#include "lib.h" + +#define IO_KEYBOARD 1 +#define IO_SERIAL 2 + +#define SECOND 1 /* Circa that many ticks in a second. */ + +#define RBX_ASKNAME 0x0 /* -a */ +#define RBX_SINGLE 0x1 /* -s */ +/* 0x2 is reserved for log2(RB_NOSYNC). */ +/* 0x3 is reserved for log2(RB_HALT). */ +/* 0x4 is reserved for log2(RB_INITNAME). */ +#define RBX_DFLTROOT 0x5 /* -r */ +#define RBX_KDB 0x6 /* -d */ +/* 0x7 is reserved for log2(RB_RDONLY). */ +/* 0x8 is reserved for log2(RB_DUMP). */ +/* 0x9 is reserved for log2(RB_MINIROOT). */ +#define RBX_CONFIG 0xa /* -c */ +#define RBX_VERBOSE 0xb /* -v */ +#define RBX_SERIAL 0xc /* -h */ +#define RBX_CDROM 0xd /* -C */ +/* 0xe is reserved for log2(RB_POWEROFF). */ +#define RBX_GDB 0xf /* -g */ +#define RBX_MUTE 0x10 /* -m */ +/* 0x11 is reserved for log2(RB_SELFTEST). */ +/* 0x12 is reserved for boot programs. */ +/* 0x13 is reserved for boot programs. */ +#define RBX_PAUSE 0x14 /* -p */ +#define RBX_QUIET 0x15 /* -q */ +#define RBX_NOINTR 0x1c /* -n */ +/* 0x1d is reserved for log2(RB_MULTIPLE) and is just misnamed here. */ +#define RBX_DUAL 0x1d /* -D */ +/* 0x1f is reserved for log2(RB_BOOTINFO). */ + +/* pass: -a, -s, -r, -d, -c, -v, -h, -C, -g, -m, -p, -D */ +#define RBX_MASK (OPT_SET(RBX_ASKNAME) | OPT_SET(RBX_SINGLE) | \ + OPT_SET(RBX_DFLTROOT) | OPT_SET(RBX_KDB ) | \ + OPT_SET(RBX_CONFIG) | OPT_SET(RBX_VERBOSE) | \ + OPT_SET(RBX_SERIAL) | OPT_SET(RBX_CDROM) | \ + OPT_SET(RBX_GDB ) | OPT_SET(RBX_MUTE) | \ + OPT_SET(RBX_PAUSE) | OPT_SET(RBX_DUAL)) + +#define PATH_CONFIG "/boot.config" +#define PATH_BOOT3 "/boot/loader" +#define PATH_KERNEL "/boot/kernel/kernel" + +#define ARGS 0x900 +#define NOPT 14 +#define NDEV 3 +#define V86_CY(x) ((x) & PSL_C) +#define V86_ZR(x) ((x) & PSL_Z) + +#define DRV_DISK 0xf0 +#define DRV_UNIT 0x0f + +#define TYPE_AD 0 +#define TYPE_DA 1 +#define TYPE_FD 2 + +#define OPT_SET(opt) (1 << (opt)) +#define OPT_CHECK(opt) ((opts) & OPT_SET(opt)) + +extern uint32_t _end; + +static const char optstr[NOPT] = "DhaCcdgmnpqrsv"; /* Also 'P', 'S' */ +static const unsigned char flags[NOPT] = { + RBX_DUAL, + RBX_SERIAL, + RBX_ASKNAME, + RBX_CDROM, + RBX_CONFIG, + RBX_KDB, + RBX_GDB, + RBX_MUTE, + RBX_NOINTR, + RBX_PAUSE, + RBX_QUIET, + RBX_DFLTROOT, + RBX_SINGLE, + RBX_VERBOSE +}; + +static const char *const dev_nm[NDEV] = {"ad", "da", "fd"}; +static const unsigned char dev_maj[NDEV] = {30, 4, 2}; +static const unsigned char dev_daua[NDEV] = {0x80, 0xa0, 0x90}; + +static struct dsk { + unsigned daua; + unsigned type; + unsigned disk; + unsigned unit; + unsigned head; + unsigned sec; + unsigned slice; + unsigned part; + unsigned start; +} dsk; +static char cmd[512], cmddup[512]; +static char kname[1024]; +static uint32_t opts; +static int comspeed = SIOSPD; +static struct bootinfo bootinfo; +static uint8_t ioctrl = IO_KEYBOARD; + +void exit(int); +static void load(void); +static int parse(void); +static int xfsread(ino_t, void *, size_t); +static int dskread(void *, unsigned, unsigned); +static void printf(const char *,...); +static void putchar(int); +static uint32_t memsize(void); +static int drvread(void *, unsigned); +static int keyhit(unsigned); +static int xputc(int); +static int xgetc(int); +static int getc(int); + +static void memcpy(void *, const void *, int); +static void +memcpy(void *dst, const void *src, int len) +{ + const char *s = src; + char *d = dst; + + while (len--) + *d++ = *s++; +} + +static inline int +strcmp(const char *s1, const char *s2) +{ + for (; *s1 == *s2 && *s1; s1++, s2++); + return (unsigned char)*s1 - (unsigned char)*s2; +} + +#define UFS_SMALL_CGBASE +#include "ufsread.c" + +static inline int +xfsread(ino_t inode, void *buf, size_t nbyte) +{ + if ((size_t)fsread(inode, buf, nbyte) != nbyte) { + printf("Invalid %s\n", "format"); + return -1; + } + return 0; +} + +static inline uint32_t +memsize(void) +{ + u_char *p = (u_char *)PTOV(0); + + return *(p + 0x401) * 128 * 1024 + *(u_int16_t *)(p + 0x594) * 1024 * 1024; +} + +static inline void +getstr(void) +{ + char *s; + int c; + + s = cmd; + for (;;) { + switch (c = xgetc(0)) { + case 0: + break; + case '\177': + case '\b': + if (s > cmd) { + s--; + printf("\b \b"); + } + break; + case '\n': + case '\r': + *s = 0; + return; + default: + if (s - cmd < sizeof(cmd) - 1) + *s++ = c; + putchar(c); + } + } +} + +static inline void +putc(int c) +{ + + v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; + v86.addr = PUTCORG; /* call to putc in boot1 */ + v86.eax = c; + v86int(); + v86.ctl = V86_FLAGS; +} + +static inline int +is_scsi_hd(void) +{ + + if ((*(u_char *)PTOV(0x482) >> dsk.unit) & 0x01) + return 1; + + return 0; +} + +static inline void +fix_sector_size(void) +{ + u_char *p; + + p = (u_char *)PTOV(0x460 + dsk.unit * 4); /* SCSI equipment parameter */ + + if ((p[0] & 0x1f) == 7) { /* SCSI MO */ + if (!(p[3] & 0x30)) { /* 256B / sector */ + p[3] |= 0x10; /* forced set 512B / sector */ + p[3 + 0xa1000] |= 0x10; + } + } +} + +static inline uint32_t +get_diskinfo(void) +{ + + if (dsk.disk == 0x30) { /* 1440KB FD */ + /* 80 cylinders, 2 heads, 18 sectors */ + return (80 << 16) | (2 << 8) | 18; + } else if (dsk.disk == 0x90) { /* 1200KB FD */ + /* 80 cylinders, 2 heads, 15 sectors */ + return (80 << 16) | (2 << 8) | 15; + } else if (dsk.disk == 0x80 || is_scsi_hd()) { /* IDE or SCSI HDD */ + v86.addr = 0x1b; + v86.eax = 0x8400 | dsk.daua; + v86int(); + return (v86.ecx << 16) | v86.edx; + } + + /* SCSI MO or CD */ + fix_sector_size(); /* SCSI MO */ + + /* other SCSI devices */ + return (65535 << 16) | (8 << 8) | 32; +} + +static void +set_dsk(void) +{ + uint32_t di; + + di = get_diskinfo(); + + dsk.head = (di >> 8) & 0xff; + dsk.sec = di & 0xff; + dsk.start = 0; +} + +#ifdef GET_BIOSGEOM +static uint32_t +bd_getbigeom(int bunit) +{ + int hds = 0; + int unit = 0x80; /* IDE HDD */ + u_int addr = 0x55d; + + while (unit < 0xa7) { + if (*(u_char *)PTOV(addr) & (1 << (unit & 0x0f))) + if (hds++ == bunit) + break; + + if (unit >= 0xA0) { + int media = ((unsigned *)PTOV(0x460))[unit & 0x0F] & 0x1F; + + if (media == 7 && hds++ == bunit) /* SCSI MO */ + return(0xFFFE0820); /* C:65535 H:8 S:32 */ + } + if (++unit == 0x84) { + unit = 0xA0; /* SCSI HDD */ + addr = 0x482; + } + } + if (unit == 0xa7) + return 0x4F020F; /* 1200KB FD C:80 H:2 S:15 */ + v86.addr = 0x1b; + v86.eax = 0x8400 | unit; + v86int(); + if (v86.efl & 0x1) + return 0x4F020F; /* 1200KB FD C:80 H:2 S:15 */ + return ((v86.ecx & 0xffff) << 16) | (v86.edx & 0xffff); +} +#endif + +static int +check_slice(void) +{ + struct pc98_partition *dp; + char *sec; + unsigned i, cyl; + + sec = dmadat->secbuf; + cyl = *(uint16_t *)PTOV(ARGS); + set_dsk(); + + if (dsk.type == TYPE_FD) + return (WHOLE_DISK_SLICE); + if (drvread(sec, DOSBBSECTOR + 1)) + return (WHOLE_DISK_SLICE); /* Read error */ + dp = (void *)(sec + DOSPARTOFF); + for (i = 0; i < NDOSPART; i++) { + if (dp[i].dp_mid == DOSMID_386BSD) { + if (dp[i].dp_scyl <= cyl && cyl <= dp[i].dp_ecyl) + return (BASE_SLICE + i); + } + } + + return (WHOLE_DISK_SLICE); +} + +int +main(void) +{ +#ifdef GET_BIOSGEOM + int i; +#endif + int autoboot; + ino_t ino; + + dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base); + v86.ctl = V86_FLAGS; + v86.efl = PSL_RESERVED_DEFAULT | PSL_I; + dsk.daua = *(uint8_t *)PTOV(0x584); + dsk.disk = dsk.daua & DRV_DISK; + dsk.unit = dsk.daua & DRV_UNIT; + if (dsk.disk == 0x80) + dsk.type = TYPE_AD; + else if (dsk.disk == 0xa0) + dsk.type = TYPE_DA; + else /* if (dsk.disk == 0x30 || dsk.disk == 0x90) */ + dsk.type = TYPE_FD; + dsk.slice = check_slice(); +#ifdef GET_BIOSGEOM + for (i = 0; i < N_BIOS_GEOM; i++) + bootinfo.bi_bios_geom[i] = bd_getbigeom(i); +#endif + bootinfo.bi_version = BOOTINFO_VERSION; + bootinfo.bi_size = sizeof(bootinfo); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:39:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F1B3106566B; Fri, 15 Jan 2010 12:39:49 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F168B8FC1B; Fri, 15 Jan 2010 12:39:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FCdmU2073796; Fri, 15 Jan 2010 12:39:48 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FCdmfA073794; Fri, 15 Jan 2010 12:39:48 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201001151239.o0FCdmfA073794@svn.freebsd.org> From: Olivier Houchard Date: Fri, 15 Jan 2010 12:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202353 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:39:49 -0000 Author: cognet Date: Fri Jan 15 12:39:48 2010 New Revision: 202353 URL: http://svn.freebsd.org/changeset/base/202353 Log: Do not free the dmamap if it is still busy. Submitted by: Mark Tinguely MFC after: 3 days Modified: head/sys/arm/arm/busdma_machdep.c Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Fri Jan 15 12:27:46 2010 (r202352) +++ head/sys/arm/arm/busdma_machdep.c Fri Jan 15 12:39:48 2010 (r202353) @@ -555,12 +555,12 @@ int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) { - _busdma_free_dmamap(map); if (STAILQ_FIRST(&map->bpages) != NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, EBUSY); return (EBUSY); } + _busdma_free_dmamap(map); if (dmat->bounce_zone) dmat->bounce_zone->map_count--; dmat->map_count--; From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:42:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CAA0106566B; Fri, 15 Jan 2010 12:42:36 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31A238FC1A; Fri, 15 Jan 2010 12:42:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FCgagN074440; Fri, 15 Jan 2010 12:42:36 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FCga2p074439; Fri, 15 Jan 2010 12:42:36 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151242.o0FCga2p074439@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 12:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202354 - head/contrib/groff X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:42:36 -0000 Author: ru Date: Fri Jan 15 12:42:35 2010 New Revision: 202354 URL: http://svn.freebsd.org/changeset/base/202354 Log: Bootstrap merge history. Modified: Directory Properties: head/contrib/groff/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:45:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE793106566B; Fri, 15 Jan 2010 12:45:23 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 981278FC14; Fri, 15 Jan 2010 12:45:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FCjNxn075140; Fri, 15 Jan 2010 12:45:23 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FCjNqq075136; Fri, 15 Jan 2010 12:45:23 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001151245.o0FCjNqq075136@svn.freebsd.org> From: Takahashi Yoshihiro Date: Fri, 15 Jan 2010 12:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202355 - stable/7/sys/boot/pc98/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:45:23 -0000 Author: nyan Date: Fri Jan 15 12:45:23 2010 New Revision: 202355 URL: http://svn.freebsd.org/changeset/base/202355 Log: MFC: revision 201342 Reimplement the boot2 for pc98 completely. It's based on the newest i386's one and has the advantage of: - ELF binary support. - UFS2 filesystem support. - Many FreeBSD slices support on a disk. Added: stable/7/sys/boot/pc98/boot2/boot1.S - copied unchanged from r201342, head/sys/boot/pc98/boot2/boot1.S stable/7/sys/boot/pc98/boot2/boot2.c - copied unchanged from r201342, head/sys/boot/pc98/boot2/boot2.c Deleted: stable/7/sys/boot/pc98/boot2/asm.S stable/7/sys/boot/pc98/boot2/asm.h stable/7/sys/boot/pc98/boot2/bios.S stable/7/sys/boot/pc98/boot2/boot.c stable/7/sys/boot/pc98/boot2/boot.h stable/7/sys/boot/pc98/boot2/boot2.S stable/7/sys/boot/pc98/boot2/dinode.h stable/7/sys/boot/pc98/boot2/disk.c stable/7/sys/boot/pc98/boot2/fs.h stable/7/sys/boot/pc98/boot2/inode.h stable/7/sys/boot/pc98/boot2/io.c stable/7/sys/boot/pc98/boot2/probe_keyboard.c stable/7/sys/boot/pc98/boot2/quota.h stable/7/sys/boot/pc98/boot2/serial.S stable/7/sys/boot/pc98/boot2/serial_16550.S stable/7/sys/boot/pc98/boot2/serial_8251.S stable/7/sys/boot/pc98/boot2/start.S stable/7/sys/boot/pc98/boot2/sys.c stable/7/sys/boot/pc98/boot2/table.c Modified: stable/7/sys/boot/pc98/boot2/Makefile Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/7/sys/boot/pc98/boot2/Makefile Fri Jan 15 12:42:35 2010 (r202354) +++ stable/7/sys/boot/pc98/boot2/Makefile Fri Jan 15 12:45:23 2010 (r202355) @@ -1,114 +1,104 @@ # $FreeBSD$ -# -PROG= boot -# Order is very important on the SRCS line for this prog -SRCS= start.S table.c boot2.S boot.c asm.S bios.S serial.S -SRCS+= probe_keyboard.c io.c disk.c sys.c - -BINMODE= 444 -CFLAGS= -Os -mrtd \ - -fno-guess-branch-probability \ - -fno-unit-at-a-time \ - -D_KERNEL -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT} -CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK} -CFLAGS+= ${CWARNFLAGS} -CFLAGS+= -I${.CURDIR}/../../.. -I. - -# By default, if a serial port is going to be used as console, use COM1 -# (aka /dev/ttyd0). -#BOOT_COMCONSOLE_PORT?=0x30 -BOOT_COMCONSOLE_PORT?=0x238 -BOOT_COMCONSOLE_CLK?=16 -BOOT_COMCONSOLE_MODE=0x0c -CFLAGS+= -DCOMCONSOLE=${BOOT_COMCONSOLE_PORT} \ - -DCOMCONSOLE_CLK=${BOOT_COMCONSOLE_CLK} \ - -DCOMCONSOLE_MODE=${BOOT_COMCONSOLE_MODE} - -# feature not implemented -BOOT_COMCONSOLE_SPEED?=9600 -CFLAGS+= -DCOMSPEED=${BOOT_COMCONSOLE_SPEED} - -# Enable code to take the default boot string from a fixed location on the -# disk. See nextboot(8) and README.386BSD for more info. -#CFLAGS+= -DNAMEBLOCK -#CFLAGS+= -DNAMEBLOCK_WRITEBACK - -# Bias the conversion from the BIOS drive number to the FreeBSD unit number -# for hard disks. This may be useful for people booting in a mixed IDE/SCSI -# environment (set BOOT_HD_BIAS to the number of IDE drives). -#CFLAGS+= -DBOOT_HD_BIAS=1 -# -# Details: this only applies if BOOT_HD_BIAS > 0. If the BIOS drive number -# for the boot drive is >= BOOT_HD_BIAS, then the boot drive is assumed to -# be SCSI and have unit number (BIOS_drive_number - BOOT_HD_BIAS). E.g., -# BOOT_HD_BIAS=1 makes BIOS drive 1 correspond to 1:da(0,a) instead of -# 1:wd(1,a). If `da' is given explicitly, then the drive is assumed to be -# SCSI and have BIOS drive number (da_unit_number + BOOT_HD_BIAS). E.g., -# BOOT_HD_BIAS=1 makes da(0,a) correspond to 1:da(0,a) instead of 0:da(0,a). - -CLEANFILES+= boot.nohdr boot.strip boot.ldr boot1 boot2 sizetest -LDFLAGS+= -N -Ttext 0 -e start -NO_SHARED= YES -NO_MAN= -STRIP= - -# tunable timeout parameter, waiting for keypress, calibrated in ms -BOOTWAIT?= 5000 -# tunable timeout during string input, calibrated in ms -#TIMEOUT?= 30000 - -# Location that boot2 is loaded at -BOOTSEG= 0x1000 - -# Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned -BOOTSTACK= 0xFFF0 - -boot.nohdr: boot - objcopy -S -O binary boot boot.nohdr - ls -l boot.nohdr - -boot.ldr: boot.nohdr - dd if=boot.nohdr of=boot.ldr bs=8192 count=1 conv=sync - -boot1: boot.nohdr - dd if=boot.nohdr of=boot1 bs=512 count=1 - -boot2: boot.nohdr - dd if=boot.nohdr of=boot2 bs=512 skip=1 - @dd if=boot2 skip=14 of=sizetest 2> /dev/null - @if [ -s sizetest ] ; then \ - echo "boot2 is too big" >&2 ; \ - rm boot2 ; \ - exit 2 ; \ - fi - -all: boot.ldr boot1 boot2 - -install: - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - boot.ldr ${DESTDIR}${BINDIR}/boot - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - boot1 boot2 ${DESTDIR}${BINDIR} - -# If it's not there, don't consider it a target -.if exists(${.CURDIR}/../../../pc98/include) -beforedepend ${OBJS}: machine - -machine: - ln -sf ${.CURDIR}/../../../pc98/include machine - -.endif - -.if exists(${.CURDIR}/../../../i386/include) -beforedepend ${OBJS}: i386 +FILES= boot boot1 boot2 -i386: - ln -sf ${.CURDIR}/../../../i386/include i386 +NM?= nm -.endif +BOOT_COMCONSOLE_PORT?= 0x238 +BOOT_COMCONSOLE_SPEED?= 9600 +B2SIOFMT?= 0x3 + +REL1= 0x700 +ORG1= 0 +ORG2= 0x2000 + +# Decide level of UFS support. +BOOT2_UFS?= UFS1_AND_UFS2 +#BOOT2_UFS?= UFS2_ONLY +#BOOT2_UFS?= UFS1_ONLY + +CFLAGS= -Os \ + -fno-guess-branch-probability \ + -fomit-frame-pointer \ + -fno-unit-at-a-time \ + -mno-align-long-strings \ + -mrtd \ + -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \ + -D${BOOT2_UFS} \ + -DFLAGS=${BOOT_BOOT1_FLAGS} \ + -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ + -DSIOFMT=${B2SIOFMT} \ + -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \ + -I${.CURDIR}/../../.. \ + -I${.CURDIR}/../../i386/boot2 \ + -I${.CURDIR}/../../common \ + -I${.CURDIR}/../btx/lib -I. \ + -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ + -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ + -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ + -Winline --param max-inline-insns-single=100 + +# Set machine type to PC98_SYSTEM_PARAMETER +#CFLAGS+= -DSET_MACHINE_TYPE + +# Initialize the bi_bios_geom using the BIOS geometry +#CFLAGS+= -DGET_BIOSGEOM + +LDFLAGS=-static -N --gc-sections + +# Pick up ../Makefile.inc early. +.include + +.PATH: ${.CURDIR}/../../i386/boot2 + +CLEANFILES= boot + +boot: boot1 boot2 + cat boot1 boot2 > boot + +CLEANFILES+= boot1 boot1.out boot1.o + +boot1: boot1.out + objcopy -S -O binary boot1.out ${.TARGET} + +boot1.out: boot1.o + ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o + +CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ + boot2.s boot2.s.tmp boot2.h sio.o + +boot2: boot2.ld + @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \ + echo "$$x bytes available"; test $$x -ge 0 + dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync + +boot2.ld: boot2.ldr boot2.bin ${BTXKERN} + btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \ + -o ${.TARGET} -P 1 boot2.bin + +boot2.ldr: + dd if=/dev/zero of=${.TARGET} bs=276 count=1 + +boot2.bin: boot2.out + objcopy -S -O binary boot2.out ${.TARGET} + +boot2.out: ${BTXCRT} boot2.o sio.o + ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} + +boot2.o: boot2.s + +SRCS= boot2.c boot2.h + +boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c + ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c + sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s + rm -f boot2.s.tmp + +boot2.h: boot1.out + ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T (read|putc)/ \ + { x = $$1 - ORG1; \ + printf("#define %sORG %#x\n", toupper($$3), REL1 + x) }' \ + ORG1=`printf "%d" ${ORG1}` \ + REL1=`printf "%d" ${REL1}` > ${.TARGET} -CLEANFILES+= machine i386 - -.include "${.CURDIR}/../../../conf/kern.mk" .include Copied: stable/7/sys/boot/pc98/boot2/boot1.S (from r201342, head/sys/boot/pc98/boot2/boot1.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/boot/pc98/boot2/boot1.S Fri Jan 15 12:45:23 2010 (r202355, copy of r201342, head/sys/boot/pc98/boot2/boot1.S) @@ -0,0 +1,395 @@ +/*- + * Copyright (c) 2008-2009 TAKAHASHI Yoshihiro + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* Memory Locations */ + .set STACK_OFF,0x6000 # Stack offset + .set LOAD_SIZE,8192 # Load size + .set DAUA,0x0584 # DA/UA + .set MEM_REL,0x700 # Relocation address + .set MEM_ARG,0x900 # Arguments + .set MEM_BUF,0x8cec # Load area + .set MEM_BTX,0x9000 # BTX start + .set MEM_JMP,0x9010 # BTX entry point + .set MEM_USR,0xa000 # Client start + +/* PC98 machine type from sys/pc98/pc98/pc98_machdep.h */ + .set MEM_SYS, 0xa100 # System common area segment + .set PC98_MACHINE_TYPE, 0x0620 # PC98 machine type + .set EPSON_ID, 0x0624 # EPSON machine id + + .set M_NEC_PC98, 0x0001 + .set M_EPSON_PC98, 0x0002 + .set M_NOT_H98, 0x0010 + .set M_H98, 0x0020 + .set M_NOTE, 0x0040 + .set M_NORMAL, 0x1000 + .set M_8M, 0x8000 + +/* Partition Constants */ + .set PRT_OFF,0x1be # Partition offset + +/* Misc. Constants */ + .set SIZ_PAG,0x1000 # Page size + .set SIZ_SEC,0x200 # Sector size + + .set NSECT,0x10 + + .globl start + .globl read + .globl putc + .code16 + +start: jmp main + +boot_cyl: .org 4 + .ascii "IPL1 " + +main: cld + + /* Setup the stack */ + xor %si,%si + mov %si,%ss + mov $STACK_OFF,%sp + + push %cx + + /* Relocate ourself to MEM_REL */ + push %cs + pop %ds + mov %si,%es + mov $MEM_REL,%di + mov $SIZ_SEC,%cx + rep + movsb + + /* Transfer PC-9801 system common area */ + xor %ax,%ax + mov %ax,%si + mov %ax,%ds + mov %ax,%di + mov $MEM_SYS,%ax + mov %ax,%es + mov $0x0600,%cx + rep + movsb + + /* Transfer EPSON machine type */ + mov $0xfd00,%ax + mov %ax,%ds + mov (0x804),%eax + and $0x00ffffff,%eax + mov %eax,%es:(EPSON_ID) + + /* Set machine type to PC98_SYSTEM_PARAMETER */ +#ifdef SET_MACHINE_TYPE + call set_machine_type +#else + mov $M_NEC_PC98+M_NOT_H98,%eax + mov %eax,%es:(PC98_MACHINE_TYPE) +#endif + + /* Setup graphic screen */ + mov $0x42,%ah /* 640x400 */ + mov $0xc0,%ch + int $0x18 + mov $0x40,%ah /* graph on */ + int $0x18 + + /* Setup text screen */ + mov $0x0a00,%ax /* 80x25 */ + int $0x18 + mov $0x0c,%ah /* text on */ + int $0x18 + mov $0x13,%ah /* cursor home */ + xor %dx,%dx + int $0x18 + mov $0x11,%ah /* cursor on */ + int $0x18 + + /* Setup keyboard */ + mov $0x03,%ah + int $0x18 + + pop %cx + + /* bootstrap passes */ + xor %edi,%edi + mov %di,%ds + mov %di,%es + mov %cs,%bx + cmp $0x1fe0,%bx + jz boot_fd + cmp $0x1fc0,%bx + jnz boot_hd + xor %cx,%cx + mov (DAUA),%al + and $0xf0,%al + cmp $0x30,%al + jz boot_fd + cmp $0x90,%al + jnz boot_hd +boot_fd: xor %cx,%cx + jmp boot_load +boot_hd: test %cx,%cx + jnz boot_load + mov %cs:(boot_cyl),%cx +boot_load: mov %cx,MEM_ARG /* Save cylinder number */ + mov %cx,%di + xor %dx,%dx + mov $LOAD_SIZE,%bx + mov $MEM_BUF,%bp + push %cs + callw read + jc error + + /* Transfer boot2.bin */ + mov $MEM_BTX,%bx + mov 0xa(%bx),%si /* BTX size */ + add %bx,%si /* start of boot2.bin */ + mov $MEM_USR+SIZ_PAG*2,%di + mov $MEM_BTX+(NSECT-1)*SIZ_SEC,%cx + sub %si,%cx + rep + movsb + + /* Enable A20 */ + xor %ax,%ax + outb %al,$0xf2 + mov $0x02,%al + outb %al,$0xf6 + + /* Start BTX */ + ljmp $0x0000,$MEM_JMP + +/* + * Reads sectors from the disk. + * Call with: + * + * %bx - bytes to read + * %cx - cylinder + * %dh - head + * %dl - sector + * %edi - lba + * %es:(%bp) - buffer to read data into + */ +read: xor %ax,%ax + mov %ax,%ds + mov $0x06,%ah + mov (DAUA),%al + mov %ax,%si + and $0xf0,%al + cmp $0x30,%al /* 1.44MB FDD */ + jz read_fd + cmp $0x90,%al /* 1MB FDD */ + jz read_fd + cmp $0xa0,%al /* Is SCSI device? */ + jnz read_load + push %cx + mov %si,%cx + and $0x0f,%cl + inc %cl + mov (0x482),%ah + shr %cl,%ah /* Is SCSI HDD? */ + pop %cx + jc read_load + and $0xff7f,%si /* SCSI MO */ + mov %di,%cx + shr $16,%di + mov %di,%dx + jmp read_load +read_fd: or $0xd000,%si + or $0x0200,%cx + inc %dx +read_load: mov %si,%ax + int $0x1b + lret + +/* + * Print out the error message, wait for a keypress, and then reboot + * the machine. + */ +error: push %cs + pop %ds + mov $msg_eread,%si + call putstr + xor %ax,%ax /* Get keypress */ + int $0x18 + xor %ax,%ax /* CPU reset */ + outb %al,$0xf0 +halt: hlt + jmp halt /* Spin */ + +/* + * Display a null-terminated string. + */ +putstr.0: push %cs + callw putc +putstr: lodsb + test %al,%al + jne putstr.0 + ret + +/* + * Display a single char. + */ +putc: pusha + xor %dx,%dx + mov %dx,%ds + mov MEM_REL+cursor-start,%di + mov $0xa000,%bx + mov %bx,%es + mov $(80*2),%cx + + cmp $0x08,%al + je putc.bs + cmp $0x0d,%al + je putc.cr + cmp $0x0a,%al + je putc.lf + cmp $0x5c,%al /* \ */ + jne 1f + mov $0xfc,%al +1: movb $0xe1,%es:0x2000(%di) + stosw + jmp putc.scr +putc.bs: test %di,%di + jz putc.move + dec %di + dec %di + movb $0xe1,%es:0x2000(%di) + movw $0x20,%es:(%di) + jmp putc.move +putc.cr: mov %di,%ax + div %cx + sub %dx,%di + jmp putc.move +putc.lf: add %cx,%di +putc.scr: cmp $(80*2*25),%di /* Scroll screen */ + jb putc.move + push %ds + mov %bx,%ds + mov $(80*2),%si + xor %di,%di + mov $(80*24/2),%cx + rep + movsl + xor %ax,%ax + mov $0x20,%al + mov $80,%cl + rep + stosw + pop %ds + mov $(80*24*2),%di +putc.move: mov %di,MEM_REL+cursor-start /* Move cursor */ + mov $0x13,%ah + mov %di,%dx + int $0x18 + popa + lret + +cursor: .word 0 + +#ifdef SET_MACHINE_TYPE +/* + * Set machine type to PC98_SYSTEM_PARAMETER. + */ +set_machine_type: + xor %edx,%edx + mov %dx,%ds +// mov $MEM_SYS,%ax +// mov %ax,%es + + /* Wait V-SYNC */ +vsync.1: inb $0x60,%al + test $0x20,%al + jnz vsync.1 +vsync.2: inb $0x60,%al + test $0x20,%al + jz vsync.2 + + /* ANK 'A' font */ + xor %al,%al + outb %al,$0xa1 + mov $0x41,%al + outb %al,$0xa3 + + /* Get 'A' font from CG window */ + push %ds + mov $0xa400,%ax + mov %ax,%ds + xor %eax,%eax + xor %bx,%bx + mov $4,%cx +font.1: add (%bx),%eax + add $4,%bx + loop font.1 + pop %ds + cmp $0x6efc58fc,%eax + jnz m_epson + +m_pc98: or $M_NEC_PC98,%edx + mov $0x0458,%bx + mov (%bx),%al + test $0x80,%al + jz m_not_h98 + or $M_H98,%edx + jmp 1f +m_epson: or $M_EPSON_PC98,%edx +m_not_h98: or $M_NOT_H98,%edx + +1: inb $0x42,%al + test $0x20,%al + jz 1f + or $M_8M,%edx + +1: mov $0x0400,%bx + mov (%bx),%al + test $0x80,%al + jz 1f + or $M_NOTE,%edx + +1: mov $PC98_MACHINE_TYPE,%bx + mov %edx,%es:(%bx) + ret +#endif + +/* Messages */ + +msg_eread: .asciz "Error\r\n" + + .org PRT_OFF,0x90 + +/* Partition table */ + + .fill 0x30,0x1,0x0 + .byte 0x80, 0x00, 0x01, 0x00 + .byte 0xa5, 0xff, 0xff, 0xff + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x50, 0xc3, 0x00, 0x00 + + .word 0xaa55 # Magic number Copied: stable/7/sys/boot/pc98/boot2/boot2.c (from r201342, head/sys/boot/pc98/boot2/boot2.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/boot/pc98/boot2/boot2.c Fri Jan 15 12:45:23 2010 (r202355, copy of r201342, head/sys/boot/pc98/boot2/boot2.c) @@ -0,0 +1,842 @@ +/*- + * Copyright (c) 2008-2009 TAKAHASHI Yoshihiro + * Copyright (c) 1998 Robert Nordier + * All rights reserved. + * + * Redistribution and use in source and binary forms are freely + * permitted provided that the above copyright notice and this + * paragraph and the following disclaimer are duplicated in all + * such forms. + * + * This software is provided "AS IS" and without any express or + * implied warranties, including, without limitation, the implied + * warranties of merchantability and fitness for a particular + * purpose. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include + +#include + +#include "boot2.h" +#include "lib.h" + +#define IO_KEYBOARD 1 +#define IO_SERIAL 2 + +#define SECOND 1 /* Circa that many ticks in a second. */ + +#define RBX_ASKNAME 0x0 /* -a */ +#define RBX_SINGLE 0x1 /* -s */ +/* 0x2 is reserved for log2(RB_NOSYNC). */ +/* 0x3 is reserved for log2(RB_HALT). */ +/* 0x4 is reserved for log2(RB_INITNAME). */ +#define RBX_DFLTROOT 0x5 /* -r */ +#define RBX_KDB 0x6 /* -d */ +/* 0x7 is reserved for log2(RB_RDONLY). */ +/* 0x8 is reserved for log2(RB_DUMP). */ +/* 0x9 is reserved for log2(RB_MINIROOT). */ +#define RBX_CONFIG 0xa /* -c */ +#define RBX_VERBOSE 0xb /* -v */ +#define RBX_SERIAL 0xc /* -h */ +#define RBX_CDROM 0xd /* -C */ +/* 0xe is reserved for log2(RB_POWEROFF). */ +#define RBX_GDB 0xf /* -g */ +#define RBX_MUTE 0x10 /* -m */ +/* 0x11 is reserved for log2(RB_SELFTEST). */ +/* 0x12 is reserved for boot programs. */ +/* 0x13 is reserved for boot programs. */ +#define RBX_PAUSE 0x14 /* -p */ +#define RBX_QUIET 0x15 /* -q */ +#define RBX_NOINTR 0x1c /* -n */ +/* 0x1d is reserved for log2(RB_MULTIPLE) and is just misnamed here. */ +#define RBX_DUAL 0x1d /* -D */ +/* 0x1f is reserved for log2(RB_BOOTINFO). */ + +/* pass: -a, -s, -r, -d, -c, -v, -h, -C, -g, -m, -p, -D */ +#define RBX_MASK (OPT_SET(RBX_ASKNAME) | OPT_SET(RBX_SINGLE) | \ + OPT_SET(RBX_DFLTROOT) | OPT_SET(RBX_KDB ) | \ + OPT_SET(RBX_CONFIG) | OPT_SET(RBX_VERBOSE) | \ + OPT_SET(RBX_SERIAL) | OPT_SET(RBX_CDROM) | \ + OPT_SET(RBX_GDB ) | OPT_SET(RBX_MUTE) | \ + OPT_SET(RBX_PAUSE) | OPT_SET(RBX_DUAL)) + +#define PATH_CONFIG "/boot.config" +#define PATH_BOOT3 "/boot/loader" +#define PATH_KERNEL "/boot/kernel/kernel" + +#define ARGS 0x900 +#define NOPT 14 +#define NDEV 3 +#define V86_CY(x) ((x) & PSL_C) +#define V86_ZR(x) ((x) & PSL_Z) + +#define DRV_DISK 0xf0 +#define DRV_UNIT 0x0f + +#define TYPE_AD 0 +#define TYPE_DA 1 +#define TYPE_FD 2 + +#define OPT_SET(opt) (1 << (opt)) +#define OPT_CHECK(opt) ((opts) & OPT_SET(opt)) + +extern uint32_t _end; + +static const char optstr[NOPT] = "DhaCcdgmnpqrsv"; /* Also 'P', 'S' */ +static const unsigned char flags[NOPT] = { + RBX_DUAL, + RBX_SERIAL, + RBX_ASKNAME, + RBX_CDROM, + RBX_CONFIG, + RBX_KDB, + RBX_GDB, + RBX_MUTE, + RBX_NOINTR, + RBX_PAUSE, + RBX_QUIET, + RBX_DFLTROOT, + RBX_SINGLE, + RBX_VERBOSE +}; + +static const char *const dev_nm[NDEV] = {"ad", "da", "fd"}; +static const unsigned char dev_maj[NDEV] = {30, 4, 2}; +static const unsigned char dev_daua[NDEV] = {0x80, 0xa0, 0x90}; + +static struct dsk { + unsigned daua; + unsigned type; + unsigned disk; + unsigned unit; + unsigned head; + unsigned sec; + unsigned slice; + unsigned part; + unsigned start; +} dsk; +static char cmd[512], cmddup[512]; +static char kname[1024]; +static uint32_t opts; +static int comspeed = SIOSPD; +static struct bootinfo bootinfo; +static uint8_t ioctrl = IO_KEYBOARD; + +void exit(int); +static void load(void); +static int parse(void); +static int xfsread(ino_t, void *, size_t); +static int dskread(void *, unsigned, unsigned); +static void printf(const char *,...); +static void putchar(int); +static uint32_t memsize(void); +static int drvread(void *, unsigned); +static int keyhit(unsigned); +static int xputc(int); +static int xgetc(int); +static int getc(int); + +static void memcpy(void *, const void *, int); +static void +memcpy(void *dst, const void *src, int len) +{ + const char *s = src; + char *d = dst; + + while (len--) + *d++ = *s++; +} + +static inline int +strcmp(const char *s1, const char *s2) +{ + for (; *s1 == *s2 && *s1; s1++, s2++); + return (unsigned char)*s1 - (unsigned char)*s2; +} + +#define UFS_SMALL_CGBASE +#include "ufsread.c" + +static inline int +xfsread(ino_t inode, void *buf, size_t nbyte) +{ + if ((size_t)fsread(inode, buf, nbyte) != nbyte) { + printf("Invalid %s\n", "format"); + return -1; + } + return 0; +} + +static inline uint32_t +memsize(void) +{ + u_char *p = (u_char *)PTOV(0); + + return *(p + 0x401) * 128 * 1024 + *(u_int16_t *)(p + 0x594) * 1024 * 1024; +} + +static inline void +getstr(void) +{ + char *s; + int c; + + s = cmd; + for (;;) { + switch (c = xgetc(0)) { + case 0: + break; + case '\177': + case '\b': + if (s > cmd) { + s--; + printf("\b \b"); + } + break; + case '\n': + case '\r': + *s = 0; + return; + default: + if (s - cmd < sizeof(cmd) - 1) + *s++ = c; + putchar(c); + } + } +} + +static inline void +putc(int c) +{ + + v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; + v86.addr = PUTCORG; /* call to putc in boot1 */ + v86.eax = c; + v86int(); + v86.ctl = V86_FLAGS; +} + +static inline int +is_scsi_hd(void) +{ + + if ((*(u_char *)PTOV(0x482) >> dsk.unit) & 0x01) + return 1; + + return 0; +} + +static inline void +fix_sector_size(void) +{ + u_char *p; + + p = (u_char *)PTOV(0x460 + dsk.unit * 4); /* SCSI equipment parameter */ + + if ((p[0] & 0x1f) == 7) { /* SCSI MO */ + if (!(p[3] & 0x30)) { /* 256B / sector */ + p[3] |= 0x10; /* forced set 512B / sector */ + p[3 + 0xa1000] |= 0x10; + } + } +} + +static inline uint32_t +get_diskinfo(void) +{ + + if (dsk.disk == 0x30) { /* 1440KB FD */ + /* 80 cylinders, 2 heads, 18 sectors */ + return (80 << 16) | (2 << 8) | 18; + } else if (dsk.disk == 0x90) { /* 1200KB FD */ + /* 80 cylinders, 2 heads, 15 sectors */ + return (80 << 16) | (2 << 8) | 15; + } else if (dsk.disk == 0x80 || is_scsi_hd()) { /* IDE or SCSI HDD */ + v86.addr = 0x1b; + v86.eax = 0x8400 | dsk.daua; + v86int(); + return (v86.ecx << 16) | v86.edx; + } + + /* SCSI MO or CD */ + fix_sector_size(); /* SCSI MO */ + + /* other SCSI devices */ + return (65535 << 16) | (8 << 8) | 32; +} + +static void +set_dsk(void) +{ + uint32_t di; + + di = get_diskinfo(); + + dsk.head = (di >> 8) & 0xff; + dsk.sec = di & 0xff; + dsk.start = 0; +} + +#ifdef GET_BIOSGEOM +static uint32_t +bd_getbigeom(int bunit) +{ + int hds = 0; + int unit = 0x80; /* IDE HDD */ + u_int addr = 0x55d; + + while (unit < 0xa7) { + if (*(u_char *)PTOV(addr) & (1 << (unit & 0x0f))) + if (hds++ == bunit) + break; + + if (unit >= 0xA0) { + int media = ((unsigned *)PTOV(0x460))[unit & 0x0F] & 0x1F; + + if (media == 7 && hds++ == bunit) /* SCSI MO */ + return(0xFFFE0820); /* C:65535 H:8 S:32 */ + } + if (++unit == 0x84) { + unit = 0xA0; /* SCSI HDD */ + addr = 0x482; + } + } + if (unit == 0xa7) + return 0x4F020F; /* 1200KB FD C:80 H:2 S:15 */ + v86.addr = 0x1b; + v86.eax = 0x8400 | unit; + v86int(); + if (v86.efl & 0x1) + return 0x4F020F; /* 1200KB FD C:80 H:2 S:15 */ + return ((v86.ecx & 0xffff) << 16) | (v86.edx & 0xffff); +} +#endif + +static int +check_slice(void) +{ + struct pc98_partition *dp; + char *sec; + unsigned i, cyl; + + sec = dmadat->secbuf; + cyl = *(uint16_t *)PTOV(ARGS); + set_dsk(); + + if (dsk.type == TYPE_FD) + return (WHOLE_DISK_SLICE); + if (drvread(sec, DOSBBSECTOR + 1)) + return (WHOLE_DISK_SLICE); /* Read error */ + dp = (void *)(sec + DOSPARTOFF); + for (i = 0; i < NDOSPART; i++) { + if (dp[i].dp_mid == DOSMID_386BSD) { + if (dp[i].dp_scyl <= cyl && cyl <= dp[i].dp_ecyl) + return (BASE_SLICE + i); + } + } + + return (WHOLE_DISK_SLICE); +} + +int +main(void) +{ +#ifdef GET_BIOSGEOM + int i; +#endif + int autoboot; + ino_t ino; + + dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base); + v86.ctl = V86_FLAGS; + v86.efl = PSL_RESERVED_DEFAULT | PSL_I; + dsk.daua = *(uint8_t *)PTOV(0x584); + dsk.disk = dsk.daua & DRV_DISK; + dsk.unit = dsk.daua & DRV_UNIT; + if (dsk.disk == 0x80) + dsk.type = TYPE_AD; + else if (dsk.disk == 0xa0) + dsk.type = TYPE_DA; + else /* if (dsk.disk == 0x30 || dsk.disk == 0x90) */ + dsk.type = TYPE_FD; + dsk.slice = check_slice(); +#ifdef GET_BIOSGEOM + for (i = 0; i < N_BIOS_GEOM; i++) + bootinfo.bi_bios_geom[i] = bd_getbigeom(i); +#endif + bootinfo.bi_version = BOOTINFO_VERSION; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 12:52:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6898E1065670; Fri, 15 Jan 2010 12:52:46 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54D9C8FC15; Fri, 15 Jan 2010 12:52:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FCqkGH076814; Fri, 15 Jan 2010 12:52:46 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FCqkDT076805; Fri, 15 Jan 2010 12:52:46 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001151252.o0FCqkDT076805@svn.freebsd.org> From: Takahashi Yoshihiro Date: Fri, 15 Jan 2010 12:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202356 - stable/6/sys/boot/pc98/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 12:52:46 -0000 Author: nyan Date: Fri Jan 15 12:52:45 2010 New Revision: 202356 URL: http://svn.freebsd.org/changeset/base/202356 Log: MFC: revision 200407 Cleanups the boot2 for pc98. There is no functional change. - Make setting machine type and getting geom conditional for future. - Remove unused RAWBOOT and CDBOOT supports. - Remove unneeded include. - Fix warnings. This change is directly merged into stable/6 because stable/[78] have new boot2. Modified: stable/6/sys/boot/pc98/boot2/Makefile stable/6/sys/boot/pc98/boot2/bios.S stable/6/sys/boot/pc98/boot2/boot.c stable/6/sys/boot/pc98/boot2/boot.h stable/6/sys/boot/pc98/boot2/disk.c stable/6/sys/boot/pc98/boot2/io.c stable/6/sys/boot/pc98/boot2/serial_16550.S stable/6/sys/boot/pc98/boot2/sys.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/6/sys/boot/pc98/boot2/Makefile Fri Jan 15 12:45:23 2010 (r202355) +++ stable/6/sys/boot/pc98/boot2/Makefile Fri Jan 15 12:52:45 2010 (r202356) @@ -29,6 +29,12 @@ CFLAGS+= -DCOMCONSOLE=${BOOT_COMCONSOLE_ BOOT_COMCONSOLE_SPEED?=9600 CFLAGS+= -DCOMSPEED=${BOOT_COMCONSOLE_SPEED} +# Set machine type to PC98_SYSTEM_PARAMETER +CFLAGS+= -DSET_MACHINE_TYPE + +# Initialize the bi_bios_geom using the BIOS geometry +CFLAGS+= -DGET_BIOSGEOM + # Enable code to take the default boot string from a fixed location on the # disk. See nextboot(8) and README.386BSD for more info. #CFLAGS+= -DNAMEBLOCK Modified: stable/6/sys/boot/pc98/boot2/bios.S ============================================================================== --- stable/6/sys/boot/pc98/boot2/bios.S Fri Jan 15 12:45:23 2010 (r202355) +++ stable/6/sys/boot/pc98/boot2/bios.S Fri Jan 15 12:52:45 2010 (r202356) @@ -91,8 +91,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFT #include "asm.h" .text -#ifndef CDBOOT - /* * PC-9801/PC-9821 SCSI MO booting * 2002/06/05-07/03 Kawanobe Koh @@ -198,98 +196,6 @@ read_end: ret -#else /* CDBOOT */ - - -/* - * int - * getbootspec(struct specpacket *offset) - * - * Read CD-ROM boot specification packet to "offset". - */ -ENTRY(getbootspec) - push %ebp - mov %esp, %ebp - - push %esi - push %ebx - - movw 0x8(%ebp), %si - mov $0x7f, %edx - - /* prot_to_real will set %es to BOOTSEG */ - call EXT(prot_to_real) /* enter real mode */ - movw $0x4b01, %ax /* (do not) terminate disk emulation */ - movb $0x7f, %dl /* any drive */ - - sti - int $0x13 - cli - - /* save return value (actually movw %ax, %bx) */ - mov %eax, %ebx - - data32 - call EXT(real_to_prot) /* back to protected mode */ - - xor %eax, %eax - movb %bh, %al /* return value in %ax */ - - pop %ebx - pop %esi - pop %ebp - - ret - - -/* - * int - * biosreadlba(struct daddrpacket *daddr) - * Read sectors using the BIOS "read extended" function - * BIOS call "INT 0x13 Function 0x42" to read sectors from disk into memory - * Call with %ah = 0x42 - * %dl = drive (0x0 for floppy disk, or emulated CD) - * %ds:%si = ptr to disk address packet - * Return: - * %ah = 0x0 on success; err code on failure - */ - -ENTRY(biosreadlba) - push %ebp - mov %esp, %ebp - - push %ebx - push %esi - - movw 8(%ebp), %si - movl $0, %edx /* emulated CD is always drive 0 */ - - /* prot_to_real will set %es to BOOTSEG */ - call EXT(prot_to_real) /* enter real mode */ - movw $0x4200, %ax /* subfunction */ - movb $0, %dl - - sti - int $0x13 - cli - - /* save return value (actually movw %ax, %bx) */ - mov %eax, %ebx - - data32 - call EXT(real_to_prot) /* back to protected mode */ - - xor %eax, %eax - movb %bh, %al /* return value in %ax */ - - pop %esi - pop %ebx - pop %ebp - - ret - -#endif /* !CDBOOT */ - /* * getc() * BIOS call "INT 18H Function 00H" to read character from keyboard Modified: stable/6/sys/boot/pc98/boot2/boot.c ============================================================================== --- stable/6/sys/boot/pc98/boot2/boot.c Fri Jan 15 12:45:23 2010 (r202355) +++ stable/6/sys/boot/pc98/boot2/boot.c Fri Jan 15 12:52:45 2010 (r202356) @@ -85,12 +85,13 @@ boot(int drive) unsigned char disk_equips; /* Pick up the story from the Bios on geometry of disks */ - +#ifdef GET_BIOSGEOM for(ret = 0; ret < 2; ret ++) { if (*(unsigned char*)V(0xA155d) & (1 << ret)) { bootinfo.bi_bios_geom[ret] = get_diskinfo(ret + 0x80); } } +#endif bootinfo.bi_basemem = memsize(0); bootinfo.bi_extmem = memsize(1); @@ -98,8 +99,10 @@ boot(int drive) gateA20(); +#ifdef SET_MACHINE_TYPE /* set machine type to PC98_SYSTEM_PARAMETER */ machine_check(); +#endif /* * The default boot device is the first partition in the Modified: stable/6/sys/boot/pc98/boot2/boot.h ============================================================================== --- stable/6/sys/boot/pc98/boot2/boot.h Fri Jan 15 12:45:23 2010 (r202355) +++ stable/6/sys/boot/pc98/boot2/boot.h Fri Jan 15 12:52:45 2010 (r202356) @@ -51,7 +51,7 @@ extern int loadflags; extern struct disklabel disklabel; /* asm.S */ -#if ASM_ONLY +#ifdef ASM_ONLY void real_to_prot(void); void prot_to_real(void); #endif @@ -84,9 +84,6 @@ void putchar(int c); void delay1ms(void); int gets(char *buf); int strcmp(const char *s1, const char *s2); -#ifdef CDBOOT -int strcasecmp(const char *s1, const char *s2); -#endif /* !CDBOOT */ void memcpy(const void *from, void *to, size_t len); void twiddle(void); void machine_check(void); Modified: stable/6/sys/boot/pc98/boot2/disk.c ============================================================================== --- stable/6/sys/boot/pc98/boot2/disk.c Fri Jan 15 12:45:23 2010 (r202355) +++ stable/6/sys/boot/pc98/boot2/disk.c Fri Jan 15 12:52:45 2010 (r202356) @@ -87,7 +87,6 @@ devopen(void) di = get_diskinfo(dosdev_copy); spc = (spt = SPT(di)) * HEADS(di); -#ifndef RAWBOOT if ((dosdev_copy & 0xf0) == 0x90) { boff = 0; @@ -119,7 +118,7 @@ devopen(void) boff = dl->d_partitions[part].p_offset - dl->d_partitions[2].p_offset + sector; } -#endif /* RAWBOOT */ + return 0; } Modified: stable/6/sys/boot/pc98/boot2/io.c ============================================================================== --- stable/6/sys/boot/pc98/boot2/io.c Fri Jan 15 12:45:23 2010 (r202355) +++ stable/6/sys/boot/pc98/boot2/io.c Fri Jan 15 12:52:45 2010 (r202356) @@ -162,7 +162,7 @@ delay1ms(void) (void)outb(0x5f,0); /* about 600ns */ } -static __inline int +static int isch(void) { int isc; @@ -182,7 +182,7 @@ isch(void) return (serial_ischar()); } -static __inline unsigned +static unsigned pword(unsigned physaddr) { static int counter = 0; @@ -246,24 +246,6 @@ strcmp(const char *s1, const char *s2) return 1; } -#ifdef CDBOOT -int -strcasecmp(const char *s1, const char *s2) -{ - /* - * We only consider ASCII chars and don't anticipate - * control characters (they are invalid in filenames - * anyway). - */ - while ((*s1 & 0x5f) == (*s2 & 0x5f)) { - if (!*s1++) - return 0; - s2++; - } - return 1; -} -#endif /* !CDBOOT */ - void memcpy(const void *from, void *to, size_t len) { @@ -349,6 +331,7 @@ void putc(int c) outb(0x60, pos >> 8); } +#ifdef SET_MACHINE_TYPE void machine_check(void) { int ret; @@ -394,3 +377,4 @@ void machine_check(void) (*(unsigned long *)V(0xA1620)) = ret; } +#endif Modified: stable/6/sys/boot/pc98/boot2/serial_16550.S ============================================================================== --- stable/6/sys/boot/pc98/boot2/serial_16550.S Fri Jan 15 12:45:23 2010 (r202355) +++ stable/6/sys/boot/pc98/boot2/serial_16550.S Fri Jan 15 12:52:45 2010 (r202356) @@ -67,7 +67,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFT .file "serial.S" -#include #include "asm.h" .text Modified: stable/6/sys/boot/pc98/boot2/sys.c ============================================================================== --- stable/6/sys/boot/pc98/boot2/sys.c Fri Jan 15 12:45:23 2010 (r202355) +++ stable/6/sys/boot/pc98/boot2/sys.c Fri Jan 15 12:52:45 2010 (r202356) @@ -53,10 +53,6 @@ static int mapblock; int poff; -#ifdef RAWBOOT -#define STARTBYTE 8192 /* Where on the media the kernel starts */ -#endif - static int block_map(int file_block); static int find(char *path); @@ -74,7 +70,6 @@ xread(char *addr, int size) } } -#ifndef RAWBOOT void read(char *buffer, int count) { @@ -102,40 +97,6 @@ read(char *buffer, int count) poff += size; } } -#else -void -read(char *buffer, int count) -{ - int cnt, bnum, off, size; - - off = STARTBYTE + poff; - poff += count; - - /* Read any unaligned bit at the front */ - cnt = off & 511; - if (cnt) { - size = 512-cnt; - if (count < size) - size = count; - devread(iobuf, off >> 9, 512); - memcpy(iobuf+cnt, buffer, size); - count -= size; - off += size; - buffer += size; - } - size = count & (~511); - if (size && (off & (~511))) { - devread(buffer, off >> 9, size); - off += size; - count -= size; - buffer += size; - } - if (count) { - devread(iobuf, off >> 9, 512); - memcpy(iobuf, buffer, count); - } -} -#endif static int find(char *path) @@ -263,7 +224,7 @@ openrd(void) biosdrive = biosdrivedigit - '0'; if (biosdrivedigit == '\0') { biosdrive = dosdev & 0x0f; -#if BOOT_HD_BIAS > 0 +#if defined(BOOT_HD_BIAS) && (BOOT_HD_BIAS > 0) /* XXX */ if (maj == 4) biosdrive += BOOT_HD_BIAS; @@ -299,7 +260,6 @@ openrd(void) if (devopen()) return 1; -#ifndef RAWBOOT /***********************************************\ * Load Filesystem info (mount the device) * \***********************************************/ @@ -316,6 +276,6 @@ openrd(void) return -1; } poff = 0; -#endif /* RAWBOOT */ + return 0; } From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 13:48:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB7611065694; Fri, 15 Jan 2010 13:48:29 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7B1D8FC1A; Fri, 15 Jan 2010 13:48:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FDmTms089333; Fri, 15 Jan 2010 13:48:29 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FDmThw089327; Fri, 15 Jan 2010 13:48:29 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151348.o0FDmThw089327@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 13:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202357 - vendor/groff/dist/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 13:48:29 -0000 Author: ru Date: Fri Jan 15 13:48:29 2010 New Revision: 202357 URL: http://svn.freebsd.org/changeset/base/202357 Log: Cherry-pick some vendor changes to mdoc and man macro packages. (They were all made before Groff switched from GPLv2 to GPLv3, though the mdoc macro packages is not affected by the switch.) : 2007-11-10 Michail Vidiassov : : * tmac/doc-syms (doc-str-St--susv3): New string. : * tmac/groff_mdoc.man: Document it. : : 2008-09-06 Werner LEMBERG : : * tmac/doc-common (Dd, Os, Dt): Reset `doc-command-name' to make : `.Nm' work properly if next manual page is printed. : : 2008-10-04 Werner LEMBERG : : * tmac/doc-common (doc-operating-system-*): Update releases. : : * tmac/groff_mdoc.man: Document it. : : 2008-10-13 Werner LEMBERG : : * tmac/groff_mdoc.man: Update documentation on BSD-like OS string : versions. : : 2008-10-16 Werner LEMBERG : : * tmac/doc-common (doc-operating-system-*), tmac/groff_mdoc.man: Add : NetBSD 4.0.1. : : 2008-11-05 Werner LEMBERG : : * tmac/doc-common (Dt): Start a new page if necessary and set up : headers. : : 2008-12-24 Michail Vidiassov : : * tmac/doc-common: Add entries for Mac OS X and FreeBSD. : : 2009-01-02 Werner LEMBERG : : * tmac/groff_mdoc.man: Update OS version string listing. : : 2009-01-03 Werner LEMBERG : : * tmac/an-old.tmac, tmac/doc.tmac: For -Tutf8, map \-, -, ', and ` : conservatively to ASCII for the sake of easy cut and paste. Modified: vendor/groff/dist/tmac/an-old.tmac vendor/groff/dist/tmac/doc-common vendor/groff/dist/tmac/doc-old.tmac vendor/groff/dist/tmac/doc-syms vendor/groff/dist/tmac/doc.tmac vendor/groff/dist/tmac/groff_mdoc.man Modified: vendor/groff/dist/tmac/an-old.tmac ============================================================================== --- vendor/groff/dist/tmac/an-old.tmac Fri Jan 15 12:52:45 2010 (r202356) +++ vendor/groff/dist/tmac/an-old.tmac Fri Jan 15 13:48:29 2010 (r202357) @@ -630,6 +630,18 @@ . hy \n[HY] .\} . +.\" For UTF-8, map some characters conservatively for the sake +.\" of easy cut and paste. +. +.if '\*[.T]'utf8' \{\ +. rchar \- - ' ` +. +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +. char ` \N'96' +.\} +. .\" Load local modifications. .mso man.local . Modified: vendor/groff/dist/tmac/doc-common ============================================================================== --- vendor/groff/dist/tmac/doc-common Fri Jan 15 12:52:45 2010 (r202356) +++ vendor/groff/dist/tmac/doc-common Fri Jan 15 13:48:29 2010 (r202357) @@ -219,6 +219,7 @@ .\" NS doc-document-title .\" NS doc-section .\" NS doc-volume +.\" NS doc-command-name .\" NS .\" NS local variables: .\" NS doc-volume-as-XXX @@ -319,6 +320,7 @@ . ds doc-document-title UNTITLED . ds doc-volume LOCAL . ds doc-section Null +. ds doc-command-name . . if !"\$1"" \ . ds doc-document-title "\$1 @@ -357,6 +359,12 @@ . if !"\$3"" \ . if "\*[doc-volume]"LOCAL" \ . ds doc-volume \$3 +. +. if !\n[cR] \ +. if \n[nl] \{\ + . doc-setup-header +. bp +. \} .. . . @@ -379,6 +387,7 @@ .\" NS .\" NS modifies: .\" NS doc-operating-system +.\" NS doc-command-name .\" NS .\" NS local variables: .\" NS doc-operating-system-XXX-XXX @@ -435,9 +444,14 @@ .ds doc-operating-system-NetBSD-2.0 2.0 .ds doc-operating-system-NetBSD-2.0.1 2.0.1 .ds doc-operating-system-NetBSD-2.0.2 2.0.2 +.ds doc-operating-system-NetBSD-2.0.3 2.0.3 .ds doc-operating-system-NetBSD-2.1 2.1 .ds doc-operating-system-NetBSD-3.0 3.0 +.ds doc-operating-system-NetBSD-3.0.1 3.0.1 +.ds doc-operating-system-NetBSD-3.0.2 3.0.2 +.ds doc-operating-system-NetBSD-3.1 3.1 .ds doc-operating-system-NetBSD-4.0 4.0 +.ds doc-operating-system-NetBSD-4.0.1 4.0.1 . .ds doc-operating-system-FreeBSD-1.0 1.0 .ds doc-operating-system-FreeBSD-1.1 1.1 @@ -486,23 +500,48 @@ .ds doc-operating-system-FreeBSD-6.0 6.0 .ds doc-operating-system-FreeBSD-6.1 6.1 .ds doc-operating-system-FreeBSD-6.2 6.2 +.ds doc-operating-system-FreeBSD-6.3 6.3 +.ds doc-operating-system-FreeBSD-6.4 6.4 .ds doc-operating-system-FreeBSD-7.0 7.0 +.ds doc-operating-system-FreeBSD-7.1 7.1 . -.ds doc-operating-system-Darwin-8.0.0 8.0.0 -.ds doc-operating-system-Darwin-8.1.0 8.1.0 -.ds doc-operating-system-Darwin-8.2.0 8.2.0 -.ds doc-operating-system-Darwin-8.3.0 8.3.0 -.ds doc-operating-system-Darwin-8.4.0 8.4.0 -.ds doc-operating-system-Darwin-8.5.0 8.5.0 -. -.ds doc-operating-system-DragonFly-1.0 1.0 -.ds doc-operating-system-DragonFly-1.1 1.1 -.ds doc-operating-system-DragonFly-1.2 1.2 -.ds doc-operating-system-DragonFly-1.3 1.3 -.ds doc-operating-system-DragonFly-1.4 1.4 -.ds doc-operating-system-DragonFly-1.5 1.5 +.ds doc-operating-system-Darwin-8.0.0 8.0.0 +.ds doc-operating-system-Darwin-8.1.0 8.1.0 +.ds doc-operating-system-Darwin-8.2.0 8.2.0 +.ds doc-operating-system-Darwin-8.3.0 8.3.0 +.ds doc-operating-system-Darwin-8.4.0 8.4.0 +.ds doc-operating-system-Darwin-8.5.0 8.5.0 +.ds doc-operating-system-Darwin-8.6.0 8.6.0 +.ds doc-operating-system-Darwin-8.7.0 8.7.0 +.ds doc-operating-system-Darwin-8.8.0 8.8.0 +.ds doc-operating-system-Darwin-8.9.0 8.9.0 +.ds doc-operating-system-Darwin-8.10.0 8.10.0 +.ds doc-operating-system-Darwin-8.11.0 8.11.0 +.ds doc-operating-system-Darwin-9.0.0 9.0.0 +.ds doc-operating-system-Darwin-9.1.0 9.1.0 +.ds doc-operating-system-Darwin-9.2.0 9.2.0 +.ds doc-operating-system-Darwin-9.3.0 9.3.0 +.ds doc-operating-system-Darwin-9.4.0 9.4.0 +.ds doc-operating-system-Darwin-9.5.0 9.5.0 +.ds doc-operating-system-Darwin-9.6.0 9.6.0 +. +.ds doc-operating-system-DragonFly-1.0 1.0 +.ds doc-operating-system-DragonFly-1.1 1.1 +.ds doc-operating-system-DragonFly-1.2 1.2 +.ds doc-operating-system-DragonFly-1.3 1.3 +.ds doc-operating-system-DragonFly-1.4 1.4 +.ds doc-operating-system-DragonFly-1.5 1.5 +.ds doc-operating-system-DragonFly-1.6 1.6 +.ds doc-operating-system-DragonFly-1.8 1.8 +.ds doc-operating-system-DragonFly-1.8.1 1.8.1 +.ds doc-operating-system-DragonFly-1.10 1.10 +.ds doc-operating-system-DragonFly-1.12 1.12 +.ds doc-operating-system-DragonFly-1.12.2 1.12.2 +.ds doc-operating-system-DragonFly-2.0 2.0 . .de Os +. ds doc-command-name +. . ie "\$1"" \ . ds doc-operating-system "\*[doc-default-operating-system] . el \{ .ie "\$1"ATT" \{\ @@ -563,6 +602,7 @@ .\" NS .\" NS modifies: .\" NS doc-date-string +.\" NS doc-command-name .\" NS .\" NS local variables: .\" NS doc-date-XXX @@ -583,6 +623,8 @@ .ds doc-date-12 December . .de Dd +. ds doc-command-name +. . ie \n[.$] \{\ . ie (\n[.$] == 3) \ . ds doc-date-string \$1\~\$2 \$3 Modified: vendor/groff/dist/tmac/doc-old.tmac ============================================================================== --- vendor/groff/dist/tmac/doc-old.tmac Fri Jan 15 12:52:45 2010 (r202356) +++ vendor/groff/dist/tmac/doc-old.tmac Fri Jan 15 13:48:29 2010 (r202357) @@ -40,7 +40,7 @@ .ds aD \fI .\" Argument Reference Style .ds aR \f(CO -.\" Interactive Comand Modifier (flag) +.\" Interactive Command Modifier (flag) .ds cM \f(CB .\" Emphasis (in the English sense - usually italics) .ds eM \fI Modified: vendor/groff/dist/tmac/doc-syms ============================================================================== --- vendor/groff/dist/tmac/doc-syms Fri Jan 15 12:52:45 2010 (r202356) +++ vendor/groff/dist/tmac/doc-syms Fri Jan 15 13:48:29 2010 (r202357) @@ -651,6 +651,8 @@ .\" X/Open .ds doc-str-St--susv2 Version\~2 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification .as doc-str-St--susv2 " (\*[Lq]\*[doc-Tn-font-size]SUSv2\*[doc-str-St]\*[Rq]) +.ds doc-str-St--susv3 Version\~3 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification +.as doc-str-St--susv3 " (\*[Lq]\*[doc-Tn-font-size]SUSv3\*[doc-str-St]\*[Rq]) .ds doc-str-St--svid4 System\~V Interface Definition, Fourth Edition .as doc-str-St--svid4 " (\*[Lq]\*[doc-Tn-font-size]SVID\*[doc-str-St]\^4\*[Rq]) .ds doc-str-St--xbd5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] System Interface Definitions Issue\~5 Modified: vendor/groff/dist/tmac/doc.tmac ============================================================================== --- vendor/groff/dist/tmac/doc.tmac Fri Jan 15 12:52:45 2010 (r202356) +++ vendor/groff/dist/tmac/doc.tmac Fri Jan 15 13:48:29 2010 (r202357) @@ -356,10 +356,10 @@ . ds doc-macro-name Fl . doc-parse-args \$@ . -. if !\n[.$] \{\ -. \" no arguments +. \" no arguments +. if !\n[.$] \ . nop \|\-\|\f[]\s[0] -. \}\} +. \} . . if !\n[doc-arg-limit] \ . return @@ -481,8 +481,8 @@ . el \{\ . nr doc-reg-dpr \n[doc-arg-ptr] . +. \" the `\%' prevents hyphenation on a dash (`-') . ie (\n[doc-reg-dpr1] == 2) \ -. \" the `\%' prevents hyphenation on a dash (`-') . nop \%\*[doc-str-dpr]\&\c . el \{\ . \" punctuation character @@ -595,10 +595,10 @@ . ds doc-macro-name Ar . doc-parse-args \$@ . -. if !\n[.$] \{\ -. \" no argument +. \" no argument +. if !\n[.$] \ . nop \)\*[doc-str-Ar-default]\&\f[]\s[0] -. \}\} +. \} . . if !\n[doc-arg-limit] \ . return @@ -1034,10 +1034,10 @@ . ds doc-macro-name Pa . doc-parse-args \$@ . -. if !\n[.$] \{\ -. \" default value +. \" default value +. if !\n[.$] \ . nop \*[doc-Pa-font]~\f[]\s[0] -. \}\} +. \} . . if !\n[doc-arg-limit] \ . return @@ -6425,6 +6425,19 @@ .blm doc-empty-line . . +.\" For UTF-8, map some characters conservatively for the sake +.\" of easy cut and paste. +. +.if '\*[.T]'utf8' \{\ +. rchar \- - ' ` +. +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +. char ` \N'96' +.\} +. +. .ec . . Modified: vendor/groff/dist/tmac/groff_mdoc.man ============================================================================== --- vendor/groff/dist/tmac/groff_mdoc.man Fri Jan 15 12:52:45 2010 (r202356) +++ vendor/groff/dist/tmac/groff_mdoc.man Fri Jan 15 13:48:29 2010 (r202357) @@ -864,16 +864,18 @@ the release ID. .It NetBSD 0.8, 0.8a, 0.9, 0.9a, 1.0, 1.0a, 1.1, 1.2, 1.2a, 1.2b, 1.2c, 1.2d, 1.2e, 1.3, 1.3a, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.6.1, -1.6.2, 2.0, 2.0.1, 2.0.2, 2.1, 3.0 +1.6.2, 1.6.3, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.1, 3.0, 3.0.1, 3.0.2, 3.1, 4.0, +4.0.1 .It FreeBSD 1.0, 1.1, 1.1.5, 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.2, 2.2.1, 2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0, 4.1, 4.1.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.6.2, 4.7, 4.8, 4.9, 4.10, 4.11, 5.0, 5.1, -5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 7.0 +5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1 .It DragonFly -1.0, 1.1, 1.2, 1.3, 1.4, 1.5 +1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 1.8.1, 1.10, 1.12, 1.12.2, 2.0 .It Darwin -8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0, 8.5.0 +8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0, 8.5.0, 8.6.0, 8.7.0, 8.8.0, 8.9.0, +8.10.0, 8.11.0, 9.0.0, 9.1.0, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.6.0 .El .Ed .Pp @@ -1995,6 +1997,8 @@ X/Open .Pp .It Li \-susv2 .St -susv2 +.It Li \-susv3 +.St -susv3 .It Li \-svid4 .St -svid4 .It Li \-xbd5 @@ -4086,11 +4090,12 @@ Definitions used for all other devices. .It Pa mdoc.local Local additions and customizations. .It Pa andoc.tmac -This file checks whether the +Use this file if you don't know whether the .Nm \-mdoc or the .Nm \-man package should be used. +Multiple man pages (in either format) can be handled. .El . . From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 13:59:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75B03106566C; Fri, 15 Jan 2010 13:59:51 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60BCC8FC15; Fri, 15 Jan 2010 13:59:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FDxpDq091868; Fri, 15 Jan 2010 13:59:51 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FDxpfn091859; Fri, 15 Jan 2010 13:59:51 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151359.o0FDxpfn091859@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 13:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202358 - in head: contrib/groff/font/devutf8 contrib/groff/tmac gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 13:59:51 -0000 Author: ru Date: Fri Jan 15 13:59:50 2010 New Revision: 202358 URL: http://svn.freebsd.org/changeset/base/202358 Log: Pull up vendor changes. The following local changes made obsolete: - Addition of several FreeBSD versions. - r192561 that attempted to fix UTF-8 issues. Modified: head/contrib/groff/font/devutf8/R.proto head/contrib/groff/tmac/an-old.tmac head/contrib/groff/tmac/doc-common head/contrib/groff/tmac/doc-old.tmac head/contrib/groff/tmac/doc-syms head/contrib/groff/tmac/doc.tmac head/contrib/groff/tmac/groff_mdoc.man head/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: head/contrib/groff/ (props changed) Modified: head/contrib/groff/font/devutf8/R.proto ============================================================================== --- head/contrib/groff/font/devutf8/R.proto Fri Jan 15 13:48:29 2010 (r202357) +++ head/contrib/groff/font/devutf8/R.proto Fri Jan 15 13:59:50 2010 (r202358) @@ -726,7 +726,7 @@ st 24 0 0x220B product 24 0 0x220F coproduct 24 0 0x2210 sum 24 0 0x2211 -\- 24 0 0x002D +\- 24 0 0x2212 mi " -+ 24 0 0x2213 ** 24 0 0x2217 Modified: head/contrib/groff/tmac/an-old.tmac ============================================================================== --- head/contrib/groff/tmac/an-old.tmac Fri Jan 15 13:48:29 2010 (r202357) +++ head/contrib/groff/tmac/an-old.tmac Fri Jan 15 13:59:50 2010 (r202358) @@ -630,6 +630,18 @@ . hy \n[HY] .\} . +.\" For UTF-8, map some characters conservatively for the sake +.\" of easy cut and paste. +. +.if '\*[.T]'utf8' \{\ +. rchar \- - ' ` +. +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +. char ` \N'96' +.\} +. .\" Load local modifications. .mso man.local . Modified: head/contrib/groff/tmac/doc-common ============================================================================== --- head/contrib/groff/tmac/doc-common Fri Jan 15 13:48:29 2010 (r202357) +++ head/contrib/groff/tmac/doc-common Fri Jan 15 13:59:50 2010 (r202358) @@ -219,6 +219,7 @@ .\" NS doc-document-title .\" NS doc-section .\" NS doc-volume +.\" NS doc-command-name .\" NS .\" NS local variables: .\" NS doc-volume-as-XXX @@ -319,6 +320,7 @@ . ds doc-document-title UNTITLED . ds doc-volume LOCAL . ds doc-section Null +. ds doc-command-name . . if !"\$1"" \ . ds doc-document-title "\$1 @@ -357,6 +359,12 @@ . if !"\$3"" \ . if "\*[doc-volume]"LOCAL" \ . ds doc-volume \$3 +. +. if !\n[cR] \ +. if \n[nl] \{\ + . doc-setup-header +. bp +. \} .. . . @@ -379,6 +387,7 @@ .\" NS .\" NS modifies: .\" NS doc-operating-system +.\" NS doc-command-name .\" NS .\" NS local variables: .\" NS doc-operating-system-XXX-XXX @@ -435,9 +444,14 @@ .ds doc-operating-system-NetBSD-2.0 2.0 .ds doc-operating-system-NetBSD-2.0.1 2.0.1 .ds doc-operating-system-NetBSD-2.0.2 2.0.2 +.ds doc-operating-system-NetBSD-2.0.3 2.0.3 .ds doc-operating-system-NetBSD-2.1 2.1 .ds doc-operating-system-NetBSD-3.0 3.0 +.ds doc-operating-system-NetBSD-3.0.1 3.0.1 +.ds doc-operating-system-NetBSD-3.0.2 3.0.2 +.ds doc-operating-system-NetBSD-3.1 3.1 .ds doc-operating-system-NetBSD-4.0 4.0 +.ds doc-operating-system-NetBSD-4.0.1 4.0.1 . .ds doc-operating-system-FreeBSD-1.0 1.0 .ds doc-operating-system-FreeBSD-1.1 1.1 @@ -486,23 +500,48 @@ .ds doc-operating-system-FreeBSD-6.0 6.0 .ds doc-operating-system-FreeBSD-6.1 6.1 .ds doc-operating-system-FreeBSD-6.2 6.2 +.ds doc-operating-system-FreeBSD-6.3 6.3 +.ds doc-operating-system-FreeBSD-6.4 6.4 .ds doc-operating-system-FreeBSD-7.0 7.0 +.ds doc-operating-system-FreeBSD-7.1 7.1 . -.ds doc-operating-system-Darwin-8.0.0 8.0.0 -.ds doc-operating-system-Darwin-8.1.0 8.1.0 -.ds doc-operating-system-Darwin-8.2.0 8.2.0 -.ds doc-operating-system-Darwin-8.3.0 8.3.0 -.ds doc-operating-system-Darwin-8.4.0 8.4.0 -.ds doc-operating-system-Darwin-8.5.0 8.5.0 -. -.ds doc-operating-system-DragonFly-1.0 1.0 -.ds doc-operating-system-DragonFly-1.1 1.1 -.ds doc-operating-system-DragonFly-1.2 1.2 -.ds doc-operating-system-DragonFly-1.3 1.3 -.ds doc-operating-system-DragonFly-1.4 1.4 -.ds doc-operating-system-DragonFly-1.5 1.5 +.ds doc-operating-system-Darwin-8.0.0 8.0.0 +.ds doc-operating-system-Darwin-8.1.0 8.1.0 +.ds doc-operating-system-Darwin-8.2.0 8.2.0 +.ds doc-operating-system-Darwin-8.3.0 8.3.0 +.ds doc-operating-system-Darwin-8.4.0 8.4.0 +.ds doc-operating-system-Darwin-8.5.0 8.5.0 +.ds doc-operating-system-Darwin-8.6.0 8.6.0 +.ds doc-operating-system-Darwin-8.7.0 8.7.0 +.ds doc-operating-system-Darwin-8.8.0 8.8.0 +.ds doc-operating-system-Darwin-8.9.0 8.9.0 +.ds doc-operating-system-Darwin-8.10.0 8.10.0 +.ds doc-operating-system-Darwin-8.11.0 8.11.0 +.ds doc-operating-system-Darwin-9.0.0 9.0.0 +.ds doc-operating-system-Darwin-9.1.0 9.1.0 +.ds doc-operating-system-Darwin-9.2.0 9.2.0 +.ds doc-operating-system-Darwin-9.3.0 9.3.0 +.ds doc-operating-system-Darwin-9.4.0 9.4.0 +.ds doc-operating-system-Darwin-9.5.0 9.5.0 +.ds doc-operating-system-Darwin-9.6.0 9.6.0 +. +.ds doc-operating-system-DragonFly-1.0 1.0 +.ds doc-operating-system-DragonFly-1.1 1.1 +.ds doc-operating-system-DragonFly-1.2 1.2 +.ds doc-operating-system-DragonFly-1.3 1.3 +.ds doc-operating-system-DragonFly-1.4 1.4 +.ds doc-operating-system-DragonFly-1.5 1.5 +.ds doc-operating-system-DragonFly-1.6 1.6 +.ds doc-operating-system-DragonFly-1.8 1.8 +.ds doc-operating-system-DragonFly-1.8.1 1.8.1 +.ds doc-operating-system-DragonFly-1.10 1.10 +.ds doc-operating-system-DragonFly-1.12 1.12 +.ds doc-operating-system-DragonFly-1.12.2 1.12.2 +.ds doc-operating-system-DragonFly-2.0 2.0 . .de Os +. ds doc-command-name +. . ie "\$1"" \ . ds doc-operating-system "\*[doc-default-operating-system] . el \{ .ie "\$1"ATT" \{\ @@ -563,6 +602,7 @@ .\" NS .\" NS modifies: .\" NS doc-date-string +.\" NS doc-command-name .\" NS .\" NS local variables: .\" NS doc-date-XXX @@ -583,6 +623,8 @@ .ds doc-date-12 December . .de Dd +. ds doc-command-name +. . ie \n[.$] \{\ . ie (\n[.$] == 3) \ . ds doc-date-string \$1\~\$2 \$3 Modified: head/contrib/groff/tmac/doc-old.tmac ============================================================================== --- head/contrib/groff/tmac/doc-old.tmac Fri Jan 15 13:48:29 2010 (r202357) +++ head/contrib/groff/tmac/doc-old.tmac Fri Jan 15 13:59:50 2010 (r202358) @@ -40,7 +40,7 @@ .ds aD \fI .\" Argument Reference Style .ds aR \f(CO -.\" Interactive Comand Modifier (flag) +.\" Interactive Command Modifier (flag) .ds cM \f(CB .\" Emphasis (in the English sense - usually italics) .ds eM \fI Modified: head/contrib/groff/tmac/doc-syms ============================================================================== --- head/contrib/groff/tmac/doc-syms Fri Jan 15 13:48:29 2010 (r202357) +++ head/contrib/groff/tmac/doc-syms Fri Jan 15 13:59:50 2010 (r202358) @@ -651,6 +651,8 @@ .\" X/Open .ds doc-str-St--susv2 Version\~2 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification .as doc-str-St--susv2 " (\*[Lq]\*[doc-Tn-font-size]SUSv2\*[doc-str-St]\*[Rq]) +.ds doc-str-St--susv3 Version\~3 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification +.as doc-str-St--susv3 " (\*[Lq]\*[doc-Tn-font-size]SUSv3\*[doc-str-St]\*[Rq]) .ds doc-str-St--svid4 System\~V Interface Definition, Fourth Edition .as doc-str-St--svid4 " (\*[Lq]\*[doc-Tn-font-size]SVID\*[doc-str-St]\^4\*[Rq]) .ds doc-str-St--xbd5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] System Interface Definitions Issue\~5 Modified: head/contrib/groff/tmac/doc.tmac ============================================================================== --- head/contrib/groff/tmac/doc.tmac Fri Jan 15 13:48:29 2010 (r202357) +++ head/contrib/groff/tmac/doc.tmac Fri Jan 15 13:59:50 2010 (r202358) @@ -356,10 +356,10 @@ . ds doc-macro-name Fl . doc-parse-args \$@ . -. if !\n[.$] \{\ -. \" no arguments +. \" no arguments +. if !\n[.$] \ . nop \|\-\|\f[]\s[0] -. \}\} +. \} . . if !\n[doc-arg-limit] \ . return @@ -481,8 +481,8 @@ . el \{\ . nr doc-reg-dpr \n[doc-arg-ptr] . +. \" the `\%' prevents hyphenation on a dash (`-') . ie (\n[doc-reg-dpr1] == 2) \ -. \" the `\%' prevents hyphenation on a dash (`-') . nop \%\*[doc-str-dpr]\&\c . el \{\ . \" punctuation character @@ -595,10 +595,10 @@ . ds doc-macro-name Ar . doc-parse-args \$@ . -. if !\n[.$] \{\ -. \" no argument +. \" no argument +. if !\n[.$] \ . nop \)\*[doc-str-Ar-default]\&\f[]\s[0] -. \}\} +. \} . . if !\n[doc-arg-limit] \ . return @@ -1034,10 +1034,10 @@ . ds doc-macro-name Pa . doc-parse-args \$@ . -. if !\n[.$] \{\ -. \" default value +. \" default value +. if !\n[.$] \ . nop \*[doc-Pa-font]~\f[]\s[0] -. \}\} +. \} . . if !\n[doc-arg-limit] \ . return @@ -6425,6 +6425,19 @@ .blm doc-empty-line . . +.\" For UTF-8, map some characters conservatively for the sake +.\" of easy cut and paste. +. +.if '\*[.T]'utf8' \{\ +. rchar \- - ' ` +. +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +. char ` \N'96' +.\} +. +. .ec . . Modified: head/contrib/groff/tmac/groff_mdoc.man ============================================================================== --- head/contrib/groff/tmac/groff_mdoc.man Fri Jan 15 13:48:29 2010 (r202357) +++ head/contrib/groff/tmac/groff_mdoc.man Fri Jan 15 13:59:50 2010 (r202358) @@ -864,16 +864,18 @@ the release ID. .It NetBSD 0.8, 0.8a, 0.9, 0.9a, 1.0, 1.0a, 1.1, 1.2, 1.2a, 1.2b, 1.2c, 1.2d, 1.2e, 1.3, 1.3a, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.6.1, -1.6.2, 2.0, 2.0.1, 2.0.2, 2.1, 3.0 +1.6.2, 1.6.3, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.1, 3.0, 3.0.1, 3.0.2, 3.1, 4.0, +4.0.1 .It FreeBSD 1.0, 1.1, 1.1.5, 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.2, 2.2.1, 2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0, 4.1, 4.1.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.6.2, 4.7, 4.8, 4.9, 4.10, 4.11, 5.0, 5.1, -5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 7.0 +5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1 .It DragonFly -1.0, 1.1, 1.2, 1.3, 1.4, 1.5 +1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 1.8.1, 1.10, 1.12, 1.12.2, 2.0 .It Darwin -8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0, 8.5.0 +8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0, 8.5.0, 8.6.0, 8.7.0, 8.8.0, 8.9.0, +8.10.0, 8.11.0, 9.0.0, 9.1.0, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.6.0 .El .Ed .Pp @@ -1995,6 +1997,8 @@ X/Open .Pp .It Li \-susv2 .St -susv2 +.It Li \-susv3 +.St -susv3 .It Li \-svid4 .St -svid4 .It Li \-xbd5 @@ -4086,11 +4090,12 @@ Definitions used for all other devices. .It Pa mdoc.local Local additions and customizations. .It Pa andoc.tmac -This file checks whether the +Use this file if you don't know whether the .Nm \-mdoc or the .Nm \-man package should be used. +Multiple man pages (in either format) can be handled. .El . . Modified: head/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local Fri Jan 15 13:48:29 2010 (r202357) +++ head/gnu/usr.bin/groff/tmac/mdoc.local Fri Jan 15 13:59:50 2010 (r202358) @@ -69,9 +69,6 @@ .ds doc-default-operating-system FreeBSD\~9.0 . .\" FreeBSD releases not found in doc-common -.ds doc-operating-system-FreeBSD-6.3 6.3 -.ds doc-operating-system-FreeBSD-6.4 6.4 -.ds doc-operating-system-FreeBSD-7.1 7.1 .ds doc-operating-system-FreeBSD-7.2 7.2 .ds doc-operating-system-FreeBSD-7.3 7.3 .ds doc-operating-system-FreeBSD-8.0 8.0 From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 14:05:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E6E5106568F; Fri, 15 Jan 2010 14:05:07 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C0F58FC08; Fri, 15 Jan 2010 14:05:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FE5706093080; Fri, 15 Jan 2010 14:05:07 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FE57ap093077; Fri, 15 Jan 2010 14:05:07 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151405.o0FE57ap093077@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 14:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202359 - in head: contrib/groff/tmac gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 14:05:07 -0000 Author: ru Date: Fri Jan 15 14:05:06 2010 New Revision: 202359 URL: http://svn.freebsd.org/changeset/base/202359 Log: Moved the doc-str-Lb-libulog string definition to where it belongs. Modified: head/contrib/groff/tmac/doc-syms head/gnu/usr.bin/groff/tmac/mdoc.local Modified: head/contrib/groff/tmac/doc-syms ============================================================================== --- head/contrib/groff/tmac/doc-syms Fri Jan 15 13:59:50 2010 (r202358) +++ head/contrib/groff/tmac/doc-syms Fri Jan 15 14:05:06 2010 (r202359) @@ -779,7 +779,6 @@ .ds doc-str-Lb-librt \*[Px] \*[doc-str-Lb]Real-time Library (librt, \-lrt) .ds doc-str-Lb-libtermcap Termcap Access Library (libtermcap, \-ltermcap) .ds doc-str-Lb-libusbhid USB Human Interface Devices Library (libusbhid, \-lusbhid) -.ds doc-str-Lb-libulog User Login Record Library (libulog, \-lulog) .ds doc-str-Lb-libutil System Utilities Library (libutil, \-lutil) .ds doc-str-Lb-libx86_64 x86_64 Architecture Library (libx86_64, \-lx86_64) .ds doc-str-Lb-libz Compression Library (libz, \-lz) Modified: head/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local Fri Jan 15 13:59:50 2010 (r202358) +++ head/gnu/usr.bin/groff/tmac/mdoc.local Fri Jan 15 14:05:06 2010 (r202359) @@ -60,6 +60,7 @@ .ds doc-str-Lb-libthr 1:1 Threading Library (libthr, \-lthr) .ds doc-str-Lb-libufs UFS File System Access Library (libufs, \-lufs) .ds doc-str-Lb-libugidfw File System Firewall Interface Library (libugidfw, \-lugidfw) +.ds doc-str-Lb-libulog User Login Record Library (libulog, \-lulog) .ds doc-str-Lb-libvgl Video Graphics Library (libvgl, \-lvgl) . .\" FreeBSD architectures not found in doc-common From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 14:20:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2C8F106566C; Fri, 15 Jan 2010 14:20:01 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAA018FC0A; Fri, 15 Jan 2010 14:20:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FEK1RN096443; Fri, 15 Jan 2010 14:20:01 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FEK1n0096433; Fri, 15 Jan 2010 14:20:01 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151420.o0FEK1n0096433@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 14:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202360 - in stable/8: contrib/one-true-awk usr.bin/awk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 14:20:02 -0000 Author: ru Date: Fri Jan 15 14:20:01 2010 New Revision: 202360 URL: http://svn.freebsd.org/changeset/base/202360 Log: Update to a 26-Nov-2009 release. Deleted: stable/8/contrib/one-true-awk/mac.code stable/8/usr.bin/awk/b.c.diff stable/8/usr.bin/awk/main.c.diff stable/8/usr.bin/awk/run.c.diff Modified: stable/8/contrib/one-true-awk/FIXES stable/8/contrib/one-true-awk/b.c stable/8/contrib/one-true-awk/lib.c stable/8/contrib/one-true-awk/main.c stable/8/contrib/one-true-awk/makefile stable/8/contrib/one-true-awk/maketab.c stable/8/contrib/one-true-awk/proctab.c stable/8/contrib/one-true-awk/proto.h stable/8/contrib/one-true-awk/run.c stable/8/usr.bin/awk/Makefile Directory Properties: stable/8/contrib/one-true-awk/ (props changed) stable/8/usr.bin/awk/ (props changed) Modified: stable/8/contrib/one-true-awk/FIXES ============================================================================== --- stable/8/contrib/one-true-awk/FIXES Fri Jan 15 14:05:06 2010 (r202359) +++ stable/8/contrib/one-true-awk/FIXES Fri Jan 15 14:20:01 2010 (r202360) @@ -25,6 +25,23 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +Nov 26, 2009: + fixed a long-standing issue with when FS takes effect. a + change to FS is now noticed immediately for subsequent splits. + + changed the name getline() to awkgetline() to avoid yet another + name conflict somewhere. + +Feb 11, 2009: + temporarily for now defined HAS_ISBLANK, since that seems to + be the best way through the thicket. isblank arrived in C99, + but seems to be arriving at different systems at different + times. + +Oct 8, 2008: + fixed typo in b.c that set tmpvec wrongly. no one had ever + run into the problem, apparently. thanks to alistair crooks. + Oct 23, 2007: minor fix in lib.c: increase inputFS to 100, change malloc for fields to n+1. Modified: stable/8/contrib/one-true-awk/b.c ============================================================================== --- stable/8/contrib/one-true-awk/b.c Fri Jan 15 14:05:06 2010 (r202359) +++ stable/8/contrib/one-true-awk/b.c Fri Jan 15 14:20:01 2010 (r202360) @@ -24,6 +24,9 @@ THIS SOFTWARE. /* lasciate ogne speranza, voi ch'intrate. */ +#include +__FBSDID("$FreeBSD$"); + #define DEBUG #include @@ -285,9 +288,21 @@ int quoted(char **pp) /* pick up next th return c; } +static int collate_range_cmp(int a, int b) +{ + static char s[2][2]; + + if ((uschar)a == (uschar)b) + return 0; + s[0][0] = a; + s[1][0] = b; + return (strcoll(s[0], s[1])); +} + char *cclenter(const char *argp) /* add a character class */ { int i, c, c2; + int j; uschar *p = (uschar *) argp; uschar *op, *bp; static uschar *buf = 0; @@ -306,15 +321,18 @@ char *cclenter(const char *argp) /* add c2 = *p++; if (c2 == '\\') c2 = quoted((char **) &p); - if (c > c2) { /* empty; ignore */ + if (collate_range_cmp(c, c2) > 0) { bp--; i--; continue; } - while (c < c2) { + for (j = 0; j < NCHARS; j++) { + if ((collate_range_cmp(c, j) > 0) || + collate_range_cmp(j, c2) > 0) + continue; if (!adjbuf((char **) &buf, &bufsz, bp-buf+2, 100, (char **) &bp, "cclenter1")) FATAL("out of space for character class [%.10s...] 2", p); - *bp++ = ++c; + *bp++ = j; i++; } continue; @@ -731,6 +749,7 @@ Node *unary(Node *np) * to nelson beebe for the suggestion; let's see if it works everywhere. */ +/* #define HAS_ISBLANK */ #ifndef HAS_ISBLANK int (isblank)(int c) @@ -876,7 +895,7 @@ int cgoto(fa *f, int s, int c) if (q[j] >= maxsetvec) { maxsetvec *= 4; setvec = (int *) realloc(setvec, maxsetvec * sizeof(int)); - tmpset = (int *) realloc(setvec, maxsetvec * sizeof(int)); + tmpset = (int *) realloc(tmpset, maxsetvec * sizeof(int)); if (setvec == 0 || tmpset == 0) overflo("cgoto overflow"); } Modified: stable/8/contrib/one-true-awk/lib.c ============================================================================== --- stable/8/contrib/one-true-awk/lib.c Fri Jan 15 14:05:06 2010 (r202359) +++ stable/8/contrib/one-true-awk/lib.c Fri Jan 15 14:20:01 2010 (r202360) @@ -274,6 +274,7 @@ void fldbld(void) /* create fields from } fr = fields; i = 0; /* number of fields accumulated here */ + strcpy(inputFS, *FS); if (strlen(inputFS) > 1) { /* it's a regular expression */ i = refldbld(r, inputFS); } else if ((sep = *inputFS) == ' ') { /* default whitespace */ Modified: stable/8/contrib/one-true-awk/main.c ============================================================================== --- stable/8/contrib/one-true-awk/main.c Fri Jan 15 14:05:06 2010 (r202359) +++ stable/8/contrib/one-true-awk/main.c Fri Jan 15 14:20:01 2010 (r202360) @@ -22,7 +22,10 @@ ARISING OUT OF OR IN CONNECTION WITH THE THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20070501"; +#include +__FBSDID("$FreeBSD$"); + +const char *version = "version 20091126 (FreeBSD)"; #define DEBUG #include @@ -58,6 +61,7 @@ int main(int argc, char *argv[]) const char *fs = NULL; setlocale(LC_CTYPE, ""); + setlocale(LC_COLLATE, ""); setlocale(LC_NUMERIC, "C"); /* for parsing cmdline & prog */ cmdname = argv[0]; if (argc == 1) { @@ -86,13 +90,18 @@ int main(int argc, char *argv[]) safe = 1; break; case 'f': /* next argument is program filename */ - argc--; - argv++; - if (argc <= 1) - FATAL("no program filename"); - if (npfile >= MAX_PFILE - 1) - FATAL("too many -f options"); - pfile[npfile++] = argv[1]; + if (argv[1][2] != 0) { /* arg is -fsomething */ + if (npfile >= MAX_PFILE - 1) + FATAL("too many -f options"); + pfile[npfile++] = &argv[1][2]; + } else { /* arg is -f something */ + argc--; argv++; + if (argc <= 1) + FATAL("no program filename"); + if (npfile >= MAX_PFILE - 1) + FATAL("too many -f options"); + pfile[npfile++] = argv[1]; + } break; case 'F': /* set field separator */ if (argv[1][2] != 0) { /* arg is -Fsomething */ @@ -111,8 +120,14 @@ int main(int argc, char *argv[]) WARNING("field separator FS is empty"); break; case 'v': /* -v a=1 to be done NOW. one -v for each */ - if (argv[1][2] == '\0' && --argc > 1 && isclvar((++argv)[1])) - setclvar(argv[1]); + if (argv[1][2] != 0) { /* arg is -vsomething */ + if (argv[1][2] != 0) + setclvar(&argv[1][2]); + } else { /* arg is -v something */ + argc--; argv++; + if (argc > 1 && isclvar(argv[1])) + setclvar(argv[1]); + } break; case 'd': dbg = atoi(&argv[1][2]); Modified: stable/8/contrib/one-true-awk/makefile ============================================================================== --- stable/8/contrib/one-true-awk/makefile Fri Jan 15 14:05:06 2010 (r202359) +++ stable/8/contrib/one-true-awk/makefile Fri Jan 15 14:20:01 2010 (r202360) @@ -31,7 +31,6 @@ CC = gcc -fprofile-arcs -ftest-coverage CC = gcc -Wall -g CC = cc CC = gcc -O4 -CC = gcc -Wall -g YACC = bison -y Modified: stable/8/contrib/one-true-awk/maketab.c ============================================================================== --- stable/8/contrib/one-true-awk/maketab.c Fri Jan 15 14:05:06 2010 (r202359) +++ stable/8/contrib/one-true-awk/maketab.c Fri Jan 15 14:20:01 2010 (r202360) @@ -102,7 +102,7 @@ struct xx { CALL, "call", "call" }, { ARG, "arg", "arg" }, { VARNF, "getnf", "NF" }, - { GETLINE, "getline", "getline" }, + { GETLINE, "awkgetline", "getline" }, { 0, "", "" }, }; Modified: stable/8/contrib/one-true-awk/proctab.c ============================================================================== --- stable/8/contrib/one-true-awk/proctab.c Fri Jan 15 14:05:06 2010 (r202359) +++ stable/8/contrib/one-true-awk/proctab.c Fri Jan 15 14:20:01 2010 (r202360) @@ -180,7 +180,7 @@ Cell *(*proctab[93])(Node **, int) = { nullproc, /* NUMBER */ nullproc, /* STRING */ nullproc, /* REGEXPR */ - getline, /* GETLINE */ + awkgetline, /* GETLINE */ substr, /* SUBSTR */ split, /* SPLIT */ jump, /* RETURN */ Modified: stable/8/contrib/one-true-awk/proto.h ============================================================================== --- stable/8/contrib/one-true-awk/proto.h Fri Jan 15 14:05:06 2010 (r202359) +++ stable/8/contrib/one-true-awk/proto.h Fri Jan 15 14:20:01 2010 (r202360) @@ -149,7 +149,7 @@ extern Cell *call(Node **, int); extern Cell *copycell(Cell *); extern Cell *arg(Node **, int); extern Cell *jump(Node **, int); -extern Cell *getline(Node **, int); +extern Cell *awkgetline(Node **, int); extern Cell *getnf(Node **, int); extern Cell *array(Node **, int); extern Cell *awkdelete(Node **, int); Modified: stable/8/contrib/one-true-awk/run.c ============================================================================== --- stable/8/contrib/one-true-awk/run.c Fri Jan 15 14:05:06 2010 (r202359) +++ stable/8/contrib/one-true-awk/run.c Fri Jan 15 14:20:01 2010 (r202360) @@ -22,6 +22,9 @@ ARISING OUT OF OR IN CONNECTION WITH THE THIS SOFTWARE. ****************************************************************/ +#include +__FBSDID("$FreeBSD$"); + #define DEBUG #include #include @@ -388,7 +391,7 @@ Cell *jump(Node **a, int n) /* break, co return 0; /* not reached */ } -Cell *getline(Node **a, int n) /* get next line from specific input */ +Cell *awkgetline(Node **a, int n) /* get next line from specific input */ { /* a[0] is variable, a[1] is operator, a[2] is filename */ Cell *r, *x; extern Cell **fldtab; @@ -653,7 +656,7 @@ Cell *relop(Node **a, int n) /* a[0 < a[ j = x->fval - y->fval; i = j<0? -1: (j>0? 1: 0); } else { - i = strcmp(getsval(x), getsval(y)); + i = strcoll(getsval(x), getsval(y)); } tempfree(x); tempfree(y); @@ -1159,11 +1162,11 @@ Cell *cat(Node **a, int q) /* a[0] cat a x->sval, y->sval); strcpy(s, x->sval); strcpy(s+n1, y->sval); + tempfree(x); tempfree(y); z = gettemp(); z->sval = s; z->tval = STR; - tempfree(x); return(z); } Modified: stable/8/usr.bin/awk/Makefile ============================================================================== --- stable/8/usr.bin/awk/Makefile Fri Jan 15 14:05:06 2010 (r202359) +++ stable/8/usr.bin/awk/Makefile Fri Jan 15 14:20:01 2010 (r202360) @@ -8,6 +8,8 @@ SRCS= awkgram.y b.c lex.c lib.c main.c p CFLAGS+= -DHAS_ISBLANK -I. -I${AWKSRC} -DFOPEN_MAX=64 +WARNS?= 1 + DPADD= ${LIBM} LDADD= -lm @@ -25,10 +27,4 @@ proctab.c: maketab build-tools: maketab maketab: ytab.h ${AWKSRC}/maketab.c -.for f in b.c main.c run.c -${f}: ${AWKSRC}/${f} ${.CURDIR}/${f}.diff - patch -s -b .orig -o ${.TARGET} < ${.CURDIR}/${f}.diff ${AWKSRC}/${f} -CLEANFILES+= ${f} -.endfor - .include From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 14:24:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 211EB106566B; Fri, 15 Jan 2010 14:24:33 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE468FC12; Fri, 15 Jan 2010 14:24:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FEOWaw097484; Fri, 15 Jan 2010 14:24:32 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FEOWqj097481; Fri, 15 Jan 2010 14:24:32 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001151424.o0FEOWqj097481@svn.freebsd.org> From: Antoine Brodin Date: Fri, 15 Jan 2010 14:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202361 - in stable/8: etc/mtree share/examples X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 14:24:33 -0000 Author: antoine Date: Fri Jan 15 14:24:32 2010 New Revision: 202361 URL: http://svn.freebsd.org/changeset/base/202361 Log: MFC r200440 to stable/8: Install firmware(9) examples. Modified: stable/8/etc/mtree/BSD.usr.dist stable/8/share/examples/Makefile Directory Properties: stable/8/etc/ (props changed) stable/8/share/examples/ (props changed) Modified: stable/8/etc/mtree/BSD.usr.dist ============================================================================== --- stable/8/etc/mtree/BSD.usr.dist Fri Jan 15 14:20:01 2010 (r202360) +++ stable/8/etc/mtree/BSD.usr.dist Fri Jan 15 14:24:32 2010 (r202361) @@ -230,6 +230,12 @@ .. dyn_sysctl .. + firmware + fwconsumer + .. + fwimage + .. + .. syscall module .. Modified: stable/8/share/examples/Makefile ============================================================================== --- stable/8/share/examples/Makefile Fri Jan 15 14:20:01 2010 (r202360) +++ stable/8/share/examples/Makefile Fri Jan 15 14:24:32 2010 (r202361) @@ -88,6 +88,12 @@ XFILES= BSD_daemon/FreeBSD.pfa \ kld/dyn_sysctl/Makefile \ kld/dyn_sysctl/README \ kld/dyn_sysctl/dyn_sysctl.c \ + kld/firmware/Makefile \ + kld/firmware/README \ + kld/firmware/fwconsumer/Makefile \ + kld/firmware/fwconsumer/fw_consumer.c \ + kld/firmware/fwimage/Makefile \ + kld/firmware/fwimage/firmware.img \ kld/syscall/Makefile \ kld/syscall/module/Makefile \ kld/syscall/module/syscall.c \ From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 14:30:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9A781065670; Fri, 15 Jan 2010 14:30:20 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A68EB8FC28; Fri, 15 Jan 2010 14:30:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FEUKuT098783; Fri, 15 Jan 2010 14:30:20 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FEUKpR098780; Fri, 15 Jan 2010 14:30:20 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001151430.o0FEUKpR098780@svn.freebsd.org> From: Antoine Brodin Date: Fri, 15 Jan 2010 14:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202362 - in stable/7: etc/mtree share/examples X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 14:30:20 -0000 Author: antoine Date: Fri Jan 15 14:30:20 2010 New Revision: 202362 URL: http://svn.freebsd.org/changeset/base/202362 Log: MFC r200440 to stable/7: Install firmware(9) examples. Modified: stable/7/etc/mtree/BSD.usr.dist stable/7/share/examples/Makefile Directory Properties: stable/7/etc/ (props changed) stable/7/share/examples/ (props changed) Modified: stable/7/etc/mtree/BSD.usr.dist ============================================================================== --- stable/7/etc/mtree/BSD.usr.dist Fri Jan 15 14:24:32 2010 (r202361) +++ stable/7/etc/mtree/BSD.usr.dist Fri Jan 15 14:30:20 2010 (r202362) @@ -238,6 +238,12 @@ .. dyn_sysctl .. + firmware + fwconsumer + .. + fwimage + .. + .. syscall module .. Modified: stable/7/share/examples/Makefile ============================================================================== --- stable/7/share/examples/Makefile Fri Jan 15 14:24:32 2010 (r202361) +++ stable/7/share/examples/Makefile Fri Jan 15 14:30:20 2010 (r202362) @@ -118,6 +118,12 @@ XFILES= BSD_daemon/FreeBSD.pfa \ kld/dyn_sysctl/Makefile \ kld/dyn_sysctl/README \ kld/dyn_sysctl/dyn_sysctl.c \ + kld/firmware/Makefile \ + kld/firmware/README \ + kld/firmware/fwconsumer/Makefile \ + kld/firmware/fwconsumer/fw_consumer.c \ + kld/firmware/fwimage/Makefile \ + kld/firmware/fwimage/firmware.img \ kld/syscall/Makefile \ kld/syscall/module/Makefile \ kld/syscall/module/syscall.c \ From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 14:47:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54508106566B; Fri, 15 Jan 2010 14:47:28 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 425F28FC12; Fri, 15 Jan 2010 14:47:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FElSB7002761; Fri, 15 Jan 2010 14:47:28 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FElSto002759; Fri, 15 Jan 2010 14:47:28 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001151447.o0FElSto002759@svn.freebsd.org> From: Rui Paulo Date: Fri, 15 Jan 2010 14:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202363 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 14:47:28 -0000 Author: rpaulo Date: Fri Jan 15 14:47:26 2010 New Revision: 202363 URL: http://svn.freebsd.org/changeset/base/202363 Log: Open up the vendor import area. It's pointless to keep adding more and more regexps after we've used svn to import almost every external software FreeBSD uses. Modified: svnadmin/conf/paths Modified: svnadmin/conf/paths ============================================================================== --- svnadmin/conf/paths Fri Jan 15 14:30:20 2010 (r202362) +++ svnadmin/conf/paths Fri Jan 15 14:47:26 2010 (r202363) @@ -28,11 +28,11 @@ # Release engineering static snapshot tags. Magic is required here. ^release/ -# Vendor import work area. Not open until we're certain we're not reverting to cvs. -#^vendor/ -#^vendor-crypto/ -#^vendor-cddl/ -#^vendor-sys/ +# Vendor import work area. +^vendor/ +^vendor-crypto/ +^vendor-cddl/ +^vendor-sys/ # CVSROOT's new home ^svnadmin/conf/ @@ -44,46 +44,3 @@ # misc. ^ROADMAP.txt - -^vendor-crypto/openssh -^vendor-crypto/openssl - -^vendor-sys/acpica -^vendor-sys/ath -^vendor-sys/opensolaris -^vendor-sys/pf -^vendor-sys/x86emu - -^vendor/bind9 -^vendor/binutils -^vendor/bsnmp -^vendor/clang -^vendor/cpio -^vendor/ee -^vendor/expat -^vendor/file -^vendor/gdb -^vendor/gdtoa -^vendor/groff -^vendor/less -^vendor/libbegemot -^vendor/libpcap -^vendor/llvm -^vendor/ncurses -^vendor/netcat -^vendor/ntp -^vendor/one-true-awk -^vendor/openbsm -^vendor/openpam -^vendor/opensolaris -^vendor/pf -^vendor/resolver -^vendor/sendmail -^vendor/tcpdump -^vendor/tcsh -^vendor/top -^vendor/tzcode -^vendor/tzdata -^vendor/v4l -^vendor/wpa - From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 14:58:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BCBB1065679; Fri, 15 Jan 2010 14:58:20 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 390218FC22; Fri, 15 Jan 2010 14:58:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FEwKje005153; Fri, 15 Jan 2010 14:58:20 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FEwKsO005151; Fri, 15 Jan 2010 14:58:20 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201001151458.o0FEwKsO005151@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 15 Jan 2010 14:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202364 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 14:58:20 -0000 Author: netchild Date: Fri Jan 15 14:58:19 2010 New Revision: 202364 URL: http://svn.freebsd.org/changeset/base/202364 Log: This is v4l support for the linuxulator. This allows to access FreeBSD native devices which support the v4l API from processes running within the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd driver. Not tested is firmware upload, framebuffer stuff and video tuner stuff due to lack of hardware. The clipping part (VIDIOCSWIN) needs a little bit of further work (partly in progress, but can not be tested due to lack of a suitable device). The submitter tested this sucessfully with Skype and flash apps on amd64 and i386 with the multimedia/pwcbsd driver. Submitted by: J.R. Oldroyd Modified: head/sys/compat/linux/linux_ioctl.c Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Fri Jan 15 14:47:26 2010 (r202363) +++ head/sys/compat/linux/linux_ioctl.c Fri Jan 15 14:58:19 2010 (r202364) @@ -2624,7 +2624,6 @@ bsd_to_linux_v4l_tuner(struct video_tune return (0); } -#if 0 static int linux_to_bsd_v4l_clip(struct l_video_clip *lvc, struct video_clip *vc) { @@ -2635,7 +2634,6 @@ linux_to_bsd_v4l_clip(struct l_video_cli vc->next = PTRIN(lvc->next); /* possible pointer size conversion */ return (0); } -#endif static int linux_to_bsd_v4l_window(struct l_video_window *lvw, struct video_window *vw) @@ -2696,29 +2694,21 @@ linux_to_bsd_v4l_code(struct l_video_cod return (0); } -#if 0 static int -linux_v4l_cliplist_copy(struct l_video_window *lvw, struct video_window *vw) +linux_v4l_clip_copy(void *lvc, struct video_clip **ppvc) { + int error; struct video_clip vclip; struct l_video_clip l_vclip; - struct video_clip **ppvc; - struct l_video_clip *plvc; - int error; - ppvc = &(vw->clips); - for (plvc = (struct l_video_clip *) PTRIN(lvw->clips); - plvc != NULL; - plvc = (struct l_video_clip *) PTRIN(plvc->next)) { - error = copyin((void *) plvc, &l_vclip, sizeof(l_vclip)); - if (error) return (error); - linux_to_bsd_v4l_clip(&l_vclip, &vclip); - /* XXX: If there can be no concurrency: s/M_NOWAIT/M_WAITOK/ */ - if ((*ppvc = malloc(sizeof(**ppvc), M_LINUX, M_NOWAIT)) == NULL) - return (ENOMEM); /* XXX: linux has no ENOMEM here */ - memcpy(&vclip, *ppvc, sizeof(vclip)); - ppvc = &((*ppvc)->next); - } + error = copyin(lvc, &l_vclip, sizeof(l_vclip)); + if (error) return (error); + linux_to_bsd_v4l_clip(&l_vclip, &vclip); + /* XXX: If there can be no concurrency: s/M_NOWAIT/M_WAITOK/ */ + if ((*ppvc = malloc(sizeof(**ppvc), M_LINUX, M_NOWAIT)) == NULL) + return (ENOMEM); /* XXX: linux has no ENOMEM here */ + memcpy(&vclip, *ppvc, sizeof(vclip)); + (*ppvc)->next = NULL; return (0); } @@ -2734,7 +2724,71 @@ linux_v4l_cliplist_free(struct video_win } return (0); } -#endif + +static int +linux_v4l_cliplist_copy(struct l_video_window *lvw, struct video_window *vw) +{ + int error; + int clipcount; + void *plvc; + struct video_clip **ppvc; + + /* + * XXX: The cliplist is used to pass in a list of clipping + * rectangles or, if clipcount == VIDEO_CLIP_BITMAP, a + * clipping bitmap. Some Linux apps, however, appear to + * leave cliplist and clips uninitialized. In any case, + * the cliplist is not used by pwc(4), at the time of + * writing, FreeBSD's only V4L driver. When a driver + * that uses the cliplist is developed, this code may + * need re-examiniation. + */ + error = 0; + clipcount = vw->clipcount; + if (clipcount == VIDEO_CLIP_BITMAP) { + /* + * In this case, the pointer (clips) is overloaded + * to be a "void *" to a bitmap, therefore there + * is no struct video_clip to copy now. + */ + } else if (clipcount > 0 && clipcount <= 16384) { + /* + * Clips points to list of clip rectangles, so + * copy the list. + * + * XXX: Upper limit of 16384 was used here to try to + * avoid cases when clipcount and clips pointer + * are uninitialized and therefore have high random + * values, as is the case in the Linux Skype + * application. The value 16384 was chosen as that + * is what is used in the Linux stradis(4) MPEG + * decoder driver, the only place we found an + * example of cliplist use. + */ + plvc = PTRIN(lvw->clips); + ppvc = &(vw->clips); + while (clipcount-- > 0) { + if (plvc == 0) + error = EFAULT; + if (!error) + error = linux_v4l_clip_copy(plvc, ppvc); + if (error) { + linux_v4l_cliplist_free(vw); + break; + } + ppvc = &((*ppvc)->next); + plvc = PTRIN(((struct l_video_clip *) plvc)->next); + } + } else { + /* + * clipcount == 0 or negative (but not VIDEO_CLIP_BITMAP) + * Force cliplist to null. + */ + vw->clipcount = 0; + vw->clips = NULL; + } + return (error); +} static int linux_ioctl_v4l(struct thread *td, struct linux_ioctl_args *args) @@ -2805,21 +2859,14 @@ linux_ioctl_v4l(struct thread *td, struc return (error); } linux_to_bsd_v4l_window(&l_vwin, &vwin); -#if 0 - /* - * XXX: some Linux apps call SWIN but do not store valid - * values in clipcount or in the clips pointer. Until - * we have someone calling to support this, the code - * to handle the list of video_clip structures is removed. - */ error = linux_v4l_cliplist_copy(&l_vwin, &vwin); -#endif - if (!error) - error = fo_ioctl(fp, VIDIOCSWIN, &vwin, td->td_ucred, td); + if (error) { + fdrop(fp, td); + return (error); + } + error = fo_ioctl(fp, VIDIOCSWIN, &vwin, td->td_ucred, td); fdrop(fp, td); -#if 0 linux_v4l_cliplist_free(&vwin); -#endif return (error); case LINUX_VIDIOCGFBUF: From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:07:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9893A1065670; Fri, 15 Jan 2010 15:07:32 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85B048FC23; Fri, 15 Jan 2010 15:07:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FF7WNw007200; Fri, 15 Jan 2010 15:07:32 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FF7WZd007196; Fri, 15 Jan 2010 15:07:32 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151507.o0FF7WZd007196@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 15:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202365 - vendor/groff/dist/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:07:32 -0000 Author: ru Date: Fri Jan 15 15:07:32 2010 New Revision: 202365 URL: http://svn.freebsd.org/changeset/base/202365 Log: Cherry-pick unreleased vendor changes to mdoc: : 2009-10-26 Werner LEMBERG : : * tmac/doc-common (Dx): Define register. : : 2009-10-26 Jörg Sonnenberger : : Implement `%U' in mdoc for URL references. : : * tmac/doc-common (%U): New register. : (Rd): Handle `doc-url-count' and `doc-url-name'. : : * tmac/doc.tmac (doc-url-count, doc-url-name): New registers. : (doc-save-global-vars, doc-restore-global-vars, doc-reset-reference, : doc-print-reference): Handle `doc-url-count' and `doc-url-name'. : (%U): New macro. : : * NEWS, tmac/groff_mdoc.man: Document `%U' macro. : : 2009-04-01 Werner LEMBERG : : * tmac/doc.tmac: Call `ec' before mapping characters. Modified: vendor/groff/dist/tmac/doc-common vendor/groff/dist/tmac/doc.tmac vendor/groff/dist/tmac/groff_mdoc.man Modified: vendor/groff/dist/tmac/doc-common ============================================================================== --- vendor/groff/dist/tmac/doc-common Fri Jan 15 14:58:19 2010 (r202364) +++ vendor/groff/dist/tmac/doc-common Fri Jan 15 15:07:32 2010 (r202365) @@ -46,6 +46,7 @@ .nr %Q 1 .nr %R 1 .nr %T 1 +.nr %U 1 .nr %V 1 .nr Ac 3 .nr Ad 12n @@ -77,6 +78,7 @@ .nr Dq 12n .nr Ds 6n\" many manpages still use this as a -width value .nr Dv 12n +.nr Dx 1 .nr Ec 3 .nr Ef 8n\" ? .nr Ek 8n\" ? @@ -1170,6 +1172,8 @@ . tm doc-reference-title-count == \n[doc-reference-title-count] . tm doc-reference-title-name == `\*[doc-reference-title-name]' . tm doc-reference-title-name-for-book == `\*[doc-reference-title-name-for-book]' +. tm doc-url-count == \n[doc-url-count] +. tm doc-url-name == `\*[doc-url-name]' . tm doc-volume-count == \n[doc-volume-count] . tm doc-volume-name == `\*[doc-volume-name]' . tm doc-have-author == \n[doc-have-author] Modified: vendor/groff/dist/tmac/doc.tmac ============================================================================== --- vendor/groff/dist/tmac/doc.tmac Fri Jan 15 14:58:19 2010 (r202364) +++ vendor/groff/dist/tmac/doc.tmac Fri Jan 15 15:07:32 2010 (r202365) @@ -3430,6 +3430,8 @@ . nr doc-reference-title-count-saved \n[doc-reference-title-count] . ds doc-reference-title-name-saved "\*[doc-reference-title-name] . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book] +. nr doc-url-count-saved \n[doc-url-count] +. ds doc-url-name-saved "\*[doc-url-name] . nr doc-volume-count-saved \n[doc-volume-count] . ds doc-volume-name-saved "\*[doc-volume-name] . nr doc-have-author-saved \n[doc-have-author] @@ -3570,6 +3572,8 @@ . nr doc-reference-title-count \n[doc-reference-title-count-saved] . ds doc-reference-title-name "\*[doc-reference-title-name-saved] . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved] +. nr doc-url-count \n[doc-url-count-saved] +. ds doc-url-name "\*[doc-url-name-saved] . nr doc-volume-count \n[doc-volume-count-saved] . ds doc-volume-name "\*[doc-volume-name-saved] . nr doc-have-author \n[doc-have-author-saved] @@ -5194,6 +5198,8 @@ .\" NS doc-reference-title-name-for-book .\" NS doc-report-count .\" NS doc-report-name +.\" NS doc-url-count +.\" NS doc-url-name .\" NS doc-volume-count .\" NS doc-volume-name . @@ -5208,6 +5214,7 @@ . nr doc-corporate-count 0 . nr doc-report-count 0 . nr doc-reference-title-count 0 +. nr doc-url-count 0 . nr doc-volume-count 0 . nr doc-date-count 0 . nr doc-page-number-count 0 @@ -5222,6 +5229,7 @@ . ds doc-report-name . ds doc-reference-title-name . ds doc-reference-title-name-for-book +. ds doc-url-name . ds doc-volume-name . ds doc-date . ds doc-page-number-string @@ -5316,6 +5324,13 @@ . doc-finish-reference \n[doc-volume-count] . \} . +. if \n[doc-url-count] \{\ +. unformat doc-url-name +. chop doc-url-name +. nop \*[doc-url-name]\c +. doc-finish-reference \n[doc-url-count] +. \} +. . if \n[doc-page-number-count] \{\ . unformat doc-page-number-string . chop doc-page-number-string @@ -6019,6 +6034,18 @@ .. . . +.\" NS doc-url-count global register +.\" NS counter of hypertext references +. +.nr doc-url-count 0 +. +. +.\" NS doc-url-name global box +.\" NS string of collected hypertext references +. +.ds doc-url-name +. +. .\" NS doc-volume-count global register .\" NS counter of reference title references . @@ -6031,6 +6058,48 @@ .ds doc-volume-name . . +.\" NS %U user macro +.\" NS hypertext reference +.\" NS +.\" NS modifies: +.\" NS doc-arg-ptr +.\" NS doc-curr-font +.\" NS doc-curr-size +.\" NS doc-macro-name +.\" NS doc-reference-count +.\" NS doc-url-count +.\" NS +.\" NS local variables: +.\" NS doc-env-%U +.\" NS +.\" NS width register `%U' set in doc-common +. +.de %U +. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\ +. tm Usage: .%U URL ... (#\n[.c]) +. return +. \} +. +. nr doc-url-count +1 +. nr doc-reference-count +1 +. +. ds doc-macro-name %U +. doc-parse-args \$@ +. +. nr doc-arg-ptr +1 +. nr doc-curr-font \n[.f] +. nr doc-curr-size \n[.ps] +. +. \" append to reference box +. boxa doc-url-name +. ev doc-env-%U +. evc 0 +. in 0 +. nf +. doc-do-references +.. +. +. .\" NS %V user macro .\" NS reference volume .\" NS @@ -6039,7 +6108,7 @@ .\" NS doc-curr-font .\" NS doc-curr-size .\" NS doc-macro-name -.\" NS doc-reference-title-count +.\" NS doc-reference-count .\" NS doc-volume-count .\" NS .\" NS local variables: @@ -6425,6 +6494,9 @@ .blm doc-empty-line . . +.ec +. +. .\" For UTF-8, map some characters conservatively for the sake .\" of easy cut and paste. . @@ -6438,9 +6510,6 @@ .\} . . -.ec -. -. .\" load local modifications .mso mdoc.local . Modified: vendor/groff/dist/tmac/groff_mdoc.man ============================================================================== --- vendor/groff/dist/tmac/groff_mdoc.man Fri Jan 15 14:58:19 2010 (r202364) +++ vendor/groff/dist/tmac/groff_mdoc.man Fri Jan 15 15:07:32 2010 (r202365) @@ -2556,6 +2556,8 @@ Corporate or foreign author. Report name. .It Li .%T Title of article. +.It Li .%U +Optional hypertext reference. .It Li .%V Volume. .El From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:10:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 712EB106566B; Fri, 15 Jan 2010 15:10:29 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EABC8FC24; Fri, 15 Jan 2010 15:10:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFATED007908; Fri, 15 Jan 2010 15:10:29 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFATAW007904; Fri, 15 Jan 2010 15:10:29 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151510.o0FFATAW007904@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 15:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202366 - head/contrib/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:10:29 -0000 Author: ru Date: Fri Jan 15 15:10:29 2010 New Revision: 202366 URL: http://svn.freebsd.org/changeset/base/202366 Log: Pull up vendor changes. Modified: head/contrib/groff/tmac/doc-common head/contrib/groff/tmac/doc.tmac head/contrib/groff/tmac/groff_mdoc.man Directory Properties: head/contrib/groff/ (props changed) Modified: head/contrib/groff/tmac/doc-common ============================================================================== --- head/contrib/groff/tmac/doc-common Fri Jan 15 15:07:32 2010 (r202365) +++ head/contrib/groff/tmac/doc-common Fri Jan 15 15:10:29 2010 (r202366) @@ -46,6 +46,7 @@ .nr %Q 1 .nr %R 1 .nr %T 1 +.nr %U 1 .nr %V 1 .nr Ac 3 .nr Ad 12n @@ -77,6 +78,7 @@ .nr Dq 12n .nr Ds 6n\" many manpages still use this as a -width value .nr Dv 12n +.nr Dx 1 .nr Ec 3 .nr Ef 8n\" ? .nr Ek 8n\" ? @@ -1170,6 +1172,8 @@ . tm doc-reference-title-count == \n[doc-reference-title-count] . tm doc-reference-title-name == `\*[doc-reference-title-name]' . tm doc-reference-title-name-for-book == `\*[doc-reference-title-name-for-book]' +. tm doc-url-count == \n[doc-url-count] +. tm doc-url-name == `\*[doc-url-name]' . tm doc-volume-count == \n[doc-volume-count] . tm doc-volume-name == `\*[doc-volume-name]' . tm doc-have-author == \n[doc-have-author] Modified: head/contrib/groff/tmac/doc.tmac ============================================================================== --- head/contrib/groff/tmac/doc.tmac Fri Jan 15 15:07:32 2010 (r202365) +++ head/contrib/groff/tmac/doc.tmac Fri Jan 15 15:10:29 2010 (r202366) @@ -3430,6 +3430,8 @@ . nr doc-reference-title-count-saved \n[doc-reference-title-count] . ds doc-reference-title-name-saved "\*[doc-reference-title-name] . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book] +. nr doc-url-count-saved \n[doc-url-count] +. ds doc-url-name-saved "\*[doc-url-name] . nr doc-volume-count-saved \n[doc-volume-count] . ds doc-volume-name-saved "\*[doc-volume-name] . nr doc-have-author-saved \n[doc-have-author] @@ -3570,6 +3572,8 @@ . nr doc-reference-title-count \n[doc-reference-title-count-saved] . ds doc-reference-title-name "\*[doc-reference-title-name-saved] . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved] +. nr doc-url-count \n[doc-url-count-saved] +. ds doc-url-name "\*[doc-url-name-saved] . nr doc-volume-count \n[doc-volume-count-saved] . ds doc-volume-name "\*[doc-volume-name-saved] . nr doc-have-author \n[doc-have-author-saved] @@ -5194,6 +5198,8 @@ .\" NS doc-reference-title-name-for-book .\" NS doc-report-count .\" NS doc-report-name +.\" NS doc-url-count +.\" NS doc-url-name .\" NS doc-volume-count .\" NS doc-volume-name . @@ -5208,6 +5214,7 @@ . nr doc-corporate-count 0 . nr doc-report-count 0 . nr doc-reference-title-count 0 +. nr doc-url-count 0 . nr doc-volume-count 0 . nr doc-date-count 0 . nr doc-page-number-count 0 @@ -5222,6 +5229,7 @@ . ds doc-report-name . ds doc-reference-title-name . ds doc-reference-title-name-for-book +. ds doc-url-name . ds doc-volume-name . ds doc-date . ds doc-page-number-string @@ -5316,6 +5324,13 @@ . doc-finish-reference \n[doc-volume-count] . \} . +. if \n[doc-url-count] \{\ +. unformat doc-url-name +. chop doc-url-name +. nop \*[doc-url-name]\c +. doc-finish-reference \n[doc-url-count] +. \} +. . if \n[doc-page-number-count] \{\ . unformat doc-page-number-string . chop doc-page-number-string @@ -6019,6 +6034,18 @@ .. . . +.\" NS doc-url-count global register +.\" NS counter of hypertext references +. +.nr doc-url-count 0 +. +. +.\" NS doc-url-name global box +.\" NS string of collected hypertext references +. +.ds doc-url-name +. +. .\" NS doc-volume-count global register .\" NS counter of reference title references . @@ -6031,6 +6058,48 @@ .ds doc-volume-name . . +.\" NS %U user macro +.\" NS hypertext reference +.\" NS +.\" NS modifies: +.\" NS doc-arg-ptr +.\" NS doc-curr-font +.\" NS doc-curr-size +.\" NS doc-macro-name +.\" NS doc-reference-count +.\" NS doc-url-count +.\" NS +.\" NS local variables: +.\" NS doc-env-%U +.\" NS +.\" NS width register `%U' set in doc-common +. +.de %U +. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\ +. tm Usage: .%U URL ... (#\n[.c]) +. return +. \} +. +. nr doc-url-count +1 +. nr doc-reference-count +1 +. +. ds doc-macro-name %U +. doc-parse-args \$@ +. +. nr doc-arg-ptr +1 +. nr doc-curr-font \n[.f] +. nr doc-curr-size \n[.ps] +. +. \" append to reference box +. boxa doc-url-name +. ev doc-env-%U +. evc 0 +. in 0 +. nf +. doc-do-references +.. +. +. .\" NS %V user macro .\" NS reference volume .\" NS @@ -6039,7 +6108,7 @@ .\" NS doc-curr-font .\" NS doc-curr-size .\" NS doc-macro-name -.\" NS doc-reference-title-count +.\" NS doc-reference-count .\" NS doc-volume-count .\" NS .\" NS local variables: @@ -6425,6 +6494,9 @@ .blm doc-empty-line . . +.ec +. +. .\" For UTF-8, map some characters conservatively for the sake .\" of easy cut and paste. . @@ -6438,9 +6510,6 @@ .\} . . -.ec -. -. .\" load local modifications .mso mdoc.local . Modified: head/contrib/groff/tmac/groff_mdoc.man ============================================================================== --- head/contrib/groff/tmac/groff_mdoc.man Fri Jan 15 15:07:32 2010 (r202365) +++ head/contrib/groff/tmac/groff_mdoc.man Fri Jan 15 15:10:29 2010 (r202366) @@ -2556,6 +2556,8 @@ Corporate or foreign author. Report name. .It Li .%T Title of article. +.It Li .%U +Optional hypertext reference. .It Li .%V Volume. .El From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:16:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 639751065676; Fri, 15 Jan 2010 15:16:50 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3732A8FC12; Fri, 15 Jan 2010 15:16:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFGoJC009340; Fri, 15 Jan 2010 15:16:50 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFGod0009338; Fri, 15 Jan 2010 15:16:50 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151516.o0FFGod0009338@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202367 - stable/7/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:16:50 -0000 Author: marius Date: Fri Jan 15 15:16:49 2010 New Revision: 202367 URL: http://svn.freebsd.org/changeset/base/202367 Log: MFC: r177108 (partial) Suppress excessive output while netbooting via loader, unless debugging. Modified: stable/7/sys/boot/common/dev_net.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/common/dev_net.c ============================================================================== --- stable/7/sys/boot/common/dev_net.c Fri Jan 15 15:10:29 2010 (r202366) +++ stable/7/sys/boot/common/dev_net.c Fri Jan 15 15:16:49 2010 (r202367) @@ -245,7 +245,8 @@ net_getparams(sock) printf("net_open: bootparam/whoami RPC failed\n"); return (EIO); } - printf("net_open: client name: %s\n", hostname); + if (debug) + printf("net_open: client name: %s\n", hostname); /* * Ignore the gateway from whoami (unreliable). @@ -259,10 +260,11 @@ net_getparams(sock) } if (smask) { netmask = smask; - printf("net_open: subnet mask: %s\n", intoa(netmask)); + if (debug) + printf("net_open: subnet mask: %s\n", intoa(netmask)); } - if (gateip.s_addr) - printf("net_open: net gateway: %s\n", inet_ntoa(gateip)); + if (gateip.s_addr && debug) + printf("net_open: net gateway: %s\n", inet_ntoa(gateip)); /* Get the root server and pathname. */ if (bp_getfile(sock, "root", &rootip, rootpath)) { @@ -270,7 +272,7 @@ net_getparams(sock) return (EIO); } exit: - /* + /* * If present, strip the server's address off of the rootpath * before passing it along. This allows us to be compatible with * the kernel's diskless (BOOTP_NFSROOT) booting conventions @@ -285,8 +287,10 @@ net_getparams(sock) bcopy(&rootpath[i], &temp[0], strlen(&rootpath[i])+1); bcopy(&temp[0], &rootpath[0], strlen(&rootpath[i])+1); } - printf("net_open: server addr: %s\n", inet_ntoa(rootip)); - printf("net_open: server path: %s\n", rootpath); + if (debug) { + printf("net_open: server addr: %s\n", inet_ntoa(rootip)); + printf("net_open: server path: %s\n", rootpath); + } d = socktodesc(sock); sprintf(temp, "%6D", d->myea, ":"); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:23:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2374106568B; Fri, 15 Jan 2010 15:23:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE2038FC1F; Fri, 15 Jan 2010 15:23:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFNcp2010889; Fri, 15 Jan 2010 15:23:38 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFNcZJ010886; Fri, 15 Jan 2010 15:23:38 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151523.o0FFNcZJ010886@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202368 - stable/7/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:23:39 -0000 Author: marius Date: Fri Jan 15 15:23:38 2010 New Revision: 202368 URL: http://svn.freebsd.org/changeset/base/202368 Log: MFC: r182731 Show info about net devices in loader's 'lsdev' command. While there fix style. Modified: stable/7/sys/boot/common/dev_net.c stable/7/sys/boot/common/devopen.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/common/dev_net.c ============================================================================== --- stable/7/sys/boot/common/dev_net.c Fri Jan 15 15:16:49 2010 (r202367) +++ stable/7/sys/boot/common/dev_net.c Fri Jan 15 15:23:38 2010 (r202368) @@ -1,4 +1,4 @@ -/* +/* * $NetBSD: dev_net.c,v 1.12 1997/12/10 20:38:37 gwr Exp $ */ @@ -90,20 +90,21 @@ static void net_print(int); static int net_getparams(int sock); struct devsw netdev = { - "net", - DEVT_NET, - net_init, - net_strategy, - net_open, - net_close, - noioctl, - net_print + "net", + DEVT_NET, + net_init, + net_strategy, + net_open, + net_close, + noioctl, + net_print }; int net_init(void) { - return 0; + + return (0); } /* @@ -114,76 +115,75 @@ net_init(void) int net_open(struct open_file *f, ...) { - va_list args; - char *devname; /* Device part of file name (or NULL). */ - int error = 0; - - va_start(args, f); - devname = va_arg(args, char*); - va_end(args); - - /* On first open, do netif open, mount, etc. */ - if (netdev_opens == 0) { - /* Find network interface. */ - if (netdev_sock < 0) { - netdev_sock = netif_open(devname); - if (netdev_sock < 0) { - printf("net_open: netif_open() failed\n"); - return (ENXIO); - } - if (debug) - printf("net_open: netif_open() succeeded\n"); - } - if (rootip.s_addr == 0) { - /* Get root IP address, and path, etc. */ - error = net_getparams(netdev_sock); - if (error) { + va_list args; + char *devname; /* Device part of file name (or NULL). */ + int error = 0; + + va_start(args, f); + devname = va_arg(args, char*); + va_end(args); + + /* On first open, do netif open, mount, etc. */ + if (netdev_opens == 0) { + /* Find network interface. */ + if (netdev_sock < 0) { + netdev_sock = netif_open(devname); + if (netdev_sock < 0) { + printf("net_open: netif_open() failed\n"); + return (ENXIO); + } + if (debug) + printf("net_open: netif_open() succeeded\n"); + } + if (rootip.s_addr == 0) { + /* Get root IP address, and path, etc. */ + error = net_getparams(netdev_sock); + if (error) { /* getparams makes its own noise */ - netif_close(netdev_sock); - netdev_sock = -1; - return (error); - } + netif_close(netdev_sock); + netdev_sock = -1; + return (error); + } + } + netdev_opens++; } netdev_opens++; - } - netdev_opens++; - f->f_devdata = &netdev_sock; - return (error); + f->f_devdata = &netdev_sock; + return (error); } int -net_close(f) - struct open_file *f; +net_close(struct open_file *f) { - #ifdef NETIF_DEBUG - if (debug) - printf("net_close: opens=%d\n", netdev_opens); + if (debug) + printf("net_close: opens=%d\n", netdev_opens); #endif - /* On last close, do netif close, etc. */ - f->f_devdata = NULL; - /* Extra close call? */ - if (netdev_opens <= 0) + /* On last close, do netif close, etc. */ + f->f_devdata = NULL; + /* Extra close call? */ + if (netdev_opens <= 0) + return (0); + netdev_opens--; + /* Not last close? */ + if (netdev_opens > 0) + return(0); + rootip.s_addr = 0; + if (netdev_sock >= 0) { + if (debug) + printf("net_close: calling netif_close()\n"); + netif_close(netdev_sock); + netdev_sock = -1; + } return (0); - netdev_opens--; - /* Not last close? */ - if (netdev_opens > 0) - return(0); - rootip.s_addr = 0; - if (netdev_sock >= 0) { - if (debug) - printf("net_close: calling netif_close()\n"); - netif_close(netdev_sock); - netdev_sock = -1; - } - return (0); } int net_strategy() { - return EIO; + + return (EIO); } #define SUPPORT_BOOTP @@ -206,106 +206,118 @@ int try_bootp = 1; extern n_long ip_convertaddr(char *p); static int -net_getparams(sock) - int sock; +net_getparams(int sock) { - char buf[MAXHOSTNAMELEN]; - char temp[FNAME_SIZE]; - struct iodesc *d; - int i; - n_long smask; + char buf[MAXHOSTNAMELEN]; + char temp[FNAME_SIZE]; + struct iodesc *d; + int i; + n_long smask; #ifdef SUPPORT_BOOTP - /* - * Try to get boot info using BOOTP. If we succeed, then - * the server IP address, gateway, and root path will all - * be initialized. If any remain uninitialized, we will - * use RARP and RPC/bootparam (the Sun way) to get them. - */ - if (try_bootp) - bootp(sock, BOOTP_NONE); - if (myip.s_addr != 0) - goto exit; - if (debug) - printf("net_open: BOOTP failed, trying RARP/RPC...\n"); + /* + * Try to get boot info using BOOTP. If we succeed, then + * the server IP address, gateway, and root path will all + * be initialized. If any remain uninitialized, we will + * use RARP and RPC/bootparam (the Sun way) to get them. + */ + if (try_bootp) + bootp(sock, BOOTP_NONE); + if (myip.s_addr != 0) + goto exit; + if (debug) + printf("net_open: BOOTP failed, trying RARP/RPC...\n"); #endif - /* - * Use RARP to get our IP address. This also sets our - * netmask to the "natural" default for our address. - */ - if (rarp_getipaddress(sock)) { - printf("net_open: RARP failed\n"); - return (EIO); - } - printf("net_open: client addr: %s\n", inet_ntoa(myip)); + /* + * Use RARP to get our IP address. This also sets our + * netmask to the "natural" default for our address. + */ + if (rarp_getipaddress(sock)) { + printf("net_open: RARP failed\n"); + return (EIO); + } + printf("net_open: client addr: %s\n", inet_ntoa(myip)); - /* Get our hostname, server IP address, gateway. */ - if (bp_whoami(sock)) { - printf("net_open: bootparam/whoami RPC failed\n"); - return (EIO); - } - if (debug) - printf("net_open: client name: %s\n", hostname); - - /* - * Ignore the gateway from whoami (unreliable). - * Use the "gateway" parameter instead. - */ - smask = 0; - gateip.s_addr = 0; - if (bp_getfile(sock, "gateway", &gateip, buf) == 0) { - /* Got it! Parse the netmask. */ - smask = ip_convertaddr(buf); - } - if (smask) { - netmask = smask; - if (debug) - printf("net_open: subnet mask: %s\n", intoa(netmask)); - } - if (gateip.s_addr && debug) - printf("net_open: net gateway: %s\n", inet_ntoa(gateip)); - - /* Get the root server and pathname. */ - if (bp_getfile(sock, "root", &rootip, rootpath)) { - printf("net_open: bootparam/getfile RPC failed\n"); - return (EIO); - } - exit: - /* - * If present, strip the server's address off of the rootpath - * before passing it along. This allows us to be compatible with - * the kernel's diskless (BOOTP_NFSROOT) booting conventions - */ - for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) - if (rootpath[i] == ':') - break; - if (i && i != FNAME_SIZE && rootpath[i] == ':') { - rootpath[i++] = '\0'; - if (inet_addr(&rootpath[0]) != INADDR_NONE) - rootip.s_addr = inet_addr(&rootpath[0]); - bcopy(&rootpath[i], &temp[0], strlen(&rootpath[i])+1); - bcopy(&temp[0], &rootpath[0], strlen(&rootpath[i])+1); - } - if (debug) { - printf("net_open: server addr: %s\n", inet_ntoa(rootip)); - printf("net_open: server path: %s\n", rootpath); - } - - d = socktodesc(sock); - sprintf(temp, "%6D", d->myea, ":"); - setenv("boot.netif.ip", inet_ntoa(myip), 1); - setenv("boot.netif.netmask", intoa(netmask), 1); - setenv("boot.netif.gateway", inet_ntoa(gateip), 1); - setenv("boot.netif.hwaddr", temp, 1); - setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); - setenv("boot.nfsroot.path", rootpath, 1); + /* Get our hostname, server IP address, gateway. */ + if (bp_whoami(sock)) { + printf("net_open: bootparam/whoami RPC failed\n"); + return (EIO); + } + if (debug) + printf("net_open: client name: %s\n", hostname); + + /* + * Ignore the gateway from whoami (unreliable). + * Use the "gateway" parameter instead. + */ + smask = 0; + gateip.s_addr = 0; + if (bp_getfile(sock, "gateway", &gateip, buf) == 0) { + /* Got it! Parse the netmask. */ + smask = ip_convertaddr(buf); + } + if (smask) { + netmask = smask; + if (debug) + printf("net_open: subnet mask: %s\n", intoa(netmask)); + } + if (gateip.s_addr && debug) + printf("net_open: net gateway: %s\n", inet_ntoa(gateip)); - return (0); + /* Get the root server and pathname. */ + if (bp_getfile(sock, "root", &rootip, rootpath)) { + printf("net_open: bootparam/getfile RPC failed\n"); + return (EIO); + } +exit: + /* + * If present, strip the server's address off of the rootpath + * before passing it along. This allows us to be compatible with + * the kernel's diskless (BOOTP_NFSROOT) booting conventions + */ + for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) + if (rootpath[i] == ':') + break; + if (i && i != FNAME_SIZE && rootpath[i] == ':') { + rootpath[i++] = '\0'; + if (inet_addr(&rootpath[0]) != INADDR_NONE) + rootip.s_addr = inet_addr(&rootpath[0]); + bcopy(&rootpath[i], &temp[0], strlen(&rootpath[i])+1); + bcopy(&temp[0], &rootpath[0], strlen(&rootpath[i])+1); + } + if (debug) { + printf("net_open: server addr: %s\n", inet_ntoa(rootip)); + printf("net_open: server path: %s\n", rootpath); + } + + d = socktodesc(sock); + sprintf(temp, "%6D", d->myea, ":"); + setenv("boot.netif.ip", inet_ntoa(myip), 1); + setenv("boot.netif.netmask", intoa(netmask), 1); + setenv("boot.netif.gateway", inet_ntoa(gateip), 1); + setenv("boot.netif.hwaddr", temp, 1); + setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); + setenv("boot.nfsroot.path", rootpath, 1); + + return (0); } static void net_print(int verbose) { - return; + struct netif_driver *drv; + int i, d, cnt; + + cnt = 0; + for (d = 0; netif_drivers[d]; d++) { + drv = netif_drivers[d]; + for (i = 0; i < drv->netif_nifs; i++) { + printf("\t%s%d:", "net", cnt++); + if (verbose) + printf(" (%s%d)", drv->netif_bname, + drv->netif_ifs[i].dif_unit); + } + } + printf("\n"); } Modified: stable/7/sys/boot/common/devopen.c ============================================================================== --- stable/7/sys/boot/common/devopen.c Fri Jan 15 15:16:49 2010 (r202367) +++ stable/7/sys/boot/common/devopen.c Fri Jan 15 15:23:38 2010 (r202368) @@ -35,32 +35,33 @@ __FBSDID("$FreeBSD$"); int devopen(struct open_file *f, const char *fname, const char **file) { - struct devdesc *dev; - int result; + struct devdesc *dev; + int result; - result = archsw.arch_getdev((void **)&dev, fname, file); - if (result) - return (result); + result = archsw.arch_getdev((void **)&dev, fname, file); + if (result) + return (result); - /* point to device-specific data so that device open can use it */ - f->f_devdata = dev; - result = dev->d_dev->dv_open(f, dev); - if (result != 0) { - f->f_devdata = NULL; - free(dev); - return (result); - } + /* point to device-specific data so that device open can use it */ + f->f_devdata = dev; + result = dev->d_dev->dv_open(f, dev); + if (result != 0) { + f->f_devdata = NULL; + free(dev); + return (result); + } - /* reference the devsw entry from the open_file structure */ - f->f_dev = dev->d_dev; - return (0); + /* reference the devsw entry from the open_file structure */ + f->f_dev = dev->d_dev; + return (0); } int devclose(struct open_file *f) { - if (f->f_devdata != NULL) { - free(f->f_devdata); - } - return(0); + + if (f->f_devdata != NULL) { + free(f->f_devdata); + } + return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:26:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FB091065782; Fri, 15 Jan 2010 15:26:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0ECC8FC14; Fri, 15 Jan 2010 15:26:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFQ32O011481; Fri, 15 Jan 2010 15:26:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFQ3ig011479; Fri, 15 Jan 2010 15:26:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151526.o0FFQ3ig011479@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202369 - stable/7/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:26:04 -0000 Author: marius Date: Fri Jan 15 15:26:03 2010 New Revision: 202369 URL: http://svn.freebsd.org/changeset/base/202369 Log: MFC: r200945 - Consistently wrap debugging in NETIF_DEBUG. This basically merges NetBSD rev 1.19. - Make the functions match their prototypes regarding static. Modified: stable/7/sys/boot/common/dev_net.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/common/dev_net.c ============================================================================== --- stable/7/sys/boot/common/dev_net.c Fri Jan 15 15:23:38 2010 (r202368) +++ stable/7/sys/boot/common/dev_net.c Fri Jan 15 15:26:03 2010 (r202369) @@ -76,7 +76,9 @@ __FBSDID("$FreeBSD$"); #include "dev_net.h" #include "bootstrap.h" +#ifdef NETIF_DEBUG int debug = 0; +#endif static int netdev_sock = -1; static int netdev_opens; @@ -100,7 +102,7 @@ struct devsw netdev = { net_print }; -int +static int net_init(void) { @@ -112,7 +114,7 @@ net_init(void) * This opens the low-level device and sets f->f_devdata. * This is declared with variable arguments... */ -int +static int net_open(struct open_file *f, ...) { va_list args; @@ -132,8 +134,10 @@ net_open(struct open_file *f, ...) printf("net_open: netif_open() failed\n"); return (ENXIO); } +#ifdef NETIF_DEBUG if (debug) - printf("net_open: netif_open() succeeded\n"); + printf("net_open: netif_open() succeeded\n"); +#endif } if (rootip.s_addr == 0) { /* Get root IP address, and path, etc. */ @@ -152,7 +156,7 @@ net_open(struct open_file *f, ...) return (error); } -int +static int net_close(struct open_file *f) { #ifdef NETIF_DEBUG @@ -171,15 +175,17 @@ net_close(struct open_file *f) return(0); rootip.s_addr = 0; if (netdev_sock >= 0) { +#ifdef NETIF_DEBUG if (debug) printf("net_close: calling netif_close()\n"); +#endif netif_close(netdev_sock); netdev_sock = -1; } return (0); } -int +static int net_strategy() { @@ -225,9 +231,11 @@ net_getparams(int sock) bootp(sock, BOOTP_NONE); if (myip.s_addr != 0) goto exit; +#ifdef NETIF_DEBUG if (debug) printf("net_open: BOOTP failed, trying RARP/RPC...\n"); #endif +#endif /* * Use RARP to get our IP address. This also sets our @@ -244,8 +252,10 @@ net_getparams(int sock) printf("net_open: bootparam/whoami RPC failed\n"); return (EIO); } +#ifdef NETIF_DEBUG if (debug) printf("net_open: client name: %s\n", hostname); +#endif /* * Ignore the gateway from whoami (unreliable). @@ -259,11 +269,15 @@ net_getparams(int sock) } if (smask) { netmask = smask; +#ifdef NETIF_DEBUG if (debug) - printf("net_open: subnet mask: %s\n", intoa(netmask)); + printf("net_open: subnet mask: %s\n", intoa(netmask)); +#endif } +#ifdef NETIF_DEBUG if (gateip.s_addr && debug) printf("net_open: net gateway: %s\n", inet_ntoa(gateip)); +#endif /* Get the root server and pathname. */ if (bp_getfile(sock, "root", &rootip, rootpath)) { @@ -286,10 +300,12 @@ exit: bcopy(&rootpath[i], &temp[0], strlen(&rootpath[i])+1); bcopy(&temp[0], &rootpath[0], strlen(&rootpath[i])+1); } +#ifdef NETIF_DEBUG if (debug) { printf("net_open: server addr: %s\n", inet_ntoa(rootip)); printf("net_open: server path: %s\n", rootpath); } +#endif d = socktodesc(sock); sprintf(temp, "%6D", d->myea, ":"); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:27:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7658B1065693; Fri, 15 Jan 2010 15:27:17 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5788F8FC0A; Fri, 15 Jan 2010 15:27:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFRHId011823; Fri, 15 Jan 2010 15:27:17 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFRHAj011821; Fri, 15 Jan 2010 15:27:17 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151527.o0FFRHAj011821@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202370 - stable/8/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:27:17 -0000 Author: marius Date: Fri Jan 15 15:27:17 2010 New Revision: 202370 URL: http://svn.freebsd.org/changeset/base/202370 Log: MFC: r200945 - Consistently wrap debugging in NETIF_DEBUG. This basically merges NetBSD rev 1.19. - Make the functions match their prototypes regarding static. Modified: stable/8/sys/boot/common/dev_net.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/common/dev_net.c ============================================================================== --- stable/8/sys/boot/common/dev_net.c Fri Jan 15 15:26:03 2010 (r202369) +++ stable/8/sys/boot/common/dev_net.c Fri Jan 15 15:27:17 2010 (r202370) @@ -76,7 +76,9 @@ __FBSDID("$FreeBSD$"); #include "dev_net.h" #include "bootstrap.h" +#ifdef NETIF_DEBUG int debug = 0; +#endif static int netdev_sock = -1; static int netdev_opens; @@ -100,7 +102,7 @@ struct devsw netdev = { net_print }; -int +static int net_init(void) { @@ -112,7 +114,7 @@ net_init(void) * This opens the low-level device and sets f->f_devdata. * This is declared with variable arguments... */ -int +static int net_open(struct open_file *f, ...) { va_list args; @@ -132,8 +134,10 @@ net_open(struct open_file *f, ...) printf("net_open: netif_open() failed\n"); return (ENXIO); } +#ifdef NETIF_DEBUG if (debug) - printf("net_open: netif_open() succeeded\n"); + printf("net_open: netif_open() succeeded\n"); +#endif } if (rootip.s_addr == 0) { /* Get root IP address, and path, etc. */ @@ -154,7 +158,7 @@ net_open(struct open_file *f, ...) return (error); } -int +static int net_close(struct open_file *f) { #ifdef NETIF_DEBUG @@ -173,15 +177,17 @@ net_close(struct open_file *f) return(0); rootip.s_addr = 0; if (netdev_sock >= 0) { +#ifdef NETIF_DEBUG if (debug) printf("net_close: calling netif_close()\n"); +#endif netif_close(netdev_sock); netdev_sock = -1; } return (0); } -int +static int net_strategy() { @@ -227,9 +233,11 @@ net_getparams(int sock) bootp(sock, BOOTP_NONE); if (myip.s_addr != 0) goto exit; +#ifdef NETIF_DEBUG if (debug) printf("net_open: BOOTP failed, trying RARP/RPC...\n"); #endif +#endif /* * Use RARP to get our IP address. This also sets our @@ -246,8 +254,10 @@ net_getparams(int sock) printf("net_open: bootparam/whoami RPC failed\n"); return (EIO); } +#ifdef NETIF_DEBUG if (debug) printf("net_open: client name: %s\n", hostname); +#endif /* * Ignore the gateway from whoami (unreliable). @@ -261,11 +271,15 @@ net_getparams(int sock) } if (smask) { netmask = smask; +#ifdef NETIF_DEBUG if (debug) - printf("net_open: subnet mask: %s\n", intoa(netmask)); + printf("net_open: subnet mask: %s\n", intoa(netmask)); +#endif } +#ifdef NETIF_DEBUG if (gateip.s_addr && debug) printf("net_open: net gateway: %s\n", inet_ntoa(gateip)); +#endif /* Get the root server and pathname. */ if (bp_getfile(sock, "root", &rootip, rootpath)) { @@ -288,10 +302,12 @@ exit: bcopy(&rootpath[i], &temp[0], strlen(&rootpath[i])+1); bcopy(&temp[0], &rootpath[0], strlen(&rootpath[i])+1); } +#ifdef NETIF_DEBUG if (debug) { printf("net_open: server addr: %s\n", inet_ntoa(rootip)); printf("net_open: server path: %s\n", rootpath); } +#endif d = socktodesc(sock); sprintf(temp, "%6D", d->myea, ":"); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:28:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8141010656AE; Fri, 15 Jan 2010 15:28:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E9BB8FC14; Fri, 15 Jan 2010 15:28:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFSv4r012249; Fri, 15 Jan 2010 15:28:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFSvgC012247; Fri, 15 Jan 2010 15:28:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151528.o0FFSvgC012247@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202371 - stable/8/sys/boot/sparc64/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:28:57 -0000 Author: marius Date: Fri Jan 15 15:28:57 2010 New Revision: 202371 URL: http://svn.freebsd.org/changeset/base/202371 Log: MFC: r200946 Execute the cleanup handlers before jumping to the kernel just like the other architectures do. Modified: stable/8/sys/boot/sparc64/loader/main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/sparc64/loader/main.c ============================================================================== --- stable/8/sys/boot/sparc64/loader/main.c Fri Jan 15 15:27:17 2010 (r202370) +++ stable/8/sys/boot/sparc64/loader/main.c Fri Jan 15 15:28:57 2010 (r202371) @@ -386,6 +386,8 @@ __elfN(exec)(struct preloaded_file *fp) pmap_print_tlb_sun4u(); #endif + dev_cleanup(); + entry = e->e_entry; OF_release((void *)heapva, HEAPSZ); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:28:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73D6310656B3; Fri, 15 Jan 2010 15:28:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 613CB8FC16; Fri, 15 Jan 2010 15:28:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFSwM5012279; Fri, 15 Jan 2010 15:28:58 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFSw86012277; Fri, 15 Jan 2010 15:28:58 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151528.o0FFSw86012277@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202372 - stable/7/sys/boot/sparc64/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:28:58 -0000 Author: marius Date: Fri Jan 15 15:28:58 2010 New Revision: 202372 URL: http://svn.freebsd.org/changeset/base/202372 Log: MFC: r200946 Execute the cleanup handlers before jumping to the kernel just like the other architectures do. Modified: stable/7/sys/boot/sparc64/loader/main.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/sparc64/loader/main.c ============================================================================== --- stable/7/sys/boot/sparc64/loader/main.c Fri Jan 15 15:28:57 2010 (r202371) +++ stable/7/sys/boot/sparc64/loader/main.c Fri Jan 15 15:28:58 2010 (r202372) @@ -387,6 +387,8 @@ __elfN(exec)(struct preloaded_file *fp) pmap_print_tlb_sun4u(); #endif + dev_cleanup(); + entry = e->e_entry; OF_release((void *)heapva, HEAPSZ); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:36:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37AAD106566B for ; Fri, 15 Jan 2010 15:36:05 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id D0BCF8FC08 for ; Fri, 15 Jan 2010 15:36:04 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CF79.dip.t-dialin.net [217.226.207.121]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id C21918444CF for ; Fri, 15 Jan 2010 16:35:58 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 42E965A44D for ; Fri, 15 Jan 2010 16:35:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1263569755; bh=hs9g5cHAOLsLrOid7Fzjezu5IK9/Ac+3gMdPZgan7QI=; h=Message-ID:Date:From:To:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=dZyPdosTENrYQrgvZLcizGwLHZlKKE5aTn24573QpcE095yKr+J4YAceXRvSWQWT9 IGPFQlz6+dcF5450AXR5ycFDUBRSNgLjPkwec9s0dPQVhcCVGiuSQXojFroJpTZDJy Ax+mbacHnOYDIBXvfRFQyK2Dpu4FdM6vOc8Y/Hbb8ZxNi8ynvX8kl7gGXf/idP93rD CJZWM4iXMcg9KFm0NBcQHsE4GpVjwG4ss26Ydd5Hsal5e1uKiHskMq/3+dHAIZ6lSa hvsA7nOiHR7bViDUa0MZlr5U7z4s5NqDCFgQN4uBafHT1MMr8jMcBaM22AGJMQceX9 HCu4ppgclB+SA== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o0FFZsSU020155 for svn-src-all@freebsd.org; Fri, 15 Jan 2010 16:35:54 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 15 Jan 2010 16:35:54 +0100 Message-ID: <20100115163554.13391726rbwxezc0@webmail.leidinger.net> Date: Fri, 15 Jan 2010 16:35:54 +0100 From: Alexander Leidinger To: svn-src-all@freebsd.org References: <201001151458.o0FEwKsO005151@svn.freebsd.org> In-Reply-To: <201001151458.o0FEwKsO005151@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: C21918444CF.2DF23 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=0.937, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, MANGLED_AVOID 2.30, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1264174559.69685@CfeHzuXuWTg5ANVqFWA1og X-EBL-Spam-Status: No Subject: Re: svn commit: r202364 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:36:05 -0000 Quoting Alexander Leidinger (from Fri, 15 Jan 2010 14:58:20 +0000 (UTC)): > Author: netchild > Date: Fri Jan 15 14:58:19 2010 > New Revision: 202364 > URL: http://svn.freebsd.org/changeset/base/202364 > > Log: > This is v4l support for the linuxulator. This allows to access FreeBSD Ugh, this is the wrong commit log... here is the right one: ---snip--- Add video clipping support but with the caveats below. Background info: Video clipping allows the user to provide either a series of clip rectangles or a clip bitmap to the driver and have the driver mask the video according to the clipping specs provided. Adding support for clipping to the FreeBSD Linux emulator is problematic because it seems that this feature is not supported by many drivers and therefore it is ignored by many applications. Unfortunately, when not using it, rather than passing in a null clipping list, some apps leave the clipping fields uninitialized, casuing random values to be passed in. In the case where the driver does not use the clipping info, this is not a problem (although it is bad form). But the Linux emulator does not know which drivers will use this and which won't, so the Linux emulator must try to handle this clip list, and deal gracefully with cases where the values seem to be uninitialized. Video clipping info is passed in using the VIDIOCSWIN ioctl in two fields in the video_window structure: the integer clipcount and the pointer clips. How the linuxulator handles this from this commit on: * if (clipcount == VIDEO_CLIP_BITMAP) The clips variable is a void * pointer to a 128*625 byte (1024*625 bit) memory area containing a bitmap of the clipping area. The pointer in the video_window structure is copied, but no video_clip structures are copied. * if (clipcount > 0 && clipcount <= 16384) The clips variable is pointer to a list of video_clip structures. Up to clipcount structures are copied and passed to the driver. The upper limit of 16384 was imposed here so that user code that does not properly initialize clipcount falls through below and no attempt is made to copy an uninitialized list. This value was found by examining Linux drivers that support the clip list. * else The clipcount is either negative (but not VIDEO_CLIP_BITMAP), zero or positive (> 16384). All these cases are treated as invalid data. Both the clipcount field and clips pointer are forced to zero/NULL and passed to the driver. It should be noted that, at the time of developing this V4L emulator code, the pwc(4) V4L driver does not support clipping. Submitted by: J.R. Oldroyd ---snip--- And I think I will MFC this after 1 month... Bye, Alexander. -- Bowie's Theorem: If an experiment works, you must be using the wrong equipment. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:36:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2412A1065694; Fri, 15 Jan 2010 15:36:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 114FF8FC1B; Fri, 15 Jan 2010 15:36:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFaCaa013924; Fri, 15 Jan 2010 15:36:12 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFaCUY013922; Fri, 15 Jan 2010 15:36:12 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151536.o0FFaCUY013922@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:36:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202373 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:36:13 -0000 Author: marius Date: Fri Jan 15 15:36:12 2010 New Revision: 202373 URL: http://svn.freebsd.org/changeset/base/202373 Log: MFC: r200947 Add missing locking in intr_bind(). Modified: stable/8/sys/sparc64/sparc64/intr_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/intr_machdep.c Fri Jan 15 15:28:58 2010 (r202372) +++ stable/8/sys/sparc64/sparc64/intr_machdep.c Fri Jan 15 15:36:12 2010 (r202373) @@ -450,13 +450,19 @@ int intr_bind(int vec, u_char cpu) { struct intr_vector *iv; + int error; if (vec < 0 || vec >= IV_MAX) return (EINVAL); + sx_xlock(&intr_table_lock); iv = &intr_vectors[vec]; - if (iv == NULL) + if (iv == NULL) { + sx_xunlock(&intr_table_lock); return (EINVAL); - return (intr_event_bind(iv->iv_event, cpu)); + } + error = intr_event_bind(iv->iv_event, cpu); + sx_xunlock(&intr_table_lock); + return (error); } /* From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:36:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87F4D1065695; Fri, 15 Jan 2010 15:36:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 758B38FC31; Fri, 15 Jan 2010 15:36:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFaOGx013993; Fri, 15 Jan 2010 15:36:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFaO2v013991; Fri, 15 Jan 2010 15:36:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151536.o0FFaO2v013991@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202374 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:36:24 -0000 Author: marius Date: Fri Jan 15 15:36:24 2010 New Revision: 202374 URL: http://svn.freebsd.org/changeset/base/202374 Log: MFC: r200947 Add missing locking in intr_bind(). Modified: stable/7/sys/sparc64/sparc64/intr_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/intr_machdep.c Fri Jan 15 15:36:12 2010 (r202373) +++ stable/7/sys/sparc64/sparc64/intr_machdep.c Fri Jan 15 15:36:24 2010 (r202374) @@ -451,13 +451,19 @@ int intr_bind(int vec, u_char cpu) { struct intr_vector *iv; + int error; if (vec < 0 || vec >= IV_MAX) return (EINVAL); + sx_xlock(&intr_table_lock); iv = &intr_vectors[vec]; - if (iv == NULL) + if (iv == NULL) { + sx_xunlock(&intr_table_lock); return (EINVAL); - return (intr_event_bind(iv->iv_event, cpu)); + } + error = intr_event_bind(iv->iv_event, cpu); + sx_xunlock(&intr_table_lock); + return (error); } /* From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:37:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73942106568B; Fri, 15 Jan 2010 15:37:29 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CD0D8FC13; Fri, 15 Jan 2010 15:37:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFbTPs014311; Fri, 15 Jan 2010 15:37:29 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFbTow014291; Fri, 15 Jan 2010 15:37:29 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201001151537.o0FFbTow014291@svn.freebsd.org> From: Roman Divacky Date: Fri, 15 Jan 2010 15:37:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202375 - in vendor/llvm/dist: . autoconf cmake/modules docs include/llvm include/llvm-c include/llvm/ADT include/llvm/Analysis include/llvm/Bitcode include/llvm/CodeGen include/llvm/MC... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:37:29 -0000 Author: rdivacky Date: Fri Jan 15 15:37:28 2010 New Revision: 202375 URL: http://svn.freebsd.org/changeset/base/202375 Log: Update LLVM to 93512. Added: vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h vendor/llvm/dist/include/llvm/MC/MCParsedAsmOperand.h vendor/llvm/dist/lib/CodeGen/OptimizeExts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/ vendor/llvm/dist/lib/Transforms/InstCombine/CMakeLists.txt vendor/llvm/dist/lib/Transforms/InstCombine/InstCombine.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombinePHI.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineVectorOps.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineWorklist.h vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/InstCombine/Makefile vendor/llvm/dist/test/Assembler/functionlocal-metadata.ll vendor/llvm/dist/test/CodeGen/MSP430/shifts.ll vendor/llvm/dist/test/CodeGen/SystemZ/2010-01-04-DivMem.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-01-06-TailDuplicateLabels.ll vendor/llvm/dist/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-05-ZExt-Shl.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-07-ISelBug.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-07-UAMemFeature.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-08-Atomic64Bug.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-11-ExtraPHIArg.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-13-OptExtBug.ll vendor/llvm/dist/test/CodeGen/X86/3addr-or.ll vendor/llvm/dist/test/CodeGen/X86/addr-label-difference.ll vendor/llvm/dist/test/CodeGen/X86/br-fold.ll vendor/llvm/dist/test/CodeGen/X86/brcond.ll vendor/llvm/dist/test/CodeGen/X86/remat-mov-0.ll vendor/llvm/dist/test/CodeGen/X86/sext-subreg.ll vendor/llvm/dist/test/CodeGen/X86/tailcall-largecode.ll vendor/llvm/dist/test/CodeGen/X86/twoaddr-lea.ll vendor/llvm/dist/test/CodeGen/X86/use-add-flags.ll vendor/llvm/dist/test/CodeGen/X86/vec_cast.ll vendor/llvm/dist/test/CodeGen/X86/xor-icmp.ll vendor/llvm/dist/test/DebugInfo/2010-01-05-DbgScope.ll vendor/llvm/dist/test/ExecutionEngine/2010-01-15-UndefValue.ll vendor/llvm/dist/test/FrontendC/2010-01-05-LinkageName.c vendor/llvm/dist/test/FrontendC/2010-01-13-MemBarrier.c vendor/llvm/dist/test/FrontendC/2010-01-14-FnType-DebugInfo.c vendor/llvm/dist/test/FrontendC/2010-01-14-StaticVariable.c vendor/llvm/dist/test/TableGen/eq.td vendor/llvm/dist/test/Transforms/GlobalOpt/crash.ll vendor/llvm/dist/test/Transforms/InstCombine/fsub-fadd.ll vendor/llvm/dist/test/Transforms/InstCombine/load-cmp.ll vendor/llvm/dist/test/Transforms/Reassociate/crash.ll vendor/llvm/dist/unittests/ADT/BitVectorTest.cpp vendor/llvm/dist/unittests/ADT/SmallBitVectorTest.cpp Deleted: vendor/llvm/dist/lib/Transforms/Instrumentation/BlockProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/RSProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/RSProfiling.h vendor/llvm/dist/lib/Transforms/Scalar/InstructionCombining.cpp vendor/llvm/dist/test/CodeGen/X86/anyext-uses.ll vendor/llvm/dist/test/CodeGen/X86/brcond-srl.ll vendor/llvm/dist/test/DebugInfo/2009-12-01-CurrentFn.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2007-01-08-X86-64-Pointer.ll vendor/llvm/dist/test/Transforms/InstCombine/cast-and-cast.ll vendor/llvm/dist/test/Transforms/InstCombine/cast-cast-to-and.ll vendor/llvm/dist/test/Transforms/InstCombine/cast-load-gep.ll vendor/llvm/dist/test/Transforms/InstCombine/cast-propagate.ll vendor/llvm/dist/test/Transforms/InstCombine/cast-sext-zext.ll vendor/llvm/dist/test/Transforms/InstCombine/cast2.ll vendor/llvm/dist/test/Transforms/InstCombine/cast3.ll vendor/llvm/dist/test/Transforms/InstCombine/cast_ld_addr_space.ll vendor/llvm/dist/test/Transforms/InstCombine/setcc-cast-cast.ll vendor/llvm/dist/test/Transforms/LICM/licm_preserve_dbginfo.ll Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/LICENSE.TXT vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/CodeGenerator.html vendor/llvm/dist/docs/LangRef.html vendor/llvm/dist/docs/ProgrammersManual.html vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/docs/SourceLevelDebugging.html vendor/llvm/dist/docs/TableGenFundamentals.html vendor/llvm/dist/include/llvm-c/Analysis.h vendor/llvm/dist/include/llvm-c/BitReader.h vendor/llvm/dist/include/llvm-c/Core.h vendor/llvm/dist/include/llvm-c/ExecutionEngine.h vendor/llvm/dist/include/llvm-c/Target.h vendor/llvm/dist/include/llvm/ADT/BitVector.h vendor/llvm/dist/include/llvm/ADT/StringExtras.h vendor/llvm/dist/include/llvm/ADT/StringRef.h vendor/llvm/dist/include/llvm/ADT/Twine.h vendor/llvm/dist/include/llvm/Analysis/AliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/DominatorInternals.h vendor/llvm/dist/include/llvm/Analysis/Dominators.h vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h vendor/llvm/dist/include/llvm/Analysis/PostDominators.h vendor/llvm/dist/include/llvm/Attributes.h vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h vendor/llvm/dist/include/llvm/CodeGen/DAGISelHeader.h vendor/llvm/dist/include/llvm/CodeGen/FastISel.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBuilder.h vendor/llvm/dist/include/llvm/CodeGen/MachineLoopInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/CodeGen/ValueTypes.h vendor/llvm/dist/include/llvm/IntrinsicInst.h vendor/llvm/dist/include/llvm/Intrinsics.td vendor/llvm/dist/include/llvm/LinkAllPasses.h vendor/llvm/dist/include/llvm/MC/MCAsmLexer.h vendor/llvm/dist/include/llvm/MC/MCSymbol.h vendor/llvm/dist/include/llvm/Metadata.h vendor/llvm/dist/include/llvm/Module.h vendor/llvm/dist/include/llvm/Support/CFG.h vendor/llvm/dist/include/llvm/Support/FormattedStream.h vendor/llvm/dist/include/llvm/Support/Mangler.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Support/PatternMatch.h vendor/llvm/dist/include/llvm/Target/Target.td vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetLoweringObjectFile.h vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Target/TargetSelectionDAG.td vendor/llvm/dist/include/llvm/Transforms/Instrumentation.h vendor/llvm/dist/include/llvm/Transforms/Utils/BasicBlockUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/include/llvm/Type.h vendor/llvm/dist/include/llvm/ValueSymbolTable.h vendor/llvm/dist/lib/Analysis/AliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/Analysis.cpp vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/DbgInfoPrinter.cpp vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/IVUsers.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/LoopInfo.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.h vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/DeadMachineInstructionElim.cpp vendor/llvm/dist/lib/CodeGen/ELFCodeEmitter.cpp vendor/llvm/dist/lib/CodeGen/ELFWriter.cpp vendor/llvm/dist/lib/CodeGen/ExactHazardRecognizer.cpp vendor/llvm/dist/lib/CodeGen/GCMetadata.cpp vendor/llvm/dist/lib/CodeGen/GCStrategy.cpp vendor/llvm/dist/lib/CodeGen/IfConversion.cpp vendor/llvm/dist/lib/CodeGen/IntrinsicLowering.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp vendor/llvm/dist/lib/CodeGen/LowerSubregs.cpp vendor/llvm/dist/lib/CodeGen/MachOWriter.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/MachineLoopInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineSSAUpdater.cpp vendor/llvm/dist/lib/CodeGen/MachineSink.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/PBQP/AnnotatedGraph.h vendor/llvm/dist/lib/CodeGen/PBQP/ExhaustiveSolver.h vendor/llvm/dist/lib/CodeGen/PBQP/GraphBase.h vendor/llvm/dist/lib/CodeGen/PBQP/HeuristicSolver.h vendor/llvm/dist/lib/CodeGen/PBQP/Heuristics/Briggs.h vendor/llvm/dist/lib/CodeGen/PBQP/PBQPMath.h vendor/llvm/dist/lib/CodeGen/PBQP/SimpleGraph.h vendor/llvm/dist/lib/CodeGen/PBQP/Solution.h vendor/llvm/dist/lib/CodeGen/PBQP/Solver.h vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp vendor/llvm/dist/lib/CodeGen/PreAllocSplitting.cpp vendor/llvm/dist/lib/CodeGen/ProcessImplicitDefs.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLocal.cpp vendor/llvm/dist/lib/CodeGen/RegAllocPBQP.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/CallingConvLower.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/ShrinkWrapping.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp vendor/llvm/dist/lib/CodeGen/SjLjEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp vendor/llvm/dist/lib/CodeGen/Spiller.cpp vendor/llvm/dist/lib/CodeGen/StackProtector.cpp vendor/llvm/dist/lib/CodeGen/StackSlotColoring.cpp vendor/llvm/dist/lib/CodeGen/StrongPHIElimination.cpp vendor/llvm/dist/lib/CodeGen/TailDuplication.cpp vendor/llvm/dist/lib/CodeGen/TargetInstrInfoImpl.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/VirtRegMap.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngineBindings.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Execution.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITMemoryManager.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp vendor/llvm/dist/lib/Linker/LinkModules.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCInst.cpp vendor/llvm/dist/lib/MC/MCSectionELF.cpp vendor/llvm/dist/lib/MC/MCSymbol.cpp vendor/llvm/dist/lib/MC/MCValue.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/ConstantRange.cpp vendor/llvm/dist/lib/Support/ErrorHandling.cpp vendor/llvm/dist/lib/Support/FormattedStream.cpp vendor/llvm/dist/lib/Support/Statistic.cpp vendor/llvm/dist/lib/Support/StringExtras.cpp vendor/llvm/dist/lib/Support/StringRef.cpp vendor/llvm/dist/lib/Support/Timer.cpp vendor/llvm/dist/lib/Support/Twine.cpp vendor/llvm/dist/lib/System/Win32/DynamicLibrary.inc vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.td vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/CBackend/CBackend.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16ISelDAGToDAG.h vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCJITInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCMCAsmInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/README.txt vendor/llvm/dist/lib/Target/README.txt vendor/llvm/dist/lib/Target/Sparc/SparcISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/SubtargetFeature.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Target.cpp vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/README-SSE.txt vendor/llvm/dist/lib/Target/X86/README.txt vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86CodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86Instr64bit.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86JITInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/XCore/XCoreISelDAGToDAG.cpp vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/DeadArgumentElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/FunctionAttrs.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/Internalize.cpp vendor/llvm/dist/lib/Transforms/IPO/MergeFunctions.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/StructRetPromotion.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/ProfilingUtils.cpp vendor/llvm/dist/lib/Transforms/Makefile vendor/llvm/dist/lib/Transforms/Scalar/ABCD.cpp vendor/llvm/dist/lib/Transforms/Scalar/ADCE.cpp vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp vendor/llvm/dist/lib/Transforms/Scalar/DeadStoreElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIndexSplit.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailDuplication.cpp vendor/llvm/dist/lib/Transforms/Utils/AddrModeMatcher.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicInliner.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneLoop.cpp vendor/llvm/dist/lib/Transforms/Utils/CodeExtractor.cpp vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/InstructionNamer.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerInvoke.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerSwitch.cpp vendor/llvm/dist/lib/Transforms/Utils/PromoteMemoryToRegister.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/Transforms/Utils/SSI.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/Attributes.cpp vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp vendor/llvm/dist/lib/VMCore/ConstantFold.cpp vendor/llvm/dist/lib/VMCore/Constants.cpp vendor/llvm/dist/lib/VMCore/ConstantsContext.h vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/Function.cpp vendor/llvm/dist/lib/VMCore/InlineAsm.cpp vendor/llvm/dist/lib/VMCore/Instruction.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/lib/VMCore/IntrinsicInst.cpp vendor/llvm/dist/lib/VMCore/Mangler.cpp vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Module.cpp vendor/llvm/dist/lib/VMCore/Pass.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/PrintModulePass.cpp vendor/llvm/dist/lib/VMCore/Type.cpp vendor/llvm/dist/lib/VMCore/TypeSymbolTable.cpp vendor/llvm/dist/lib/VMCore/TypesContext.h vendor/llvm/dist/lib/VMCore/Value.cpp vendor/llvm/dist/lib/VMCore/ValueSymbolTable.cpp vendor/llvm/dist/lib/VMCore/Verifier.cpp vendor/llvm/dist/runtime/libprofile/exported_symbols.lst vendor/llvm/dist/test/Analysis/BasicAA/2007-11-05-SizeCrash.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2007-08-06-Unsigned.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-11-18-LessThanOrEqual.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-11-18-Stride1.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/avoid-smax-0.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/max-trip-count.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw-offset.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sext-inreg.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sext-iv-0.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sext-iv-1.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sext-iv-2.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count3.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count7.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count8.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/zext-wrap.ll vendor/llvm/dist/test/Assembler/vector-cmp.ll vendor/llvm/dist/test/CodeGen/ARM/indirectbr.ll vendor/llvm/dist/test/CodeGen/ARM/private.ll vendor/llvm/dist/test/CodeGen/ARM/tail-opts.ll vendor/llvm/dist/test/CodeGen/Alpha/private.ll vendor/llvm/dist/test/CodeGen/Blackfin/2009-08-15-SetCC-Undef.ll vendor/llvm/dist/test/CodeGen/Blackfin/ct32.ll vendor/llvm/dist/test/CodeGen/Blackfin/ct64.ll vendor/llvm/dist/test/CodeGen/Blackfin/ctlz16.ll vendor/llvm/dist/test/CodeGen/Blackfin/ctpop16.ll vendor/llvm/dist/test/CodeGen/Blackfin/cttz16.ll vendor/llvm/dist/test/CodeGen/Blackfin/promote-logic.ll vendor/llvm/dist/test/CodeGen/CellSPU/dp_farith.ll vendor/llvm/dist/test/CodeGen/CellSPU/mul_ops.ll vendor/llvm/dist/test/CodeGen/CellSPU/private.ll vendor/llvm/dist/test/CodeGen/Generic/2009-03-29-SoftFloatVectorExtract.ll vendor/llvm/dist/test/CodeGen/Generic/2009-04-28-i128-cmp-crash.ll vendor/llvm/dist/test/CodeGen/MSP430/bit.ll vendor/llvm/dist/test/CodeGen/MSP430/setcc.ll vendor/llvm/dist/test/CodeGen/Mips/private.ll vendor/llvm/dist/test/CodeGen/PowerPC/indirectbr.ll vendor/llvm/dist/test/CodeGen/PowerPC/private.ll vendor/llvm/dist/test/CodeGen/SPARC/private.ll vendor/llvm/dist/test/CodeGen/SystemZ/2009-06-02-Rotate.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-add.ll vendor/llvm/dist/test/CodeGen/X86/2006-05-11-InstrSched.ll vendor/llvm/dist/test/CodeGen/X86/2007-02-04-OrAddrMode.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-26-MachineLICMBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-05-23-dagcombine-shifts.ll vendor/llvm/dist/test/CodeGen/X86/2009-11-16-MachineLICM.ll vendor/llvm/dist/test/CodeGen/X86/and-su.ll vendor/llvm/dist/test/CodeGen/X86/darwin-bzero.ll vendor/llvm/dist/test/CodeGen/X86/extractelement-shuffle.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/fold-load.ll vendor/llvm/dist/test/CodeGen/X86/lsr-sort.ll vendor/llvm/dist/test/CodeGen/X86/mul-legalize.ll vendor/llvm/dist/test/CodeGen/X86/private.ll vendor/llvm/dist/test/CodeGen/X86/stack-color-with-reg.ll vendor/llvm/dist/test/CodeGen/X86/stride-nine-with-base-reg.ll vendor/llvm/dist/test/CodeGen/X86/tail-opts.ll vendor/llvm/dist/test/CodeGen/X86/test-nofold.ll vendor/llvm/dist/test/CodeGen/X86/vec_ext_inreg.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-22.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-25.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-26.ll vendor/llvm/dist/test/CodeGen/X86/widen_select-1.ll vendor/llvm/dist/test/CodeGen/X86/widen_shuffle-1.ll vendor/llvm/dist/test/CodeGen/X86/widen_shuffle-2.ll vendor/llvm/dist/test/CodeGen/X86/x86-64-and-mask.ll vendor/llvm/dist/test/CodeGen/X86/x86-64-jumps.ll vendor/llvm/dist/test/CodeGen/XCore/2009-03-27-v2f64-param.ll vendor/llvm/dist/test/CodeGen/XCore/private.ll vendor/llvm/dist/test/DebugInfo/2009-10-16-Scope.ll vendor/llvm/dist/test/DebugInfo/printdbginfo2.ll vendor/llvm/dist/test/Feature/NamedMDNode.ll vendor/llvm/dist/test/FrontendC/cstring-align.c vendor/llvm/dist/test/Integer/BitPacked.ll vendor/llvm/dist/test/Integer/packed_bt.ll vendor/llvm/dist/test/Integer/testvarargs_bt.ll vendor/llvm/dist/test/Other/2007-06-28-PassManager.ll vendor/llvm/dist/test/Other/2008-02-14-PassManager.ll vendor/llvm/dist/test/Other/2008-08-14-PassManager.ll vendor/llvm/dist/test/Other/2009-06-05-no-implicit-float.ll vendor/llvm/dist/test/Transforms/ConstProp/loads.ll vendor/llvm/dist/test/Transforms/DeadArgElim/canon.ll vendor/llvm/dist/test/Transforms/DeadStoreElimination/const-pointers.ll vendor/llvm/dist/test/Transforms/DeadStoreElimination/no-targetdata.ll vendor/llvm/dist/test/Transforms/FunctionAttrs/2008-10-04-LocalMemory.ll vendor/llvm/dist/test/Transforms/GVN/null-aliases-nothing.ll vendor/llvm/dist/test/Transforms/GlobalOpt/ctor-list-opt-dbg.ll vendor/llvm/dist/test/Transforms/IPConstantProp/return-argument.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/shrunk-constant.ll vendor/llvm/dist/test/Transforms/Inline/2007-12-19-InlineNoUnwind.ll vendor/llvm/dist/test/Transforms/InstCombine/apint-shift.ll vendor/llvm/dist/test/Transforms/InstCombine/bswap-fold.ll vendor/llvm/dist/test/Transforms/InstCombine/bswap.ll vendor/llvm/dist/test/Transforms/InstCombine/cast.ll vendor/llvm/dist/test/Transforms/InstCombine/cast_ptr.ll vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll vendor/llvm/dist/test/Transforms/InstCombine/load.ll vendor/llvm/dist/test/Transforms/InstCombine/loadstore-alignment.ll vendor/llvm/dist/test/Transforms/InstCombine/or.ll vendor/llvm/dist/test/Transforms/InstCombine/shift-sra.ll vendor/llvm/dist/test/Transforms/InstCombine/sub.ll vendor/llvm/dist/test/Transforms/JumpThreading/basic.ll vendor/llvm/dist/test/Transforms/LoopIndexSplit/SplitValue-2007-08-24-dbg.ll vendor/llvm/dist/test/Transforms/LoopRotate/PhiRename-1.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/2009-04-28-no-reduce-mul.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/dont_reverse.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll vendor/llvm/dist/test/Transforms/PruneEH/simplenoreturntest.ll vendor/llvm/dist/test/Transforms/ScalarRepl/2009-01-09-scalarrepl-empty.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/2009-03-05-Speculative-Hoist-Dbg.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/branch_fold_dbg.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/hoist-common-code.dbg.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/switch_formation.dbg.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/two-entry-phi-return.dbg.ll vendor/llvm/dist/test/Transforms/TailCallElim/dont_reorder_load.ll vendor/llvm/dist/test/Verifier/2006-10-15-AddrLabel.ll vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/llvm-mc/AsmLexer.cpp vendor/llvm/dist/tools/llvm-mc/AsmParser.cpp vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/VMCore/MetadataTest.cpp vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/CodeEmitterGen.cpp vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/CodeGenTarget.h vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp vendor/llvm/dist/utils/TableGen/FastISelEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/IntrinsicEmitter.cpp vendor/llvm/dist/utils/TableGen/OptParserEmitter.cpp vendor/llvm/dist/utils/TableGen/Record.cpp vendor/llvm/dist/utils/TableGen/Record.h vendor/llvm/dist/utils/TableGen/SubtargetEmitter.cpp vendor/llvm/dist/utils/TableGen/TGLexer.cpp vendor/llvm/dist/utils/TableGen/TGLexer.h vendor/llvm/dist/utils/TableGen/TGParser.cpp vendor/llvm/dist/utils/buildit/GNUmakefile vendor/llvm/dist/utils/vim/llvm.vim vendor/llvm/dist/utils/vim/vimrc Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/CMakeLists.txt Fri Jan 15 15:37:28 2010 (r202375) @@ -296,6 +296,7 @@ add_subdirectory(lib/Bitcode/Reader) add_subdirectory(lib/Bitcode/Writer) add_subdirectory(lib/Transforms/Utils) add_subdirectory(lib/Transforms/Instrumentation) +add_subdirectory(lib/Transforms/InstCombine) add_subdirectory(lib/Transforms/Scalar) add_subdirectory(lib/Transforms/IPO) add_subdirectory(lib/Transforms/Hello) Modified: vendor/llvm/dist/LICENSE.TXT ============================================================================== --- vendor/llvm/dist/LICENSE.TXT Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/LICENSE.TXT Fri Jan 15 15:37:28 2010 (r202375) @@ -4,7 +4,7 @@ LLVM Release License University of Illinois/NCSA Open Source License -Copyright (c) 2003-2009 University of Illinois at Urbana-Champaign. +Copyright (c) 2003-2010 University of Illinois at Urbana-Champaign. All rights reserved. Developed by: Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/autoconf/configure.ac Fri Jan 15 15:37:28 2010 (r202375) @@ -512,7 +512,7 @@ case "$enableval" in PIC16) TARGETS_TO_BUILD="PIC16 $TARGETS_TO_BUILD" ;; XCore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; MSP430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;; - SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; + s390x) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; Blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;; *) AC_MSG_ERROR([Can not set target to build]) ;; esac ;; Modified: vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake Fri Jan 15 15:37:28 2010 (r202375) @@ -7,9 +7,9 @@ set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMA set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem) -set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport) set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) -set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport) set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport LLVMSystem) set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget) @@ -21,15 +21,16 @@ set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLV set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMCore LLVMSupport LLVMSystem) -set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget) -set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTransformUtils) +set(MSVC_LIB_DEPS_LLVMInstCombine LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) +set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem) set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem) -set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa) +set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils LLVMipa) set(MSVC_LIB_DEPS_LLVMMSILInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) @@ -37,13 +38,13 @@ set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSup set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMSupport) -set(MSVC_LIB_DEPS_LLVMPIC16 LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) -set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16 LLVMPIC16Info LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMPIC16 LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16 LLVMPIC16Info LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport) set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMSupport) -set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) +set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget) @@ -53,14 +54,14 @@ set(MSVC_LIB_DEPS_LLVMSystem ) set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMSystemZInfo LLVMTarget) set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZInfo LLVMTarget) set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMSupport) -set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa) set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMX86CodeGen LLVMX86Info) -set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Disassembler LLVMX86Info) -set(MSVC_LIB_DEPS_LLVMX86Disassembler ) +set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Info) +set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport) -set(MSVC_LIB_DEPS_LLVMXCore LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo) +set(MSVC_LIB_DEPS_LLVMXCore LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo) set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo) set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem) Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/configure Fri Jan 15 15:37:28 2010 (r202375) @@ -5080,7 +5080,7 @@ case "$enableval" in PIC16) TARGETS_TO_BUILD="PIC16 $TARGETS_TO_BUILD" ;; XCore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; MSP430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;; - SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; + s390x) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; Blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;; *) { { echo "$as_me:$LINENO: error: Can not set target to build" >&5 echo "$as_me: error: Can not set target to build" >&2;} Modified: vendor/llvm/dist/docs/CodeGenerator.html ============================================================================== --- vendor/llvm/dist/docs/CodeGenerator.html Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/docs/CodeGenerator.html Fri Jan 15 15:37:28 2010 (r202375) @@ -1731,11 +1731,6 @@ define fastcc i32 @tailcaller(i32 %in1, (because one or more of above constraints are not met) to be followed by a readjustment of the stack. So performance might be worse in such cases.

-

On x86 and x86-64 one register is reserved for indirect tail calls (e.g via a - function pointer). So there is one less register for integer argument - passing. For x86 this means 2 registers (if inreg parameter - attribute is used) and for x86-64 this means 5 register are used.

-
@@ -2121,7 +2116,7 @@ MOVSX32rm16 -> movsx, 32-bit register Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2009-10-10 23:30:55 +0200 (Sat, 10 Oct 2009) $ + Last modified: $Date: 2010-01-11 19:53:47 +0100 (Mon, 11 Jan 2010) $ Modified: vendor/llvm/dist/docs/LangRef.html ============================================================================== --- vendor/llvm/dist/docs/LangRef.html Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/docs/LangRef.html Fri Jan 15 15:37:28 2010 (r202375) @@ -43,6 +43,7 @@
  • Global Variables
  • Functions
  • Aliases
  • +
  • Named Metadata
  • Parameter Attributes
  • Function Attributes
  • Garbage Collector Names
  • @@ -85,12 +86,12 @@
  • Undefined Values
  • Addresses of Basic Blocks
  • Constant Expressions
  • -
  • Embedded Metadata
  • Other Values
    1. Inline Assembler Expressions
    2. +
    3. Metadata Nodes and Metadata Strings
  • Intrinsic Global Variables @@ -498,14 +499,19 @@ define i32 @main() { ; Call puts function to write out the string to stdout. call i32 @puts(i8 * %cast210) ; i32 - ret i32 0
    }
    + ret i32 0
    } + +; Named metadata +!1 = metadata !{i32 41} +!foo = !{!1, null}
  • This example is made up of a global variable named - ".LC0", an external declaration of the "puts" function, and + ".LC0", an external declaration of the "puts" function, a function definition for - "main".

    + "main" and named metadata + "foo".

    In general, a module is made up of a list of global values, where both functions and global variables are global values. Global values are @@ -558,10 +564,17 @@ define i32 @main() {

    linkonce
    Globals with "linkonce" linkage are merged with other globals of - the same name when linkage occurs. This is typically used to implement - inline functions, templates, or other code which must be generated in each - translation unit that uses it. Unreferenced linkonce globals are - allowed to be discarded.
    + the same name when linkage occurs. This can be used to implement + some forms of inline functions, templates, or other code which must be + generated in each translation unit that uses it, but where the body may + be overridden with a more definitive definition later. Unreferenced + linkonce globals are allowed to be discarded. Note that + linkonce linkage does not actually allow the optimizer to + inline the body of this function into callers because it doesn't know if + this definition of the function is the definitive definition within the + program or whether it will be overridden by a stronger definition. + To enable inlining and other optimizations, use "linkonce_odr" + linkage.
    weak
    "weak" linkage has the same merging semantics as @@ -671,9 +684,9 @@ define i32 @main() { (e.g. by passing things in registers). This calling convention allows the target to use whatever tricks it wants to produce fast code for the target, without having to conform to an externally specified ABI - (Application Binary Interface). Implementations of this convention should - allow arbitrary tail call - optimization to be supported. This calling convention does not + (Application Binary Interface). + Tail calls can only be optimized + when this convention is used. This calling convention does not support varargs and requires the prototype of all callees to exactly match the prototype of the function definition.
    @@ -905,6 +918,27 @@ define [linkage] + + +
    + +

    Named metadata is a collection of metadata. Metadata + node and null are the only valid named metadata operands. + Metadata strings are not allowed as an named metadata operand.

    + +
    Syntax:
    +
    +
    +!1 = metadata !{metadata !"one"}
    +!name = !{null, !1}
    +
    +
    + +
    + +
    @@ -1649,10 +1683,12 @@ Classifications
    underlying processor. The elements of a structure may be any type that has a size.

    -

    Structures are accessed using 'load and - 'store' by getting a pointer to a field with - the 'getelementptr' instruction.

    - +

    Structures in memory are accessed using 'load' + and 'store' by getting a pointer to a field + with the 'getelementptr' instruction. + Structures in registers are accessed using the + 'extractvalue' and + 'insertvalue' instructions.

    Syntax:
       { <type list> }
    @@ -2305,12 +2341,12 @@ has undefined behavior.

    -
    Embedded Metadata +
    -

    Embedded metadata provides a way to attach arbitrary data to the instruction +

    Metadata provides a way to attach arbitrary data to the instruction stream without affecting the behaviour of the program. There are two metadata primitives, strings and nodes. All metadata has the metadata type and is identified in syntax by a preceding exclamation @@ -2329,6 +2365,9 @@ has undefined behavior.

    event that a value is deleted, it will be replaced with a typeless "null", such as "metadata !{null, i32 10}".

    +

    A named metadata is a collection of + metadata nodes. For example: "!foo = metadata !{!4, !3}". +

    Optimizations may rely on metadata to provide additional information about the program that isn't available in the instructions, or that isn't easily computable. Similarly, the code generator may expect a certain metadata @@ -3848,7 +3887,7 @@ Instruction

    Syntax:
    -  <result> = insertvalue <aggregate type> <val>, <ty> <val>, <idx>    ; yields <n x <ty>>
    +  <result> = insertvalue <aggregate type> <val>, <ty> <elt>, <idx>    ; yields <aggregate type>
     
    Overview:
    @@ -3873,7 +3912,8 @@ Instruction
    Example:
    -  <result> = insertvalue {i32, float} %agg, i32 1, 0    ; yields {i32, float}
    +  %agg1 = insertvalue {i32, float} undef, i32 1, 0         ; yields {i32 1, float undef}
    +  %agg2 = insertvalue {i32, float} %agg1, float %val, 1    ; yields {i32 1, float %val}
     
    @@ -4983,15 +5023,31 @@ Loop: ; Infinite loop that counts

    This instruction requires several arguments:

      -
    1. The optional "tail" marker indicates whether the callee function accesses - any allocas or varargs in the caller. If the "tail" marker is present, - the function call is eligible for tail call optimization. Note that calls - may be marked "tail" even if they do not occur before - a ret instruction.
    2. +
    3. The optional "tail" marker indicates that the callee function does not + access any allocas or varargs in the caller. Note that calls may be + marked "tail" even if they do not occur before + a ret instruction. If the "tail" marker is + present, the function call is eligible for tail call optimization, + but might not in fact be + optimized into a jump. As of this writing, the extra requirements for + a call to actually be optimized are: +
        +
      • Caller and callee both have the calling + convention fastcc.
      • +
      • The call is in tail position (ret immediately follows call and ret + uses value of call or is void).
      • +
      • Option -tailcallopt is enabled, + or llvm::PerformTailCallOpt is true.
      • +
      • Platform specific + constraints are met.
      • +
      +
    4. The optional "cconv" marker indicates which calling convention the call should use. If none is specified, the call - defaults to using C calling conventions.
    5. + defaults to using C calling conventions. The calling convention of the + call must match the calling convention of the target function, or else the + behavior is undefined.
    6. The optional Parameter Attributes list for return values. Only 'zeroext', 'signext', and @@ -7263,7 +7319,7 @@ LLVM.

      Overview:

      The llvm.objectsize intrinsic is designed to provide information - to the optimizers to either discover at compile time either a) when an + to the optimizers to discover at compile time either a) when an operation like memcpy will either overflow a buffer that corresponds to an object, or b) to determine that a runtime check for overflow isn't necessary. An object in this context means an allocation of a @@ -7294,7 +7350,7 @@ LLVM.

      Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2009-12-23 01:29:49 +0100 (Wed, 23 Dec 2009) $ + Last modified: $Date: 2010-01-11 20:35:55 +0100 (Mon, 11 Jan 2010) $ Modified: vendor/llvm/dist/docs/ProgrammersManual.html ============================================================================== --- vendor/llvm/dist/docs/ProgrammersManual.html Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/docs/ProgrammersManual.html Fri Jan 15 15:37:28 2010 (r202375) @@ -94,6 +94,7 @@ option
    7. BitVector-like containers
    8. @@ -1584,7 +1585,7 @@ please don't use it.

      -

      The BitVector container provides a fixed size set of bits for manipulation. +

      The BitVector container provides a dynamic size set of bits for manipulation. It supports individual bit setting/testing, as well as set operations. The set operations take time O(size of bitvector), but operations are performed one word at a time, instead of one bit at a time. This makes the BitVector very fast for @@ -1595,6 +1596,25 @@ the number of set bits to be high (IE a

      + +
      +

      The SmallBitVector container provides the same interface as BitVector, but +it is optimized for the case where only a small number of bits, less than +25 or so, are needed. It also transparently supports larger bit counts, but +slightly less efficiently than a plain BitVector, so SmallBitVector should +only be used when larger counts are rare. +

      + +

      +At this time, SmallBitVector does not support set operations (and, or, xor), +and its operator[] does not provide an assignable lvalue. +

      +
      + + + @@ -3872,7 +3892,7 @@ arguments. An argument has a pointer to Dinakar Dhurjati and Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2009-10-23 00:11:22 +0200 (Fri, 23 Oct 2009) $ + Last modified: $Date: 2010-01-05 19:24:00 +0100 (Tue, 05 Jan 2010) $ Modified: vendor/llvm/dist/docs/ReleaseNotes.html ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.html Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/docs/ReleaseNotes.html Fri Jan 15 15:37:28 2010 (r202375) @@ -58,6 +58,7 @@ Almost dead code. include/llvm/Analysis/LiveValues.h => Dan lib/Transforms/IPO/MergeFunctions.cpp => consider for 2.8. llvm/Analysis/PointerTracking.h => Edwin wants this, consider for 2.8. + ABCD, SCCVN, GEPSplitterPass --> @@ -1348,7 +1349,7 @@ lists.

      src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
      - Last modified: $Date: 2009-11-03 22:50:09 +0100 (Tue, 03 Nov 2009) $ + Last modified: $Date: 2010-01-09 23:30:40 +0100 (Sat, 09 Jan 2010) $ Modified: vendor/llvm/dist/docs/SourceLevelDebugging.html ============================================================================== --- vendor/llvm/dist/docs/SourceLevelDebugging.html Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/docs/SourceLevelDebugging.html Fri Jan 15 15:37:28 2010 (r202375) @@ -38,6 +38,7 @@
    9. Debugger intrinsic functions
  • Object lifetimes and scoping
  • @@ -775,6 +776,25 @@ DW_TAG_return_variable = 258 + + +
    +
    +  void %llvm.dbg.value( metadata, i64, metadata )
    +
    + +

    This intrinsic provides information when a user source variable is set to a + new value. The first argument is the new value (wrapped as metadata). The + second argument is the offset in the user source variable where the new value + is written. The third argument is + the %llvm.dbg.variable containing + the description of the user source variable.

    + +
    + + @@ -1718,7 +1738,7 @@ enum Trees { Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2009-12-01 01:59:58 +0100 (Tue, 01 Dec 2009) $ + Last modified: $Date: 2010-01-11 23:53:48 +0100 (Mon, 11 Jan 2010) $ Modified: vendor/llvm/dist/docs/TableGenFundamentals.html ============================================================================== --- vendor/llvm/dist/docs/TableGenFundamentals.html Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/docs/TableGenFundamentals.html Fri Jan 15 15:37:28 2010 (r202375) @@ -423,6 +423,10 @@ class. This operation is analogous to $
    An integer {0,1} indicating whether list 'a' is empty.
    !if(a,b,c)
    'b' if the result of integer operator 'a' is nonzero, 'c' otherwise.
    +
    !eq(a,b)
    +
    Integer one if string a is equal to string b, zero otherwise. This + only operates on string objects. Use !cast to compare other + types of objects.

    Note that all of the values have rules specifying how they convert to values @@ -794,7 +798,7 @@ This should highlight the APIs in Ta Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2009-10-29 19:10:34 +0100 (Thu, 29 Oct 2009) $ + Last modified: $Date: 2010-01-05 20:11:42 +0100 (Tue, 05 Jan 2010) $ Modified: vendor/llvm/dist/include/llvm-c/Analysis.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/Analysis.h Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/include/llvm-c/Analysis.h Fri Jan 15 15:37:28 2010 (r202375) @@ -36,12 +36,12 @@ typedef enum { /* Verifies that a module is valid, taking the specified action if not. Optionally returns a human-readable description of any invalid constructs. OutMessage must be disposed with LLVMDisposeMessage. */ -int LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, - char **OutMessage); +LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, + char **OutMessage); /* Verifies that a single function is valid, taking the specified action. Useful for debugging. */ -int LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action); +LLVMBool LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action); /* Open up a ghostview window that displays the CFG of the current function. Useful for debugging. */ Modified: vendor/llvm/dist/include/llvm-c/BitReader.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/BitReader.h Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/include/llvm-c/BitReader.h Fri Jan 15 15:37:28 2010 (r202375) @@ -29,24 +29,24 @@ extern "C" { /* Builds a module from the bitcode in the specified memory buffer, returning a reference to the module via the OutModule parameter. Returns 0 on success. Optionally returns a human-readable error message via OutMessage. */ -int LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, - LLVMModuleRef *OutModule, char **OutMessage); +LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, + LLVMModuleRef *OutModule, char **OutMessage); -int LLVMParseBitcodeInContext(LLVMContextRef ContextRef, - LLVMMemoryBufferRef MemBuf, - LLVMModuleRef *OutModule, char **OutMessage); +LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, + LLVMModuleRef *OutModule, char **OutMessage); /* Reads a module from the specified path, returning via the OutMP parameter a module provider which performs lazy deserialization. Returns 0 on success. Optionally returns a human-readable error message via OutMessage. */ -int LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf, - LLVMModuleProviderRef *OutMP, - char **OutMessage); - -int LLVMGetBitcodeModuleProviderInContext(LLVMContextRef ContextRef, - LLVMMemoryBufferRef MemBuf, - LLVMModuleProviderRef *OutMP, - char **OutMessage); +LLVMBool LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf, + LLVMModuleProviderRef *OutMP, + char **OutMessage); + +LLVMBool LLVMGetBitcodeModuleProviderInContext(LLVMContextRef ContextRef, + LLVMMemoryBufferRef MemBuf, + LLVMModuleProviderRef *OutMP, + char **OutMessage); #ifdef __cplusplus Modified: vendor/llvm/dist/include/llvm-c/Core.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/Core.h Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/include/llvm-c/Core.h Fri Jan 15 15:37:28 2010 (r202375) @@ -46,6 +46,8 @@ extern "C" { #endif +typedef int LLVMBool; + /* Opaque types. */ /** @@ -292,7 +294,7 @@ const char *LLVMGetTarget(LLVMModuleRef void LLVMSetTarget(LLVMModuleRef M, const char *Triple); /** See Module::addTypeName. */ -int LLVMAddTypeName(LLVMModuleRef M, const char *Name, LLVMTypeRef Ty); +LLVMBool LLVMAddTypeName(LLVMModuleRef M, const char *Name, LLVMTypeRef Ty); void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name); LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name); @@ -355,20 +357,20 @@ LLVMTypeRef LLVMPPCFP128Type(void); /* Operations on function types */ LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes, unsigned ParamCount, - int IsVarArg); -int LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy); + LLVMBool IsVarArg); +LLVMBool LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy); LLVMTypeRef LLVMGetReturnType(LLVMTypeRef FunctionTy); unsigned LLVMCountParamTypes(LLVMTypeRef FunctionTy); void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest); /* Operations on struct types */ LLVMTypeRef LLVMStructTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes, - unsigned ElementCount, int Packed); + unsigned ElementCount, LLVMBool Packed); LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount, - int Packed); + LLVMBool Packed); unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy); void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest); -int LLVMIsPackedStruct(LLVMTypeRef StructTy); +LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy); /* Operations on array, pointer, and vector types (sequence types) */ LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount); @@ -427,10 +429,6 @@ void LLVMDisposeTypeHandle(LLVMTypeHandl macro(IntrinsicInst) \ macro(DbgInfoIntrinsic) \ macro(DbgDeclareInst) \ - macro(DbgFuncStartInst) \ - macro(DbgRegionEndInst) \ - macro(DbgRegionStartInst) \ - macro(DbgStopPointInst) \ macro(EHSelectorInst) \ macro(MemIntrinsic) \ macro(MemCpyInst) \ @@ -499,14 +497,14 @@ LLVMValueRef LLVMGetOperand(LLVMValueRef LLVMValueRef LLVMConstNull(LLVMTypeRef Ty); /* all zeroes */ LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty); /* only for int/vector */ LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty); -int LLVMIsConstant(LLVMValueRef Val); -int LLVMIsNull(LLVMValueRef Val); -int LLVMIsUndef(LLVMValueRef Val); +LLVMBool LLVMIsConstant(LLVMValueRef Val); +LLVMBool LLVMIsNull(LLVMValueRef Val); +LLVMBool LLVMIsUndef(LLVMValueRef Val); LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty); /* Operations on scalar constants */ LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N, - int SignExtend); + LLVMBool SignExtend); LLVMValueRef LLVMConstIntOfString(LLVMTypeRef IntTy, const char *Text, uint8_t Radix); LLVMValueRef LLVMConstIntOfStringAndSize(LLVMTypeRef IntTy, const char *Text, @@ -521,17 +519,17 @@ long long LLVMConstIntGetSExtValue(LLVMV /* Operations on composite constants */ LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str, - unsigned Length, int DontNullTerminate); + unsigned Length, LLVMBool DontNullTerminate); LLVMValueRef LLVMConstStructInContext(LLVMContextRef C, LLVMValueRef *ConstantVals, - unsigned Count, int Packed); + unsigned Count, LLVMBool Packed); LLVMValueRef LLVMConstString(const char *Str, unsigned Length, - int DontNullTerminate); + LLVMBool DontNullTerminate); LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length); LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count, - int Packed); + LLVMBool Packed); LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size); /* Constant expressions */ @@ -591,7 +589,7 @@ LLVMValueRef LLVMConstTruncOrBitCast(LLV LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); LLVMValueRef LLVMConstIntCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType, - unsigned isSigned); + LLVMBool isSigned); LLVMValueRef LLVMConstFPCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); LLVMValueRef LLVMConstSelect(LLVMValueRef ConstantCondition, LLVMValueRef ConstantIfTrue, @@ -609,13 +607,13 @@ LLVMValueRef LLVMConstExtractValue(LLVMV LLVMValueRef LLVMConstInsertValue(LLVMValueRef AggConstant, LLVMValueRef ElementValueConstant, unsigned *IdxList, unsigned NumIdx); -LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, +LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, const char *AsmString, const char *Constraints, - int HasSideEffects); + LLVMBool HasSideEffects, LLVMBool IsAlignStack); /* Operations on global variables, functions, and aliases (globals) */ LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global); -int LLVMIsDeclaration(LLVMValueRef Global); +LLVMBool LLVMIsDeclaration(LLVMValueRef Global); LLVMLinkage LLVMGetLinkage(LLVMValueRef Global); void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage); const char *LLVMGetSection(LLVMValueRef Global); @@ -635,10 +633,10 @@ LLVMValueRef LLVMGetPreviousGlobal(LLVMV void LLVMDeleteGlobal(LLVMValueRef GlobalVar); LLVMValueRef LLVMGetInitializer(LLVMValueRef GlobalVar); void LLVMSetInitializer(LLVMValueRef GlobalVar, LLVMValueRef ConstantVal); -int LLVMIsThreadLocal(LLVMValueRef GlobalVar); -void LLVMSetThreadLocal(LLVMValueRef GlobalVar, int IsThreadLocal); -int LLVMIsGlobalConstant(LLVMValueRef GlobalVar); -void LLVMSetGlobalConstant(LLVMValueRef GlobalVar, int IsConstant); +LLVMBool LLVMIsThreadLocal(LLVMValueRef GlobalVar); +void LLVMSetThreadLocal(LLVMValueRef GlobalVar, LLVMBool IsThreadLocal); +LLVMBool LLVMIsGlobalConstant(LLVMValueRef GlobalVar); +void LLVMSetGlobalConstant(LLVMValueRef GlobalVar, LLVMBool IsConstant); /* Operations on aliases */ LLVMValueRef LLVMAddAlias(LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee, @@ -678,7 +676,7 @@ void LLVMSetParamAlignment(LLVMValueRef /* Operations on basic blocks */ LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB); -int LLVMValueIsBasicBlock(LLVMValueRef Val); +LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val); LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val); LLVMValueRef LLVMGetBasicBlockParent(LLVMBasicBlockRef BB); unsigned LLVMCountBasicBlocks(LLVMValueRef Fn); @@ -718,8 +716,8 @@ void LLVMSetInstrParamAlignment(LLVMValu unsigned align); /* Operations on call instructions (only) */ -int LLVMIsTailCall(LLVMValueRef CallInst); -void LLVMSetTailCall(LLVMValueRef CallInst, int IsTailCall); +LLVMBool LLVMIsTailCall(LLVMValueRef CallInst); +void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall); /* Operations on phi nodes */ void LLVMAddIncoming(LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, @@ -932,11 +930,11 @@ void LLVMDisposeModuleProvider(LLVMModul /*===-- Memory buffers ----------------------------------------------------===*/ -int LLVMCreateMemoryBufferWithContentsOfFile(const char *Path, - LLVMMemoryBufferRef *OutMemBuf, - char **OutMessage); -int LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf, - char **OutMessage); +LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(const char *Path, + LLVMMemoryBufferRef *OutMemBuf, + char **OutMessage); +LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf, + char **OutMessage); void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf); @@ -956,23 +954,23 @@ LLVMPassManagerRef LLVMCreateFunctionPas /** Initializes, executes on the provided module, and finalizes all of the passes scheduled in the pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. See llvm::PassManager::run(Module&). */ -int LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M); +LLVMBool LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M); /** Initializes all of the function passes scheduled in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. See llvm::FunctionPassManager::doInitialization. */ -int LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM); +LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM); /** Executes all of the function passes scheduled in the function pass manager on the provided function. Returns 1 if any of the passes modified the function, false otherwise. See llvm::FunctionPassManager::run(Function&). */ -int LLVMRunFunctionPassManager(LLVMPassManagerRef FPM, LLVMValueRef F); +LLVMBool LLVMRunFunctionPassManager(LLVMPassManagerRef FPM, LLVMValueRef F); /** Finalizes all of the function passes scheduled in in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. See llvm::FunctionPassManager::doFinalization. */ -int LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM); +LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM); /** Frees the memory of a pass pipeline. For function pipelines, does not free the module provider. Modified: vendor/llvm/dist/include/llvm-c/ExecutionEngine.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/ExecutionEngine.h Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/include/llvm-c/ExecutionEngine.h Fri Jan 15 15:37:28 2010 (r202375) @@ -36,7 +36,7 @@ typedef struct LLVMOpaqueExecutionEngine LLVMGenericValueRef LLVMCreateGenericValueOfInt(LLVMTypeRef Ty, unsigned long long N, - int IsSigned); + LLVMBool IsSigned); LLVMGenericValueRef LLVMCreateGenericValueOfPointer(void *P); @@ -45,7 +45,7 @@ LLVMGenericValueRef LLVMCreateGenericVal unsigned LLVMGenericValueIntWidth(LLVMGenericValueRef GenValRef); unsigned long long LLVMGenericValueToInt(LLVMGenericValueRef GenVal, - int IsSigned); + LLVMBool IsSigned); void *LLVMGenericValueToPointer(LLVMGenericValueRef GenVal); @@ -55,18 +55,18 @@ void LLVMDisposeGenericValue(LLVMGeneric /*===-- Operations on execution engines -----------------------------------===*/ -int LLVMCreateExecutionEngine(LLVMExecutionEngineRef *OutEE, - LLVMModuleProviderRef MP, - char **OutError); - -int LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp, - LLVMModuleProviderRef MP, - char **OutError); - -int LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT, - LLVMModuleProviderRef MP, - unsigned OptLevel, - char **OutError); +LLVMBool LLVMCreateExecutionEngine(LLVMExecutionEngineRef *OutEE, + LLVMModuleProviderRef MP, + char **OutError); + +LLVMBool LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp, + LLVMModuleProviderRef MP, + char **OutError); + +LLVMBool LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT, + LLVMModuleProviderRef MP, + unsigned OptLevel, + char **OutError); void LLVMDisposeExecutionEngine(LLVMExecutionEngineRef EE); @@ -86,12 +86,12 @@ void LLVMFreeMachineCodeForFunction(LLVM void LLVMAddModuleProvider(LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP); -int LLVMRemoveModuleProvider(LLVMExecutionEngineRef EE, - LLVMModuleProviderRef MP, - LLVMModuleRef *OutMod, char **OutError); +LLVMBool LLVMRemoveModuleProvider(LLVMExecutionEngineRef EE, + LLVMModuleProviderRef MP, + LLVMModuleRef *OutMod, char **OutError); -int LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name, - LLVMValueRef *OutFn); +LLVMBool LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name, + LLVMValueRef *OutFn); LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE); Modified: vendor/llvm/dist/include/llvm-c/Target.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/Target.h Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/include/llvm-c/Target.h Fri Jan 15 15:37:28 2010 (r202375) @@ -26,8 +26,7 @@ extern "C" { #endif -enum { LLVMBigEndian, LLVMLittleEndian }; -typedef int LLVMByteOrdering; +enum LLVMByteOrdering { LLVMBigEndian, LLVMLittleEndian }; typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef; typedef struct LLVMStructLayout *LLVMStructLayoutRef; @@ -62,7 +61,7 @@ static inline void LLVMInitializeAllTarg /** LLVMInitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host. This is useful for JIT applications to ensure that the target gets linked in correctly. */ -static inline int LLVMInitializeNativeTarget() { +static inline LLVMBool LLVMInitializeNativeTarget() { /* If we have a native target, initialize it to ensure it is linked in. */ #ifdef LLVM_NATIVE_ARCH #define DoInit2(TARG) \ @@ -97,7 +96,7 @@ char *LLVMCopyStringRepOfTargetData(LLVM /** Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian. See the method llvm::TargetData::isLittleEndian. */ -LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef); +enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef); /** Returns the pointer size in bytes for a target. See the method llvm::TargetData::getPointerSize. */ Modified: vendor/llvm/dist/include/llvm/ADT/BitVector.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/BitVector.h Fri Jan 15 15:36:24 2010 (r202374) +++ vendor/llvm/dist/include/llvm/ADT/BitVector.h Fri Jan 15 15:37:28 2010 (r202375) @@ -95,6 +95,9 @@ public: delete[] Bits; } + /// empty - Tests whether there are no bits in this bitvector. + bool empty() const { return Size == 0; } + /// size - Returns the number of bits in this bitvector. unsigned size() const { return Size; } @@ -341,6 +344,12 @@ public: return *this; } + void swap(BitVector &RHS) { + std::swap(Bits, RHS.Bits); + std::swap(Size, RHS.Size); + std::swap(Capacity, RHS.Capacity); + } + private: unsigned NumBitWords(unsigned S) const { return (S + BITWORD_SIZE-1) / BITWORD_SIZE; @@ -406,4 +415,13 @@ inline BitVector operator^(const BitVect } } // End llvm namespace + +namespace std { + /// Implement std::swap in terms of BitVector swap. + inline void + swap(llvm::BitVector &LHS, llvm::BitVector &RHS) { + LHS.swap(RHS); + } +} + #endif Added: vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h Fri Jan 15 15:37:28 2010 (r202375) @@ -0,0 +1,373 @@ +//===- llvm/ADT/SmallBitVector.h - 'Normally small' bit vectors -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the SmallBitVector class. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ADT_SMALLBITVECTOR_H +#define LLVM_ADT_SMALLBITVECTOR_H + +#include "llvm/ADT/BitVector.h" +#include "llvm/ADT/PointerIntPair.h" +#include "llvm/Support/MathExtras.h" +#include + +namespace llvm { + +/// SmallBitVector - This is a 'bitvector' (really, a variable-sized bit array), +/// optimized for the case when the array is small. It contains one +/// pointer-sized field, which is directly used as a plain collection of bits +/// when possible, or as a pointer to a larger heap-allocated array when +/// necessary. This allows normal "small" cases to be fast without losing +/// generality for large inputs. +/// +class SmallBitVector { + // TODO: In "large" mode, a pointer to a BitVector is used, leading to an + // unnecessary level of indirection. It would be more efficient to use a + // pointer to memory containing size, allocation size, and the array of bits. + PointerIntPair X; + + // The number of bits in this class. + static const size_t NumBaseBits = sizeof(uintptr_t) * CHAR_BIT; + + // One bit is used to discriminate between small and large mode. The + // remaining bits are used for the small-mode representation. + static const size_t SmallNumRawBits = NumBaseBits - 1; + + // A few more bits are used to store the size of the bit set in small mode. + // Theoretically this is a ceil-log2. These bits are encoded in the most + // significant bits of the raw bits. + static const size_t SmallNumSizeBits = (NumBaseBits == 32 ? 5 : + NumBaseBits == 64 ? 6 : + SmallNumRawBits); + + // The remaining bits are used to store the actual set in small mode. + static const size_t SmallNumDataBits = SmallNumRawBits - SmallNumSizeBits; + + bool isSmall() const { + return X.getInt(); + } + + void switchToSmall(uintptr_t NewSmallBits, size_t NewSize) { + X.setInt(true); + setSmallSize(NewSize); + setSmallBits(NewSmallBits); + } + + void switchToLarge(BitVector *BV) { + X.setInt(false); + X.setPointer(BV); + } + + // Return all the bits used for the "small" representation; this includes + // bits for the size as well as the element bits. + uintptr_t getSmallRawBits() const { + return reinterpret_cast(X.getPointer()) >> 1; + } + + void setSmallRawBits(uintptr_t NewRawBits) { + return X.setPointer(reinterpret_cast(NewRawBits << 1)); + } + + // Return the size. + size_t getSmallSize() const { + return getSmallRawBits() >> SmallNumDataBits; + } + + void setSmallSize(size_t Size) { + setSmallRawBits(getSmallBits() | (Size << SmallNumDataBits)); + } + + // Return the element bits. + uintptr_t getSmallBits() const { + return getSmallRawBits() & ~(~uintptr_t(0) << SmallNumDataBits); + } + + void setSmallBits(uintptr_t NewBits) { + setSmallRawBits((getSmallRawBits() & (~uintptr_t(0) << SmallNumDataBits)) | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:38:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A092106568D; Fri, 15 Jan 2010 15:38:32 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F28548FC26; Fri, 15 Jan 2010 15:38:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFcVSh014583; Fri, 15 Jan 2010 15:38:31 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFcVOA014581; Fri, 15 Jan 2010 15:38:31 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201001151538.o0FFcVOA014581@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 15 Jan 2010 15:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202376 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:38:32 -0000 Author: netchild Date: Fri Jan 15 15:38:31 2010 New Revision: 202376 URL: http://svn.freebsd.org/changeset/base/202376 Log: Whitespace change to be able to provide the correct commit log for r202364: ---snip--- Add video clipping support but with the caveats below. Background info: Video clipping allows the user to provide either a series of clip rectangles or a clip bitmap to the driver and have the driver mask the video according to the clipping specs provided. Adding support for clipping to the FreeBSD Linux emulator is problematic because it seems that this feature is not supported by many drivers and therefore it is ignored by many applications. Unfortunately, when not using it, rather than passing in a null clipping list, some apps leave the clipping fields uninitialized, casuing random values to be passed in. In the case where the driver does not use the clipping info, this is not a problem (although it is bad form). But the Linux emulator does not know which drivers will use this and which won't, so the Linux emulator must try to handle this clip list, and deal gracefully with cases where the values seem to be uninitialized. Video clipping info is passed in using the VIDIOCSWIN ioctl in two fields in the video_window structure: the integer clipcount and the pointer clips. How the linuxulator handles this from this commit on: * if (clipcount == VIDEO_CLIP_BITMAP) The clips variable is a void * pointer to a 128*625 byte (1024*625 bit) memory area containing a bitmap of the clipping area. The pointer in the video_window structure is copied, but no video_clip structures are copied. * if (clipcount > 0 && clipcount <= 16384) The clips variable is pointer to a list of video_clip structures. Up to clipcount structures are copied and passed to the driver. The upper limit of 16384 was imposed here so that user code that does not properly initialize clipcount falls through below and no attempt is made to copy an uninitialized list. This value was found by examining Linux drivers that support the clip list. * else The clipcount is either negative (but not VIDEO_CLIP_BITMAP), zero or positive (> 16384). All these cases are treated as invalid data. Both the clipcount field and clips pointer are forced to zero/NULL and passed to the driver. It should be noted that, at the time of developing this V4L emulator code, the pwc(4) V4L driver does not support clipping. Submitted by: J.R. Oldroyd MFC after: 1 month ---snip--- Modified: head/sys/compat/linux/linux_ioctl.c Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Fri Jan 15 15:37:28 2010 (r202375) +++ head/sys/compat/linux/linux_ioctl.c Fri Jan 15 15:38:31 2010 (r202376) @@ -143,7 +143,7 @@ struct handler_element }; static TAILQ_HEAD(, handler_element) handlers = - TAILQ_HEAD_INITIALIZER(handlers); + TAILQ_HEAD_INITIALIZER(handlers); static struct sx linux_ioctl_sx; SX_SYSINIT(linux_ioctl, &linux_ioctl_sx, "linux ioctl handlers"); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:38:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8530810656AA; Fri, 15 Jan 2010 15:38:49 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 725088FC32; Fri, 15 Jan 2010 15:38:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFcn98014697; Fri, 15 Jan 2010 15:38:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFcnBr014695; Fri, 15 Jan 2010 15:38:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151538.o0FFcnBr014695@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202377 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:38:49 -0000 Author: marius Date: Fri Jan 15 15:38:49 2010 New Revision: 202377 URL: http://svn.freebsd.org/changeset/base/202377 Log: - Hook up the default implementations of the MSI/MSI-X pcib_if methods so requests may bubble up to a host-PCI bridge driver. - Distinguish between PCI and PCIe bridges in the device description so it's a bit easier to follow what hangs off of what in the dmesg. Unfortunately we can't also tell PCI and PCI-X apart based on the information provided in the OFW device tree. - Add quirk handling for the ALi M5249 found in Fire-based machines which are used as a PCIe-PCIe bridge there. These are obviously subtractive decoding as as they have a PCI-ISA bridge on their secondary side (and likewise don't include the ISA I/O range in their bridge decode) but don't indicate this via the class code. Given that this quirk isn't likely to apply to all ALi M5249 and I have no datasheet for these chips so I could implement a check using the chip specific bits enabling subtractive decoding this quirk handling is added to the MD code rather than the MI one. Modified: stable/8/sys/sparc64/pci/ofw_pcib.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pcib.c Fri Jan 15 15:38:31 2010 (r202376) +++ stable/8/sys/sparc64/pci/ofw_pcib.c Fri Jan 15 15:38:49 2010 (r202377) @@ -3,6 +3,7 @@ * Copyright (c) 2000 Michael Smith * Copyright (c) 2000 BSDi * Copyright (c) 2001 - 2003 Thomas Moestl + * Copyright (c) 2009 by Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,8 +38,9 @@ __FBSDID("$FreeBSD$"); #include "opt_ofw_pci.h" #include -#include #include +#include +#include #include #include @@ -82,6 +84,11 @@ static device_method_t ofw_pcib_methods[ DEVMETHOD(pcib_read_config, pcib_read_config), DEVMETHOD(pcib_write_config, pcib_write_config), DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, pcib_map_msi), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pcib_gen_get_node), @@ -100,19 +107,49 @@ MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1); static int ofw_pcib_probe(device_t dev) { + char desc[sizeof("OFW PCIe-PCIe bridge")]; + const char *dtype, *pbdtype; + +#define ISDTYPE(dtype, type) \ + (((dtype) != NULL) && strcmp((dtype), (type)) == 0) if ((pci_get_class(dev) == PCIC_BRIDGE) && (pci_get_subclass(dev) == PCIS_BRIDGE_PCI) && ofw_bus_get_node(dev) != 0) { - device_set_desc(dev, "OFW PCI-PCI bridge"); + dtype = ofw_bus_get_type(dev); + pbdtype = ofw_bus_get_type(device_get_parent( + device_get_parent(dev))); + snprintf(desc, sizeof(desc), "OFW PCI%s-PCI%s bridge", + ISDTYPE(pbdtype, OFW_TYPE_PCIE) ? "e" : "", + ISDTYPE(dtype, OFW_TYPE_PCIE) ? "e" : ""); + device_set_desc_copy(dev, desc); return (0); } + +#undef ISDTYPE + return (ENXIO); } static int ofw_pcib_attach(device_t dev) { + struct ofw_pcib_gen_softc *sc; + + sc = device_get_softc(dev); + + /* Quirk handling */ + switch (pci_get_devid(dev)) { + /* + * The ALi M5249 found in Fire-based machines by definition must me + * subtractive as they have a ISA bridge on their secondary side but + * don't indicate this in the class code although the ISA I/O range + * isn't included in their bridge decode. + */ + case 0x524910b9: + sc->ops_pcib_sc.flags |= PCIB_SUBTRACTIVE; + break; + } ofw_pcib_gen_setup(dev); pcib_attach_common(dev); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:38:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C6941065676; Fri, 15 Jan 2010 15:38:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39B778FC31; Fri, 15 Jan 2010 15:38:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFcshA014765; Fri, 15 Jan 2010 15:38:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFcseu014763; Fri, 15 Jan 2010 15:38:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151538.o0FFcseu014763@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202378 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:38:54 -0000 Author: marius Date: Fri Jan 15 15:38:53 2010 New Revision: 202378 URL: http://svn.freebsd.org/changeset/base/202378 Log: - Hook up the default implementations of the MSI/MSI-X pcib_if methods so requests may bubble up to a host-PCI bridge driver. - Distinguish between PCI and PCIe bridges in the device description so it's a bit easier to follow what hangs off of what in the dmesg. Unfortunately we can't also tell PCI and PCI-X apart based on the information provided in the OFW device tree. - Add quirk handling for the ALi M5249 found in Fire-based machines which are used as a PCIe-PCIe bridge there. These are obviously subtractive decoding as as they have a PCI-ISA bridge on their secondary side (and likewise don't include the ISA I/O range in their bridge decode) but don't indicate this via the class code. Given that this quirk isn't likely to apply to all ALi M5249 and I have no datasheet for these chips so I could implement a check using the chip specific bits enabling subtractive decoding this quirk handling is added to the MD code rather than the MI one. Modified: stable/7/sys/sparc64/pci/ofw_pcib.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- stable/7/sys/sparc64/pci/ofw_pcib.c Fri Jan 15 15:38:49 2010 (r202377) +++ stable/7/sys/sparc64/pci/ofw_pcib.c Fri Jan 15 15:38:53 2010 (r202378) @@ -3,6 +3,7 @@ * Copyright (c) 2000 Michael Smith * Copyright (c) 2000 BSDi * Copyright (c) 2001 - 2003 Thomas Moestl + * Copyright (c) 2009 by Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,8 +38,9 @@ __FBSDID("$FreeBSD$"); #include "opt_ofw_pci.h" #include -#include #include +#include +#include #include #include @@ -83,6 +85,11 @@ static device_method_t ofw_pcib_methods[ DEVMETHOD(pcib_read_config, pcib_read_config), DEVMETHOD(pcib_write_config, pcib_write_config), DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), + DEVMETHOD(pcib_map_msi, pcib_map_msi), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pcib_gen_get_node), @@ -100,19 +107,49 @@ MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1); static int ofw_pcib_probe(device_t dev) { + char desc[sizeof("OFW PCIe-PCIe bridge")]; + const char *dtype, *pbdtype; + +#define ISDTYPE(dtype, type) \ + (((dtype) != NULL) && strcmp((dtype), (type)) == 0) if ((pci_get_class(dev) == PCIC_BRIDGE) && (pci_get_subclass(dev) == PCIS_BRIDGE_PCI) && ofw_bus_get_node(dev) != 0) { - device_set_desc(dev, "OFW PCI-PCI bridge"); + dtype = ofw_bus_get_type(dev); + pbdtype = ofw_bus_get_type(device_get_parent( + device_get_parent(dev))); + snprintf(desc, sizeof(desc), "OFW PCI%s-PCI%s bridge", + ISDTYPE(pbdtype, OFW_TYPE_PCIE) ? "e" : "", + ISDTYPE(dtype, OFW_TYPE_PCIE) ? "e" : ""); + device_set_desc_copy(dev, desc); return (0); } + +#undef ISDTYPE + return (ENXIO); } static int ofw_pcib_attach(device_t dev) { + struct ofw_pcib_gen_softc *sc; + + sc = device_get_softc(dev); + + /* Quirk handling */ + switch (pci_get_devid(dev)) { + /* + * The ALi M5249 found in Fire-based machines by definition must me + * subtractive as they have a ISA bridge on their secondary side but + * don't indicate this in the class code although the ISA I/O range + * isn't included in their bridge decode. + */ + case 0x524910b9: + sc->ops_pcib_sc.flags |= PCIB_SUBTRACTIVE; + break; + } ofw_pcib_gen_setup(dev); pcib_attach_common(dev); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:39:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49332106566B; Fri, 15 Jan 2010 15:39:41 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32E478FC26; Fri, 15 Jan 2010 15:39:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFdf4P015005; Fri, 15 Jan 2010 15:39:41 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFdeFE014986; Fri, 15 Jan 2010 15:39:40 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201001151539.o0FFdeFE014986@svn.freebsd.org> From: Roman Divacky Date: Fri, 15 Jan 2010 15:39:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202379 - in vendor/clang/dist: . docs examples/PrintFunctionNames include/clang-c include/clang/AST include/clang/Analysis/PathSensitive include/clang/Basic include/clang/Driver includ... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:39:41 -0000 Author: rdivacky Date: Fri Jan 15 15:39:40 2010 New Revision: 202379 URL: http://svn.freebsd.org/changeset/base/202379 Log: Update clang to r93512. Added: vendor/clang/dist/include/clang/Lex/ExternalPreprocessorSource.h vendor/clang/dist/lib/AST/AttrImpl.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.h vendor/clang/dist/lib/Sema/TargetAttributesSema.cpp vendor/clang/dist/lib/Sema/TargetAttributesSema.h vendor/clang/dist/test/Analysis/reference.cpp vendor/clang/dist/test/Analysis/security-syntax-checks-no-emit.c vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp vendor/clang/dist/test/CXX/special/class.ctor/p1.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.mem/p5.cpp vendor/clang/dist/test/CodeCompletion/Inputs/ vendor/clang/dist/test/CodeCompletion/Inputs/macros.h vendor/clang/dist/test/CodeCompletion/ordinary-name.cpp vendor/clang/dist/test/CodeGen/annotate.c vendor/clang/dist/test/CodeGenCXX/deferred-global-init.cpp vendor/clang/dist/test/Frontend/macros.c vendor/clang/dist/test/Index/complete-tabs.c vendor/clang/dist/test/Lexer/has_feature_cxx0x.cpp vendor/clang/dist/test/Lexer/hexfloat.cpp vendor/clang/dist/test/Misc/tabstop.c vendor/clang/dist/test/Preprocessor/foo.framework/ vendor/clang/dist/test/Preprocessor/foo.framework/Headers/ vendor/clang/dist/test/Preprocessor/foo.framework/Headers/bar.h vendor/clang/dist/test/Preprocessor/foo.framework/Headers/foo.h vendor/clang/dist/test/Preprocessor/framework-include.m vendor/clang/dist/test/Rewriter/rewrite-anonymous-union.m vendor/clang/dist/test/Rewriter/rewrite-byref-vars.mm vendor/clang/dist/test/Rewriter/rewrite-eh.m vendor/clang/dist/test/Rewriter/rewrite-foreach-7.m vendor/clang/dist/test/Rewriter/rewrite-forward-class.m vendor/clang/dist/test/Rewriter/rewrite-function-decl.mm vendor/clang/dist/test/Rewriter/rewrite-ivar-use.m vendor/clang/dist/test/Rewriter/rewrite-trivial-constructor.mm vendor/clang/dist/test/Rewriter/rewrite-weak-attr.m vendor/clang/dist/test/Rewriter/weak_byref_objects.m vendor/clang/dist/test/Sema/warn-unreachable.c vendor/clang/dist/test/SemaCXX/literal-operators.cpp vendor/clang/dist/test/SemaCXX/unreachable-code.cpp vendor/clang/dist/test/SemaObjC/continuation-class-property.m vendor/clang/dist/test/SemaObjC/ivar-lookup-resolution-builtin.m vendor/clang/dist/test/SemaTemplate/dependent-base-classes.cpp vendor/clang/dist/test/SemaTemplate/typo-dependent-name.cpp vendor/clang/dist/tools/CIndex/CIndexCodeCompletion.cpp vendor/clang/dist/tools/CIndex/CIndexUSRs.cpp vendor/clang/dist/tools/CIndex/CIndexer.cpp vendor/clang/dist/tools/CIndex/CIndexer.h vendor/clang/dist/utils/VtableTest/ vendor/clang/dist/utils/VtableTest/Makefile vendor/clang/dist/utils/VtableTest/check-zti (contents, props changed) vendor/clang/dist/utils/VtableTest/check-ztt (contents, props changed) vendor/clang/dist/utils/VtableTest/check-zvt (contents, props changed) vendor/clang/dist/utils/VtableTest/gen.cc Modified: vendor/clang/dist/LICENSE.TXT vendor/clang/dist/docs/InternalsManual.html vendor/clang/dist/docs/LanguageExtensions.html vendor/clang/dist/examples/PrintFunctionNames/README.txt vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/APValue.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/Attr.h vendor/clang/dist/include/clang/AST/CharUnits.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclarationName.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/Stmt.h vendor/clang/dist/include/clang/AST/TypeLoc.h vendor/clang/dist/include/clang/Analysis/PathSensitive/BugReporter.h vendor/clang/dist/include/clang/Analysis/PathSensitive/ConstraintManager.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRState.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRSubEngine.h vendor/clang/dist/include/clang/Analysis/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/Analysis/PathSensitive/SValuator.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Store.h vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/PartialDiagnostic.h vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Driver/ToolChain.h vendor/clang/dist/include/clang/Driver/Types.def vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h vendor/clang/dist/include/clang/Frontend/PCHReader.h vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Lex/DirectoryLookup.h vendor/clang/dist/include/clang/Lex/HeaderMap.h vendor/clang/dist/include/clang/Lex/HeaderSearch.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/DeclSpec.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Rewrite/Rewriter.h vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h vendor/clang/dist/lib/AST/APValue.cpp vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclarationName.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/TypeLoc.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Analysis/AnalysisContext.cpp vendor/clang/dist/lib/Analysis/BasicConstraintManager.cpp vendor/clang/dist/lib/Analysis/BugReporter.cpp vendor/clang/dist/lib/Analysis/CFRefCount.cpp vendor/clang/dist/lib/Analysis/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/Analysis/Environment.cpp vendor/clang/dist/lib/Analysis/GRExprEngine.cpp vendor/clang/dist/lib/Analysis/GRState.cpp vendor/clang/dist/lib/Analysis/MemRegion.cpp vendor/clang/dist/lib/Analysis/OSAtomicChecker.cpp vendor/clang/dist/lib/Analysis/RangeConstraintManager.cpp vendor/clang/dist/lib/Analysis/RegionStore.cpp vendor/clang/dist/lib/Analysis/ReturnStackAddressChecker.cpp vendor/clang/dist/lib/Analysis/SVals.cpp vendor/clang/dist/lib/Analysis/SValuator.cpp vendor/clang/dist/lib/Analysis/SimpleConstraintManager.cpp vendor/clang/dist/lib/Analysis/SimpleConstraintManager.h vendor/clang/dist/lib/Analysis/SimpleSValuator.cpp vendor/clang/dist/lib/Analysis/Store.cpp vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.h vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprComplex.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGRTTI.cpp vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/CodeGen/CGVtable.h vendor/clang/dist/lib/CodeGen/CMakeLists.txt vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.h vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Types.cpp vendor/clang/dist/lib/Frontend/ASTConsumers.cpp vendor/clang/dist/lib/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FixItRewriter.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp vendor/clang/dist/lib/Frontend/PCHReaderStmt.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp vendor/clang/dist/lib/Frontend/PCHWriterStmt.cpp vendor/clang/dist/lib/Frontend/PrintParserCallbacks.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Lex/HeaderMap.cpp vendor/clang/dist/lib/Lex/HeaderSearch.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/LiteralSupport.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Rewrite/Rewriter.cpp vendor/clang/dist/lib/Sema/CMakeLists.txt vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp vendor/clang/dist/lib/Sema/IdentifierResolver.cpp vendor/clang/dist/lib/Sema/IdentifierResolver.h vendor/clang/dist/lib/Sema/Lookup.h vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaOverload.h vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/Analysis/CFDateGC.m vendor/clang/dist/test/Analysis/NSString.m vendor/clang/dist/test/Analysis/PR2599.m vendor/clang/dist/test/Analysis/casts.c vendor/clang/dist/test/Analysis/dead-stores.c vendor/clang/dist/test/Analysis/misc-ps-ranges.m vendor/clang/dist/test/Analysis/misc-ps-region-store.cpp vendor/clang/dist/test/Analysis/misc-ps-region-store.m vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/rdar-6442306-1.m vendor/clang/dist/test/Analysis/retain-release-basic-store.m vendor/clang/dist/test/Analysis/retain-release-region-store.m vendor/clang/dist/test/Analysis/retain-release.m vendor/clang/dist/test/Analysis/stack-addr-ps.c vendor/clang/dist/test/Analysis/uninit-vals-ps-region.c vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p4.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p4.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp vendor/clang/dist/test/CXX/temp/temp.param/p3.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p1.cpp vendor/clang/dist/test/CodeCompletion/enum-switch-case-qualified.cpp vendor/clang/dist/test/CodeCompletion/enum-switch-case.c vendor/clang/dist/test/CodeCompletion/enum-switch-case.cpp vendor/clang/dist/test/CodeCompletion/macros.c vendor/clang/dist/test/CodeCompletion/member-access.cpp vendor/clang/dist/test/CodeCompletion/namespace-alias.cpp vendor/clang/dist/test/CodeCompletion/namespace.cpp vendor/clang/dist/test/CodeCompletion/nested-name-specifier.cpp vendor/clang/dist/test/CodeCompletion/objc-message.m vendor/clang/dist/test/CodeCompletion/operator.cpp vendor/clang/dist/test/CodeCompletion/ordinary-name.c vendor/clang/dist/test/CodeCompletion/tag.c vendor/clang/dist/test/CodeCompletion/tag.cpp vendor/clang/dist/test/CodeCompletion/truncation.c vendor/clang/dist/test/CodeCompletion/using-namespace.cpp vendor/clang/dist/test/CodeCompletion/using.cpp vendor/clang/dist/test/CodeGen/complex.c vendor/clang/dist/test/CodeGen/ext-vector.c vendor/clang/dist/test/CodeGen/libcalls.c vendor/clang/dist/test/CodeGen/object-size.c vendor/clang/dist/test/CodeGenCXX/attr.cpp vendor/clang/dist/test/CodeGenCXX/condition.cpp vendor/clang/dist/test/CodeGenCXX/constructor-template.cpp vendor/clang/dist/test/CodeGenCXX/copy-assign-synthesis-3.cpp vendor/clang/dist/test/CodeGenCXX/default-constructor-default-argument.cpp vendor/clang/dist/test/CodeGenCXX/default-destructor-synthesis.cpp vendor/clang/dist/test/CodeGenCXX/delete-two-arg.cpp vendor/clang/dist/test/CodeGenCXX/dyncast.cpp vendor/clang/dist/test/CodeGenCXX/eh.cpp vendor/clang/dist/test/CodeGenCXX/expr.cpp vendor/clang/dist/test/CodeGenCXX/mangle.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp vendor/clang/dist/test/CodeGenCXX/reference-init.cpp vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/CodeGenCXX/virtual-destructor-calls.cpp vendor/clang/dist/test/CodeGenCXX/vtable-key-function.cpp vendor/clang/dist/test/CodeGenCXX/vtable-linkage.cpp vendor/clang/dist/test/Coverage/ast-printing.c vendor/clang/dist/test/Coverage/ast-printing.cpp vendor/clang/dist/test/Coverage/c-language-features.inc vendor/clang/dist/test/Driver/analyze.c vendor/clang/dist/test/Driver/clang_f_opts.c vendor/clang/dist/test/FixIt/typo.c vendor/clang/dist/test/FixIt/typo.cpp vendor/clang/dist/test/FixIt/typo.m vendor/clang/dist/test/Index/TestClassDecl.m vendor/clang/dist/test/Index/c-index-api-loadTU-test.m vendor/clang/dist/test/Index/c-index-getCursor-test.m vendor/clang/dist/test/Index/code-completion.cpp vendor/clang/dist/test/Index/complete-at-directives.m vendor/clang/dist/test/Index/complete-at-exprstmt.m vendor/clang/dist/test/Index/complete-objc-message.m vendor/clang/dist/test/Lexer/numeric-literal-trash.c vendor/clang/dist/test/Parser/cxx0x-literal-operators.cpp vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Preprocessor/stdint.c vendor/clang/dist/test/Sema/anonymous-struct-union.c vendor/clang/dist/test/Sema/attr-noreturn.c vendor/clang/dist/test/Sema/attr-section.c vendor/clang/dist/test/Sema/block-labels.c vendor/clang/dist/test/Sema/block-misc.c vendor/clang/dist/test/Sema/block-return.c vendor/clang/dist/test/Sema/compare.c vendor/clang/dist/test/Sema/complex-int.c vendor/clang/dist/test/Sema/conditional.c vendor/clang/dist/test/Sema/conversion.c vendor/clang/dist/test/Sema/declspec.c vendor/clang/dist/test/Sema/enum.c vendor/clang/dist/test/Sema/exprs.c vendor/clang/dist/test/Sema/format-strings.c vendor/clang/dist/test/Sema/i-c-e.c vendor/clang/dist/test/Sema/implicit-builtin-decl.c vendor/clang/dist/test/Sema/implicit-decl.c vendor/clang/dist/test/Sema/invalid-decl.c vendor/clang/dist/test/Sema/ms-fuzzy-asm.c vendor/clang/dist/test/Sema/overloadable.c vendor/clang/dist/test/Sema/parentheses.c vendor/clang/dist/test/Sema/self-comparison.c vendor/clang/dist/test/Sema/switch.c vendor/clang/dist/test/Sema/unused-expr.c vendor/clang/dist/test/Sema/var-redecl.c vendor/clang/dist/test/SemaCXX/aggregate-initialization.cpp vendor/clang/dist/test/SemaCXX/ambig-user-defined-conversions.cpp vendor/clang/dist/test/SemaCXX/attr-unavailable.cpp vendor/clang/dist/test/SemaCXX/builtin-ptrtomember-overload-1.cpp vendor/clang/dist/test/SemaCXX/composite-pointer-type.cpp vendor/clang/dist/test/SemaCXX/condition.cpp vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/constructor-initializer.cpp vendor/clang/dist/test/SemaCXX/conversion-function.cpp vendor/clang/dist/test/SemaCXX/converting-constructor.cpp vendor/clang/dist/test/SemaCXX/copy-initialization.cpp vendor/clang/dist/test/SemaCXX/dcl_init_aggr.cpp vendor/clang/dist/test/SemaCXX/decl-init-ref.cpp vendor/clang/dist/test/SemaCXX/default2.cpp vendor/clang/dist/test/SemaCXX/direct-initializer.cpp vendor/clang/dist/test/SemaCXX/functional-cast.cpp vendor/clang/dist/test/SemaCXX/implicit-virtual-member-functions.cpp vendor/clang/dist/test/SemaCXX/member-pointer.cpp vendor/clang/dist/test/SemaCXX/namespace.cpp vendor/clang/dist/test/SemaCXX/nested-name-spec.cpp vendor/clang/dist/test/SemaCXX/overload-call.cpp vendor/clang/dist/test/SemaCXX/overload-member-call.cpp vendor/clang/dist/test/SemaCXX/overloaded-builtin-operators.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp vendor/clang/dist/test/SemaCXX/rval-references.cpp vendor/clang/dist/test/SemaCXX/virtual-member-functions-key-function.cpp vendor/clang/dist/test/SemaCXX/warn-assignment-condition.cpp vendor/clang/dist/test/SemaObjC/bad-receiver-1.m vendor/clang/dist/test/SemaObjC/category-1.m vendor/clang/dist/test/SemaObjC/ivar-access-package.m vendor/clang/dist/test/SemaObjC/nonnull.m vendor/clang/dist/test/SemaObjC/property-9.m vendor/clang/dist/test/SemaObjC/protocol-archane.m vendor/clang/dist/test/SemaObjC/undef-class-messagin-error.m vendor/clang/dist/test/SemaObjC/undef-superclass-1.m vendor/clang/dist/test/SemaTemplate/ambiguous-ovl-print.cpp vendor/clang/dist/test/SemaTemplate/constructor-template.cpp vendor/clang/dist/test/SemaTemplate/default-expr-arguments.cpp vendor/clang/dist/test/SemaTemplate/explicit-instantiation.cpp vendor/clang/dist/test/SemaTemplate/fun-template-def.cpp vendor/clang/dist/test/SemaTemplate/function-template-specialization.cpp vendor/clang/dist/test/SemaTemplate/injected-class-name.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-4.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-class.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-expr.cpp vendor/clang/dist/test/SemaTemplate/instantiate-static-var.cpp vendor/clang/dist/test/SemaTemplate/instantiate-subscript.cpp vendor/clang/dist/test/SemaTemplate/temp_class_spec.cpp vendor/clang/dist/test/SemaTemplate/virtual-member-functions.cpp vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndex.exports vendor/clang/dist/tools/CIndex/CMakeLists.txt vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/driver/cc1_main.cpp vendor/clang/dist/utils/clang-completion-mode.el Modified: vendor/clang/dist/LICENSE.TXT ============================================================================== --- vendor/clang/dist/LICENSE.TXT Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/LICENSE.TXT Fri Jan 15 15:39:40 2010 (r202379) @@ -4,7 +4,7 @@ LLVM Release License University of Illinois/NCSA Open Source License -Copyright (c) 2007-2009 University of Illinois at Urbana-Champaign. +Copyright (c) 2007-2010 University of Illinois at Urbana-Champaign. All rights reserved. Developed by: Modified: vendor/clang/dist/docs/InternalsManual.html ============================================================================== --- vendor/clang/dist/docs/InternalsManual.html Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/docs/InternalsManual.html Fri Jan 15 15:39:40 2010 (r202379) @@ -289,7 +289,7 @@ Clang:

    Example:"must be a %select{unary|binary|unary or binary}2 operator" Class:Integers -Description:This format specifier is used to merge multiple +Description:

    This format specifier is used to merge multiple related diagnostics together into one common one, without requiring the difference to be specified as an English string argument. Instead of specifying the string, the diagnostic gets an integer argument and the @@ -298,7 +298,8 @@ Clang:

    it is 1 it prints 'binary' if it is 2, it prints 'unary or binary'. This allows other language translations to substitute reasonable words (or entire phrases) based on the semantics of the diagnostic instead of having to do - things textually. + things textually.

    +

    The selected string does undergo formatting.

    "plural" format Example:"you have %1 %plural{1:mouse|:mice}1 connected to @@ -330,6 +331,15 @@ Clang:

    abort, as will a failure to match the argument against any expression.

    +"ordinal" format +Example:"ambiguity in %ordinal0 argument" +Class:Integers +Description:

    This is a formatter which represents the + argument number as an ordinal: the value 1 becomes 1st, + 3 becomes 3rd, and so on. Values less than 1 + are not supported.

    +

    This formatter is currently hard-coded to use English ordinals.

    + "objcclass" format Example:"method %objcclass0 not found" Class:DeclarationName Modified: vendor/clang/dist/docs/LanguageExtensions.html ============================================================================== --- vendor/clang/dist/docs/LanguageExtensions.html Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/docs/LanguageExtensions.html Fri Jan 15 15:39:40 2010 (r202379) @@ -28,6 +28,19 @@ td {
  • C++ exceptions
  • C++ RTTI
  • +
  • Checks for Upcoming Standard Language Features
  • +
  • Blocks
  • Function Overloading in C
  • Builtin Functions @@ -216,6 +229,70 @@ example, compiling code with -fexcep compiling code with -fno-rtti disables the use of RTTI.

    +

    Checks for Upcoming Standard Language Features

    + + +

    The __has_feature macro can be used to query if certain upcoming +standard language features are enabled. Those features are listed here.

    + +

    Currently, all features listed here are slated for inclusion in the upcoming +C++0x standard. As a result, all the features that clang supports are enabled +with the -std=c++0x option when compiling C++ code. Features that are +not yet implemented will be noted.

    + +

    C++0x decltype()

    + +

    Use __has_feature(cxx_decltype) to determine if support for the +decltype() specifier is enabled.

    + +

    C++0x attributes

    + +

    Use __has_feature(cxx_attributes) to determine if support for +attribute parsing with C++0x's square bracket notation is enabled. + +

    C++0x deleted functions

    + +

    Use __has_feature(cxx_deleted_functions) to determine if support for +deleted function definitions (with = delete) is enabled. + +

    C++ TR concepts

    + +

    Use __has_feature(cxx_lambdas) to determine if support for +concepts is enabled. clang does not currently implement this feature. + +

    C++0x lambdas

    + +

    Use __has_feature(cxx_lambdas) to determine if support for +lambdas is enabled. clang does not currently implement this feature. + +

    C++0x nullptr

    + +

    Use __has_feature(cxx_nullptr) to determine if support for +nullptr is enabled. clang does not yet fully implement this feature. + +

    C++0x rvalue references

    + +

    Use __has_feature(cxx_rvalue_references) to determine if support for +rvalue references is enabled. clang does not yet fully implement this feature. + +

    C++0x static_assert()

    + +

    Use __has_feature(cxx_static_assert) to determine if support for +compile-time assertions using static_assert is enabled.

    + +

    C++0x type inference

    + +

    Use __has_feature(cxx_auto_type) to determine C++0x type inference +is supported using the auto specifier. If this is disabled, +auto will instead be a storage class specifier, as in C or C++98.

    + +

    C++0x variadic templates

    + +

    Use __has_feature(cxx_variadic_templates) to determine if support +for templates taking any number of arguments with the ellipsis notation is +enabled. clang does not yet fully implement this feature.

    + +

    Blocks

    Modified: vendor/clang/dist/examples/PrintFunctionNames/README.txt ============================================================================== --- vendor/clang/dist/examples/PrintFunctionNames/README.txt Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/examples/PrintFunctionNames/README.txt Fri Jan 15 15:39:40 2010 (r202379) @@ -6,5 +6,5 @@ TOOL_NO_EXPORT in the tools/clang Makefi Once the plugin is built, you can run it using: -- -$ clang -cc1 -load path/to/PrintFunctionNames.so -plugin=print-fns some-input-file.c +$ clang -cc1 -load path/to/PrintFunctionNames.so -plugin print-fns some-input-file.c -- Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang-c/Index.h Fri Jan 15 15:39:40 2010 (r202379) @@ -139,10 +139,14 @@ typedef struct { enum CXCursorKind kind; CXDecl decl; CXStmt stmt; /* expression reference */ + CXDecl referringDecl; } CXCursor; /* A unique token for looking up "visible" CXDecls from a CXTranslationUnit. */ -typedef void *CXEntity; +typedef struct { + CXIndex index; + void *data; +} CXEntity; /** * For functions returning a string that might or might not need @@ -321,20 +325,40 @@ CINDEX_LINKAGE time_t clang_getFileTime( /* * CXEntity Operations. */ -CINDEX_LINKAGE const char *clang_getDeclarationName(CXEntity); -CINDEX_LINKAGE const char *clang_getURI(CXEntity); -CINDEX_LINKAGE CXEntity clang_getEntity(const char *URI); + +/* clang_getDeclaration() maps from a CXEntity to the matching CXDecl (if any) + * in a specified translation unit. */ +CINDEX_LINKAGE CXDecl clang_getDeclaration(CXEntity, CXTranslationUnit); + /* * CXDecl Operations. */ CINDEX_LINKAGE CXCursor clang_getCursorFromDecl(CXDecl); -CINDEX_LINKAGE CXEntity clang_getEntityFromDecl(CXDecl); +CINDEX_LINKAGE CXEntity clang_getEntityFromDecl(CXIndex, CXDecl); CINDEX_LINKAGE CXString clang_getDeclSpelling(CXDecl); CINDEX_LINKAGE unsigned clang_getDeclLine(CXDecl); CINDEX_LINKAGE unsigned clang_getDeclColumn(CXDecl); +CINDEX_LINKAGE CXString clang_getDeclUSR(CXDecl); CINDEX_LINKAGE const char *clang_getDeclSource(CXDecl); /* deprecate */ CINDEX_LINKAGE CXFile clang_getDeclSourceFile(CXDecl); +typedef struct CXSourceLineColumn { + unsigned line; + unsigned column; +} CXSourceLineColumn; + +typedef struct CXDeclExtent { + CXSourceLineColumn begin; + CXSourceLineColumn end; +} CXSourceExtent; + +/* clang_getDeclExtent() returns the physical extent of a declaration. The + * beginning line/column pair points to the start of the first token in the + * declaration, and the ending line/column pair points to the last character in + * the last token of the declaration. + */ +CINDEX_LINKAGE CXSourceExtent clang_getDeclExtent(CXDecl); + /* * CXCursor Operations. */ @@ -564,7 +588,28 @@ enum CXCompletionChunkKind { * the text buffer. Rather, it is meant to illustrate the type that an * expression using the given completion string would have. */ - CXCompletionChunk_ResultType + CXCompletionChunk_ResultType, + /** + * \brief A colon (':'). + */ + CXCompletionChunk_Colon, + /** + * \brief A semicolon (';'). + */ + CXCompletionChunk_SemiColon, + /** + * \brief An '=' sign. + */ + CXCompletionChunk_Equal, + /** + * Horizontal space (' '). + */ + CXCompletionChunk_HorizontalSpace, + /** + * Vertical space ('\n'), after which it is generally a good idea to + * perform indentation. + */ + CXCompletionChunk_VerticalSpace }; /** Modified: vendor/clang/dist/include/clang/AST/APValue.h ============================================================================== --- vendor/clang/dist/include/clang/AST/APValue.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/APValue.h Fri Jan 15 15:39:40 2010 (r202379) @@ -18,6 +18,7 @@ #include "llvm/ADT/APFloat.h" namespace clang { + class CharUnits; class Expr; /// APValue - This class implements a discriminated union of [uninitialized] @@ -47,10 +48,6 @@ private: ComplexAPFloat() : Real(0.0), Imag(0.0) {} }; - struct LV { - Expr* Base; - uint64_t Offset; - }; struct Vec { APValue *Elts; unsigned NumElts; @@ -88,9 +85,11 @@ public: APValue(const APValue &RHS) : Kind(Uninitialized) { *this = RHS; } - APValue(Expr* B, uint64_t O) : Kind(Uninitialized) { + APValue(Expr* B, const CharUnits &O) : Kind(Uninitialized) { MakeLValue(); setLValue(B, O); } + APValue(Expr* B); + ~APValue() { MakeUninit(); } @@ -164,14 +163,8 @@ public: return const_cast(this)->getComplexFloatImag(); } - Expr* getLValueBase() const { - assert(isLValue() && "Invalid accessor"); - return ((const LV*)(const void*)Data)->Base; - } - uint64_t getLValueOffset() const { - assert(isLValue() && "Invalid accessor"); - return ((const LV*)(const void*)Data)->Offset; - } + Expr* getLValueBase() const; + CharUnits getLValueOffset() const; void setInt(const APSInt &I) { assert(isInt() && "Invalid accessor"); @@ -202,11 +195,7 @@ public: ((ComplexAPFloat*)(char*)Data)->Real = R; ((ComplexAPFloat*)(char*)Data)->Imag = I; } - void setLValue(Expr *B, uint64_t O) { - assert(isLValue() && "Invalid accessor"); - ((LV*)(char*)Data)->Base = B; - ((LV*)(char*)Data)->Offset = O; - } + void setLValue(Expr *B, const CharUnits &O); const APValue &operator=(const APValue &RHS); @@ -237,11 +226,7 @@ private: new ((void*)(char*)Data) ComplexAPFloat(); Kind = ComplexFloat; } - void MakeLValue() { - assert(isUninit() && "Bad state change"); - new ((void*)(char*)Data) LV(); - Kind = LValue; - } + void MakeLValue(); }; inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const APValue &V) { Modified: vendor/clang/dist/include/clang/AST/ASTContext.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTContext.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/ASTContext.h Fri Jan 15 15:39:40 2010 (r202379) @@ -699,8 +699,8 @@ public: ObjCProtocolDecl *rProto); /// getObjCEncodingTypeSize returns size of type for objective-c encoding - /// purpose. - int getObjCEncodingTypeSize(QualType t); + /// purpose in characters. + CharUnits getObjCEncodingTypeSize(QualType t); /// This setter/getter represents the ObjC 'id' type. It is setup lazily, by /// Sema. id is always a (typedef for a) pointer type, a pointer to a struct. @@ -898,17 +898,18 @@ public: return getCanonicalType(T1) == getCanonicalType(T2); } - /// \brief Returns this type as a completely-unqualified array type, capturing - /// the qualifiers in Quals. This only operates on canonical types in order - /// to ensure the ArrayType doesn't itself have qualifiers. + /// \brief Returns this type as a completely-unqualified array type, + /// capturing the qualifiers in Quals. This will remove the minimal amount of + /// sugaring from the types, similar to the behavior of + /// QualType::getUnqualifiedType(). /// - /// \param T is the canonicalized QualType, which may be an ArrayType + /// \param T is the qualified type, which may be an ArrayType /// /// \param Quals will receive the full set of qualifiers that were - /// applied to the element type of the array. + /// applied to the array. /// /// \returns if this is an array type, the completely unqualified array type - /// that corresponds to it. Otherwise, returns this->getUnqualifiedType(). + /// that corresponds to it. Otherwise, returns T.getUnqualifiedType(). QualType getUnqualifiedArrayType(QualType T, Qualifiers &Quals); /// \brief Determine whether the given types are equivalent after @@ -996,7 +997,10 @@ public: const IncompleteArrayType *getAsIncompleteArrayType(QualType T) { return dyn_cast_or_null(getAsArrayType(T)); } - + const DependentSizedArrayType *getAsDependentSizedArrayType(QualType T) { + return dyn_cast_or_null(getAsArrayType(T)); + } + /// getBaseElementType - Returns the innermost element type of an array type. /// For example, will return "int" for int[m][n] QualType getBaseElementType(const ArrayType *VAT); Modified: vendor/clang/dist/include/clang/AST/Attr.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Attr.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/Attr.h Fri Jan 15 15:39:40 2010 (r202379) @@ -55,8 +55,6 @@ public: Cleanup, Const, Constructor, - DLLExport, - DLLImport, Deprecated, Destructor, FastCall, @@ -93,7 +91,12 @@ public: Visibility, WarnUnusedResult, Weak, - WeakImport + WeakImport, + + FIRST_TARGET_ATTRIBUTE, + DLLExport, + DLLImport, + MSP430Interrupt }; private: @@ -158,7 +161,7 @@ public: class ATTR##Attr : public Attr { \ public: \ ATTR##Attr() : Attr(ATTR) {} \ - virtual Attr *clone(ASTContext &C) const { return ::new (C) ATTR##Attr; }\ + virtual Attr *clone(ASTContext &C) const; \ static bool classof(const Attr *A) { return A->getKind() == ATTR; } \ static bool classof(const ATTR##Attr *A) { return true; } \ } @@ -174,9 +177,7 @@ public: /// getAlignment - The specified alignment in bits. unsigned getAlignment() const { return Alignment; } - virtual Attr* clone(ASTContext &C) const { - return ::new (C) PragmaPackAttr(Alignment); - } + virtual Attr* clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { @@ -203,9 +204,7 @@ public: return Alignment; } - virtual Attr* clone(ASTContext &C) const { - return ::new (C) AlignedAttr(Alignment); - } + virtual Attr* clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { @@ -221,7 +220,7 @@ public: const std::string& getAnnotation() const { return Annotation; } - virtual Attr* clone(ASTContext &C) const { return ::new (C) AnnotateAttr(Annotation); } + virtual Attr* clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { @@ -237,7 +236,7 @@ public: const std::string& getLabel() const { return Label; } - virtual Attr* clone(ASTContext &C) const { return ::new (C) AsmLabelAttr(Label); } + virtual Attr* clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { @@ -255,7 +254,7 @@ public: const std::string& getAliasee() const { return Aliasee; } - virtual Attr *clone(ASTContext &C) const { return ::new (C) AliasAttr(Aliasee); } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { return A->getKind() == Alias; } @@ -269,7 +268,7 @@ public: int getPriority() const { return priority; } - virtual Attr *clone(ASTContext &C) const { return ::new (C) ConstructorAttr(priority); } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { return A->getKind() == Constructor; } @@ -283,7 +282,7 @@ public: int getPriority() const { return priority; } - virtual Attr *clone(ASTContext &C) const { return ::new (C) DestructorAttr(priority); } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { return A->getKind() == Destructor; } @@ -294,7 +293,7 @@ class GNUInlineAttr : public Attr { public: GNUInlineAttr() : Attr(GNUInline) {} - virtual Attr *clone(ASTContext &C) const { return ::new (C) GNUInlineAttr; } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { @@ -307,7 +306,7 @@ class IBOutletAttr : public Attr { public: IBOutletAttr() : Attr(IBOutletKind) {} - virtual Attr *clone(ASTContext &C) const { return ::new (C) IBOutletAttr; } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { @@ -329,7 +328,7 @@ public: const std::string& getName() const { return Name; } - virtual Attr *clone(ASTContext &C) const { return ::new (C) SectionAttr(Name); } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { @@ -374,7 +373,7 @@ public: return ArgNums ? std::binary_search(ArgNums, ArgNums+Size, arg) : true; } - virtual Attr *clone(ASTContext &C) const { return ::new (C) NonNullAttr(ArgNums, Size); } + virtual Attr *clone(ASTContext &C) const; static bool classof(const Attr *A) { return A->getKind() == NonNull; } static bool classof(const NonNullAttr *A) { return true; } @@ -392,9 +391,7 @@ public: int getFormatIdx() const { return formatIdx; } int getFirstArg() const { return firstArg; } - virtual Attr *clone(ASTContext &C) const { - return ::new (C) FormatAttr(Type, formatIdx, firstArg); - } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { return A->getKind() == Format; } @@ -407,9 +404,7 @@ public: FormatArgAttr(int idx) : Attr(FormatArg), formatIdx(idx) {} int getFormatIdx() const { return formatIdx; } - virtual Attr *clone(ASTContext &C) const { - return ::new (C) FormatArgAttr(formatIdx); - } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { return A->getKind() == FormatArg; } @@ -424,9 +419,7 @@ public: int getSentinel() const { return sentinel; } int getNullPos() const { return NullPos; } - virtual Attr *clone(ASTContext &C) const { - return ::new (C) SentinelAttr(sentinel, NullPos); - } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { return A->getKind() == Sentinel; } @@ -449,15 +442,13 @@ public: VisibilityTypes getVisibility() const { return VisibilityType; } - virtual Attr *clone(ASTContext &C) const { return ::new (C) VisibilityAttr(VisibilityType); } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { return A->getKind() == Visibility; } static bool classof(const VisibilityAttr *A) { return true; } }; -DEF_SIMPLE_ATTR(DLLImport); -DEF_SIMPLE_ATTR(DLLExport); DEF_SIMPLE_ATTR(FastCall); DEF_SIMPLE_ATTR(StdCall); DEF_SIMPLE_ATTR(CDecl); @@ -471,9 +462,7 @@ public: virtual bool isMerged() const { return false; } - virtual Attr *clone(ASTContext &C) const { - return ::new (C) OverloadableAttr; - } + virtual Attr *clone(ASTContext &C) const; static bool classof(const Attr *A) { return A->getKind() == Overloadable; } static bool classof(const OverloadableAttr *) { return true; } @@ -491,7 +480,7 @@ public: BlocksAttrTypes getType() const { return BlocksAttrType; } - virtual Attr *clone(ASTContext &C) const { return ::new (C) BlocksAttr(BlocksAttrType); } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { return A->getKind() == Blocks; } @@ -508,7 +497,7 @@ public: const FunctionDecl *getFunctionDecl() const { return FD; } - virtual Attr *clone(ASTContext &C) const { return ::new (C) CleanupAttr(FD); } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { return A->getKind() == Cleanup; } @@ -527,9 +516,7 @@ public: unsigned getNumParams() const { return NumParams; } - virtual Attr *clone(ASTContext &C) const { - return ::new (C) RegparmAttr(NumParams); - } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { return A->getKind() == Regparm; } @@ -546,9 +533,7 @@ public: unsigned getYDim() const { return Y; } unsigned getZDim() const { return Z; } - virtual Attr *clone(ASTContext &C) const { - return ::new (C) ReqdWorkGroupSizeAttr(X, Y, Z); - } + virtual Attr *clone(ASTContext &C) const; // Implement isa/cast/dyncast/etc. static bool classof(const Attr *A) { @@ -566,6 +551,25 @@ DEF_SIMPLE_ATTR(BaseCheck); DEF_SIMPLE_ATTR(Hiding); DEF_SIMPLE_ATTR(Override); +// Target-specific attributes +DEF_SIMPLE_ATTR(DLLImport); +DEF_SIMPLE_ATTR(DLLExport); + +class MSP430InterruptAttr : public Attr { + unsigned Number; + +public: + MSP430InterruptAttr(unsigned n) : Attr(MSP430Interrupt), Number(n) {} + + unsigned getNumber() const { return Number; } + + virtual Attr *clone(ASTContext &C) const; + + // Implement isa/cast/dyncast/etc. + static bool classof(const Attr *A) { return A->getKind() == MSP430Interrupt; } + static bool classof(const MSP430InterruptAttr *A) { return true; } +}; + #undef DEF_SIMPLE_ATTR } // end namespace clang Modified: vendor/clang/dist/include/clang/AST/CharUnits.h ============================================================================== --- vendor/clang/dist/include/clang/AST/CharUnits.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/CharUnits.h Fri Jan 15 15:39:40 2010 (r202379) @@ -36,12 +36,12 @@ namespace clang { /// in character units. class CharUnits { public: - typedef int64_t RawType; + typedef int64_t QuantityType; private: - RawType Quantity; + QuantityType Quantity; - explicit CharUnits(RawType C) : Quantity(C) {} + explicit CharUnits(QuantityType C) : Quantity(C) {} public: @@ -58,8 +58,8 @@ namespace clang { return CharUnits(1); } - /// fromRaw - Construct a CharUnits quantity from a raw integer type. - static CharUnits fromRaw(RawType Quantity) { + /// fromQuantity - Construct a CharUnits quantity from a raw integer type. + static CharUnits fromQuantity(QuantityType Quantity) { return CharUnits(Quantity); } @@ -103,26 +103,26 @@ namespace clang { /// isOne - Test whether the quantity equals one. bool isOne() const { return Quantity == 1; } - /// isPositive - Test whether the quanity is greater than zero. + /// isPositive - Test whether the quantity is greater than zero. bool isPositive() const { return Quantity > 0; } /// isNegative - Test whether the quantity is less than zero. bool isNegative() const { return Quantity < 0; } // Arithmetic operators. - CharUnits operator* (RawType N) const { + CharUnits operator* (QuantityType N) const { return CharUnits(Quantity * N); } - CharUnits operator/ (RawType N) const { + CharUnits operator/ (QuantityType N) const { return CharUnits(Quantity / N); } - RawType operator/ (const CharUnits &Other) const { + QuantityType operator/ (const CharUnits &Other) const { return Quantity / Other.Quantity; } - CharUnits operator% (RawType N) const { + CharUnits operator% (QuantityType N) const { return CharUnits(Quantity % N); } - RawType operator% (const CharUnits &Other) const { + QuantityType operator% (const CharUnits &Other) const { return Quantity % Other.Quantity; } CharUnits operator+ (const CharUnits &Other) const { @@ -134,14 +134,14 @@ namespace clang { // Conversions. - /// getRaw - Get the raw integer representation of this quantity. - RawType getRaw() const { return Quantity; } + /// getQuantity - Get the raw integer representation of this quantity. + QuantityType getQuantity() const { return Quantity; } }; // class CharUnit } // namespace clang -inline clang::CharUnits operator* (clang::CharUnits::RawType Scale, +inline clang::CharUnits operator* (clang::CharUnits::QuantityType Scale, const clang::CharUnits &CU) { return CU * Scale; } Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/Decl.h Fri Jan 15 15:39:40 2010 (r202379) @@ -1184,6 +1184,8 @@ public: OverloadedOperatorKind getOverloadedOperator() const; + const IdentifierInfo *getLiteralIdentifier() const; + /// \brief If this function is an instantiation of a member function /// of a class template specialization, retrieves the function from /// which it was instantiated. Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclCXX.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/DeclCXX.h Fri Jan 15 15:39:40 2010 (r202379) @@ -393,6 +393,9 @@ public: return reverse_base_class_const_iterator(vbases_begin()); } + /// \brief Determine whether this class has any dependent base classes. + bool hasAnyDependentBases() const; + /// Iterator access to method members. The method iterator visits /// all method members of the class, including non-instance methods, /// special methods, etc. Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclObjC.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/DeclObjC.h Fri Jan 15 15:39:40 2010 (r202379) @@ -289,7 +289,9 @@ struct ObjCMethodList { /// ObjCProtocolDecl, and ObjCImplDecl. /// class ObjCContainerDecl : public NamedDecl, public DeclContext { - SourceLocation AtEndLoc; // marks the end of the method container. + // These two locations in the range mark the end of the method container. + // The first points to the '@' token, and the second to the 'end' token. + SourceRange AtEnd; public: ObjCContainerDecl(Kind DK, DeclContext *DC, SourceLocation L, @@ -351,11 +353,15 @@ public: IdentifierInfo *PropertyId) const; // Marks the end of the container. - SourceLocation getAtEndLoc() const { return AtEndLoc; } - void setAtEndLoc(SourceLocation L) { AtEndLoc = L; } + SourceRange getAtEndRange() const { + return AtEnd; + } + void setAtEndRange(SourceRange atEnd) { + AtEnd = atEnd; + } virtual SourceRange getSourceRange() const { - return SourceRange(getLocation(), getAtEndLoc()); + return SourceRange(getLocation(), getAtEndRange().getEnd()); } // Implement isa/cast/dyncast/etc. Modified: vendor/clang/dist/include/clang/AST/DeclarationName.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclarationName.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/DeclarationName.h Fri Jan 15 15:39:40 2010 (r202379) @@ -190,6 +190,14 @@ public: /// getNameKind - Determine what kind of name this is. NameKind getNameKind() const; + /// \brief Determines whether the name itself is dependent, e.g., because it + /// involves a C++ type that is itself dependent. + /// + /// Note that this does not capture all of the notions of "dependent name", + /// because an identifier can be a dependent name if it is used as the + /// callee in a call expression with dependent arguments. + bool isDependentName() const; + /// getName - Retrieve the human-readable string for this name. std::string getAsString() const; @@ -301,6 +309,7 @@ inline bool operator>=(DeclarationName L class DeclarationNameTable { void *CXXSpecialNamesImpl; // Actually a FoldingSet * CXXOperatorIdName *CXXOperatorNames; // Operator names + void *CXXLiteralOperatorNames; // Actually a FoldingSet<...> * DeclarationNameTable(const DeclarationNameTable&); // NONCOPYABLE DeclarationNameTable& operator=(const DeclarationNameTable&); // NONCOPYABLE Modified: vendor/clang/dist/include/clang/AST/Expr.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Expr.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/Expr.h Fri Jan 15 15:39:40 2010 (r202379) @@ -241,6 +241,11 @@ public: /// stack based objects. bool EvaluateAsAny(EvalResult &Result, ASTContext &Ctx) const; + /// EvaluateAsBooleanCondition - Return true if this is a constant + /// which we we can fold and convert to a boolean condition using + /// any crazy technique that we want to. + bool EvaluateAsBooleanCondition(bool &Result, ASTContext &Ctx) const; + /// isEvaluatable - Call Evaluate to see if this expression can be constant /// folded, but discard the result. bool isEvaluatable(ASTContext &Ctx) const; @@ -2552,7 +2557,7 @@ private: unsigned NumSubExprs : 16; - DesignatedInitExpr(QualType Ty, unsigned NumDesignators, + DesignatedInitExpr(ASTContext &C, QualType Ty, unsigned NumDesignators, const Designator *Designators, SourceLocation EqualOrColonLoc, bool GNUSyntax, Expr **IndexExprs, unsigned NumIndexExprs, @@ -2565,6 +2570,8 @@ private: protected: virtual void DoDestroy(ASTContext &C); + void DestroyDesignators(ASTContext &C); + public: /// A field designator, e.g., ".x". struct FieldDesignator { @@ -2732,7 +2739,8 @@ public: Designator *getDesignator(unsigned Idx) { return &designators_begin()[Idx]; } - void setDesignators(const Designator *Desigs, unsigned NumDesigs); + void setDesignators(ASTContext &C, const Designator *Desigs, + unsigned NumDesigs); Expr *getArrayIndex(const Designator& D); Expr *getArrayRangeStart(const Designator& D); @@ -2779,7 +2787,7 @@ public: /// \brief Replaces the designator at index @p Idx with the series /// of designators in [First, Last). - void ExpandDesignator(unsigned Idx, const Designator *First, + void ExpandDesignator(ASTContext &C, unsigned Idx, const Designator *First, const Designator *Last); virtual SourceRange getSourceRange() const; Modified: vendor/clang/dist/include/clang/AST/ExprCXX.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ExprCXX.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/ExprCXX.h Fri Jan 15 15:39:40 2010 (r202379) @@ -324,17 +324,21 @@ public: /// @endcode class CXXThisExpr : public Expr { SourceLocation Loc; - + bool Implicit : 1; + public: - CXXThisExpr(SourceLocation L, QualType Type) + CXXThisExpr(SourceLocation L, QualType Type, bool isImplicit) : Expr(CXXThisExprClass, Type, // 'this' is type-dependent if the class type of the enclosing // member function is dependent (C++ [temp.dep.expr]p2) Type->isDependentType(), Type->isDependentType()), - Loc(L) { } + Loc(L), Implicit(isImplicit) { } virtual SourceRange getSourceRange() const { return SourceRange(Loc); } + bool isImplicit() const { return Implicit; } + void setImplicit(bool I) { Implicit = I; } + static bool classof(const Stmt *T) { return T->getStmtClass() == CXXThisExprClass; } Modified: vendor/clang/dist/include/clang/AST/Stmt.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Stmt.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/Stmt.h Fri Jan 15 15:39:40 2010 (r202379) @@ -1116,6 +1116,7 @@ class AsmStmt : public Stmt { bool IsSimple; bool IsVolatile; + bool MSAsm; unsigned NumOutputs; unsigned NumInputs; @@ -1126,7 +1127,7 @@ class AsmStmt : public Stmt { llvm::SmallVector Clobbers; public: - AsmStmt(SourceLocation asmloc, bool issimple, bool isvolatile, + AsmStmt(SourceLocation asmloc, bool issimple, bool isvolatile, bool msasm, unsigned numoutputs, unsigned numinputs, std::string *names, StringLiteral **constraints, Expr **exprs, StringLiteral *asmstr, unsigned numclobbers, @@ -1143,7 +1144,9 @@ public: bool isVolatile() const { return IsVolatile; } void setVolatile(bool V) { IsVolatile = V; } bool isSimple() const { return IsSimple; } - void setSimple(bool V) { IsSimple = false; } + void setSimple(bool V) { IsSimple = V; } + bool isMSAsm() const { return MSAsm; } + void setMSAsm(bool V) { MSAsm = V; } //===--- Asm String Analysis ---===// Modified: vendor/clang/dist/include/clang/AST/TypeLoc.h ============================================================================== --- vendor/clang/dist/include/clang/AST/TypeLoc.h Fri Jan 15 15:38:53 2010 (r202378) +++ vendor/clang/dist/include/clang/AST/TypeLoc.h Fri Jan 15 15:39:40 2010 (r202379) @@ -1029,18 +1029,88 @@ class ComplexTypeLoc : public Inheriting ComplexType> { }; -// FIXME: location of the 'typeof' and parens (the expression is -// carried by the type). -class TypeOfExprTypeLoc : public InheritingConcreteTypeLoc { -}; - -// FIXME: location of the 'typeof' and parens; also the TypeSourceInfo -// for the inner type, or (maybe) just express that inline to the TypeLoc. -class TypeOfTypeLoc : public InheritingConcreteTypeLoc { +struct TypeofLocInfo { + SourceLocation TypeofLoc; + SourceLocation LParenLoc; + SourceLocation RParenLoc; +}; + +struct TypeOfExprTypeLocInfo : public TypeofLocInfo { +}; + +struct TypeOfTypeLocInfo : public TypeofLocInfo { + TypeSourceInfo* UnderlyingTInfo; +}; + +template +class TypeofLikeTypeLoc + : public ConcreteTypeLoc { +public: + SourceLocation getTypeofLoc() const { + return this->getLocalData()->TypeofLoc; + } + void setTypeofLoc(SourceLocation Loc) { + this->getLocalData()->TypeofLoc = Loc; + } + + SourceLocation getLParenLoc() const { + return this->getLocalData()->LParenLoc; + } + void setLParenLoc(SourceLocation Loc) { + this->getLocalData()->LParenLoc = Loc; + } + + SourceLocation getRParenLoc() const { + return this->getLocalData()->RParenLoc; + } + void setRParenLoc(SourceLocation Loc) { + this->getLocalData()->RParenLoc = Loc; + } + + SourceRange getParensRange() const { + return SourceRange(getLParenLoc(), getRParenLoc()); + } + void setParensRange(SourceRange range) { + setLParenLoc(range.getBegin()); + setRParenLoc(range.getEnd()); + } + + SourceRange getSourceRange() const { + return SourceRange(getTypeofLoc(), getRParenLoc()); + } + + void initializeLocal(SourceLocation Loc) { + setTypeofLoc(Loc); + setLParenLoc(Loc); + setRParenLoc(Loc); + } +}; + +class TypeOfExprTypeLoc : public TypeofLikeTypeLoc { +public: + Expr* getUnderlyingExpr() const { + return getTypePtr()->getUnderlyingExpr(); + } + // Reimplemented to account for GNU/C++ extension + // typeof unary-expression + // where there are no parentheses. + SourceRange getSourceRange() const; +}; + +class TypeOfTypeLoc + : public TypeofLikeTypeLoc { +public: + QualType getUnderlyingType() const { + return this->getTypePtr()->getUnderlyingType(); + } + TypeSourceInfo* getUnderlyingTInfo() const { + return this->getLocalData()->UnderlyingTInfo; + } + void setUnderlyingTInfo(TypeSourceInfo* TI) const { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:40:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E5471065692; Fri, 15 Jan 2010 15:40:45 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B2658FC16; Fri, 15 Jan 2010 15:40:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFej8W015279; Fri, 15 Jan 2010 15:40:45 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFeiUj015275; Fri, 15 Jan 2010 15:40:44 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151540.o0FFeiUj015275@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202380 - stable/8/sys/dev/mk48txx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:40:45 -0000 Author: marius Date: Fri Jan 15 15:40:44 2010 New Revision: 202380 URL: http://svn.freebsd.org/changeset/base/202380 Log: MFC: r201003 Style changes Modified: stable/8/sys/dev/mk48txx/mk48txx.c stable/8/sys/dev/mk48txx/mk48txxreg.h stable/8/sys/dev/mk48txx/mk48txxvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mk48txx/mk48txx.c ============================================================================== --- stable/8/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:39:40 2010 (r202379) +++ stable/8/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:40:44 2010 (r202380) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); /* - * Mostek MK48T02, MK48T08, MK48T18, MK48T59 time-of-day chip subroutines. + * Mostek MK48T02, MK48T08, MK48T18, MK48T59 time-of-day chip subroutines */ #include @@ -59,17 +59,17 @@ __FBSDID("$FreeBSD$"); #include "clock_if.h" -static uint8_t mk48txx_def_nvrd(device_t, int); -static void mk48txx_def_nvwr(device_t, int, uint8_t); -static void mk48txx_watchdog(void *, u_int, int *); +static uint8_t mk48txx_def_nvrd(device_t dev, int off); +static void mk48txx_def_nvwr(device_t dev, int off, uint8_t v); +static void mk48txx_watchdog(void *arg, u_int cmd, int *error); -struct { +static const struct { const char *name; bus_size_t nvramsz; bus_size_t clkoff; - int flags; -#define MK48TXX_EXT_REGISTERS 1 /* Has extended register set */ -} mk48txx_models[] = { + u_int flags; +#define MK48TXX_EXT_REGISTERS 1 /* Has extended register set. */ +} const mk48txx_models[] = { { "mk48t02", MK48T02_CLKSZ, MK48T02_CLKOFF, 0 }, { "mk48t08", MK48T08_CLKSZ, MK48T08_CLKOFF, 0 }, { "mk48t18", MK48T18_CLKSZ, MK48T18_CLKOFF, 0 }, @@ -112,7 +112,7 @@ mk48txx_attach(device_t dev) if (mk48txx_models[i].flags & MK48TXX_EXT_REGISTERS) { mtx_lock(&sc->sc_mtx); - if ((*sc->sc_nvrd)(dev, sc->sc_clkoffset + MK48TXX_FLAGS) & + if ((*sc->sc_nvrd)(dev, sc->sc_clkoffset + MK48TXX_FLAGS) & MK48TXX_FLAGS_BL) { mtx_unlock(&sc->sc_mtx); device_printf(dev, "%s: battery low\n", __func__); @@ -140,7 +140,7 @@ mk48txx_attach(device_t dev) } } - clock_register(dev, 1000000); /* 1 second resolution. */ + clock_register(dev, 1000000); /* 1 second resolution */ if ((sc->sc_flag & MK48TXX_WDOG_REGISTER) && (mk48txx_models[i].flags & MK48TXX_EXT_REGISTERS)) { Modified: stable/8/sys/dev/mk48txx/mk48txxreg.h ============================================================================== --- stable/8/sys/dev/mk48txx/mk48txxreg.h Fri Jan 15 15:39:40 2010 (r202379) +++ stable/8/sys/dev/mk48txx/mk48txxreg.h Fri Jan 15 15:40:44 2010 (r202380) @@ -59,23 +59,23 @@ * The first bank of eight registers at offset (nvramsz - 16) is * available only on recenter (which?) MK48Txx models. */ -#define MK48TXX_FLAGS 0 /* flags register */ -#define MK48TXX_UNUSED 1 /* unused */ -#define MK48TXX_ASEC 2 /* alarm seconds (0..59; BCD) */ -#define MK48TXX_AMIN 3 /* alarm minutes (0..59; BCD) */ -#define MK48TXX_AHOUR 4 /* alarm hours (0..23; BCD) */ -#define MK48TXX_ADAY 5 /* alarm day in month (1..31; BCD) */ -#define MK48TXX_INTR 6 /* interrupts register */ -#define MK48TXX_WDOG 7 /* watchdog register */ - -#define MK48TXX_ICSR 8 /* control register */ -#define MK48TXX_ISEC 9 /* seconds (0..59; BCD) */ -#define MK48TXX_IMIN 10 /* minutes (0..59; BCD) */ -#define MK48TXX_IHOUR 11 /* hours (0..23; BCD) */ -#define MK48TXX_IWDAY 12 /* weekday (1..7) */ -#define MK48TXX_IDAY 13 /* day in month (1..31; BCD) */ -#define MK48TXX_IMON 14 /* month (1..12; BCD) */ -#define MK48TXX_IYEAR 15 /* year (0..99; BCD) */ +#define MK48TXX_FLAGS 0 /* flags register */ +#define MK48TXX_UNUSED 1 /* unused */ +#define MK48TXX_ASEC 2 /* alarm seconds (0..59; BCD) */ +#define MK48TXX_AMIN 3 /* alarm minutes (0..59; BCD) */ +#define MK48TXX_AHOUR 4 /* alarm hours (0..23; BCD) */ +#define MK48TXX_ADAY 5 /* alarm day in month (1..31; BCD) */ +#define MK48TXX_INTR 6 /* interrupts register */ +#define MK48TXX_WDOG 7 /* watchdog register */ + +#define MK48TXX_ICSR 8 /* control register */ +#define MK48TXX_ISEC 9 /* seconds (0..59; BCD) */ +#define MK48TXX_IMIN 10 /* minutes (0..59; BCD) */ +#define MK48TXX_IHOUR 11 /* hours (0..23; BCD) */ +#define MK48TXX_IWDAY 12 /* weekday (1..7) */ +#define MK48TXX_IDAY 13 /* day in month (1..31; BCD) */ +#define MK48TXX_IMON 14 /* month (1..12; BCD) */ +#define MK48TXX_IYEAR 15 /* year (0..99; BCD) */ /* * Note that some of the bits below that are not in the first eight @@ -84,80 +84,80 @@ */ /* Bits in the flags register (extended only) */ -#define MK48TXX_FLAGS_BL 0x10 /* battery low (read only) */ -#define MK48TXX_FLAGS_AF 0x40 /* alarm flag (read only) */ -#define MK48TXX_FLAGS_WDF 0x80 /* watchdog flag (read only) */ +#define MK48TXX_FLAGS_BL 0x10 /* battery low (read only) */ +#define MK48TXX_FLAGS_AF 0x40 /* alarm flag (read only) */ +#define MK48TXX_FLAGS_WDF 0x80 /* watchdog flag (read only) */ /* Bits in the alarm seconds register (extended only) */ -#define MK48TXX_ASEC_MASK 0x7f /* mask for alarm seconds */ -#define MK48TXX_ASEC_RPT1 0x80 /* alarm repeat mode bit 1 */ +#define MK48TXX_ASEC_MASK 0x7f /* mask for alarm seconds */ +#define MK48TXX_ASEC_RPT1 0x80 /* alarm repeat mode bit 1 */ /* Bits in the alarm minutes register (extended only) */ -#define MK48TXX_AMIN_MASK 0x7f /* mask for alarm minutes */ -#define MK48TXX_AMIN_RPT2 0x80 /* alarm repeat mode bit 2 */ +#define MK48TXX_AMIN_MASK 0x7f /* mask for alarm minutes */ +#define MK48TXX_AMIN_RPT2 0x80 /* alarm repeat mode bit 2 */ /* Bits in the alarm hours register (extended only) */ -#define MK48TXX_AHOUR_MASK 0x3f /* mask for alarm hours */ -#define MK48TXX_AHOUR_RPT3 0x80 /* alarm repeat mode bit 3 */ +#define MK48TXX_AHOUR_MASK 0x3f /* mask for alarm hours */ +#define MK48TXX_AHOUR_RPT3 0x80 /* alarm repeat mode bit 3 */ /* Bits in the alarm day in month register (extended only) */ -#define MK48TXX_ADAY_MASK 0x3f /* mask for alarm day in month */ -#define MK48TXX_ADAY_RPT4 0x80 /* alarm repeat mode bit 4 */ +#define MK48TXX_ADAY_MASK 0x3f /* mask for alarm day in month */ +#define MK48TXX_ADAY_RPT4 0x80 /* alarm repeat mode bit 4 */ /* Bits in the interrupts register (extended only) */ -#define MK48TXX_INTR_ABE 0x20 /* alarm in battery back-up mode */ -#define MK48TXX_INTR_AFE 0x80 /* alarm flag enable */ +#define MK48TXX_INTR_ABE 0x20 /* alarm in battery back-up mode */ +#define MK48TXX_INTR_AFE 0x80 /* alarm flag enable */ /* Bits in the watchdog register (extended only) */ -#define MK48TXX_WDOG_RB_1_16 0x00 /* watchdog resolution 1/16 second */ -#define MK48TXX_WDOG_RB_1_4 0x01 /* watchdog resolution 1/4 second */ -#define MK48TXX_WDOG_RB_1 0x02 /* watchdog resolution 1 second */ -#define MK48TXX_WDOG_RB_4 0x03 /* watchdog resolution 4 seconds */ -#define MK48TXX_WDOG_BMB_MASK 0x7c /* mask for watchdog multiplier */ -#define MK48TXX_WDOG_BMB_SHIFT 2 /* shift for watchdog multiplier */ -#define MK48TXX_WDOG_WDS 0x80 /* watchdog steering bit */ +#define MK48TXX_WDOG_RB_1_16 0x00 /* watchdog resolution 1/16 second */ +#define MK48TXX_WDOG_RB_1_4 0x01 /* watchdog resolution 1/4 second */ +#define MK48TXX_WDOG_RB_1 0x02 /* watchdog resolution 1 second */ +#define MK48TXX_WDOG_RB_4 0x03 /* watchdog resolution 4 seconds */ +#define MK48TXX_WDOG_BMB_MASK 0x7c /* mask for watchdog multiplier */ +#define MK48TXX_WDOG_BMB_SHIFT 2 /* shift for watchdog multiplier */ +#define MK48TXX_WDOG_WDS 0x80 /* watchdog steering bit */ /* Bits in the control register */ -#define MK48TXX_CSR_CALIB_MASK 0x1f /* mask for calibration step width */ -#define MK48TXX_CSR_SIGN 0x20 /* sign of above calibration witdh */ -#define MK48TXX_CSR_READ 0x40 /* want to read (freeze clock) */ -#define MK48TXX_CSR_WRITE 0x80 /* want to write */ +#define MK48TXX_CSR_CALIB_MASK 0x1f /* mask for calibration step width */ +#define MK48TXX_CSR_SIGN 0x20 /* sign of above calibration witdh */ +#define MK48TXX_CSR_READ 0x40 /* want to read (freeze clock) */ +#define MK48TXX_CSR_WRITE 0x80 /* want to write */ /* Bits in the seconds register */ -#define MK48TXX_SEC_MASK 0x7f /* mask for seconds */ -#define MK48TXX_SEC_ST 0x80 /* stop oscillator */ +#define MK48TXX_SEC_MASK 0x7f /* mask for seconds */ +#define MK48TXX_SEC_ST 0x80 /* stop oscillator */ /* Bits in the minutes register */ -#define MK48TXX_MIN_MASK 0x7f /* mask for minutes */ +#define MK48TXX_MIN_MASK 0x7f /* mask for minutes */ /* Bits in the hours register */ -#define MK48TXX_HOUR_MASK 0x3f /* mask for hours */ +#define MK48TXX_HOUR_MASK 0x3f /* mask for hours */ /* Bits in the century/weekday register */ -#define MK48TXX_WDAY_MASK 0x07 /* mask for weekday */ -#define MK48TXX_WDAY_CB 0x10 /* century bit (extended only) */ -#define MK48TXX_WDAY_CB_SHIFT 4 /* shift for century bit */ -#define MK48TXX_WDAY_CEB 0x20 /* century enable bit (extended only) */ -#define MK48TXX_WDAY_FT 0x40 /* frequency test */ +#define MK48TXX_WDAY_MASK 0x07 /* mask for weekday */ +#define MK48TXX_WDAY_CB 0x10 /* century bit (extended only) */ +#define MK48TXX_WDAY_CB_SHIFT 4 /* shift for century bit */ +#define MK48TXX_WDAY_CEB 0x20 /* century enable bit (extended only) */ +#define MK48TXX_WDAY_FT 0x40 /* frequency test */ /* Bits in the day in month register */ -#define MK48TXX_DAY_MASK 0x3f /* mask for day in month */ +#define MK48TXX_DAY_MASK 0x3f /* mask for day in month */ /* Bits in the month register */ -#define MK48TXX_MON_MASK 0x1f /* mask for month */ +#define MK48TXX_MON_MASK 0x1f /* mask for month */ /* Bits in the year register */ -#define MK48TXX_YEAR_MASK 0xff /* mask for year */ +#define MK48TXX_YEAR_MASK 0xff /* mask for year */ /* Model specific NVRAM sizes and clock offsets */ -#define MK48T02_CLKSZ 2048 -#define MK48T02_CLKOFF 0x7f0 +#define MK48T02_CLKSZ 2048 +#define MK48T02_CLKOFF 0x7f0 -#define MK48T08_CLKSZ 8192 -#define MK48T08_CLKOFF 0x1ff0 +#define MK48T08_CLKSZ 8192 +#define MK48T08_CLKOFF 0x1ff0 -#define MK48T18_CLKSZ 8192 -#define MK48T18_CLKOFF 0x1ff0 +#define MK48T18_CLKSZ 8192 +#define MK48T18_CLKOFF 0x1ff0 -#define MK48T59_CLKSZ 8192 -#define MK48T59_CLKOFF 0x1ff0 +#define MK48T59_CLKSZ 8192 +#define MK48T59_CLKOFF 0x1ff0 Modified: stable/8/sys/dev/mk48txx/mk48txxvar.h ============================================================================== --- stable/8/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:39:40 2010 (r202379) +++ stable/8/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:40:44 2010 (r202380) @@ -38,8 +38,8 @@ * $FreeBSD$ */ -typedef uint8_t (*mk48txx_nvrd_t)(device_t, int); -typedef void (*mk48txx_nvwr_t)(device_t, int, uint8_t); +typedef uint8_t (*mk48txx_nvrd_t)(device_t dev, int off); +typedef void (*mk48txx_nvwr_t)(device_t dev, int off, uint8_t v); struct mk48txx_softc { bus_space_tag_t sc_bst; /* bus space tag */ @@ -53,17 +53,17 @@ struct mk48txx_softc { bus_size_t sc_clkoffset; /* Offset in NVRAM to clock bits */ u_int sc_year0; /* year counter offset */ u_int sc_flag; /* MD flags */ -#define MK48TXX_NO_CENT_ADJUST 0x0001 /* don't manually adjust century */ -#define MK48TXX_WDOG_REGISTER 0x0002 /* register watchdog */ -#define MK48TXX_WDOG_ENABLE_WDS 0x0004 /* enable watchdog steering bit */ +#define MK48TXX_NO_CENT_ADJUST 0x0001 /* don't manually adjust century */ +#define MK48TXX_WDOG_REGISTER 0x0002 /* register watchdog */ +#define MK48TXX_WDOG_ENABLE_WDS 0x0004 /* enable watchdog steering bit */ mk48txx_nvrd_t sc_nvrd; /* NVRAM/RTC read function */ mk48txx_nvwr_t sc_nvwr; /* NVRAM/RTC write function */ }; /* Chip attach function */ -int mk48txx_attach(device_t); +int mk48txx_attach(device_t dev); /* Methods for the clock interface */ -int mk48txx_gettime(device_t, struct timespec *); -int mk48txx_settime(device_t, struct timespec *); +int mk48txx_gettime(device_t dev, struct timespec *ts); +int mk48txx_settime(device_t dev, struct timespec *ts); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:41:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44E9F106568B; Fri, 15 Jan 2010 15:41:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31CBD8FC30; Fri, 15 Jan 2010 15:41:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFf5A3015387; Fri, 15 Jan 2010 15:41:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFf51t015383; Fri, 15 Jan 2010 15:41:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151541.o0FFf51t015383@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:41:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202381 - stable/7/sys/dev/mk48txx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:41:05 -0000 Author: marius Date: Fri Jan 15 15:41:04 2010 New Revision: 202381 URL: http://svn.freebsd.org/changeset/base/202381 Log: MFC: r201003 Style changes Modified: stable/7/sys/dev/mk48txx/mk48txx.c stable/7/sys/dev/mk48txx/mk48txxreg.h stable/7/sys/dev/mk48txx/mk48txxvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mk48txx/mk48txx.c ============================================================================== --- stable/7/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:40:44 2010 (r202380) +++ stable/7/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:41:04 2010 (r202381) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); /* - * Mostek MK48T02, MK48T08, MK48T18, MK48T59 time-of-day chip subroutines. + * Mostek MK48T02, MK48T08, MK48T18, MK48T59 time-of-day chip subroutines */ #include @@ -59,17 +59,17 @@ __FBSDID("$FreeBSD$"); #include "clock_if.h" -static uint8_t mk48txx_def_nvrd(device_t, int); -static void mk48txx_def_nvwr(device_t, int, uint8_t); -static void mk48txx_watchdog(void *, u_int, int *); +static uint8_t mk48txx_def_nvrd(device_t dev, int off); +static void mk48txx_def_nvwr(device_t dev, int off, uint8_t v); +static void mk48txx_watchdog(void *arg, u_int cmd, int *error); -struct { +static const struct { const char *name; bus_size_t nvramsz; bus_size_t clkoff; - int flags; -#define MK48TXX_EXT_REGISTERS 1 /* Has extended register set */ -} mk48txx_models[] = { + u_int flags; +#define MK48TXX_EXT_REGISTERS 1 /* Has extended register set. */ +} const mk48txx_models[] = { { "mk48t02", MK48T02_CLKSZ, MK48T02_CLKOFF, 0 }, { "mk48t08", MK48T08_CLKSZ, MK48T08_CLKOFF, 0 }, { "mk48t18", MK48T18_CLKSZ, MK48T18_CLKOFF, 0 }, @@ -112,7 +112,7 @@ mk48txx_attach(device_t dev) if (mk48txx_models[i].flags & MK48TXX_EXT_REGISTERS) { mtx_lock(&sc->sc_mtx); - if ((*sc->sc_nvrd)(dev, sc->sc_clkoffset + MK48TXX_FLAGS) & + if ((*sc->sc_nvrd)(dev, sc->sc_clkoffset + MK48TXX_FLAGS) & MK48TXX_FLAGS_BL) { mtx_unlock(&sc->sc_mtx); device_printf(dev, "%s: battery low\n", __func__); @@ -140,7 +140,7 @@ mk48txx_attach(device_t dev) } } - clock_register(dev, 1000000); /* 1 second resolution. */ + clock_register(dev, 1000000); /* 1 second resolution */ if ((sc->sc_flag & MK48TXX_WDOG_REGISTER) && (mk48txx_models[i].flags & MK48TXX_EXT_REGISTERS)) { Modified: stable/7/sys/dev/mk48txx/mk48txxreg.h ============================================================================== --- stable/7/sys/dev/mk48txx/mk48txxreg.h Fri Jan 15 15:40:44 2010 (r202380) +++ stable/7/sys/dev/mk48txx/mk48txxreg.h Fri Jan 15 15:41:04 2010 (r202381) @@ -59,23 +59,23 @@ * The first bank of eight registers at offset (nvramsz - 16) is * available only on recenter (which?) MK48Txx models. */ -#define MK48TXX_FLAGS 0 /* flags register */ -#define MK48TXX_UNUSED 1 /* unused */ -#define MK48TXX_ASEC 2 /* alarm seconds (0..59; BCD) */ -#define MK48TXX_AMIN 3 /* alarm minutes (0..59; BCD) */ -#define MK48TXX_AHOUR 4 /* alarm hours (0..23; BCD) */ -#define MK48TXX_ADAY 5 /* alarm day in month (1..31; BCD) */ -#define MK48TXX_INTR 6 /* interrupts register */ -#define MK48TXX_WDOG 7 /* watchdog register */ - -#define MK48TXX_ICSR 8 /* control register */ -#define MK48TXX_ISEC 9 /* seconds (0..59; BCD) */ -#define MK48TXX_IMIN 10 /* minutes (0..59; BCD) */ -#define MK48TXX_IHOUR 11 /* hours (0..23; BCD) */ -#define MK48TXX_IWDAY 12 /* weekday (1..7) */ -#define MK48TXX_IDAY 13 /* day in month (1..31; BCD) */ -#define MK48TXX_IMON 14 /* month (1..12; BCD) */ -#define MK48TXX_IYEAR 15 /* year (0..99; BCD) */ +#define MK48TXX_FLAGS 0 /* flags register */ +#define MK48TXX_UNUSED 1 /* unused */ +#define MK48TXX_ASEC 2 /* alarm seconds (0..59; BCD) */ +#define MK48TXX_AMIN 3 /* alarm minutes (0..59; BCD) */ +#define MK48TXX_AHOUR 4 /* alarm hours (0..23; BCD) */ +#define MK48TXX_ADAY 5 /* alarm day in month (1..31; BCD) */ +#define MK48TXX_INTR 6 /* interrupts register */ +#define MK48TXX_WDOG 7 /* watchdog register */ + +#define MK48TXX_ICSR 8 /* control register */ +#define MK48TXX_ISEC 9 /* seconds (0..59; BCD) */ +#define MK48TXX_IMIN 10 /* minutes (0..59; BCD) */ +#define MK48TXX_IHOUR 11 /* hours (0..23; BCD) */ +#define MK48TXX_IWDAY 12 /* weekday (1..7) */ +#define MK48TXX_IDAY 13 /* day in month (1..31; BCD) */ +#define MK48TXX_IMON 14 /* month (1..12; BCD) */ +#define MK48TXX_IYEAR 15 /* year (0..99; BCD) */ /* * Note that some of the bits below that are not in the first eight @@ -84,80 +84,80 @@ */ /* Bits in the flags register (extended only) */ -#define MK48TXX_FLAGS_BL 0x10 /* battery low (read only) */ -#define MK48TXX_FLAGS_AF 0x40 /* alarm flag (read only) */ -#define MK48TXX_FLAGS_WDF 0x80 /* watchdog flag (read only) */ +#define MK48TXX_FLAGS_BL 0x10 /* battery low (read only) */ +#define MK48TXX_FLAGS_AF 0x40 /* alarm flag (read only) */ +#define MK48TXX_FLAGS_WDF 0x80 /* watchdog flag (read only) */ /* Bits in the alarm seconds register (extended only) */ -#define MK48TXX_ASEC_MASK 0x7f /* mask for alarm seconds */ -#define MK48TXX_ASEC_RPT1 0x80 /* alarm repeat mode bit 1 */ +#define MK48TXX_ASEC_MASK 0x7f /* mask for alarm seconds */ +#define MK48TXX_ASEC_RPT1 0x80 /* alarm repeat mode bit 1 */ /* Bits in the alarm minutes register (extended only) */ -#define MK48TXX_AMIN_MASK 0x7f /* mask for alarm minutes */ -#define MK48TXX_AMIN_RPT2 0x80 /* alarm repeat mode bit 2 */ +#define MK48TXX_AMIN_MASK 0x7f /* mask for alarm minutes */ +#define MK48TXX_AMIN_RPT2 0x80 /* alarm repeat mode bit 2 */ /* Bits in the alarm hours register (extended only) */ -#define MK48TXX_AHOUR_MASK 0x3f /* mask for alarm hours */ -#define MK48TXX_AHOUR_RPT3 0x80 /* alarm repeat mode bit 3 */ +#define MK48TXX_AHOUR_MASK 0x3f /* mask for alarm hours */ +#define MK48TXX_AHOUR_RPT3 0x80 /* alarm repeat mode bit 3 */ /* Bits in the alarm day in month register (extended only) */ -#define MK48TXX_ADAY_MASK 0x3f /* mask for alarm day in month */ -#define MK48TXX_ADAY_RPT4 0x80 /* alarm repeat mode bit 4 */ +#define MK48TXX_ADAY_MASK 0x3f /* mask for alarm day in month */ +#define MK48TXX_ADAY_RPT4 0x80 /* alarm repeat mode bit 4 */ /* Bits in the interrupts register (extended only) */ -#define MK48TXX_INTR_ABE 0x20 /* alarm in battery back-up mode */ -#define MK48TXX_INTR_AFE 0x80 /* alarm flag enable */ +#define MK48TXX_INTR_ABE 0x20 /* alarm in battery back-up mode */ +#define MK48TXX_INTR_AFE 0x80 /* alarm flag enable */ /* Bits in the watchdog register (extended only) */ -#define MK48TXX_WDOG_RB_1_16 0x00 /* watchdog resolution 1/16 second */ -#define MK48TXX_WDOG_RB_1_4 0x01 /* watchdog resolution 1/4 second */ -#define MK48TXX_WDOG_RB_1 0x02 /* watchdog resolution 1 second */ -#define MK48TXX_WDOG_RB_4 0x03 /* watchdog resolution 4 seconds */ -#define MK48TXX_WDOG_BMB_MASK 0x7c /* mask for watchdog multiplier */ -#define MK48TXX_WDOG_BMB_SHIFT 2 /* shift for watchdog multiplier */ -#define MK48TXX_WDOG_WDS 0x80 /* watchdog steering bit */ +#define MK48TXX_WDOG_RB_1_16 0x00 /* watchdog resolution 1/16 second */ +#define MK48TXX_WDOG_RB_1_4 0x01 /* watchdog resolution 1/4 second */ +#define MK48TXX_WDOG_RB_1 0x02 /* watchdog resolution 1 second */ +#define MK48TXX_WDOG_RB_4 0x03 /* watchdog resolution 4 seconds */ +#define MK48TXX_WDOG_BMB_MASK 0x7c /* mask for watchdog multiplier */ +#define MK48TXX_WDOG_BMB_SHIFT 2 /* shift for watchdog multiplier */ +#define MK48TXX_WDOG_WDS 0x80 /* watchdog steering bit */ /* Bits in the control register */ -#define MK48TXX_CSR_CALIB_MASK 0x1f /* mask for calibration step width */ -#define MK48TXX_CSR_SIGN 0x20 /* sign of above calibration witdh */ -#define MK48TXX_CSR_READ 0x40 /* want to read (freeze clock) */ -#define MK48TXX_CSR_WRITE 0x80 /* want to write */ +#define MK48TXX_CSR_CALIB_MASK 0x1f /* mask for calibration step width */ +#define MK48TXX_CSR_SIGN 0x20 /* sign of above calibration witdh */ +#define MK48TXX_CSR_READ 0x40 /* want to read (freeze clock) */ +#define MK48TXX_CSR_WRITE 0x80 /* want to write */ /* Bits in the seconds register */ -#define MK48TXX_SEC_MASK 0x7f /* mask for seconds */ -#define MK48TXX_SEC_ST 0x80 /* stop oscillator */ +#define MK48TXX_SEC_MASK 0x7f /* mask for seconds */ +#define MK48TXX_SEC_ST 0x80 /* stop oscillator */ /* Bits in the minutes register */ -#define MK48TXX_MIN_MASK 0x7f /* mask for minutes */ +#define MK48TXX_MIN_MASK 0x7f /* mask for minutes */ /* Bits in the hours register */ -#define MK48TXX_HOUR_MASK 0x3f /* mask for hours */ +#define MK48TXX_HOUR_MASK 0x3f /* mask for hours */ /* Bits in the century/weekday register */ -#define MK48TXX_WDAY_MASK 0x07 /* mask for weekday */ -#define MK48TXX_WDAY_CB 0x10 /* century bit (extended only) */ -#define MK48TXX_WDAY_CB_SHIFT 4 /* shift for century bit */ -#define MK48TXX_WDAY_CEB 0x20 /* century enable bit (extended only) */ -#define MK48TXX_WDAY_FT 0x40 /* frequency test */ +#define MK48TXX_WDAY_MASK 0x07 /* mask for weekday */ +#define MK48TXX_WDAY_CB 0x10 /* century bit (extended only) */ +#define MK48TXX_WDAY_CB_SHIFT 4 /* shift for century bit */ +#define MK48TXX_WDAY_CEB 0x20 /* century enable bit (extended only) */ +#define MK48TXX_WDAY_FT 0x40 /* frequency test */ /* Bits in the day in month register */ -#define MK48TXX_DAY_MASK 0x3f /* mask for day in month */ +#define MK48TXX_DAY_MASK 0x3f /* mask for day in month */ /* Bits in the month register */ -#define MK48TXX_MON_MASK 0x1f /* mask for month */ +#define MK48TXX_MON_MASK 0x1f /* mask for month */ /* Bits in the year register */ -#define MK48TXX_YEAR_MASK 0xff /* mask for year */ +#define MK48TXX_YEAR_MASK 0xff /* mask for year */ /* Model specific NVRAM sizes and clock offsets */ -#define MK48T02_CLKSZ 2048 -#define MK48T02_CLKOFF 0x7f0 +#define MK48T02_CLKSZ 2048 +#define MK48T02_CLKOFF 0x7f0 -#define MK48T08_CLKSZ 8192 -#define MK48T08_CLKOFF 0x1ff0 +#define MK48T08_CLKSZ 8192 +#define MK48T08_CLKOFF 0x1ff0 -#define MK48T18_CLKSZ 8192 -#define MK48T18_CLKOFF 0x1ff0 +#define MK48T18_CLKSZ 8192 +#define MK48T18_CLKOFF 0x1ff0 -#define MK48T59_CLKSZ 8192 -#define MK48T59_CLKOFF 0x1ff0 +#define MK48T59_CLKSZ 8192 +#define MK48T59_CLKOFF 0x1ff0 Modified: stable/7/sys/dev/mk48txx/mk48txxvar.h ============================================================================== --- stable/7/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:40:44 2010 (r202380) +++ stable/7/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:41:04 2010 (r202381) @@ -38,8 +38,8 @@ * $FreeBSD$ */ -typedef uint8_t (*mk48txx_nvrd_t)(device_t, int); -typedef void (*mk48txx_nvwr_t)(device_t, int, uint8_t); +typedef uint8_t (*mk48txx_nvrd_t)(device_t dev, int off); +typedef void (*mk48txx_nvwr_t)(device_t dev, int off, uint8_t v); struct mk48txx_softc { bus_space_tag_t sc_bst; /* bus space tag */ @@ -53,17 +53,17 @@ struct mk48txx_softc { bus_size_t sc_clkoffset; /* Offset in NVRAM to clock bits */ u_int sc_year0; /* year counter offset */ u_int sc_flag; /* MD flags */ -#define MK48TXX_NO_CENT_ADJUST 0x0001 /* don't manually adjust century */ -#define MK48TXX_WDOG_REGISTER 0x0002 /* register watchdog */ -#define MK48TXX_WDOG_ENABLE_WDS 0x0004 /* enable watchdog steering bit */ +#define MK48TXX_NO_CENT_ADJUST 0x0001 /* don't manually adjust century */ +#define MK48TXX_WDOG_REGISTER 0x0002 /* register watchdog */ +#define MK48TXX_WDOG_ENABLE_WDS 0x0004 /* enable watchdog steering bit */ mk48txx_nvrd_t sc_nvrd; /* NVRAM/RTC read function */ mk48txx_nvwr_t sc_nvwr; /* NVRAM/RTC write function */ }; /* Chip attach function */ -int mk48txx_attach(device_t); +int mk48txx_attach(device_t dev); /* Methods for the clock interface */ -int mk48txx_gettime(device_t, struct timespec *); -int mk48txx_settime(device_t, struct timespec *); +int mk48txx_gettime(device_t dev, struct timespec *ts); +int mk48txx_settime(device_t dev, struct timespec *ts); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:42:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C95910656F4; Fri, 15 Jan 2010 15:42:15 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09B0B8FC36; Fri, 15 Jan 2010 15:42:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFgEEj015725; Fri, 15 Jan 2010 15:42:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFgExa015721; Fri, 15 Jan 2010 15:42:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151542.o0FFgExa015721@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:42:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202382 - stable/8/sys/dev/mk48txx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:42:15 -0000 Author: marius Date: Fri Jan 15 15:42:14 2010 New Revision: 202382 URL: http://svn.freebsd.org/changeset/base/202382 Log: MFC: r201004 Remove clause 3 and 4 from TNF licenses. Obtained from: NetBSD Modified: stable/8/sys/dev/mk48txx/mk48txx.c stable/8/sys/dev/mk48txx/mk48txxreg.h stable/8/sys/dev/mk48txx/mk48txxvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mk48txx/mk48txx.c ============================================================================== --- stable/8/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:41:04 2010 (r202381) +++ stable/8/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:42:14 2010 (r202382) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -33,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mk48txx.c,v 1.15 2004/07/05 09:24:31 pk Exp + * $NetBSD: mk48txx.c,v 1.25 2008/04/28 20:23:50 martin Exp $ */ #include Modified: stable/8/sys/dev/mk48txx/mk48txxreg.h ============================================================================== --- stable/8/sys/dev/mk48txx/mk48txxreg.h Fri Jan 15 15:41:04 2010 (r202381) +++ stable/8/sys/dev/mk48txx/mk48txxreg.h Fri Jan 15 15:42:14 2010 (r202382) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -33,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mk48txxreg.h,v 1.7 2003/11/01 22:41:42 tsutsui Exp + * $NetBSD: mk48txxreg.h,v 1.10 2008/04/28 20:23:50 martin Exp $ * * $FreeBSD$ */ Modified: stable/8/sys/dev/mk48txx/mk48txxvar.h ============================================================================== --- stable/8/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:41:04 2010 (r202381) +++ stable/8/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:42:14 2010 (r202382) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -33,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mk48txxvar.h,v 1.1 2003/11/01 22:41:42 tsutsui Exp + * $NetBSD: mk48txxvar.h,v 1.6 2008/04/28 20:23:50 martin Exp $ * * $FreeBSD$ */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:42:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0382910656A5; Fri, 15 Jan 2010 15:42:17 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E45CC8FC14; Fri, 15 Jan 2010 15:42:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFgG16015760; Fri, 15 Jan 2010 15:42:16 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFgG8U015756; Fri, 15 Jan 2010 15:42:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151542.o0FFgG8U015756@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202383 - stable/7/sys/dev/mk48txx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:42:17 -0000 Author: marius Date: Fri Jan 15 15:42:16 2010 New Revision: 202383 URL: http://svn.freebsd.org/changeset/base/202383 Log: MFC: r201004 Remove clause 3 and 4 from TNF licenses. Obtained from: NetBSD Modified: stable/7/sys/dev/mk48txx/mk48txx.c stable/7/sys/dev/mk48txx/mk48txxreg.h stable/7/sys/dev/mk48txx/mk48txxvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mk48txx/mk48txx.c ============================================================================== --- stable/7/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:42:14 2010 (r202382) +++ stable/7/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:42:16 2010 (r202383) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -33,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mk48txx.c,v 1.15 2004/07/05 09:24:31 pk Exp + * $NetBSD: mk48txx.c,v 1.25 2008/04/28 20:23:50 martin Exp $ */ #include Modified: stable/7/sys/dev/mk48txx/mk48txxreg.h ============================================================================== --- stable/7/sys/dev/mk48txx/mk48txxreg.h Fri Jan 15 15:42:14 2010 (r202382) +++ stable/7/sys/dev/mk48txx/mk48txxreg.h Fri Jan 15 15:42:16 2010 (r202383) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -33,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mk48txxreg.h,v 1.7 2003/11/01 22:41:42 tsutsui Exp + * $NetBSD: mk48txxreg.h,v 1.10 2008/04/28 20:23:50 martin Exp $ * * $FreeBSD$ */ Modified: stable/7/sys/dev/mk48txx/mk48txxvar.h ============================================================================== --- stable/7/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:42:14 2010 (r202382) +++ stable/7/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:42:16 2010 (r202383) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -33,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mk48txxvar.h,v 1.1 2003/11/01 22:41:42 tsutsui Exp + * $NetBSD: mk48txxvar.h,v 1.6 2008/04/28 20:23:50 martin Exp $ * * $FreeBSD$ */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:47:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 418F0106566C; Fri, 15 Jan 2010 15:47:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DF578FC1B; Fri, 15 Jan 2010 15:47:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFlWe6017056; Fri, 15 Jan 2010 15:47:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFlWDW017049; Fri, 15 Jan 2010 15:47:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151547.o0FFlWDW017049@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202384 - in stable/8/sys: dev/mk48txx sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:47:32 -0000 Author: marius Date: Fri Jan 15 15:47:31 2010 New Revision: 202384 URL: http://svn.freebsd.org/changeset/base/202384 Log: MFC: r201005, r201371 - Take advantage of bus_{read,write}_*(9). - Set dow = -1 in mk48txx_gettime() because some drivers (for example the NetBSD and OpenBSD mk48txx(4)) don't set it correctly. Modified: stable/8/sys/dev/mk48txx/mk48txx.c stable/8/sys/dev/mk48txx/mk48txxvar.h stable/8/sys/sparc64/sparc64/eeprom.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mk48txx/mk48txx.c ============================================================================== --- stable/8/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:42:16 2010 (r202383) +++ stable/8/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:47:31 2010 (r202384) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -175,8 +176,16 @@ mk48txx_gettime(device_t dev, struct tim ct.min = FROMBCD(FROMREG(MK48TXX_IMIN, MK48TXX_MIN_MASK)); ct.hour = FROMBCD(FROMREG(MK48TXX_IHOUR, MK48TXX_HOUR_MASK)); ct.day = FROMBCD(FROMREG(MK48TXX_IDAY, MK48TXX_DAY_MASK)); +#if 0 /* Map dow from 1 - 7 to 0 - 6; FROMBCD() isn't necessary here. */ ct.dow = FROMREG(MK48TXX_IWDAY, MK48TXX_WDAY_MASK) - 1; +#else + /* + * Set dow = -1 because some drivers (for example the NetBSD and + * OpenBSD mk48txx(4)) don't set it correctly. + */ + ct.dow = -1; +#endif ct.mon = FROMBCD(FROMREG(MK48TXX_IMON, MK48TXX_MON_MASK)); year = FROMBCD(FROMREG(MK48TXX_IYEAR, MK48TXX_YEAR_MASK)); year += sc->sc_year0; @@ -266,7 +275,7 @@ mk48txx_def_nvrd(device_t dev, int off) struct mk48txx_softc *sc; sc = device_get_softc(dev); - return (bus_space_read_1(sc->sc_bst, sc->sc_bsh, off)); + return (bus_read_1(sc->sc_res, off)); } static void @@ -275,7 +284,7 @@ mk48txx_def_nvwr(device_t dev, int off, struct mk48txx_softc *sc; sc = device_get_softc(dev); - bus_space_write_1(sc->sc_bst, sc->sc_bsh, off, v); + bus_write_1(sc->sc_res, off, v); } static void Modified: stable/8/sys/dev/mk48txx/mk48txxvar.h ============================================================================== --- stable/8/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:42:16 2010 (r202383) +++ stable/8/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:47:31 2010 (r202384) @@ -35,8 +35,7 @@ typedef uint8_t (*mk48txx_nvrd_t)(device typedef void (*mk48txx_nvwr_t)(device_t dev, int off, uint8_t v); struct mk48txx_softc { - bus_space_tag_t sc_bst; /* bus space tag */ - bus_space_handle_t sc_bsh; /* bus space handle */ + struct resource *sc_res;/* bus resource */ struct mtx sc_mtx; /* hardware mutex */ eventhandler_tag sc_wet; /* watchdog event handler tag */ Modified: stable/8/sys/sparc64/sparc64/eeprom.c ============================================================================== --- stable/8/sys/sparc64/sparc64/eeprom.c Fri Jan 15 15:42:16 2010 (r202383) +++ stable/8/sys/sparc64/sparc64/eeprom.c Fri Jan 15 15:47:31 2010 (r202384) @@ -107,7 +107,7 @@ DRIVER_MODULE(eeprom, sbus, eeprom_drive static int eeprom_probe(device_t dev) { - + if (strcmp("eeprom", ofw_bus_get_name(dev)) == 0) { device_set_desc(dev, "EEPROM/clock"); return (0); @@ -119,7 +119,6 @@ static int eeprom_attach(device_t dev) { struct mk48txx_softc *sc; - struct resource *res; struct timespec ts; int error, rid; @@ -128,14 +127,13 @@ eeprom_attach(device_t dev) mtx_init(&sc->sc_mtx, "eeprom_mtx", NULL, MTX_DEF); rid = 0; - res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (res == NULL) { + sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->sc_res == NULL) { device_printf(dev, "cannot allocate resources\n"); error = ENXIO; goto fail_mtx; } - sc->sc_bst = rman_get_bustag(res); - sc->sc_bsh = rman_get_bushandle(res); if ((sc->sc_model = ofw_bus_get_model(dev)) == NULL) { device_printf(dev, "cannot determine model\n"); @@ -180,7 +178,7 @@ eeprom_attach(device_t dev) return (0); fail_res: - bus_release_resource(dev, SYS_RES_MEMORY, rid, res); + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->sc_res); fail_mtx: mtx_destroy(&sc->sc_mtx); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 15:47:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5387A1065672; Fri, 15 Jan 2010 15:47:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 401988FC1D; Fri, 15 Jan 2010 15:47:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FFlWh1017059; Fri, 15 Jan 2010 15:47:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FFlWFx017053; Fri, 15 Jan 2010 15:47:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151547.o0FFlWFx017053@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 15:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202385 - in stable/7/sys: dev/mk48txx sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 15:47:32 -0000 Author: marius Date: Fri Jan 15 15:47:31 2010 New Revision: 202385 URL: http://svn.freebsd.org/changeset/base/202385 Log: MFC: r201005, r201371 - Take advantage of bus_{read,write}_*(9). - Set dow = -1 in mk48txx_gettime() because some drivers (for example the NetBSD and OpenBSD mk48txx(4)) don't set it correctly. Modified: stable/7/sys/dev/mk48txx/mk48txx.c stable/7/sys/dev/mk48txx/mk48txxvar.h stable/7/sys/sparc64/sparc64/eeprom.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mk48txx/mk48txx.c ============================================================================== --- stable/7/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:47:31 2010 (r202384) +++ stable/7/sys/dev/mk48txx/mk48txx.c Fri Jan 15 15:47:31 2010 (r202385) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -175,8 +176,16 @@ mk48txx_gettime(device_t dev, struct tim ct.min = FROMBCD(FROMREG(MK48TXX_IMIN, MK48TXX_MIN_MASK)); ct.hour = FROMBCD(FROMREG(MK48TXX_IHOUR, MK48TXX_HOUR_MASK)); ct.day = FROMBCD(FROMREG(MK48TXX_IDAY, MK48TXX_DAY_MASK)); +#if 0 /* Map dow from 1 - 7 to 0 - 6; FROMBCD() isn't necessary here. */ ct.dow = FROMREG(MK48TXX_IWDAY, MK48TXX_WDAY_MASK) - 1; +#else + /* + * Set dow = -1 because some drivers (for example the NetBSD and + * OpenBSD mk48txx(4)) don't set it correctly. + */ + ct.dow = -1; +#endif ct.mon = FROMBCD(FROMREG(MK48TXX_IMON, MK48TXX_MON_MASK)); year = FROMBCD(FROMREG(MK48TXX_IYEAR, MK48TXX_YEAR_MASK)); year += sc->sc_year0; @@ -266,7 +275,7 @@ mk48txx_def_nvrd(device_t dev, int off) struct mk48txx_softc *sc; sc = device_get_softc(dev); - return (bus_space_read_1(sc->sc_bst, sc->sc_bsh, off)); + return (bus_read_1(sc->sc_res, off)); } static void @@ -275,7 +284,7 @@ mk48txx_def_nvwr(device_t dev, int off, struct mk48txx_softc *sc; sc = device_get_softc(dev); - bus_space_write_1(sc->sc_bst, sc->sc_bsh, off, v); + bus_write_1(sc->sc_res, off, v); } static void Modified: stable/7/sys/dev/mk48txx/mk48txxvar.h ============================================================================== --- stable/7/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:47:31 2010 (r202384) +++ stable/7/sys/dev/mk48txx/mk48txxvar.h Fri Jan 15 15:47:31 2010 (r202385) @@ -35,8 +35,7 @@ typedef uint8_t (*mk48txx_nvrd_t)(device typedef void (*mk48txx_nvwr_t)(device_t dev, int off, uint8_t v); struct mk48txx_softc { - bus_space_tag_t sc_bst; /* bus space tag */ - bus_space_handle_t sc_bsh; /* bus space handle */ + struct resource *sc_res;/* bus resource */ struct mtx sc_mtx; /* hardware mutex */ eventhandler_tag sc_wet; /* watchdog event handler tag */ Modified: stable/7/sys/sparc64/sparc64/eeprom.c ============================================================================== --- stable/7/sys/sparc64/sparc64/eeprom.c Fri Jan 15 15:47:31 2010 (r202384) +++ stable/7/sys/sparc64/sparc64/eeprom.c Fri Jan 15 15:47:31 2010 (r202385) @@ -107,7 +107,7 @@ DRIVER_MODULE(eeprom, sbus, eeprom_drive static int eeprom_probe(device_t dev) { - + if (strcmp("eeprom", ofw_bus_get_name(dev)) == 0) { device_set_desc(dev, "EEPROM/clock"); return (0); @@ -119,7 +119,6 @@ static int eeprom_attach(device_t dev) { struct mk48txx_softc *sc; - struct resource *res; struct timespec ts; int error, rid; @@ -128,14 +127,13 @@ eeprom_attach(device_t dev) mtx_init(&sc->sc_mtx, "eeprom_mtx", NULL, MTX_DEF); rid = 0; - res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (res == NULL) { + sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->sc_res == NULL) { device_printf(dev, "cannot allocate resources\n"); error = ENXIO; goto fail_mtx; } - sc->sc_bst = rman_get_bustag(res); - sc->sc_bsh = rman_get_bushandle(res); if ((sc->sc_model = ofw_bus_get_model(dev)) == NULL) { device_printf(dev, "cannot determine model\n"); @@ -180,7 +178,7 @@ eeprom_attach(device_t dev) return (0); fail_res: - bus_release_resource(dev, SYS_RES_MEMORY, rid, res); + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->sc_res); fail_mtx: mtx_destroy(&sc->sc_mtx); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:01:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38B0E106566B; Fri, 15 Jan 2010 16:01:23 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21C478FC13; Fri, 15 Jan 2010 16:01:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FG1N0u020395; Fri, 15 Jan 2010 16:01:23 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FG1M5O020349; Fri, 15 Jan 2010 16:01:22 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001151601.o0FG1M5O020349@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 15 Jan 2010 16:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202386 - in head: sbin/setkey share/man/man4 share/man/man4/man4.i386 share/man/man4/man4.sparc64 share/man/man7 share/man/man9 usr.bin/brandelf usr.bin/elfdump usr.sbin/faithd usr.sbi... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:01:23 -0000 Author: ru Date: Fri Jan 15 16:01:22 2010 New Revision: 202386 URL: http://svn.freebsd.org/changeset/base/202386 Log: Use the newly brought %U macro. Modified: head/sbin/setkey/setkey.8 head/share/man/man4/acpi.4 head/share/man/man4/acpi_asus.4 head/share/man/man4/aue.4 head/share/man/man4/axe.4 head/share/man/man4/cdce.4 head/share/man/man4/dc.4 head/share/man/man4/gif.4 head/share/man/man4/hme.4 head/share/man/man4/lge.4 head/share/man/man4/mac.4 head/share/man/man4/man4.i386/vpd.4 head/share/man/man4/man4.sparc64/ebus.4 head/share/man/man4/mpt.4 head/share/man/man4/ndis.4 head/share/man/man4/nge.4 head/share/man/man4/pcm.4 head/share/man/man4/pcn.4 head/share/man/man4/psm.4 head/share/man/man4/ral.4 head/share/man/man4/re.4 head/share/man/man4/rl.4 head/share/man/man4/rue.4 head/share/man/man4/rum.4 head/share/man/man4/sf.4 head/share/man/man4/sis.4 head/share/man/man4/sk.4 head/share/man/man4/smbus.4 head/share/man/man4/snd_uaudio.4 head/share/man/man4/ste.4 head/share/man/man4/targ.4 head/share/man/man4/udav.4 head/share/man/man4/ural.4 head/share/man/man4/urio.4 head/share/man/man4/urtw.4 head/share/man/man4/vr.4 head/share/man/man4/wi.4 head/share/man/man7/release.7 head/share/man/man9/mac.9 head/share/man/man9/pci.9 head/usr.bin/brandelf/brandelf.1 head/usr.bin/elfdump/elfdump.1 head/usr.sbin/faithd/faithd.8 head/usr.sbin/mergemaster/mergemaster.8 head/usr.sbin/smbmsg/smbmsg.8 Modified: head/sbin/setkey/setkey.8 ============================================================================== --- head/sbin/setkey/setkey.8 Fri Jan 15 15:47:31 2010 (r202385) +++ head/sbin/setkey/setkey.8 Fri Jan 15 16:01:22 2010 (r202386) @@ -707,7 +707,7 @@ add 10.1.10.34 10.1.10.36 tcp 0x1000 -A .Xr sysctl 8 .Rs .%T "Changed manual key configuration for IPsec" -.%O "http://www.kame.net/newsletter/19991007/" +.%U http://www.kame.net/newsletter/19991007/ .%D "October 1999" .Re .\" Modified: head/share/man/man4/acpi.4 ============================================================================== --- head/share/man/man4/acpi.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/acpi.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -559,7 +559,7 @@ ACPI is only found and supported on i386 .%A "Toshiba Corporation" .%D August 25, 2003 .%T "Advanced Configuration and Power Interface Specification" -.%O http://acpi.info/spec.htm +.%U http://acpi.info/spec.htm .Re .Sh AUTHORS .An -nosplit Modified: head/share/man/man4/acpi_asus.4 ============================================================================== --- head/share/man/man4/acpi_asus.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/acpi_asus.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -162,7 +162,7 @@ which is parsed at boot-time. .Xr sysctl 8 .Rs .%T The acpi4asus Project -.%O http://sourceforge.net/projects/acpi4asus/ +.%U http://sourceforge.net/projects/acpi4asus/ .Re .Sh HISTORY The Modified: head/share/man/man4/aue.4 ============================================================================== --- head/share/man/man4/aue.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/aue.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -193,7 +193,7 @@ The driver failed to allocate an mbuf fo .Xr ifconfig 8 .Rs .%T ADMtek AN986 data sheet -.%O http://www.admtek.com.tw +.%U http://www.admtek.com.tw .Re .Sh HISTORY The Modified: head/share/man/man4/axe.4 ============================================================================== --- head/share/man/man4/axe.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/axe.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -199,7 +199,7 @@ The driver failed to allocate an mbuf fo .Xr ifconfig 8 .Rs .%T "ASIX AX88172 AX88178 and AX88772 data sheets" -.%O http://www.asix.com.tw +.%U http://www.asix.com.tw .Re .Sh HISTORY The Modified: head/share/man/man4/cdce.4 ============================================================================== --- head/share/man/man4/cdce.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/cdce.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -120,11 +120,11 @@ is running low on mbufs. .Xr ifconfig 8 .Rs .%T "Universal Serial Bus Class Definitions for Communication Devices" -.%O http://www.usb.org/developers/devclass_docs/usbcdc11.pdf +.%U http://www.usb.org/developers/devclass_docs/usbcdc11.pdf .Re .Rs .%T "Data sheet Prolific PL-2501 Host-to-Host Bridge/Network Controller" -.%O http://tech.prolific.com.tw/visitor/fcabdl.asp?fid=20679530 +.%U http://tech.prolific.com.tw/visitor/fcabdl.asp?fid=20679530 .Re .Sh HISTORY The Modified: head/share/man/man4/dc.4 ============================================================================== --- head/share/man/man4/dc.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/dc.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -351,27 +351,27 @@ the card should be configured correctly. .Xr ifconfig 8 .Rs .%T ADMtek AL981, AL983 and AL985 data sheets -.%O http://www.admtek.com.tw +.%U http://www.admtek.com.tw .Re .Rs .%T ASIX Electronics AX88140A and AX88141 data sheets -.%O http://www.asix.com.tw +.%U http://www.asix.com.tw .Re .Rs .%T Davicom DM9102 data sheet -.%O http://www.davicom8.com +.%U http://www.davicom8.com .Re .Rs .%T Intel 21143 Hardware Reference Manual -.%O http://developer.intel.com +.%U http://developer.intel.com .Re .Rs .%T Macronix 98713/A, 98715/A and 98725 data sheets -.%O http://www.macronix.com +.%U http://www.macronix.com .Re .Rs .%T Macronix 98713/A and 98715/A app notes -.%O http://www.macronix.com +.%U http://www.macronix.com .Re .Sh HISTORY The Modified: head/share/man/man4/gif.4 ============================================================================== --- head/share/man/man4/gif.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/gif.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -198,7 +198,7 @@ to 1. .%B RFC2893 .%T Transition Mechanisms for IPv6 Hosts and Routers .%D August 2000 -.%O ftp://ftp.isi.edu/in-notes/rfc2893.txt +.%U ftp://ftp.isi.edu/in-notes/rfc2893.txt .Re .Rs .%A Sally Floyd Modified: head/share/man/man4/hme.4 ============================================================================== --- head/share/man/man4/hme.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/hme.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -139,7 +139,7 @@ except the single-port SBus versions. .%T "STP2002QFP Fast Ethernet, Parallel Port, SCSI (FEPS) User's Guide" .%D April 1996 .%A Sun Microelectronics -.%O http://mediacast.sun.com/users/Barton808/media/STP2002QFP-FEPs_UG.pdf +.%U http://mediacast.sun.com/users/Barton808/media/STP2002QFP-FEPs_UG.pdf .Re .Sh HISTORY The Modified: head/share/man/man4/lge.4 ============================================================================== --- head/share/man/man4/lge.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/lge.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -143,7 +143,7 @@ the network connection (cable). .Xr ifconfig 8 .Rs .%T Level 1 LXT1001 Programming Manual -.%O http://www.FreeBSD.org/~wpaul/Level1/LXT1001SRM.pdf +.%U http://www.FreeBSD.org/~wpaul/Level1/LXT1001SRM.pdf .Re .Sh HISTORY The Modified: head/share/man/man4/mac.4 ============================================================================== --- head/share/man/man4/mac.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/mac.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -219,7 +219,7 @@ man page. .Rs .%B "The FreeBSD Handbook" .%T "Mandatory Access Control" -.%O http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/mac.html +.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/mac.html .Re .Sh HISTORY The Modified: head/share/man/man4/man4.i386/vpd.4 ============================================================================== --- head/share/man/man4/man4.i386/vpd.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/man4.i386/vpd.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -76,7 +76,7 @@ Motherboard Serial Number. .%T "TP General - Using the BIOS Build ID to identify IBM ThinkPad systems" .%N "Reference #: MIGR-45120" .%D "November 22, 2002" -.%O "http://www.ibm.com/support/docview.wss?uid=psg1MIGR-45120" +.%U "http://www.ibm.com/support/docview.wss?uid=psg1MIGR-45120" .Re .Sh HISTORY The Modified: head/share/man/man4/man4.sparc64/ebus.4 ============================================================================== --- head/share/man/man4/man4.sparc64/ebus.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/man4.sparc64/ebus.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -99,7 +99,7 @@ DMA. .%T "Peripheral Component Interconnect Input Output Controller" .%V "Part No.: 802-7837-01" .%D "March 1997" -.%O "http://www.sun.com/oem/products/manuals/802-7837.pdf" +.%U "http://www.sun.com/oem/products/manuals/802-7837.pdf" .Re .Sh HISTORY The Modified: head/share/man/man4/mpt.4 ============================================================================== --- head/share/man/man4/mpt.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/mpt.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -159,7 +159,7 @@ can take on - no separate compilation is .Xr gmultipath 8 .Rs .%T "LSI Logic Website" -.%O http://www.lsilogic.com/ +.%U http://www.lsilogic.com/ .Re .Sh HISTORY The Modified: head/share/man/man4/ndis.4 ============================================================================== --- head/share/man/man4/ndis.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/ndis.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -137,7 +137,7 @@ before a timeout expired. .Xr ndisgen 8 .Rs .%T "NDIS 5.1 specification" -.%O http://www.microsoft.com +.%U http://www.microsoft.com .Re .Sh HISTORY The Modified: head/share/man/man4/nge.4 ============================================================================== --- head/share/man/man4/nge.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/nge.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -230,11 +230,11 @@ the network connection (cable). .Xr ifconfig 8 .Rs .%T National Semiconductor DP83820 datasheet -.%O http://www.national.com +.%U http://www.national.com .Re .Rs .%T National Semiconductor DP83861 datasheet -.%O http://www.national.com +.%U http://www.national.com .Re .Sh HISTORY The Modified: head/share/man/man4/pcm.4 ============================================================================== --- head/share/man/man4/pcm.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/pcm.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -633,19 +633,19 @@ A device node is not created properly. .Xr sysctl 8 .Rs .%T "Cookbook formulae for audio EQ biquad filter coefficients, by Robert Bristow-Johnson" -.%O "http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt" +.%U "http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt" .Re .Rs .%T "Julius O'Smith's Digital Audio Resampling" -.%O "http://ccrma.stanford.edu/~jos/resample/" +.%U "http://ccrma.stanford.edu/~jos/resample/" .Re .Rs .%T "Polynomial Interpolators for High-Quality Resampling of Oversampled Audio, by Olli Niemitalo" -.%O "http://www.student.oulu.fi/~oniemita/dsp/deip.pdf" +.%U "http://www.student.oulu.fi/~oniemita/dsp/deip.pdf" .Re .Rs .%T "The OSS API" -.%O "http://www.opensound.com/pguide/oss.pdf" +.%U "http://www.opensound.com/pguide/oss.pdf" .Re .Sh HISTORY The Modified: head/share/man/man4/pcn.4 ============================================================================== --- head/share/man/man4/pcn.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/pcn.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -179,7 +179,7 @@ the card should be configured correctly. .Xr ifconfig 8 .Rs .%T AMD PCnet/FAST, PCnet/FAST+ and PCnet/Home datasheets -.%O http://www.amd.com +.%U http://www.amd.com .Re .Sh HISTORY The Modified: head/share/man/man4/psm.4 ============================================================================== --- head/share/man/man4/psm.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/psm.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -858,7 +858,7 @@ Clicking any button without moving the m .Xr syslogd 8 .Rs .%T Synaptics TouchPad Interfacing Guide -.%O http://www.synaptics.com/ +.%U http://www.synaptics.com/ .Re .\".Sh HISTORY .Sh AUTHORS Modified: head/share/man/man4/ral.4 ============================================================================== --- head/share/man/man4/ral.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/ral.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -242,7 +242,7 @@ This should not happen. .Xr wpa_supplicant 8 . .Rs .%T "Ralink Technology" -.%O http://www.ralinktech.com/ +.%U http://www.ralinktech.com/ .Re .Sh HISTORY The Modified: head/share/man/man4/re.4 ============================================================================== --- head/share/man/man4/re.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/re.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -212,7 +212,7 @@ the network connection (cable). .Xr ifconfig 8 .Rs .%T RealTek Semiconductor RTL8139C+, RTL8169, RTL8169S and RTL8110S datasheets -.%O http://www.realtek.com.tw/ +.%U http://www.realtek.com.tw/ .Re .Sh HISTORY The Modified: head/share/man/man4/rl.4 ============================================================================== --- head/share/man/man4/rl.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/rl.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -255,7 +255,7 @@ the card should be configured correctly. .Xr ifconfig 8 .Rs .%B The RealTek 8129, 8139 and 8139C+ datasheets -.%O http://www.realtek.com.tw +.%U http://www.realtek.com.tw .Re .Sh HISTORY The Modified: head/share/man/man4/rue.4 ============================================================================== --- head/share/man/man4/rue.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/rue.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -140,7 +140,7 @@ The driver failed to allocate an mbuf fo .Xr ifconfig 8 .Rs .%T "ReakTek RTL8150 data sheet" -.%O ftp://ftp.realtek.com.tw/lancard/data_sheet/8150/ +.%U ftp://ftp.realtek.com.tw/lancard/data_sheet/8150/ .Re .Sh HISTORY The Modified: head/share/man/man4/rum.4 ============================================================================== --- head/share/man/man4/rum.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/rum.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -167,7 +167,7 @@ This should not happen. .Xr wpa_supplicant 8 . .Rs .%T "Ralink Technology" -.%O http://www.ralinktech.com/ +.%U http://www.ralinktech.com/ .Re .Sh HISTORY The Modified: head/share/man/man4/sf.4 ============================================================================== --- head/share/man/man4/sf.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/sf.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -197,7 +197,7 @@ the network connection (cable). .Xr ifconfig 8 .Rs .%T The Adaptec AIC-6915 Programmer's Manual -.%O http://download.adaptec.com/pdfs/user_guides/aic6915_pg.pdf +.%U http://download.adaptec.com/pdfs/user_guides/aic6915_pg.pdf .Re .Sh HISTORY The Modified: head/share/man/man4/sis.4 ============================================================================== --- head/share/man/man4/sis.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/sis.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -193,11 +193,11 @@ the card should be configured correctly. .Xr ifconfig 8 .Rs .%T SiS 900 and SiS 7016 datasheets -.%O http://www.sis.com.tw +.%U http://www.sis.com.tw .Re .Rs .%T NatSemi DP83815 datasheet -.%O http://www.national.com +.%U http://www.national.com .Re .Sh HISTORY The Modified: head/share/man/man4/sk.4 ============================================================================== --- head/share/man/man4/sk.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/sk.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -247,11 +247,11 @@ the network connection (cable). .Xr ifconfig 8 .Rs .%T XaQti XMAC II datasheet -.%O http://www.xaqti.com +.%U http://www.xaqti.com .Re .Rs .%T SysKonnect GEnesis programming manual -.%O http://www.syskonnect.com +.%U http://www.syskonnect.com .Re .Sh HISTORY The Modified: head/share/man/man4/smbus.4 ============================================================================== --- head/share/man/man4/smbus.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/smbus.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -67,7 +67,7 @@ between the internal SMB devices and ext .Xr smb 4 .Rs .%T The SMBus specification -.%O http://www.smbus.org/specs/ +.%U http://www.smbus.org/specs/ .Re .Sh HISTORY The Modified: head/share/man/man4/snd_uaudio.4 ============================================================================== --- head/share/man/man4/snd_uaudio.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/snd_uaudio.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -78,7 +78,7 @@ for more information. .Xr usb 4 .Rs .%T "USB Audio Class Specifications" -.%O http://www.usb.org/developers/devclass_docs/ +.%U http://www.usb.org/developers/devclass_docs/ .Re .Sh HISTORY The Modified: head/share/man/man4/ste.4 ============================================================================== --- head/share/man/man4/ste.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/ste.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -192,7 +192,7 @@ the card should be configured correctly. .Xr ifconfig 8 .Rs .%T Sundance ST201 data sheet -.%O http://www.sundanceti.com +.%U http://www.sundanceti.com .Re .Sh HISTORY The Modified: head/share/man/man4/targ.4 ============================================================================== --- head/share/man/man4/targ.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/targ.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -133,7 +133,7 @@ are the control devices. .Xr scsi 4 .Rs .%T "FreeBSD Target Information" -.%O http://www.root.org/~nate/freebsd/ +.%U http://www.root.org/~nate/freebsd/ .Re .Sh AUTHORS .An -nosplit Modified: head/share/man/man4/udav.4 ============================================================================== --- head/share/man/man4/udav.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/udav.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -87,7 +87,7 @@ For more information on configuring this .Xr ifconfig 8 .Rs .%T "Davicom DM9601 data sheet" -.%O http://www.davicom.com.tw/big5/download/Data%20Sheet/DM9601-DS-P01-930914.pdf +.%U http://www.davicom.com.tw/big5/download/Data%20Sheet/DM9601-DS-P01-930914.pdf .Re .Sh HISTORY The Modified: head/share/man/man4/ural.4 ============================================================================== --- head/share/man/man4/ural.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/ural.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -148,7 +148,7 @@ This should not happen. .Xr wpa_supplicant 8 . .Rs .%T "Ralink Technology" -.%O http://www.ralinktech.com/ +.%U http://www.ralinktech.com/ .Re .Sh HISTORY The Modified: head/share/man/man4/urio.4 ============================================================================== --- head/share/man/man4/urio.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/urio.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -106,7 +106,7 @@ section): .Xr usb 4 .Rs .%T The Rio 500 SourceForge Project Web Page -.%O http://rio500.sourceforge.net/ +.%U http://rio500.sourceforge.net/ .Re .Pp The Rio500 tools from SourceForge Modified: head/share/man/man4/urtw.4 ============================================================================== --- head/share/man/man4/urtw.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/urtw.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -111,7 +111,7 @@ ifconfig wlan create wlandev urtw0 ssid .Xr wpa_supplicant 8 .Rs .%T Realtek -.%O http://www.realtek.com.tw +.%U http://www.realtek.com.tw .Re .Sh HISTORY The Modified: head/share/man/man4/vr.4 ============================================================================== --- head/share/man/man4/vr.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/vr.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -192,7 +192,7 @@ the card should be configured correctly. .Xr ifconfig 8 .Rs .%T The VIA Technologies VT86C100A data sheet -.%O http://www.via.com.tw +.%U http://www.via.com.tw .Re .Sh HISTORY The Modified: head/share/man/man4/wi.4 ============================================================================== --- head/share/man/man4/wi.4 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man4/wi.4 Fri Jan 15 16:01:22 2010 (r202386) @@ -321,7 +321,7 @@ command. .Xr wpa_supplicant 8 . .Rs .%T HCF Light programming specification -.%O http://www.wavelan.com +.%U http://www.wavelan.com .Re .Sh HISTORY The Modified: head/share/man/man7/release.7 ============================================================================== --- head/share/man/man7/release.7 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man7/release.7 Fri Jan 15 16:01:22 2010 (r202386) @@ -518,15 +518,15 @@ make release CHROOTDIR=/local3/release B .Xr sysctl 8 .Rs .%T "FreeBSD Release Engineering" -.%O http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng/ +.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng/ .Re .Rs .%T "FreeBSD Release Engineering of Third Party Packages" -.%O http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng-packages/ +.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng-packages/ .Re .Rs .%T "FreeBSD Developers' Handbook" -.%O http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook/ +.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook/ .Re .Sh HISTORY .Fx Modified: head/share/man/man9/mac.9 ============================================================================== --- head/share/man/man9/mac.9 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man9/mac.9 Fri Jan 15 16:01:22 2010 (r202386) @@ -173,7 +173,7 @@ for information on the MAC Framework API .Xr VFS 9 .Rs .%T "The FreeBSD Architecture Handbook" -.%O "http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/arch-handbook/" +.%U "http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/arch-handbook/" .Re .Sh HISTORY The Modified: head/share/man/man9/pci.9 ============================================================================== --- head/share/man/man9/pci.9 Fri Jan 15 15:47:31 2010 (r202385) +++ head/share/man/man9/pci.9 Fri Jan 15 16:01:22 2010 (r202386) @@ -257,7 +257,7 @@ space on the target architecture. .Rs .%B FreeBSD Developers' Handbook .%T NewBus -.%O http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook/ +.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook/ .Re .Rs .%A Shanley Modified: head/usr.bin/brandelf/brandelf.1 ============================================================================== --- head/usr.bin/brandelf/brandelf.1 Fri Jan 15 15:47:31 2010 (r202385) +++ head/usr.bin/brandelf/brandelf.1 Fri Jan 15 16:01:22 2010 (r202386) @@ -96,7 +96,7 @@ brandelf -t Linux file .%A The Santa Cruz Operation, Inc. .%T System V Application Binary Interface .%D April 29, 1998 (DRAFT) -.%O http://www.sco.com/developer/devspecs/ +.%U http://www.sco.com/developer/devspecs/ .Re .Sh HISTORY The Modified: head/usr.bin/elfdump/elfdump.1 ============================================================================== --- head/usr.bin/elfdump/elfdump.1 Fri Jan 15 15:47:31 2010 (r202385) +++ head/usr.bin/elfdump/elfdump.1 Fri Jan 15 16:01:22 2010 (r202386) @@ -89,7 +89,7 @@ command: .Rs .%A "AT&T Unix Systems Labs" .%T "System V Application Binary Interface" -.%O http://www.sco.com/developers/gabi/ +.%U http://www.sco.com/developers/gabi/ .Re .Sh HISTORY The Modified: head/usr.sbin/faithd/faithd.8 ============================================================================== --- head/usr.sbin/faithd/faithd.8 Fri Jan 15 15:47:31 2010 (r202385) +++ head/usr.sbin/faithd/faithd.8 Fri Jan 15 16:01:22 2010 (r202386) @@ -368,7 +368,7 @@ setting. .%A Kazu Yamamoto .%T "An IPv6-to-IPv4 transport relay translator" .%B RFC3142 -.%O ftp://ftp.isi.edu/in-notes/rfc3142.txt +.%U ftp://ftp.isi.edu/in-notes/rfc3142.txt .%D June 2001 .Re .\" Modified: head/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.8 Fri Jan 15 15:47:31 2010 (r202385) +++ head/usr.sbin/mergemaster/mergemaster.8 Fri Jan 15 16:01:22 2010 (r202386) @@ -443,7 +443,7 @@ comparison, use: .Pp .Pa /usr/src/etc/Makefile .Rs -.%O http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html +.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html .%T The Cutting Edge (using make world) .%A Nik Clayton .Re Modified: head/usr.sbin/smbmsg/smbmsg.8 ============================================================================== --- head/usr.sbin/smbmsg/smbmsg.8 Fri Jan 15 15:47:31 2010 (r202385) +++ head/usr.sbin/smbmsg/smbmsg.8 Fri Jan 15 16:01:22 2010 (r202386) @@ -273,7 +273,7 @@ Diagnostic messages issued are supposed .Xr smbus 4 .Rs .%T "The SMBus specification" -.%O http://www.smbus.org/specs/ +.%U http://www.smbus.org/specs/ .Re .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:04:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D37DD1065670; Fri, 15 Jan 2010 16:04:30 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFC308FC12; Fri, 15 Jan 2010 16:04:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FG4UgF021123; Fri, 15 Jan 2010 16:04:30 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FG4UDK021113; Fri, 15 Jan 2010 16:04:30 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001151604.o0FG4UDK021113@svn.freebsd.org> From: Attilio Rao Date: Fri, 15 Jan 2010 16:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202387 - in head/sys: amd64/amd64 amd64/include amd64/isa conf i386/i386 i386/include i386/isa pc98/cbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:04:30 -0000 Author: attilio Date: Fri Jan 15 16:04:30 2010 New Revision: 202387 URL: http://svn.freebsd.org/changeset/base/202387 Log: Handling all the three clocks (hardclock, softclock, profclock) with the LAPIC may lead to aliasing for softclock and profclock because frequencies are sized in order to fit mainly hardclock. atrtc used to take care of the softclock and profclock and it does still do, if the LAPIC can't handle the clocks properly. Revert the change when the LAPIC started taking charge of all three of them and let atrtc handle softclock and profclock if not explicitly requested. Such request can be made setting != 0 the new tunable machdep.lapic_allclocks or if the new device ATPIC is not present within the i386 kernel config (atrtc is linked to atpic presence). Diagnosed by: Sandvine Incorporated Reviewed by: jhb, emaste Sponsored by: Sandvine Incorporated MFC: 3 weeks Modified: head/sys/amd64/amd64/local_apic.c head/sys/amd64/include/apicvar.h head/sys/amd64/isa/clock.c head/sys/conf/options.i386 head/sys/i386/i386/local_apic.c head/sys/i386/include/apicvar.h head/sys/i386/isa/clock.c head/sys/pc98/cbus/clock.c Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Fri Jan 15 16:01:22 2010 (r202386) +++ head/sys/amd64/amd64/local_apic.c Fri Jan 15 16:04:30 2010 (r202387) @@ -160,6 +160,9 @@ static uint32_t lvt_mode(struct lapic *l struct pic lapic_pic = { .pic_resume = lapic_resume }; +static int lapic_allclocks; +TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); + static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value) { @@ -415,10 +418,11 @@ lapic_disable_pmc(void) /* * Called by cpu_initclocks() on the BSP to setup the local APIC timer so * that it can drive hardclock, statclock, and profclock. This function - * returns true if it is able to use the local APIC timer to drive the - * clocks and false if it is not able. + * returns a positive integer if it is convenient to use the local APIC + * for all the clocks, a negative integer if it is convenient to use the + * local APIC only for the hardclock and 0 if none of them can be handled. */ -int +enum lapic_clock lapic_setup_clock(void) { u_long value; @@ -426,10 +430,10 @@ lapic_setup_clock(void) /* Can't drive the timer without a local APIC. */ if (lapic == NULL) - return (0); + return (LAPIC_CLOCK_NONE); if (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0) - return (0); + return (LAPIC_CLOCK_NONE); /* Start off with a divisor of 2 (power on reset default). */ lapic_timer_divisor = 2; @@ -461,19 +465,27 @@ lapic_setup_clock(void) * (and profhz) run at hz. If 'hz' is below 1500 but above * 750, then we let the lapic timer run at 2 * 'hz'. If 'hz' * is below 750 then we let the lapic timer run at 4 * 'hz'. + * + * Please note that stathz and profhz are set only if all the + * clocks are handled through the local APIC. */ - if (hz >= 1500) + if (lapic_allclocks != 0) { + if (hz >= 1500) + lapic_timer_hz = hz; + else if (hz >= 750) + lapic_timer_hz = hz * 2; + else + lapic_timer_hz = hz * 4; + } else lapic_timer_hz = hz; - else if (hz >= 750) - lapic_timer_hz = hz * 2; - else - lapic_timer_hz = hz * 4; - if (lapic_timer_hz < 128) - stathz = lapic_timer_hz; - else - stathz = lapic_timer_hz / (lapic_timer_hz / 128); - profhz = lapic_timer_hz; lapic_timer_period = value / lapic_timer_hz; + if (lapic_allclocks != 0) { + if (lapic_timer_hz < 128) + stathz = lapic_timer_hz; + else + stathz = lapic_timer_hz / (lapic_timer_hz / 128); + profhz = lapic_timer_hz; + } /* * Start up the timer on the BSP. The APs will kick off their @@ -481,7 +493,7 @@ lapic_setup_clock(void) */ lapic_timer_periodic(lapic_timer_period); lapic_timer_enable_intr(); - return (1); + return (lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL); } void @@ -784,20 +796,23 @@ lapic_handle_timer(struct trapframe *fra else hardclock_cpu(TRAPF_USERMODE(frame)); } + if (lapic_allclocks != 0) { - /* Fire statclock at stathz. */ - la->la_stat_ticks += stathz; - if (la->la_stat_ticks >= lapic_timer_hz) { - la->la_stat_ticks -= lapic_timer_hz; - statclock(TRAPF_USERMODE(frame)); - } + /* Fire statclock at stathz. */ + la->la_stat_ticks += stathz; + if (la->la_stat_ticks >= lapic_timer_hz) { + la->la_stat_ticks -= lapic_timer_hz; + statclock(TRAPF_USERMODE(frame)); + } - /* Fire profclock at profhz, but only when needed. */ - la->la_prof_ticks += profhz; - if (la->la_prof_ticks >= lapic_timer_hz) { - la->la_prof_ticks -= lapic_timer_hz; - if (profprocs != 0) - profclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + /* Fire profclock at profhz, but only when needed. */ + la->la_prof_ticks += profhz; + if (la->la_prof_ticks >= lapic_timer_hz) { + la->la_prof_ticks -= lapic_timer_hz; + if (profprocs != 0) + profclock(TRAPF_USERMODE(frame), + TRAPF_PC(frame)); + } } critical_exit(); } Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Fri Jan 15 16:01:22 2010 (r202386) +++ head/sys/amd64/include/apicvar.h Fri Jan 15 16:04:30 2010 (r202387) @@ -157,6 +157,12 @@ #define APIC_BUS_PCI 2 #define APIC_BUS_MAX APIC_BUS_PCI +enum lapic_clock { + LAPIC_CLOCK_NONE, + LAPIC_CLOCK_HARDCLOCK, + LAPIC_CLOCK_ALL +}; + /* * An APIC enumerator is a psuedo bus driver that enumerates APIC's including * CPU's and I/O APIC's. @@ -224,7 +230,7 @@ int lapic_set_lvt_triggermode(u_int apic enum intr_trigger trigger); void lapic_set_tpr(u_int vector); void lapic_setup(int boot); -int lapic_setup_clock(void); +enum lapic_clock lapic_setup_clock(void); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ Modified: head/sys/amd64/isa/clock.c ============================================================================== --- head/sys/amd64/isa/clock.c Fri Jan 15 16:01:22 2010 (r202386) +++ head/sys/amd64/isa/clock.c Fri Jan 15 16:04:30 2010 (r202387) @@ -91,7 +91,7 @@ static u_int32_t i8254_offset; static int (*i8254_pending)(struct intsrc *); static int i8254_ticked; static int using_atrtc_timer; -static int using_lapic_timer; +static enum lapic_clock using_lapic_timer = LAPIC_CLOCK_NONE; /* Values for timerX_state: */ #define RELEASED 0 @@ -160,7 +160,8 @@ clkintr(struct trapframe *frame) clkintr_pending = 0; mtx_unlock_spin(&clock_lock); } - KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer")); + KASSERT(using_lapic_timer == LAPIC_CLOCK_NONE, + ("clk interrupt enabled with lapic timer")); if (using_atrtc_timer) { #ifdef SMP @@ -422,7 +423,7 @@ set_i8254_freq(u_int freq, int intr_freq i8254_timecounter.tc_frequency = freq; mtx_lock_spin(&clock_lock); i8254_freq = freq; - if (using_lapic_timer) + if (using_lapic_timer != LAPIC_CLOCK_NONE) new_i8254_real_max_count = 0x10000; else new_i8254_real_max_count = TIMER_DIV(intr_freq); @@ -485,7 +486,7 @@ cpu_initclocks() * that it can drive hardclock(). Otherwise, change the 8254 * timecounter to user a simpler algorithm. */ - if (!using_lapic_timer) { + if (using_lapic_timer == LAPIC_CLOCK_NONE) { intr_add_handler("clk", 0, (driver_filter_t *)clkintr, NULL, NULL, INTR_TYPE_CLK, NULL); i8254_intsrc = intr_lookup_source(0); @@ -508,7 +509,7 @@ cpu_initclocks() * kernel clocks, then setup the RTC to periodically interrupt to * drive statclock() and profclock(). */ - if (!using_lapic_timer) { + if (using_lapic_timer != LAPIC_CLOCK_ALL) { using_atrtc_timer = atrtc_setup_clock(); if (using_atrtc_timer) { /* Enable periodic interrupts from the RTC. */ @@ -532,7 +533,7 @@ void cpu_startprofclock(void) { - if (using_lapic_timer || !using_atrtc_timer) + if (using_lapic_timer == LAPIC_CLOCK_ALL || !using_atrtc_timer) return; atrtc_rate(RTCSA_PROF); psdiv = pscnt = psratio; @@ -542,7 +543,7 @@ void cpu_stopprofclock(void) { - if (using_lapic_timer || !using_atrtc_timer) + if (using_lapic_timer == LAPIC_CLOCK_ALL || !using_atrtc_timer) return; atrtc_rate(RTCSA_NOPROF); psdiv = pscnt = 1; Modified: head/sys/conf/options.i386 ============================================================================== --- head/sys/conf/options.i386 Fri Jan 15 16:01:22 2010 (r202386) +++ head/sys/conf/options.i386 Fri Jan 15 16:04:30 2010 (r202387) @@ -105,6 +105,7 @@ NETGRAPH_CRONYX opt_ng_cronyx.h # Device options DEV_APIC opt_apic.h +DEV_ATPIC opt_atpic.h DEV_NPX opt_npx.h ASR_COMPAT opt_asr.h Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Fri Jan 15 16:01:22 2010 (r202386) +++ head/sys/i386/i386/local_apic.c Fri Jan 15 16:04:30 2010 (r202387) @@ -34,6 +34,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_atpic.h" #include "opt_hwpmc_hooks.h" #include "opt_kdtrace.h" @@ -160,6 +161,17 @@ static uint32_t lvt_mode(struct lapic *l struct pic lapic_pic = { .pic_resume = lapic_resume }; +/* + * The atrtc device is compiled in only if atpic is present. + * If it is not, force lapic to take care of all the clocks. + */ +#ifdef DEV_ATPIC +static int lapic_allclocks; +TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); +#else +static int lapic_allclocks = 1; +#endif + static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value) { @@ -416,11 +428,9 @@ lapic_disable_pmc(void) /* * Called by cpu_initclocks() on the BSP to setup the local APIC timer so - * that it can drive hardclock, statclock, and profclock. This function - * returns true if it is able to use the local APIC timer to drive the - * clocks and false if it is not able. + * that it can drive hardclock, statclock, and profclock. */ -int +enum lapic_clock lapic_setup_clock(void) { u_long value; @@ -428,10 +438,10 @@ lapic_setup_clock(void) /* Can't drive the timer without a local APIC. */ if (lapic == NULL) - return (0); + return (LAPIC_CLOCK_NONE); if (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0) - return (0); + return (LAPIC_CLOCK_NONE); /* Start off with a divisor of 2 (power on reset default). */ lapic_timer_divisor = 2; @@ -463,19 +473,27 @@ lapic_setup_clock(void) * (and profhz) run at hz. If 'hz' is below 1500 but above * 750, then we let the lapic timer run at 2 * 'hz'. If 'hz' * is below 750 then we let the lapic timer run at 4 * 'hz'. + * + * Please note that stathz and profhz are set only if all the + * clocks are handled through the local APIC. */ - if (hz >= 1500) + if (lapic_allclocks != 0) { + if (hz >= 1500) + lapic_timer_hz = hz; + else if (hz >= 750) + lapic_timer_hz = hz * 2; + else + lapic_timer_hz = hz * 4; + } else lapic_timer_hz = hz; - else if (hz >= 750) - lapic_timer_hz = hz * 2; - else - lapic_timer_hz = hz * 4; - if (lapic_timer_hz < 128) - stathz = lapic_timer_hz; - else - stathz = lapic_timer_hz / (lapic_timer_hz / 128); - profhz = lapic_timer_hz; lapic_timer_period = value / lapic_timer_hz; + if (lapic_allclocks != 0) { + if (lapic_timer_hz < 128) + stathz = lapic_timer_hz; + else + stathz = lapic_timer_hz / (lapic_timer_hz / 128); + profhz = lapic_timer_hz; + } /* * Start up the timer on the BSP. The APs will kick off their @@ -483,7 +501,7 @@ lapic_setup_clock(void) */ lapic_timer_periodic(lapic_timer_period); lapic_timer_enable_intr(); - return (1); + return (lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL); } void @@ -786,20 +804,23 @@ lapic_handle_timer(struct trapframe *fra else hardclock_cpu(TRAPF_USERMODE(frame)); } + if (lapic_allclocks != 0) { - /* Fire statclock at stathz. */ - la->la_stat_ticks += stathz; - if (la->la_stat_ticks >= lapic_timer_hz) { - la->la_stat_ticks -= lapic_timer_hz; - statclock(TRAPF_USERMODE(frame)); - } + /* Fire statclock at stathz. */ + la->la_stat_ticks += stathz; + if (la->la_stat_ticks >= lapic_timer_hz) { + la->la_stat_ticks -= lapic_timer_hz; + statclock(TRAPF_USERMODE(frame)); + } - /* Fire profclock at profhz, but only when needed. */ - la->la_prof_ticks += profhz; - if (la->la_prof_ticks >= lapic_timer_hz) { - la->la_prof_ticks -= lapic_timer_hz; - if (profprocs != 0) - profclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + /* Fire profclock at profhz, but only when needed. */ + la->la_prof_ticks += profhz; + if (la->la_prof_ticks >= lapic_timer_hz) { + la->la_prof_ticks -= lapic_timer_hz; + if (profprocs != 0) + profclock(TRAPF_USERMODE(frame), + TRAPF_PC(frame)); + } } critical_exit(); } Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Fri Jan 15 16:01:22 2010 (r202386) +++ head/sys/i386/include/apicvar.h Fri Jan 15 16:04:30 2010 (r202387) @@ -186,6 +186,12 @@ #define APIC_BUS_PCI 2 #define APIC_BUS_MAX APIC_BUS_PCI +enum lapic_clock { + LAPIC_CLOCK_NONE, + LAPIC_CLOCK_HARDCLOCK, + LAPIC_CLOCK_ALL +}; + /* * An APIC enumerator is a psuedo bus driver that enumerates APIC's including * CPU's and I/O APIC's. @@ -253,7 +259,7 @@ int lapic_set_lvt_triggermode(u_int apic enum intr_trigger trigger); void lapic_set_tpr(u_int vector); void lapic_setup(int boot); -int lapic_setup_clock(void); +enum lapic_clock lapic_setup_clock(void); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ Modified: head/sys/i386/isa/clock.c ============================================================================== --- head/sys/i386/isa/clock.c Fri Jan 15 16:01:22 2010 (r202386) +++ head/sys/i386/isa/clock.c Fri Jan 15 16:04:30 2010 (r202387) @@ -106,7 +106,7 @@ static u_int32_t i8254_offset; static int (*i8254_pending)(struct intsrc *); static int i8254_ticked; static int using_atrtc_timer; -static int using_lapic_timer; +static enum lapic_clock using_lapic_timer = LAPIC_CLOCK_NONE; /* Values for timerX_state: */ #define RELEASED 0 @@ -175,7 +175,8 @@ clkintr(struct trapframe *frame) clkintr_pending = 0; mtx_unlock_spin(&clock_lock); } - KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer")); + KASSERT(using_lapic_timer == LAPIC_CLOCK_NONE, + ("clk interrupt enabled with lapic timer")); #ifdef KDTRACE_HOOKS /* @@ -453,7 +454,7 @@ set_i8254_freq(u_int freq, int intr_freq i8254_timecounter.tc_frequency = freq; mtx_lock_spin(&clock_lock); i8254_freq = freq; - if (using_lapic_timer) + if (using_lapic_timer != LAPIC_CLOCK_NONE) new_i8254_real_max_count = 0x10000; else new_i8254_real_max_count = TIMER_DIV(intr_freq); @@ -533,7 +534,7 @@ cpu_initclocks() * that it can drive hardclock(). Otherwise, change the 8254 * timecounter to user a simpler algorithm. */ - if (!using_lapic_timer) { + if (using_lapic_timer == LAPIC_CLOCK_NONE) { intr_add_handler("clk", 0, (driver_filter_t *)clkintr, NULL, NULL, INTR_TYPE_CLK, NULL); i8254_intsrc = intr_lookup_source(0); @@ -556,7 +557,7 @@ cpu_initclocks() * kernel clocks, then setup the RTC to periodically interrupt to * drive statclock() and profclock(). */ - if (!using_lapic_timer) { + if (using_lapic_timer != LAPIC_CLOCK_ALL) { using_atrtc_timer = atrtc_setup_clock(); if (using_atrtc_timer) { /* Enable periodic interrupts from the RTC. */ @@ -580,7 +581,7 @@ void cpu_startprofclock(void) { - if (using_lapic_timer || !using_atrtc_timer) + if (using_lapic_timer == LAPIC_CLOCK_ALL || !using_atrtc_timer) return; atrtc_rate(RTCSA_PROF); psdiv = pscnt = psratio; @@ -590,7 +591,7 @@ void cpu_stopprofclock(void) { - if (using_lapic_timer || !using_atrtc_timer) + if (using_lapic_timer == LAPIC_CLOCK_ALL || !using_atrtc_timer) return; atrtc_rate(RTCSA_NOPROF); psdiv = pscnt = 1; Modified: head/sys/pc98/cbus/clock.c ============================================================================== --- head/sys/pc98/cbus/clock.c Fri Jan 15 16:01:22 2010 (r202386) +++ head/sys/pc98/cbus/clock.c Fri Jan 15 16:04:30 2010 (r202387) @@ -101,7 +101,7 @@ static u_int32_t i8254_lastcount; static u_int32_t i8254_offset; static int (*i8254_pending)(struct intsrc *); static int i8254_ticked; -static int using_lapic_timer; +static enum lapic_clock using_lapic_timer = LAPIC_CLOCK_NONE; /* Values for timerX_state: */ #define RELEASED 0 @@ -164,7 +164,8 @@ clkintr(struct trapframe *frame) clkintr_pending = 0; mtx_unlock_spin(&clock_lock); } - KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer")); + KASSERT(using_lapic_timer == LAPIC_CLOCK_NONE, + ("clk interrupt enabled with lapic timer")); #ifdef KDTRACE_HOOKS /* @@ -360,7 +361,7 @@ set_i8254_freq(u_int freq, int intr_freq i8254_timecounter.tc_frequency = freq; mtx_lock_spin(&clock_lock); i8254_freq = freq; - if (using_lapic_timer) + if (using_lapic_timer != LAPIC_CLOCK_NONE) new_i8254_real_max_count = 0x10000; else new_i8254_real_max_count = TIMER_DIV(intr_freq); @@ -443,7 +444,7 @@ cpu_initclocks() * that it can drive hardclock(). Otherwise, change the 8254 * timecounter to user a simpler algorithm. */ - if (!using_lapic_timer) { + if (using_lapic_timer == LAPIC_CLOCK_NONE) { intr_add_handler("clk", 0, (driver_filter_t *)clkintr, NULL, NULL, INTR_TYPE_CLK, NULL); i8254_intsrc = intr_lookup_source(0); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:21:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97AC31065676; Fri, 15 Jan 2010 16:21:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 845D78FC17; Fri, 15 Jan 2010 16:21:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGLWHl025017; Fri, 15 Jan 2010 16:21:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGLWhG025014; Fri, 15 Jan 2010 16:21:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151621.o0FGLWhG025014@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202388 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:21:32 -0000 Author: marius Date: Fri Jan 15 16:21:32 2010 New Revision: 202388 URL: http://svn.freebsd.org/changeset/base/202388 Log: MFC: r201007 Add a man page for mk48txx(4). Requested by: n_hibma Obtained from: NetBSD (original version) Added: stable/7/share/man/man4/mk48txx.4 - copied unchanged from r201006, head/share/man/man4/mk48txx.4 Modified: stable/7/share/man/man4/Makefile Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Fri Jan 15 16:04:30 2010 (r202387) +++ stable/7/share/man/man4/Makefile Fri Jan 15 16:21:32 2010 (r202388) @@ -180,6 +180,7 @@ MAN= aac.4 \ meteor.4 \ mfi.4 \ miibus.4 \ + mk48txx.4 \ mlx.4 \ mly.4 \ mmc.4 \ Copied: stable/7/share/man/man4/mk48txx.4 (from r201006, head/share/man/man4/mk48txx.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/man/man4/mk48txx.4 Fri Jan 15 16:21:32 2010 (r202388, copy of r201006, head/share/man/man4/mk48txx.4) @@ -0,0 +1,230 @@ +.\" $NetBSD: mk48txx.4,v 1.16 2009/04/10 17:14:07 joerg Exp $ +.\" +.\" Copyright (c) 2000, 2002 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Paul Kranenburg. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 25, 2009 +.Dt MK48TXX 4 +.Os +.Sh NAME +.Nm mk48txx +.Nd +.Tn Mostek +time-of-day clock driver +.Sh SYNOPSIS +.In sys/eventhandler.h +.In sys/lock.h +.In sys/mutex.h +.In dev/mk48txx/mk48txxvar.h +.Pp +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device mk48txx" +.Ed +.Sh DESCRIPTION +The +.Nm +driver is a back-end for several models of +.Tn Mostek +time-of-day clock chips. +It provides access methods to retrieve and set date and time for use with the +.Dq Li clock +KOBJ interface. +.Pp +To tie an instance of this device to the system, use the +.Fn mk48txx_attach +function and the mk48txx_softc structure defined as follows: +.Pp +.Ft "int" +.Fn mk48txx_attach "device_t dev" +.Pp +.Bd -literal +typedef uint8_t (*mk48txx_nvrd_t)(device_t dev, int off); +typedef void (*mk48txx_nvwr_t)(device_t dev, int off, uint8_t v); +.Ed +.Bd -literal +struct mk48txx_softc { + struct resource sc_res; + struct mtx sc_mtx; + eventhandler_tag sc_wet; + const char *sc_model; + bus_size_t sc_nvramsz; + bus_size_t sc_clkoffset; + u_int sc_year0; + u_int sc_flag; + mk48txx_nvrd_t sc_nvrd; + mk48txx_nvwr_t sc_nvwr; +}; +.Ed +.Pp +.Bl -tag -width indent +.It Fa sc_res +The bus resource used for accessing the chip's non-volatile memory +.Pq including the clock registers , +which must be supplied by the front-end when using the default access methods +.Pq see below . +Otherwise this member is optional. +.It Fa sc_mtx +The hardware mutex used when accessing the chip's non-volatile memory +.Pq including the clock registers , +which must be initialized with +.Dv MTX_DEF +by the front-end. +.It Fa sc_wet +The event handler tag for the watchdog functionality, +which is registered by the +.Fn mk48txx_attach +function if supported by the chip and specified as part of the +machine-dependent features +.Pq see below . +.It Fa sc_model +The chip model which this instance should serve. +This member must be set to one of +.Dq mk48t02 , +.Dq mk48t08 , +.Dq mk48t18 , +or +.Dq mk48t59 +by the front-end. +.It Fa sc_nvramsz +The size of the non-volatile RAM in the +.Tn Mostek +chip, +which is set by the +.Fn mk48txx_attach +function. +.It Fa sc_clkoffset +The offset into the control registers of the +.Tn Mostek +chip, +which is set by the the +.Fn mk48txx_attach +function. +.It Fa sc_year0 +The year offset to be used with the +.Sq year +counter of the clock, +which must be set by the front-end. +This value is generally dependent on the system configuration in which +the clock device is mounted. +For instance, on +.Tn Sun Microsystems +machines the convention is to have clock's two-digit year represent +the year since 1968. +.It Fa sc_flag +This flag is used to specify machine-dependent features. +The following flags are supported: +.Bl -tag -width ".Dv MK48TXX_WDOG_ENABLE_WDS" +.It Dv MK48TXX_NO_CENT_ADJUST +If the resulting date retrieved with the +.Dq Li clock_gettime() method +would be earlier than January 1, 1970, +the driver will assume that the chip's year counter actually represents a +year in the 21st century. +This behavior can be overridden by setting this flag, +which causes the +.Nm +driver to respect the clock's century bit instead. +.It Dv MK48TXX_WDOG_REGISTER +When this flag is set, +the +.Nm +driver will register as a watchdog via the interface defined in +.Xr 9 watchdog +if supported by the specific chip model. +.It Dv MK48TXX_WDOG_ENABLE_WDS +When this flag is set, +the +.Nm +driver will set the watchdog steering +.Pq WDS +bit when enabling the watchdog functionality of the chip. +enabled +.Pq see the chip documentation for further information regarding the WDS bit . +.El +.It Fa sc_nvread +.It Fa sc_nvwrite +These members specify the access methods for reading respectively writing +clock device registers. +The default, +when +.Dv NULL +is passed as an access method, +is to access the chip memory +.Pq and clock registers +as if they were direct-mapped using the specified bus resource. +.Pp +Otherwise, the driver will call the respective function supplied by the +front-end to perform the access, +passing it the offset +.Va off +of the chip memory +.Pq or clock register +location to be read from or written to, respectively. +.El +.Sh HARDWARE +The following models are supported: +.Pp +.Bl -tag -width indent -offset indent -compact +.It Tn Mostek MK48T02 +.It Tn Mostek MK48T08 +.It Tn Mostek MK48T18 +.It Tn Mostek MK48T59 +.El +.Sh SEE ALSO +.Xr intro 4 , +.Xr watchdog 9 +.Sh HISTORY +The +.Nm mk48txx +driver appeared in +.Nx 1.5 . +The first +.Fx +version to include it was +.Fx 5.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written for +.Nx +by +.An Paul Kranenburg +.Aq pk@NetBSD.org . +It was ported to +.Fx +by +.An Thomas Moestl +.Aq tmm@FreeBSD.org +and later on improved by +.An Marius Strobl +.Aq marius@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:21:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA021065679; Fri, 15 Jan 2010 16:21:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 085318FC1A; Fri, 15 Jan 2010 16:21:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGLW0e025039; Fri, 15 Jan 2010 16:21:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGLWQr025036; Fri, 15 Jan 2010 16:21:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151621.o0FGLWQr025036@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202389 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:21:33 -0000 Author: marius Date: Fri Jan 15 16:21:32 2010 New Revision: 202389 URL: http://svn.freebsd.org/changeset/base/202389 Log: MFC: r201007 Add a man page for mk48txx(4). Requested by: n_hibma Obtained from: NetBSD (original version) Added: stable/8/share/man/man4/mk48txx.4 - copied unchanged from r201006, head/share/man/man4/mk48txx.4 Modified: stable/8/share/man/man4/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Fri Jan 15 16:21:32 2010 (r202388) +++ stable/8/share/man/man4/Makefile Fri Jan 15 16:21:32 2010 (r202389) @@ -198,6 +198,7 @@ MAN= aac.4 \ meteor.4 \ mfi.4 \ miibus.4 \ + mk48txx.4 \ mld.4 \ mlx.4 \ mly.4 \ Copied: stable/8/share/man/man4/mk48txx.4 (from r201006, head/share/man/man4/mk48txx.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/mk48txx.4 Fri Jan 15 16:21:32 2010 (r202389, copy of r201006, head/share/man/man4/mk48txx.4) @@ -0,0 +1,230 @@ +.\" $NetBSD: mk48txx.4,v 1.16 2009/04/10 17:14:07 joerg Exp $ +.\" +.\" Copyright (c) 2000, 2002 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Paul Kranenburg. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 25, 2009 +.Dt MK48TXX 4 +.Os +.Sh NAME +.Nm mk48txx +.Nd +.Tn Mostek +time-of-day clock driver +.Sh SYNOPSIS +.In sys/eventhandler.h +.In sys/lock.h +.In sys/mutex.h +.In dev/mk48txx/mk48txxvar.h +.Pp +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device mk48txx" +.Ed +.Sh DESCRIPTION +The +.Nm +driver is a back-end for several models of +.Tn Mostek +time-of-day clock chips. +It provides access methods to retrieve and set date and time for use with the +.Dq Li clock +KOBJ interface. +.Pp +To tie an instance of this device to the system, use the +.Fn mk48txx_attach +function and the mk48txx_softc structure defined as follows: +.Pp +.Ft "int" +.Fn mk48txx_attach "device_t dev" +.Pp +.Bd -literal +typedef uint8_t (*mk48txx_nvrd_t)(device_t dev, int off); +typedef void (*mk48txx_nvwr_t)(device_t dev, int off, uint8_t v); +.Ed +.Bd -literal +struct mk48txx_softc { + struct resource sc_res; + struct mtx sc_mtx; + eventhandler_tag sc_wet; + const char *sc_model; + bus_size_t sc_nvramsz; + bus_size_t sc_clkoffset; + u_int sc_year0; + u_int sc_flag; + mk48txx_nvrd_t sc_nvrd; + mk48txx_nvwr_t sc_nvwr; +}; +.Ed +.Pp +.Bl -tag -width indent +.It Fa sc_res +The bus resource used for accessing the chip's non-volatile memory +.Pq including the clock registers , +which must be supplied by the front-end when using the default access methods +.Pq see below . +Otherwise this member is optional. +.It Fa sc_mtx +The hardware mutex used when accessing the chip's non-volatile memory +.Pq including the clock registers , +which must be initialized with +.Dv MTX_DEF +by the front-end. +.It Fa sc_wet +The event handler tag for the watchdog functionality, +which is registered by the +.Fn mk48txx_attach +function if supported by the chip and specified as part of the +machine-dependent features +.Pq see below . +.It Fa sc_model +The chip model which this instance should serve. +This member must be set to one of +.Dq mk48t02 , +.Dq mk48t08 , +.Dq mk48t18 , +or +.Dq mk48t59 +by the front-end. +.It Fa sc_nvramsz +The size of the non-volatile RAM in the +.Tn Mostek +chip, +which is set by the +.Fn mk48txx_attach +function. +.It Fa sc_clkoffset +The offset into the control registers of the +.Tn Mostek +chip, +which is set by the the +.Fn mk48txx_attach +function. +.It Fa sc_year0 +The year offset to be used with the +.Sq year +counter of the clock, +which must be set by the front-end. +This value is generally dependent on the system configuration in which +the clock device is mounted. +For instance, on +.Tn Sun Microsystems +machines the convention is to have clock's two-digit year represent +the year since 1968. +.It Fa sc_flag +This flag is used to specify machine-dependent features. +The following flags are supported: +.Bl -tag -width ".Dv MK48TXX_WDOG_ENABLE_WDS" +.It Dv MK48TXX_NO_CENT_ADJUST +If the resulting date retrieved with the +.Dq Li clock_gettime() method +would be earlier than January 1, 1970, +the driver will assume that the chip's year counter actually represents a +year in the 21st century. +This behavior can be overridden by setting this flag, +which causes the +.Nm +driver to respect the clock's century bit instead. +.It Dv MK48TXX_WDOG_REGISTER +When this flag is set, +the +.Nm +driver will register as a watchdog via the interface defined in +.Xr 9 watchdog +if supported by the specific chip model. +.It Dv MK48TXX_WDOG_ENABLE_WDS +When this flag is set, +the +.Nm +driver will set the watchdog steering +.Pq WDS +bit when enabling the watchdog functionality of the chip. +enabled +.Pq see the chip documentation for further information regarding the WDS bit . +.El +.It Fa sc_nvread +.It Fa sc_nvwrite +These members specify the access methods for reading respectively writing +clock device registers. +The default, +when +.Dv NULL +is passed as an access method, +is to access the chip memory +.Pq and clock registers +as if they were direct-mapped using the specified bus resource. +.Pp +Otherwise, the driver will call the respective function supplied by the +front-end to perform the access, +passing it the offset +.Va off +of the chip memory +.Pq or clock register +location to be read from or written to, respectively. +.El +.Sh HARDWARE +The following models are supported: +.Pp +.Bl -tag -width indent -offset indent -compact +.It Tn Mostek MK48T02 +.It Tn Mostek MK48T08 +.It Tn Mostek MK48T18 +.It Tn Mostek MK48T59 +.El +.Sh SEE ALSO +.Xr intro 4 , +.Xr watchdog 9 +.Sh HISTORY +The +.Nm mk48txx +driver appeared in +.Nx 1.5 . +The first +.Fx +version to include it was +.Fx 5.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written for +.Nx +by +.An Paul Kranenburg +.Aq pk@NetBSD.org . +It was ported to +.Fx +by +.An Thomas Moestl +.Aq tmm@FreeBSD.org +and later on improved by +.An Marius Strobl +.Aq marius@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:25:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E278F1065744; Fri, 15 Jan 2010 16:25:17 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0A678FC19; Fri, 15 Jan 2010 16:25:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGPHV2025999; Fri, 15 Jan 2010 16:25:17 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGPHkY025997; Fri, 15 Jan 2010 16:25:17 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151625.o0FGPHkY025997@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202391 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:25:18 -0000 Author: marius Date: Fri Jan 15 16:25:17 2010 New Revision: 202391 URL: http://svn.freebsd.org/changeset/base/202391 Log: MFC: r201007 Correct my e-mail address. Modified: stable/8/share/man/man4/gem.4 Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) Modified: stable/8/share/man/man4/gem.4 ============================================================================== --- stable/8/share/man/man4/gem.4 Fri Jan 15 16:24:58 2010 (r202390) +++ stable/8/share/man/man4/gem.4 Fri Jan 15 16:25:17 2010 (r202391) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2009 +.Dd December 25, 2009 .Dt GEM 4 .Os .Sh NAME @@ -150,7 +150,7 @@ by .Aq tmm@FreeBSD.org and later on improved by .An Marius Strobl -.Aq marus@FreeBSD.org . +.Aq marius@FreeBSD.org . The man page was written by .An Thomas Klausner .Aq wiz@NetBSD.org . From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:25:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FEFB1065742; Fri, 15 Jan 2010 16:25:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F23738FC1B; Fri, 15 Jan 2010 16:25:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGPJbd026034; Fri, 15 Jan 2010 16:25:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGPJZ3026032; Fri, 15 Jan 2010 16:25:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151625.o0FGPJZ3026032@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202392 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:25:20 -0000 Author: marius Date: Fri Jan 15 16:25:19 2010 New Revision: 202392 URL: http://svn.freebsd.org/changeset/base/202392 Log: MFC: r201007 Correct my e-mail address. Modified: stable/7/share/man/man4/gem.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/gem.4 ============================================================================== --- stable/7/share/man/man4/gem.4 Fri Jan 15 16:25:17 2010 (r202391) +++ stable/7/share/man/man4/gem.4 Fri Jan 15 16:25:19 2010 (r202392) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2009 +.Dd December 25, 2009 .Dt GEM 4 .Os .Sh NAME @@ -150,7 +150,7 @@ by .Aq tmm@FreeBSD.org and later on improved by .An Marius Strobl -.Aq marus@FreeBSD.org . +.Aq marius@FreeBSD.org . The man page was written by .An Thomas Klausner .Aq wiz@NetBSD.org . From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:27:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 627001065676; Fri, 15 Jan 2010 16:27:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EC928FC17; Fri, 15 Jan 2010 16:27:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGRwAZ026699; Fri, 15 Jan 2010 16:27:58 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGRwS5026694; Fri, 15 Jan 2010 16:27:58 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151627.o0FGRwS5026694@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202393 - in stable/8/sys: dev/mc146818 sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:27:58 -0000 Author: marius Date: Fri Jan 15 16:27:57 2010 New Revision: 202393 URL: http://svn.freebsd.org/changeset/base/202393 Log: MFC: r201008 Style changes Obtained from: NetBSD (mc146818reg.h) Modified: stable/8/sys/dev/mc146818/mc146818.c stable/8/sys/dev/mc146818/mc146818reg.h stable/8/sys/dev/mc146818/mc146818var.h stable/8/sys/sparc64/sparc64/rtc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mc146818/mc146818.c ============================================================================== --- stable/8/sys/dev/mc146818/mc146818.c Fri Jan 15 16:25:19 2010 (r202392) +++ stable/8/sys/dev/mc146818/mc146818.c Fri Jan 15 16:27:57 2010 (r202393) @@ -94,7 +94,7 @@ mc146818_attach(device_t dev) (*sc->sc_mcwrite)(dev, MC_REGB, sc->sc_regb); mtx_unlock_spin(&sc->sc_mtx); - clock_register(dev, 1000000); /* 1 second resolution. */ + clock_register(dev, 1000000); /* 1 second resolution */ return (0); } @@ -116,7 +116,7 @@ mc146818_gettime(device_t dev, struct ti /* * If MC_REGA_UIP is 0 we have at least 244us before the next - * update. If it's 1 an update is imminent. + * update. If it's 1 an update is imminent. */ for (;;) { mtx_lock_spin(&sc->sc_mtx); @@ -260,6 +260,9 @@ mc146818_def_write(device_t dev, u_int r bus_space_write_1(sc->sc_bst, sc->sc_bsh, MC_DATA, val); } +#undef MC_ADDR +#undef MC_DATA + /* * Looks like it's common even across platforms to store the century at * 0x32 in the NVRAM of the mc146818. @@ -283,3 +286,5 @@ mc146818_def_setcent(device_t dev, u_int sc = device_get_softc(dev); (*sc->sc_mcwrite)(dev, MC_CENT, cent); } + +#undef MC_CENT Modified: stable/8/sys/dev/mc146818/mc146818reg.h ============================================================================== --- stable/8/sys/dev/mc146818/mc146818reg.h Fri Jan 15 16:25:19 2010 (r202392) +++ stable/8/sys/dev/mc146818/mc146818reg.h Fri Jan 15 16:27:57 2010 (r202393) @@ -1,17 +1,17 @@ /*- * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. - * + * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU @@ -22,7 +22,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * from: NetBSD: mc146818reg.h,v 1.5 2003/11/02 11:07:45 wiz Exp + * $NetBSD: mc146818reg.h,v 1.9 2006/03/08 23:46:25 lukem Exp $ * * $FreeBSD$ */ @@ -122,8 +122,8 @@ * Periodic Interrupt Rate Select constants (Control register A) */ #define MC_RATE_NONE 0x0 /* No periodic interrupt */ -#define MC_RATE_1 0x1 /* 256 Hz if MC_BASE_32_KHz, else 32768 Hz */ -#define MC_RATE_2 0x2 /* 128 Hz if MC_BASE_32_KHz, else 16384 Hz */ +#define MC_RATE_1 0x1 /* 256 Hz if MC_BASE_32_KHz, else 32768 Hz */ +#define MC_RATE_2 0x2 /* 128 Hz if MC_BASE_32_KHz, else 16384 Hz */ #define MC_RATE_8192_Hz 0x3 /* 122.070 us period */ #define MC_RATE_4096_Hz 0x4 /* 244.141 us period */ #define MC_RATE_2048_Hz 0x5 /* 488.281 us period */ @@ -141,8 +141,8 @@ /* * Time base (divisor select) constants (Control register A) */ -#define MC_BASE_4_MHz 0x00 /* 4MHz crystal */ -#define MC_BASE_1_MHz MC_REGA_DV0 /* 1MHz crystal */ -#define MC_BASE_32_KHz MC_REGA_DV1 /* 32KHz crystal */ +#define MC_BASE_4_MHz 0x00 /* 4 MHz crystal */ +#define MC_BASE_1_MHz MC_REGA_DV0 /* 1 MHz crystal */ +#define MC_BASE_32_KHz MC_REGA_DV1 /* 32 KHz crystal */ #define MC_BASE_NONE (MC_REGA_DV2 | MC_REGA_DV1) /* actually also resets */ #define MC_BASE_RESET (MC_REGA_DV2 | MC_REGA_DV1 | MC_REGA_DV0) Modified: stable/8/sys/dev/mc146818/mc146818var.h ============================================================================== --- stable/8/sys/dev/mc146818/mc146818var.h Fri Jan 15 16:25:19 2010 (r202392) +++ stable/8/sys/dev/mc146818/mc146818var.h Fri Jan 15 16:27:57 2010 (r202393) @@ -38,29 +38,30 @@ struct mc146818_softc { u_char sc_regb; /* register B */ u_int sc_year0; /* year counter offset */ + u_int sc_flag; /* MD flags */ -#define MC146818_NO_CENT_ADJUST 0x0001 /* don't adjust century */ -#define MC146818_BCD 0x0002 /* use BCD mode */ -#define MC146818_12HR 0x0004 /* use AM/PM mode */ +#define MC146818_NO_CENT_ADJUST 0x0001 /* don't adjust century */ +#define MC146818_BCD 0x0002 /* use BCD mode */ +#define MC146818_12HR 0x0004 /* use AM/PM mode */ /* MD chip register read/write functions */ - u_int (*sc_mcread)(device_t, u_int); - void (*sc_mcwrite)(device_t, u_int, u_int); + u_int (*sc_mcread)(device_t dev, u_int reg); + void (*sc_mcwrite)(device_t dev, u_int reg, u_int val); /* MD century get/set functions */ - u_int (*sc_getcent)(device_t); - void (*sc_setcent)(device_t, u_int); + u_int (*sc_getcent)(device_t dev); + void (*sc_setcent)(device_t dev, u_int cent); }; /* Default read/write functions */ -u_int mc146818_def_read(device_t, u_int); -void mc146818_def_write(device_t, u_int, u_int); +u_int mc146818_def_read(device_t dev, u_int reg); +void mc146818_def_write(device_t dev, u_int reg, u_int val); /* Chip attach function */ int mc146818_attach(device_t); /* Methods for the clock interface */ #ifdef notyet -int mc146818_getsecs(device_t, int *); +int mc146818_getsecs(device_t dev, int *secp); #endif -int mc146818_gettime(device_t, struct timespec *); -int mc146818_settime(device_t, struct timespec *); +int mc146818_gettime(device_t dev, struct timespec *ts); +int mc146818_settime(device_t dev, struct timespec *ts); Modified: stable/8/sys/sparc64/sparc64/rtc.c ============================================================================== --- stable/8/sys/sparc64/sparc64/rtc.c Fri Jan 15 16:25:19 2010 (r202392) +++ stable/8/sys/sparc64/sparc64/rtc.c Fri Jan 15 16:27:57 2010 (r202393) @@ -111,7 +111,7 @@ static device_method_t rtc_isa_methods[] DEVMETHOD(clock_gettime, mc146818_gettime), DEVMETHOD(clock_settime, mc146818_settime), - { 0, 0 } + KOBJMETHOD_END }; static driver_t rtc_isa_driver = { @@ -123,8 +123,8 @@ static driver_t rtc_isa_driver = { DRIVER_MODULE(rtc, isa, rtc_isa_driver, rtc_devclass, 0, 0); #endif -static u_int pc87317_getcent(device_t); -static void pc87317_setcent(device_t, u_int); +static u_int pc87317_getcent(device_t dev); +static void pc87317_setcent(device_t dev, u_int cent); static int rtc_ebus_probe(device_t dev) From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:28:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D19771065670; Fri, 15 Jan 2010 16:28:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE8198FC12; Fri, 15 Jan 2010 16:28:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGS2gA026739; Fri, 15 Jan 2010 16:28:02 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGS2lU026734; Fri, 15 Jan 2010 16:28:02 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151628.o0FGS2lU026734@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:28:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202394 - in stable/7/sys: dev/mc146818 sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:28:02 -0000 Author: marius Date: Fri Jan 15 16:28:02 2010 New Revision: 202394 URL: http://svn.freebsd.org/changeset/base/202394 Log: MFC: r201008 Style changes Obtained from: NetBSD (mc146818reg.h) Modified: stable/7/sys/dev/mc146818/mc146818.c stable/7/sys/dev/mc146818/mc146818reg.h stable/7/sys/dev/mc146818/mc146818var.h stable/7/sys/sparc64/sparc64/rtc.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mc146818/mc146818.c ============================================================================== --- stable/7/sys/dev/mc146818/mc146818.c Fri Jan 15 16:27:57 2010 (r202393) +++ stable/7/sys/dev/mc146818/mc146818.c Fri Jan 15 16:28:02 2010 (r202394) @@ -94,7 +94,7 @@ mc146818_attach(device_t dev) (*sc->sc_mcwrite)(dev, MC_REGB, sc->sc_regb); mtx_unlock_spin(&sc->sc_mtx); - clock_register(dev, 1000000); /* 1 second resolution. */ + clock_register(dev, 1000000); /* 1 second resolution */ return (0); } @@ -116,7 +116,7 @@ mc146818_gettime(device_t dev, struct ti /* * If MC_REGA_UIP is 0 we have at least 244us before the next - * update. If it's 1 an update is imminent. + * update. If it's 1 an update is imminent. */ for (;;) { mtx_lock_spin(&sc->sc_mtx); @@ -260,6 +260,9 @@ mc146818_def_write(device_t dev, u_int r bus_space_write_1(sc->sc_bst, sc->sc_bsh, MC_DATA, val); } +#undef MC_ADDR +#undef MC_DATA + /* * Looks like it's common even across platforms to store the century at * 0x32 in the NVRAM of the mc146818. @@ -283,3 +286,5 @@ mc146818_def_setcent(device_t dev, u_int sc = device_get_softc(dev); (*sc->sc_mcwrite)(dev, MC_CENT, cent); } + +#undef MC_CENT Modified: stable/7/sys/dev/mc146818/mc146818reg.h ============================================================================== --- stable/7/sys/dev/mc146818/mc146818reg.h Fri Jan 15 16:27:57 2010 (r202393) +++ stable/7/sys/dev/mc146818/mc146818reg.h Fri Jan 15 16:28:02 2010 (r202394) @@ -1,17 +1,17 @@ /*- * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. - * + * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU @@ -22,7 +22,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * from: NetBSD: mc146818reg.h,v 1.5 2003/11/02 11:07:45 wiz Exp + * $NetBSD: mc146818reg.h,v 1.9 2006/03/08 23:46:25 lukem Exp $ * * $FreeBSD$ */ @@ -122,8 +122,8 @@ * Periodic Interrupt Rate Select constants (Control register A) */ #define MC_RATE_NONE 0x0 /* No periodic interrupt */ -#define MC_RATE_1 0x1 /* 256 Hz if MC_BASE_32_KHz, else 32768 Hz */ -#define MC_RATE_2 0x2 /* 128 Hz if MC_BASE_32_KHz, else 16384 Hz */ +#define MC_RATE_1 0x1 /* 256 Hz if MC_BASE_32_KHz, else 32768 Hz */ +#define MC_RATE_2 0x2 /* 128 Hz if MC_BASE_32_KHz, else 16384 Hz */ #define MC_RATE_8192_Hz 0x3 /* 122.070 us period */ #define MC_RATE_4096_Hz 0x4 /* 244.141 us period */ #define MC_RATE_2048_Hz 0x5 /* 488.281 us period */ @@ -141,8 +141,8 @@ /* * Time base (divisor select) constants (Control register A) */ -#define MC_BASE_4_MHz 0x00 /* 4MHz crystal */ -#define MC_BASE_1_MHz MC_REGA_DV0 /* 1MHz crystal */ -#define MC_BASE_32_KHz MC_REGA_DV1 /* 32KHz crystal */ +#define MC_BASE_4_MHz 0x00 /* 4 MHz crystal */ +#define MC_BASE_1_MHz MC_REGA_DV0 /* 1 MHz crystal */ +#define MC_BASE_32_KHz MC_REGA_DV1 /* 32 KHz crystal */ #define MC_BASE_NONE (MC_REGA_DV2 | MC_REGA_DV1) /* actually also resets */ #define MC_BASE_RESET (MC_REGA_DV2 | MC_REGA_DV1 | MC_REGA_DV0) Modified: stable/7/sys/dev/mc146818/mc146818var.h ============================================================================== --- stable/7/sys/dev/mc146818/mc146818var.h Fri Jan 15 16:27:57 2010 (r202393) +++ stable/7/sys/dev/mc146818/mc146818var.h Fri Jan 15 16:28:02 2010 (r202394) @@ -38,29 +38,30 @@ struct mc146818_softc { u_char sc_regb; /* register B */ u_int sc_year0; /* year counter offset */ + u_int sc_flag; /* MD flags */ -#define MC146818_NO_CENT_ADJUST 0x0001 /* don't adjust century */ -#define MC146818_BCD 0x0002 /* use BCD mode */ -#define MC146818_12HR 0x0004 /* use AM/PM mode */ +#define MC146818_NO_CENT_ADJUST 0x0001 /* don't adjust century */ +#define MC146818_BCD 0x0002 /* use BCD mode */ +#define MC146818_12HR 0x0004 /* use AM/PM mode */ /* MD chip register read/write functions */ - u_int (*sc_mcread)(device_t, u_int); - void (*sc_mcwrite)(device_t, u_int, u_int); + u_int (*sc_mcread)(device_t dev, u_int reg); + void (*sc_mcwrite)(device_t dev, u_int reg, u_int val); /* MD century get/set functions */ - u_int (*sc_getcent)(device_t); - void (*sc_setcent)(device_t, u_int); + u_int (*sc_getcent)(device_t dev); + void (*sc_setcent)(device_t dev, u_int cent); }; /* Default read/write functions */ -u_int mc146818_def_read(device_t, u_int); -void mc146818_def_write(device_t, u_int, u_int); +u_int mc146818_def_read(device_t dev, u_int reg); +void mc146818_def_write(device_t dev, u_int reg, u_int val); /* Chip attach function */ int mc146818_attach(device_t); /* Methods for the clock interface */ #ifdef notyet -int mc146818_getsecs(device_t, int *); +int mc146818_getsecs(device_t dev, int *secp); #endif -int mc146818_gettime(device_t, struct timespec *); -int mc146818_settime(device_t, struct timespec *); +int mc146818_gettime(device_t dev, struct timespec *ts); +int mc146818_settime(device_t dev, struct timespec *ts); Modified: stable/7/sys/sparc64/sparc64/rtc.c ============================================================================== --- stable/7/sys/sparc64/sparc64/rtc.c Fri Jan 15 16:27:57 2010 (r202393) +++ stable/7/sys/sparc64/sparc64/rtc.c Fri Jan 15 16:28:02 2010 (r202394) @@ -111,7 +111,7 @@ static device_method_t rtc_isa_methods[] DEVMETHOD(clock_gettime, mc146818_gettime), DEVMETHOD(clock_settime, mc146818_settime), - { 0, 0 } + KOBJMETHOD_END }; static driver_t rtc_isa_driver = { @@ -123,8 +123,8 @@ static driver_t rtc_isa_driver = { DRIVER_MODULE(rtc, isa, rtc_isa_driver, rtc_devclass, 0, 0); #endif -static u_int pc87317_getcent(device_t); -static void pc87317_setcent(device_t, u_int); +static u_int pc87317_getcent(device_t dev); +static void pc87317_setcent(device_t dev, u_int cent); static int rtc_ebus_probe(device_t dev) From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:29:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA4631065679; Fri, 15 Jan 2010 16:29:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE9BD8FC14; Fri, 15 Jan 2010 16:29:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGTeNJ027170; Fri, 15 Jan 2010 16:29:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGTeh9027167; Fri, 15 Jan 2010 16:29:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151629.o0FGTeh9027167@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202395 - stable/8/sys/dev/mc146818 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:29:41 -0000 Author: marius Date: Fri Jan 15 16:29:40 2010 New Revision: 202395 URL: http://svn.freebsd.org/changeset/base/202395 Log: MFC: r201009 Remove clause 3 from Izumi Tsutsui's licenses. Obtained from: NetBSD Modified: stable/8/sys/dev/mc146818/mc146818.c stable/8/sys/dev/mc146818/mc146818var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mc146818/mc146818.c ============================================================================== --- stable/8/sys/dev/mc146818/mc146818.c Fri Jan 15 16:28:02 2010 (r202394) +++ stable/8/sys/dev/mc146818/mc146818.c Fri Jan 15 16:29:40 2010 (r202395) @@ -9,8 +9,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -23,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mc146818.c,v 1.4 2003/11/24 06:20:40 tsutsui Exp + * $NetBSD: mc146818.c,v 1.16 2008/05/14 13:29:28 tsutsui Exp $ */ #include Modified: stable/8/sys/dev/mc146818/mc146818var.h ============================================================================== --- stable/8/sys/dev/mc146818/mc146818var.h Fri Jan 15 16:28:02 2010 (r202394) +++ stable/8/sys/dev/mc146818/mc146818var.h Fri Jan 15 16:29:40 2010 (r202395) @@ -9,8 +9,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -23,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mc146818var.h,v 1.3 2003/11/24 06:20:40 tsutsui Exp + * $NetBSD: mc146818var.h,v 1.7 2008/05/14 13:29:29 tsutsui Exp $ * * $FreeBSD$ */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:29:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 098281065670; Fri, 15 Jan 2010 16:29:42 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D24588FC16; Fri, 15 Jan 2010 16:29:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGTfKP027201; Fri, 15 Jan 2010 16:29:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGTfiW027198; Fri, 15 Jan 2010 16:29:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151629.o0FGTfiW027198@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:29:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202396 - stable/7/sys/dev/mc146818 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:29:42 -0000 Author: marius Date: Fri Jan 15 16:29:41 2010 New Revision: 202396 URL: http://svn.freebsd.org/changeset/base/202396 Log: MFC: r201009 Remove clause 3 from Izumi Tsutsui's licenses. Obtained from: NetBSD Modified: stable/7/sys/dev/mc146818/mc146818.c stable/7/sys/dev/mc146818/mc146818var.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mc146818/mc146818.c ============================================================================== --- stable/7/sys/dev/mc146818/mc146818.c Fri Jan 15 16:29:40 2010 (r202395) +++ stable/7/sys/dev/mc146818/mc146818.c Fri Jan 15 16:29:41 2010 (r202396) @@ -9,8 +9,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -23,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mc146818.c,v 1.4 2003/11/24 06:20:40 tsutsui Exp + * $NetBSD: mc146818.c,v 1.16 2008/05/14 13:29:28 tsutsui Exp $ */ #include Modified: stable/7/sys/dev/mc146818/mc146818var.h ============================================================================== --- stable/7/sys/dev/mc146818/mc146818var.h Fri Jan 15 16:29:40 2010 (r202395) +++ stable/7/sys/dev/mc146818/mc146818var.h Fri Jan 15 16:29:41 2010 (r202396) @@ -9,8 +9,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -23,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mc146818var.h,v 1.3 2003/11/24 06:20:40 tsutsui Exp + * $NetBSD: mc146818var.h,v 1.7 2008/05/14 13:29:29 tsutsui Exp $ * * $FreeBSD$ */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:41:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DADB61065676; Fri, 15 Jan 2010 16:41:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEF738FC15; Fri, 15 Jan 2010 16:41:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGfAgF029902; Fri, 15 Jan 2010 16:41:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGfArB029900; Fri, 15 Jan 2010 16:41:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151641.o0FGfArB029900@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202397 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:41:11 -0000 Author: marius Date: Fri Jan 15 16:41:10 2010 New Revision: 202397 URL: http://svn.freebsd.org/changeset/base/202397 Log: MFC: r201126 Account for firmware versions which include the CDMA interrupts in the OFW device tree. Modified: stable/7/sys/sparc64/pci/schizo.c Modified: stable/7/sys/sparc64/pci/schizo.c ============================================================================== --- stable/7/sys/sparc64/pci/schizo.c Fri Jan 15 16:29:41 2010 (r202396) +++ stable/7/sys/sparc64/pci/schizo.c Fri Jan 15 16:41:10 2010 (r202397) @@ -627,31 +627,44 @@ schizo_attach(device_t dev) /* * According to the Schizo Errata I-13, consistent DMA flushing/ * syncing is FUBAR in version < 5 (i.e. revision < 2.3) bridges, - * so we can't use it and need to live with the consequences. - * With Schizo version >= 5, CDMA flushing/syncing is usable - * but requires the the workaround described in Schizo Errata - * I-23. With Tomatillo and XMITS, CDMA flushing/syncing works - * as expected, Tomatillo version <= 4 (i.e. revision <= 2.3) - * bridges additionally require a block store after a write to - * TOMXMS_PCI_DMA_SYNC_PEND though. + * so we can't use it and need to live with the consequences. With + * Schizo version >= 5, CDMA flushing/syncing is usable but requires + * the workaround described in Schizo Errata I-23. With Tomatillo + * and XMITS, CDMA flushing/syncing works as expected, Tomatillo + * version <= 4 (i.e. revision <= 2.3) bridges additionally require + * a block store after a write to TOMXMS_PCI_DMA_SYNC_PEND though. */ if ((sc->sc_mode == SCHIZO_MODE_SCZ && sc->sc_ver >= 5) || sc->sc_mode == SCHIZO_MODE_TOM || sc->sc_mode == SCHIZO_MODE_XMS) { sc->sc_flags |= SCHIZO_FLAGS_CDMA; if (sc->sc_mode == SCHIZO_MODE_SCZ) { - n = STX_CDMA_A_INO + sc->sc_half; - if (bus_set_resource(dev, SYS_RES_IRQ, 5, - INTMAP_VEC(sc->sc_ign, n), 1) != 0) - panic("%s: failed to add CDMA interrupt", - __func__); - i = schizo_intr_register(sc, n); - if (i != 0) - panic("%s: could not register interrupt " - "controller for CDMA (%d)", __func__, i); - (void)schizo_get_intrmap(sc, n, NULL, - &sc->sc_cdma_clr); sc->sc_cdma_state = SCHIZO_CDMA_STATE_DONE; - schizo_set_intr(sc, 5, n, schizo_cdma); + /* + * Some firmware versions include the CDMA interrupt + * at RID 4 but most don't. With the latter we add + * it ourselves at the spare RID 5. + */ + n = INTINO(bus_get_resource_start(dev, SYS_RES_IRQ, + 4)); + if (n == STX_CDMA_A_INO || n == STX_CDMA_B_INO) { + (void)schizo_get_intrmap(sc, n, NULL, + &sc->sc_cdma_clr); + schizo_set_intr(sc, 4, n, schizo_cdma); + } else { + n = STX_CDMA_A_INO + sc->sc_half; + if (bus_set_resource(dev, SYS_RES_IRQ, 5, + INTMAP_VEC(sc->sc_ign, n), 1) != 0) + panic("%s: failed to add CDMA " + "interrupt", __func__); + i = schizo_intr_register(sc, n); + if (i != 0) + panic("%s: could not register " + "interrupt controller for CDMA " + "(%d)", __func__, i); + (void)schizo_get_intrmap(sc, n, NULL, + &sc->sc_cdma_clr); + schizo_set_intr(sc, 5, n, schizo_cdma); + } } if (sc->sc_mode == SCHIZO_MODE_TOM && sc->sc_ver <= 4) sc->sc_flags |= SCHIZO_FLAGS_BSWAR; From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:42:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 458ED106566B; Fri, 15 Jan 2010 16:42:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 323188FC0C; Fri, 15 Jan 2010 16:42:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGgegW030288; Fri, 15 Jan 2010 16:42:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGgeHi030285; Fri, 15 Jan 2010 16:42:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151642.o0FGgeHi030285@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:42:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202398 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:42:40 -0000 Author: marius Date: Fri Jan 15 16:42:39 2010 New Revision: 202398 URL: http://svn.freebsd.org/changeset/base/202398 Log: MFC: r201199 - Prefer i and j over i and n for temporary integer variables. - Wrap/shorten too long lines. - Remove a redundant variable and an unnecessary cast in schizo(4). Modified: stable/8/sys/sparc64/pci/psycho.c stable/8/sys/sparc64/pci/schizo.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/pci/psycho.c ============================================================================== --- stable/8/sys/sparc64/pci/psycho.c Fri Jan 15 16:41:10 2010 (r202397) +++ stable/8/sys/sparc64/pci/psycho.c Fri Jan 15 16:42:39 2010 (r202398) @@ -181,9 +181,9 @@ struct psycho_dma_sync { void *pds_arg; /* argument for the handler */ void *pds_cookie; /* parent bus int. cookie */ device_t pds_ppb; /* farest PCI-PCI bridge */ - uint8_t pds_bus; /* bus of farest PCI device */ - uint8_t pds_slot; /* slot of farest PCI device */ - uint8_t pds_func; /* func. of farest PCI device */ + uint8_t pds_bus; /* bus of farest PCI dev. */ + uint8_t pds_slot; /* slot of farest PCI dev. */ + uint8_t pds_func; /* func. of farest PCI dev. */ }; #define PSYCHO_READ8(sc, off) \ @@ -205,8 +205,8 @@ struct psycho_dma_sync { * "Hummingbird" is the UltraSPARC IIe onboard UPA to PCI bridge. It's * basically the same as Sabre but without an APB underneath it. * - * "Psycho" and "Psycho+" are dual UPA to PCI bridges. They sit on the UPA bus - * and manage two PCI buses. "Psycho" has two 64-bit 33MHz buses, while + * "Psycho" and "Psycho+" are dual UPA to PCI bridges. They sit on the UPA + * bus and manage two PCI buses. "Psycho" has two 64-bit 33MHz buses, while * "Psycho+" controls both a 64-bit 33Mhz and a 64-bit 66Mhz PCI bus. You * will usually find a "Psycho+" since I don't think the original "Psycho" * ever shipped, and if it did it would be in the U30. @@ -263,7 +263,8 @@ psycho_get_desc(device_t dev) rv = psycho_find_desc(psycho_models, ofw_bus_get_model(dev)); if (rv == NULL) - rv = psycho_find_desc(psycho_compats, ofw_bus_get_compat(dev)); + rv = psycho_find_desc(psycho_compats, + ofw_bus_get_compat(dev)); return (rv); } @@ -295,7 +296,7 @@ psycho_attach(device_t dev) uint32_t dvmabase, prop, prop_array[2]; int32_t rev; u_int rerun, ver; - int i, n; + int i, j; node = ofw_bus_get_node(dev); sc = device_get_softc(dev); @@ -461,12 +462,12 @@ psycho_attach(device_t dev) rman_manage_region(&sc->sc_pci_mem_rman, 0, PSYCHO_MEM_SIZE) != 0) panic("%s: failed to set up memory rman", __func__); - n = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range); + i = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range); /* * Make sure that the expected ranges are present. The * OFW_PCI_CS_MEM64 one is not currently used though. */ - if (n != PSYCHO_NRANGE) + if (i != PSYCHO_NRANGE) panic("%s: unsupported number of ranges", __func__); /* * Find the addresses of the various bus spaces. @@ -474,11 +475,12 @@ psycho_attach(device_t dev) * The physical start addresses of the ranges are the configuration, * memory and I/O handles. */ - for (n = 0; n < PSYCHO_NRANGE; n++) { - i = OFW_PCI_RANGE_CS(&range[n]); - if (sc->sc_pci_bh[i] != 0) - panic("%s: duplicate range for space %d", __func__, i); - sc->sc_pci_bh[i] = OFW_PCI_RANGE_PHYS(&range[n]); + for (i = 0; i < PSYCHO_NRANGE; i++) { + j = OFW_PCI_RANGE_CS(&range[i]); + if (sc->sc_pci_bh[j] != 0) + panic("%s: duplicate range for space %d", + __func__, j); + sc->sc_pci_bh[j] = OFW_PCI_RANGE_PHYS(&range[i]); } free(range, M_OFWPROP); @@ -496,8 +498,8 @@ psycho_attach(device_t dev) * vectors. We do this early in order to be able to catch * stray interrupts. */ - for (n = 0; n <= PSYCHO_MAX_INO; n++) { - if (psycho_find_intrmap(sc, n, &intrmap, &intrclr, + for (i = 0; i <= PSYCHO_MAX_INO; i++) { + if (psycho_find_intrmap(sc, i, &intrmap, &intrclr, NULL) == 0) continue; pica = malloc(sizeof(*pica), M_DEVBUF, M_NOWAIT); @@ -515,21 +517,21 @@ psycho_attach(device_t dev) */ device_printf(dev, "intr map (INO %d, %s) %#lx: %#lx, clr: %#lx\n", - n, intrmap <= PSR_PCIB3_INT_MAP ? "PCI" : "OBIO", - (u_long)intrmap, (u_long)PSYCHO_READ8(sc, intrmap), - (u_long)intrclr); - PSYCHO_WRITE8(sc, intrmap, INTMAP_VEC(sc->sc_ign, n)); + i, intrmap <= PSR_PCIB3_INT_MAP ? "PCI" : "OBIO", + (u_long)intrmap, (u_long)PSYCHO_READ8(sc, + intrmap), (u_long)intrclr); + PSYCHO_WRITE8(sc, intrmap, INTMAP_VEC(sc->sc_ign, i)); PSYCHO_WRITE8(sc, intrclr, 0); PSYCHO_WRITE8(sc, intrmap, - INTMAP_ENABLE(INTMAP_VEC(sc->sc_ign, n), + INTMAP_ENABLE(INTMAP_VEC(sc->sc_ign, i), PCPU_GET(mid))); #endif - i = intr_controller_register(INTMAP_VEC(sc->sc_ign, n), - &psycho_ic, pica); - if (i != 0) + j = intr_controller_register(INTMAP_VEC(sc->sc_ign, + i), &psycho_ic, pica); + if (j != 0) device_printf(dev, "could not register " "interrupt controller for INO %d (%d)\n", - n, i); + i, j); } if (sc->sc_mode == PSYCHO_MODE_PSYCHO) @@ -583,12 +585,12 @@ psycho_attach(device_t dev) sc->sc_pci_dmat->dt_cookie = sc->sc_is; sc->sc_pci_dmat->dt_mt = &iommu_dma_methods; - n = OF_getprop(node, "bus-range", (void *)prop_array, + i = OF_getprop(node, "bus-range", (void *)prop_array, sizeof(prop_array)); - if (n == -1) + if (i == -1) panic("%s: could not get bus-range", __func__); - if (n != sizeof(prop_array)) - panic("%s: broken bus-range (%d)", __func__, n); + if (i != sizeof(prop_array)) + panic("%s: broken bus-range (%d)", __func__, i); if (bootverbose) device_printf(dev, "bus range %u to %u; PCI bus %d\n", prop_array[0], prop_array[1], prop_array[0]); @@ -657,15 +659,15 @@ psycho_attach(device_t dev) PCIB_WRITE_CONFIG(dev, sc->sc_pci_secbus, PCS_DEVICE, PCS_FUNC, PCIR_LATTIMER, OFW_PCI_LATENCY, 1); - for (n = PCIR_VENDOR; n < PCIR_STATUS; n += sizeof(uint16_t)) - le16enc(&sc->sc_pci_hpbcfg[n], bus_space_read_2( + for (i = PCIR_VENDOR; i < PCIR_STATUS; i += sizeof(uint16_t)) + le16enc(&sc->sc_pci_hpbcfg[i], bus_space_read_2( sc->sc_pci_cfgt, sc->sc_pci_bh[OFW_PCI_CS_CONFIG], PSYCHO_CONF_OFF(sc->sc_pci_secbus, PCS_DEVICE, - PCS_FUNC, n))); - for (n = PCIR_REVID; n <= PCIR_BIST; n += sizeof(uint8_t)) - sc->sc_pci_hpbcfg[n] = bus_space_read_1(sc->sc_pci_cfgt, + PCS_FUNC, i))); + for (i = PCIR_REVID; i <= PCIR_BIST; i += sizeof(uint8_t)) + sc->sc_pci_hpbcfg[i] = bus_space_read_1(sc->sc_pci_cfgt, sc->sc_pci_bh[OFW_PCI_CS_CONFIG], PSYCHO_CONF_OFF( - sc->sc_pci_secbus, PCS_DEVICE, PCS_FUNC, n)); + sc->sc_pci_secbus, PCS_DEVICE, PCS_FUNC, i)); ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(ofw_pci_intr_t)); /* @@ -694,8 +696,8 @@ psycho_set_intr(struct psycho_softc *sc, int rid; rid = index; - sc->sc_irq_res[index] = bus_alloc_resource_any(sc->sc_dev, SYS_RES_IRQ, - &rid, RF_ACTIVE); + sc->sc_irq_res[index] = bus_alloc_resource_any(sc->sc_dev, + SYS_RES_IRQ, &rid, RF_ACTIVE); if (sc->sc_irq_res[index] == NULL && intrmap >= PSR_POWER_INT_MAP) { /* * These interrupts aren't mandatory and not available @@ -704,7 +706,8 @@ psycho_set_intr(struct psycho_softc *sc, return; } if (sc->sc_irq_res[index] == NULL || - INTIGN(vec = rman_get_start(sc->sc_irq_res[index])) != sc->sc_ign || + INTIGN(vec = rman_get_start(sc->sc_irq_res[index])) != + sc->sc_ign || INTVEC(PSYCHO_READ8(sc, intrmap)) != vec || intr_vectors[vec].iv_ic != &psycho_ic || bus_setup_intr(sc->sc_dev, sc->sc_irq_res[index], @@ -714,8 +717,8 @@ psycho_set_intr(struct psycho_softc *sc, } static int -psycho_find_intrmap(struct psycho_softc *sc, u_int ino, bus_addr_t *intrmapptr, - bus_addr_t *intrclrptr, bus_addr_t *intrdiagptr) +psycho_find_intrmap(struct psycho_softc *sc, u_int ino, + bus_addr_t *intrmapptr, bus_addr_t *intrclrptr, bus_addr_t *intrdiagptr) { bus_addr_t intrclr, intrmap; uint64_t diag; @@ -875,7 +878,7 @@ psycho_wakeup(void *arg) { struct psycho_softc *sc = arg; - /* Gee, we don't really have a framework to deal with this properly. */ + /* We don't really have a framework to deal with this properly. */ device_printf(sc->sc_dev, "power management wakeup\n"); return (FILTER_HANDLED); } @@ -992,8 +995,8 @@ psycho_read_config(device_t dev, u_int b } static void -psycho_write_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, - uint32_t val, int width) +psycho_write_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, uint32_t val, int width) { struct psycho_softc *sc; bus_space_handle_t bh; @@ -1029,8 +1032,9 @@ psycho_route_interrupt(device_t bridge, sc = device_get_softc(bridge); pintr = pin; - if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, - sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), maskbuf)) + if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, + ®, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), + maskbuf)) return (mintr); /* * If this is outside of the range for an intpin, it's likely a full @@ -1052,7 +1056,8 @@ psycho_route_interrupt(device_t bridge, intrmap = PSR_PCIA0_INT_MAP + 8 * (pci_get_slot(dev) - 1 + 3 * sc->sc_half); mintr = INTINO(PSYCHO_READ8(sc, intrmap)) + pin - 1; - device_printf(bridge, "guessing interrupt %d for device %d.%d pin %d\n", + device_printf(bridge, + "guessing interrupt %d for device %d.%d pin %d\n", (int)mintr, pci_get_slot(dev), pci_get_function(dev), pin); return (mintr); } @@ -1271,8 +1276,8 @@ psycho_alloc_resource(device_t bus, devi if (start != end) panic("%s: XXX: interrupt range", __func__); start = end = INTMAP_VEC(sc->sc_ign, end); - return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, type, - rid, start, end, count, flags)); + return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, + type, rid, start, end, count, flags)); } switch (type) { case SYS_RES_MEMORY: @@ -1387,7 +1392,8 @@ psycho_alloc_bus_tag(struct psycho_softc { bus_space_tag_t bt; - bt = malloc(sizeof(struct bus_space_tag), M_DEVBUF, M_NOWAIT | M_ZERO); + bt = malloc(sizeof(struct bus_space_tag), M_DEVBUF, + M_NOWAIT | M_ZERO); if (bt == NULL) panic("%s: out of memory", __func__); Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Fri Jan 15 16:41:10 2010 (r202397) +++ stable/8/sys/sparc64/pci/schizo.c Fri Jan 15 16:42:39 2010 (r202398) @@ -180,9 +180,9 @@ struct schizo_dma_sync { void *sds_cookie; uint64_t sds_syncval; device_t sds_ppb; /* farest PCI-PCI bridge */ - uint8_t sds_bus; /* bus of farest PCI device */ - uint8_t sds_slot; /* slot of farest PCI device */ - uint8_t sds_func; /* func. of farest PCI device */ + uint8_t sds_bus; /* bus of farest PCI dev. */ + uint8_t sds_slot; /* slot of farest PCI dev. */ + uint8_t sds_func; /* func. of farest PCI dev. */ }; #define SCHIZO_PERF_CNT_QLTY 100 @@ -260,7 +260,7 @@ schizo_attach(device_t dev) uint64_t ino_bitmap, reg; phandle_t node; uint32_t prop, prop_array[2]; - int i, mode, n, nrange, rid, tsbsize; + int i, j, mode, rid, tsbsize; sc = device_get_softc(dev); node = ofw_bus_get_node(dev); @@ -289,18 +289,18 @@ schizo_attach(device_t dev) */ sc->sc_half = (bus_get_resource_start(dev, SYS_RES_MEMORY, STX_PCI) >> 20) & 1; - for (n = 0; n < (mode == SCHIZO_MODE_SCZ ? SCZ_NREG : TOM_NREG); - n++) { - rid = n; - sc->sc_mem_res[n] = bus_alloc_resource_any(dev, + for (i = 0; i < (mode == SCHIZO_MODE_SCZ ? SCZ_NREG : TOM_NREG); + i++) { + rid = i; + sc->sc_mem_res[i] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, (((mode == SCHIZO_MODE_SCZ && ((sc->sc_half == 1 && - n == STX_PCI) || n == STX_CTRL)) || + i == STX_PCI) || i == STX_CTRL)) || (mode == SCHIZO_MODE_TOM && sc->sc_half == 0 && - n == STX_CTRL)) ? RF_SHAREABLE : 0) | RF_ACTIVE); - if (sc->sc_mem_res[n] == NULL) + i == STX_CTRL)) ? RF_SHAREABLE : 0) | RF_ACTIVE); + if (sc->sc_mem_res[i] == NULL) panic("%s: could not allocate register bank %d", - __func__, n); + __func__, i); } /* @@ -333,7 +333,8 @@ schizo_attach(device_t dev) if (OF_getprop(node, "portid", &sc->sc_ign, sizeof(sc->sc_ign)) == -1) panic("%s: could not determine IGN", __func__); - if (OF_getprop(node, "version#", &sc->sc_ver, sizeof(sc->sc_ver)) == -1) + if (OF_getprop(node, "version#", &sc->sc_ver, sizeof(sc->sc_ver)) == + -1) panic("%s: could not determine version", __func__); if (OF_getprop(node, "clock-frequency", &prop, sizeof(prop)) == -1) prop = 33000000; @@ -397,21 +398,21 @@ schizo_attach(device_t dev) * This is complicated by the fact that a pair of Schizo PBMs * shares one IGN. */ - n = OF_getprop(node, "ino-bitmap", (void *)prop_array, + i = OF_getprop(node, "ino-bitmap", (void *)prop_array, sizeof(prop_array)); - if (n == -1) + if (i == -1) panic("%s: could not get ino-bitmap", __func__); ino_bitmap = ((uint64_t)prop_array[1] << 32) | prop_array[0]; - for (n = 0; n <= STX_MAX_INO; n++) { - if ((ino_bitmap & (1ULL << n)) == 0) + for (i = 0; i <= STX_MAX_INO; i++) { + if ((ino_bitmap & (1ULL << i)) == 0) continue; - if (n == STX_FB0_INO || n == STX_FB1_INO) + if (i == STX_FB0_INO || i == STX_FB1_INO) /* Leave for upa(4). */ continue; - i = schizo_intr_register(sc, n); - if (i != 0) + j = schizo_intr_register(sc, i); + if (j != 0) device_printf(dev, "could not register interrupt " - "controller for INO %d (%d)\n", n, i); + "controller for INO %d (%d)\n", i, j); } /* @@ -464,9 +465,9 @@ schizo_attach(device_t dev) tsbsize = (x); \ break; \ - n = OF_getprop(node, "virtual-dma", (void *)prop_array, + i = OF_getprop(node, "virtual-dma", (void *)prop_array, sizeof(prop_array)); - if (n == -1 || n != sizeof(prop_array)) + if (i == -1 || i != sizeof(prop_array)) schizo_iommu_init(sc, 7, -1); else { switch (prop_array[1]) { @@ -500,13 +501,12 @@ schizo_attach(device_t dev) rman_manage_region(&sc->sc_pci_mem_rman, 0, STX_MEM_SIZE) != 0) panic("%s: failed to set up memory rman", __func__); - nrange = OF_getprop_alloc(node, "ranges", sizeof(*range), - (void **)&range); + i = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range); /* * Make sure that the expected ranges are present. The * OFW_PCI_CS_MEM64 one is not currently used though. */ - if (nrange != STX_NRANGE) + if (i != STX_NRANGE) panic("%s: unsupported number of ranges", __func__); /* * Find the addresses of the various bus spaces. @@ -514,11 +514,12 @@ schizo_attach(device_t dev) * The physical start addresses of the ranges are the configuration, * memory and I/O handles. */ - for (n = 0; n < STX_NRANGE; n++) { - i = OFW_PCI_RANGE_CS(&range[n]); - if (sc->sc_pci_bh[i] != 0) - panic("%s: duplicate range for space %d", __func__, i); - sc->sc_pci_bh[i] = OFW_PCI_RANGE_PHYS(&range[n]); + for (i = 0; i < STX_NRANGE; i++) { + j = OFW_PCI_RANGE_CS(&range[i]); + if (sc->sc_pci_bh[j] != 0) + panic("%s: duplicate range for space %d", + __func__, j); + sc->sc_pci_bh[j] = OFW_PCI_RANGE_PHYS(&range[i]); } free(range, M_OFWPROP); @@ -541,12 +542,12 @@ schizo_attach(device_t dev) * Get the bus range from the firmware. * NB: Tomatillos don't support PCI bus reenumeration. */ - n = OF_getprop(node, "bus-range", (void *)prop_array, + i = OF_getprop(node, "bus-range", (void *)prop_array, sizeof(prop_array)); - if (n == -1) + if (i == -1) panic("%s: could not get bus-range", __func__); - if (n != sizeof(prop_array)) - panic("%s: broken bus-range (%d)", __func__, n); + if (i != sizeof(prop_array)) + panic("%s: broken bus-range (%d)", __func__, i); if (bootverbose) device_printf(dev, "bus range %u to %u; PCI bus %d\n", prop_array[0], prop_array[1], prop_array[0]); @@ -634,7 +635,8 @@ schizo_attach(device_t dev) * a block store after a write to TOMXMS_PCI_DMA_SYNC_PEND though. */ if ((sc->sc_mode == SCHIZO_MODE_SCZ && sc->sc_ver >= 5) || - sc->sc_mode == SCHIZO_MODE_TOM || sc->sc_mode == SCHIZO_MODE_XMS) { + sc->sc_mode == SCHIZO_MODE_TOM || + sc->sc_mode == SCHIZO_MODE_XMS) { sc->sc_flags |= SCHIZO_FLAGS_CDMA; if (sc->sc_mode == SCHIZO_MODE_SCZ) { sc->sc_cdma_state = SCHIZO_CDMA_STATE_DONE; @@ -643,26 +645,26 @@ schizo_attach(device_t dev) * at RID 4 but most don't. With the latter we add * it ourselves at the spare RID 5. */ - n = INTINO(bus_get_resource_start(dev, SYS_RES_IRQ, + i = INTINO(bus_get_resource_start(dev, SYS_RES_IRQ, 4)); - if (n == STX_CDMA_A_INO || n == STX_CDMA_B_INO) { - (void)schizo_get_intrmap(sc, n, NULL, + if (i == STX_CDMA_A_INO || i == STX_CDMA_B_INO) { + (void)schizo_get_intrmap(sc, i, NULL, &sc->sc_cdma_clr); - schizo_set_intr(sc, 4, n, schizo_cdma); + schizo_set_intr(sc, 4, i, schizo_cdma); } else { - n = STX_CDMA_A_INO + sc->sc_half; + i = STX_CDMA_A_INO + sc->sc_half; if (bus_set_resource(dev, SYS_RES_IRQ, 5, - INTMAP_VEC(sc->sc_ign, n), 1) != 0) + INTMAP_VEC(sc->sc_ign, i), 1) != 0) panic("%s: failed to add CDMA " "interrupt", __func__); - i = schizo_intr_register(sc, n); - if (i != 0) + j = schizo_intr_register(sc, i); + if (j != 0) panic("%s: could not register " "interrupt controller for CDMA " - "(%d)", __func__, i); - (void)schizo_get_intrmap(sc, n, NULL, + "(%d)", __func__, j); + (void)schizo_get_intrmap(sc, i, NULL, &sc->sc_cdma_clr); - schizo_set_intr(sc, 5, n, schizo_cdma); + schizo_set_intr(sc, 5, i, schizo_cdma); } } if (sc->sc_mode == SCHIZO_MODE_TOM && sc->sc_ver <= 4) @@ -690,11 +692,11 @@ schizo_set_intr(struct schizo_softc *sc, int rid; rid = index; - sc->sc_irq_res[index] = bus_alloc_resource_any(sc->sc_dev, SYS_RES_IRQ, - &rid, RF_ACTIVE); + sc->sc_irq_res[index] = bus_alloc_resource_any(sc->sc_dev, + SYS_RES_IRQ, &rid, RF_ACTIVE); if (sc->sc_irq_res[index] == NULL || - INTIGN(vec = rman_get_start(sc->sc_irq_res[index])) != sc->sc_ign || - INTINO(vec) != ino || + INTINO(vec = rman_get_start(sc->sc_irq_res[index])) != ino || + INTIGN(vec) != sc->sc_ign || intr_vectors[vec].iv_ic != &schizo_ic || bus_setup_intr(sc->sc_dev, sc->sc_irq_res[index], INTR_TYPE_MISC | INTR_FAST, handler, NULL, sc, @@ -730,8 +732,8 @@ schizo_intr_register(struct schizo_softc } static int -schizo_get_intrmap(struct schizo_softc *sc, u_int ino, bus_addr_t *intrmapptr, - bus_addr_t *intrclrptr) +schizo_get_intrmap(struct schizo_softc *sc, u_int ino, + bus_addr_t *intrmapptr, bus_addr_t *intrclrptr) { bus_addr_t intrclr, intrmap; uint64_t mr; @@ -965,8 +967,8 @@ schizo_read_config(device_t dev, u_int b } static void -schizo_write_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, - uint32_t val, int width) +schizo_write_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, uint32_t val, int width) { struct schizo_softc *sc; bus_space_handle_t bh; @@ -1001,8 +1003,9 @@ schizo_route_interrupt(device_t bridge, sc = device_get_softc(bridge); pintr = pin; - if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, - sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), maskbuf)) + if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, + ®, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), + maskbuf)) return (mintr); device_printf(bridge, "could not route pin %d for device %d.%d\n", @@ -1037,8 +1040,8 @@ schizo_dma_sync_stub(void *arg) (void)PCIB_READ_CONFIG(sds->sds_ppb, sds->sds_bus, sds->sds_slot, sds->sds_func, PCIR_VENDOR, 2); - for (; atomic_cmpset_acq_32(&sc->sc_cdma_state, SCHIZO_CDMA_STATE_DONE, - SCHIZO_CDMA_STATE_PENDING) == 0;) + for (; atomic_cmpset_acq_32(&sc->sc_cdma_state, + SCHIZO_CDMA_STATE_DONE, SCHIZO_CDMA_STATE_PENDING) == 0;) ; SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, 1); microuptime(&cur); @@ -1295,8 +1298,8 @@ schizo_alloc_resource(device_t bus, devi if (start != end) panic("%s: XXX: interrupt range", __func__); start = end = INTMAP_VEC(sc->sc_ign, end); - return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, type, - rid, start, end, count, flags)); + return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, + type, rid, start, end, count, flags)); } switch (type) { case SYS_RES_MEMORY: @@ -1411,7 +1414,7 @@ schizo_alloc_bus_tag(struct schizo_softc { bus_space_tag_t bt; - bt = (bus_space_tag_t)malloc(sizeof(struct bus_space_tag), M_DEVBUF, + bt = malloc(sizeof(struct bus_space_tag), M_DEVBUF, M_NOWAIT | M_ZERO); if (bt == NULL) panic("%s: out of memory", __func__); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:43:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C92F7106566B; Fri, 15 Jan 2010 16:43:19 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E1A38FC0C; Fri, 15 Jan 2010 16:43:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGhJBS030462; Fri, 15 Jan 2010 16:43:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGhJMS030459; Fri, 15 Jan 2010 16:43:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151643.o0FGhJMS030459@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:43:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202399 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:43:19 -0000 Author: marius Date: Fri Jan 15 16:43:19 2010 New Revision: 202399 URL: http://svn.freebsd.org/changeset/base/202399 Log: MFC: r201199 - Prefer i and j over i and n for temporary integer variables. - Wrap/shorten too long lines. - Remove a redundant variable and an unnecessary cast in schizo(4). Modified: stable/7/sys/sparc64/pci/psycho.c stable/7/sys/sparc64/pci/schizo.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/psycho.c ============================================================================== --- stable/7/sys/sparc64/pci/psycho.c Fri Jan 15 16:42:39 2010 (r202398) +++ stable/7/sys/sparc64/pci/psycho.c Fri Jan 15 16:43:19 2010 (r202399) @@ -182,9 +182,9 @@ struct psycho_dma_sync { void *pds_arg; /* argument for the handler */ void *pds_cookie; /* parent bus int. cookie */ device_t pds_ppb; /* farest PCI-PCI bridge */ - uint8_t pds_bus; /* bus of farest PCI device */ - uint8_t pds_slot; /* slot of farest PCI device */ - uint8_t pds_func; /* func. of farest PCI device */ + uint8_t pds_bus; /* bus of farest PCI dev. */ + uint8_t pds_slot; /* slot of farest PCI dev. */ + uint8_t pds_func; /* func. of farest PCI dev. */ }; #define PSYCHO_READ8(sc, off) \ @@ -206,8 +206,8 @@ struct psycho_dma_sync { * "Hummingbird" is the UltraSPARC IIe onboard UPA to PCI bridge. It's * basically the same as Sabre but without an APB underneath it. * - * "Psycho" and "Psycho+" are dual UPA to PCI bridges. They sit on the UPA bus - * and manage two PCI buses. "Psycho" has two 64-bit 33MHz buses, while + * "Psycho" and "Psycho+" are dual UPA to PCI bridges. They sit on the UPA + * bus and manage two PCI buses. "Psycho" has two 64-bit 33MHz buses, while * "Psycho+" controls both a 64-bit 33Mhz and a 64-bit 66Mhz PCI bus. You * will usually find a "Psycho+" since I don't think the original "Psycho" * ever shipped, and if it did it would be in the U30. @@ -264,7 +264,8 @@ psycho_get_desc(device_t dev) rv = psycho_find_desc(psycho_models, ofw_bus_get_model(dev)); if (rv == NULL) - rv = psycho_find_desc(psycho_compats, ofw_bus_get_compat(dev)); + rv = psycho_find_desc(psycho_compats, + ofw_bus_get_compat(dev)); return (rv); } @@ -296,7 +297,7 @@ psycho_attach(device_t dev) uint32_t dvmabase, prop, prop_array[2]; int32_t rev; u_int rerun, ver; - int i, n; + int i, j; node = ofw_bus_get_node(dev); sc = device_get_softc(dev); @@ -462,12 +463,12 @@ psycho_attach(device_t dev) rman_manage_region(&sc->sc_pci_mem_rman, 0, PSYCHO_MEM_SIZE) != 0) panic("%s: failed to set up memory rman", __func__); - n = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range); + i = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range); /* * Make sure that the expected ranges are present. The * OFW_PCI_CS_MEM64 one is not currently used though. */ - if (n != PSYCHO_NRANGE) + if (i != PSYCHO_NRANGE) panic("%s: unsupported number of ranges", __func__); /* * Find the addresses of the various bus spaces. @@ -475,11 +476,12 @@ psycho_attach(device_t dev) * The physical start addresses of the ranges are the configuration, * memory and I/O handles. */ - for (n = 0; n < PSYCHO_NRANGE; n++) { - i = OFW_PCI_RANGE_CS(&range[n]); - if (sc->sc_pci_bh[i] != 0) - panic("%s: duplicate range for space %d", __func__, i); - sc->sc_pci_bh[i] = OFW_PCI_RANGE_PHYS(&range[n]); + for (i = 0; i < PSYCHO_NRANGE; i++) { + j = OFW_PCI_RANGE_CS(&range[i]); + if (sc->sc_pci_bh[j] != 0) + panic("%s: duplicate range for space %d", + __func__, j); + sc->sc_pci_bh[j] = OFW_PCI_RANGE_PHYS(&range[i]); } free(range, M_OFWPROP); @@ -497,8 +499,8 @@ psycho_attach(device_t dev) * vectors. We do this early in order to be able to catch * stray interrupts. */ - for (n = 0; n <= PSYCHO_MAX_INO; n++) { - if (psycho_find_intrmap(sc, n, &intrmap, &intrclr, + for (i = 0; i <= PSYCHO_MAX_INO; i++) { + if (psycho_find_intrmap(sc, i, &intrmap, &intrclr, NULL) == 0) continue; pica = malloc(sizeof(*pica), M_DEVBUF, M_NOWAIT); @@ -516,21 +518,21 @@ psycho_attach(device_t dev) */ device_printf(dev, "intr map (INO %d, %s) %#lx: %#lx, clr: %#lx\n", - n, intrmap <= PSR_PCIB3_INT_MAP ? "PCI" : "OBIO", - (u_long)intrmap, (u_long)PSYCHO_READ8(sc, intrmap), - (u_long)intrclr); - PSYCHO_WRITE8(sc, intrmap, INTMAP_VEC(sc->sc_ign, n)); + i, intrmap <= PSR_PCIB3_INT_MAP ? "PCI" : "OBIO", + (u_long)intrmap, (u_long)PSYCHO_READ8(sc, + intrmap), (u_long)intrclr); + PSYCHO_WRITE8(sc, intrmap, INTMAP_VEC(sc->sc_ign, i)); PSYCHO_WRITE8(sc, intrclr, 0); PSYCHO_WRITE8(sc, intrmap, - INTMAP_ENABLE(INTMAP_VEC(sc->sc_ign, n), + INTMAP_ENABLE(INTMAP_VEC(sc->sc_ign, i), PCPU_GET(mid))); #endif - i = intr_controller_register(INTMAP_VEC(sc->sc_ign, n), - &psycho_ic, pica); - if (i != 0) + j = intr_controller_register(INTMAP_VEC(sc->sc_ign, + i), &psycho_ic, pica); + if (j != 0) device_printf(dev, "could not register " "interrupt controller for INO %d (%d)\n", - n, i); + i, j); } if (sc->sc_mode == PSYCHO_MODE_PSYCHO) @@ -584,12 +586,12 @@ psycho_attach(device_t dev) sc->sc_pci_dmat->dt_cookie = sc->sc_is; sc->sc_pci_dmat->dt_mt = &iommu_dma_methods; - n = OF_getprop(node, "bus-range", (void *)prop_array, + i = OF_getprop(node, "bus-range", (void *)prop_array, sizeof(prop_array)); - if (n == -1) + if (i == -1) panic("%s: could not get bus-range", __func__); - if (n != sizeof(prop_array)) - panic("%s: broken bus-range (%d)", __func__, n); + if (i != sizeof(prop_array)) + panic("%s: broken bus-range (%d)", __func__, i); if (bootverbose) device_printf(dev, "bus range %u to %u; PCI bus %d\n", prop_array[0], prop_array[1], prop_array[0]); @@ -658,15 +660,15 @@ psycho_attach(device_t dev) PCIB_WRITE_CONFIG(dev, sc->sc_pci_secbus, PCS_DEVICE, PCS_FUNC, PCIR_LATTIMER, OFW_PCI_LATENCY, 1); - for (n = PCIR_VENDOR; n < PCIR_STATUS; n += sizeof(uint16_t)) - le16enc(&sc->sc_pci_hpbcfg[n], bus_space_read_2( + for (i = PCIR_VENDOR; i < PCIR_STATUS; i += sizeof(uint16_t)) + le16enc(&sc->sc_pci_hpbcfg[i], bus_space_read_2( sc->sc_pci_cfgt, sc->sc_pci_bh[OFW_PCI_CS_CONFIG], PSYCHO_CONF_OFF(sc->sc_pci_secbus, PCS_DEVICE, - PCS_FUNC, n))); - for (n = PCIR_REVID; n <= PCIR_BIST; n += sizeof(uint8_t)) - sc->sc_pci_hpbcfg[n] = bus_space_read_1(sc->sc_pci_cfgt, + PCS_FUNC, i))); + for (i = PCIR_REVID; i <= PCIR_BIST; i += sizeof(uint8_t)) + sc->sc_pci_hpbcfg[i] = bus_space_read_1(sc->sc_pci_cfgt, sc->sc_pci_bh[OFW_PCI_CS_CONFIG], PSYCHO_CONF_OFF( - sc->sc_pci_secbus, PCS_DEVICE, PCS_FUNC, n)); + sc->sc_pci_secbus, PCS_DEVICE, PCS_FUNC, i)); ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(ofw_pci_intr_t)); /* @@ -695,8 +697,8 @@ psycho_set_intr(struct psycho_softc *sc, int rid; rid = index; - sc->sc_irq_res[index] = bus_alloc_resource_any(sc->sc_dev, SYS_RES_IRQ, - &rid, RF_ACTIVE); + sc->sc_irq_res[index] = bus_alloc_resource_any(sc->sc_dev, + SYS_RES_IRQ, &rid, RF_ACTIVE); if (sc->sc_irq_res[index] == NULL && intrmap >= PSR_POWER_INT_MAP) { /* * These interrupts aren't mandatory and not available @@ -705,7 +707,8 @@ psycho_set_intr(struct psycho_softc *sc, return; } if (sc->sc_irq_res[index] == NULL || - INTIGN(vec = rman_get_start(sc->sc_irq_res[index])) != sc->sc_ign || + INTIGN(vec = rman_get_start(sc->sc_irq_res[index])) != + sc->sc_ign || INTVEC(PSYCHO_READ8(sc, intrmap)) != vec || intr_vectors[vec].iv_ic != &psycho_ic || bus_setup_intr(sc->sc_dev, sc->sc_irq_res[index], @@ -715,8 +718,8 @@ psycho_set_intr(struct psycho_softc *sc, } static int -psycho_find_intrmap(struct psycho_softc *sc, u_int ino, bus_addr_t *intrmapptr, - bus_addr_t *intrclrptr, bus_addr_t *intrdiagptr) +psycho_find_intrmap(struct psycho_softc *sc, u_int ino, + bus_addr_t *intrmapptr, bus_addr_t *intrclrptr, bus_addr_t *intrdiagptr) { bus_addr_t intrclr, intrmap; uint64_t diag; @@ -876,7 +879,7 @@ psycho_wakeup(void *arg) { struct psycho_softc *sc = arg; - /* Gee, we don't really have a framework to deal with this properly. */ + /* We don't really have a framework to deal with this properly. */ device_printf(sc->sc_dev, "power management wakeup\n"); return (FILTER_HANDLED); } @@ -993,8 +996,8 @@ psycho_read_config(device_t dev, u_int b } static void -psycho_write_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, - uint32_t val, int width) +psycho_write_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, uint32_t val, int width) { struct psycho_softc *sc; bus_space_handle_t bh; @@ -1030,8 +1033,9 @@ psycho_route_interrupt(device_t bridge, sc = device_get_softc(bridge); pintr = pin; - if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, - sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), maskbuf)) + if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, + ®, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), + maskbuf)) return (mintr); /* * If this is outside of the range for an intpin, it's likely a full @@ -1053,7 +1057,8 @@ psycho_route_interrupt(device_t bridge, intrmap = PSR_PCIA0_INT_MAP + 8 * (pci_get_slot(dev) - 1 + 3 * sc->sc_half); mintr = INTINO(PSYCHO_READ8(sc, intrmap)) + pin - 1; - device_printf(bridge, "guessing interrupt %d for device %d.%d pin %d\n", + device_printf(bridge, + "guessing interrupt %d for device %d.%d pin %d\n", (int)mintr, pci_get_slot(dev), pci_get_function(dev), pin); return (mintr); } @@ -1272,8 +1277,8 @@ psycho_alloc_resource(device_t bus, devi if (start != end) panic("%s: XXX: interrupt range", __func__); start = end = INTMAP_VEC(sc->sc_ign, end); - return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, type, - rid, start, end, count, flags)); + return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, + type, rid, start, end, count, flags)); } switch (type) { case SYS_RES_MEMORY: @@ -1388,7 +1393,8 @@ psycho_alloc_bus_tag(struct psycho_softc { bus_space_tag_t bt; - bt = malloc(sizeof(struct bus_space_tag), M_DEVBUF, M_NOWAIT | M_ZERO); + bt = malloc(sizeof(struct bus_space_tag), M_DEVBUF, + M_NOWAIT | M_ZERO); if (bt == NULL) panic("%s: out of memory", __func__); Modified: stable/7/sys/sparc64/pci/schizo.c ============================================================================== --- stable/7/sys/sparc64/pci/schizo.c Fri Jan 15 16:42:39 2010 (r202398) +++ stable/7/sys/sparc64/pci/schizo.c Fri Jan 15 16:43:19 2010 (r202399) @@ -181,9 +181,9 @@ struct schizo_dma_sync { void *sds_cookie; uint64_t sds_syncval; device_t sds_ppb; /* farest PCI-PCI bridge */ - uint8_t sds_bus; /* bus of farest PCI device */ - uint8_t sds_slot; /* slot of farest PCI device */ - uint8_t sds_func; /* func. of farest PCI device */ + uint8_t sds_bus; /* bus of farest PCI dev. */ + uint8_t sds_slot; /* slot of farest PCI dev. */ + uint8_t sds_func; /* func. of farest PCI dev. */ }; #define SCHIZO_PERF_CNT_QLTY 100 @@ -261,7 +261,7 @@ schizo_attach(device_t dev) uint64_t ino_bitmap, reg; phandle_t node; uint32_t prop, prop_array[2]; - int i, mode, n, nrange, rid, tsbsize; + int i, j, mode, rid, tsbsize; sc = device_get_softc(dev); node = ofw_bus_get_node(dev); @@ -290,18 +290,18 @@ schizo_attach(device_t dev) */ sc->sc_half = (bus_get_resource_start(dev, SYS_RES_MEMORY, STX_PCI) >> 20) & 1; - for (n = 0; n < (mode == SCHIZO_MODE_SCZ ? SCZ_NREG : TOM_NREG); - n++) { - rid = n; - sc->sc_mem_res[n] = bus_alloc_resource_any(dev, + for (i = 0; i < (mode == SCHIZO_MODE_SCZ ? SCZ_NREG : TOM_NREG); + i++) { + rid = i; + sc->sc_mem_res[i] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, (((mode == SCHIZO_MODE_SCZ && ((sc->sc_half == 1 && - n == STX_PCI) || n == STX_CTRL)) || + i == STX_PCI) || i == STX_CTRL)) || (mode == SCHIZO_MODE_TOM && sc->sc_half == 0 && - n == STX_CTRL)) ? RF_SHAREABLE : 0) | RF_ACTIVE); - if (sc->sc_mem_res[n] == NULL) + i == STX_CTRL)) ? RF_SHAREABLE : 0) | RF_ACTIVE); + if (sc->sc_mem_res[i] == NULL) panic("%s: could not allocate register bank %d", - __func__, n); + __func__, i); } /* @@ -334,7 +334,8 @@ schizo_attach(device_t dev) if (OF_getprop(node, "portid", &sc->sc_ign, sizeof(sc->sc_ign)) == -1) panic("%s: could not determine IGN", __func__); - if (OF_getprop(node, "version#", &sc->sc_ver, sizeof(sc->sc_ver)) == -1) + if (OF_getprop(node, "version#", &sc->sc_ver, sizeof(sc->sc_ver)) == + -1) panic("%s: could not determine version", __func__); if (OF_getprop(node, "clock-frequency", &prop, sizeof(prop)) == -1) prop = 33000000; @@ -398,21 +399,21 @@ schizo_attach(device_t dev) * This is complicated by the fact that a pair of Schizo PBMs * shares one IGN. */ - n = OF_getprop(node, "ino-bitmap", (void *)prop_array, + i = OF_getprop(node, "ino-bitmap", (void *)prop_array, sizeof(prop_array)); - if (n == -1) + if (i == -1) panic("%s: could not get ino-bitmap", __func__); ino_bitmap = ((uint64_t)prop_array[1] << 32) | prop_array[0]; - for (n = 0; n <= STX_MAX_INO; n++) { - if ((ino_bitmap & (1ULL << n)) == 0) + for (i = 0; i <= STX_MAX_INO; i++) { + if ((ino_bitmap & (1ULL << i)) == 0) continue; - if (n == STX_FB0_INO || n == STX_FB1_INO) + if (i == STX_FB0_INO || i == STX_FB1_INO) /* Leave for upa(4). */ continue; - i = schizo_intr_register(sc, n); - if (i != 0) + j = schizo_intr_register(sc, i); + if (j != 0) device_printf(dev, "could not register interrupt " - "controller for INO %d (%d)\n", n, i); + "controller for INO %d (%d)\n", i, j); } /* @@ -465,9 +466,9 @@ schizo_attach(device_t dev) tsbsize = (x); \ break; \ - n = OF_getprop(node, "virtual-dma", (void *)prop_array, + i = OF_getprop(node, "virtual-dma", (void *)prop_array, sizeof(prop_array)); - if (n == -1 || n != sizeof(prop_array)) + if (i == -1 || i != sizeof(prop_array)) schizo_iommu_init(sc, 7, -1); else { switch (prop_array[1]) { @@ -501,13 +502,12 @@ schizo_attach(device_t dev) rman_manage_region(&sc->sc_pci_mem_rman, 0, STX_MEM_SIZE) != 0) panic("%s: failed to set up memory rman", __func__); - nrange = OF_getprop_alloc(node, "ranges", sizeof(*range), - (void **)&range); + i = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range); /* * Make sure that the expected ranges are present. The * OFW_PCI_CS_MEM64 one is not currently used though. */ - if (nrange != STX_NRANGE) + if (i != STX_NRANGE) panic("%s: unsupported number of ranges", __func__); /* * Find the addresses of the various bus spaces. @@ -515,11 +515,12 @@ schizo_attach(device_t dev) * The physical start addresses of the ranges are the configuration, * memory and I/O handles. */ - for (n = 0; n < STX_NRANGE; n++) { - i = OFW_PCI_RANGE_CS(&range[n]); - if (sc->sc_pci_bh[i] != 0) - panic("%s: duplicate range for space %d", __func__, i); - sc->sc_pci_bh[i] = OFW_PCI_RANGE_PHYS(&range[n]); + for (i = 0; i < STX_NRANGE; i++) { + j = OFW_PCI_RANGE_CS(&range[i]); + if (sc->sc_pci_bh[j] != 0) + panic("%s: duplicate range for space %d", + __func__, j); + sc->sc_pci_bh[j] = OFW_PCI_RANGE_PHYS(&range[i]); } free(range, M_OFWPROP); @@ -542,12 +543,12 @@ schizo_attach(device_t dev) * Get the bus range from the firmware. * NB: Tomatillos don't support PCI bus reenumeration. */ - n = OF_getprop(node, "bus-range", (void *)prop_array, + i = OF_getprop(node, "bus-range", (void *)prop_array, sizeof(prop_array)); - if (n == -1) + if (i == -1) panic("%s: could not get bus-range", __func__); - if (n != sizeof(prop_array)) - panic("%s: broken bus-range (%d)", __func__, n); + if (i != sizeof(prop_array)) + panic("%s: broken bus-range (%d)", __func__, i); if (bootverbose) device_printf(dev, "bus range %u to %u; PCI bus %d\n", prop_array[0], prop_array[1], prop_array[0]); @@ -635,7 +636,8 @@ schizo_attach(device_t dev) * a block store after a write to TOMXMS_PCI_DMA_SYNC_PEND though. */ if ((sc->sc_mode == SCHIZO_MODE_SCZ && sc->sc_ver >= 5) || - sc->sc_mode == SCHIZO_MODE_TOM || sc->sc_mode == SCHIZO_MODE_XMS) { + sc->sc_mode == SCHIZO_MODE_TOM || + sc->sc_mode == SCHIZO_MODE_XMS) { sc->sc_flags |= SCHIZO_FLAGS_CDMA; if (sc->sc_mode == SCHIZO_MODE_SCZ) { sc->sc_cdma_state = SCHIZO_CDMA_STATE_DONE; @@ -644,26 +646,26 @@ schizo_attach(device_t dev) * at RID 4 but most don't. With the latter we add * it ourselves at the spare RID 5. */ - n = INTINO(bus_get_resource_start(dev, SYS_RES_IRQ, + i = INTINO(bus_get_resource_start(dev, SYS_RES_IRQ, 4)); - if (n == STX_CDMA_A_INO || n == STX_CDMA_B_INO) { - (void)schizo_get_intrmap(sc, n, NULL, + if (i == STX_CDMA_A_INO || i == STX_CDMA_B_INO) { + (void)schizo_get_intrmap(sc, i, NULL, &sc->sc_cdma_clr); - schizo_set_intr(sc, 4, n, schizo_cdma); + schizo_set_intr(sc, 4, i, schizo_cdma); } else { - n = STX_CDMA_A_INO + sc->sc_half; + i = STX_CDMA_A_INO + sc->sc_half; if (bus_set_resource(dev, SYS_RES_IRQ, 5, - INTMAP_VEC(sc->sc_ign, n), 1) != 0) + INTMAP_VEC(sc->sc_ign, i), 1) != 0) panic("%s: failed to add CDMA " "interrupt", __func__); - i = schizo_intr_register(sc, n); - if (i != 0) + j = schizo_intr_register(sc, i); + if (j != 0) panic("%s: could not register " "interrupt controller for CDMA " - "(%d)", __func__, i); - (void)schizo_get_intrmap(sc, n, NULL, + "(%d)", __func__, j); + (void)schizo_get_intrmap(sc, i, NULL, &sc->sc_cdma_clr); - schizo_set_intr(sc, 5, n, schizo_cdma); + schizo_set_intr(sc, 5, i, schizo_cdma); } } if (sc->sc_mode == SCHIZO_MODE_TOM && sc->sc_ver <= 4) @@ -691,11 +693,11 @@ schizo_set_intr(struct schizo_softc *sc, int rid; rid = index; - sc->sc_irq_res[index] = bus_alloc_resource_any(sc->sc_dev, SYS_RES_IRQ, - &rid, RF_ACTIVE); + sc->sc_irq_res[index] = bus_alloc_resource_any(sc->sc_dev, + SYS_RES_IRQ, &rid, RF_ACTIVE); if (sc->sc_irq_res[index] == NULL || - INTIGN(vec = rman_get_start(sc->sc_irq_res[index])) != sc->sc_ign || - INTINO(vec) != ino || + INTINO(vec = rman_get_start(sc->sc_irq_res[index])) != ino || + INTIGN(vec) != sc->sc_ign || intr_vectors[vec].iv_ic != &schizo_ic || bus_setup_intr(sc->sc_dev, sc->sc_irq_res[index], INTR_TYPE_MISC | INTR_FAST, handler, NULL, sc, @@ -731,8 +733,8 @@ schizo_intr_register(struct schizo_softc } static int -schizo_get_intrmap(struct schizo_softc *sc, u_int ino, bus_addr_t *intrmapptr, - bus_addr_t *intrclrptr) +schizo_get_intrmap(struct schizo_softc *sc, u_int ino, + bus_addr_t *intrmapptr, bus_addr_t *intrclrptr) { bus_addr_t intrclr, intrmap; uint64_t mr; @@ -966,8 +968,8 @@ schizo_read_config(device_t dev, u_int b } static void -schizo_write_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, - uint32_t val, int width) +schizo_write_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, uint32_t val, int width) { struct schizo_softc *sc; bus_space_handle_t bh; @@ -1002,8 +1004,9 @@ schizo_route_interrupt(device_t bridge, sc = device_get_softc(bridge); pintr = pin; - if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, - sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), maskbuf)) + if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, + ®, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), + maskbuf)) return (mintr); device_printf(bridge, "could not route pin %d for device %d.%d\n", @@ -1038,8 +1041,8 @@ schizo_dma_sync_stub(void *arg) (void)PCIB_READ_CONFIG(sds->sds_ppb, sds->sds_bus, sds->sds_slot, sds->sds_func, PCIR_VENDOR, 2); - for (; atomic_cmpset_acq_32(&sc->sc_cdma_state, SCHIZO_CDMA_STATE_DONE, - SCHIZO_CDMA_STATE_PENDING) == 0;) + for (; atomic_cmpset_acq_32(&sc->sc_cdma_state, + SCHIZO_CDMA_STATE_DONE, SCHIZO_CDMA_STATE_PENDING) == 0;) ; SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, 1); microuptime(&cur); @@ -1296,8 +1299,8 @@ schizo_alloc_resource(device_t bus, devi if (start != end) panic("%s: XXX: interrupt range", __func__); start = end = INTMAP_VEC(sc->sc_ign, end); - return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, type, - rid, start, end, count, flags)); + return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, + type, rid, start, end, count, flags)); } switch (type) { case SYS_RES_MEMORY: @@ -1412,7 +1415,7 @@ schizo_alloc_bus_tag(struct schizo_softc { bus_space_tag_t bt; - bt = (bus_space_tag_t)malloc(sizeof(struct bus_space_tag), M_DEVBUF, + bt = malloc(sizeof(struct bus_space_tag), M_DEVBUF, M_NOWAIT | M_ZERO); if (bt == NULL) panic("%s: out of memory", __func__); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:46:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D817F106566B; Fri, 15 Jan 2010 16:46:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5D6D8FC13; Fri, 15 Jan 2010 16:46:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGk3id031155; Fri, 15 Jan 2010 16:46:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGk3L4031150; Fri, 15 Jan 2010 16:46:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151646.o0FGk3L4031150@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202400 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:46:03 -0000 Author: marius Date: Fri Jan 15 16:46:03 2010 New Revision: 202400 URL: http://svn.freebsd.org/changeset/base/202400 Log: MFC: r201395 - Preserve the PROM IOMMU in order to allow OFW drivers to continue to work. - Sanity check the parameters passed to the implementations of the pcib_{read,write}_config() methods. Using illegal values can cause no real harm but it doesn't hurt to avoid unnecessary data error traps requiring to flush and re-enable the level 1 caches. Modified: stable/8/sys/sparc64/pci/psycho.c stable/8/sys/sparc64/pci/psychovar.h stable/8/sys/sparc64/pci/schizo.c stable/8/sys/sparc64/pci/schizovar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/pci/psycho.c ============================================================================== --- stable/8/sys/sparc64/pci/psycho.c Fri Jan 15 16:43:19 2010 (r202399) +++ stable/8/sys/sparc64/pci/psycho.c Fri Jan 15 16:46:03 2010 (r202400) @@ -554,6 +554,7 @@ psycho_attach(device_t dev) M_NOWAIT | M_ZERO); if (sc->sc_is == NULL) panic("%s: malloc iommu_state failed", __func__); + sc->sc_is->is_flags = IOMMU_PRESERVE_PROM; if (sc->sc_mode == PSYCHO_MODE_SABRE) sc->sc_is->is_pmaxaddr = IOMMU_MAXADDR(SABRE_IOMMU_BITS); @@ -591,10 +592,11 @@ psycho_attach(device_t dev) panic("%s: could not get bus-range", __func__); if (i != sizeof(prop_array)) panic("%s: broken bus-range (%d)", __func__, i); + sc->sc_pci_secbus = prop_array[0]; + sc->sc_pci_subbus = prop_array[1]; if (bootverbose) device_printf(dev, "bus range %u to %u; PCI bus %d\n", - prop_array[0], prop_array[1], prop_array[0]); - sc->sc_pci_secbus = prop_array[0]; + sc->sc_pci_secbus, sc->sc_pci_subbus, sc->sc_pci_secbus); /* Clear any pending PCI error bits. */ PCIB_WRITE_CONFIG(dev, sc->sc_pci_secbus, PCS_DEVICE, PCS_FUNC, @@ -923,6 +925,10 @@ psycho_read_config(device_t dev, u_int b int i; sc = device_get_softc(dev); + if (bus < sc->sc_pci_secbus || bus > sc->sc_pci_subbus || + slot > PCI_SLOTMAX || func > PCI_FUNCMAX || reg > PCI_REGMAX) + return (-1); + bh = sc->sc_pci_bh[OFW_PCI_CS_CONFIG]; /* @@ -1003,6 +1009,10 @@ psycho_write_config(device_t dev, u_int u_long offset = 0; sc = device_get_softc(dev); + if (bus < sc->sc_pci_secbus || bus > sc->sc_pci_subbus || + slot > PCI_SLOTMAX || func > PCI_FUNCMAX || reg > PCI_REGMAX) + return; + offset = PSYCHO_CONF_OFF(bus, slot, func, reg); bh = sc->sc_pci_bh[OFW_PCI_CS_CONFIG]; switch (width) { Modified: stable/8/sys/sparc64/pci/psychovar.h ============================================================================== --- stable/8/sys/sparc64/pci/psychovar.h Fri Jan 15 16:43:19 2010 (r202399) +++ stable/8/sys/sparc64/pci/psychovar.h Fri Jan 15 16:46:03 2010 (r202400) @@ -75,6 +75,7 @@ struct psycho_softc { struct rman sc_pci_io_rman; uint8_t sc_pci_secbus; + uint8_t sc_pci_subbus; uint8_t sc_pci_hpbcfg[16]; Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Fri Jan 15 16:43:19 2010 (r202399) +++ stable/8/sys/sparc64/pci/schizo.c Fri Jan 15 16:46:03 2010 (r202400) @@ -454,6 +454,7 @@ schizo_attach(device_t dev) * buffer, in Schizo version < 5 (i.e. revision < 2.3) it's * affected by several errata and basically unusable though. */ + sc->sc_is.is_flags = IOMMU_PRESERVE_PROM; sc->sc_is.is_pmaxaddr = IOMMU_MAXADDR(STX_IOMMU_BITS); sc->sc_is.is_sb[0] = sc->sc_is.is_sb[1] = 0; if (OF_getproplen(node, "no-streaming-cache") < 0 && @@ -548,10 +549,11 @@ schizo_attach(device_t dev) panic("%s: could not get bus-range", __func__); if (i != sizeof(prop_array)) panic("%s: broken bus-range (%d)", __func__, i); + sc->sc_pci_secbus = prop_array[0]; + sc->sc_pci_subbus = prop_array[1]; if (bootverbose) device_printf(dev, "bus range %u to %u; PCI bus %d\n", - prop_array[0], prop_array[1], prop_array[0]); - sc->sc_pci_secbus = prop_array[0]; + sc->sc_pci_secbus, sc->sc_pci_subbus, sc->sc_pci_secbus); /* Clear any pending PCI error bits. */ PCIB_WRITE_CONFIG(dev, sc->sc_pci_secbus, STX_CS_DEVICE, STX_CS_FUNC, @@ -927,6 +929,9 @@ schizo_read_config(device_t dev, u_int b uint8_t byte; sc = device_get_softc(dev); + if (bus < sc->sc_pci_secbus || bus > sc->sc_pci_subbus || + slot > PCI_SLOTMAX || func > PCI_FUNCMAX || reg > PCI_REGMAX) + return (-1); /* * The Schizo bridges contain a dupe of their header at 0x80. @@ -975,6 +980,10 @@ schizo_write_config(device_t dev, u_int u_long offset = 0; sc = device_get_softc(dev); + if (bus < sc->sc_pci_secbus || bus > sc->sc_pci_subbus || + slot > PCI_SLOTMAX || func > PCI_FUNCMAX || reg > PCI_REGMAX) + return; + offset = STX_CONF_OFF(bus, slot, func, reg); bh = sc->sc_pci_bh[OFW_PCI_CS_CONFIG]; switch (width) { Modified: stable/8/sys/sparc64/pci/schizovar.h ============================================================================== --- stable/8/sys/sparc64/pci/schizovar.h Fri Jan 15 16:43:19 2010 (r202399) +++ stable/8/sys/sparc64/pci/schizovar.h Fri Jan 15 16:46:03 2010 (r202400) @@ -71,6 +71,7 @@ struct schizo_softc { bus_dma_tag_t sc_pci_dmat; uint8_t sc_pci_secbus; + uint8_t sc_pci_subbus; struct ofw_bus_iinfo sc_pci_iinfo; From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:46:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6AD4106566C; Fri, 15 Jan 2010 16:46:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9474B8FC15; Fri, 15 Jan 2010 16:46:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGk61B031192; Fri, 15 Jan 2010 16:46:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGk6S6031187; Fri, 15 Jan 2010 16:46:06 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151646.o0FGk6S6031187@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202401 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:46:06 -0000 Author: marius Date: Fri Jan 15 16:46:06 2010 New Revision: 202401 URL: http://svn.freebsd.org/changeset/base/202401 Log: MFC: r201395 - Preserve the PROM IOMMU in order to allow OFW drivers to continue to work. - Sanity check the parameters passed to the implementations of the pcib_{read,write}_config() methods. Using illegal values can cause no real harm but it doesn't hurt to avoid unnecessary data error traps requiring to flush and re-enable the level 1 caches. Modified: stable/7/sys/sparc64/pci/psycho.c stable/7/sys/sparc64/pci/psychovar.h stable/7/sys/sparc64/pci/schizo.c stable/7/sys/sparc64/pci/schizovar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/psycho.c ============================================================================== --- stable/7/sys/sparc64/pci/psycho.c Fri Jan 15 16:46:03 2010 (r202400) +++ stable/7/sys/sparc64/pci/psycho.c Fri Jan 15 16:46:06 2010 (r202401) @@ -555,6 +555,7 @@ psycho_attach(device_t dev) M_NOWAIT | M_ZERO); if (sc->sc_is == NULL) panic("%s: malloc iommu_state failed", __func__); + sc->sc_is->is_flags = IOMMU_PRESERVE_PROM; if (sc->sc_mode == PSYCHO_MODE_SABRE) sc->sc_is->is_pmaxaddr = IOMMU_MAXADDR(SABRE_IOMMU_BITS); @@ -592,10 +593,11 @@ psycho_attach(device_t dev) panic("%s: could not get bus-range", __func__); if (i != sizeof(prop_array)) panic("%s: broken bus-range (%d)", __func__, i); + sc->sc_pci_secbus = prop_array[0]; + sc->sc_pci_subbus = prop_array[1]; if (bootverbose) device_printf(dev, "bus range %u to %u; PCI bus %d\n", - prop_array[0], prop_array[1], prop_array[0]); - sc->sc_pci_secbus = prop_array[0]; + sc->sc_pci_secbus, sc->sc_pci_subbus, sc->sc_pci_secbus); /* Clear any pending PCI error bits. */ PCIB_WRITE_CONFIG(dev, sc->sc_pci_secbus, PCS_DEVICE, PCS_FUNC, @@ -924,6 +926,10 @@ psycho_read_config(device_t dev, u_int b int i; sc = device_get_softc(dev); + if (bus < sc->sc_pci_secbus || bus > sc->sc_pci_subbus || + slot > PCI_SLOTMAX || func > PCI_FUNCMAX || reg > PCI_REGMAX) + return (-1); + bh = sc->sc_pci_bh[OFW_PCI_CS_CONFIG]; /* @@ -1004,6 +1010,10 @@ psycho_write_config(device_t dev, u_int u_long offset = 0; sc = device_get_softc(dev); + if (bus < sc->sc_pci_secbus || bus > sc->sc_pci_subbus || + slot > PCI_SLOTMAX || func > PCI_FUNCMAX || reg > PCI_REGMAX) + return; + offset = PSYCHO_CONF_OFF(bus, slot, func, reg); bh = sc->sc_pci_bh[OFW_PCI_CS_CONFIG]; switch (width) { Modified: stable/7/sys/sparc64/pci/psychovar.h ============================================================================== --- stable/7/sys/sparc64/pci/psychovar.h Fri Jan 15 16:46:03 2010 (r202400) +++ stable/7/sys/sparc64/pci/psychovar.h Fri Jan 15 16:46:06 2010 (r202401) @@ -75,6 +75,7 @@ struct psycho_softc { struct rman sc_pci_io_rman; uint8_t sc_pci_secbus; + uint8_t sc_pci_subbus; uint8_t sc_pci_hpbcfg[16]; Modified: stable/7/sys/sparc64/pci/schizo.c ============================================================================== --- stable/7/sys/sparc64/pci/schizo.c Fri Jan 15 16:46:03 2010 (r202400) +++ stable/7/sys/sparc64/pci/schizo.c Fri Jan 15 16:46:06 2010 (r202401) @@ -455,6 +455,7 @@ schizo_attach(device_t dev) * buffer, in Schizo version < 5 (i.e. revision < 2.3) it's * affected by several errata and basically unusable though. */ + sc->sc_is.is_flags = IOMMU_PRESERVE_PROM; sc->sc_is.is_pmaxaddr = IOMMU_MAXADDR(STX_IOMMU_BITS); sc->sc_is.is_sb[0] = sc->sc_is.is_sb[1] = 0; if (OF_getproplen(node, "no-streaming-cache") < 0 && @@ -549,10 +550,11 @@ schizo_attach(device_t dev) panic("%s: could not get bus-range", __func__); if (i != sizeof(prop_array)) panic("%s: broken bus-range (%d)", __func__, i); + sc->sc_pci_secbus = prop_array[0]; + sc->sc_pci_subbus = prop_array[1]; if (bootverbose) device_printf(dev, "bus range %u to %u; PCI bus %d\n", - prop_array[0], prop_array[1], prop_array[0]); - sc->sc_pci_secbus = prop_array[0]; + sc->sc_pci_secbus, sc->sc_pci_subbus, sc->sc_pci_secbus); /* Clear any pending PCI error bits. */ PCIB_WRITE_CONFIG(dev, sc->sc_pci_secbus, STX_CS_DEVICE, STX_CS_FUNC, @@ -928,6 +930,9 @@ schizo_read_config(device_t dev, u_int b uint8_t byte; sc = device_get_softc(dev); + if (bus < sc->sc_pci_secbus || bus > sc->sc_pci_subbus || + slot > PCI_SLOTMAX || func > PCI_FUNCMAX || reg > PCI_REGMAX) + return (-1); /* * The Schizo bridges contain a dupe of their header at 0x80. @@ -976,6 +981,10 @@ schizo_write_config(device_t dev, u_int u_long offset = 0; sc = device_get_softc(dev); + if (bus < sc->sc_pci_secbus || bus > sc->sc_pci_subbus || + slot > PCI_SLOTMAX || func > PCI_FUNCMAX || reg > PCI_REGMAX) + return; + offset = STX_CONF_OFF(bus, slot, func, reg); bh = sc->sc_pci_bh[OFW_PCI_CS_CONFIG]; switch (width) { Modified: stable/7/sys/sparc64/pci/schizovar.h ============================================================================== --- stable/7/sys/sparc64/pci/schizovar.h Fri Jan 15 16:46:03 2010 (r202400) +++ stable/7/sys/sparc64/pci/schizovar.h Fri Jan 15 16:46:06 2010 (r202401) @@ -71,6 +71,7 @@ struct schizo_softc { bus_dma_tag_t sc_pci_dmat; uint8_t sc_pci_secbus; + uint8_t sc_pci_subbus; struct ofw_bus_iinfo sc_pci_iinfo; From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:54:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB4531065670; Fri, 15 Jan 2010 16:54:59 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FDC68FC15; Fri, 15 Jan 2010 16:54:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGsx2D033273; Fri, 15 Jan 2010 16:54:59 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGsxRs033270; Fri, 15 Jan 2010 16:54:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151654.o0FGsxRs033270@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202402 - in stable/8/sys/sparc64: conf sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:54:59 -0000 Author: marius Date: Fri Jan 15 16:54:59 2010 New Revision: 202402 URL: http://svn.freebsd.org/changeset/base/202402 Log: MFC: r201396, r201410 - Demapping unused kernel TLB slots has proven to work reliably so move the associated debugging under bootverbose. - Remove freebsd4_sigreturn(); given that FreeBSD 4 didn't supported sparc64 this only ever served as a transition aid prior to FreeBSD 5.0 and is unused by default since COMPAT_FREEBSD4 was removed from GENERIC in r143072 nearly 5 years ago. Modified: stable/8/sys/sparc64/conf/NOTES stable/8/sys/sparc64/sparc64/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/conf/NOTES ============================================================================== --- stable/8/sys/sparc64/conf/NOTES Fri Jan 15 16:46:06 2010 (r202401) +++ stable/8/sys/sparc64/conf/NOTES Fri Jan 15 16:54:59 2010 (r202402) @@ -129,6 +129,7 @@ nodevice ex # Options we don't want to deal with nooption FDC_DEBUG +nooption COMPAT_FREEBSD4 nooption SC_RENDER_DEBUG nooption SC_DEBUG_LEVEL nooption PPC_DEBUG Modified: stable/8/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/machdep.c Fri Jan 15 16:46:06 2010 (r202401) +++ stable/8/sys/sparc64/sparc64/machdep.c Fri Jan 15 16:54:59 2010 (r202402) @@ -383,8 +383,9 @@ sparc64_init(caddr_t mdp, u_long o1, u_l */ for (va = KERNBASE + (kernel_tlb_slots - 1) * PAGE_SIZE_4M; va >= roundup2(end, PAGE_SIZE_4M); va -= PAGE_SIZE_4M) { - printf("demapping unused kernel TLB slot (va %#lx - %#lx)\n", - va, va + PAGE_SIZE_4M - 1); + if (bootverbose) + printf("demapping unused kernel TLB slot " + "(va %#lx - %#lx)\n", va, va + PAGE_SIZE_4M - 1); stxa(TLB_DEMAP_VA(va) | TLB_DEMAP_PRIMARY | TLB_DEMAP_PAGE, ASI_DMMU_DEMAP, 0); stxa(TLB_DEMAP_VA(va) | TLB_DEMAP_PRIMARY | TLB_DEMAP_PAGE, @@ -660,15 +661,6 @@ sigreturn(struct thread *td, struct sigr return (EJUSTRETURN); } -#ifdef COMPAT_FREEBSD4 -int -freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) -{ - - return sigreturn(td, (struct sigreturn_args *)uap); -} -#endif - /* * Construct a PCB from a trapframe. This is called from kdb_trap() where * we want to start a backtrace from the function that caused us to enter From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:55:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8A291065679; Fri, 15 Jan 2010 16:55:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B93278FC0C; Fri, 15 Jan 2010 16:55:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGt06i033339; Fri, 15 Jan 2010 16:55:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGt0dh033336; Fri, 15 Jan 2010 16:55:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151655.o0FGt0dh033336@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202403 - in stable/7/sys/sparc64: conf sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:55:01 -0000 Author: marius Date: Fri Jan 15 16:55:00 2010 New Revision: 202403 URL: http://svn.freebsd.org/changeset/base/202403 Log: MFC: r201396, r201410 - Demapping unused kernel TLB slots has proven to work reliably so move the associated debugging under bootverbose. - Remove freebsd4_sigreturn(); given that FreeBSD 4 didn't supported sparc64 this only ever served as a transition aid prior to FreeBSD 5.0 and is unused by default since COMPAT_FREEBSD4 was removed from GENERIC in r143072 nearly 5 years ago. Modified: stable/7/sys/sparc64/conf/NOTES stable/7/sys/sparc64/sparc64/machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/conf/NOTES ============================================================================== --- stable/7/sys/sparc64/conf/NOTES Fri Jan 15 16:54:59 2010 (r202402) +++ stable/7/sys/sparc64/conf/NOTES Fri Jan 15 16:55:00 2010 (r202403) @@ -131,6 +131,7 @@ nodevice ex # Options we don't want to deal with nooption FDC_DEBUG +nooption COMPAT_FREEBSD4 nooption SC_RENDER_DEBUG nooption SC_DEBUG_LEVEL nooption PPC_DEBUG Modified: stable/7/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/machdep.c Fri Jan 15 16:54:59 2010 (r202402) +++ stable/7/sys/sparc64/sparc64/machdep.c Fri Jan 15 16:55:00 2010 (r202403) @@ -375,8 +375,9 @@ sparc64_init(caddr_t mdp, u_long o1, u_l */ for (va = KERNBASE + (kernel_tlb_slots - 1) * PAGE_SIZE_4M; va >= roundup2(end, PAGE_SIZE_4M); va -= PAGE_SIZE_4M) { - printf("demapping unused kernel TLB slot (va %#lx - %#lx)\n", - va, va + PAGE_SIZE_4M - 1); + if (bootverbose) + printf("demapping unused kernel TLB slot " + "(va %#lx - %#lx)\n", va, va + PAGE_SIZE_4M - 1); stxa(TLB_DEMAP_VA(va) | TLB_DEMAP_PRIMARY | TLB_DEMAP_PAGE, ASI_DMMU_DEMAP, 0); stxa(TLB_DEMAP_VA(va) | TLB_DEMAP_PRIMARY | TLB_DEMAP_PAGE, @@ -663,15 +664,6 @@ sigreturn(struct thread *td, struct sigr return (EJUSTRETURN); } -#ifdef COMPAT_FREEBSD4 -int -freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) -{ - - return sigreturn(td, (struct sigreturn_args *)uap); -} -#endif - /* * Construct a PCB from a trapframe. This is called from kdb_trap() where * we want to start a backtrace from the function that caused us to enter From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:57:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2457106566C; Fri, 15 Jan 2010 16:57:49 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E094C8FC17; Fri, 15 Jan 2010 16:57:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGvnNd034010; Fri, 15 Jan 2010 16:57:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGvn7t034008; Fri, 15 Jan 2010 16:57:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151657.o0FGvn7t034008@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202404 - stable/8/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:57:50 -0000 Author: marius Date: Fri Jan 15 16:57:49 2010 New Revision: 202404 URL: http://svn.freebsd.org/changeset/base/202404 Log: MFC: r201901 Remove clause 3 and 4 from TNF licenses (this was the only 4-clause TNF license FreeBSD had in sys/boot). Obtained from: NetBSD Modified: stable/8/sys/boot/common/dev_net.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/common/dev_net.c ============================================================================== --- stable/8/sys/boot/common/dev_net.c Fri Jan 15 16:55:00 2010 (r202403) +++ stable/8/sys/boot/common/dev_net.c Fri Jan 15 16:57:49 2010 (r202404) @@ -1,6 +1,4 @@ -/* - * $NetBSD: dev_net.c,v 1.12 1997/12/10 20:38:37 gwr Exp $ - */ +/* $NetBSD: dev_net.c,v 1.23 2008/04/28 20:24:06 martin Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -17,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 16:57:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E90D8106566B; Fri, 15 Jan 2010 16:57:53 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D78CE8FC1E; Fri, 15 Jan 2010 16:57:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FGvr54034076; Fri, 15 Jan 2010 16:57:53 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FGvrLn034074; Fri, 15 Jan 2010 16:57:53 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151657.o0FGvrLn034074@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 16:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202405 - stable/7/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 16:57:54 -0000 Author: marius Date: Fri Jan 15 16:57:53 2010 New Revision: 202405 URL: http://svn.freebsd.org/changeset/base/202405 Log: MFC: r201901 Remove clause 3 and 4 from TNF licenses (this was the only 4-clause TNF license FreeBSD had in sys/boot). Obtained from: NetBSD Modified: stable/7/sys/boot/common/dev_net.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/common/dev_net.c ============================================================================== --- stable/7/sys/boot/common/dev_net.c Fri Jan 15 16:57:49 2010 (r202404) +++ stable/7/sys/boot/common/dev_net.c Fri Jan 15 16:57:53 2010 (r202405) @@ -1,6 +1,4 @@ -/* - * $NetBSD: dev_net.c,v 1.12 1997/12/10 20:38:37 gwr Exp $ - */ +/* $NetBSD: dev_net.c,v 1.23 2008/04/28 20:24:06 martin Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -17,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 17:35:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6343106566B; Fri, 15 Jan 2010 17:35:12 +0000 (UTC) (envelope-from wkoszek@freebsd.czest.pl) Received: from freebsd.czest.pl (l95h.icis.pcz.pl [212.87.224.105]) by mx1.freebsd.org (Postfix) with ESMTP id 81A468FC08; Fri, 15 Jan 2010 17:35:11 +0000 (UTC) Received: from freebsd.czest.pl (l95h.icis.pcz.pl [212.87.224.105]) by freebsd.czest.pl (8.14.2/8.14.2) with ESMTP id o0FHlCmp050844; Fri, 15 Jan 2010 18:47:12 +0100 (CET) (envelope-from wkoszek@freebsd.czest.pl) Received: (from wkoszek@localhost) by freebsd.czest.pl (8.14.2/8.14.2/Submit) id o0FHlBc2050843; Fri, 15 Jan 2010 18:47:11 +0100 (CET) (envelope-from wkoszek) Date: Fri, 15 Jan 2010 18:47:11 +0100 From: "Wojciech A. Koszek" To: Bruce Evans Message-ID: <20100115174711.GF1990@FreeBSD.org> Mail-Followup-To: Bruce Evans , "M. Warner Losh" , dougb@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, freebsd-arch@freebsd.org, svn-src-head@freebsd.org References: <20100114.105622.457034909117828677.imp@bsdimp.com> <4B4F7810.2080003@FreeBSD.org> <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> <20100114.135930.80200584442733547.imp@bsdimp.com> <20100115114822.O63406@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <20100115114822.O63406@delplex.bde.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-3.0 (freebsd.czest.pl [212.87.224.105]); Fri, 15 Jan 2010 18:47:12 +0100 (CET) Cc: dougb@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, freebsd-arch@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 17:35:13 -0000 On Fri, Jan 15, 2010 at 12:50:55PM +1100, Bruce Evans wrote: > On Thu, 14 Jan 2010, M. Warner Losh wrote: > >> In message: <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> >> "Robert N. M. Watson" writes: >> : I agree. I see two kinds of users: >> : [..] Reasoning behind -C was that in 2007, Robert and Peter mentioned about a need of having comments in the config file. I divided users into two groups: - those who don't care because they can't reconfigure the FreeBSD kernel anyway no matter what - with or without comments, they're baked anyway, because "make xconfig" doesn't work. - those who don't care in which format config file is, since they just glance at the output from config -x, use Copy's and Paste's method and get everything fixed; preprocessing of configuration files was done for them and for system administrators woken up at 3am with a task of recreating exact machine configuration. I don't want to argue on my view, but I glanced at Warner's patch and if people want it, I believe it can make our world a bit better. > "Stripping" comments has nothing to do with saving space. It is because > it is technically difficult, and not implemented, to not strip them, > except in the old limited code that just preserves the unprocessed > top-level-only config file. This is exactly why comments aren't there. Below in this thread, Peter Jeremy gives us good suggestion on bringing additional option like "comment", which would include string literal. I think this is a good proposal. >> : As such, I see a reasonable "default" -- i.e., i386/amd64 GENERIC -- >> : be to fully preserve the configuration and its comments. For the > > Your code to implement this is welcome :-). Even GENERIC is not quite > complete, since it is missing the implicit include of DEFAULTS. OTOH, > completing the config by merging with DEFAULTS, as I think the processed > version must do, may give an unusable config by repeating things in > DEFAULTS. The merge should probably have no processing at all, with > include files concatenated and not replacing include directives, and > DEFAULTS not included. My opinion is that DEFAULTS should be included in every GENERIC explicitly by include directive, and that the code dealing with DEFAULTS which is right now present in config(8) should be removed. >> This >> will preserve the comments, but assumes that every single included >> file from that file is recoverable in a trivial manner (eg, from cvs, >> svn, p4, release ISOs, etc). > > This assumption is false, so this model became just broken when the > include directive was implemented. History: > INCLUDE_CONFIG_FILE option: 1996 > include directive: 2001 > processed output and -C: 2007 > The -C option just preserves the breakage at its 2001-2007 level. I just tried to make is "suck less", so -C right now takes all "include " directives and brings in configuration file. >> If space isn't an issue, we could save BOTH. That would be a bigger >> patch, since we'd have to alter config to extract both kinds of data. >> All I did was to move the -C option from an obscure src.conf variable >> to be a full-fledged kernel option, leaving the rest of the >> infrastructure intact. The advantage is that we cover both bases and >> could export both views as a sysctl (right now we overload the two >> different views with one sysctl). > > ISTR a long discussion about the -C option when it was implemented. Why > didn't you complain back then? :-). I looked at my old mail about this. > I wasn't involved with the initial discussion, but imp was :-). My mail > was after the initial commit. I reported the following problems: Warner was within a very small group of people that actually did care about config(8) when I touched it, and helped me to fix world/config(8) breakage when people on DevSummit (BSDCan?) couldn't get their kernel to configure properly. > - DEFAULTS wasn't processed I don't seem to remember this one... With -C it's not included, but I propose a solution above. Is this an issue you're referring here? > - several ordering problems. Ones that reordered directives of the form: > options FOO=bar > nooptions FOO > options FOO=baz > made the generated file unusable. This was found and fixed thanks to your devil's configuration tarball. Anyway... Each time I see our kernel modules being built I cry and think of this page: http://wiki.freebsd.org/NewConfig This is a list of my random ideas related with solving config(8) problems in long run. Without promising anything I can say that narrowing requirements down would help me to figure out, how big the problem is. Maybe I could help somehow with the configuration file mess in the future.. Mail me your suggestions privately, and I'll bring them to the Wiki. -- Wojciech A. Koszek wkoszek@FreeBSD.org http://FreeBSD.czest.pl/~wkoszek/ From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 17:40:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 373871065694 for ; Fri, 15 Jan 2010 17:40:32 +0000 (UTC) (envelope-from katalog@aasnews.pl) Received: from w07.webd.pl (w07.webd.pl [94.75.225.1]) by mx1.freebsd.org (Postfix) with ESMTP id 9237A8FC20 for ; Fri, 15 Jan 2010 17:40:31 +0000 (UTC) Received: from [81.219.106.228] (helo=Dell) by w07.webd.pl with esmtpa (Exim 4.69) (envelope-from ) id 1NVpQT-0001rj-Na for svn-src-all@freebsd.org; Fri, 15 Jan 2010 17:53:34 +0100 Organization: techbase Message-ID: From: "PORTAL a2s" To: Date: Fri, 15 Jan 2010 15:22:55 +0100 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - w07.webd.pl X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - aasnews.pl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: MBUS10 - R232 to mbus level converter X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: katalog@aasnews.pl List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 17:40:32 -0000 Newsletter portalu internetowego a2s.pI a.1 { text-decoration: none; margin-bottom: 0px; margin-top: 0px; } a.1:link { color: #cc0000; text-decoration: none; } a.1:visited { color: #cc0000; } a.1:hover { color: #cc0000; text-decoration: underline; } --> .com.pl-->=20 =20 Newsletter=20 2010-01-14 =20 > about us > contact =20 New Products=20 | Most Popular Products=20 | Promotion=20 | References=20 =20 =20 --> 0Jak je wykorzysta=C4=87?=20 Dear Clients=20 MBUS=20 10 - R232=20 TO MBUS LEVEL CONVERTER=20 What is MBus=20 10?=20 MBus=20 10 converter is a transparent converter from R232=20 to MBus interface. On MBus side it works as MBus master and enable to=20 connect maximum 10 standard MBus receivers (slaves)=2E Wide=20 application=20 It can=20 be used with all devices equipped with MBus interface like: heating = energy=20 meters, electric energy meters, data recorders and many others=2E Key features=20 R232=20 to MBus level conversion=20 Maximum 10 MBus slaves=20 Baud Rate: 300 to 19200bps=20 R232=20 =E2=80=93 MBus opto isolation=20 Over-current and short-circuit protection on the M-Bus=20 LED display for power and data transmission=20 Power supply: 10 ~ 30Vdc=20 Rail mounting=20 =20 MBus=20 10 Data Sheet=20 Easy installation and=20 control=20 MBus=20 10 converter is equipped with TX, RX and Power supply LED indicators.=20 There are screw terminal block connectors on Power supply and MBus (5 = pin)=20 and R232=20 (4 pin) side for connection=2E Picture below presents=20 connection diagram of MBus=20 10 converter=20 =20 =20 MBus=20 10 Wiring Diagram=20 Now You have a=20 choice MBus=20 10 can successfully replace PW3 Relay MBus level converter or any=20 other MBus master converter=2E If you have any=20 questions, just contact us=20 Our=20 company's team of technical experts will answer all your questions=20 and prepere offer just for you=2E =20 See=20 MBus 10 Product Card=20 Cena empik.com: 22,99 z=C5=82 -->=20 =20 Chosen Most Popular=20 Products =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 NPE-9200R-EDGE =20 ATC-820 =20 MBus=20 10 =20 NPE-9300RW GPRS=20 =20 ATC-1000 =20 Linux=20 ARM9 180MHz, 2xRS232, 1xRS485, 8xDI, 1xRJ45 =20 USB to=20 Serial Port RS485 Converter =20 M-Bus=20 Master to RS 232 Converter =20 Linux=20 180MHz, 1GB Flash, 2xRS232, 1xRS485, 8xDI, 1xRJ45, 2xDO, GSM/GPRS=20 =20 RS232/422/485 to Ethernet=20 converter =20 =20 Cena: 25,95 z=C5=82 Cena: 20,49 z=C5=82 Cena: 45,99 z=C5=82 =20 Cena: 24,99 z=C5=82 Cena: 32,49 z=C5=82=20 --> =20 See=20 more Most Popular Products=20 =20 See=20 more Products on Sale =20 =20 =20 --> =20 TechBase Sp. z o. o. is=20 concerned with the distribution of products in the branches of = automation,=20 electronics, and industrial informational science. Our company=E2=80=99s = team of=20 technical experts has rich experience and practical knowledge in helping=20 our clients in choosing products that will be specialized industrial=20 solutions. We support our client on every stage of the = investment=E2=80=99s=20 realization.=20 If you do not wish to receive this information, please respond. In the re: = heading of the email, please=20 write: DO NOT SUBSCRIBE MBus. We await your comments and concerns at the=20 same address.=20 TechBase Sp. z o.o., st. Pana Tadeusza 14, 80-123=20 Gda=C5=84sk, phone. +48 58 345-39-22, +48 58 345-39-23, fax. +48 58 = 345-39-15 www.a2s - pl, info@a2s - com.pl From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 17:41:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0058C106566B; Fri, 15 Jan 2010 17:41:34 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout025.mac.com (asmtpout025.mac.com [17.148.16.100]) by mx1.freebsd.org (Postfix) with ESMTP id D30D78FC13; Fri, 15 Jan 2010 17:41:34 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp025.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KWA00BP5UH6GK30@asmtp025.mac.com>; Fri, 15 Jan 2010 09:41:34 -0800 (PST) From: Marcel Moolenaar In-reply-to: <20100115174711.GF1990@FreeBSD.org> Date: Fri, 15 Jan 2010 09:41:30 -0800 Message-id: References: <20100114.105622.457034909117828677.imp@bsdimp.com> <4B4F7810.2080003@FreeBSD.org> <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> <20100114.135930.80200584442733547.imp@bsdimp.com> <20100115114822.O63406@delplex.bde.org> <20100115174711.GF1990@FreeBSD.org> To: "Wojciech A. Koszek" X-Mailer: Apple Mail (2.1077) Cc: dougb@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, Bruce Evans , freebsd-arch@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 17:41:35 -0000 On Jan 15, 2010, at 9:47 AM, Wojciech A. Koszek wrote: > On Fri, Jan 15, 2010 at 12:50:55PM +1100, Bruce Evans wrote: >> On Thu, 14 Jan 2010, M. Warner Losh wrote: >> >>> In message: <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> >>> "Robert N. M. Watson" writes: >>> : I agree. I see two kinds of users: >>> : > > [..] > > Reasoning behind -C was that in 2007, Robert and Peter mentioned about a need > of having comments in the config file. I divided users into two groups: Why don't we stop dividing people in groups and classes and instead just add directives for what to include. Such as: embed options embed devices embed comments embed includes embed "$FreeBSD$" Combine this with syntactic sugaring and you can have something like: embed everything noembed comments Is this really so hard? -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 17:55:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47C5D106566B; Fri, 15 Jan 2010 17:55:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36FAF8FC1A; Fri, 15 Jan 2010 17:55:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FHtJIU046744; Fri, 15 Jan 2010 17:55:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FHtJDF046742; Fri, 15 Jan 2010 17:55:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001151755.o0FHtJDF046742@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 15 Jan 2010 17:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202406 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 17:55:19 -0000 Author: yongari Date: Fri Jan 15 17:55:18 2010 New Revision: 202406 URL: http://svn.freebsd.org/changeset/base/202406 Log: Don't free mbuf chains when bge(4) fails to collapse the mbuf chains. This part of code is to enhance performance so failing the collapsing should not free TX frames. Otherwise bge(4) will unnecessarily drop frames which in turn can freeze the network connection. Reported by: Igor Sysoev (is <> rambler-co dot ru) Tested by: Igor Sysoev (is <> rambler-co dot ru) Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Jan 15 16:57:53 2010 (r202405) +++ head/sys/dev/bge/if_bge.c Fri Jan 15 17:55:18 2010 (r202406) @@ -3950,11 +3950,8 @@ bge_encap(struct bge_softc *sc, struct m m = m_defrag(m, M_DONTWAIT); else m = m_collapse(m, M_DONTWAIT, sc->bge_forced_collapse); - if (m == NULL) { - m_freem(*m_head); - *m_head = NULL; - return (ENOBUFS); - } + if (m == NULL) + m = *m_head; *m_head = m; } From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 18:06:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 679ED1065670; Fri, 15 Jan 2010 18:06:14 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 26ACB8FC0A; Fri, 15 Jan 2010 18:06:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0FI4iCQ034251; Fri, 15 Jan 2010 11:04:44 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 15 Jan 2010 11:05:28 -0700 (MST) Message-Id: <20100115.110528.849557997928257031.imp@bsdimp.com> To: xcllnt@mac.com From: "M. Warner Losh" In-Reply-To: References: <20100115114822.O63406@delplex.bde.org> <20100115174711.GF1990@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: dougb@freebsd.org, svn-src-all@freebsd.org, wkoszek@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, brde@optusnet.com.au, freebsd-arch@freebsd.org, svn-src-head@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 18:06:14 -0000 In message: Marcel Moolenaar writes: : : On Jan 15, 2010, at 9:47 AM, Wojciech A. Koszek wrote: : : > On Fri, Jan 15, 2010 at 12:50:55PM +1100, Bruce Evans wrote: : >> On Thu, 14 Jan 2010, M. Warner Losh wrote: : >> : >>> In message: <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> : >>> "Robert N. M. Watson" writes: : >>> : I agree. I see two kinds of users: : >>> : : > : > [..] : > : > Reasoning behind -C was that in 2007, Robert and Peter mentioned about a need : > of having comments in the config file. I divided users into two groups: : : Why don't we stop dividing people in groups and classes and : instead just add directives for what to include. Such as: : : embed options : embed devices : embed comments : embed includes : embed "$FreeBSD$" : : Combine this with syntactic sugaring and you can have something : like: : embed everything : noembed comments : : Is this really so hard? Yes. Didn't you read the message I posted about why this is hard? There would be a ton of lexer and parser work to make this happen, as well as a lot of work to internal data structures to keep the file as parsed, rather than as convenient to do config's job. It is a big pita. Right now there's two places where you can tap into the config file information. The first one is where we know the filename of the file we're configuring. The second is after all the lexing has happened and we know the options, but their order has been lost as well as any formatting and text. The latter was done to address concerns over the 'include' directive, but it has its own set of problems and isn't perfect either. I think the way forward isn't as you suggest. It would be a ton of work to fix the lexer to carry forward the comments. A comments directive is just plain silly. The embedding stuff is too fine-grained control. It is a bandaide on a bandaide over a kludge. What is needed really is a fresher approach to solving the problem correctly. I've been thinking hard about this. The better approach is actually very simple to implement and do, and is very extensible. Stay with me here for a moment. First, we change the section in the ELF file that contains the config file a little. This section will define a couple of symbols, with weak symbols backing them in kern/kern_mib.c (more on why that particular file later). This new section would be just a normal text file. The mib that exports the current config file would export this text file. The config -x command that looks for the config would still print out the same section of the file. So far, there's no change from what we have today, which is good. The reporting side can remain exactly as it is. However, we'd have config create a new file in the kernel directory. It would contain a list of all the files that were included (directly or indirectly) as part of the config parsing. This would also include not only files brought in by the 'config' directive, but also files brought in by the env or hints directives. This change is very small, and about a dozen lines of code to implement. I could produce a patch easily enough. The build process would change a little. Rather than config creating config.c, the build process would create it based on a dependency on this file and all the files in this file. The build scripts would then create a simple shar file of all the files listed in this file (included, env, hints, etc). This would be embedded in the kernel. This would solve the 'I forgot to save this included file' problem completely. It would solve the ordering problems we have without -C. It would solve the comments going away. Heck, we could have two options: one to include the entire src/sys tree (modulo binaries) and one to just include the config files. If there are space concerns, it can be made into a gzip -9'd tarball and no longer text for all I care :). But the src/sys option would be a little slow and really bloat the kernel. Now, the reason that kern/kern_mib.c was singled out is that's where we export this blob to userland. My idea is to keep the text format that we have now for compatibility, and I'd rather not have the mib do the decompression. But if we break with compat, then we can easily have the binary blob that's preserved there which can trivially be extracted either by config -x, or by the sysctl on the running kernel. Frankly, that sort of thing is the right way to fix the include problem. There's no space reason for including just a subset: it was purely an easy of implementation choice that drove the two ways. If we really make it include everything, then -C can go away, the weird pseudo thing we have can go away, and we know get everything. And it is easy to implement... Comments? Warner From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 18:59:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DAAD106568F; Fri, 15 Jan 2010 18:59:42 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout029.mac.com (asmtpout029.mac.com [17.148.16.104]) by mx1.freebsd.org (Postfix) with ESMTP id 205958FC16; Fri, 15 Jan 2010 18:59:41 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp029.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KWA00DXOY2OK690@asmtp029.mac.com>; Fri, 15 Jan 2010 10:59:30 -0800 (PST) From: Marcel Moolenaar In-reply-to: <20100115.110528.849557997928257031.imp@bsdimp.com> Date: Fri, 15 Jan 2010 10:59:11 -0800 Message-id: References: <20100115114822.O63406@delplex.bde.org> <20100115174711.GF1990@FreeBSD.org> <20100115.110528.849557997928257031.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1077) Cc: dougb@freebsd.org, svn-src-all@freebsd.org, wkoszek@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, brde@optusnet.com.au, freebsd-arch@freebsd.org, svn-src-head@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 18:59:42 -0000 On Jan 15, 2010, at 10:05 AM, M. Warner Losh wrote: > : Is this really so hard? > > Yes. Didn't you read the message I posted about why this is hard? No, I didn't. > There would be a ton of lexer and parser work to make this happen, as > well as a lot of work to internal data structures to keep the file as > parsed, rather than as convenient to do config's job. It is a big > pita. PITA != hard. If we're not willing to put in the effort to fix something, I don't think we should call it hard to do. We should call it like it is: non-trivial, involved or significant. Heck, we can even call it a major undertaking. But hard? No, I don't think it's hard at all. > I think the way forward isn't as you suggest. Fine. Just stop trying to classify people as a basis for what behaviour we should implement. It never works... > If > we really make it include everything, then -C can go away, the weird > pseudo thing we have can go away, and we know get everything. And it > is easy to implement... > > Comments? How does this address the "I don't want everything, I just want my CVS keyword" example? How does it handle the delicate balance between space vs. functionality that exists on embedded and/or low-end platforms. An all inclusive implementation seems not to take that into account that well. Sure, you can compress but then you add a runtime overhead to uncompress. In any case: I personally don't use the option so I really should not get involved. If I were to implement something from scratch though, I would treat it as a C file: the config file is the source and you "compile" it into a binary form suitable for inclusion into the kernel and you have compile-time options that control the binary output. No comments will be included in that case and there will be no option for it. But that's just me... -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:06:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 339E81065672; Fri, 15 Jan 2010 19:06:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2163B8FC13; Fri, 15 Jan 2010 19:06:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FJ6YEC062713; Fri, 15 Jan 2010 19:06:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FJ6YY6062710; Fri, 15 Jan 2010 19:06:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151906.o0FJ6YY6062710@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 19:06:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202408 - in stable/8/sys/boot: common sparc64/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:06:34 -0000 Author: marius Date: Fri Jan 15 19:06:33 2010 New Revision: 202408 URL: http://svn.freebsd.org/changeset/base/202408 Log: MFC: r201932 - Add code allowing a network device to only be open and closed once by keeping it opened after the first open and closing it via the cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined in order to avoid the open-close-dance on every file access which with firmware that for example performs an auto-negotiation on every open causes netbooting to take horribly long. Basically the behavior with this knob enabled resembles the one employed between r60506 and r177108 (and for sparc64 also again since r182919) with the addition that the network device now is closed eventually before entering the kernel and before rebooting. Actually I think this should be the desired MI behavior, however the U-Boot loader actually requires net_close() to be called after every transaction in order for some local shutdown operations to be performed (and which I think thus will break on concurrent opens, i.e. when netdev_opens is > 1, like the loader does at least for disks when LOADER_GZIP_SUPPORT is enabled). - Use NETIF_OPEN_CLOSE_ONCE to replace the hack, which artificially increased netdev_opens for sparc64 in order to keep the network device opened forever, as at least some firmware versions require the network device to be closed eventually before entering the kernel or otherwise will DMA received packets to stale memory. The powerpc OFW loader probably wants NETIF_OPEN_CLOSE_ONCE to be set as well for the same reasons. Modified: stable/8/sys/boot/common/dev_net.c stable/8/sys/boot/sparc64/loader/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/common/dev_net.c ============================================================================== --- stable/8/sys/boot/common/dev_net.c Fri Jan 15 18:31:44 2010 (r202407) +++ stable/8/sys/boot/common/dev_net.c Fri Jan 15 19:06:33 2010 (r202408) @@ -71,12 +71,14 @@ __FBSDID("$FreeBSD$"); int debug = 0; #endif +static char *netdev_name; static int netdev_sock = -1; static int netdev_opens; static int net_init(void); static int net_open(struct open_file *, ...); static int net_close(struct open_file *); +static void net_cleanup(void); static int net_strategy(); static void net_print(int); @@ -90,7 +92,8 @@ struct devsw netdev = { net_open, net_close, noioctl, - net_print + net_print, + net_cleanup }; static int @@ -116,6 +119,12 @@ net_open(struct open_file *f, ...) devname = va_arg(args, char*); va_end(args); +#ifdef NETIF_OPEN_CLOSE_ONCE + /* Before opening another interface, close the previous one first. */ + if (netdev_sock >= 0 && strcmp(devname, netdev_name) != 0) + net_cleanup(); +#endif + /* On first open, do netif open, mount, etc. */ if (netdev_opens == 0) { /* Find network interface. */ @@ -125,6 +134,7 @@ net_open(struct open_file *f, ...) printf("net_open: netif_open() failed\n"); return (ENXIO); } + netdev_name = strdup(devname); #ifdef NETIF_DEBUG if (debug) printf("net_open: netif_open() succeeded\n"); @@ -135,14 +145,12 @@ net_open(struct open_file *f, ...) error = net_getparams(netdev_sock); if (error) { /* getparams makes its own noise */ + free(netdev_name); netif_close(netdev_sock); netdev_sock = -1; return (error); } } -#if defined(__sparc64__) - netdev_opens++; -#endif } netdev_opens++; f->f_devdata = &netdev_sock; @@ -152,30 +160,46 @@ net_open(struct open_file *f, ...) static int net_close(struct open_file *f) { + #ifdef NETIF_DEBUG if (debug) printf("net_close: opens=%d\n", netdev_opens); #endif - /* On last close, do netif close, etc. */ f->f_devdata = NULL; + +#ifndef NETIF_OPEN_CLOSE_ONCE /* Extra close call? */ if (netdev_opens <= 0) return (0); netdev_opens--; /* Not last close? */ if (netdev_opens > 0) - return(0); - rootip.s_addr = 0; + return (0); + /* On last close, do netif close, etc. */ +#ifdef NETIF_DEBUG + if (debug) + printf("net_close: calling net_cleanup()\n"); +#endif + net_cleanup(); +#endif + return (0); +} + +static void +net_cleanup(void) +{ + if (netdev_sock >= 0) { #ifdef NETIF_DEBUG if (debug) - printf("net_close: calling netif_close()\n"); + printf("net_cleanup: calling netif_close()\n"); #endif + rootip.s_addr = 0; + free(netdev_name); netif_close(netdev_sock); netdev_sock = -1; } - return (0); } static int Modified: stable/8/sys/boot/sparc64/loader/Makefile ============================================================================== --- stable/8/sys/boot/sparc64/loader/Makefile Fri Jan 15 18:31:44 2010 (r202407) +++ stable/8/sys/boot/sparc64/loader/Makefile Fri Jan 15 19:06:33 2010 (r202408) @@ -51,11 +51,15 @@ CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../.. LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif -# Always add MI sources +# Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. +# Avoid the open-close-dance for every file access as some firmwares perform +# an auto-negotiation on every open of the network interface and thus causes +# netbooting to take horribly long. +CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE CLEANFILES+= vers.c loader.help From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:06:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E8341065672; Fri, 15 Jan 2010 19:06:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C67D8FC12; Fri, 15 Jan 2010 19:06:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FJ6l1e062786; Fri, 15 Jan 2010 19:06:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FJ6lJB062783; Fri, 15 Jan 2010 19:06:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151906.o0FJ6lJB062783@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 19:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202409 - in stable/7/sys/boot: common sparc64/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:06:47 -0000 Author: marius Date: Fri Jan 15 19:06:47 2010 New Revision: 202409 URL: http://svn.freebsd.org/changeset/base/202409 Log: MFC: r201932 - Add code allowing a network device to only be open and closed once by keeping it opened after the first open and closing it via the cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined. Note that due to the fact that the part of r177108 which reverts r60506 and causes the open-close-dance on every file access as the remaining problems with powerpc should be sorted out first, in stable/7 the only difference in behavior between when NETIF_OPEN_CLOSE_ONCE is defined and not currently is that with that macro defined the network device is eventually closed before entering the kernel and before rebooting. - Define NETIF_OPEN_CLOSE_ONCE on sparc64 in order to not keep the network device opened forever, as at least with some firmware versions received packets are DMA'ed to stale memory otherwise. Modified: stable/7/sys/boot/common/dev_net.c stable/7/sys/boot/sparc64/loader/Makefile Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/common/dev_net.c ============================================================================== --- stable/7/sys/boot/common/dev_net.c Fri Jan 15 19:06:33 2010 (r202408) +++ stable/7/sys/boot/common/dev_net.c Fri Jan 15 19:06:47 2010 (r202409) @@ -71,12 +71,14 @@ __FBSDID("$FreeBSD$"); int debug = 0; #endif +static char *netdev_name; static int netdev_sock = -1; static int netdev_opens; static int net_init(void); static int net_open(struct open_file *, ...); static int net_close(struct open_file *); +static void net_cleanup(void); static int net_strategy(); static void net_print(int); @@ -90,7 +92,8 @@ struct devsw netdev = { net_open, net_close, noioctl, - net_print + net_print, + net_cleanup }; static int @@ -116,6 +119,12 @@ net_open(struct open_file *f, ...) devname = va_arg(args, char*); va_end(args); +#ifdef NETIF_OPEN_CLOSE_ONCE + /* Before opening another interface, close the previous one first. */ + if (netdev_sock >= 0 && strcmp(devname, netdev_name) != 0) + net_cleanup(); +#endif + /* On first open, do netif open, mount, etc. */ if (netdev_opens == 0) { /* Find network interface. */ @@ -125,6 +134,7 @@ net_open(struct open_file *f, ...) printf("net_open: netif_open() failed\n"); return (ENXIO); } + netdev_name = strdup(devname); #ifdef NETIF_DEBUG if (debug) printf("net_open: netif_open() succeeded\n"); @@ -135,6 +145,7 @@ net_open(struct open_file *f, ...) error = net_getparams(netdev_sock); if (error) { /* getparams makes its own noise */ + free(netdev_name); netif_close(netdev_sock); netdev_sock = -1; return (error); @@ -150,30 +161,46 @@ net_open(struct open_file *f, ...) static int net_close(struct open_file *f) { + #ifdef NETIF_DEBUG if (debug) printf("net_close: opens=%d\n", netdev_opens); #endif - /* On last close, do netif close, etc. */ f->f_devdata = NULL; + +#ifndef NETIF_OPEN_CLOSE_ONCE /* Extra close call? */ if (netdev_opens <= 0) return (0); netdev_opens--; /* Not last close? */ if (netdev_opens > 0) - return(0); - rootip.s_addr = 0; + return (0); + /* On last close, do netif close, etc. */ +#ifdef NETIF_DEBUG + if (debug) + printf("net_close: calling net_cleanup()\n"); +#endif + net_cleanup(); +#endif + return (0); +} + +static void +net_cleanup(void) +{ + if (netdev_sock >= 0) { #ifdef NETIF_DEBUG if (debug) - printf("net_close: calling netif_close()\n"); + printf("net_cleanup: calling netif_close()\n"); #endif + rootip.s_addr = 0; + free(netdev_name); netif_close(netdev_sock); netdev_sock = -1; } - return (0); } static int Modified: stable/7/sys/boot/sparc64/loader/Makefile ============================================================================== --- stable/7/sys/boot/sparc64/loader/Makefile Fri Jan 15 19:06:33 2010 (r202408) +++ stable/7/sys/boot/sparc64/loader/Makefile Fri Jan 15 19:06:47 2010 (r202409) @@ -50,11 +50,15 @@ CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../.. LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif -# Always add MI sources +# Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. +# Avoid the open-close-dance for every file access as some firmwares perform +# an auto-negotiation on every open of the network interface and thus causes +# netbooting to take horribly long. +CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE CLEANFILES+= vers.c loader.help From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:12:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A368E1065670; Fri, 15 Jan 2010 19:12:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FDD68FC18; Fri, 15 Jan 2010 19:12:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FJCXge064161; Fri, 15 Jan 2010 19:12:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FJCXwK064153; Fri, 15 Jan 2010 19:12:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151912.o0FJCXwK064153@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 19:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202410 - in stable/8/sys: conf modules modules/epic sparc64/conf sparc64/ebus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:12:33 -0000 Author: marius Date: Fri Jan 15 19:12:33 2010 New Revision: 202410 URL: http://svn.freebsd.org/changeset/base/202410 Log: MFC: r202006 Add epic(4), a driver for the front panel LEDs in Sun Fire V215/V245. It's named after the driver doing the same job in OpenSolaris. Added: stable/8/sys/modules/epic/ - copied from r202006, head/sys/modules/epic/ stable/8/sys/sparc64/ebus/epic.c - copied unchanged from r202006, head/sys/sparc64/ebus/epic.c Modified: stable/8/sys/conf/files.sparc64 stable/8/sys/modules/Makefile stable/8/sys/sparc64/conf/GENERIC Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files.sparc64 ============================================================================== --- stable/8/sys/conf/files.sparc64 Fri Jan 15 19:06:47 2010 (r202409) +++ stable/8/sys/conf/files.sparc64 Fri Jan 15 19:12:33 2010 (r202410) @@ -68,6 +68,7 @@ libkern/flsl.c standard libkern/memmove.c standard sparc64/central/central.c optional central sparc64/ebus/ebus.c optional ebus +sparc64/ebus/epic.c optional epic ebus sparc64/fhc/clkbrd.c optional fhc sparc64/fhc/fhc.c optional fhc sparc64/isa/isa.c optional isa Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Fri Jan 15 19:06:47 2010 (r202409) +++ stable/8/sys/modules/Makefile Fri Jan 15 19:12:33 2010 (r202410) @@ -80,6 +80,7 @@ SUBDIR= ${_3dfx} \ ${_em} \ en \ ${_ep} \ + ${_epic} \ ${_et} \ ${_ex} \ ${_exca} \ @@ -593,6 +594,7 @@ _sound= sound .if ${MACHINE_ARCH} == "sparc64" _auxio= auxio _em= em +_epic= epic _i2c= i2c _igb= igb .if ${MK_CDDL} != "no" || defined(ALL_MODULES) Modified: stable/8/sys/sparc64/conf/GENERIC ============================================================================== --- stable/8/sys/sparc64/conf/GENERIC Fri Jan 15 19:06:47 2010 (r202409) +++ stable/8/sys/sparc64/conf/GENERIC Fri Jan 15 19:12:33 2010 (r202410) @@ -141,6 +141,7 @@ device eeprom # eeprom (really a front device mk48txx # Mostek MK48Txx clocks device rtc # rtc (really a front-end for the MC146818) device mc146818 # Motorola MC146818 and compatible clocks +device epic # Sun Fire V215/V245 LEDs # Serial (COM) ports device puc # Multi-channel uarts Copied: stable/8/sys/sparc64/ebus/epic.c (from r202006, head/sys/sparc64/ebus/epic.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sparc64/ebus/epic.c Fri Jan 15 19:12:33 2010 (r202410, copy of r202006, head/sys/sparc64/ebus/epic.c) @@ -0,0 +1,216 @@ +/*- + * Copyright (c) 2009 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#define EPIC_DELAY 10000 + +#define EPIC_NREG 1 +#define EPIC_FW_LED 0 + +#define EPIC_FW_LED_DATA 0x40 +#define EPIC_FW_LED_ADDR 0x41 +#define EPIC_FW_LED_WRITE_MASK 0x80 + +#define EPIC_FW_VERSION 0x05 +#define EPIC_LED_STATE0 0x06 + +#define EPIC_LED_ALERT_MASK 0x0c +#define EPIC_LED_ALERT_OFF 0x00 +#define EPIC_LED_ALERT_ON 0x04 + +#define EPIC_LED_POWER_MASK 0x30 +#define EPIC_LED_POWER_OFF 0x00 +#define EPIC_LED_POWER_ON 0x10 +#define EPIC_LED_POWER_SB_BLINK 0x20 +#define EPIC_LED_POWER_FAST_BLINK 0x30 + +static struct resource_spec epic_res_spec[] = { + { SYS_RES_MEMORY, EPIC_FW_LED, RF_ACTIVE }, + { -1, 0 } +}; + +struct epic_softc { + struct mtx sc_mtx; + struct resource *sc_res[EPIC_NREG]; + struct cdev *sc_led_dev_alert; + struct cdev *sc_led_dev_power; +}; + +#define EPIC_FW_LED_READ(sc, off) ({ \ + uint8_t __val; \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, (off));\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, 1, \ + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ + __val = bus_read_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA);\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA, 1, \ + BUS_SPACE_BARRIER_READ); \ + DELAY(EPIC_DELAY); \ + __val; \ +}) + +#define EPIC_FW_LED_WRITE(sc, off, mask, val) do { \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, (off));\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, 1, \ + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_WRITE_MASK, \ + (mask)); \ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_WRITE_MASK, \ + 1, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA, (val));\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA, 1, \ + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ +} while (0) + +#define EPIC_LOCK_INIT(sc) \ + mtx_init(&(sc)->sc_mtx, "epic mtx", NULL, MTX_DEF) +#define EPIC_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx) +#define EPIC_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define EPIC_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) + +static device_probe_t epic_probe; +static device_attach_t epic_attach; +static device_detach_t epic_detach; + +static void epic_led_alert(void *arg, int onoff); +static void epic_led_power(void *arg, int onoff); + +static device_method_t epic_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, epic_probe), + DEVMETHOD(device_attach, epic_attach), + DEVMETHOD(device_detach, epic_detach), + + KOBJMETHOD_END +}; + +static devclass_t epic_devclass; + +DEFINE_CLASS_0(epic, epic_driver, epic_methods, + sizeof(struct epic_softc)); +DRIVER_MODULE(epic, ebus, epic_driver, epic_devclass, 0, 0); + +static int +epic_probe(device_t dev) +{ + const char* compat; + + compat = ofw_bus_get_compat(dev); + if (compat != NULL && strcmp(ofw_bus_get_name(dev), + "env-monitor") == 0 && strcmp(compat, "epic") == 0) { + device_set_desc(dev, "Sun Fire V215/V245 LEDs"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); +} + +static int +epic_attach(device_t dev) +{ + struct epic_softc *sc; + + sc = device_get_softc(dev); + if (bus_alloc_resources(dev, epic_res_spec, sc->sc_res)) { + device_printf(dev, "failed to allocate resources\n"); + bus_release_resources(dev, epic_res_spec, sc->sc_res); + return (ENXIO); + } + + EPIC_LOCK_INIT(sc); + + if (bootverbose) + device_printf(dev, "version 0x%x\n", + EPIC_FW_LED_READ(sc, EPIC_FW_VERSION)); + + sc->sc_led_dev_alert = led_create(epic_led_alert, sc, "alert"); + sc->sc_led_dev_power = led_create(epic_led_power, sc, "power"); + + return (0); +} + +static int +epic_detach(device_t dev) +{ + struct epic_softc *sc; + + sc = device_get_softc(dev); + + led_destroy(sc->sc_led_dev_alert); + led_destroy(sc->sc_led_dev_power); + + bus_release_resources(dev, epic_res_spec, sc->sc_res); + + EPIC_LOCK_DESTROY(sc); + + return (0); +} + +static void +epic_led_alert(void *arg, int onoff) +{ + struct epic_softc *sc; + + sc = (struct epic_softc *)arg; + + EPIC_LOCK(sc); + EPIC_FW_LED_WRITE(sc, EPIC_LED_STATE0, EPIC_LED_ALERT_MASK, + onoff ? EPIC_LED_ALERT_ON : EPIC_LED_ALERT_OFF); + EPIC_UNLOCK(sc); +} + +static void +epic_led_power(void *arg, int onoff) +{ + struct epic_softc *sc; + + sc = (struct epic_softc *)arg; + + EPIC_LOCK(sc); + EPIC_FW_LED_WRITE(sc, EPIC_LED_STATE0, EPIC_LED_POWER_MASK, + onoff ? EPIC_LED_POWER_ON : EPIC_LED_POWER_OFF); + EPIC_UNLOCK(sc); +} From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:12:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28CFE1065676; Fri, 15 Jan 2010 19:12:35 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 157FF8FC19; Fri, 15 Jan 2010 19:12:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FJCYMi064194; Fri, 15 Jan 2010 19:12:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FJCYGE064189; Fri, 15 Jan 2010 19:12:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001151912.o0FJCYGE064189@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 19:12:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202411 - in stable/7/sys: conf modules modules/epic sparc64/conf sparc64/ebus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:12:35 -0000 Author: marius Date: Fri Jan 15 19:12:34 2010 New Revision: 202411 URL: http://svn.freebsd.org/changeset/base/202411 Log: MFC: r202006 Add epic(4), a driver for the front panel LEDs in Sun Fire V215/V245. It's named after the driver doing the same job in OpenSolaris. Added: stable/7/sys/modules/epic/ - copied from r202006, head/sys/modules/epic/ stable/7/sys/sparc64/ebus/epic.c - copied unchanged from r202006, head/sys/sparc64/ebus/epic.c Modified: stable/7/sys/conf/files.sparc64 stable/7/sys/modules/Makefile stable/7/sys/sparc64/conf/GENERIC Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/conf/files.sparc64 ============================================================================== --- stable/7/sys/conf/files.sparc64 Fri Jan 15 19:12:33 2010 (r202410) +++ stable/7/sys/conf/files.sparc64 Fri Jan 15 19:12:34 2010 (r202411) @@ -64,6 +64,7 @@ libkern/fls.c standard libkern/flsl.c standard sparc64/central/central.c optional central sparc64/ebus/ebus.c optional ebus +sparc64/ebus/epic.c optional epic ebus sparc64/fhc/clkbrd.c optional clkbrd fhc sparc64/fhc/fhc.c optional fhc sparc64/isa/isa.c optional isa Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Fri Jan 15 19:12:33 2010 (r202410) +++ stable/7/sys/modules/Makefile Fri Jan 15 19:12:34 2010 (r202411) @@ -86,6 +86,7 @@ SUBDIR= ${_3dfx} \ ${_em} \ en \ ${_ep} \ + ${_epic} \ ${_et} \ ${_ex} \ ${_exca} \ @@ -636,6 +637,7 @@ _smbfs= smbfs .if ${MACHINE_ARCH} == "sparc64" _auxio= auxio _em= em +_epic= epic _i2c= i2c _igb= igb .if ${MK_CDDL} != "no" || defined(ALL_MODULES) Modified: stable/7/sys/sparc64/conf/GENERIC ============================================================================== --- stable/7/sys/sparc64/conf/GENERIC Fri Jan 15 19:12:33 2010 (r202410) +++ stable/7/sys/sparc64/conf/GENERIC Fri Jan 15 19:12:34 2010 (r202411) @@ -137,6 +137,7 @@ device eeprom # eeprom (really a front device mk48txx # Mostek MK48Txx clocks device rtc # rtc (really a front-end for the MC146818) device mc146818 # Motorola MC146818 and compatible clocks +device epic # Sun Fire V215/V245 LEDs # Serial (COM) ports device puc # Multi-channel uarts Copied: stable/7/sys/sparc64/ebus/epic.c (from r202006, head/sys/sparc64/ebus/epic.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/sparc64/ebus/epic.c Fri Jan 15 19:12:34 2010 (r202411, copy of r202006, head/sys/sparc64/ebus/epic.c) @@ -0,0 +1,216 @@ +/*- + * Copyright (c) 2009 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#define EPIC_DELAY 10000 + +#define EPIC_NREG 1 +#define EPIC_FW_LED 0 + +#define EPIC_FW_LED_DATA 0x40 +#define EPIC_FW_LED_ADDR 0x41 +#define EPIC_FW_LED_WRITE_MASK 0x80 + +#define EPIC_FW_VERSION 0x05 +#define EPIC_LED_STATE0 0x06 + +#define EPIC_LED_ALERT_MASK 0x0c +#define EPIC_LED_ALERT_OFF 0x00 +#define EPIC_LED_ALERT_ON 0x04 + +#define EPIC_LED_POWER_MASK 0x30 +#define EPIC_LED_POWER_OFF 0x00 +#define EPIC_LED_POWER_ON 0x10 +#define EPIC_LED_POWER_SB_BLINK 0x20 +#define EPIC_LED_POWER_FAST_BLINK 0x30 + +static struct resource_spec epic_res_spec[] = { + { SYS_RES_MEMORY, EPIC_FW_LED, RF_ACTIVE }, + { -1, 0 } +}; + +struct epic_softc { + struct mtx sc_mtx; + struct resource *sc_res[EPIC_NREG]; + struct cdev *sc_led_dev_alert; + struct cdev *sc_led_dev_power; +}; + +#define EPIC_FW_LED_READ(sc, off) ({ \ + uint8_t __val; \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, (off));\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, 1, \ + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ + __val = bus_read_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA);\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA, 1, \ + BUS_SPACE_BARRIER_READ); \ + DELAY(EPIC_DELAY); \ + __val; \ +}) + +#define EPIC_FW_LED_WRITE(sc, off, mask, val) do { \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, (off));\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_ADDR, 1, \ + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_WRITE_MASK, \ + (mask)); \ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_WRITE_MASK, \ + 1, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ + bus_write_1((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA, (val));\ + bus_barrier((sc)->sc_res[EPIC_FW_LED], EPIC_FW_LED_DATA, 1, \ + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ + DELAY(EPIC_DELAY); \ +} while (0) + +#define EPIC_LOCK_INIT(sc) \ + mtx_init(&(sc)->sc_mtx, "epic mtx", NULL, MTX_DEF) +#define EPIC_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx) +#define EPIC_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define EPIC_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) + +static device_probe_t epic_probe; +static device_attach_t epic_attach; +static device_detach_t epic_detach; + +static void epic_led_alert(void *arg, int onoff); +static void epic_led_power(void *arg, int onoff); + +static device_method_t epic_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, epic_probe), + DEVMETHOD(device_attach, epic_attach), + DEVMETHOD(device_detach, epic_detach), + + KOBJMETHOD_END +}; + +static devclass_t epic_devclass; + +DEFINE_CLASS_0(epic, epic_driver, epic_methods, + sizeof(struct epic_softc)); +DRIVER_MODULE(epic, ebus, epic_driver, epic_devclass, 0, 0); + +static int +epic_probe(device_t dev) +{ + const char* compat; + + compat = ofw_bus_get_compat(dev); + if (compat != NULL && strcmp(ofw_bus_get_name(dev), + "env-monitor") == 0 && strcmp(compat, "epic") == 0) { + device_set_desc(dev, "Sun Fire V215/V245 LEDs"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); +} + +static int +epic_attach(device_t dev) +{ + struct epic_softc *sc; + + sc = device_get_softc(dev); + if (bus_alloc_resources(dev, epic_res_spec, sc->sc_res)) { + device_printf(dev, "failed to allocate resources\n"); + bus_release_resources(dev, epic_res_spec, sc->sc_res); + return (ENXIO); + } + + EPIC_LOCK_INIT(sc); + + if (bootverbose) + device_printf(dev, "version 0x%x\n", + EPIC_FW_LED_READ(sc, EPIC_FW_VERSION)); + + sc->sc_led_dev_alert = led_create(epic_led_alert, sc, "alert"); + sc->sc_led_dev_power = led_create(epic_led_power, sc, "power"); + + return (0); +} + +static int +epic_detach(device_t dev) +{ + struct epic_softc *sc; + + sc = device_get_softc(dev); + + led_destroy(sc->sc_led_dev_alert); + led_destroy(sc->sc_led_dev_power); + + bus_release_resources(dev, epic_res_spec, sc->sc_res); + + EPIC_LOCK_DESTROY(sc); + + return (0); +} + +static void +epic_led_alert(void *arg, int onoff) +{ + struct epic_softc *sc; + + sc = (struct epic_softc *)arg; + + EPIC_LOCK(sc); + EPIC_FW_LED_WRITE(sc, EPIC_LED_STATE0, EPIC_LED_ALERT_MASK, + onoff ? EPIC_LED_ALERT_ON : EPIC_LED_ALERT_OFF); + EPIC_UNLOCK(sc); +} + +static void +epic_led_power(void *arg, int onoff) +{ + struct epic_softc *sc; + + sc = (struct epic_softc *)arg; + + EPIC_LOCK(sc); + EPIC_FW_LED_WRITE(sc, EPIC_LED_STATE0, EPIC_LED_POWER_MASK, + onoff ? EPIC_LED_POWER_ON : EPIC_LED_POWER_OFF); + EPIC_UNLOCK(sc); +} From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:34:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78643106566C; Fri, 15 Jan 2010 19:34:40 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66DD78FC1A; Fri, 15 Jan 2010 19:34:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FJYeBh069231; Fri, 15 Jan 2010 19:34:40 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FJYesX069228; Fri, 15 Jan 2010 19:34:40 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001151934.o0FJYesX069228@svn.freebsd.org> From: Christian Brueffer Date: Fri, 15 Jan 2010 19:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202412 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:34:40 -0000 Author: brueffer Date: Fri Jan 15 19:34:40 2010 New Revision: 202412 URL: http://svn.freebsd.org/changeset/base/202412 Log: Manpage for the siba(4) Sonic Inc. Silicon Backplane driver. Submitted by: weongyo Added: head/share/man/man4/siba.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Jan 15 19:12:34 2010 (r202411) +++ head/share/man/man4/Makefile Fri Jan 15 19:34:40 2010 (r202412) @@ -340,6 +340,7 @@ MAN= aac.4 \ ses.4 \ sf.4 \ si.4 \ + siba.4 \ sio.4 \ siis.4 \ sis.4 \ Added: head/share/man/man4/siba.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/siba.4 Fri Jan 15 19:34:40 2010 (r202412) @@ -0,0 +1,90 @@ +.\" Copyright (c) 2010 Weongyo Jeong +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 8, 2010 +.Dt SIBA 4 +.Os +.Sh NAME +.Nm siba +.Nd Sonic Inc. Silicon Backplane driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device siba" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, +place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +siba_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver supports the Sonic Inc. Silicon Backplane, the interblock +communications architecture that can be found in most Broadcom +wireless NICs. +.Pp +A bus connects all of the Silicon Backplane's functional blocks. +These functional blocks, known as cores, use the Open Core Protocol +(OCP) interface to communicate with agents attached to the Silicon +Backplane. +.Pp +Each NIC uses a chip from the same chip family. +Each member of the family contains a different set of cores, but +shares basic architectural features such as address space definition, +interrupt and error architecture, and backplane register definitions. +.Pp +Each core can have an initiator agent that passes read and write +requests onto the system backplane and a target agent that returns +responses to those requests. +Not all cores contain both an initiator and a target agent. +Initiator agents are present in cores that contain +host interfaces (PCI, PCMCIA), embedded processors (MIPS), +or DMA processors associated with communications cores. +.Pp +All cores other than PCMCIA have a target agent. +.Sh SEE ALSO +.Xr bwn 4 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Bruce M. Simpson +.Aq bms@FreeBSD.org +and +.An Weongyo Jeong +.Aq weongyo@FreeBSD.org . +.Sh CAVEATS +Host mode is not supported at this moment. From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:42:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A86BB106566C; Fri, 15 Jan 2010 19:42:09 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96BBA8FC13; Fri, 15 Jan 2010 19:42:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FJg9hH071048; Fri, 15 Jan 2010 19:42:09 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FJg9SN071046; Fri, 15 Jan 2010 19:42:09 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001151942.o0FJg9SN071046@svn.freebsd.org> From: Christian Brueffer Date: Fri, 15 Jan 2010 19:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202413 - stable/8/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:42:09 -0000 Author: brueffer Date: Fri Jan 15 19:42:09 2010 New Revision: 202413 URL: http://svn.freebsd.org/changeset/base/202413 Log: MFC: r201836 Remove unnecessary quoting and markup, add missing punctuation. Modified: stable/8/lib/libc/stdio/getc.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/stdio/getc.3 ============================================================================== --- stable/8/lib/libc/stdio/getc.3 Fri Jan 15 19:34:40 2010 (r202412) +++ stable/8/lib/libc/stdio/getc.3 Fri Jan 15 19:42:09 2010 (r202413) @@ -56,7 +56,7 @@ .Ft int .Fn getchar void .Ft int -.Fn getchar_unlocked "void" +.Fn getchar_unlocked void .Ft int .Fn getw "FILE *stream" .Sh DESCRIPTION @@ -141,7 +141,7 @@ until the condition is cleared with .Sh STANDARDS The .Fn fgetc , -.Fn getc +.Fn getc , and .Fn getchar functions @@ -167,4 +167,3 @@ The size and byte order of an varies from one machine to another, and .Fn getw is not recommended for portable applications. -.Pp From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:44:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B1F7106566C; Fri, 15 Jan 2010 19:44:40 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 897C28FC1B; Fri, 15 Jan 2010 19:44:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FJie9h071665; Fri, 15 Jan 2010 19:44:40 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FJieSV071663; Fri, 15 Jan 2010 19:44:40 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001151944.o0FJieSV071663@svn.freebsd.org> From: Christian Brueffer Date: Fri, 15 Jan 2010 19:44:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202414 - stable/7/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:44:40 -0000 Author: brueffer Date: Fri Jan 15 19:44:40 2010 New Revision: 202414 URL: http://svn.freebsd.org/changeset/base/202414 Log: MFC: r201836 Remove unnecessary quoting and markup, add missing punctuation. Modified: stable/7/lib/libc/stdio/getc.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/stdio/getc.3 ============================================================================== --- stable/7/lib/libc/stdio/getc.3 Fri Jan 15 19:42:09 2010 (r202413) +++ stable/7/lib/libc/stdio/getc.3 Fri Jan 15 19:44:40 2010 (r202414) @@ -56,7 +56,7 @@ .Ft int .Fn getchar void .Ft int -.Fn getchar_unlocked "void" +.Fn getchar_unlocked void .Ft int .Fn getw "FILE *stream" .Sh DESCRIPTION @@ -141,7 +141,7 @@ until the condition is cleared with .Sh STANDARDS The .Fn fgetc , -.Fn getc +.Fn getc , and .Fn getchar functions @@ -167,4 +167,3 @@ The size and byte order of an varies from one machine to another, and .Fn getw is not recommended for portable applications. -.Pp From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:48:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 649CC106566B; Fri, 15 Jan 2010 19:48:14 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52DFB8FC16; Fri, 15 Jan 2010 19:48:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FJmEbf072517; Fri, 15 Jan 2010 19:48:14 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FJmEOX072515; Fri, 15 Jan 2010 19:48:14 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001151948.o0FJmEOX072515@svn.freebsd.org> From: Christian Brueffer Date: Fri, 15 Jan 2010 19:48:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202415 - stable/6/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:48:14 -0000 Author: brueffer Date: Fri Jan 15 19:48:14 2010 New Revision: 202415 URL: http://svn.freebsd.org/changeset/base/202415 Log: MFC: r201836 Remove unnecessary quoting and markup, add missing punctuation. Modified: stable/6/lib/libc/stdio/getc.3 Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/stdio/getc.3 ============================================================================== --- stable/6/lib/libc/stdio/getc.3 Fri Jan 15 19:44:40 2010 (r202414) +++ stable/6/lib/libc/stdio/getc.3 Fri Jan 15 19:48:14 2010 (r202415) @@ -60,7 +60,7 @@ .Ft int .Fn getchar .Ft int -.Fn getchar_unlocked "void" +.Fn getchar_unlocked void .Ft int .Fn getw "FILE *stream" .Sh DESCRIPTION @@ -145,7 +145,7 @@ until the condition is cleared with .Sh STANDARDS The .Fn fgetc , -.Fn getc +.Fn getc , and .Fn getchar functions @@ -171,4 +171,3 @@ The size and byte order of an varies from one machine to another, and .Fn getw is not recommended for portable applications. -.Pp From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:53:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF5C6106566C; Fri, 15 Jan 2010 19:53:36 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDCD68FC17; Fri, 15 Jan 2010 19:53:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FJraQI073729; Fri, 15 Jan 2010 19:53:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FJraT8073727; Fri, 15 Jan 2010 19:53:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001151953.o0FJraT8073727@svn.freebsd.org> From: Christian Brueffer Date: Fri, 15 Jan 2010 19:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202416 - stable/8/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:53:37 -0000 Author: brueffer Date: Fri Jan 15 19:53:36 2010 New Revision: 202416 URL: http://svn.freebsd.org/changeset/base/202416 Log: MFC: r202159 Remove useless .TE groff macro. Modified: stable/8/lib/libelf/elf.3 Directory Properties: stable/8/lib/libelf/ (props changed) Modified: stable/8/lib/libelf/elf.3 ============================================================================== --- stable/8/lib/libelf/elf.3 Fri Jan 15 19:48:14 2010 (r202415) +++ stable/8/lib/libelf/elf.3 Fri Jan 15 19:53:36 2010 (r202416) @@ -379,7 +379,6 @@ See .It Dv SHT_SUNW_move Ta Dv ELF_T_MOVE Ta ELF move records. .It Dv SHT_SUNW_syminfo Ta Dv ELF_T_SYMINFO Ta Additional symbol flags. .El -.TE .Ss Functional Grouping This section contains a brief overview of the available functionality in the ELF library. From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:54:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 498BD1065693; Fri, 15 Jan 2010 19:54:13 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37EF88FC32; Fri, 15 Jan 2010 19:54:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FJsDAd073908; Fri, 15 Jan 2010 19:54:13 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FJsDn1073906; Fri, 15 Jan 2010 19:54:13 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001151954.o0FJsDn1073906@svn.freebsd.org> From: Christian Brueffer Date: Fri, 15 Jan 2010 19:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202417 - stable/7/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:54:13 -0000 Author: brueffer Date: Fri Jan 15 19:54:12 2010 New Revision: 202417 URL: http://svn.freebsd.org/changeset/base/202417 Log: MFC: r202159 Remove useless .TE groff macro. Modified: stable/7/lib/libelf/elf.3 Directory Properties: stable/7/lib/libelf/ (props changed) Modified: stable/7/lib/libelf/elf.3 ============================================================================== --- stable/7/lib/libelf/elf.3 Fri Jan 15 19:53:36 2010 (r202416) +++ stable/7/lib/libelf/elf.3 Fri Jan 15 19:54:12 2010 (r202417) @@ -379,7 +379,6 @@ See .It Dv SHT_SUNW_move Ta Dv ELF_T_MOVE Ta ELF move records. .It Dv SHT_SUNW_syminfo Ta Dv ELF_T_SYMINFO Ta Additional symbol flags. .El -.TE .Ss Functional Grouping This section contains a brief overview of the available functionality in the ELF library. From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 19:54:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A567810656FD; Fri, 15 Jan 2010 19:54:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 52E528FC36; Fri, 15 Jan 2010 19:54:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o0FJlPCH035384; Fri, 15 Jan 2010 12:47:25 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 15 Jan 2010 12:48:09 -0700 (MST) Message-Id: <20100115.124809.21010533849792633.imp@bsdimp.com> To: xcllnt@mac.com From: "M. Warner Losh" In-Reply-To: References: <20100115.110528.849557997928257031.imp@bsdimp.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: dougb@freebsd.org, svn-src-all@freebsd.org, wkoszek@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, brde@optusnet.com.au, freebsd-arch@freebsd.org, svn-src-head@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 19:54:18 -0000 In message: Marcel Moolenaar writes: : : On Jan 15, 2010, at 10:05 AM, M. Warner Losh wrote: : > : Is this really so hard? : > : > Yes. Didn't you read the message I posted about why this is hard? : : No, I didn't. : : > There would be a ton of lexer and parser work to make this happen, as : > well as a lot of work to internal data structures to keep the file as : > parsed, rather than as convenient to do config's job. It is a big : > pita. : : PITA != hard. If we're not willing to put in the effort to fix : something, I don't think we should call it hard to do. We should : call it like it is: non-trivial, involved or significant. Heck, : we can even call it a major undertaking. But hard? No, I don't : think it's hard at all. Agreed. But having retrofitted grammars in the past, coupled with the fact that config doesn't create a proper parse tree means we'd be rewriting huge portions of config, almost a complete rewrite from scratch, I'd say, would be necessary. And then you've sunk a huge amount of time into solving a tiny problem. Rewriting config should produce more benefits than just this one problem. That's why I called it hard. : > I think the way forward isn't as you suggest. : : Fine. Just stop trying to classify people as a basis for what : behaviour we should implement. It never works... Actually, engineering is all about identifying classes of users, and showing that solutions map well onto those classes of users. In showing which classes of users the solutions works well for, we can also find holes in the current setup. : > If : > we really make it include everything, then -C can go away, the weird : > pseudo thing we have can go away, and we know get everything. And it : > is easy to implement... : > : > Comments? : : How does this address the "I don't want everything, I just want : my CVS keyword" example? How does it handle the delicate balance : between space vs. functionality that exists on embedded and/or : low-end platforms. An all inclusive implementation seems not to : take that into account that well. Sure, you can compress but : then you add a runtime overhead to uncompress. I don't understand the "I just want my CVS keywords expanded" example. I think that's an orthogonal problem entirely (and maybe a small bug-fix to config to include an ident keyword if people really want the config file saved). The CVS keywords for the rest of the kernel are controlled by sys/cdefs, which creates .ident lines which the toolchain is responsible for keeping or ditching. Embedded platforms wouldn't embed the whole config file at all, so I don't see what we do for platforms that aren't resource sensitive would matter here. But all the includes is only 14k on amd64 and i386 (our biggest config file platforms). These particular config files compress down to about 6k. Embedded config files tend to be even smaller, and would likely compress down to about 1.5k-2k (AR71XX is 1.3k without the extra included files). Since the kernel is itself compressed, we wouldn't have to worry too much about it. So even in embedded, the resources consumed are small. : In any case: I personally don't use the option so I really should : not get involved. If I were to implement something from scratch : though, I would treat it as a C file: the config file is the source : and you "compile" it into a binary form suitable for inclusion into : the kernel and you have compile-time options that control the binary : output. No comments will be included in that case and there will be : no option for it. But that's just me... That's basically what's implemented to day: we're but a whisper away from a pure binary for (no -C)... Warner From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 20:08:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F9361065696; Fri, 15 Jan 2010 20:08:08 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EA118FC15; Fri, 15 Jan 2010 20:08:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FK88Ju077025; Fri, 15 Jan 2010 20:08:08 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FK88I7077023; Fri, 15 Jan 2010 20:08:08 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201001152008.o0FK88I7077023@svn.freebsd.org> From: Matt Jacob Date: Fri, 15 Jan 2010 20:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202418 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 20:08:08 -0000 Author: mjacob Date: Fri Jan 15 20:08:08 2010 New Revision: 202418 URL: http://svn.freebsd.org/changeset/base/202418 Log: Amazingly we've been freeing a handle and using that which it refers to for years. Bad! MFC after: 1 week Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Fri Jan 15 19:54:12 2010 (r202417) +++ head/sys/dev/isp/isp.c Fri Jan 15 20:08:08 2010 (r202418) @@ -5185,7 +5185,6 @@ again: ISP_WRITE(isp, isp->isp_respoutrp, optr); continue; } - isp_destroy_handle(isp, sp->req_handle); if (req_status_flags & RQSTF_BUS_RESET) { XS_SETERR(xs, HBA_BUSRESET); ISP_SET_SENDMARKER(isp, XS_CHANNEL(xs), 1); @@ -5321,6 +5320,7 @@ again: if (XS_XFRLEN(xs)) { ISP_DMAFREE(isp, xs, sp->req_handle); } + isp_destroy_handle(isp, sp->req_handle); if (((isp->isp_dblev & (ISP_LOGDEBUG1|ISP_LOGDEBUG2|ISP_LOGDEBUG3))) || ((isp->isp_dblev & ISP_LOGDEBUG0) && ((!XS_NOERR(xs)) || From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 20:37:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 971F7106566B; Fri, 15 Jan 2010 20:37:37 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout023.mac.com (asmtpout023.mac.com [17.148.16.98]) by mx1.freebsd.org (Postfix) with ESMTP id 79C158FC18; Fri, 15 Jan 2010 20:37:37 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp023.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KWB006JR2MM3440@asmtp023.mac.com>; Fri, 15 Jan 2010 12:37:35 -0800 (PST) From: Marcel Moolenaar In-reply-to: <20100115.124809.21010533849792633.imp@bsdimp.com> Date: Fri, 15 Jan 2010 12:37:34 -0800 Message-id: <86DE85B0-2556-48A3-8AB0-C4969823A93E@mac.com> References: <20100115.110528.849557997928257031.imp@bsdimp.com> <20100115.124809.21010533849792633.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1077) Cc: dougb@freebsd.org, svn-src-all@freebsd.org, wkoszek@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, brde@optusnet.com.au, freebsd-arch@freebsd.org, svn-src-head@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 20:37:37 -0000 On Jan 15, 2010, at 11:48 AM, M. Warner Losh wrote: > : PITA != hard. If we're not willing to put in the effort to fix > : something, I don't think we should call it hard to do. We should > : call it like it is: non-trivial, involved or significant. Heck, > : we can even call it a major undertaking. But hard? No, I don't > : think it's hard at all. > > Agreed. But having retrofitted grammars in the past, coupled with the > fact that config doesn't create a proper parse tree means we'd be > rewriting huge portions of config, almost a complete rewrite from > scratch, I'd say, would be necessary. And then you've sunk a huge > amount of time into solving a tiny problem. Rewriting config should > produce more benefits than just this one problem. That's why I called > it hard. Yes. I do believe that it's a "big job" and it's fair to ask whether it's worth. > : How does this address the "I don't want everything, I just want > : my CVS keyword" example? *snip* > I don't understand the "I just want my CVS keywords expanded" > example. The inspiration came from Peter Jeremy's email in this thread. -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 21:45:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 478BA106566B; Fri, 15 Jan 2010 21:45:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33F568FC16; Fri, 15 Jan 2010 21:45:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FLjlTv098532; Fri, 15 Jan 2010 21:45:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FLjlGI098526; Fri, 15 Jan 2010 21:45:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001152145.o0FLjlGI098526@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 21:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202419 - in stable/8/sys: conf sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 21:45:47 -0000 Author: marius Date: Fri Jan 15 21:45:46 2010 New Revision: 202419 URL: http://svn.freebsd.org/changeset/base/202419 Log: MFC: r201052, r201200, r202003, r202010, r202023 Add a driver for the `Fire' JBus to PCIe bridges found in at least the Sun Fire V215/V245 and Sun Ultra 25/45 machines. This driver also already includes all the code to support the `Oberon' Uranus to PCIe bridges found in the Fujitsu-Siemens based Mx000 machines but due to lack of access to such a system for testing, probing of these bridges is currently disabled. Unfortunately, the event queue mechanism of these bridges for MSIs/ MSI-Xs matches our current MD and MI interrupt frameworks like square pegs fit into round holes so for now we are generous and use one event queue per MSI, which limits us to 35 MSIs/MSI-Xs per Host-PCIe-bridge (we use one event queue for the PCIe error messages). This seems tolerable as long as most devices just use one MSI/MSI-X anyway. Adding knowledge about MSIs/MSI-Xs to the MD interrupt code should allow us to decouple the 1:1 mapping at the cost of no longer being able to bind MSIs/MSI-Xs to specific CPUs as we currently have no reliable way to quiesce a device during the transition of its MSIs/ MSI-Xs to another event queue. This would still require the problem of interrupt storms generated by devices which have no one-shot behavior or can't/don't mask interrupts while the filter/handler is executed (like the older PCIe NICs supported by bge(4)) to be solved though. Added: stable/8/sys/sparc64/pci/fire.c - copied, changed from r201052, head/sys/sparc64/pci/fire.c stable/8/sys/sparc64/pci/firereg.h - copied unchanged from r201052, head/sys/sparc64/pci/firereg.h stable/8/sys/sparc64/pci/firevar.h - copied unchanged from r201052, head/sys/sparc64/pci/firevar.h Modified: stable/8/sys/conf/files.sparc64 stable/8/sys/conf/options.sparc64 Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files.sparc64 ============================================================================== --- stable/8/sys/conf/files.sparc64 Fri Jan 15 20:08:08 2010 (r202418) +++ stable/8/sys/conf/files.sparc64 Fri Jan 15 21:45:46 2010 (r202419) @@ -75,6 +75,7 @@ sparc64/isa/isa.c optional isa sparc64/isa/isa_dma.c optional isa sparc64/isa/ofw_isa.c optional ebus | isa sparc64/pci/apb.c optional pci +sparc64/pci/fire.c optional pci sparc64/pci/ofw_pcib.c optional pci sparc64/pci/ofw_pcib_subr.c optional pci sparc64/pci/ofw_pcibus.c optional pci Modified: stable/8/sys/conf/options.sparc64 ============================================================================== --- stable/8/sys/conf/options.sparc64 Fri Jan 15 20:08:08 2010 (r202418) +++ stable/8/sys/conf/options.sparc64 Fri Jan 15 21:45:46 2010 (r202419) @@ -8,6 +8,8 @@ SUN4U opt_global.h ATKBD_DFLT_KEYMAP opt_atkbd.h +FIRE_DEBUG opt_fire.h + # Debug IOMMU inserts/removes using diagnostic accesses. This is very loud. IOMMU_DIAG opt_iommu.h Copied and modified: stable/8/sys/sparc64/pci/fire.c (from r201052, head/sys/sparc64/pci/fire.c) ============================================================================== --- head/sys/sparc64/pci/fire.c Sun Dec 27 16:55:44 2009 (r201052, copy source) +++ stable/8/sys/sparc64/pci/fire.c Fri Jan 15 21:45:46 2010 (r202419) @@ -83,6 +83,8 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" +struct fire_msiqarg; + static bus_space_tag_t fire_alloc_bus_tag(struct fire_softc *sc, int type); static const struct fire_desc *fire_get_desc(device_t dev); static void fire_dmamap_sync(bus_dma_tag_t dt __unused, bus_dmamap_t map, @@ -94,6 +96,9 @@ static void fire_intr_clear(void *arg); static void fire_intr_disable(void *arg); static void fire_intr_enable(void *arg); static int fire_intr_register(struct fire_softc *sc, u_int ino); +static inline void fire_msiq_common(struct intr_vector *iv, + struct fire_msiqarg *fmqa); +static void fire_msiq_filter(void *cookie); static void fire_msiq_handler(void *cookie); static void fire_set_intr(struct fire_softc *sc, u_int index, u_int ino, driver_filter_t handler, void *arg); @@ -184,6 +189,13 @@ struct fire_icarg { bus_addr_t fica_clr; }; +static const struct intr_controller fire_msiqc_filter = { + fire_intr_enable, + fire_intr_disable, + fire_intr_assign, + NULL +}; + struct fire_msiqarg { struct fire_icarg fmqa_fica; struct mtx fmqa_mtx; @@ -290,7 +302,7 @@ fire_attach(device_t dev) uint64_t ino_bitmap, val; phandle_t node; uint32_t prop, prop_array[2]; - int i, j, mode, nrange; + int i, j, mode; u_int lw; uint16_t mps; @@ -725,13 +737,12 @@ fire_attach(device_t dev) rman_manage_region(&sc->sc_pci_mem_rman, 0, FO_MEM_SIZE) != 0) panic("%s: failed to set up memory rman", __func__); - nrange = OF_getprop_alloc(node, "ranges", sizeof(*range), - (void **)&range); + i = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range); /* * Make sure that the expected ranges are present. The * OFW_PCI_CS_MEM64 one is not currently used though. */ - if (nrange != FIRE_NRANGE) + if (i != FIRE_NRANGE) panic("%s: unsupported number of ranges", __func__); /* * Find the addresses of the various bus spaces. @@ -743,7 +754,7 @@ fire_attach(device_t dev) j = OFW_PCI_RANGE_CS(&range[i]); if (sc->sc_pci_bh[j] != 0) panic("%s: duplicate range for space %d", - __func__, j); + __func__, j); sc->sc_pci_bh[j] = OFW_PCI_RANGE_PHYS(&range[i]); } free(range, M_OFWPROP); @@ -1612,7 +1623,7 @@ fire_intr_clear(void *arg) */ static int -fire_alloc_msi(device_t dev, device_t child, int count, int maxcount, +fire_alloc_msi(device_t dev, device_t child, int count, int maxcount __unused, int *irqs) { struct fire_softc *sc; @@ -1638,16 +1649,11 @@ fire_alloc_msi(device_t dev, device_t ch mtx_unlock(&sc->sc_msi_mtx); return (ENXIO); } - /* - * It's unclear whether we need to actually align the MSIs in the - * mapping table based on the maxcount or just the count. We use - * maxcount to be on the safe side. - */ - for (i = 0; i + maxcount < sc->sc_msi_count; i += maxcount) { - for (j = i; j < i + maxcount; j++) + for (i = 0; i + count < sc->sc_msi_count; i += count) { + for (j = i; j < i + count; j++) if (isclr(sc->sc_msi_bitmap, j) == 0) break; - if (j == i + maxcount) { + if (j == i + count) { for (j = 0; j < count; j++) { setbit(sc->sc_msiq_bitmap, msiqrun + j); setbit(sc->sc_msi_bitmap, i + j); @@ -1766,33 +1772,67 @@ fire_msiq_handler(void *cookie) { struct intr_vector *iv; struct fire_msiqarg *fmqa; - struct fire_softc *sc; - struct fo_msiq_record *qrec; - device_t dev; - uint64_t word0; - u_int head, msi, msiq; iv = cookie; fmqa = iv->iv_icarg; - sc = fmqa->fmqa_fica.fica_sc; - dev = sc->sc_dev; - msiq = fmqa->fmqa_msiq; /* * Note that since fire_intr_clear() will clear the event queue - * interrupt after the filter/handler associated with the MSI [sic] - * has been executed we have to protect the access to the event queue - * as otherwise nested event queue interrupts cause corruption of the + * interrupt after the handler associated with the MSI [sic] has + * been executed we have to protect the access to the event queue as + * otherwise nested event queue interrupts cause corruption of the * event queue on MP machines. Obviously especially when abandoning * the 1:1 mapping it would be better to not clear the event queue - * interrupt after each filter/handler invocation but only once when - * the outstanding MSIs have been processed but unfortunately that + * interrupt after each handler invocation but only once when the + * outstanding MSIs have been processed but unfortunately that * doesn't work well and leads to interrupt storms with controllers/ - * drivers which don't mask interrupts while the filter/handler is - * executed. Maybe delaying clearing the MSI until after the filter/ - * handler has been executed could be used to work around this but - * that's not the intended usage and might in turn cause lost MSIs. + * drivers which don't mask interrupts while the handler is executed. + * Maybe delaying clearing the MSI until after the handler has been + * executed could be used to work around this but that's not the + * intended usage and might in turn cause lost MSIs. */ mtx_lock_spin(&fmqa->fmqa_mtx); + fire_msiq_common(iv, fmqa); + mtx_unlock_spin(&fmqa->fmqa_mtx); +} + +static void +fire_msiq_filter(void *cookie) +{ + struct intr_vector *iv; + struct fire_msiqarg *fmqa; + + iv = cookie; + fmqa = iv->iv_icarg; + /* + * For filters we don't use fire_intr_clear() since it would clear + * the event queue interrupt while we're still processing the event + * queue as filters and associated post-filter handler are executed + * directly, which in turn would lead to lost MSIs. So we clear the + * event queue interrupt only once after processing the event queue. + * Given that this still guarantees the filters to not be executed + * concurrently and no other CPU can clear the event queue interrupt + * while the event queue is still processed, we don't even need to + * interlock the access to the event queue in this case. + */ + critical_enter(); + fire_msiq_common(iv, fmqa); + FIRE_PCI_WRITE_8(fmqa->fmqa_fica.fica_sc, fmqa->fmqa_fica.fica_clr, + INTCLR_IDLE); + critical_exit(); +} + +static inline void +fire_msiq_common(struct intr_vector *iv, struct fire_msiqarg *fmqa) +{ + struct fire_softc *sc; + struct fo_msiq_record *qrec; + device_t dev; + uint64_t word0; + u_int head, msi, msiq; + + sc = fmqa->fmqa_fica.fica_sc; + dev = sc->sc_dev; + msiq = fmqa->fmqa_msiq; head = (FIRE_PCI_READ_8(sc, fmqa->fmqa_head) & FO_PCI_EQ_HD_MASK) >> FO_PCI_EQ_HD_SHFT; qrec = &fmqa->fmqa_base[head]; @@ -1834,7 +1874,6 @@ fire_msiq_handler(void *cookie) FIRE_PCI_READ_8(sc, FO_PCI_EQ_CTRL_CLR_BASE + msiq) | FO_PCI_EQ_CTRL_CLR_COVERR); } - mtx_unlock_spin(&fmqa->fmqa_mtx); } static int @@ -1843,6 +1882,7 @@ fire_setup_intr(device_t dev, device_t c void **cookiep) { struct fire_softc *sc; + struct fire_msiqarg *fmqa; u_long vec; int error; u_int msi, msiq; @@ -1873,31 +1913,39 @@ fire_setup_intr(device_t dev, device_t c intr, arg, cookiep); rman_set_start(ires, msi); rman_set_end(ires, msi); - if (error == 0) { + if (error != 0) + return (error); + fmqa = intr_vectors[vec].iv_icarg; + /* + * XXX inject our event queue handler. + */ + if (filt != NULL) { + intr_vectors[vec].iv_func = fire_msiq_filter; + intr_vectors[vec].iv_ic = &fire_msiqc_filter; /* - * XXX inject our event queue handler. + * Ensure the event queue interrupt is cleared, it + * might have triggered before. Given we supply NULL + * as ic_clear, inthand_add() won't do this for us. */ + FIRE_PCI_WRITE_8(sc, fmqa->fmqa_fica.fica_clr, + INTCLR_IDLE); + } else intr_vectors[vec].iv_func = fire_msiq_handler; - /* - * Record the MSI/MSI-X as long as we we use a 1:1 - * mapping. - */ - ((struct fire_msiqarg *)intr_vectors[vec].iv_icarg)-> - fmqa_msi = msi; - FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_CTRL_SET_BASE + - (msiq << 3), FO_PCI_EQ_CTRL_SET_EN); - msi <<= 3; - FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, - (FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) & - ~FO_PCI_MSI_MAP_EQNUM_MASK) | - ((msiq << FO_PCI_MSI_MAP_EQNUM_SHFT) & - FO_PCI_MSI_MAP_EQNUM_MASK)); - FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_CLR_BASE + msi, - FO_PCI_MSI_CLR_EQWR_N); - FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, - FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) | - FO_PCI_MSI_MAP_V); - } + /* Record the MSI/MSI-X as long as we we use a 1:1 mapping. */ + fmqa->fmqa_msi = msi; + FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_CTRL_SET_BASE + (msiq << 3), + FO_PCI_EQ_CTRL_SET_EN); + msi <<= 3; + FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, + (FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) & + ~FO_PCI_MSI_MAP_EQNUM_MASK) | + ((msiq << FO_PCI_MSI_MAP_EQNUM_SHFT) & + FO_PCI_MSI_MAP_EQNUM_MASK)); + FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_CLR_BASE + msi, + FO_PCI_MSI_CLR_EQWR_N); + FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, + FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) | + FO_PCI_MSI_MAP_V); return (error); } @@ -1946,14 +1994,16 @@ fire_teardown_intr(device_t dev, device_ (0 << FO_PCI_EQ_TL_SHFT) & FO_PCI_EQ_TL_MASK); FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_HD_BASE + msiq, (0 << FO_PCI_EQ_HD_SHFT) & FO_PCI_EQ_HD_MASK); + intr_vectors[vec].iv_ic = &fire_ic; /* * The MD interrupt code needs the vector rather than the MSI. */ rman_set_start(ires, vec); rman_set_end(ires, vec); error = bus_generic_teardown_intr(dev, child, ires, cookie); + msi >>= 3; rman_set_start(ires, msi); - rman_set_end(ires, msi >> 3); + rman_set_end(ires, msi); return (error); } return (bus_generic_teardown_intr(dev, child, ires, cookie)); @@ -2101,7 +2151,7 @@ fire_alloc_bus_tag(struct fire_softc *sc { bus_space_tag_t bt; - bt = (bus_space_tag_t)malloc(sizeof(struct bus_space_tag), M_DEVBUF, + bt = malloc(sizeof(struct bus_space_tag), M_DEVBUF, M_NOWAIT | M_ZERO); if (bt == NULL) panic("%s: out of memory", __func__); Copied: stable/8/sys/sparc64/pci/firereg.h (from r201052, head/sys/sparc64/pci/firereg.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sparc64/pci/firereg.h Fri Jan 15 21:45:46 2010 (r202419, copy of r201052, head/sys/sparc64/pci/firereg.h) @@ -0,0 +1,1004 @@ +/*- + * Copyright (c) 2009 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SPARC64_PCI_FIREREG_H_ +#define _SPARC64_PCI_FIREREG_H_ + +#define FIRE_NINTR 3 /* 2 OFW + 1 MSIq */ +#define FIRE_NRANGE 4 +#define FIRE_NREG 2 + +#define FIRE_PCI 0 +#define FIRE_CTRL 1 + +/* PCI configuration and status registers */ +#define FO_PCI_INT_MAP_BASE 0x01000 +#define FO_PCI_INT_CLR_BASE 0x01400 +#define FO_PCI_EQ_BASE_ADDR 0x10000 +#define FO_PCI_EQ_CTRL_SET_BASE 0x11000 +#define FO_PCI_EQ_CTRL_CLR_BASE 0x11200 +#define FO_PCI_EQ_TL_BASE 0x11600 +#define FO_PCI_EQ_HD_BASE 0x11800 +#define FO_PCI_MSI_MAP_BASE 0x20000 +#define FO_PCI_MSI_CLR_BASE 0x28000 +#define FO_PCI_ERR_COR 0x30000 +#define FO_PCI_ERR_NONFATAL 0x30008 +#define FO_PCI_ERR_FATAL 0x30010 +#define FO_PCI_PM_PME 0x30018 +#define FO_PCI_PME_TO_ACK 0x30020 +#define FO_PCI_IMU_INT_EN 0x31008 +#define FO_PCI_IMU_INT_STAT 0x31010 +#define FO_PCI_IMU_ERR_STAT_CLR 0x31018 +#define FO_PCI_IMU_RDS_ERR_LOG 0x31028 +#define FO_PCI_IMU_SCS_ERR_LOG 0x31030 +#define FO_PCI_IMU_EQS_ERR_LOG 0x31038 +#define FO_PCI_DMC_CORE_BLOCK_INT_EN 0x31800 +#define FO_PCI_DMC_CORE_BLOCK_ERR_STAT 0x31808 +#define FO_PCI_MULTI_CORE_ERR_STAT 0x31810 +#define FO_PCI_MSI_32_BIT_ADDR 0x34000 +#define FO_PCI_MSI_64_BIT_ADDR 0x34008 +#define FO_PCI_MMU 0x40000 +#define FO_PCI_MMU_INT_EN 0x41008 +#define FO_PCI_MMU_INT_STAT 0x41010 +#define FO_PCI_MMU_ERR_STAT_CLR 0x41018 +#define FO_PCI_MMU_TRANS_FAULT_ADDR 0x41028 +#define FO_PCI_MMU_TRANS_FAULT_STAT 0x41030 +#define FO_PCI_ILU_INT_EN 0x51008 +#define FO_PCI_ILU_INT_STAT 0x51010 +#define FO_PCI_ILU_ERR_STAT_CLR 0x51018 +#define FO_PCI_DMC_DBG_SEL_PORTA 0x53000 +#define FO_PCI_DMC_DBG_SEL_PORTB 0x53008 +#define FO_PCI_PEC_CORE_BLOCK_INT_EN 0x51800 +#define FO_PCI_PEC_CORE_BLOCK_INT_STAT 0x51808 +#define FO_PCI_TLU_CTRL 0x80000 +#define FO_PCI_TLU_OEVENT_INT_EN 0x81008 +#define FO_PCI_TLU_OEVENT_INT_STAT 0x81010 +#define FO_PCI_TLU_OEVENT_STAT_CLR 0x81018 +#define FO_PCI_TLU_RX_OEVENT_HDR1_LOG 0x81028 +#define FO_PCI_TLU_RX_OEVENT_HDR2_LOG 0x81030 +#define FO_PCI_TLU_TX_OEVENT_HDR1_LOG 0x81038 +#define FO_PCI_TLU_TX_OEVENT_HDR2_LOG 0x81040 +#define FO_PCI_TLU_DEV_CTRL 0x90008 +#define FO_PCI_TLU_LNK_CTRL 0x90020 +#define FO_PCI_TLU_LNK_STAT 0x90028 +#define FO_PCI_TLU_UERR_INT_EN 0x91008 +#define FO_PCI_TLU_UERR_INT_STAT 0x91010 +#define FO_PCI_TLU_UERR_STAT_CLR 0x91018 +#define FO_PCI_TLU_RX_UERR_HDR1_LOG 0x91028 +#define FO_PCI_TLU_RX_UERR_HDR2_LOG 0x91030 +#define FO_PCI_TLU_TX_UERR_HDR1_LOG 0x91038 +#define FO_PCI_TLU_TX_UERR_HDR2_LOG 0x91040 +#define FO_PCI_TLU_CERR_INT_EN 0xa1008 +#define FO_PCI_TLU_CERR_INT_STAT 0xa1010 +#define FO_PCI_TLU_CERR_STAT_CLR 0xa1018 +#define FO_PCI_LPU_RST 0xe2008 +#define FO_PCI_LPU_INT_STAT 0xe2040 +#define FO_PCI_LPU_INT_MASK 0xe0248 +#define FO_PCI_LPU_LNK_LYR_CFG 0xe2200 +#define FO_PCI_LPU_LNK_LYR_INT_STAT 0xe2210 +#define FO_PCI_LPU_FLW_CTRL_UPDT_CTRL 0xe2240 +#define FO_PCI_LPU_TXLNK_FREQ_LAT_TMR_THRS 0xe2400 +#define FO_PCI_LPU_TXLNK_RPLY_TMR_THRS 0xe2410 +#define FO_PCI_LPU_TXLNK_RTR_FIFO_PTR 0xe2430 +#define FO_PCI_LPU_PHY_LYR_INT_STAT 0xe2610 +#define FO_PCI_LPU_LTSSM_CFG2 0xe2788 +#define FO_PCI_LPU_LTSSM_CFG3 0xe2790 +#define FO_PCI_LPU_LTSSM_CFG4 0xe2798 +#define FO_PCI_LPU_LTSSM_CFG5 0xe27a0 + +/* PCI interrupt mapping registers */ +#define FO_PCI_IMAP_MDO_MODE 0x8000000000000000ULL +#define FO_PCI_IMAP_V 0x0000000080000000ULL +#define FIRE_PCI_IMAP_T_JPID_MASK 0x000000007c000000ULL +#define FIRE_PCI_IMAP_T_JPID_SHFT 26 +#define OBERON_PCI_IMAP_T_DESTID_MASK 0x000000007fe00000ULL +#define OBERON_PCI_IMAP_T_DESTID_SHFT 21 +#define FO_PCI_IMAP_INT_CTRL_NUM_MASK 0x00000000000003c0ULL +#define FO_PCI_IMAP_INT_CTRL_NUM_SHFT 6 + +/* PCI interrupt clear registers - use INTCLR_* from */ + +/* PCI event queue base address register */ +#define FO_PCI_EQ_BASE_ADDR_BYPASS 0xfffc000000000000ULL +#define FO_PCI_EQ_BASE_ADDR_MASK 0xfffffffffff80000ULL +#define FO_PCI_EQ_BASE_ADDR_SHFT 19 + +/* PCI event queue control set registers */ +#define FO_PCI_EQ_CTRL_SET_ENOVERR 0x0200000000000000ULL +#define FO_PCI_EQ_CTRL_SET_EN 0x0000100000000000ULL + +/* PCI event queue control clear registers */ +#define FO_PCI_EQ_CTRL_CLR_COVERR 0x0200000000000000ULL +#define FO_PCI_EQ_CTRL_CLR_E2I 0x0000800000000000ULL +#define FO_PCI_EQ_CTRL_CLR_DIS 0x0000100000000000ULL + +/* PCI event queue tail registers */ +#define FO_PCI_EQ_TL_OVERR 0x0200000000000000ULL +#define FO_PCI_EQ_TL_MASK 0x000000000000007fULL +#define FO_PCI_EQ_TL_SHFT 0 + +/* PCI event queue head registers */ +#define FO_PCI_EQ_HD_MASK 0x000000000000007fULL +#define FO_PCI_EQ_HD_SHFT 0 + +/* PCI MSI mapping registers */ +#define FO_PCI_MSI_MAP_V 0x8000000000000000ULL +#define FO_PCI_MSI_MAP_EQWR_N 0x4000000000000000ULL +#define FO_PCI_MSI_MAP_EQNUM_MASK 0x000000000000003fULL +#define FO_PCI_MSI_MAP_EQNUM_SHFT 0 + +/* PCI MSI clear registers */ +#define FO_PCI_MSI_CLR_EQWR_N 0x4000000000000000ULL + +/* + * PCI IMU interrupt enable, interrupt status and error status clear + * registers + */ +#define FO_PCI_IMU_ERR_INT_SPARE_S_MASK 0x00007c0000000000ULL +#define FO_PCI_IMU_ERR_INT_SPARE_S_SHFT 42 +#define FO_PCI_IMU_ERR_INT_EQ_OVER_S 0x0000020000000000ULL +#define FO_PCI_IMU_ERR_INT_EQ_NOT_EN_S 0x0000010000000000ULL +#define FO_PCI_IMU_ERR_INT_MSI_MAL_ERR_S 0x0000008000000000ULL +#define FO_PCI_IMU_ERR_INT_MSI_PAR_ERR_S 0x0000004000000000ULL +#define FO_PCI_IMU_ERR_INT_PMEACK_MES_NOT_EN_S 0x0000002000000000ULL +#define FO_PCI_IMU_ERR_INT_PMPME_MES_NOT_EN_S 0x0000001000000000ULL +#define FO_PCI_IMU_ERR_INT_FATAL_MES_NOT_EN_S 0x0000000800000000ULL +#define FO_PCI_IMU_ERR_INT_NFATAL_MES_NOT_EN_S 0x0000000400000000ULL +#define FO_PCI_IMU_ERR_INT_COR_MES_NOT_EN_S 0x0000000200000000ULL +#define FO_PCI_IMU_ERR_INT_MSI_NOT_EN_S 0x0000000100000000ULL +#define FO_PCI_IMU_ERR_INT_SPARE_P_MASK 0x0000000000007c00ULL +#define FO_PCI_IMU_ERR_INT_SPARE_P_SHFT 10 +#define FO_PCI_IMU_ERR_INT_EQ_OVER_P 0x0000000000000200ULL +#define FO_PCI_IMU_ERR_INT_EQ_NOT_EN_P 0x0000000000000100ULL +#define FO_PCI_IMU_ERR_INT_MSI_MAL_ERR_P 0x0000000000000080ULL +#define FO_PCI_IMU_ERR_INT_MSI_PAR_ERR_P 0x0000000000000040ULL +#define FO_PCI_IMU_ERR_INT_PMEACK_MES_NOT_EN_P 0x0000000000000020ULL +#define FO_PCI_IMU_ERR_INT_PMPME_MES_NOT_EN_P 0x0000000000000010ULL +#define FO_PCI_IMU_ERR_INT_FATAL_MES_NOT_EN_P 0x0000000000000008ULL +#define FO_PCI_IMU_ERR_INT_NFATAL_MES_NOT_EN_P 0x0000000000000004ULL +#define FO_PCI_IMU_ERR_INT_COR_MES_NOT_EN_P 0x0000000000000002ULL +#define FO_PCI_IMU_ERR_INT_MSI_NOT_EN_P 0x0000000000000001ULL + +/* PCI IMU RDS error log register */ +#define FO_PCI_IMU_RDS_ERR_LOG_TYPE_MASK 0xfc00000000000000ULL +#define FO_PCI_IMU_RDS_ERR_LOG_TYPE_SHFT 58 +#define FO_PCI_IMU_RDS_ERR_LOG_LENGTH_MASK 0x03ff000000000000ULL +#define FO_PCI_IMU_RDS_ERR_LOG_LENGTH_SHFT 48 +#define FO_PCI_IMU_RDS_ERR_LOG_REQ_ID_MASK 0x0000ffff00000000ULL +#define FO_PCI_IMU_RDS_ERR_LOG_REQ_ID_SHFT 32 +#define FO_PCI_IMU_RDS_ERR_LOG_TLP_TAG_MASK 0x00000000ff000000ULL +#define FO_PCI_IMU_RDS_ERR_LOG_TLP_TAG_SHFT 24 +#define FO_PCI_IMU_RDS_ERR_LOG_BE_MCODE_MASK 0x0000000000ff0000ULL +#define FO_PCI_IMU_RDS_ERR_LOG_BE_MCODE_SHFT 16 +#define FO_PCI_IMU_RDS_ERR_LOG_MSI_DATA_MASK 0x000000000000ffffULL +#define FO_PCI_IMU_RDS_ERR_LOG_MSI_DATA_SHFT 0 + +/* PCI IMU SCS error log register */ +#define FO_PCI_IMU_SCS_ERR_LOG_TYPE_MASK 0xfc00000000000000ULL +#define FO_PCI_IMU_SCS_ERR_LOG_TYPE_SHFT 58 +#define FO_PCI_IMU_SCS_ERR_LOG_LENGTH_MASK 0x03ff000000000000ULL +#define FO_PCI_IMU_SCS_ERR_LOG_LENGTH_SHFT 48 +#define FO_PCI_IMU_SCS_ERR_LOG_REQ_ID_MASK 0x0000ffff00000000ULL +#define FO_PCI_IMU_SCS_ERR_LOG_REQ_ID_SHFT 32 +#define FO_PCI_IMU_SCS_ERR_LOG_TLP_TAG_MASK 0x00000000ff000000ULL +#define FO_PCI_IMU_SCS_ERR_LOG_TLP_TAG_SHFT 24 +#define FO_PCI_IMU_SCS_ERR_LOG_BE_MODE_MASK 0x0000000000ff0000ULL +#define FO_PCI_IMU_SCS_ERR_LOG_BE_MCODE_SHFT 16 +#define FO_PCI_IMU_SCS_ERR_LOG_EQ_NUM_MASK 0x000000000000003fULL +#define FO_PCI_IMU_SCS_ERR_LOG_EQ_NUM_SHFT 0 + +/* PCI IMU EQS error log register */ +#define FO_PCI_IMU_EQS_ERR_LOG_EQ_NUM_MASK 0x000000000000003fULL +#define FO_PCI_IMU_EQS_ERROR_LOG_EQ_NUM_SHFT 0 + +/* + * PCI ERR COR, ERR NONFATAL, ERR FATAL, PM PME and PME To ACK mapping + * registers + */ +#define FO_PCI_ERR_PME_V 0x8000000000000000ULL +#define FO_PCI_ERR_PME_EQNUM_MASK 0x000000000000003fULL +#define FO_PCI_ERR_PME_EQNUM_SHFT 0 + +/* PCI DMC core and block interrupt enable register */ +#define FO_PCI_DMC_CORE_BLOCK_INT_EN_DMC 0x8000000000000000ULL +#define FO_PCI_DMC_CORE_BLOCK_INT_EN_MMU 0x0000000000000002ULL +#define FO_PCI_DMC_CORE_BLOCK_INT_EN_IMU 0x0000000000000001ULL + +/* PCI DMC core and block error status register */ +#define FO_PCI_DMC_CORE_BLOCK_ERR_STAT_MMU 0x0000000000000002ULL +#define FO_PCI_DMC_CORE_BLOCK_ERR_STAT_IMU 0x0000000000000001ULL + +/* PCI multi core error status register */ +#define FO_PCI_MULTI_CORE_ERR_STAT_PEC 0x0000000000000002ULL +#define FO_PCI_MULTI_CORE_ERR_STAT_DMC 0x0000000000000001ULL + +/* PCI MSI 32-bit address register */ +#define FO_PCI_MSI_32_BIT_ADDR_MASK 0x00000000ffff0000ULL +#define FO_PCI_MSI_32_BIT_ADDR_SHFT 16 + +/* PCI MSI 64-bit address register */ +#define FO_PCI_MSI_64_BIT_ADDR_MASK 0x0000ffffffff0000ULL +#define FO_PCI_MSI_64_BIT_ADDR_SHFT 16 + +/* + * PCI MMU interrupt enable, interrupt status and error status clear + * registers + */ +#define FO_PCI_MMU_ERR_INT_S_MASK 0x0000ffff00000000ULL +#define FO_PCI_MMU_ERR_INT_S_SHFT 32 +#define FO_PCI_MMU_ERR_INT_TBW_DPE_S 0x0000800000000000ULL +#define FO_PCI_MMU_ERR_INT_TBW_ERR_S 0x0000400000000000ULL +#define FO_PCI_MMU_ERR_INT_TBW_UDE_S 0x0000200000000000ULL +#define FO_PCI_MMU_ERR_INT_TBW_DME_S 0x0000100000000000ULL +#define FO_PCI_MMU_ERR_INT_SPARE3_S 0x0000080000000000ULL +#define FO_PCI_MMU_ERR_INT_SPARE2_S 0x0000040000000000ULL +#define FO_PCI_MMU_ERR_INT_TTC_CAE_S 0x0000020000000000ULL +#define FIRE_PCI_MMU_ERR_INT_TTC_DPE_S 0x0000010000000000ULL +#define OBERON_PCI_MMU_ERR_INT_TTC_DUE_S 0x0000010000000000ULL +#define FO_PCI_MMU_ERR_INT_TTE_PRT_S 0x0000008000000000ULL +#define FO_PCI_MMU_ERR_INT_TTE_INV_S 0x0000004000000000ULL +#define FO_PCI_MMU_ERR_INT_TRN_OOR_S 0x0000002000000000ULL +#define FO_PCI_MMU_ERR_INT_TRN_ERR_S 0x0000001000000000ULL +#define FO_PCI_MMU_ERR_INT_SPARE1_S 0x0000000800000000ULL +#define FO_PCI_MMU_ERR_INT_SPARE0_S 0x0000000400000000ULL +#define FO_PCI_MMU_ERR_INT_BYP_OOR_S 0x0000000200000000ULL +#define FO_PCI_MMU_ERR_INT_BYP_ERR_S 0x0000000100000000ULL +#define FO_PCI_MMU_ERR_INT_P_MASK 0x000000000000ffffULL +#define FO_PCI_MMU_ERR_INT_P_SHFT 0 +#define FO_PCI_MMU_ERR_INT_TBW_DPE_P 0x0000000000008000ULL +#define FO_PCI_MMU_ERR_INT_TBW_ERR_P 0x0000000000004000ULL +#define FO_PCI_MMU_ERR_INT_TBW_UDE_P 0x0000000000002000ULL +#define FO_PCI_MMU_ERR_INT_TBW_DME_P 0x0000000000001000ULL +#define FO_PCI_MMU_ERR_INT_SPARE3_P 0x0000000000000800ULL +#define FO_PCI_MMU_ERR_INT_SPARE2_P 0x0000000000000400ULL +#define FO_PCI_MMU_ERR_INT_TTC_CAE_P 0x0000000000000200ULL +#define FIRE_PCI_MMU_ERR_INT_TTC_DPE_P 0x0000000000000100ULL +#define OBERON_PCI_MMU_ERR_INT_TTC_DUE_P 0x0000000000000100ULL +#define FO_PCI_MMU_ERR_INT_TTE_PRT_P 0x0000000000000080ULL +#define FO_PCI_MMU_ERR_INT_TTE_INV_P 0x0000000000000040ULL +#define FO_PCI_MMU_ERR_INT_TRN_OOR_P 0x0000000000000020ULL +#define FO_PCI_MMU_ERR_INT_TRN_ERR_P 0x0000000000000010ULL +#define FO_PCI_MMU_ERR_INT_SPARE1_P 0x0000000000000008ULL +#define FO_PCI_MMU_ERR_INT_SPARE0_P 0x0000000000000004ULL +#define FO_PCI_MMU_ERR_INT_BYP_OOR_P 0x0000000000000002ULL +#define FO_PCI_MMU_ERR_INT_BYP_ERR_P 0x0000000000000001ULL + +/* PCI MMU translation fault address register */ +#define FO_PCI_MMU_TRANS_FAULT_ADDR_VA_MASK 0xfffffffffffffffcULL +#define FO_PCI_MMU_TRANS_FAULT_ADDR_VA_SHFT 2 + +/* PCI MMU translation fault status register */ +#define FO_PCI_MMU_TRANS_FAULT_STAT_ENTRY_MASK 0x000001ff00000000ULL +#define FO_PCI_MMU_TRANS_FAULT_STAT_ENTRY_SHFT 32 +#define FO_PCI_MMU_TRANS_FAULT_STAT_TYPE_MASK 0x00000000007f0000ULL +#define FO_PCI_MMU_TRANS_FAULT_STAT_TYPE_SHFT 16 +#define FO_PCI_MMU_TRANS_FAULT_STAT_ID_MASK 0x000000000000ffffULL +#define FO_PCI_MMU_TRANS_FAULT_STAT_ID_SHFT 0 + +/* + * PCI ILU interrupt enable, interrupt status and error status clear + * registers + */ +#define FO_PCI_ILU_ERR_INT_SPARE3_S 0x0000008000000000ULL +#define FO_PCI_ILU_ERR_INT_SPARE2_S 0x0000004000000000ULL +#define FO_PCI_ILU_ERR_INT_SPARE1_S 0x0000002000000000ULL +#define FIRE_PCI_ILU_ERR_INT_IHB_PE_S 0x0000001000000000ULL +#define OBERON_PCI_ILU_ERR_INT_IHB_UE_S 0x0000001000000000ULL +#define FO_PCI_ILU_ERR_INT_SPARE3_P 0x0000000000000080ULL +#define FO_PCI_ILU_ERR_INT_SPARE2_P 0x0000000000000040ULL +#define FO_PCI_ILU_ERR_INT_SPARE1_P 0x0000000000000020ULL +#define FIRE_PCI_ILU_ERR_INT_IHB_PE_P 0x0000000000000010ULL +#define OBERON_PCI_ILU_ERR_INT_IHB_UE_P 0x0000000000000010ULL + +/* PCI DMC debug select registers for port a/b */ +#define FO_PCI_DMC_DBG_SEL_PORT_BLCK_MASK 0x00000000000003c0ULL +#define FO_PCI_DMC_DBG_SEL_PORT_BLCK_SHFT 6 +#define FO_PCI_DMC_DBG_SEL_PORT_SUB_MASK 0x0000000000000038ULL +#define FO_PCI_DMC_DBG_SEL_PORT_SUB_SHFT 3 +#define FO_PCI_DMC_DBG_SEL_PORT_SUB_SGNL_MASK 0x0000000000000007ULL +#define FO_PCI_DMC_DBG_SEL_PORT_SUB_SGNL_SHFT 0 + +/* PCI PEC core and block interrupt enable register */ +#define FO_PCI_PEC_CORE_BLOCK_INT_EN_PEC 0x8000000000000000ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_EN_ILU 0x0000000000000008ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_EN_UERR 0x0000000000000004ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_EN_CERR 0x0000000000000002ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_EN_OEVENT 0x0000000000000001ULL + +/* PCI PEC core and block interrupt status register */ +#define FO_PCI_PEC_CORE_BLOCK_INT_STAT_ILU 0x0000000000000008ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_STAT_UERR 0x0000000000000004ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_STAT_CERR 0x0000000000000002ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_STAT_OEVENT 0x0000000000000001ULL + +/* PCI TLU control register */ +#define FO_PCI_TLU_CTRL_L0S_TIM_MASK 0x00000000ff000000ULL +#define FO_PCI_TLU_CTRL_L0S_TIM_SHFT 24 +#define FO_PCI_TLU_CTRL_NWPR_EN 0x0000000000100000ULL +#define FO_PCI_TLU_CTRL_CTO_SEL_MASK 0x0000000000070000ULL +#define FO_PCI_TLU_CTRL_CTO_SEL_SHFT 16 +#define FO_PCI_TLU_CTRL_CFG_MASK 0x000000000000ffffULL +#define FO_PCI_TLU_CTRL_CFG_SHFT 0 +#define FO_PCI_TLU_CTRL_CFG_REMAIN_DETECT_QUIET 0x0000000000000100ULL + +/* + * PCI TLU other event interrupt enable, interrupt status and status clear + * registers + */ +#define FO_PCI_TLU_OEVENT_S_MASK 0x00ffffff00000000ULL +#define FO_PCI_TLU_OEVENT_S_SHFT 32 +#define FO_PCI_TLU_OEVENT_SPARE_S 0x0080000000000000ULL +#define FO_PCI_TLU_OEVENT_MFC_S 0x0040000000000000ULL +#define FO_PCI_TLU_OEVENT_CTO_S 0x0020000000000000ULL +#define FO_PCI_TLU_OEVENT_NFP_S 0x0010000000000000ULL +#define FO_PCI_TLU_OEVENT_LWC_S 0x0008000000000000ULL +#define FO_PCI_TLU_OEVENT_MRC_S 0x0004000000000000ULL +#define FO_PCI_TLU_OEVENT_WUC_S 0x0002000000000000ULL +#define FO_PCI_TLU_OEVENT_RUC_S 0x0001000000000000ULL +#define FO_PCI_TLU_OEVENT_CRS_S 0x0000800000000000ULL +#define FO_PCI_TLU_OEVENT_IIP_S 0x0000400000000000ULL +#define FO_PCI_TLU_OEVENT_EDP_S 0x0000200000000000ULL +#define FIRE_PCI_TLU_OEVENT_EHP_S 0x0000100000000000ULL +#define OBERON_PCI_TLU_OEVENT_EHBUE_S 0x0000100000000000ULL +#define OBERON_PCI_TLU_OEVENT_EDBUE_S 0x0000100000000000ULL +#define FO_PCI_TLU_OEVENT_LIN_S 0x0000080000000000ULL +#define FO_PCI_TLU_OEVENT_LRS_S 0x0000040000000000ULL +#define FO_PCI_TLU_OEVENT_LDN_S 0x0000020000000000ULL +#define FO_PCI_TLU_OEVENT_LUP_S 0x0000010000000000ULL +#define FO_PCI_TLU_OEVENT_LPU_S_MASK 0x000000c000000000ULL +#define FO_PCI_TLU_OEVENT_LPU_S_SHFT 38 +#define OBERON_PCI_TLU_OEVENT_TLUEITMO_S 0x0000008000000000ULL +#define FO_PCI_TLU_OEVENT_ERU_S 0x0000002000000000ULL +#define FO_PCI_TLU_OEVENT_ERO_S 0x0000001000000000ULL +#define FO_PCI_TLU_OEVENT_EMP_S 0x0000000800000000ULL +#define FO_PCI_TLU_OEVENT_EPE_S 0x0000000400000000ULL +#define FIRE_PCI_TLU_OEVENT_ERP_S 0x0000000200000000ULL +#define OBERON_PCI_TLU_OEVENT_ERBU_S 0x0000000200000000ULL +#define FIRE_PCI_TLU_OEVENT_EIP_S 0x0000000100000000ULL +#define OBERON_PCI_TLU_OEVENT_EIUE_S 0x0000000100000000ULL +#define FO_PCI_TLU_OEVENT_P_MASK 0x0000000000ffffffULL +#define FO_PCI_TLU_OEVENT_P_SHFT 0 +#define FO_PCI_TLU_OEVENT_SPARE_P 0x0000000000800000ULL +#define FO_PCI_TLU_OEVENT_MFC_P 0x0000000000400000ULL +#define FO_PCI_TLU_OEVENT_CTO_P 0x0000000000200000ULL +#define FO_PCI_TLU_OEVENT_NFP_P 0x0000000000100000ULL +#define FO_PCI_TLU_OEVENT_LWC_P 0x0000000000080000ULL +#define FO_PCI_TLU_OEVENT_MRC_P 0x0000000000040000ULL +#define FO_PCI_TLU_OEVENT_WUC_P 0x0000000000020000ULL +#define FO_PCI_TLU_OEVENT_RUC_P 0x0000000000010000ULL +#define FO_PCI_TLU_OEVENT_CRS_P 0x0000000000008000ULL +#define FO_PCI_TLU_OEVENT_IIP_P 0x0000000000004000ULL +#define FO_PCI_TLU_OEVENT_EDP_P 0x0000000000002000ULL +#define FIRE_PCI_TLU_OEVENT_EHP_P 0x0000000000001000ULL +#define OBERON_PCI_TLU_OEVENT_EHBUE_P 0x0000000000001000ULL +#define OBERON_PCI_TLU_OEVENT_EDBUE_P 0x0000000000001000ULL +#define FO_PCI_TLU_OEVENT_LIN_P 0x0000000000000800ULL +#define FO_PCI_TLU_OEVENT_LRS_P 0x0000000000000400ULL +#define FO_PCI_TLU_OEVENT_LDN_P 0x0000000000000200ULL +#define FO_PCI_TLU_OEVENT_LUP_P 0x0000000000000100ULL +#define FO_PCI_TLU_OEVENT_LPU_P_MASK 0x00000000000000c0ULL +#define FO_PCI_TLU_OEVENT_LPU_P_SHFT 6 +#define OBERON_PCI_TLU_OEVENT_TLUEITMO_P 0x0000000000000080ULL +#define FO_PCI_TLU_OEVENT_ERU_P 0x0000000000000020ULL +#define FO_PCI_TLU_OEVENT_ERO_P 0x0000000000000010ULL +#define FO_PCI_TLU_OEVENT_EMP_P 0x0000000000000008ULL +#define FO_PCI_TLU_OEVENT_EPE_P 0x0000000000000004ULL +#define FIRE_PCI_TLU_OEVENT_ERP_P 0x0000000000000002ULL +#define OBERON_PCI_TLU_OEVENT_ERBU_P 0x0000000000000002ULL +#define FIRE_PCI_TLU_OEVENT_EIP_P 0x0000000000000001ULL +#define OBERON_PCI_TLU_OEVENT_EIUE_P 0x0000000000000001ULL + +/* PCI receive/transmit DLU/TLU other event header 1/2 log registers */ +#define FO_PCI_TLU_OEVENT_HDR_LOG_MASK 0xffffffffffffffffULL +#define FO_PCI_TLU_OEVENT_HDR_LOG_SHFT 0 + +/* PCI TLU device control register */ +#define FO_PCI_TLU_DEV_CTRL_MRRS_MASK 0x0000000000007000ULL +#define FO_PCI_TLU_DEV_CTRL_MRRS_SHFT 12 +#define FO_PCI_TLU_DEV_CTRL_MPS_MASK 0x00000000000000e0ULL +#define FO_PCI_TLU_DEV_CTRL_MPS_SHFT 5 + +/* + * PCI TLU uncorrectable error interrupt enable, interrupt status and + * status clear registers + */ +#define FO_PCI_TLU_UERR_INT_S_MASK 0x001fffff00000000ULL +#define FO_PCI_TLU_UERR_INT_S_SHFT 32 +#define FO_PCI_TLU_UERR_INT_UR_S 0x0010000000000000ULL +#define OBERON_PCI_TLU_UERR_INT_ECRC_S 0x0008000000000000ULL +#define FO_PCI_TLU_UERR_INT_MFP_S 0x0004000000000000ULL +#define FO_PCI_TLU_UERR_INT_ROF_S 0x0002000000000000ULL +#define FO_PCI_TLU_UERR_INT_UC_S 0x0001000000000000ULL +#define FO_PCI_TLU_UERR_INT_CA_S 0x0000800000000000ULL +#define FO_PCI_TLU_UERR_INT_CTO_S 0x0000400000000000ULL +#define FO_PCI_TLU_UERR_INT_FCP_S 0x0000200000000000ULL +#define FIRE_PCI_TLU_UERR_INT_PP_S 0x0000100000000000ULL +#define OBERON_PCI_TLU_UERR_INT_POIS_S 0x0000100000000000ULL +#define FO_PCI_TLU_UERR_INT_DLP_S 0x0000001000000000ULL +#define FO_PCI_TLU_UERR_INT_TE_S 0x0000000100000000ULL +#define FO_PCI_TLU_UERR_INT_P_MASK 0x00000000001fffffULL +#define FO_PCI_TLU_UERR_INT_P_SHFT 0 +#define FO_PCI_TLU_UERR_INT_UR_P 0x0000000000100000ULL +#define OBERON_PCI_TLU_UERR_INT_ECRC_P 0x0000000000080000ULL +#define FO_PCI_TLU_UERR_INT_MFP_P 0x0000000000040000ULL +#define FO_PCI_TLU_UERR_INT_ROF_P 0x0000000000020000ULL +#define FO_PCI_TLU_UERR_INT_UC_P 0x0000000000010000ULL +#define FO_PCI_TLU_UERR_INT_CA_P 0x0000000000008000ULL +#define FO_PCI_TLU_UERR_INT_CTO_P 0x0000000000004000ULL +#define FO_PCI_TLU_UERR_INT_FCP_P 0x0000000000002000ULL +#define FIRE_PCI_TLU_UERR_INT_PP_P 0x0000000000001000ULL +#define OBERON_PCI_TLU_UERR_INT_POIS_P 0x0000000000001000ULL +#define FO_PCI_TLU_UERR_INT_DLP_P 0x0000000000000010ULL +#define FO_PCI_TLU_UERR_INT_TE_P 0x0000000000000001ULL + +/* + * PCI TLU correctable error interrupt enable, interrupt status and + * status clear registers + */ +#define FO_PCI_TLU_CERR_INT_S_MASK 0x001fffff00000000ULL +#define FO_PCI_TLU_CERR_INT_S_SHFT 32 +#define FO_PCI_TLU_CERR_INT_RTO_S 0x0000100000000000ULL +#define FO_PCI_TLU_CERR_INT_RNR_S 0x0000010000000000ULL +#define FO_PCI_TLU_CERR_INT_BDP_S 0x0000008000000000ULL +#define FO_PCI_TLU_CERR_INT_BTP_S 0x0000004000000000ULL +#define FO_PCI_TLU_CERR_INT_RE_S 0x0000000100000000ULL +#define FO_PCI_TLU_CERR_INT_P_MASK 0x00000000001fffffULL +#define FO_PCI_TLU_CERR_INT_P_SHFT 0 +#define FO_PCI_TLU_CERR_INT_RTO_P 0x0000000000001000ULL +#define FO_PCI_TLU_CERR_INT_RNR_P 0x0000000000000100ULL +#define FO_PCI_TLU_CERR_INT_BDP_P 0x0000000000000080ULL +#define FO_PCI_TLU_CERR_INT_BTP_P 0x0000000000000040ULL +#define FO_PCI_TLU_CERR_INT_RE_P 0x0000000000000001ULL + +/* PCI TLU reset register */ +#define FO_PCI_LPU_RST_WE 0x0000000080000000ULL +#define FO_PCI_LPU_RST_UNUSED_MASK 0x0000000000000e00ULL +#define FO_PCI_LPU_RST_UNUSED_SHFT 9 +#define FO_PCI_LPU_RST_ERR 0x0000000000000100ULL +#define FO_PCI_LPU_RST_TXLINK 0x0000000000000080ULL +#define FO_PCI_LPU_RST_RXLINK 0x0000000000000040ULL +#define FO_PCI_LPU_RST_SMLINK 0x0000000000000020ULL +#define FO_PCI_LPU_RST_LTSSM 0x0000000000000010ULL +#define FO_PCI_LPU_RST_TXPHY 0x0000000000000008ULL +#define FO_PCI_LPU_RST_RXPHY 0x0000000000000004ULL +#define FO_PCI_LPU_RST_TXPCS 0x0000000000000002ULL +#define FO_PCI_LPU_RST_RXPCS 0x0000000000000001ULL + +/* PCI TLU link control register */ +#define FO_PCI_TLU_LNK_CTRL_EXTSYNC 0x0000000000000080ULL +#define FO_PCI_TLU_LNK_CTRL_CLK 0x0000000000000040ULL +#define FO_PCI_TLU_LNK_CTRL_RETRAIN 0x0000000000000020ULL +#define FO_PCI_TLU_LNK_CTRL_DIS 0x0000000000000010ULL +#define FO_PCI_TLU_LNK_CTRL_RCB 0x0000000000000008ULL +#define FO_PCI_TLU_LNK_CTRL_ASPM_L0S_L1S 0x0000000000000003ULL +#define FO_PCI_TLU_LNK_CTRL_ASPM_L1S 0x0000000000000002ULL +#define FO_PCI_TLU_LNK_CTRL_ASPM_L0S 0x0000000000000001ULL +#define FO_PCI_TLU_LNK_CTRL_ASPM_DIS 0x0000000000000000ULL + +/* PCI TLU link status register */ +#define FO_PCI_TLU_LNK_STAT_CLK 0x0000000000001000ULL +#define FO_PCI_TLU_LNK_STAT_TRAIN 0x0000000000000800ULL +#define FO_PCI_TLU_LNK_STAT_ERR 0x0000000000000400ULL +#define FO_PCI_TLU_LNK_STAT_WDTH_MASK 0x00000000000003f0ULL +#define FO_PCI_TLU_LNK_STAT_WDTH_SHFT 4 +#define FO_PCI_TLU_LNK_STAT_SPEED_MASK 0x000000000000000fULL +#define FO_PCI_TLU_LNK_STAT_SPEED_SHFT 0 + +/* + * PCI receive/transmit DLU/TLU uncorrectable error header 1/2 log + * registers + */ +#define FO_PCI_TLU_UERR_HDR_LOG_MASK 0xffffffffffffffffULL +#define FO_PCI_TLU_UERR_HDR_LOG_SHFT 0 + +/* PCI DLU/LPU interrupt status and mask registers */ +#define FO_PCI_LPU_INT_INT 0x0000000080000000ULL +#define FIRE_PCI_LPU_INT_PRF_CNT2_OFLW 0x0000000000000080ULL +#define FIRE_PCI_LPU_INT_PRF_CNT1_OFLW 0x0000000000000040ULL +#define FO_PCI_LPU_INT_LNK_LYR 0x0000000000000020ULL +#define FO_PCI_LPU_INT_PHY_ERR 0x0000000000000010ULL +#define FIRE_PCI_LPU_INT_LTSSM 0x0000000000000008ULL +#define FIRE_PCI_LPU_INT_PHY_TX 0x0000000000000004ULL +#define FIRE_PCI_LPU_INT_PHY_RX 0x0000000000000002ULL +#define FIRE_PCI_LPU_INT_PHY_GB 0x0000000000000001ULL + +/* PCI DLU/LPU link layer config register */ +#define FIRE_PCI_LPU_LNK_LYR_CFG_AUTO_UPDT_DIS 0x0000000000080000ULL +#define FIRE_PCI_LPU_LNK_LYR_CFG_FREQ_NAK_EN 0x0000000000040000ULL +#define FIRE_PCI_LPU_LNK_LYR_CFG_RPLY_AFTER_REQ 0x0000000000020000ULL +#define FIRE_PCI_LPU_LNK_LYR_CFG_LAT_THRS_WR_EN 0x0000000000010000ULL +#define FO_PCI_LPU_LNK_LYR_CFG_VC0_EN 0x0000000000000100ULL +#define FIRE_PCI_LPU_LNK_LYR_CFG_L0S_ADJ_FAC_EN 0x0000000000000010ULL +#define FIER_PCI_LPU_LNK_LYR_CFG_TLP_XMIT_FC_EN 0x0000000000000008ULL +#define FO_PCI_LPU_LNK_LYR_CFG_FREQ_ACK_EN 0x0000000000000004ULL +#define FO_PCI_LPU_LNK_LYR_CFG_RETRY_DIS 0x0000000000000002ULL + +/* PCI DLU/LPU link layer interrupt and status register */ +#define FO_PCI_LPU_LNK_LYR_INT_STAT_LNK_ERR_ACT 0x0000000080000000ULL +#define OBERON_PCI_LPU_LNK_LYR_INT_STAT_PBUS_PE 0x0000000000800000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_USPRTD_DLLP 0x0000000000400000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_DLLP_RX_ERR 0x0000000000200000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_BAD_DLLP 0x0000000000100000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_TLP_RX_ERR 0x0000000000040000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_SRC_ERR_TLP 0x0000000000020000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_BAD_TLP 0x0000000000010000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_RBF_UDF_ERR 0x0000000000000200ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_RBF_OVF_ERR 0x0000000000000100ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_EG_TLPM_ERR 0x0000000000000080ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_EG_TFRM_ERR 0x0000000000000040ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_RBF_PE 0x0000000000000020ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_EGRESS_PE 0x0000000000000010ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_RPLY_TMR_TO 0x0000000000000004ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_RPLY_NUM_RO 0x0000000000000002ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_DLNK_PES 0x0000000000000001ULL + +/* PCI DLU/LPU flow control update control register */ +#define FO_PCI_LPU_FLW_CTRL_UPDT_CTRL_FC0_C_EN 0x0000000000000004ULL +#define FO_PCI_LPU_FLW_CTRL_UPDT_CTRL_FC0_NP_EN 0x0000000000000002ULL +#define FO_PCI_LPU_FLW_CTRL_UPDT_CTRL_FC0_P_EN 0x0000000000000001ULL + +/* PCI DLU/LPU txlink ACKNAK latency timer threshold register */ +#define FO_PCI_LPU_TXLNK_FREQ_LAT_TMR_THRS_MASK 0x000000000000ffffULL +#define FO_PCI_LPU_TXLNK_FREQ_LAT_TMR_THRS_SHFT 0 + +/* PCI DLU/LPU txlink replay timer threshold register */ +#define FO_PCI_LPU_TXLNK_RPLY_TMR_THRS_MASK 0x00000000000fffffULL +#define FO_PCI_LPU_TXLNK_RPLY_TMR_THRS_SHFT 0 + +/* PCI DLU/LPU txlink FIFO pointer register */ +#define FO_PCI_LPU_TXLNK_RTR_FIFO_PTR_TL_MASK 0x00000000ffff0000ULL +#define FO_PCI_LPU_TXLNK_RTR_FIFO_PTR_TL_SHFT 16 +#define FO_PCI_LPU_TXLNK_RTR_FIFO_PTR_HD_MASK 0x000000000000ffffULL +#define FO_PCI_LPU_TXLNK_RTR_FIFO_PTR_HD_SHFT 0 + +/* PCI DLU/LPU phy layer interrupt and status register */ +#define FO_PCI_LPU_PHY_LYR_INT_STAT_PHY_LYR_ERR 0x0000000080000000ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_KC_DLLP_ERR 0x0000000000000800ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_END_POS_ERR 0x0000000000000400ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_LNK_ERR 0x0000000000000200ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_TRN_ERR 0x0000000000000100ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_EDB_DET 0x0000000000000080ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_SDP_END 0x0000000000000040ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_STP_END_EDB 0x0000000000000020ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_INVC_ERR 0x0000000000000010ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_MULTI_SDP 0x0000000000000008ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_MULTI_STP 0x0000000000000004ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_ILL_SDP_POS 0x0000000000000002ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_ILL_STP_POS 0x0000000000000001ULL + +/* PCI DLU/LPU LTSSM config2 register */ +#define FO_PCI_LPU_LTSSM_CFG2_12_TO_MASK 0x00000000ffffffffULL +#define FO_PCI_LPU_LTSSM_CFG2_12_TO_SHFT 0 + +/* PCI DLU/LPU LTSSM config3 register */ +#define FO_PCI_LPU_LTSSM_CFG3_2_TO_MASK 0x00000000ffffffffULL +#define FO_PCI_LPU_LTSSM_CFG3_2_TO_SHFT 0 + +/* PCI DLU/LPU LTSSM config4 register */ +#define FO_PCI_LPU_LTSSM_CFG4_TRN_CTRL_MASK 0x00000000ff000000ULL +#define FO_PCI_LPU_LTSSM_CFG4_TRN_CTRL_SHFT 24 +#define FO_PCI_LPU_LTSSM_CFG4_DATA_RATE_MASK 0x0000000000ff0000ULL +#define FO_PCI_LPU_LTSSM_CFG4_DATA_RATE_SHFT 16 +#define FO_PCI_LPU_LTSSM_CFG4_N_FTS_MASK 0x000000000000ff00ULL +#define FO_PCI_LPU_LTSSM_CFG4_N_FTS_SHFT 8 +#define FO_PCI_LPU_LTSSM_CFG4_LNK_NUM_MASK 0x00000000000000ffULL +#define FO_PCI_LPU_LTSSM_CFG4_LNK_NUM_SHFT 0 + +/* PCI DLU/LPU LTSSM config5 register */ +#define FO_PCI_LPU_LTSSM_CFG5_UNUSED0_MASK 0x00000000ffffe000ULL +#define FO_PCI_LPU_LTSSM_CFG5_UNUSED0_SHFT 13 +#define FO_PCI_LPU_LTSSM_CFG5_RCV_DET_TST_MODE 0x0000000000001000ULL +#define FO_PCI_LPU_LTSSM_CFG5_POLL_CMPLNC_DIS 0x0000000000000800ULL +#define FO_PCI_LPU_LTSSM_CFG5_TX_IDLE_TX_FTS 0x0000000000000400ULL +#define FO_PCI_LPU_LTSSM_CFG5_RX_FTS_RVR_LK 0x0000000000000200ULL +#define FO_PCI_LPU_LTSSM_CFG5_UNUSED1_MASK 0x0000000000000180ULL +#define FO_PCI_LPU_LTSSM_CFG5_UNUSED1_SHFT 7 +#define FO_PCI_LPU_LTSSM_CFG5_LPBK_NTRY_ACTIVE 0x0000000000000040ULL +#define FO_PCI_LPU_LTSSM_CFG5_LPBK_NTRY_EXIT 0x0000000000000020ULL +#define FO_PCI_LPU_LTSSM_CFG5_LPBK_ACTIVE_EXIT 0x0000000000000010ULL +#define FO_PCI_LPU_LTSSM_CFG5_L1_IDLE_RCVRY_LK 0x0000000000000008ULL +#define FO_PCI_LPU_LTSSM_CFG5_L0_TRN_CNTRL_RST 0x0000000000000004ULL +#define FO_PCI_LPU_LTSSM_CFG5_L0_LPBK 0x0000000000000002ULL +#define FO_PCI_LPU_LTSSM_CFG5_UNUSED2 0x0000000000000001ULL + +/* Controller configuration and status registers */ +#define FIRE_JBUS_PAR_CTRL 0x60010 +#define FO_XBC_ERR_LOG_EN 0x61000 +#define FO_XBC_INT_EN 0x61008 +#define FO_XBC_INT_STAT 0x61010 +#define FO_XBC_ERR_STAT_CLR 0x61018 +#define FIRE_JBC_FATAL_RST_EN 0x61028 +#define FIRE_JBCINT_ITRANS_ERR_LOG 0x61040 +#define FIRE_JBCINT_ITRANS_ERR_LOG2 0x61048 +#define FIRE_JBCINT_OTRANS_ERR_LOG 0x61040 +#define FIRE_JBCINT_OTRANS_ERR_LOG2 0x61048 +#define FIRE_FATAL_ERR_LOG 0x61050 +#define FIRE_FATAL_ERR_LOG2 0x61058 +#define FIRE_MERGE_TRANS_ERR_LOG 0x61060 +#define FIRE_DMCINT_ODCD_ERR_LOG 0x61068 +#define FIRE_DMCINT_IDC_ERR_LOG 0x61070 +#define FIRE_JBC_CSR_ERR_LOG 0x61078 +#define FIRE_JBC_CORE_BLOCK_INT_EN 0x61800 +#define FIRE_JBC_CORE_BLOCK_ERR_STAT 0x61808 +#define FO_XBC_PRF_CNT_SEL 0x62000 +#define FO_XBC_PRF_CNT0 0x62008 +#define FO_XBC_PRF_CNT1 0x62010 + +/* JBus parity control register */ +#define FIRE_JBUS_PAR_CTRL_P_EN 0x8000000000000000ULL +#define FIRE_JBUS_PAR_CTRL_INVRTD_PAR_MASK 0x000000000000003cULL +#define FIRE_JBUS_PAR_CTRL_INVRTD_PAR_SHFT 2 +#define FIRE_JBUS_PAR_CTRL_NEXT_DATA 0x0000000000000002ULL +#define FIRE_JBUS_PAR_CTRL_NEXT_ADDR 0x0000000000000001ULL + +/* JBC error log enable register - may also apply to UBC */ +#define FIRE_JBC_ERR_LOG_EN_SPARE_MASK 0x00000000e0000000ULL +#define FIRE_JBC_ERR_LOG_EN_SPARE_SHFT 29 +#define FIRE_JBC_ERR_LOG_EN_PIO_UNMAP_RD 0x0000000010000000ULL +#define FIRE_JBC_ERR_LOG_EN_ILL_ACC_RD 0x0000000008000000ULL +#define FIRE_JBC_ERR_LOG_EN_EBUS_TO 0x0000000004000000ULL +#define FIRE_JBC_ERR_LOG_EN_MB_PEA 0x0000000002000000ULL +#define FIRE_JBC_ERR_LOG_EN_MB_PER 0x0000000001000000ULL +#define FIRE_JBC_ERR_LOG_EN_MB_PEW 0x0000000000800000ULL +#define FIRE_JBC_ERR_LOG_EN_UE_ASYN 0x0000000000400000ULL +#define FIRE_JBC_ERR_LOG_EN_CE_ASYN 0x0000000000200000ULL +#define FIRE_JBC_ERR_LOG_EN_JTE 0x0000000000100000ULL +#define FIRE_JBC_ERR_LOG_EN_JBE 0x0000000000080000ULL +#define FIRE_JBC_ERR_LOG_EN_JUE 0x0000000000040000ULL +#define FIRE_JBC_ERR_LOG_EN_IJP 0x0000000000020000ULL +#define FIRE_JBC_ERR_LOG_EN_ICISE 0x0000000000010000ULL +#define FIRE_JBC_ERR_LOG_EN_CPE 0x0000000000008000ULL +#define FIRE_JBC_ERR_LOG_EN_APE 0x0000000000004000ULL +#define FIRE_JBC_ERR_LOG_EN_WR_DPE 0x0000000000002000ULL +#define FIRE_JBC_ERR_LOG_EN_RD_DPE 0x0000000000001000ULL +#define FIRE_JBC_ERR_LOG_EN_ILL_BMW 0x0000000000000800ULL +#define FIRE_JBC_ERR_LOG_EN_ILL_BMR 0x0000000000000400ULL +#define FIRE_JBC_ERR_LOG_EN_BJC 0x0000000000000200ULL +#define FIRE_JBC_ERR_LOG_EN_PIO_UNMAP 0x0000000000000100ULL +#define FIRE_JBC_ERR_LOG_EN_PIO_DPE 0x0000000000000080ULL +#define FIRE_JBC_ERR_LOG_EN_PIO_CPE 0x0000000000000040ULL +#define FIRE_JBC_ERR_LOG_EN_ILL_ACC 0x0000000000000020ULL +#define FIRE_JBC_ERR_LOG_EN_UNSOL_RD 0x0000000000000010ULL +#define FIRE_JBC_ERR_LOG_EN_UNSOL_INT 0x0000000000000008ULL +#define FIRE_JBC_ERR_LOG_EN_JTCEEW 0x0000000000000004ULL *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 21:45:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEE341065766; Fri, 15 Jan 2010 21:45:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E2358FC1C; Fri, 15 Jan 2010 21:45:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FLjuBJ098605; Fri, 15 Jan 2010 21:45:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FLjuAc098599; Fri, 15 Jan 2010 21:45:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001152145.o0FLjuAc098599@svn.freebsd.org> From: Marius Strobl Date: Fri, 15 Jan 2010 21:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202420 - in stable/7/sys: conf sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 21:45:56 -0000 Author: marius Date: Fri Jan 15 21:45:55 2010 New Revision: 202420 URL: http://svn.freebsd.org/changeset/base/202420 Log: MFC: r201052, r201200, r202003, r202010, r202023 Add a driver for the `Fire' JBus to PCIe bridges found in at least the Sun Fire V215/V245 and Sun Ultra 25/45 machines. This driver also already includes all the code to support the `Oberon' Uranus to PCIe bridges found in the Fujitsu-Siemens based Mx000 machines but due to lack of access to such a system for testing, probing of these bridges is currently disabled. Unfortunately, the event queue mechanism of these bridges for MSIs/ MSI-Xs matches our current MD and MI interrupt frameworks like square pegs fit into round holes so for now we are generous and use one event queue per MSI, which limits us to 35 MSIs/MSI-Xs per Host-PCIe-bridge (we use one event queue for the PCIe error messages). This seems tolerable as long as most devices just use one MSI/MSI-X anyway. Adding knowledge about MSIs/MSI-Xs to the MD interrupt code should allow us to decouple the 1:1 mapping at the cost of no longer being able to bind MSIs/MSI-Xs to specific CPUs as we currently have no reliable way to quiesce a device during the transition of its MSIs/ MSI-Xs to another event queue. This would still require the problem of interrupt storms generated by devices which have no one-shot behavior or can't/don't mask interrupts while the filter/handler is executed (like the older PCIe NICs supported by bge(4)) to be solved though. Added: stable/7/sys/sparc64/pci/fire.c - copied, changed from r201052, head/sys/sparc64/pci/fire.c stable/7/sys/sparc64/pci/firereg.h - copied unchanged from r201052, head/sys/sparc64/pci/firereg.h stable/7/sys/sparc64/pci/firevar.h - copied unchanged from r201052, head/sys/sparc64/pci/firevar.h Modified: stable/7/sys/conf/files.sparc64 stable/7/sys/conf/options.sparc64 Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/conf/files.sparc64 ============================================================================== --- stable/7/sys/conf/files.sparc64 Fri Jan 15 21:45:46 2010 (r202419) +++ stable/7/sys/conf/files.sparc64 Fri Jan 15 21:45:55 2010 (r202420) @@ -71,6 +71,7 @@ sparc64/isa/isa.c optional isa sparc64/isa/isa_dma.c optional isa sparc64/isa/ofw_isa.c optional ebus | isa sparc64/pci/apb.c optional pci +sparc64/pci/fire.c optional pci sparc64/pci/ofw_pcib.c optional pci sparc64/pci/ofw_pcib_subr.c optional pci sparc64/pci/ofw_pcibus.c optional pci Modified: stable/7/sys/conf/options.sparc64 ============================================================================== --- stable/7/sys/conf/options.sparc64 Fri Jan 15 21:45:46 2010 (r202419) +++ stable/7/sys/conf/options.sparc64 Fri Jan 15 21:45:55 2010 (r202420) @@ -8,6 +8,8 @@ SUN4U opt_global.h ATKBD_DFLT_KEYMAP opt_atkbd.h +FIRE_DEBUG opt_fire.h + # Debug IOMMU inserts/removes using diagnostic accesses. This is very loud. IOMMU_DIAG opt_iommu.h Copied and modified: stable/7/sys/sparc64/pci/fire.c (from r201052, head/sys/sparc64/pci/fire.c) ============================================================================== --- head/sys/sparc64/pci/fire.c Sun Dec 27 16:55:44 2009 (r201052, copy source) +++ stable/7/sys/sparc64/pci/fire.c Fri Jan 15 21:45:55 2010 (r202420) @@ -83,6 +83,8 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" +struct fire_msiqarg; + static bus_space_tag_t fire_alloc_bus_tag(struct fire_softc *sc, int type); static const struct fire_desc *fire_get_desc(device_t dev); static void fire_dmamap_sync(bus_dma_tag_t dt __unused, bus_dmamap_t map, @@ -94,6 +96,9 @@ static void fire_intr_clear(void *arg); static void fire_intr_disable(void *arg); static void fire_intr_enable(void *arg); static int fire_intr_register(struct fire_softc *sc, u_int ino); +static inline void fire_msiq_common(struct intr_vector *iv, + struct fire_msiqarg *fmqa); +static void fire_msiq_filter(void *cookie); static void fire_msiq_handler(void *cookie); static void fire_set_intr(struct fire_softc *sc, u_int index, u_int ino, driver_filter_t handler, void *arg); @@ -167,8 +172,7 @@ static device_method_t fire_methods[] = static devclass_t fire_devclass; DEFINE_CLASS_0(pcib, fire_driver, fire_methods, sizeof(struct fire_softc)); -EARLY_DRIVER_MODULE(fire, nexus, fire_driver, fire_devclass, 0, 0, - BUS_PASS_BUS); +DRIVER_MODULE(fire, nexus, fire_driver, fire_devclass, 0, 0); MODULE_DEPEND(fire, nexus, 1, 1, 1); static const struct intr_controller fire_ic = { @@ -184,6 +188,13 @@ struct fire_icarg { bus_addr_t fica_clr; }; +static const struct intr_controller fire_msiqc_filter = { + fire_intr_enable, + fire_intr_disable, + fire_intr_assign, + NULL +}; + struct fire_msiqarg { struct fire_icarg fmqa_fica; struct mtx fmqa_mtx; @@ -290,7 +301,7 @@ fire_attach(device_t dev) uint64_t ino_bitmap, val; phandle_t node; uint32_t prop, prop_array[2]; - int i, j, mode, nrange; + int i, j, mode; u_int lw; uint16_t mps; @@ -725,13 +736,12 @@ fire_attach(device_t dev) rman_manage_region(&sc->sc_pci_mem_rman, 0, FO_MEM_SIZE) != 0) panic("%s: failed to set up memory rman", __func__); - nrange = OF_getprop_alloc(node, "ranges", sizeof(*range), - (void **)&range); + i = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range); /* * Make sure that the expected ranges are present. The * OFW_PCI_CS_MEM64 one is not currently used though. */ - if (nrange != FIRE_NRANGE) + if (i != FIRE_NRANGE) panic("%s: unsupported number of ranges", __func__); /* * Find the addresses of the various bus spaces. @@ -743,7 +753,7 @@ fire_attach(device_t dev) j = OFW_PCI_RANGE_CS(&range[i]); if (sc->sc_pci_bh[j] != 0) panic("%s: duplicate range for space %d", - __func__, j); + __func__, j); sc->sc_pci_bh[j] = OFW_PCI_RANGE_PHYS(&range[i]); } free(range, M_OFWPROP); @@ -1612,7 +1622,7 @@ fire_intr_clear(void *arg) */ static int -fire_alloc_msi(device_t dev, device_t child, int count, int maxcount, +fire_alloc_msi(device_t dev, device_t child, int count, int maxcount __unused, int *irqs) { struct fire_softc *sc; @@ -1638,16 +1648,11 @@ fire_alloc_msi(device_t dev, device_t ch mtx_unlock(&sc->sc_msi_mtx); return (ENXIO); } - /* - * It's unclear whether we need to actually align the MSIs in the - * mapping table based on the maxcount or just the count. We use - * maxcount to be on the safe side. - */ - for (i = 0; i + maxcount < sc->sc_msi_count; i += maxcount) { - for (j = i; j < i + maxcount; j++) + for (i = 0; i + count < sc->sc_msi_count; i += count) { + for (j = i; j < i + count; j++) if (isclr(sc->sc_msi_bitmap, j) == 0) break; - if (j == i + maxcount) { + if (j == i + count) { for (j = 0; j < count; j++) { setbit(sc->sc_msiq_bitmap, msiqrun + j); setbit(sc->sc_msi_bitmap, i + j); @@ -1766,33 +1771,67 @@ fire_msiq_handler(void *cookie) { struct intr_vector *iv; struct fire_msiqarg *fmqa; - struct fire_softc *sc; - struct fo_msiq_record *qrec; - device_t dev; - uint64_t word0; - u_int head, msi, msiq; iv = cookie; fmqa = iv->iv_icarg; - sc = fmqa->fmqa_fica.fica_sc; - dev = sc->sc_dev; - msiq = fmqa->fmqa_msiq; /* * Note that since fire_intr_clear() will clear the event queue - * interrupt after the filter/handler associated with the MSI [sic] - * has been executed we have to protect the access to the event queue - * as otherwise nested event queue interrupts cause corruption of the + * interrupt after the handler associated with the MSI [sic] has + * been executed we have to protect the access to the event queue as + * otherwise nested event queue interrupts cause corruption of the * event queue on MP machines. Obviously especially when abandoning * the 1:1 mapping it would be better to not clear the event queue - * interrupt after each filter/handler invocation but only once when - * the outstanding MSIs have been processed but unfortunately that + * interrupt after each handler invocation but only once when the + * outstanding MSIs have been processed but unfortunately that * doesn't work well and leads to interrupt storms with controllers/ - * drivers which don't mask interrupts while the filter/handler is - * executed. Maybe delaying clearing the MSI until after the filter/ - * handler has been executed could be used to work around this but - * that's not the intended usage and might in turn cause lost MSIs. + * drivers which don't mask interrupts while the handler is executed. + * Maybe delaying clearing the MSI until after the handler has been + * executed could be used to work around this but that's not the + * intended usage and might in turn cause lost MSIs. */ mtx_lock_spin(&fmqa->fmqa_mtx); + fire_msiq_common(iv, fmqa); + mtx_unlock_spin(&fmqa->fmqa_mtx); +} + +static void +fire_msiq_filter(void *cookie) +{ + struct intr_vector *iv; + struct fire_msiqarg *fmqa; + + iv = cookie; + fmqa = iv->iv_icarg; + /* + * For filters we don't use fire_intr_clear() since it would clear + * the event queue interrupt while we're still processing the event + * queue as filters and associated post-filter handler are executed + * directly, which in turn would lead to lost MSIs. So we clear the + * event queue interrupt only once after processing the event queue. + * Given that this still guarantees the filters to not be executed + * concurrently and no other CPU can clear the event queue interrupt + * while the event queue is still processed, we don't even need to + * interlock the access to the event queue in this case. + */ + critical_enter(); + fire_msiq_common(iv, fmqa); + FIRE_PCI_WRITE_8(fmqa->fmqa_fica.fica_sc, fmqa->fmqa_fica.fica_clr, + INTCLR_IDLE); + critical_exit(); +} + +static inline void +fire_msiq_common(struct intr_vector *iv, struct fire_msiqarg *fmqa) +{ + struct fire_softc *sc; + struct fo_msiq_record *qrec; + device_t dev; + uint64_t word0; + u_int head, msi, msiq; + + sc = fmqa->fmqa_fica.fica_sc; + dev = sc->sc_dev; + msiq = fmqa->fmqa_msiq; head = (FIRE_PCI_READ_8(sc, fmqa->fmqa_head) & FO_PCI_EQ_HD_MASK) >> FO_PCI_EQ_HD_SHFT; qrec = &fmqa->fmqa_base[head]; @@ -1834,7 +1873,6 @@ fire_msiq_handler(void *cookie) FIRE_PCI_READ_8(sc, FO_PCI_EQ_CTRL_CLR_BASE + msiq) | FO_PCI_EQ_CTRL_CLR_COVERR); } - mtx_unlock_spin(&fmqa->fmqa_mtx); } static int @@ -1843,6 +1881,7 @@ fire_setup_intr(device_t dev, device_t c void **cookiep) { struct fire_softc *sc; + struct fire_msiqarg *fmqa; u_long vec; int error; u_int msi, msiq; @@ -1873,31 +1912,39 @@ fire_setup_intr(device_t dev, device_t c intr, arg, cookiep); rman_set_start(ires, msi); rman_set_end(ires, msi); - if (error == 0) { + if (error != 0) + return (error); + fmqa = intr_vectors[vec].iv_icarg; + /* + * XXX inject our event queue handler. + */ + if (filt != NULL) { + intr_vectors[vec].iv_func = fire_msiq_filter; + intr_vectors[vec].iv_ic = &fire_msiqc_filter; /* - * XXX inject our event queue handler. + * Ensure the event queue interrupt is cleared, it + * might have triggered before. Given we supply NULL + * as ic_clear, inthand_add() won't do this for us. */ + FIRE_PCI_WRITE_8(sc, fmqa->fmqa_fica.fica_clr, + INTCLR_IDLE); + } else intr_vectors[vec].iv_func = fire_msiq_handler; - /* - * Record the MSI/MSI-X as long as we we use a 1:1 - * mapping. - */ - ((struct fire_msiqarg *)intr_vectors[vec].iv_icarg)-> - fmqa_msi = msi; - FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_CTRL_SET_BASE + - (msiq << 3), FO_PCI_EQ_CTRL_SET_EN); - msi <<= 3; - FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, - (FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) & - ~FO_PCI_MSI_MAP_EQNUM_MASK) | - ((msiq << FO_PCI_MSI_MAP_EQNUM_SHFT) & - FO_PCI_MSI_MAP_EQNUM_MASK)); - FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_CLR_BASE + msi, - FO_PCI_MSI_CLR_EQWR_N); - FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, - FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) | - FO_PCI_MSI_MAP_V); - } + /* Record the MSI/MSI-X as long as we we use a 1:1 mapping. */ + fmqa->fmqa_msi = msi; + FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_CTRL_SET_BASE + (msiq << 3), + FO_PCI_EQ_CTRL_SET_EN); + msi <<= 3; + FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, + (FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) & + ~FO_PCI_MSI_MAP_EQNUM_MASK) | + ((msiq << FO_PCI_MSI_MAP_EQNUM_SHFT) & + FO_PCI_MSI_MAP_EQNUM_MASK)); + FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_CLR_BASE + msi, + FO_PCI_MSI_CLR_EQWR_N); + FIRE_PCI_WRITE_8(sc, FO_PCI_MSI_MAP_BASE + msi, + FIRE_PCI_READ_8(sc, FO_PCI_MSI_MAP_BASE + msi) | + FO_PCI_MSI_MAP_V); return (error); } @@ -1946,14 +1993,16 @@ fire_teardown_intr(device_t dev, device_ (0 << FO_PCI_EQ_TL_SHFT) & FO_PCI_EQ_TL_MASK); FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_HD_BASE + msiq, (0 << FO_PCI_EQ_HD_SHFT) & FO_PCI_EQ_HD_MASK); + intr_vectors[vec].iv_ic = &fire_ic; /* * The MD interrupt code needs the vector rather than the MSI. */ rman_set_start(ires, vec); rman_set_end(ires, vec); error = bus_generic_teardown_intr(dev, child, ires, cookie); + msi >>= 3; rman_set_start(ires, msi); - rman_set_end(ires, msi >> 3); + rman_set_end(ires, msi); return (error); } return (bus_generic_teardown_intr(dev, child, ires, cookie)); @@ -2101,7 +2150,7 @@ fire_alloc_bus_tag(struct fire_softc *sc { bus_space_tag_t bt; - bt = (bus_space_tag_t)malloc(sizeof(struct bus_space_tag), M_DEVBUF, + bt = malloc(sizeof(struct bus_space_tag), M_DEVBUF, M_NOWAIT | M_ZERO); if (bt == NULL) panic("%s: out of memory", __func__); Copied: stable/7/sys/sparc64/pci/firereg.h (from r201052, head/sys/sparc64/pci/firereg.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/sparc64/pci/firereg.h Fri Jan 15 21:45:55 2010 (r202420, copy of r201052, head/sys/sparc64/pci/firereg.h) @@ -0,0 +1,1004 @@ +/*- + * Copyright (c) 2009 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SPARC64_PCI_FIREREG_H_ +#define _SPARC64_PCI_FIREREG_H_ + +#define FIRE_NINTR 3 /* 2 OFW + 1 MSIq */ +#define FIRE_NRANGE 4 +#define FIRE_NREG 2 + +#define FIRE_PCI 0 +#define FIRE_CTRL 1 + +/* PCI configuration and status registers */ +#define FO_PCI_INT_MAP_BASE 0x01000 +#define FO_PCI_INT_CLR_BASE 0x01400 +#define FO_PCI_EQ_BASE_ADDR 0x10000 +#define FO_PCI_EQ_CTRL_SET_BASE 0x11000 +#define FO_PCI_EQ_CTRL_CLR_BASE 0x11200 +#define FO_PCI_EQ_TL_BASE 0x11600 +#define FO_PCI_EQ_HD_BASE 0x11800 +#define FO_PCI_MSI_MAP_BASE 0x20000 +#define FO_PCI_MSI_CLR_BASE 0x28000 +#define FO_PCI_ERR_COR 0x30000 +#define FO_PCI_ERR_NONFATAL 0x30008 +#define FO_PCI_ERR_FATAL 0x30010 +#define FO_PCI_PM_PME 0x30018 +#define FO_PCI_PME_TO_ACK 0x30020 +#define FO_PCI_IMU_INT_EN 0x31008 +#define FO_PCI_IMU_INT_STAT 0x31010 +#define FO_PCI_IMU_ERR_STAT_CLR 0x31018 +#define FO_PCI_IMU_RDS_ERR_LOG 0x31028 +#define FO_PCI_IMU_SCS_ERR_LOG 0x31030 +#define FO_PCI_IMU_EQS_ERR_LOG 0x31038 +#define FO_PCI_DMC_CORE_BLOCK_INT_EN 0x31800 +#define FO_PCI_DMC_CORE_BLOCK_ERR_STAT 0x31808 +#define FO_PCI_MULTI_CORE_ERR_STAT 0x31810 +#define FO_PCI_MSI_32_BIT_ADDR 0x34000 +#define FO_PCI_MSI_64_BIT_ADDR 0x34008 +#define FO_PCI_MMU 0x40000 +#define FO_PCI_MMU_INT_EN 0x41008 +#define FO_PCI_MMU_INT_STAT 0x41010 +#define FO_PCI_MMU_ERR_STAT_CLR 0x41018 +#define FO_PCI_MMU_TRANS_FAULT_ADDR 0x41028 +#define FO_PCI_MMU_TRANS_FAULT_STAT 0x41030 +#define FO_PCI_ILU_INT_EN 0x51008 +#define FO_PCI_ILU_INT_STAT 0x51010 +#define FO_PCI_ILU_ERR_STAT_CLR 0x51018 +#define FO_PCI_DMC_DBG_SEL_PORTA 0x53000 +#define FO_PCI_DMC_DBG_SEL_PORTB 0x53008 +#define FO_PCI_PEC_CORE_BLOCK_INT_EN 0x51800 +#define FO_PCI_PEC_CORE_BLOCK_INT_STAT 0x51808 +#define FO_PCI_TLU_CTRL 0x80000 +#define FO_PCI_TLU_OEVENT_INT_EN 0x81008 +#define FO_PCI_TLU_OEVENT_INT_STAT 0x81010 +#define FO_PCI_TLU_OEVENT_STAT_CLR 0x81018 +#define FO_PCI_TLU_RX_OEVENT_HDR1_LOG 0x81028 +#define FO_PCI_TLU_RX_OEVENT_HDR2_LOG 0x81030 +#define FO_PCI_TLU_TX_OEVENT_HDR1_LOG 0x81038 +#define FO_PCI_TLU_TX_OEVENT_HDR2_LOG 0x81040 +#define FO_PCI_TLU_DEV_CTRL 0x90008 +#define FO_PCI_TLU_LNK_CTRL 0x90020 +#define FO_PCI_TLU_LNK_STAT 0x90028 +#define FO_PCI_TLU_UERR_INT_EN 0x91008 +#define FO_PCI_TLU_UERR_INT_STAT 0x91010 +#define FO_PCI_TLU_UERR_STAT_CLR 0x91018 +#define FO_PCI_TLU_RX_UERR_HDR1_LOG 0x91028 +#define FO_PCI_TLU_RX_UERR_HDR2_LOG 0x91030 +#define FO_PCI_TLU_TX_UERR_HDR1_LOG 0x91038 +#define FO_PCI_TLU_TX_UERR_HDR2_LOG 0x91040 +#define FO_PCI_TLU_CERR_INT_EN 0xa1008 +#define FO_PCI_TLU_CERR_INT_STAT 0xa1010 +#define FO_PCI_TLU_CERR_STAT_CLR 0xa1018 +#define FO_PCI_LPU_RST 0xe2008 +#define FO_PCI_LPU_INT_STAT 0xe2040 +#define FO_PCI_LPU_INT_MASK 0xe0248 +#define FO_PCI_LPU_LNK_LYR_CFG 0xe2200 +#define FO_PCI_LPU_LNK_LYR_INT_STAT 0xe2210 +#define FO_PCI_LPU_FLW_CTRL_UPDT_CTRL 0xe2240 +#define FO_PCI_LPU_TXLNK_FREQ_LAT_TMR_THRS 0xe2400 +#define FO_PCI_LPU_TXLNK_RPLY_TMR_THRS 0xe2410 +#define FO_PCI_LPU_TXLNK_RTR_FIFO_PTR 0xe2430 +#define FO_PCI_LPU_PHY_LYR_INT_STAT 0xe2610 +#define FO_PCI_LPU_LTSSM_CFG2 0xe2788 +#define FO_PCI_LPU_LTSSM_CFG3 0xe2790 +#define FO_PCI_LPU_LTSSM_CFG4 0xe2798 +#define FO_PCI_LPU_LTSSM_CFG5 0xe27a0 + +/* PCI interrupt mapping registers */ +#define FO_PCI_IMAP_MDO_MODE 0x8000000000000000ULL +#define FO_PCI_IMAP_V 0x0000000080000000ULL +#define FIRE_PCI_IMAP_T_JPID_MASK 0x000000007c000000ULL +#define FIRE_PCI_IMAP_T_JPID_SHFT 26 +#define OBERON_PCI_IMAP_T_DESTID_MASK 0x000000007fe00000ULL +#define OBERON_PCI_IMAP_T_DESTID_SHFT 21 +#define FO_PCI_IMAP_INT_CTRL_NUM_MASK 0x00000000000003c0ULL +#define FO_PCI_IMAP_INT_CTRL_NUM_SHFT 6 + +/* PCI interrupt clear registers - use INTCLR_* from */ + +/* PCI event queue base address register */ +#define FO_PCI_EQ_BASE_ADDR_BYPASS 0xfffc000000000000ULL +#define FO_PCI_EQ_BASE_ADDR_MASK 0xfffffffffff80000ULL +#define FO_PCI_EQ_BASE_ADDR_SHFT 19 + +/* PCI event queue control set registers */ +#define FO_PCI_EQ_CTRL_SET_ENOVERR 0x0200000000000000ULL +#define FO_PCI_EQ_CTRL_SET_EN 0x0000100000000000ULL + +/* PCI event queue control clear registers */ +#define FO_PCI_EQ_CTRL_CLR_COVERR 0x0200000000000000ULL +#define FO_PCI_EQ_CTRL_CLR_E2I 0x0000800000000000ULL +#define FO_PCI_EQ_CTRL_CLR_DIS 0x0000100000000000ULL + +/* PCI event queue tail registers */ +#define FO_PCI_EQ_TL_OVERR 0x0200000000000000ULL +#define FO_PCI_EQ_TL_MASK 0x000000000000007fULL +#define FO_PCI_EQ_TL_SHFT 0 + +/* PCI event queue head registers */ +#define FO_PCI_EQ_HD_MASK 0x000000000000007fULL +#define FO_PCI_EQ_HD_SHFT 0 + +/* PCI MSI mapping registers */ +#define FO_PCI_MSI_MAP_V 0x8000000000000000ULL +#define FO_PCI_MSI_MAP_EQWR_N 0x4000000000000000ULL +#define FO_PCI_MSI_MAP_EQNUM_MASK 0x000000000000003fULL +#define FO_PCI_MSI_MAP_EQNUM_SHFT 0 + +/* PCI MSI clear registers */ +#define FO_PCI_MSI_CLR_EQWR_N 0x4000000000000000ULL + +/* + * PCI IMU interrupt enable, interrupt status and error status clear + * registers + */ +#define FO_PCI_IMU_ERR_INT_SPARE_S_MASK 0x00007c0000000000ULL +#define FO_PCI_IMU_ERR_INT_SPARE_S_SHFT 42 +#define FO_PCI_IMU_ERR_INT_EQ_OVER_S 0x0000020000000000ULL +#define FO_PCI_IMU_ERR_INT_EQ_NOT_EN_S 0x0000010000000000ULL +#define FO_PCI_IMU_ERR_INT_MSI_MAL_ERR_S 0x0000008000000000ULL +#define FO_PCI_IMU_ERR_INT_MSI_PAR_ERR_S 0x0000004000000000ULL +#define FO_PCI_IMU_ERR_INT_PMEACK_MES_NOT_EN_S 0x0000002000000000ULL +#define FO_PCI_IMU_ERR_INT_PMPME_MES_NOT_EN_S 0x0000001000000000ULL +#define FO_PCI_IMU_ERR_INT_FATAL_MES_NOT_EN_S 0x0000000800000000ULL +#define FO_PCI_IMU_ERR_INT_NFATAL_MES_NOT_EN_S 0x0000000400000000ULL +#define FO_PCI_IMU_ERR_INT_COR_MES_NOT_EN_S 0x0000000200000000ULL +#define FO_PCI_IMU_ERR_INT_MSI_NOT_EN_S 0x0000000100000000ULL +#define FO_PCI_IMU_ERR_INT_SPARE_P_MASK 0x0000000000007c00ULL +#define FO_PCI_IMU_ERR_INT_SPARE_P_SHFT 10 +#define FO_PCI_IMU_ERR_INT_EQ_OVER_P 0x0000000000000200ULL +#define FO_PCI_IMU_ERR_INT_EQ_NOT_EN_P 0x0000000000000100ULL +#define FO_PCI_IMU_ERR_INT_MSI_MAL_ERR_P 0x0000000000000080ULL +#define FO_PCI_IMU_ERR_INT_MSI_PAR_ERR_P 0x0000000000000040ULL +#define FO_PCI_IMU_ERR_INT_PMEACK_MES_NOT_EN_P 0x0000000000000020ULL +#define FO_PCI_IMU_ERR_INT_PMPME_MES_NOT_EN_P 0x0000000000000010ULL +#define FO_PCI_IMU_ERR_INT_FATAL_MES_NOT_EN_P 0x0000000000000008ULL +#define FO_PCI_IMU_ERR_INT_NFATAL_MES_NOT_EN_P 0x0000000000000004ULL +#define FO_PCI_IMU_ERR_INT_COR_MES_NOT_EN_P 0x0000000000000002ULL +#define FO_PCI_IMU_ERR_INT_MSI_NOT_EN_P 0x0000000000000001ULL + +/* PCI IMU RDS error log register */ +#define FO_PCI_IMU_RDS_ERR_LOG_TYPE_MASK 0xfc00000000000000ULL +#define FO_PCI_IMU_RDS_ERR_LOG_TYPE_SHFT 58 +#define FO_PCI_IMU_RDS_ERR_LOG_LENGTH_MASK 0x03ff000000000000ULL +#define FO_PCI_IMU_RDS_ERR_LOG_LENGTH_SHFT 48 +#define FO_PCI_IMU_RDS_ERR_LOG_REQ_ID_MASK 0x0000ffff00000000ULL +#define FO_PCI_IMU_RDS_ERR_LOG_REQ_ID_SHFT 32 +#define FO_PCI_IMU_RDS_ERR_LOG_TLP_TAG_MASK 0x00000000ff000000ULL +#define FO_PCI_IMU_RDS_ERR_LOG_TLP_TAG_SHFT 24 +#define FO_PCI_IMU_RDS_ERR_LOG_BE_MCODE_MASK 0x0000000000ff0000ULL +#define FO_PCI_IMU_RDS_ERR_LOG_BE_MCODE_SHFT 16 +#define FO_PCI_IMU_RDS_ERR_LOG_MSI_DATA_MASK 0x000000000000ffffULL +#define FO_PCI_IMU_RDS_ERR_LOG_MSI_DATA_SHFT 0 + +/* PCI IMU SCS error log register */ +#define FO_PCI_IMU_SCS_ERR_LOG_TYPE_MASK 0xfc00000000000000ULL +#define FO_PCI_IMU_SCS_ERR_LOG_TYPE_SHFT 58 +#define FO_PCI_IMU_SCS_ERR_LOG_LENGTH_MASK 0x03ff000000000000ULL +#define FO_PCI_IMU_SCS_ERR_LOG_LENGTH_SHFT 48 +#define FO_PCI_IMU_SCS_ERR_LOG_REQ_ID_MASK 0x0000ffff00000000ULL +#define FO_PCI_IMU_SCS_ERR_LOG_REQ_ID_SHFT 32 +#define FO_PCI_IMU_SCS_ERR_LOG_TLP_TAG_MASK 0x00000000ff000000ULL +#define FO_PCI_IMU_SCS_ERR_LOG_TLP_TAG_SHFT 24 +#define FO_PCI_IMU_SCS_ERR_LOG_BE_MODE_MASK 0x0000000000ff0000ULL +#define FO_PCI_IMU_SCS_ERR_LOG_BE_MCODE_SHFT 16 +#define FO_PCI_IMU_SCS_ERR_LOG_EQ_NUM_MASK 0x000000000000003fULL +#define FO_PCI_IMU_SCS_ERR_LOG_EQ_NUM_SHFT 0 + +/* PCI IMU EQS error log register */ +#define FO_PCI_IMU_EQS_ERR_LOG_EQ_NUM_MASK 0x000000000000003fULL +#define FO_PCI_IMU_EQS_ERROR_LOG_EQ_NUM_SHFT 0 + +/* + * PCI ERR COR, ERR NONFATAL, ERR FATAL, PM PME and PME To ACK mapping + * registers + */ +#define FO_PCI_ERR_PME_V 0x8000000000000000ULL +#define FO_PCI_ERR_PME_EQNUM_MASK 0x000000000000003fULL +#define FO_PCI_ERR_PME_EQNUM_SHFT 0 + +/* PCI DMC core and block interrupt enable register */ +#define FO_PCI_DMC_CORE_BLOCK_INT_EN_DMC 0x8000000000000000ULL +#define FO_PCI_DMC_CORE_BLOCK_INT_EN_MMU 0x0000000000000002ULL +#define FO_PCI_DMC_CORE_BLOCK_INT_EN_IMU 0x0000000000000001ULL + +/* PCI DMC core and block error status register */ +#define FO_PCI_DMC_CORE_BLOCK_ERR_STAT_MMU 0x0000000000000002ULL +#define FO_PCI_DMC_CORE_BLOCK_ERR_STAT_IMU 0x0000000000000001ULL + +/* PCI multi core error status register */ +#define FO_PCI_MULTI_CORE_ERR_STAT_PEC 0x0000000000000002ULL +#define FO_PCI_MULTI_CORE_ERR_STAT_DMC 0x0000000000000001ULL + +/* PCI MSI 32-bit address register */ +#define FO_PCI_MSI_32_BIT_ADDR_MASK 0x00000000ffff0000ULL +#define FO_PCI_MSI_32_BIT_ADDR_SHFT 16 + +/* PCI MSI 64-bit address register */ +#define FO_PCI_MSI_64_BIT_ADDR_MASK 0x0000ffffffff0000ULL +#define FO_PCI_MSI_64_BIT_ADDR_SHFT 16 + +/* + * PCI MMU interrupt enable, interrupt status and error status clear + * registers + */ +#define FO_PCI_MMU_ERR_INT_S_MASK 0x0000ffff00000000ULL +#define FO_PCI_MMU_ERR_INT_S_SHFT 32 +#define FO_PCI_MMU_ERR_INT_TBW_DPE_S 0x0000800000000000ULL +#define FO_PCI_MMU_ERR_INT_TBW_ERR_S 0x0000400000000000ULL +#define FO_PCI_MMU_ERR_INT_TBW_UDE_S 0x0000200000000000ULL +#define FO_PCI_MMU_ERR_INT_TBW_DME_S 0x0000100000000000ULL +#define FO_PCI_MMU_ERR_INT_SPARE3_S 0x0000080000000000ULL +#define FO_PCI_MMU_ERR_INT_SPARE2_S 0x0000040000000000ULL +#define FO_PCI_MMU_ERR_INT_TTC_CAE_S 0x0000020000000000ULL +#define FIRE_PCI_MMU_ERR_INT_TTC_DPE_S 0x0000010000000000ULL +#define OBERON_PCI_MMU_ERR_INT_TTC_DUE_S 0x0000010000000000ULL +#define FO_PCI_MMU_ERR_INT_TTE_PRT_S 0x0000008000000000ULL +#define FO_PCI_MMU_ERR_INT_TTE_INV_S 0x0000004000000000ULL +#define FO_PCI_MMU_ERR_INT_TRN_OOR_S 0x0000002000000000ULL +#define FO_PCI_MMU_ERR_INT_TRN_ERR_S 0x0000001000000000ULL +#define FO_PCI_MMU_ERR_INT_SPARE1_S 0x0000000800000000ULL +#define FO_PCI_MMU_ERR_INT_SPARE0_S 0x0000000400000000ULL +#define FO_PCI_MMU_ERR_INT_BYP_OOR_S 0x0000000200000000ULL +#define FO_PCI_MMU_ERR_INT_BYP_ERR_S 0x0000000100000000ULL +#define FO_PCI_MMU_ERR_INT_P_MASK 0x000000000000ffffULL +#define FO_PCI_MMU_ERR_INT_P_SHFT 0 +#define FO_PCI_MMU_ERR_INT_TBW_DPE_P 0x0000000000008000ULL +#define FO_PCI_MMU_ERR_INT_TBW_ERR_P 0x0000000000004000ULL +#define FO_PCI_MMU_ERR_INT_TBW_UDE_P 0x0000000000002000ULL +#define FO_PCI_MMU_ERR_INT_TBW_DME_P 0x0000000000001000ULL +#define FO_PCI_MMU_ERR_INT_SPARE3_P 0x0000000000000800ULL +#define FO_PCI_MMU_ERR_INT_SPARE2_P 0x0000000000000400ULL +#define FO_PCI_MMU_ERR_INT_TTC_CAE_P 0x0000000000000200ULL +#define FIRE_PCI_MMU_ERR_INT_TTC_DPE_P 0x0000000000000100ULL +#define OBERON_PCI_MMU_ERR_INT_TTC_DUE_P 0x0000000000000100ULL +#define FO_PCI_MMU_ERR_INT_TTE_PRT_P 0x0000000000000080ULL +#define FO_PCI_MMU_ERR_INT_TTE_INV_P 0x0000000000000040ULL +#define FO_PCI_MMU_ERR_INT_TRN_OOR_P 0x0000000000000020ULL +#define FO_PCI_MMU_ERR_INT_TRN_ERR_P 0x0000000000000010ULL +#define FO_PCI_MMU_ERR_INT_SPARE1_P 0x0000000000000008ULL +#define FO_PCI_MMU_ERR_INT_SPARE0_P 0x0000000000000004ULL +#define FO_PCI_MMU_ERR_INT_BYP_OOR_P 0x0000000000000002ULL +#define FO_PCI_MMU_ERR_INT_BYP_ERR_P 0x0000000000000001ULL + +/* PCI MMU translation fault address register */ +#define FO_PCI_MMU_TRANS_FAULT_ADDR_VA_MASK 0xfffffffffffffffcULL +#define FO_PCI_MMU_TRANS_FAULT_ADDR_VA_SHFT 2 + +/* PCI MMU translation fault status register */ +#define FO_PCI_MMU_TRANS_FAULT_STAT_ENTRY_MASK 0x000001ff00000000ULL +#define FO_PCI_MMU_TRANS_FAULT_STAT_ENTRY_SHFT 32 +#define FO_PCI_MMU_TRANS_FAULT_STAT_TYPE_MASK 0x00000000007f0000ULL +#define FO_PCI_MMU_TRANS_FAULT_STAT_TYPE_SHFT 16 +#define FO_PCI_MMU_TRANS_FAULT_STAT_ID_MASK 0x000000000000ffffULL +#define FO_PCI_MMU_TRANS_FAULT_STAT_ID_SHFT 0 + +/* + * PCI ILU interrupt enable, interrupt status and error status clear + * registers + */ +#define FO_PCI_ILU_ERR_INT_SPARE3_S 0x0000008000000000ULL +#define FO_PCI_ILU_ERR_INT_SPARE2_S 0x0000004000000000ULL +#define FO_PCI_ILU_ERR_INT_SPARE1_S 0x0000002000000000ULL +#define FIRE_PCI_ILU_ERR_INT_IHB_PE_S 0x0000001000000000ULL +#define OBERON_PCI_ILU_ERR_INT_IHB_UE_S 0x0000001000000000ULL +#define FO_PCI_ILU_ERR_INT_SPARE3_P 0x0000000000000080ULL +#define FO_PCI_ILU_ERR_INT_SPARE2_P 0x0000000000000040ULL +#define FO_PCI_ILU_ERR_INT_SPARE1_P 0x0000000000000020ULL +#define FIRE_PCI_ILU_ERR_INT_IHB_PE_P 0x0000000000000010ULL +#define OBERON_PCI_ILU_ERR_INT_IHB_UE_P 0x0000000000000010ULL + +/* PCI DMC debug select registers for port a/b */ +#define FO_PCI_DMC_DBG_SEL_PORT_BLCK_MASK 0x00000000000003c0ULL +#define FO_PCI_DMC_DBG_SEL_PORT_BLCK_SHFT 6 +#define FO_PCI_DMC_DBG_SEL_PORT_SUB_MASK 0x0000000000000038ULL +#define FO_PCI_DMC_DBG_SEL_PORT_SUB_SHFT 3 +#define FO_PCI_DMC_DBG_SEL_PORT_SUB_SGNL_MASK 0x0000000000000007ULL +#define FO_PCI_DMC_DBG_SEL_PORT_SUB_SGNL_SHFT 0 + +/* PCI PEC core and block interrupt enable register */ +#define FO_PCI_PEC_CORE_BLOCK_INT_EN_PEC 0x8000000000000000ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_EN_ILU 0x0000000000000008ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_EN_UERR 0x0000000000000004ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_EN_CERR 0x0000000000000002ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_EN_OEVENT 0x0000000000000001ULL + +/* PCI PEC core and block interrupt status register */ +#define FO_PCI_PEC_CORE_BLOCK_INT_STAT_ILU 0x0000000000000008ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_STAT_UERR 0x0000000000000004ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_STAT_CERR 0x0000000000000002ULL +#define FO_PCI_PEC_CORE_BLOCK_INT_STAT_OEVENT 0x0000000000000001ULL + +/* PCI TLU control register */ +#define FO_PCI_TLU_CTRL_L0S_TIM_MASK 0x00000000ff000000ULL +#define FO_PCI_TLU_CTRL_L0S_TIM_SHFT 24 +#define FO_PCI_TLU_CTRL_NWPR_EN 0x0000000000100000ULL +#define FO_PCI_TLU_CTRL_CTO_SEL_MASK 0x0000000000070000ULL +#define FO_PCI_TLU_CTRL_CTO_SEL_SHFT 16 +#define FO_PCI_TLU_CTRL_CFG_MASK 0x000000000000ffffULL +#define FO_PCI_TLU_CTRL_CFG_SHFT 0 +#define FO_PCI_TLU_CTRL_CFG_REMAIN_DETECT_QUIET 0x0000000000000100ULL + +/* + * PCI TLU other event interrupt enable, interrupt status and status clear + * registers + */ +#define FO_PCI_TLU_OEVENT_S_MASK 0x00ffffff00000000ULL +#define FO_PCI_TLU_OEVENT_S_SHFT 32 +#define FO_PCI_TLU_OEVENT_SPARE_S 0x0080000000000000ULL +#define FO_PCI_TLU_OEVENT_MFC_S 0x0040000000000000ULL +#define FO_PCI_TLU_OEVENT_CTO_S 0x0020000000000000ULL +#define FO_PCI_TLU_OEVENT_NFP_S 0x0010000000000000ULL +#define FO_PCI_TLU_OEVENT_LWC_S 0x0008000000000000ULL +#define FO_PCI_TLU_OEVENT_MRC_S 0x0004000000000000ULL +#define FO_PCI_TLU_OEVENT_WUC_S 0x0002000000000000ULL +#define FO_PCI_TLU_OEVENT_RUC_S 0x0001000000000000ULL +#define FO_PCI_TLU_OEVENT_CRS_S 0x0000800000000000ULL +#define FO_PCI_TLU_OEVENT_IIP_S 0x0000400000000000ULL +#define FO_PCI_TLU_OEVENT_EDP_S 0x0000200000000000ULL +#define FIRE_PCI_TLU_OEVENT_EHP_S 0x0000100000000000ULL +#define OBERON_PCI_TLU_OEVENT_EHBUE_S 0x0000100000000000ULL +#define OBERON_PCI_TLU_OEVENT_EDBUE_S 0x0000100000000000ULL +#define FO_PCI_TLU_OEVENT_LIN_S 0x0000080000000000ULL +#define FO_PCI_TLU_OEVENT_LRS_S 0x0000040000000000ULL +#define FO_PCI_TLU_OEVENT_LDN_S 0x0000020000000000ULL +#define FO_PCI_TLU_OEVENT_LUP_S 0x0000010000000000ULL +#define FO_PCI_TLU_OEVENT_LPU_S_MASK 0x000000c000000000ULL +#define FO_PCI_TLU_OEVENT_LPU_S_SHFT 38 +#define OBERON_PCI_TLU_OEVENT_TLUEITMO_S 0x0000008000000000ULL +#define FO_PCI_TLU_OEVENT_ERU_S 0x0000002000000000ULL +#define FO_PCI_TLU_OEVENT_ERO_S 0x0000001000000000ULL +#define FO_PCI_TLU_OEVENT_EMP_S 0x0000000800000000ULL +#define FO_PCI_TLU_OEVENT_EPE_S 0x0000000400000000ULL +#define FIRE_PCI_TLU_OEVENT_ERP_S 0x0000000200000000ULL +#define OBERON_PCI_TLU_OEVENT_ERBU_S 0x0000000200000000ULL +#define FIRE_PCI_TLU_OEVENT_EIP_S 0x0000000100000000ULL +#define OBERON_PCI_TLU_OEVENT_EIUE_S 0x0000000100000000ULL +#define FO_PCI_TLU_OEVENT_P_MASK 0x0000000000ffffffULL +#define FO_PCI_TLU_OEVENT_P_SHFT 0 +#define FO_PCI_TLU_OEVENT_SPARE_P 0x0000000000800000ULL +#define FO_PCI_TLU_OEVENT_MFC_P 0x0000000000400000ULL +#define FO_PCI_TLU_OEVENT_CTO_P 0x0000000000200000ULL +#define FO_PCI_TLU_OEVENT_NFP_P 0x0000000000100000ULL +#define FO_PCI_TLU_OEVENT_LWC_P 0x0000000000080000ULL +#define FO_PCI_TLU_OEVENT_MRC_P 0x0000000000040000ULL +#define FO_PCI_TLU_OEVENT_WUC_P 0x0000000000020000ULL +#define FO_PCI_TLU_OEVENT_RUC_P 0x0000000000010000ULL +#define FO_PCI_TLU_OEVENT_CRS_P 0x0000000000008000ULL +#define FO_PCI_TLU_OEVENT_IIP_P 0x0000000000004000ULL +#define FO_PCI_TLU_OEVENT_EDP_P 0x0000000000002000ULL +#define FIRE_PCI_TLU_OEVENT_EHP_P 0x0000000000001000ULL +#define OBERON_PCI_TLU_OEVENT_EHBUE_P 0x0000000000001000ULL +#define OBERON_PCI_TLU_OEVENT_EDBUE_P 0x0000000000001000ULL +#define FO_PCI_TLU_OEVENT_LIN_P 0x0000000000000800ULL +#define FO_PCI_TLU_OEVENT_LRS_P 0x0000000000000400ULL +#define FO_PCI_TLU_OEVENT_LDN_P 0x0000000000000200ULL +#define FO_PCI_TLU_OEVENT_LUP_P 0x0000000000000100ULL +#define FO_PCI_TLU_OEVENT_LPU_P_MASK 0x00000000000000c0ULL +#define FO_PCI_TLU_OEVENT_LPU_P_SHFT 6 +#define OBERON_PCI_TLU_OEVENT_TLUEITMO_P 0x0000000000000080ULL +#define FO_PCI_TLU_OEVENT_ERU_P 0x0000000000000020ULL +#define FO_PCI_TLU_OEVENT_ERO_P 0x0000000000000010ULL +#define FO_PCI_TLU_OEVENT_EMP_P 0x0000000000000008ULL +#define FO_PCI_TLU_OEVENT_EPE_P 0x0000000000000004ULL +#define FIRE_PCI_TLU_OEVENT_ERP_P 0x0000000000000002ULL +#define OBERON_PCI_TLU_OEVENT_ERBU_P 0x0000000000000002ULL +#define FIRE_PCI_TLU_OEVENT_EIP_P 0x0000000000000001ULL +#define OBERON_PCI_TLU_OEVENT_EIUE_P 0x0000000000000001ULL + +/* PCI receive/transmit DLU/TLU other event header 1/2 log registers */ +#define FO_PCI_TLU_OEVENT_HDR_LOG_MASK 0xffffffffffffffffULL +#define FO_PCI_TLU_OEVENT_HDR_LOG_SHFT 0 + +/* PCI TLU device control register */ +#define FO_PCI_TLU_DEV_CTRL_MRRS_MASK 0x0000000000007000ULL +#define FO_PCI_TLU_DEV_CTRL_MRRS_SHFT 12 +#define FO_PCI_TLU_DEV_CTRL_MPS_MASK 0x00000000000000e0ULL +#define FO_PCI_TLU_DEV_CTRL_MPS_SHFT 5 + +/* + * PCI TLU uncorrectable error interrupt enable, interrupt status and + * status clear registers + */ +#define FO_PCI_TLU_UERR_INT_S_MASK 0x001fffff00000000ULL +#define FO_PCI_TLU_UERR_INT_S_SHFT 32 +#define FO_PCI_TLU_UERR_INT_UR_S 0x0010000000000000ULL +#define OBERON_PCI_TLU_UERR_INT_ECRC_S 0x0008000000000000ULL +#define FO_PCI_TLU_UERR_INT_MFP_S 0x0004000000000000ULL +#define FO_PCI_TLU_UERR_INT_ROF_S 0x0002000000000000ULL +#define FO_PCI_TLU_UERR_INT_UC_S 0x0001000000000000ULL +#define FO_PCI_TLU_UERR_INT_CA_S 0x0000800000000000ULL +#define FO_PCI_TLU_UERR_INT_CTO_S 0x0000400000000000ULL +#define FO_PCI_TLU_UERR_INT_FCP_S 0x0000200000000000ULL +#define FIRE_PCI_TLU_UERR_INT_PP_S 0x0000100000000000ULL +#define OBERON_PCI_TLU_UERR_INT_POIS_S 0x0000100000000000ULL +#define FO_PCI_TLU_UERR_INT_DLP_S 0x0000001000000000ULL +#define FO_PCI_TLU_UERR_INT_TE_S 0x0000000100000000ULL +#define FO_PCI_TLU_UERR_INT_P_MASK 0x00000000001fffffULL +#define FO_PCI_TLU_UERR_INT_P_SHFT 0 +#define FO_PCI_TLU_UERR_INT_UR_P 0x0000000000100000ULL +#define OBERON_PCI_TLU_UERR_INT_ECRC_P 0x0000000000080000ULL +#define FO_PCI_TLU_UERR_INT_MFP_P 0x0000000000040000ULL +#define FO_PCI_TLU_UERR_INT_ROF_P 0x0000000000020000ULL +#define FO_PCI_TLU_UERR_INT_UC_P 0x0000000000010000ULL +#define FO_PCI_TLU_UERR_INT_CA_P 0x0000000000008000ULL +#define FO_PCI_TLU_UERR_INT_CTO_P 0x0000000000004000ULL +#define FO_PCI_TLU_UERR_INT_FCP_P 0x0000000000002000ULL +#define FIRE_PCI_TLU_UERR_INT_PP_P 0x0000000000001000ULL +#define OBERON_PCI_TLU_UERR_INT_POIS_P 0x0000000000001000ULL +#define FO_PCI_TLU_UERR_INT_DLP_P 0x0000000000000010ULL +#define FO_PCI_TLU_UERR_INT_TE_P 0x0000000000000001ULL + +/* + * PCI TLU correctable error interrupt enable, interrupt status and + * status clear registers + */ +#define FO_PCI_TLU_CERR_INT_S_MASK 0x001fffff00000000ULL +#define FO_PCI_TLU_CERR_INT_S_SHFT 32 +#define FO_PCI_TLU_CERR_INT_RTO_S 0x0000100000000000ULL +#define FO_PCI_TLU_CERR_INT_RNR_S 0x0000010000000000ULL +#define FO_PCI_TLU_CERR_INT_BDP_S 0x0000008000000000ULL +#define FO_PCI_TLU_CERR_INT_BTP_S 0x0000004000000000ULL +#define FO_PCI_TLU_CERR_INT_RE_S 0x0000000100000000ULL +#define FO_PCI_TLU_CERR_INT_P_MASK 0x00000000001fffffULL +#define FO_PCI_TLU_CERR_INT_P_SHFT 0 +#define FO_PCI_TLU_CERR_INT_RTO_P 0x0000000000001000ULL +#define FO_PCI_TLU_CERR_INT_RNR_P 0x0000000000000100ULL +#define FO_PCI_TLU_CERR_INT_BDP_P 0x0000000000000080ULL +#define FO_PCI_TLU_CERR_INT_BTP_P 0x0000000000000040ULL +#define FO_PCI_TLU_CERR_INT_RE_P 0x0000000000000001ULL + +/* PCI TLU reset register */ +#define FO_PCI_LPU_RST_WE 0x0000000080000000ULL +#define FO_PCI_LPU_RST_UNUSED_MASK 0x0000000000000e00ULL +#define FO_PCI_LPU_RST_UNUSED_SHFT 9 +#define FO_PCI_LPU_RST_ERR 0x0000000000000100ULL +#define FO_PCI_LPU_RST_TXLINK 0x0000000000000080ULL +#define FO_PCI_LPU_RST_RXLINK 0x0000000000000040ULL +#define FO_PCI_LPU_RST_SMLINK 0x0000000000000020ULL +#define FO_PCI_LPU_RST_LTSSM 0x0000000000000010ULL +#define FO_PCI_LPU_RST_TXPHY 0x0000000000000008ULL +#define FO_PCI_LPU_RST_RXPHY 0x0000000000000004ULL +#define FO_PCI_LPU_RST_TXPCS 0x0000000000000002ULL +#define FO_PCI_LPU_RST_RXPCS 0x0000000000000001ULL + +/* PCI TLU link control register */ +#define FO_PCI_TLU_LNK_CTRL_EXTSYNC 0x0000000000000080ULL +#define FO_PCI_TLU_LNK_CTRL_CLK 0x0000000000000040ULL +#define FO_PCI_TLU_LNK_CTRL_RETRAIN 0x0000000000000020ULL +#define FO_PCI_TLU_LNK_CTRL_DIS 0x0000000000000010ULL +#define FO_PCI_TLU_LNK_CTRL_RCB 0x0000000000000008ULL +#define FO_PCI_TLU_LNK_CTRL_ASPM_L0S_L1S 0x0000000000000003ULL +#define FO_PCI_TLU_LNK_CTRL_ASPM_L1S 0x0000000000000002ULL +#define FO_PCI_TLU_LNK_CTRL_ASPM_L0S 0x0000000000000001ULL +#define FO_PCI_TLU_LNK_CTRL_ASPM_DIS 0x0000000000000000ULL + +/* PCI TLU link status register */ +#define FO_PCI_TLU_LNK_STAT_CLK 0x0000000000001000ULL +#define FO_PCI_TLU_LNK_STAT_TRAIN 0x0000000000000800ULL +#define FO_PCI_TLU_LNK_STAT_ERR 0x0000000000000400ULL +#define FO_PCI_TLU_LNK_STAT_WDTH_MASK 0x00000000000003f0ULL +#define FO_PCI_TLU_LNK_STAT_WDTH_SHFT 4 +#define FO_PCI_TLU_LNK_STAT_SPEED_MASK 0x000000000000000fULL +#define FO_PCI_TLU_LNK_STAT_SPEED_SHFT 0 + +/* + * PCI receive/transmit DLU/TLU uncorrectable error header 1/2 log + * registers + */ +#define FO_PCI_TLU_UERR_HDR_LOG_MASK 0xffffffffffffffffULL +#define FO_PCI_TLU_UERR_HDR_LOG_SHFT 0 + +/* PCI DLU/LPU interrupt status and mask registers */ +#define FO_PCI_LPU_INT_INT 0x0000000080000000ULL +#define FIRE_PCI_LPU_INT_PRF_CNT2_OFLW 0x0000000000000080ULL +#define FIRE_PCI_LPU_INT_PRF_CNT1_OFLW 0x0000000000000040ULL +#define FO_PCI_LPU_INT_LNK_LYR 0x0000000000000020ULL +#define FO_PCI_LPU_INT_PHY_ERR 0x0000000000000010ULL +#define FIRE_PCI_LPU_INT_LTSSM 0x0000000000000008ULL +#define FIRE_PCI_LPU_INT_PHY_TX 0x0000000000000004ULL +#define FIRE_PCI_LPU_INT_PHY_RX 0x0000000000000002ULL +#define FIRE_PCI_LPU_INT_PHY_GB 0x0000000000000001ULL + +/* PCI DLU/LPU link layer config register */ +#define FIRE_PCI_LPU_LNK_LYR_CFG_AUTO_UPDT_DIS 0x0000000000080000ULL +#define FIRE_PCI_LPU_LNK_LYR_CFG_FREQ_NAK_EN 0x0000000000040000ULL +#define FIRE_PCI_LPU_LNK_LYR_CFG_RPLY_AFTER_REQ 0x0000000000020000ULL +#define FIRE_PCI_LPU_LNK_LYR_CFG_LAT_THRS_WR_EN 0x0000000000010000ULL +#define FO_PCI_LPU_LNK_LYR_CFG_VC0_EN 0x0000000000000100ULL +#define FIRE_PCI_LPU_LNK_LYR_CFG_L0S_ADJ_FAC_EN 0x0000000000000010ULL +#define FIER_PCI_LPU_LNK_LYR_CFG_TLP_XMIT_FC_EN 0x0000000000000008ULL +#define FO_PCI_LPU_LNK_LYR_CFG_FREQ_ACK_EN 0x0000000000000004ULL +#define FO_PCI_LPU_LNK_LYR_CFG_RETRY_DIS 0x0000000000000002ULL + +/* PCI DLU/LPU link layer interrupt and status register */ +#define FO_PCI_LPU_LNK_LYR_INT_STAT_LNK_ERR_ACT 0x0000000080000000ULL +#define OBERON_PCI_LPU_LNK_LYR_INT_STAT_PBUS_PE 0x0000000000800000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_USPRTD_DLLP 0x0000000000400000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_DLLP_RX_ERR 0x0000000000200000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_BAD_DLLP 0x0000000000100000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_TLP_RX_ERR 0x0000000000040000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_SRC_ERR_TLP 0x0000000000020000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_BAD_TLP 0x0000000000010000ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_RBF_UDF_ERR 0x0000000000000200ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_RBF_OVF_ERR 0x0000000000000100ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_EG_TLPM_ERR 0x0000000000000080ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_EG_TFRM_ERR 0x0000000000000040ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_RBF_PE 0x0000000000000020ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_EGRESS_PE 0x0000000000000010ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_RPLY_TMR_TO 0x0000000000000004ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_RPLY_NUM_RO 0x0000000000000002ULL +#define FO_PCI_LPU_LNK_LYR_INT_STAT_DLNK_PES 0x0000000000000001ULL + +/* PCI DLU/LPU flow control update control register */ +#define FO_PCI_LPU_FLW_CTRL_UPDT_CTRL_FC0_C_EN 0x0000000000000004ULL +#define FO_PCI_LPU_FLW_CTRL_UPDT_CTRL_FC0_NP_EN 0x0000000000000002ULL +#define FO_PCI_LPU_FLW_CTRL_UPDT_CTRL_FC0_P_EN 0x0000000000000001ULL + +/* PCI DLU/LPU txlink ACKNAK latency timer threshold register */ +#define FO_PCI_LPU_TXLNK_FREQ_LAT_TMR_THRS_MASK 0x000000000000ffffULL +#define FO_PCI_LPU_TXLNK_FREQ_LAT_TMR_THRS_SHFT 0 + +/* PCI DLU/LPU txlink replay timer threshold register */ +#define FO_PCI_LPU_TXLNK_RPLY_TMR_THRS_MASK 0x00000000000fffffULL +#define FO_PCI_LPU_TXLNK_RPLY_TMR_THRS_SHFT 0 + +/* PCI DLU/LPU txlink FIFO pointer register */ +#define FO_PCI_LPU_TXLNK_RTR_FIFO_PTR_TL_MASK 0x00000000ffff0000ULL +#define FO_PCI_LPU_TXLNK_RTR_FIFO_PTR_TL_SHFT 16 +#define FO_PCI_LPU_TXLNK_RTR_FIFO_PTR_HD_MASK 0x000000000000ffffULL +#define FO_PCI_LPU_TXLNK_RTR_FIFO_PTR_HD_SHFT 0 + +/* PCI DLU/LPU phy layer interrupt and status register */ +#define FO_PCI_LPU_PHY_LYR_INT_STAT_PHY_LYR_ERR 0x0000000080000000ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_KC_DLLP_ERR 0x0000000000000800ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_END_POS_ERR 0x0000000000000400ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_LNK_ERR 0x0000000000000200ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_TRN_ERR 0x0000000000000100ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_EDB_DET 0x0000000000000080ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_SDP_END 0x0000000000000040ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_STP_END_EDB 0x0000000000000020ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_INVC_ERR 0x0000000000000010ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_MULTI_SDP 0x0000000000000008ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_MULTI_STP 0x0000000000000004ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_ILL_SDP_POS 0x0000000000000002ULL +#define FO_PCI_LPU_PHY_LYR_INT_STAT_ILL_STP_POS 0x0000000000000001ULL + +/* PCI DLU/LPU LTSSM config2 register */ +#define FO_PCI_LPU_LTSSM_CFG2_12_TO_MASK 0x00000000ffffffffULL +#define FO_PCI_LPU_LTSSM_CFG2_12_TO_SHFT 0 + +/* PCI DLU/LPU LTSSM config3 register */ +#define FO_PCI_LPU_LTSSM_CFG3_2_TO_MASK 0x00000000ffffffffULL +#define FO_PCI_LPU_LTSSM_CFG3_2_TO_SHFT 0 + +/* PCI DLU/LPU LTSSM config4 register */ +#define FO_PCI_LPU_LTSSM_CFG4_TRN_CTRL_MASK 0x00000000ff000000ULL +#define FO_PCI_LPU_LTSSM_CFG4_TRN_CTRL_SHFT 24 +#define FO_PCI_LPU_LTSSM_CFG4_DATA_RATE_MASK 0x0000000000ff0000ULL +#define FO_PCI_LPU_LTSSM_CFG4_DATA_RATE_SHFT 16 +#define FO_PCI_LPU_LTSSM_CFG4_N_FTS_MASK 0x000000000000ff00ULL +#define FO_PCI_LPU_LTSSM_CFG4_N_FTS_SHFT 8 +#define FO_PCI_LPU_LTSSM_CFG4_LNK_NUM_MASK 0x00000000000000ffULL +#define FO_PCI_LPU_LTSSM_CFG4_LNK_NUM_SHFT 0 + +/* PCI DLU/LPU LTSSM config5 register */ +#define FO_PCI_LPU_LTSSM_CFG5_UNUSED0_MASK 0x00000000ffffe000ULL +#define FO_PCI_LPU_LTSSM_CFG5_UNUSED0_SHFT 13 +#define FO_PCI_LPU_LTSSM_CFG5_RCV_DET_TST_MODE 0x0000000000001000ULL +#define FO_PCI_LPU_LTSSM_CFG5_POLL_CMPLNC_DIS 0x0000000000000800ULL +#define FO_PCI_LPU_LTSSM_CFG5_TX_IDLE_TX_FTS 0x0000000000000400ULL +#define FO_PCI_LPU_LTSSM_CFG5_RX_FTS_RVR_LK 0x0000000000000200ULL +#define FO_PCI_LPU_LTSSM_CFG5_UNUSED1_MASK 0x0000000000000180ULL +#define FO_PCI_LPU_LTSSM_CFG5_UNUSED1_SHFT 7 +#define FO_PCI_LPU_LTSSM_CFG5_LPBK_NTRY_ACTIVE 0x0000000000000040ULL +#define FO_PCI_LPU_LTSSM_CFG5_LPBK_NTRY_EXIT 0x0000000000000020ULL +#define FO_PCI_LPU_LTSSM_CFG5_LPBK_ACTIVE_EXIT 0x0000000000000010ULL +#define FO_PCI_LPU_LTSSM_CFG5_L1_IDLE_RCVRY_LK 0x0000000000000008ULL +#define FO_PCI_LPU_LTSSM_CFG5_L0_TRN_CNTRL_RST 0x0000000000000004ULL +#define FO_PCI_LPU_LTSSM_CFG5_L0_LPBK 0x0000000000000002ULL +#define FO_PCI_LPU_LTSSM_CFG5_UNUSED2 0x0000000000000001ULL + +/* Controller configuration and status registers */ +#define FIRE_JBUS_PAR_CTRL 0x60010 +#define FO_XBC_ERR_LOG_EN 0x61000 +#define FO_XBC_INT_EN 0x61008 +#define FO_XBC_INT_STAT 0x61010 +#define FO_XBC_ERR_STAT_CLR 0x61018 +#define FIRE_JBC_FATAL_RST_EN 0x61028 +#define FIRE_JBCINT_ITRANS_ERR_LOG 0x61040 +#define FIRE_JBCINT_ITRANS_ERR_LOG2 0x61048 +#define FIRE_JBCINT_OTRANS_ERR_LOG 0x61040 +#define FIRE_JBCINT_OTRANS_ERR_LOG2 0x61048 +#define FIRE_FATAL_ERR_LOG 0x61050 +#define FIRE_FATAL_ERR_LOG2 0x61058 +#define FIRE_MERGE_TRANS_ERR_LOG 0x61060 +#define FIRE_DMCINT_ODCD_ERR_LOG 0x61068 +#define FIRE_DMCINT_IDC_ERR_LOG 0x61070 +#define FIRE_JBC_CSR_ERR_LOG 0x61078 +#define FIRE_JBC_CORE_BLOCK_INT_EN 0x61800 +#define FIRE_JBC_CORE_BLOCK_ERR_STAT 0x61808 +#define FO_XBC_PRF_CNT_SEL 0x62000 +#define FO_XBC_PRF_CNT0 0x62008 +#define FO_XBC_PRF_CNT1 0x62010 + +/* JBus parity control register */ +#define FIRE_JBUS_PAR_CTRL_P_EN 0x8000000000000000ULL +#define FIRE_JBUS_PAR_CTRL_INVRTD_PAR_MASK 0x000000000000003cULL +#define FIRE_JBUS_PAR_CTRL_INVRTD_PAR_SHFT 2 +#define FIRE_JBUS_PAR_CTRL_NEXT_DATA 0x0000000000000002ULL +#define FIRE_JBUS_PAR_CTRL_NEXT_ADDR 0x0000000000000001ULL + +/* JBC error log enable register - may also apply to UBC */ +#define FIRE_JBC_ERR_LOG_EN_SPARE_MASK 0x00000000e0000000ULL +#define FIRE_JBC_ERR_LOG_EN_SPARE_SHFT 29 +#define FIRE_JBC_ERR_LOG_EN_PIO_UNMAP_RD 0x0000000010000000ULL +#define FIRE_JBC_ERR_LOG_EN_ILL_ACC_RD 0x0000000008000000ULL +#define FIRE_JBC_ERR_LOG_EN_EBUS_TO 0x0000000004000000ULL +#define FIRE_JBC_ERR_LOG_EN_MB_PEA 0x0000000002000000ULL +#define FIRE_JBC_ERR_LOG_EN_MB_PER 0x0000000001000000ULL +#define FIRE_JBC_ERR_LOG_EN_MB_PEW 0x0000000000800000ULL +#define FIRE_JBC_ERR_LOG_EN_UE_ASYN 0x0000000000400000ULL +#define FIRE_JBC_ERR_LOG_EN_CE_ASYN 0x0000000000200000ULL +#define FIRE_JBC_ERR_LOG_EN_JTE 0x0000000000100000ULL +#define FIRE_JBC_ERR_LOG_EN_JBE 0x0000000000080000ULL +#define FIRE_JBC_ERR_LOG_EN_JUE 0x0000000000040000ULL +#define FIRE_JBC_ERR_LOG_EN_IJP 0x0000000000020000ULL +#define FIRE_JBC_ERR_LOG_EN_ICISE 0x0000000000010000ULL +#define FIRE_JBC_ERR_LOG_EN_CPE 0x0000000000008000ULL +#define FIRE_JBC_ERR_LOG_EN_APE 0x0000000000004000ULL +#define FIRE_JBC_ERR_LOG_EN_WR_DPE 0x0000000000002000ULL +#define FIRE_JBC_ERR_LOG_EN_RD_DPE 0x0000000000001000ULL *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 22:19:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57C481065672; Fri, 15 Jan 2010 22:19:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 464078FC14; Fri, 15 Jan 2010 22:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FMJpY2006197; Fri, 15 Jan 2010 22:19:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FMJppK006195; Fri, 15 Jan 2010 22:19:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001152219.o0FMJppK006195@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 15 Jan 2010 22:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202421 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 22:19:51 -0000 Author: kib Date: Fri Jan 15 22:19:51 2010 New Revision: 202421 URL: http://svn.freebsd.org/changeset/base/202421 Log: MFC r201890: Set md_ldt after md_ldt_sd is populated. Modified: stable/8/sys/amd64/amd64/sys_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/sys_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/sys_machdep.c Fri Jan 15 21:45:55 2010 (r202420) +++ stable/8/sys/amd64/amd64/sys_machdep.c Fri Jan 15 22:19:51 2010 (r202421) @@ -420,13 +420,14 @@ user_ldt_alloc(struct proc *p, int force return (pldt); } - mdp->md_ldt = new_ldt; if (pldt != NULL) { bcopy(pldt->ldt_base, new_ldt->ldt_base, max_ldt_segment * sizeof(struct user_segment_descriptor)); user_ldt_derefl(pldt); } ssdtosyssd(&sldt, &p->p_md.md_ldt_sd); + atomic_store_rel_ptr((volatile uintptr_t *)&mdp->md_ldt, + (uintptr_t)new_ldt); if (p == curproc) set_user_ldt(mdp); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 23:52:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5AE510656B6; Fri, 15 Jan 2010 23:52:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3AFB8FC1D; Fri, 15 Jan 2010 23:52:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FNqVhA026796; Fri, 15 Jan 2010 23:52:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FNqVed026795; Fri, 15 Jan 2010 23:52:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001152352.o0FNqVed026795@svn.freebsd.org> From: Alexander Motin Date: Fri, 15 Jan 2010 23:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202425 - stable/8/sbin/geom/class/stripe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 23:52:32 -0000 Author: mav Date: Fri Jan 15 23:52:31 2010 New Revision: 202425 URL: http://svn.freebsd.org/changeset/base/202425 Log: MFC r201658: Increase default block size from 4K to 64K. It was reduces 6 yeard ago, when trees were big and FAST mode was enabled by default. So small block size doesn't benefits linear I/O operations in FAST and significantly slowdowns in ECONOMIC (default) mode. For single stream random I/Os so small block doesn't give much benefits, as access time is usually bigger then transfer time there. Same time it requires all heads to seek together for every single request, reducing performance on parallel load. Modified: stable/8/sbin/geom/class/stripe/geom_stripe.c Directory Properties: stable/8/sbin/geom/class/stripe/ (props changed) Modified: stable/8/sbin/geom/class/stripe/geom_stripe.c ============================================================================== --- stable/8/sbin/geom/class/stripe/geom_stripe.c Fri Jan 15 23:03:51 2010 (r202424) +++ stable/8/sbin/geom/class/stripe/geom_stripe.c Fri Jan 15 23:52:31 2010 (r202425) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_STRIPE_VERSION; -static intmax_t default_stripesize = 4096; +static intmax_t default_stripesize = 65536; static void stripe_main(struct gctl_req *req, unsigned flags); static void stripe_clear(struct gctl_req *req); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 23:54:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AB33106566B; Fri, 15 Jan 2010 23:54:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78CF98FC14; Fri, 15 Jan 2010 23:54:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FNsEwA027211; Fri, 15 Jan 2010 23:54:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FNsEkI027209; Fri, 15 Jan 2010 23:54:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001152354.o0FNsEkI027209@svn.freebsd.org> From: Alexander Motin Date: Fri, 15 Jan 2010 23:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202426 - stable/7/sbin/geom/class/stripe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 23:54:14 -0000 Author: mav Date: Fri Jan 15 23:54:14 2010 New Revision: 202426 URL: http://svn.freebsd.org/changeset/base/202426 Log: MFC r201658: Increase default block size from 4K to 64K. It was reduces 6 yeard ago, when trees were big and FAST mode was enabled by default. So small block size doesn't benefits linear I/O operations in FAST and significantly slowdowns in ECONOMIC (default) mode. For single stream random I/Os so small block doesn't give much benefits, as access time is usually bigger then transfer time there. Same time it requires all heads to seek together for every single request, reducing performance on parallel load. Modified: stable/7/sbin/geom/class/stripe/geom_stripe.c Directory Properties: stable/7/sbin/geom/class/stripe/ (props changed) Modified: stable/7/sbin/geom/class/stripe/geom_stripe.c ============================================================================== --- stable/7/sbin/geom/class/stripe/geom_stripe.c Fri Jan 15 23:52:31 2010 (r202425) +++ stable/7/sbin/geom/class/stripe/geom_stripe.c Fri Jan 15 23:54:14 2010 (r202426) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_STRIPE_VERSION; -static intmax_t default_stripesize = 4096; +static intmax_t default_stripesize = 65536; static void stripe_main(struct gctl_req *req, unsigned flags); static void stripe_clear(struct gctl_req *req); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 23:56:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D7B81065693; Fri, 15 Jan 2010 23:56:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B9548FC0A; Fri, 15 Jan 2010 23:56:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FNuK52027732; Fri, 15 Jan 2010 23:56:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FNuK7V027728; Fri, 15 Jan 2010 23:56:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001152356.o0FNuK7V027728@svn.freebsd.org> From: Alexander Motin Date: Fri, 15 Jan 2010 23:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202427 - in stable/8/sys/geom: . part uzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 23:56:20 -0000 Author: mav Date: Fri Jan 15 23:56:19 2010 New Revision: 202427 URL: http://svn.freebsd.org/changeset/base/202427 Log: MFC r201645: Change the way in which zero stripesize is handled. Instead of reporting zero stripeoffset in such case (as if device has no stripes), report offset from the beginning of the media (as if device has single infinite stripe). This gives partitioning tools information, required to guess better partition alignment, in case if hardware doesn't report it's stripe size. For example, it should give disklabel info about odd offset made by fdisk. Modified: stable/8/sys/geom/geom_slice.c stable/8/sys/geom/part/g_part.c stable/8/sys/geom/uzip/g_uzip.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/geom_slice.c ============================================================================== --- stable/8/sys/geom/geom_slice.c Fri Jan 15 23:54:14 2010 (r202426) +++ stable/8/sys/geom/geom_slice.c Fri Jan 15 23:56:19 2010 (r202427) @@ -393,10 +393,10 @@ g_slice_config(struct g_geom *gp, u_int pp = g_new_providerf(gp, sbuf_data(sb)); pp2 = LIST_FIRST(&gp->consumer)->provider; pp->flags = pp2->flags & G_PF_CANDELETE; - if (pp2->stripesize > 0) { - pp->stripesize = pp2->stripesize; - pp->stripeoffset = (pp2->stripeoffset + offset) % pp->stripesize; - } + pp->stripesize = pp2->stripesize; + pp->stripeoffset = pp2->stripeoffset + offset; + if (pp->stripesize > 0) + pp->stripeoffset %= pp->stripesize; if (0 && bootverbose) printf("GEOM: Configure %s, start %jd length %jd end %jd\n", pp->name, (intmax_t)offset, (intmax_t)length, Modified: stable/8/sys/geom/part/g_part.c ============================================================================== --- stable/8/sys/geom/part/g_part.c Fri Jan 15 23:54:14 2010 (r202426) +++ stable/8/sys/geom/part/g_part.c Fri Jan 15 23:56:19 2010 (r202427) @@ -268,11 +268,10 @@ g_part_new_provider(struct g_geom *gp, s entry->gpe_pp->mediasize -= entry->gpe_offset - offset; entry->gpe_pp->sectorsize = pp->sectorsize; entry->gpe_pp->flags = pp->flags & G_PF_CANDELETE; - if (pp->stripesize > 0) { - entry->gpe_pp->stripesize = pp->stripesize; - entry->gpe_pp->stripeoffset = (pp->stripeoffset + - entry->gpe_offset) % pp->stripesize; - } + entry->gpe_pp->stripesize = pp->stripesize; + entry->gpe_pp->stripeoffset = pp->stripeoffset + entry->gpe_offset; + if (pp->stripesize > 0) + entry->gpe_pp->stripeoffset %= pp->stripesize; g_error_provider(entry->gpe_pp, 0); } Modified: stable/8/sys/geom/uzip/g_uzip.c ============================================================================== --- stable/8/sys/geom/uzip/g_uzip.c Fri Jan 15 23:54:14 2010 (r202426) +++ stable/8/sys/geom/uzip/g_uzip.c Fri Jan 15 23:56:19 2010 (r202427) @@ -467,10 +467,8 @@ g_uzip_taste(struct g_class *mp, struct pp2->sectorsize = 512; pp2->mediasize = (off_t)sc->nblocks * sc->blksz; pp2->flags = pp->flags & G_PF_CANDELETE; - if (pp->stripesize > 0) { - pp2->stripesize = pp->stripesize; - pp2->stripeoffset = pp->stripeoffset; - } + pp2->stripesize = pp->stripesize; + pp2->stripeoffset = pp->stripeoffset; g_error_provider(pp2, 0); g_access(cp, -1, 0, 0); From owner-svn-src-all@FreeBSD.ORG Fri Jan 15 23:58:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3B611065670; Fri, 15 Jan 2010 23:58:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1E848FC14; Fri, 15 Jan 2010 23:58:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0FNwbBH028267; Fri, 15 Jan 2010 23:58:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0FNwbHH028265; Fri, 15 Jan 2010 23:58:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001152358.o0FNwbHH028265@svn.freebsd.org> From: Alexander Motin Date: Fri, 15 Jan 2010 23:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202428 - stable/8/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 23:58:37 -0000 Author: mav Date: Fri Jan 15 23:58:37 2010 New Revision: 202428 URL: http://svn.freebsd.org/changeset/base/202428 Log: MFC r202011: While AHCI specification tells that multi-vector MSI doesn't use global IS register, nVidia chipsets have different oppinion, requiring every interrupt to be acknowledged there. While there, add interrupt descriptions in multi-vector MSI mode. Modified: stable/8/sys/dev/ahci/ahci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Fri Jan 15 23:56:19 2010 (r202427) +++ stable/8/sys/dev/ahci/ahci.c Fri Jan 15 23:58:37 2010 (r202428) @@ -570,6 +570,12 @@ ahci_setup_interrupt(device_t dev) device_printf(dev, "unable to setup interrupt\n"); return ENXIO; } + if (ctlr->numirqs > 1) { + bus_describe_intr(dev, ctlr->irqs[i].r_irq, + ctlr->irqs[i].handle, + ctlr->irqs[i].mode == AHCI_IRQ_MODE_ONE ? + "ch%d" : "%d", i); + } } return (0); } @@ -624,8 +630,14 @@ ahci_intr_one(void *data) int unit; unit = irq->r_irq_rid - 1; + /* Some controllers have edge triggered IS. */ + if (ctlr->quirks & AHCI_Q_EDGEIS) + ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); if ((arg = ctlr->interrupt[unit].argument)) ctlr->interrupt[unit].function(arg); + /* AHCI declares level triggered IS. */ + if (!(ctlr->quirks & AHCI_Q_EDGEIS)) + ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); } static struct resource * From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 01:37:08 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57E031065672; Sat, 16 Jan 2010 01:37:08 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp6.server.rpi.edu (smtp6.server.rpi.edu [128.113.2.226]) by mx1.freebsd.org (Postfix) with ESMTP id EDA6E8FC08; Sat, 16 Jan 2010 01:37:07 +0000 (UTC) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp6.server.rpi.edu (8.13.1/8.13.1) with ESMTP id o0G1awAu013377; Fri, 15 Jan 2010 20:36:59 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <86DE85B0-2556-48A3-8AB0-C4969823A93E@mac.com> References: <20100115.110528.849557997928257031.imp@bsdimp.com> <20100115.124809.21010533849792633.imp@bsdimp.com> <86DE85B0-2556-48A3-8AB0-C4969823A93E@mac.com> Date: Fri, 15 Jan 2010 20:36:57 -0500 To: Marcel Moolenaar , "M. Warner Losh" From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Bayes-Prob: 0.0001 (Score 0) X-RPI-SA-Score: 0.70 () [Hold at 20.00] COMBINED_FROM,J_CHICKENPOX_72 X-CanItPRO-Stream: outgoing X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.226 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, rwatson@FreeBSD.org, freebsd-arch@FreeBSD.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 01:37:08 -0000 At the risk of sounding overly simplistic, how hard is it to just go ahead and include both versions? In my current /boot/kernel/kernel , it looks like there's 2675 bytes of CONFIG_AUTOGENERATED lines. My original config file is 13540 bytes. I don't see that there's all that much pain in including both versions, maybe with an extra separator-line or two added in. And personally, I feel that both versions are useful to have. Then have OPTIONs for those who only wanted the original config, or only wanted the autogen'ed version, or who don't want either version. -- Garance Alistair Drosehn = drosehn@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 04:24:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C7A91065694; Sat, 16 Jan 2010 04:24:10 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 522A28FC1E; Sat, 16 Jan 2010 04:24:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0G4OARj086746; Sat, 16 Jan 2010 04:24:10 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0G4OAqO086744; Sat, 16 Jan 2010 04:24:10 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001160424.o0G4OAqO086744@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 16 Jan 2010 04:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202429 - stable/8/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 04:24:10 -0000 Author: marcel Date: Sat Jan 16 04:24:10 2010 New Revision: 202429 URL: http://svn.freebsd.org/changeset/base/202429 Log: MFC rev 201937: Implement the fo_readdir method. Modified: stable/8/lib/libstand/dosfs.c Directory Properties: stable/8/lib/libstand/ (props changed) Modified: stable/8/lib/libstand/dosfs.c ============================================================================== --- stable/8/lib/libstand/dosfs.c Fri Jan 15 23:58:37 2010 (r202428) +++ stable/8/lib/libstand/dosfs.c Sat Jan 16 04:24:10 2010 (r202429) @@ -47,6 +47,7 @@ static int dos_close(struct open_file *f static int dos_read(struct open_file *fd, void *buf, size_t size, size_t *resid); static off_t dos_seek(struct open_file *fd, off_t offset, int whence); static int dos_stat(struct open_file *fd, struct stat *sb); +static int dos_readdir(struct open_file *fd, struct dirent *d); struct fs_ops dosfs_fsops = { "dosfs", @@ -56,7 +57,7 @@ struct fs_ops dosfs_fsops = { null_write, dos_seek, dos_stat, - null_readdir + dos_readdir }; #define SECSIZ 512 /* sector size */ @@ -354,6 +355,72 @@ dos_stat(struct open_file *fd, struct st return (0); } +static int +dos_readdir(struct open_file *fd, struct dirent *d) +{ + DOS_FILE *f = (DOS_FILE *)fd->f_fsdata; + u_char fn[261]; + DOS_DIR dd; + size_t res; + u_int chk, i, x, xdn; + int err; + + x = chk = 0; + while (1) { + xdn = x; + x = 0; + err = dos_read(fd, &dd, sizeof(dd), &res); + if (err) + return (err); + if (res == sizeof(dd)) + return (ENOENT); + if (dd.de.name[0] == 0) + return (ENOENT); + + /* Skip deleted entries */ + if (dd.de.name[0] == 0xe5) + continue; + + /* Skip volume labels */ + if (dd.de.attr & FA_LABEL) + continue; + + if ((dd.de.attr & FA_MASK) == FA_XDE) { + if (dd.xde.seq & 0x40) + chk = dd.xde.chk; + else if (dd.xde.seq != xdn - 1 || dd.xde.chk != chk) + continue; + x = dd.xde.seq & ~0x40; + if (x < 1 || x > 20) { + x = 0; + continue; + } + cp_xdnm(fn, &dd.xde); + } else { + if (xdn == 1) { + x = 0; + for (i = 0; i < 11; i++) { + x = ((x & 1) << 7) | (x >> 1); + x += dd.de.name[i]; + x &= 0xff; + } + if (x == chk) + break; + } else { + cp_sfn(fn, &dd.de); + break; + } + x = 0; + } + } + + d->d_fileno = dd.de.clus[1] << 8 + dd.de.clus[0]; + d->d_reclen = sizeof(*d); + d->d_type = (dd.de.attr & FA_DIR) ? DT_DIR : DT_REG; + memcpy(d->d_name, fn, sizeof(d->d_name)); + return(0); +} + /* * Parse DOS boot sector */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 04:34:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74CA71065692; Sat, 16 Jan 2010 04:34:03 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61B128FC08; Sat, 16 Jan 2010 04:34:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0G4Y3oR088962; Sat, 16 Jan 2010 04:34:03 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0G4Y36f088954; Sat, 16 Jan 2010 04:34:03 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001160434.o0G4Y36f088954@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 16 Jan 2010 04:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202430 - in stable/8/sys/boot: common efi/include efi/libefi ia64/efi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 04:34:03 -0000 Author: marcel Date: Sat Jan 16 04:34:03 2010 New Revision: 202430 URL: http://svn.freebsd.org/changeset/base/202430 Log: MFC rev 201941: Remove file system support based on the simple file system protocol. MFC rev 201966: Remove debugging printf(). Added: stable/8/sys/boot/efi/libefi/efipart.c - copied unchanged from r201941, head/sys/boot/efi/libefi/efipart.c Deleted: stable/8/sys/boot/efi/libefi/efifs.c Modified: stable/8/sys/boot/common/bootstrap.h stable/8/sys/boot/efi/include/efilib.h stable/8/sys/boot/efi/libefi/Makefile stable/8/sys/boot/ia64/efi/conf.c stable/8/sys/boot/ia64/efi/main.c stable/8/sys/boot/ia64/efi/version Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/common/bootstrap.h ============================================================================== --- stable/8/sys/boot/common/bootstrap.h Sat Jan 16 04:24:10 2010 (r202429) +++ stable/8/sys/boot/common/bootstrap.h Sat Jan 16 04:34:03 2010 (r202430) @@ -45,6 +45,7 @@ struct devdesc #define DEVT_CD 3 #define DEVT_ZFS 4 int d_unit; + void *d_opendata; }; /* Commands and return values; nonzero return sets command_errmsg != NULL */ Modified: stable/8/sys/boot/efi/include/efilib.h ============================================================================== --- stable/8/sys/boot/efi/include/efilib.h Sat Jan 16 04:24:10 2010 (r202429) +++ stable/8/sys/boot/efi/include/efilib.h Sat Jan 16 04:34:03 2010 (r202430) @@ -34,9 +34,7 @@ extern EFI_SYSTEM_TABLE *ST; extern EFI_BOOT_SERVICES *BS; extern EFI_RUNTIME_SERVICES *RS; -extern struct devsw efifs_dev; -extern struct fs_ops efifs_fsops; - +extern struct devsw efipart_dev; extern struct devsw efinet_dev; extern struct netif_driver efinetif; Modified: stable/8/sys/boot/efi/libefi/Makefile ============================================================================== --- stable/8/sys/boot/efi/libefi/Makefile Sat Jan 16 04:24:10 2010 (r202429) +++ stable/8/sys/boot/efi/libefi/Makefile Sat Jan 16 04:34:03 2010 (r202430) @@ -3,8 +3,8 @@ LIB= efi INTERNALLIB= -SRCS= delay.c efi_console.c efifs.c efinet.c errno.c handles.c libefi.c \ - time.c +SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \ + libefi.c time.c CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH:S/amd64/i386/} Copied: stable/8/sys/boot/efi/libefi/efipart.c (from r201941, head/sys/boot/efi/libefi/efipart.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/boot/efi/libefi/efipart.c Sat Jan 16 04:34:03 2010 (r202430, copy of r201941, head/sys/boot/efi/libefi/efipart.c) @@ -0,0 +1,265 @@ +/*- + * Copyright (c) 2010 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +#include +#include +#include + +static EFI_GUID blkio_guid = BLOCK_IO_PROTOCOL; + +static int efipart_init(void); +static int efipart_strategy(void *, int, daddr_t, size_t, char *, size_t *); +static int efipart_open(struct open_file *, ...); +static int efipart_close(struct open_file *); +static void efipart_print(int); + +struct devsw efipart_dev = { + .dv_name = "part", + .dv_type = DEVT_DISK, + .dv_init = efipart_init, + .dv_strategy = efipart_strategy, + .dv_open = efipart_open, + .dv_close = efipart_close, + .dv_ioctl = noioctl, + .dv_print = efipart_print, + .dv_cleanup = NULL +}; + +static int +efipart_init(void) +{ + EFI_BLOCK_IO *blkio; + EFI_HANDLE *hin, *hout; + EFI_STATUS status; + UINTN sz; + u_int n, nin, nout; + int err; + + sz = 0; + status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, 0); + if (status == EFI_BUFFER_TOO_SMALL) { + hin = (EFI_HANDLE *)malloc(sz * 2); + status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, + hin); + if (EFI_ERROR(status)) + free(hin); + } + if (EFI_ERROR(status)) + return (efi_status_to_errno(status)); + + /* Filter handles to only include FreeBSD partitions. */ + nin = sz / sizeof(EFI_HANDLE); + hout = hin + nin; + nout = 0; + + for (n = 0; n < nin; n++) { + status = BS->HandleProtocol(hin[n], &blkio_guid, &blkio); + if (EFI_ERROR(status)) + continue; + if (!blkio->Media->LogicalPartition) + continue; + hout[nout] = hin[n]; + nout++; + } + + err = efi_register_handles(&efipart_dev, hout, nout); + free(hin); + return (err); +} + +static void +efipart_print(int verbose) +{ + char line[80]; + EFI_BLOCK_IO *blkio; + EFI_HANDLE h; + EFI_STATUS status; + u_int unit; + + for (unit = 0, h = efi_find_handle(&efipart_dev, 0); + h != NULL; h = efi_find_handle(&efipart_dev, ++unit)) { + sprintf(line, " %s%d:", efipart_dev.dv_name, unit); + pager_output(line); + + status = BS->HandleProtocol(h, &blkio_guid, &blkio); + if (!EFI_ERROR(status)) { + sprintf(line, " %llu blocks", + (unsigned long long)(blkio->Media->LastBlock + 1)); + pager_output(line); + if (blkio->Media->RemovableMedia) + pager_output(" (removable)"); + } + pager_output("\n"); + } +} + +static int +efipart_open(struct open_file *f, ...) +{ + va_list args; + struct devdesc *dev; + EFI_BLOCK_IO *blkio; + EFI_HANDLE h; + EFI_STATUS status; + + va_start(args, f); + dev = va_arg(args, struct devdesc*); + va_end(args); + + h = efi_find_handle(&efipart_dev, dev->d_unit); + if (h == NULL) + return (EINVAL); + + status = BS->HandleProtocol(h, &blkio_guid, &blkio); + if (EFI_ERROR(status)) + return (efi_status_to_errno(status)); + + if (!blkio->Media->MediaPresent) + return (EAGAIN); + + dev->d_opendata = blkio; + return (0); +} + +static int +efipart_close(struct open_file *f) +{ + struct devdesc *dev; + + dev = (struct devdesc *)(f->f_devdata); + if (dev->d_opendata == NULL) + return (EINVAL); + + dev->d_opendata = NULL; + return (0); +} + +/* + * efipart_readwrite() + * Internal equivalent of efipart_strategy(), which operates on the + * media-native block size. This function expects all I/O requests + * to be within the media size and returns an error if such is not + * the case. + */ +static int +efipart_readwrite(EFI_BLOCK_IO *blkio, int rw, daddr_t blk, daddr_t nblks, + char *buf) +{ + EFI_STATUS status; + + if (blkio == NULL) + return (ENXIO); + if (blk < 0 || blk > blkio->Media->LastBlock) + return (EIO); + if ((blk + nblks - 1) > blkio->Media->LastBlock) + return (EIO); + + switch (rw) { + case F_READ: + status = blkio->ReadBlocks(blkio, blkio->Media->MediaId, blk, + nblks * blkio->Media->BlockSize, buf); + break; + case F_WRITE: + if (blkio->Media->ReadOnly) + return (EROFS); + status = blkio->WriteBlocks(blkio, blkio->Media->MediaId, blk, + nblks * blkio->Media->BlockSize, buf); + break; + default: + return (ENOSYS); + } + + if (EFI_ERROR(status)) + printf("%s: rw=%d, status=%lu\n", __func__, rw, status); + return (efi_status_to_errno(status)); +} + +static int +efipart_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf, + size_t *rsize) +{ + struct devdesc *dev = (struct devdesc *)devdata; + EFI_BLOCK_IO *blkio; + off_t off; + char *blkbuf; + size_t blkoff, blksz; + int error; + + if (dev == NULL || blk < 0) + return (EINVAL); + + blkio = dev->d_opendata; + if (blkio == NULL) + return (ENXIO); + + if (size == 0 || (size % 512) != 0) + return (EIO); + + if (rsize != NULL) + *rsize = size; + + if (blkio->Media->BlockSize == 512) + return (efipart_readwrite(blkio, rw, blk, size / 512, buf)); + + /* + * The block size of the media is not 512B per sector. + */ + blkbuf = malloc(blkio->Media->BlockSize); + if (blkbuf == NULL) + return (ENOMEM); + + error = 0; + off = blk * 512; + blk = off / blkio->Media->BlockSize; + blkoff = off % blkio->Media->BlockSize; + blksz = blkio->Media->BlockSize - blkoff; + while (size > 0) { + error = efipart_readwrite(blkio, rw, blk, 1, blkbuf); + if (error) + break; + if (size < blksz) + blksz = size; + bcopy(blkbuf + blkoff, buf, blksz); + buf += blksz; + size -= blksz; + blk++; + blkoff = 0; + blksz = blkio->Media->BlockSize; + } + + free(blkbuf); + return (error); +} Modified: stable/8/sys/boot/ia64/efi/conf.c ============================================================================== --- stable/8/sys/boot/ia64/efi/conf.c Sat Jan 16 04:24:10 2010 (r202429) +++ stable/8/sys/boot/ia64/efi/conf.c Sat Jan 16 04:34:03 2010 (r202430) @@ -49,15 +49,16 @@ __FBSDID("$FreeBSD$"); /* Exported for libstand */ struct devsw *devsw[] = { - &efifs_dev, + &efipart_dev, &efinet_dev, NULL }; struct fs_ops *file_system[] = { - &efifs_fsops, - &nfs_fsops, + &dosfs_fsops, &ufs_fsops, + &cd9660_fsops, + &nfs_fsops, &gzipfs_fsops, NULL }; Modified: stable/8/sys/boot/ia64/efi/main.c ============================================================================== --- stable/8/sys/boot/ia64/efi/main.c Sat Jan 16 04:24:10 2010 (r202429) +++ stable/8/sys/boot/ia64/efi/main.c Sat Jan 16 04:34:03 2010 (r202430) @@ -127,8 +127,6 @@ main(int argc, CHAR16 *argv[]) /* Get our loaded image protocol interface structure. */ BS->HandleProtocol(IH, &imgid, (VOID**)&img); - printf("Image base: 0x%016lx\n", (u_long)img->ImageBase); - printf("\n"); printf("%s, Revision %s\n", bootprog_name, bootprog_rev); printf("(%s, %s)\n", bootprog_maker, bootprog_date); Modified: stable/8/sys/boot/ia64/efi/version ============================================================================== --- stable/8/sys/boot/ia64/efi/version Sat Jan 16 04:24:10 2010 (r202429) +++ stable/8/sys/boot/ia64/efi/version Sat Jan 16 04:34:03 2010 (r202430) @@ -3,6 +3,9 @@ $FreeBSD$ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important. Make sure the current version number is on line 6. +2.0: Provide devices based on the block I/O protocol, rather than the + simple file services protocol. Use the FreeBSD file system code + on top of those devices to access files. 1.2: Restructured. Has some user visible differences. 1.1: Pass the HCDP table address to the kernel via bootinfo if one is present in the EFI system table. From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 07:55:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C693D1065679; Sat, 16 Jan 2010 07:55:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4CDF8FC08; Sat, 16 Jan 2010 07:55:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0G7tkmW033289; Sat, 16 Jan 2010 07:55:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0G7tkUV033288; Sat, 16 Jan 2010 07:55:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001160755.o0G7tkUV033288@svn.freebsd.org> From: Alexander Motin Date: Sat, 16 Jan 2010 07:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202431 - stable/8/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 07:55:46 -0000 Author: mav Date: Sat Jan 16 07:55:46 2010 New Revision: 202431 URL: http://svn.freebsd.org/changeset/base/202431 Log: Partially revert r202428. There is no bus_describe_intr() on RELENG_8. Modified: stable/8/sys/dev/ahci/ahci.c Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sat Jan 16 04:34:03 2010 (r202430) +++ stable/8/sys/dev/ahci/ahci.c Sat Jan 16 07:55:46 2010 (r202431) @@ -570,12 +570,6 @@ ahci_setup_interrupt(device_t dev) device_printf(dev, "unable to setup interrupt\n"); return ENXIO; } - if (ctlr->numirqs > 1) { - bus_describe_intr(dev, ctlr->irqs[i].r_irq, - ctlr->irqs[i].handle, - ctlr->irqs[i].mode == AHCI_IRQ_MODE_ONE ? - "ch%d" : "%d", i); - } } return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 09:17:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A413D106566C; Sat, 16 Jan 2010 09:17:33 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 913D98FC0A; Sat, 16 Jan 2010 09:17:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0G9HX72051279; Sat, 16 Jan 2010 09:17:33 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0G9HXQZ051277; Sat, 16 Jan 2010 09:17:33 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001160917.o0G9HXQZ051277@svn.freebsd.org> From: Christian Brueffer Date: Sat, 16 Jan 2010 09:17:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202434 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 09:17:33 -0000 Author: brueffer Date: Sat Jan 16 09:17:33 2010 New Revision: 202434 URL: http://svn.freebsd.org/changeset/base/202434 Log: MFC: r201888 bridge(4) acts like a switch, not like a hub. Modified: stable/8/share/man/man4/bridge.4 Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) Modified: stable/8/share/man/man4/bridge.4 ============================================================================== --- stable/8/share/man/man4/bridge.4 Sat Jan 16 08:23:09 2010 (r202433) +++ stable/8/share/man/man4/bridge.4 Sat Jan 16 09:17:33 2010 (r202434) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2009 +.Dd January 9, 2010 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -111,7 +111,7 @@ by-default. A bridge can be used to provide several services, such as a simple 802.11-to-Ethernet bridge for wireless hosts, and traffic isolation. .Pp -A bridge works like a hub, forwarding traffic from one interface +A bridge works like a switch, forwarding traffic from one interface to another. Multicast and broadcast packets are always forwarded to all interfaces that are part of the bridge. From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 09:24:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81B25106566C; Sat, 16 Jan 2010 09:24:12 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EF658FC14; Sat, 16 Jan 2010 09:24:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0G9OCFV052841; Sat, 16 Jan 2010 09:24:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0G9OCJM052839; Sat, 16 Jan 2010 09:24:12 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001160924.o0G9OCJM052839@svn.freebsd.org> From: Christian Brueffer Date: Sat, 16 Jan 2010 09:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202435 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 09:24:12 -0000 Author: brueffer Date: Sat Jan 16 09:24:12 2010 New Revision: 202435 URL: http://svn.freebsd.org/changeset/base/202435 Log: MFC: r201888 bridge(4) acts like a switch, not like a hub. Modified: stable/7/share/man/man4/if_bridge.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/if_bridge.4 ============================================================================== --- stable/7/share/man/man4/if_bridge.4 Sat Jan 16 09:17:33 2010 (r202434) +++ stable/7/share/man/man4/if_bridge.4 Sat Jan 16 09:24:12 2010 (r202435) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2009 +.Dd January 9, 2010 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -95,7 +95,7 @@ The address can be changed by assigning A bridge can be used to provide several services, such as a simple 802.11-to-Ethernet bridge for wireless hosts, and traffic isolation. .Pp -A bridge works like a hub, forwarding traffic from one interface +A bridge works like a switch, forwarding traffic from one interface to another. Multicast and broadcast packets are always forwarded to all interfaces that are part of the bridge. From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 09:25:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E4361065672; Sat, 16 Jan 2010 09:25:25 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFC058FC18; Sat, 16 Jan 2010 09:25:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0G9POta053158; Sat, 16 Jan 2010 09:25:24 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0G9PO8w053156; Sat, 16 Jan 2010 09:25:24 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001160925.o0G9PO8w053156@svn.freebsd.org> From: Christian Brueffer Date: Sat, 16 Jan 2010 09:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202436 - stable/6/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 09:25:25 -0000 Author: brueffer Date: Sat Jan 16 09:25:24 2010 New Revision: 202436 URL: http://svn.freebsd.org/changeset/base/202436 Log: MFC: r201888 bridge(4) acts like a switch, not like a hub. Modified: stable/6/share/man/man4/if_bridge.4 Directory Properties: stable/6/share/man/man4/ (props changed) Modified: stable/6/share/man/man4/if_bridge.4 ============================================================================== --- stable/6/share/man/man4/if_bridge.4 Sat Jan 16 09:24:12 2010 (r202435) +++ stable/6/share/man/man4/if_bridge.4 Sat Jan 16 09:25:24 2010 (r202436) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 17, 2007 +.Dd January 9, 2010 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -94,7 +94,7 @@ The address can be changed by assigning A bridge can be used to provide several services, such as a simple 802.11-to-Ethernet bridge for wireless hosts, and traffic isolation. .Pp -A bridge works like a hub, forwarding traffic from one interface +A bridge works like a switch, forwarding traffic from one interface to another. Multicast and broadcast packets are always forwarded to all interfaces that are part of the bridge. From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 09:52:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2C391065676; Sat, 16 Jan 2010 09:52:49 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C6D98FC0C; Sat, 16 Jan 2010 09:52:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0G9qn8g059158; Sat, 16 Jan 2010 09:52:49 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0G9qnLl059144; Sat, 16 Jan 2010 09:52:49 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001160952.o0G9qnLl059144@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 16 Jan 2010 09:52:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202437 - in head: etc/mtree include sbin/geom/class sbin/geom/class/mountver sbin/geom/core sys/boot/forth sys/conf sys/geom/mountver sys/modules/geom sys/modules/geom/geom_mountver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 09:52:49 -0000 Author: trasz Date: Sat Jan 16 09:52:49 2010 New Revision: 202437 URL: http://svn.freebsd.org/changeset/base/202437 Log: Add gmountver, disk mount verification GEOM class. Note that due to e.g. write throttling ('wdrain'), it can stall all the disk I/O instead of just the device it's configured for. Using it for removable media is therefore not a good idea. Reviewed by: pjd (earlier version) Added: head/sbin/geom/class/mountver/ head/sbin/geom/class/mountver/Makefile (contents, props changed) head/sbin/geom/class/mountver/geom_mountver.c (contents, props changed) head/sbin/geom/class/mountver/gmountver.8 (contents, props changed) head/sys/geom/mountver/ head/sys/geom/mountver/g_mountver.c (contents, props changed) head/sys/geom/mountver/g_mountver.h (contents, props changed) head/sys/modules/geom/geom_mountver/ head/sys/modules/geom/geom_mountver/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.include.dist head/include/Makefile head/sbin/geom/class/Makefile head/sbin/geom/core/geom.8 head/sys/boot/forth/loader.conf head/sys/conf/files head/sys/modules/geom/Makefile Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Sat Jan 16 09:25:24 2010 (r202436) +++ head/etc/mtree/BSD.include.dist Sat Jan 16 09:52:49 2010 (r202437) @@ -174,6 +174,8 @@ .. mirror .. + mountver + .. multipath .. nop Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sat Jan 16 09:25:24 2010 (r202436) +++ head/include/Makefile Sat Jan 16 09:52:49 2010 (r202437) @@ -46,7 +46,7 @@ LSUBDIRS= cam/ata cam/scsi \ fs/devfs fs/fdescfs fs/fifofs fs/msdosfs fs/nfs fs/ntfs fs/nullfs \ ${_fs_nwfs} fs/portalfs fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ - geom/mirror geom/multipath geom/nop \ + geom/mirror geom/mountver geom/multipath geom/nop \ geom/raid3 geom/shsec geom/stripe geom/virstor \ netgraph/atm netgraph/netflow \ security/audit \ Modified: head/sbin/geom/class/Makefile ============================================================================== --- head/sbin/geom/class/Makefile Sat Jan 16 09:25:24 2010 (r202436) +++ head/sbin/geom/class/Makefile Sat Jan 16 09:52:49 2010 (r202437) @@ -10,6 +10,7 @@ SUBDIR+=eli SUBDIR+=journal SUBDIR+=label SUBDIR+=mirror +SUBDIR+=mountver SUBDIR+=multipath SUBDIR+=nop SUBDIR+=part Added: head/sbin/geom/class/mountver/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/geom/class/mountver/Makefile Sat Jan 16 09:52:49 2010 (r202437) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../misc + +CLASS= mountver + +.include Added: head/sbin/geom/class/mountver/geom_mountver.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/geom/class/mountver/geom_mountver.c Sat Jan 16 09:52:49 2010 (r202437) @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 2010 Edward Tomasz Napierala + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include "core/geom.h" + + +uint32_t lib_version = G_LIB_VERSION; +uint32_t version = G_MOUNTVER_VERSION; + +struct g_command class_commands[] = { + { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, + { + G_OPT_SENTINEL + }, + NULL, "[-v] dev ..." + }, + { "destroy", G_FLAG_VERBOSE, NULL, + { + { 'f', "force", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL + }, + NULL, "[-fv] prov ..." + }, + G_CMD_SENTINEL +}; Added: head/sbin/geom/class/mountver/gmountver.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/geom/class/mountver/gmountver.8 Sat Jan 16 09:52:49 2010 (r202437) @@ -0,0 +1,129 @@ +.\"- +.\" Copyright (c) 2010 Edward Tomasz Napierala +.\" 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 THE VOICES IN HIS HEAD BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 14, 2010 +.Dt GMOUNTVER 8 +.Os +.Sh NAME +.Nm gmountver +.Nd "control utility for disk mount verification GEOM class" +.Sh SYNOPSIS +.Nm +.Cm create +.Op Fl v +.Ar dev ... +.Nm +.Cm destroy +.Op Fl fv +.Ar prov ... +.Nm +.Cm list +.Nm +.Cm status +.Op Fl s Ar name +.Nm +.Cm load +.Op Fl v +.Nm +.Cm unload +.Op Fl v +.Sh DESCRIPTION +The +.Nm +utility is used to control mount verification GEOM class. +When configured, it passes all the I/O requests to the underlying provider. +When the underlying provider disappears - for example because the disk device +got disconnected - it queues all the I/O requests and waits for the provider +to reappear. +When that happens, it attaches to it and sends the queued requests. +.Pp +The first argument to +.Nm +indicates an action to be performed: +.Bl -tag -width ".Cm destroy" +.It Cm create +Cache the given devices with specified +.Ar name . +The kernel module +.Pa geom_mountver.ko +will be loaded if it is not loaded already. +.It Cm destroy +Destroy +.Ar name . +.It Cm list +See +.Xr geom 8 . +.It Cm status +See +.Xr geom 8 . +.It Cm load +See +.Xr geom 8 . +.It Cm unload +See +.Xr geom 8 . +.El +.Pp +Additional options: +.Bl -tag -width indent +.It Fl f +Force the removal of the specified mountver device. +.It Fl v +Be more verbose. +.El +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 8 +variables can be used to control the behavior of the +.Nm MOUNTVER +GEOM class. +The default value is shown next to each variable. +.Bl -tag -width indent +.It Va kern.geom.mountver.debug : No 0 +Debug level of the +.Nm MOUNTVER +GEOM class. +This can be set to a number between 0 and 3 inclusive. +If set to 0 minimal debug information is printed, and if set to 3 the +maximum amount of debug information is printed. +.It Va kern.geom.mountver.check.check_ident : No 1 +This can be set to 0 or 1. If set to 0, +.Nm +will reattach to the device even if the device reports different disk ID. +.El +.Sh EXIT STATUS +Exit status is 0 on success, and 1 if the command fails. +.Sh SEE ALSO +.Xr geom 4 , +.Xr geom 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 9.0 . +.Sh AUTHORS +.An Edward Tomasz Napierala Aq trasz@FreeBSD.org Modified: head/sbin/geom/core/geom.8 ============================================================================== --- head/sbin/geom/core/geom.8 Sat Jan 16 09:25:24 2010 (r202436) +++ head/sbin/geom/core/geom.8 Sat Jan 16 09:52:49 2010 (r202437) @@ -172,6 +172,7 @@ geom md unload .Xr gjournal 8 , .Xr glabel 8 , .Xr gmirror 8 , +.Xr gmountver 8 , .Xr gmultipath 8 , .Xr gnop 8 , .Xr gpart 8 , Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Sat Jan 16 09:25:24 2010 (r202436) +++ head/sys/boot/forth/loader.conf Sat Jan 16 09:52:49 2010 (r202437) @@ -155,6 +155,7 @@ geom_label_load="NO" # File system labe geom_md_load="NO" # Memory disk driver (vnode/swap/malloc) (see # md(4), mdconfig(8)) geom_mirror_load="NO" # RAID1 disk driver (see gmirror(8)) +geom_mountver_load="NO" # Mount verification disk driver geom_nop_load="NO" # Transparent disk driver (see gnop(8)) geom_raid3_load="NO" # RAID3 disk driver (see graid3(8)) geom_shsec_load="NO" # Shared secret disk driver (see gshsec(8)) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jan 16 09:25:24 2010 (r202436) +++ head/sys/conf/files Sat Jan 16 09:52:49 2010 (r202437) @@ -1936,6 +1936,7 @@ geom/label/g_label_gpt.c optional geom_l geom/linux_lvm/g_linux_lvm.c optional geom_linux_lvm geom/mirror/g_mirror.c optional geom_mirror geom/mirror/g_mirror_ctl.c optional geom_mirror +geom/mountver/g_mountver.c optional geom_mountver geom/multipath/g_multipath.c optional geom_multipath geom/nop/g_nop.c optional geom_nop geom/part/g_part.c standard Added: head/sys/geom/mountver/g_mountver.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/mountver/g_mountver.c Sat Jan 16 09:52:49 2010 (r202437) @@ -0,0 +1,646 @@ +/*- + * Copyright (c) 2010 Edward Tomasz Napierala + * Copyright (c) 2004-2006 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +SYSCTL_DECL(_kern_geom); +SYSCTL_NODE(_kern_geom, OID_AUTO, mountver, CTLFLAG_RW, + 0, "GEOM_MOUNTVER stuff"); +static u_int g_mountver_debug = 0; +static u_int g_mountver_check_ident = 1; +SYSCTL_UINT(_kern_geom_mountver, OID_AUTO, debug, CTLFLAG_RW, + &g_mountver_debug, 0, "Debug level"); +SYSCTL_UINT(_kern_geom_mountver, OID_AUTO, check_ident, CTLFLAG_RW, + &g_mountver_check_ident, 0, "Check disk ident when reattaching"); + +static eventhandler_tag g_mountver_pre_sync = NULL; + +static void g_mountver_queue(struct bio *bp); +static void g_mountver_orphan(struct g_consumer *cp); +static int g_mountver_destroy(struct g_geom *gp, boolean_t force); +static g_taste_t g_mountver_taste; +static int g_mountver_destroy_geom(struct gctl_req *req, struct g_class *mp, + struct g_geom *gp); +static void g_mountver_config(struct gctl_req *req, struct g_class *mp, + const char *verb); +static void g_mountver_dumpconf(struct sbuf *sb, const char *indent, + struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp); +static void g_mountver_init(struct g_class *mp); +static void g_mountver_fini(struct g_class *mp); + +struct g_class g_mountver_class = { + .name = G_MOUNTVER_CLASS_NAME, + .version = G_VERSION, + .ctlreq = g_mountver_config, + .taste = g_mountver_taste, + .destroy_geom = g_mountver_destroy_geom, + .init = g_mountver_init, + .fini = g_mountver_fini +}; + +static void +g_mountver_done(struct bio *bp) +{ + struct g_mountver_softc *sc; + struct g_geom *gp; + struct bio *pbp; + + if (bp->bio_error != ENXIO) { + g_std_done(bp); + return; + } + + /* + * When the device goes away, it's possible that few requests + * will be completed with ENXIO before g_mountver_orphan() + * gets called. To work around that, we have to queue requests + * that failed with ENXIO, in order to send them later. + */ + gp = bp->bio_from->geom; + sc = gp->softc; + + pbp = bp->bio_parent; + KASSERT(pbp->bio_to == LIST_FIRST(&gp->provider), + ("parent request was for someone else")); + g_destroy_bio(bp); + pbp->bio_inbed++; + g_mountver_queue(pbp); +} + +static void +g_mountver_send(struct bio *bp) +{ + struct g_geom *gp; + struct bio *cbp; + + gp = bp->bio_to->geom; + + cbp = g_clone_bio(bp); + if (cbp == NULL) { + g_io_deliver(bp, ENOMEM); + return; + } + + cbp->bio_done = g_mountver_done; + g_io_request(cbp, LIST_FIRST(&gp->consumer)); +} + +static void +g_mountver_queue(struct bio *bp) +{ + struct g_mountver_softc *sc; + struct g_geom *gp; + + gp = bp->bio_to->geom; + sc = gp->softc; + + mtx_lock(&sc->sc_mtx); + TAILQ_INSERT_TAIL(&sc->sc_queue, bp, bio_queue); + mtx_unlock(&sc->sc_mtx); +} + +static void +g_mountver_send_queued(struct g_geom *gp) +{ + struct g_mountver_softc *sc; + struct bio *bp; + + sc = gp->softc; + + mtx_lock(&sc->sc_mtx); + while ((bp = TAILQ_FIRST(&sc->sc_queue)) != NULL) { + TAILQ_REMOVE(&sc->sc_queue, bp, bio_queue); + G_MOUNTVER_LOGREQ(bp, "Sending queued request."); + g_mountver_send(bp); + } + mtx_unlock(&sc->sc_mtx); +} + +static void +g_mountver_discard_queued(struct g_geom *gp) +{ + struct g_mountver_softc *sc; + struct bio *bp; + + sc = gp->softc; + + mtx_lock(&sc->sc_mtx); + while ((bp = TAILQ_FIRST(&sc->sc_queue)) != NULL) { + TAILQ_REMOVE(&sc->sc_queue, bp, bio_queue); + G_MOUNTVER_LOGREQ(bp, "Discarding queued request."); + g_io_deliver(bp, ENXIO); + } + mtx_unlock(&sc->sc_mtx); +} + +static void +g_mountver_start(struct bio *bp) +{ + struct g_mountver_softc *sc; + struct g_geom *gp; + + gp = bp->bio_to->geom; + sc = gp->softc; + G_MOUNTVER_LOGREQ(bp, "Request received."); + + /* + * It is possible that some bios were returned with ENXIO, even though + * orphaning didn't happen yet. In that case, queue all subsequent + * requests in order to maintain ordering. + */ + if (sc->sc_orphaned || !TAILQ_EMPTY(&sc->sc_queue)) { + G_MOUNTVER_LOGREQ(bp, "Queueing request."); + g_mountver_queue(bp); + if (!sc->sc_orphaned) + g_mountver_send_queued(gp); + } else { + G_MOUNTVER_LOGREQ(bp, "Sending request."); + g_mountver_send(bp); + } +} + +static int +g_mountver_access(struct g_provider *pp, int dr, int dw, int de) +{ + struct g_mountver_softc *sc; + struct g_geom *gp; + struct g_consumer *cp; + + g_topology_assert(); + + gp = pp->geom; + cp = LIST_FIRST(&gp->consumer); + sc = gp->softc; + if (sc == NULL && dr <= 0 && dw <= 0 && de <= 0) + return (0); + KASSERT(sc != NULL, ("Trying to access withered provider \"%s\".", pp->name)); + + sc->sc_access_r += dr; + sc->sc_access_w += dw; + sc->sc_access_e += de; + + if (sc->sc_orphaned) + return (0); + + return (g_access(cp, dr, dw, de)); +} + +static int +g_mountver_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp) +{ + struct g_mountver_softc *sc; + struct g_geom *gp; + struct g_provider *newpp; + struct g_consumer *cp; + char name[64]; + int error; + int identsize = DISK_IDENT_SIZE; + + g_topology_assert(); + + gp = NULL; + newpp = NULL; + cp = NULL; + + snprintf(name, sizeof(name), "%s%s", pp->name, G_MOUNTVER_SUFFIX); + LIST_FOREACH(gp, &mp->geom, geom) { + if (strcmp(gp->name, name) == 0) { + gctl_error(req, "Provider %s already exists.", name); + return (EEXIST); + } + } + gp = g_new_geomf(mp, name); + if (gp == NULL) { + gctl_error(req, "Cannot create geom %s.", name); + return (ENOMEM); + } + sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); + mtx_init(&sc->sc_mtx, "gmountver", NULL, MTX_DEF); + TAILQ_INIT(&sc->sc_queue); + sc->sc_provider_name = strdup(pp->name, M_GEOM); + gp->softc = sc; + gp->start = g_mountver_start; + gp->orphan = g_mountver_orphan; + gp->access = g_mountver_access; + gp->dumpconf = g_mountver_dumpconf; + + newpp = g_new_providerf(gp, gp->name); + if (newpp == NULL) { + gctl_error(req, "Cannot create provider %s.", name); + error = ENOMEM; + goto fail; + } + newpp->mediasize = pp->mediasize; + newpp->sectorsize = pp->sectorsize; + + cp = g_new_consumer(gp); + if (cp == NULL) { + gctl_error(req, "Cannot create consumer for %s.", gp->name); + error = ENOMEM; + goto fail; + } + error = g_attach(cp, pp); + if (error != 0) { + gctl_error(req, "Cannot attach to provider %s.", pp->name); + goto fail; + } + error = g_access(cp, 1, 0, 0); + if (error != 0) { + gctl_error(req, "Cannot access provider %s.", pp->name); + goto fail; + } + error = g_io_getattr("GEOM::ident", cp, &identsize, sc->sc_ident); + g_access(cp, -1, 0, 0); + if (error != 0) { + if (g_mountver_check_ident) { + gctl_error(req, "Cannot get disk ident from %s; error = %d.", pp->name, error); + goto fail; + } + + G_MOUNTVER_DEBUG(0, "Cannot get disk ident from %s; error = %d.", pp->name, error); + sc->sc_ident[0] = '\0'; + } + + g_error_provider(newpp, 0); + G_MOUNTVER_DEBUG(0, "Device %s created.", gp->name); + return (0); +fail: + if (sc->sc_provider_name != NULL) + g_free(sc->sc_provider_name); + if (cp != NULL) { + if (cp->provider != NULL) + g_detach(cp); + g_destroy_consumer(cp); + } + if (newpp != NULL) + g_destroy_provider(newpp); + if (gp != NULL) { + if (gp->softc != NULL) + g_free(gp->softc); + g_destroy_geom(gp); + } + return (error); +} + +static int +g_mountver_destroy(struct g_geom *gp, boolean_t force) +{ + struct g_mountver_softc *sc; + struct g_provider *pp; + + g_topology_assert(); + if (gp->softc == NULL) + return (ENXIO); + sc = gp->softc; + pp = LIST_FIRST(&gp->provider); + if (pp != NULL && (pp->acr != 0 || pp->acw != 0 || pp->ace != 0)) { + if (force) { + G_MOUNTVER_DEBUG(0, "Device %s is still open, so it " + "can't be definitely removed.", pp->name); + } else { + G_MOUNTVER_DEBUG(1, "Device %s is still open (r%dw%de%d).", + pp->name, pp->acr, pp->acw, pp->ace); + return (EBUSY); + } + } else { + G_MOUNTVER_DEBUG(0, "Device %s removed.", gp->name); + } + g_orphan_provider(pp, ENXIO); + g_mountver_discard_queued(gp); + g_free(sc->sc_provider_name); + g_free(gp->softc); + gp->softc = NULL; + g_wither_geom(gp, ENXIO); + + return (0); +} + +static int +g_mountver_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp) +{ + + return (g_mountver_destroy(gp, 0)); +} + +static void +g_mountver_ctl_create(struct gctl_req *req, struct g_class *mp) +{ + struct g_provider *pp; + const char *name; + char param[16]; + int i, *nargs; + + g_topology_assert(); + + nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); + if (nargs == NULL) { + gctl_error(req, "No '%s' argument", "nargs"); + return; + } + if (*nargs <= 0) { + gctl_error(req, "Missing device(s)."); + return; + } + for (i = 0; i < *nargs; i++) { + snprintf(param, sizeof(param), "arg%d", i); + name = gctl_get_asciiparam(req, param); + if (name == NULL) { + gctl_error(req, "No 'arg%d' argument", i); + return; + } + if (strncmp(name, "/dev/", strlen("/dev/")) == 0) + name += strlen("/dev/"); + pp = g_provider_by_name(name); + if (pp == NULL) { + G_MOUNTVER_DEBUG(1, "Provider %s is invalid.", name); + gctl_error(req, "Provider %s is invalid.", name); + return; + } + if (g_mountver_create(req, mp, pp) != 0) + return; + } +} + +static struct g_geom * +g_mountver_find_geom(struct g_class *mp, const char *name) +{ + struct g_geom *gp; + + LIST_FOREACH(gp, &mp->geom, geom) { + if (strcmp(gp->name, name) == 0) + return (gp); + } + return (NULL); +} + +static void +g_mountver_ctl_destroy(struct gctl_req *req, struct g_class *mp) +{ + int *nargs, *force, error, i; + struct g_geom *gp; + const char *name; + char param[16]; + + g_topology_assert(); + + nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); + if (nargs == NULL) { + gctl_error(req, "No '%s' argument", "nargs"); + return; + } + if (*nargs <= 0) { + gctl_error(req, "Missing device(s)."); + return; + } + force = gctl_get_paraml(req, "force", sizeof(*force)); + if (force == NULL) { + gctl_error(req, "No 'force' argument"); + return; + } + + for (i = 0; i < *nargs; i++) { + snprintf(param, sizeof(param), "arg%d", i); + name = gctl_get_asciiparam(req, param); + if (name == NULL) { + gctl_error(req, "No 'arg%d' argument", i); + return; + } + if (strncmp(name, "/dev/", strlen("/dev/")) == 0) + name += strlen("/dev/"); + gp = g_mountver_find_geom(mp, name); + if (gp == NULL) { + G_MOUNTVER_DEBUG(1, "Device %s is invalid.", name); + gctl_error(req, "Device %s is invalid.", name); + return; + } + error = g_mountver_destroy(gp, *force); + if (error != 0) { + gctl_error(req, "Cannot destroy device %s (error=%d).", + gp->name, error); + return; + } + } +} + +static void +g_mountver_orphan(struct g_consumer *cp) +{ + struct g_mountver_softc *sc; + + g_topology_assert(); + + sc = cp->geom->softc; + sc->sc_orphaned = 1; + if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) + g_access(cp, -cp->acr, -cp->acw, -cp->ace); + g_detach(cp); + G_MOUNTVER_DEBUG(0, "%s is offline. Mount verification in progress.", sc->sc_provider_name); +} + +static int +g_mountver_ident_matches(struct g_geom *gp) +{ + struct g_consumer *cp; + struct g_mountver_softc *sc; + char ident[DISK_IDENT_SIZE]; + int error, identsize = DISK_IDENT_SIZE; + + sc = gp->softc; + cp = LIST_FIRST(&gp->consumer); + + if (g_mountver_check_ident == 0) + return (0); + + error = g_access(cp, 1, 0, 0); + if (error != 0) { + G_MOUNTVER_DEBUG(0, "Cannot access %s; " + "not attaching; error = %d.", gp->name, error); + return (1); + } + error = g_io_getattr("GEOM::ident", cp, &identsize, ident); + g_access(cp, -1, 0, 0); + if (error != 0) { + G_MOUNTVER_DEBUG(0, "Cannot get disk ident for %s; " + "not attaching; error = %d.", gp->name, error); + return (1); + } + if (strcmp(ident, sc->sc_ident) != 0) { + G_MOUNTVER_DEBUG(1, "Disk ident for %s (\"%s\") is different " + "from expected \"%s\", not attaching.", gp->name, ident, + sc->sc_ident); + return (1); + } + + return (0); +} + +static struct g_geom * +g_mountver_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) +{ + struct g_mountver_softc *sc; + struct g_consumer *cp; + struct g_geom *gp; + int error; + + g_topology_assert(); + g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, pp->name); + G_MOUNTVER_DEBUG(2, "Tasting %s.", pp->name); + + /* + * Let's check if device already exists. + */ + LIST_FOREACH(gp, &mp->geom, geom) { + sc = gp->softc; + if (sc == NULL) + continue; + + /* Already attached? */ + if (pp == LIST_FIRST(&gp->provider)) + return (NULL); + + if (sc->sc_orphaned && strcmp(pp->name, sc->sc_provider_name) == 0) + break; + } + if (gp == NULL) + return (NULL); + + cp = LIST_FIRST(&gp->consumer); + g_attach(cp, pp); + error = g_mountver_ident_matches(gp); + if (error != 0) { + g_detach(cp); + return (NULL); + } + if (sc->sc_access_r > 0 || sc->sc_access_w > 0 || sc->sc_access_e > 0) { + error = g_access(cp, sc->sc_access_r, sc->sc_access_w, sc->sc_access_e); + if (error != 0) { + G_MOUNTVER_DEBUG(0, "Cannot access %s; error = %d.", pp->name, error); + g_detach(cp); + return (NULL); + } + } + g_mountver_send_queued(gp); + sc->sc_orphaned = 0; + G_MOUNTVER_DEBUG(0, "%s has completed mount verification.", sc->sc_provider_name); + + return (gp); +} + +static void +g_mountver_config(struct gctl_req *req, struct g_class *mp, const char *verb) +{ + uint32_t *version; + + g_topology_assert(); + + version = gctl_get_paraml(req, "version", sizeof(*version)); + if (version == NULL) { + gctl_error(req, "No '%s' argument.", "version"); + return; + } + if (*version != G_MOUNTVER_VERSION) { + gctl_error(req, "Userland and kernel parts are out of sync."); + return; + } + + if (strcmp(verb, "create") == 0) { + g_mountver_ctl_create(req, mp); + return; + } else if (strcmp(verb, "destroy") == 0) { + g_mountver_ctl_destroy(req, mp); + return; + } + + gctl_error(req, "Unknown verb."); +} + +static void +g_mountver_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, + struct g_consumer *cp, struct g_provider *pp) +{ + struct g_mountver_softc *sc; + + if (pp != NULL || cp != NULL) + return; + + sc = gp->softc; + sbuf_printf(sb, "%s%s\n", indent, + sc->sc_orphaned ? "OFFLINE" : "ONLINE"); + sbuf_printf(sb, "%s%s\n", indent, sc->sc_provider_name); + sbuf_printf(sb, "%s%s\n", indent, sc->sc_ident); +} + +static void +g_mountver_shutdown_pre_sync(void *arg, int howto) +{ + struct g_class *mp; + struct g_geom *gp, *gp2; + + mp = arg; + DROP_GIANT(); + g_topology_lock(); + LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) + g_mountver_destroy(gp, 1); + g_topology_unlock(); + PICKUP_GIANT(); +} + +static void +g_mountver_init(struct g_class *mp) +{ + + g_mountver_pre_sync = EVENTHANDLER_REGISTER(shutdown_pre_sync, + g_mountver_shutdown_pre_sync, mp, SHUTDOWN_PRI_FIRST); + if (g_mountver_pre_sync == NULL) + G_MOUNTVER_DEBUG(0, "Warning! Cannot register shutdown event."); +} + +static void +g_mountver_fini(struct g_class *mp) +{ + + if (g_mountver_pre_sync != NULL) + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, g_mountver_pre_sync); +} + +DECLARE_GEOM_CLASS(g_mountver_class, g_mountver); Added: head/sys/geom/mountver/g_mountver.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/mountver/g_mountver.h Sat Jan 16 09:52:49 2010 (r202437) @@ -0,0 +1,71 @@ +/*- + * Copyright (c) 2010 Edward Tomasz Napierala + * Copyright (c) 2004-2006 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _G_MOUNTVER_H_ +#define _G_MOUNTVER_H_ + +#define G_MOUNTVER_CLASS_NAME "MOUNTVER" +#define G_MOUNTVER_VERSION 4 +#define G_MOUNTVER_SUFFIX ".mountver" + +#ifdef _KERNEL + +#define G_MOUNTVER_DEBUG(lvl, ...) do { \ + if (g_mountver_debug >= (lvl)) { \ + printf("GEOM_MOUNTVER"); \ + if (g_mountver_debug > 0) \ + printf("[%u]", lvl); \ + printf(": "); \ + printf(__VA_ARGS__); \ + printf("\n"); \ + } \ +} while (0) +#define G_MOUNTVER_LOGREQ(bp, ...) do { \ + if (g_mountver_debug >= 2) { \ + printf("GEOM_MOUNTVER[2]: "); \ + printf(__VA_ARGS__); \ + printf(" "); \ + g_print_bio(bp); \ + printf("\n"); \ + } \ +} while (0) + +struct g_mountver_softc { + TAILQ_HEAD(, bio) sc_queue; + struct mtx sc_mtx; + char *sc_provider_name; + char sc_ident[DISK_IDENT_SIZE]; + int sc_orphaned; + int sc_access_r; + int sc_access_w; + int sc_access_e; +}; +#endif /* _KERNEL */ + +#endif /* _G_MOUNTVER_H_ */ Modified: head/sys/modules/geom/Makefile ============================================================================== --- head/sys/modules/geom/Makefile Sat Jan 16 09:25:24 2010 (r202436) +++ head/sys/modules/geom/Makefile Sat Jan 16 09:52:49 2010 (r202437) @@ -13,6 +13,7 @@ SUBDIR= geom_bde \ geom_linux_lvm \ geom_mbr \ geom_mirror \ + geom_mountver \ geom_multipath \ geom_nop \ geom_part \ Added: head/sys/modules/geom/geom_mountver/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/geom/geom_mountver/Makefile Sat Jan 16 09:52:49 2010 (r202437) @@ -0,0 +1,8 @@ +# $FreeBSD$ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 12:16:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D62E21065672; Sat, 16 Jan 2010 12:16:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAE9E8FC19; Sat, 16 Jan 2010 12:16:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GCGc4C092553; Sat, 16 Jan 2010 12:16:38 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GCGcEj092549; Sat, 16 Jan 2010 12:16:38 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001161216.o0GCGcEj092549@svn.freebsd.org> From: Marius Strobl Date: Sat, 16 Jan 2010 12:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202438 - stable/8/sys/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 12:16:38 -0000 Author: marius Date: Sat Jan 16 12:16:38 2010 New Revision: 202438 URL: http://svn.freebsd.org/changeset/base/202438 Log: MFC: r201896 As nfsm_srvmtofh_xx() assumes the 4-byte alignment required by XDR ensure the mbuf data is aligned accordingly by calling nfs_realign() in fha_extract_info(). This fix is orthogonal to the problem solved by r199274/r199284 (MFC'ed to stable/8 in r199733). PR: 142102 (second part) Modified: stable/8/sys/nfsserver/nfs.h stable/8/sys/nfsserver/nfs_fha.c stable/8/sys/nfsserver/nfs_srvkrpc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/nfsserver/nfs.h ============================================================================== --- stable/8/sys/nfsserver/nfs.h Sat Jan 16 09:52:49 2010 (r202437) +++ stable/8/sys/nfsserver/nfs.h Sat Jan 16 12:16:38 2010 (r202438) @@ -240,6 +240,7 @@ extern int nfs_debug; #endif +void nfs_realign(struct mbuf **); struct mbuf *nfs_rephead(int, struct nfsrv_descript *, int, struct mbuf **, caddr_t *); void nfsm_srvfattr(struct nfsrv_descript *, struct vattr *, Modified: stable/8/sys/nfsserver/nfs_fha.c ============================================================================== --- stable/8/sys/nfsserver/nfs_fha.c Sat Jan 16 09:52:49 2010 (r202437) +++ stable/8/sys/nfsserver/nfs_fha.c Sat Jan 16 12:16:38 2010 (r202438) @@ -158,9 +158,9 @@ SYSUNINIT(nfs_fha, SI_SUB_ROOT_CONF, SI_ static void fha_extract_info(struct svc_req *req, struct fha_info *i) { - struct mbuf *md = req->rq_args; + struct mbuf *md; nfsfh_t fh; - caddr_t dpos = mtod(md, caddr_t); + caddr_t dpos; static u_int64_t random_fh = 0; int error; int v3 = (req->rq_vers == 3); @@ -201,6 +201,10 @@ fha_extract_info(struct svc_req *req, st procnum == NFSPROC_NULL) goto out; + nfs_realign(&req->rq_args); + md = req->rq_args; + dpos = mtod(md, caddr_t); + /* Grab the filehandle. */ error = nfsm_srvmtofh_xx(&fh.fh_generic, v3, &md, &dpos); if (error) Modified: stable/8/sys/nfsserver/nfs_srvkrpc.c ============================================================================== --- stable/8/sys/nfsserver/nfs_srvkrpc.c Sat Jan 16 09:52:49 2010 (r202437) +++ stable/8/sys/nfsserver/nfs_srvkrpc.c Sat Jan 16 12:16:38 2010 (r202438) @@ -266,7 +266,7 @@ nfs_rephead(int siz, struct nfsrv_descri * not occur with NFS/UDP and is supposed to only occassionally occur * with TCP. Use vfs.nfs.realign_count and realign_test to check this. */ -static void +void nfs_realign(struct mbuf **pm) /* XXX COMMON */ { struct mbuf *m; From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 12:18:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96EB5106566B; Sat, 16 Jan 2010 12:18:44 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83A438FC12; Sat, 16 Jan 2010 12:18:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GCIi6H093067; Sat, 16 Jan 2010 12:18:44 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GCIiJm093063; Sat, 16 Jan 2010 12:18:44 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001161218.o0GCIiJm093063@svn.freebsd.org> From: Marius Strobl Date: Sat, 16 Jan 2010 12:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202439 - stable/8/sys/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 12:18:44 -0000 Author: marius Date: Sat Jan 16 12:18:44 2010 New Revision: 202439 URL: http://svn.freebsd.org/changeset/base/202439 Log: MFC: r201899 Some style(9) fixes Modified: stable/8/sys/nfsserver/nfs.h stable/8/sys/nfsserver/nfs_fha.c stable/8/sys/nfsserver/nfs_srvkrpc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/nfsserver/nfs.h ============================================================================== --- stable/8/sys/nfsserver/nfs.h Sat Jan 16 12:16:38 2010 (r202438) +++ stable/8/sys/nfsserver/nfs.h Sat Jan 16 12:18:44 2010 (r202439) @@ -82,14 +82,13 @@ #define IO_METASYNC 0 #endif - /* NFS state flags XXX -Wunused */ #define NFSRV_SNDLOCK 0x01000000 /* Send socket lock */ #define NFSRV_WANTSND 0x02000000 /* Want above */ /* - * Structures for the nfssvc(2) syscall. Not that anyone but nfsd and mount_nfs - * should ever try and use it. + * Structures for the nfssvc(2) syscall. Not that anyone but nfsd and + * mount_nfs should ever try and use it. */ /* Modified: stable/8/sys/nfsserver/nfs_fha.c ============================================================================== --- stable/8/sys/nfsserver/nfs_fha.c Sat Jan 16 12:16:38 2010 (r202438) +++ stable/8/sys/nfsserver/nfs_fha.c Sat Jan 16 12:18:44 2010 (r202439) @@ -71,16 +71,17 @@ static struct fha_global { u_long hashmask; } g_fha; -/* - * These are the entries in the filehandle hash. They talk about a specific - * file, requests against which are being handled by one or more nfsds. We keep - * a chain of nfsds against the file. We only have more than one if reads are - * ongoing, and then only if the reads affect disparate regions of the file. +/* + * These are the entries in the filehandle hash. They talk about a specific + * file, requests against which are being handled by one or more nfsds. We + * keep a chain of nfsds against the file. We only have more than one if reads + * are ongoing, and then only if the reads affect disparate regions of the + * file. * - * In general, we want to assign a new request to an existing nfsd if it is - * going to contend with work happening already on that nfsd, or if the - * operation is a read and the nfsd is already handling a proximate read. We - * do this to avoid jumping around in the read stream unnecessarily, and to + * In general, we want to assign a new request to an existing nfsd if it is + * going to contend with work happening already on that nfsd, or if the + * operation is a read and the nfsd is already handling a proximate read. We + * do this to avoid jumping around in the read stream unnecessarily, and to * avoid contention between threads over single files. */ struct fha_hash_entry { @@ -101,7 +102,7 @@ struct fha_info { }; static int fhe_stats_sysctl(SYSCTL_HANDLER_ARGS); - + static void nfs_fha_init(void *foo) { @@ -136,7 +137,7 @@ nfs_fha_init(void *foo) &fha_ctls.max_reqs_per_nfsd, 0, "Maximum requests that " "single nfsd thread should be working on at any time"); - SYSCTL_ADD_OID(&fha_clist, SYSCTL_STATIC_CHILDREN(_vfs_nfsrv_fha), + SYSCTL_ADD_OID(&fha_clist, SYSCTL_STATIC_CHILDREN(_vfs_nfsrv_fha), OID_AUTO, "fhe_stats", CTLTYPE_STRING | CTLFLAG_RD, 0, 0, fhe_stats_sysctl, "A", ""); } @@ -151,7 +152,7 @@ nfs_fha_uninit(void *foo) SYSINIT(nfs_fha, SI_SUB_ROOT_CONF, SI_ORDER_ANY, nfs_fha_init, NULL); SYSUNINIT(nfs_fha, SI_SUB_ROOT_CONF, SI_ORDER_ANY, nfs_fha_uninit, NULL); -/* +/* * This just specifies that offsets should obey affinity when within * the same 1Mbyte (1<<20) chunk for the file (reads only for now). */ @@ -167,18 +168,18 @@ fha_extract_info(struct svc_req *req, st u_int32_t *tl; rpcproc_t procnum; - /* - * We start off with a random fh. If we get a reasonable - * procnum, we set the fh. If there's a concept of offset + /* + * We start off with a random fh. If we get a reasonable + * procnum, we set the fh. If there's a concept of offset * that we're interested in, we set that. */ i->fh = ++random_fh; i->offset = 0; i->locktype = LK_EXCLUSIVE; - + /* * Extract the procnum and convert to v3 form if necessary, - * taking care to deal with out-of-range procnums. Caller will + * taking care to deal with out-of-range procnums. Caller will * ensure that rq_vers is either 2 or 3. */ procnum = req->rq_proc; @@ -188,19 +189,19 @@ fha_extract_info(struct svc_req *req, st procnum = nfsrv_nfsv3_procid[procnum]; } - /* - * We do affinity for most. However, we divide a realm of affinity - * by file offset so as to allow for concurrent random access. We - * only do this for reads today, but this may change when IFS supports + /* + * We do affinity for most. However, we divide a realm of affinity + * by file offset so as to allow for concurrent random access. We + * only do this for reads today, but this may change when IFS supports * efficient concurrent writes. */ if (procnum == NFSPROC_FSSTAT || procnum == NFSPROC_FSINFO || procnum == NFSPROC_PATHCONF || - procnum == NFSPROC_NOOP || + procnum == NFSPROC_NOOP || procnum == NFSPROC_NULL) goto out; - + nfs_realign(&req->rq_args); md = req->rq_args; dpos = mtod(md, caddr_t); @@ -270,8 +271,8 @@ fha_hash_entry_new(u_int64_t fh) e->num_writes = 0; e->num_threads = 0; LIST_INIT(&e->threads); - - return e; + + return (e); } static void @@ -296,10 +297,9 @@ fha_hash_entry_lookup(SVCPOOL *pool, u_i { struct fha_hash_entry *fhe, *new_fhe; - LIST_FOREACH(fhe, &g_fha.hashtable[fh % g_fha.hashmask], link) { + LIST_FOREACH(fhe, &g_fha.hashtable[fh % g_fha.hashmask], link) if (fhe->fh == fh) break; - } if (!fhe) { /* Allocate a new entry. */ @@ -308,25 +308,24 @@ fha_hash_entry_lookup(SVCPOOL *pool, u_i mtx_lock(&pool->sp_lock); /* Double-check to make sure we still need the new entry. */ - LIST_FOREACH(fhe, &g_fha.hashtable[fh % g_fha.hashmask], link) { + LIST_FOREACH(fhe, &g_fha.hashtable[fh % g_fha.hashmask], link) if (fhe->fh == fh) break; - } if (!fhe) { fhe = new_fhe; LIST_INSERT_HEAD(&g_fha.hashtable[fh % g_fha.hashmask], fhe, link); - } else { + } else fha_hash_entry_destroy(new_fhe); - } } - return fhe; + return (fhe); } static void fha_hash_entry_add_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) { + LIST_INSERT_HEAD(&fhe->threads, thread, st_alink); fhe->num_threads++; } @@ -339,7 +338,7 @@ fha_hash_entry_remove_thread(struct fha_ fhe->num_threads--; } -/* +/* * Account for an ongoing operation associated with this file. */ static void @@ -365,7 +364,7 @@ get_idle_thread(SVCPOOL *pool) } -/* +/* * Get the service thread currently associated with the fhe that is * appropriate to handle this operation. */ @@ -387,15 +386,15 @@ fha_hash_entry_choose_thread(SVCPOOL *po /* If there are any writes in progress, use the first thread. */ if (fhe->num_writes) { #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)w", thread, req_count); #endif return (thread); } - /* - * Check for read locality, making sure that we won't - * exceed our per-thread load limit in the process. + /* + * Check for read locality, making sure that we won't + * exceed our per-thread load limit in the process. */ offset1 = i->offset >> fha_ctls.bin_shift; offset2 = STAILQ_FIRST(&thread->st_reqs)->rq_p3 @@ -404,21 +403,21 @@ fha_hash_entry_choose_thread(SVCPOOL *po if ((fha_ctls.max_reqs_per_nfsd == 0) || (req_count < fha_ctls.max_reqs_per_nfsd)) { #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)r", thread, req_count); #endif return (thread); } } - /* + /* * We don't have a locality match, so skip this thread, - * but keep track of the most attractive thread in case + * but keep track of the most attractive thread in case * we need to come back to it later. */ #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)s off1 %llu off2 %llu", thread, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + "fha: %p(%d)s off1 %llu off2 %llu", thread, req_count, offset1, offset2); #endif if ((min_thread == NULL) || (req_count < min_count)) { @@ -427,38 +426,38 @@ fha_hash_entry_choose_thread(SVCPOOL *po } } - /* - * We didn't find a good match yet. See if we can add + /* + * We didn't find a good match yet. See if we can add * a new thread to this file handle entry's thread list. */ - if ((fha_ctls.max_nfsds_per_fh == 0) || + if ((fha_ctls.max_nfsds_per_fh == 0) || (fhe->num_threads < fha_ctls.max_nfsds_per_fh)) { - /* - * We can add a new thread, so try for an idle thread - * first, and fall back to this_thread if none are idle. + /* + * We can add a new thread, so try for an idle thread + * first, and fall back to this_thread if none are idle. */ if (STAILQ_EMPTY(&this_thread->st_reqs)) { thread = this_thread; #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)t", thread, thread->st_reqcount); #endif } else if ((thread = get_idle_thread(pool))) { #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)i", thread, thread->st_reqcount); #endif - } else { + } else { thread = this_thread; #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)b", thread, thread->st_reqcount); #endif } fha_hash_entry_add_thread(fhe, thread); } else { - /* - * We don't want to use any more threads for this file, so + /* + * We don't want to use any more threads for this file, so * go back to the most attractive nfsd we're already using. */ thread = min_thread; @@ -467,8 +466,8 @@ fha_hash_entry_choose_thread(SVCPOOL *po return (thread); } -/* - * After getting a request, try to assign it to some thread. Usually we +/* + * After getting a request, try to assign it to some thread. Usually we * handle it ourselves. */ SVCTHREAD * @@ -491,16 +490,16 @@ fha_assign(SVCTHREAD *this_thread, struc pool = req->rq_xprt->xp_pool; fha_extract_info(req, &i); - /* - * We save the offset associated with this request for later + /* + * We save the offset associated with this request for later * nfsd matching. */ fhe = fha_hash_entry_lookup(pool, i.fh); req->rq_p1 = fhe; req->rq_p2 = i.locktype; req->rq_p3 = i.offset; - - /* + + /* * Choose a thread, taking into consideration locality, thread load, * and the number of threads already working on this file. */ @@ -511,8 +510,8 @@ fha_assign(SVCTHREAD *this_thread, struc return (thread); } -/* - * Called when we're done with an operation. The request has already +/* + * Called when we're done with an operation. The request has already * been de-queued. */ void Modified: stable/8/sys/nfsserver/nfs_srvkrpc.c ============================================================================== --- stable/8/sys/nfsserver/nfs_srvkrpc.c Sat Jan 16 12:16:38 2010 (r202438) +++ stable/8/sys/nfsserver/nfs_srvkrpc.c Sat Jan 16 12:18:44 2010 (r202439) @@ -187,19 +187,18 @@ nfssvc_nfsserver(struct thread *td, stru } error = nfssvc_addsock(fp, td); fdrop(fp, td); - } else if (uap->flag & NFSSVC_OLDNFSD) { + } else if (uap->flag & NFSSVC_OLDNFSD) error = nfssvc_nfsd(td, NULL); - } else if (uap->flag & NFSSVC_NFSD) { - if (!uap->argp) + else if (uap->flag & NFSSVC_NFSD) { + if (!uap->argp) return (EINVAL); error = copyin(uap->argp, (caddr_t)&nfsdarg, sizeof(nfsdarg)); if (error) return (error); error = nfssvc_nfsd(td, &nfsdarg); - } else { + } else error = ENXIO; - } return (error); } @@ -447,9 +446,8 @@ nfssvc_addsock(struct file *fp, struct t siz = sb_max_adj; error = soreserve(so, siz, siz); - if (error) { + if (error) return (error); - } /* * Steal the socket from userland so that it doesn't close @@ -471,7 +469,7 @@ nfssvc_addsock(struct file *fp, struct t } /* - * Called by nfssvc() for nfsds. Just loops around servicing rpc requests + * Called by nfssvc() for nfsds. Just loops around servicing rpc requests * until it is killed by a signal. */ static int @@ -496,9 +494,9 @@ nfssvc_nfsd(struct thread *td, struct nf #endif /* - * Only the first nfsd actually does any work. The RPC code - * adds threads to it as needed. Any extra processes offered - * by nfsd just exit. If nfsd is new enough, it will call us + * Only the first nfsd actually does any work. The RPC code + * adds threads to it as needed. Any extra processes offered + * by nfsd just exit. If nfsd is new enough, it will call us * once with a structure that specifies how many threads to * use. */ @@ -522,7 +520,7 @@ nfssvc_nfsd(struct thread *td, struct nf nfsrv_pool->sp_minthreads = 4; nfsrv_pool->sp_maxthreads = 4; } - + svc_run(nfsrv_pool); #ifdef KGSSAPI @@ -541,7 +539,7 @@ nfssvc_nfsd(struct thread *td, struct nf /* * Size the NFS server's duplicate request cache at 1/2 the - * nmbclusters, floating within a (64, 2048) range. This is to + * nmbclusters, floating within a (64, 2048) range. This is to * prevent all mbuf clusters being tied up in the NFS dupreq * cache for small values of nmbclusters. */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 12:20:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6F3C106566C; Sat, 16 Jan 2010 12:20:26 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B58B38FC1D; Sat, 16 Jan 2010 12:20:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GCKQfT093508; Sat, 16 Jan 2010 12:20:26 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GCKQaF093505; Sat, 16 Jan 2010 12:20:26 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001161220.o0GCKQaF093505@svn.freebsd.org> From: Antoine Brodin Date: Sat, 16 Jan 2010 12:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202440 - in head: share/mk usr.sbin/ppp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 12:20:26 -0000 Author: antoine Date: Sat Jan 16 12:20:26 2010 New Revision: 202440 URL: http://svn.freebsd.org/changeset/base/202440 Log: Unbreak world WITHOUT_NETGRAPH. PR: 137487 Submitted by: bf (previous version) No objections: net@ MFC after: 2 weeks Modified: head/share/mk/bsd.own.mk head/usr.sbin/ppp/Makefile Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sat Jan 16 12:18:44 2010 (r202439) +++ head/share/mk/bsd.own.mk Sat Jan 16 12:20:26 2010 (r202440) @@ -468,6 +468,11 @@ MK_MAILWRAPPER:= no MK_SENDMAIL:= no .endif +.if ${MK_NETGRAPH} == "no" +MK_ATM:= no +MK_BLUETOOTH:= no +.endif + .if ${MK_OPENSSL} == "no" MK_OPENSSH:= no MK_KERBEROS:= no Modified: head/usr.sbin/ppp/Makefile ============================================================================== --- head/usr.sbin/ppp/Makefile Sat Jan 16 12:18:44 2010 (r202439) +++ head/usr.sbin/ppp/Makefile Sat Jan 16 12:20:26 2010 (r202440) @@ -25,6 +25,9 @@ PPP_NO_SUID= .if ${MK_ATM} == "no" PPP_NO_ATM= .endif +.if ${MK_NETGRAPH} == "no" +PPP_NO_NETGRAPH= +.endif .if ${MK_PAM_SUPPORT} == "no" PPP_NO_PAM= .endif From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 12:24:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A128C106568F; Sat, 16 Jan 2010 12:24:12 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 905CF8FC1B; Sat, 16 Jan 2010 12:24:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GCOCDt094362; Sat, 16 Jan 2010 12:24:12 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GCOCOI094360; Sat, 16 Jan 2010 12:24:12 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001161224.o0GCOCOI094360@svn.freebsd.org> From: Attilio Rao Date: Sat, 16 Jan 2010 12:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202441 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 12:24:12 -0000 Author: attilio Date: Sat Jan 16 12:24:12 2010 New Revision: 202441 URL: http://svn.freebsd.org/changeset/base/202441 Log: Unbreak the build for pc98. Specify the newly introduced, for ia32, DEV_ATPIC also for pc98. Pointy hat to: me Modified: head/sys/conf/options.pc98 Modified: head/sys/conf/options.pc98 ============================================================================== --- head/sys/conf/options.pc98 Sat Jan 16 12:20:26 2010 (r202440) +++ head/sys/conf/options.pc98 Sat Jan 16 12:24:12 2010 (r202441) @@ -90,6 +90,7 @@ PC98 opt_global.h # Device options DEV_APIC opt_apic.h +DEV_ATPIC opt_atpic.h DEV_MECIA opt_mecia.h DEV_NPX opt_npx.h From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 12:27:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83C601065672; Sat, 16 Jan 2010 12:27:15 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72CDE8FC14; Sat, 16 Jan 2010 12:27:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GCRFhx095047; Sat, 16 Jan 2010 12:27:15 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GCRF6w095045; Sat, 16 Jan 2010 12:27:15 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001161227.o0GCRF6w095045@svn.freebsd.org> From: Antoine Brodin Date: Sat, 16 Jan 2010 12:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202442 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 12:27:15 -0000 Author: antoine Date: Sat Jan 16 12:27:15 2010 New Revision: 202442 URL: http://svn.freebsd.org/changeset/base/202442 Log: regen MFC after: 2 weeks Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Jan 16 12:24:12 2010 (r202441) +++ head/share/man/man5/src.conf.5 Sat Jan 16 12:27:15 2010 (r202442) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm .\" $FreeBSD$ -.Dd June 1, 2009 +.Dd January 16, 2010 .Dt SRC.CONF 5 .Os .Sh NAME @@ -584,6 +584,10 @@ When set, it also enforces the following .Pp .Bl -item -compact .It +.Va WITHOUT_ATM +.It +.Va WITHOUT_BLUETOOTH +.It .Va WITHOUT_NETGRAPH_SUPPORT .El .It Va WITHOUT_NETGRAPH_SUPPORT From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 13:09:48 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2CC21065692; Sat, 16 Jan 2010 13:09:48 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) by mx1.freebsd.org (Postfix) with ESMTP id 605D88FC1E; Sat, 16 Jan 2010 13:09:48 +0000 (UTC) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTP id o0GD9gL5017384; Sat, 16 Jan 2010 22:09:44 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Sat, 16 Jan 2010 22:08:40 +0900 (JST) Message-Id: <20100116.220840.91363215.nyan@FreeBSD.org> To: attilio@FreeBSD.org From: TAKAHASHI Yoshihiro In-Reply-To: <201001161224.o0GCOCOI094360@svn.freebsd.org> References: <201001161224.o0GCOCOI094360@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sat_Jan_16_22_08_40_2010_213)--" Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202441 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 13:09:48 -0000 ----Next_Part(Sat_Jan_16_22_08_40_2010_213)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In article <201001161224.o0GCOCOI094360@svn.freebsd.org> Attilio Rao writes: > Log: > Unbreak the build for pc98. Specify the newly introduced, for ia32, > DEV_ATPIC also for pc98. This is not enough to real fix since DEV_ATPIC is never defined on pc98. I attached my incomplete patch. Even with this change, it's error if the apic device (and SMP option) is not defined in a kernel config file. BTW, the same problem exists on i386. --- TAKAHASHI Yoshihiro ----Next_Part(Sat_Jan_16_22_08_40_2010_213)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="a.diff" Index: conf/files.pc98 =================================================================== RCS file: /home/ncvs/src/sys/conf/files.pc98,v retrieving revision 1.377 diff -u -r1.377 files.pc98 --- conf/files.pc98 26 Sep 2009 12:45:28 -0000 1.377 +++ conf/files.pc98 16 Jan 2010 12:41:17 -0000 @@ -194,7 +194,7 @@ i386/ibcs2/ibcs2_xenix.c optional ibcs2 i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2 i386/ibcs2/imgact_coff.c optional ibcs2 -i386/isa/atpic.c standard +i386/isa/atpic.c optional atpic #i386/isa/atpic_vector.s standard i386/isa/elink.c optional ep | ie i386/isa/isa.c optional isa @@ -240,7 +240,7 @@ pc98/cbus/nmi.c standard pc98/cbus/olpt.c optional olpt pc98/cbus/pckbd.c optional pckbd -pc98/cbus/pcrtc.c standard +pc98/cbus/pcrtc.c optional atpic pc98/cbus/pmc.c optional pmc pc98/cbus/scgdcrndr.c optional sc gdc pc98/cbus/scterm-sck.c optional sc Index: conf/options.pc98 =================================================================== RCS file: /home/ncvs/src/sys/conf/options.pc98,v retrieving revision 1.206 diff -u -r1.206 options.pc98 --- conf/options.pc98 13 Aug 2009 17:09:45 -0000 1.206 +++ conf/options.pc98 16 Jan 2010 12:41:17 -0000 @@ -90,6 +90,7 @@ # Device options DEV_APIC opt_apic.h +DEV_ATPIC opt_atpic.h DEV_MECIA opt_mecia.h DEV_NPX opt_npx.h Index: pc98/conf/DEFAULTS =================================================================== RCS file: /home/ncvs/src/sys/pc98/conf/DEFAULTS,v retrieving revision 1.15 diff -u -r1.15 DEFAULTS --- pc98/conf/DEFAULTS 4 Jan 2010 21:30:04 -0000 1.15 +++ pc98/conf/DEFAULTS 16 Jan 2010 12:41:27 -0000 @@ -24,3 +24,6 @@ # Default partitioning schemes options GEOM_PART_BSD options GEOM_PART_PC98 + +# enable support for native hardware +device atpic ----Next_Part(Sat_Jan_16_22_08_40_2010_213)---- From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 14:31:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B84F1065670; Sat, 16 Jan 2010 14:31:02 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BB8B8FC1C; Sat, 16 Jan 2010 14:31:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GEV2rd022121; Sat, 16 Jan 2010 14:31:02 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GEV2J7022119; Sat, 16 Jan 2010 14:31:02 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001161431.o0GEV2J7022119@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 16 Jan 2010 14:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202443 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 14:31:02 -0000 Author: gavin Date: Sat Jan 16 14:31:01 2010 New Revision: 202443 URL: http://svn.freebsd.org/changeset/base/202443 Log: Xref sysctl(3) Approved by: ed (mentor) Modified: head/share/man/man9/sysctl.9 Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Sat Jan 16 12:27:15 2010 (r202442) +++ head/share/man/man9/sysctl.9 Sat Jan 16 14:31:01 2010 (r202443) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 23, 2006 +.Dd January 16, 2010 .Dt SYSCTL 9 .Os .Sh NAME @@ -282,6 +282,7 @@ A temporary sysctl node that should not as such by a leading underscore character in its name. For example: .Va _dirty_hack . .Sh SEE ALSO +.Xr sysctl 3 , .Xr sysctl 8 , .Xr sysctl_add_oid 9 , .Xr sysctl_ctx_free 9 , From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 14:32:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78727106566B; Sat, 16 Jan 2010 14:32:02 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 688158FC08; Sat, 16 Jan 2010 14:32:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GEW2AQ022397; Sat, 16 Jan 2010 14:32:02 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GEW2IA022395; Sat, 16 Jan 2010 14:32:02 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001161432.o0GEW2IA022395@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 16 Jan 2010 14:32:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202444 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 14:32:02 -0000 Author: gavin Date: Sat Jan 16 14:32:02 2010 New Revision: 202444 URL: http://svn.freebsd.org/changeset/base/202444 Log: Fix loader.conf(5) Xref Approved by: ed (mentor, implicit) Modified: head/share/man/man4/epair.4 Modified: head/share/man/man4/epair.4 ============================================================================== --- head/share/man/man4/epair.4 Sat Jan 16 14:31:01 2010 (r202443) +++ head/share/man/man4/epair.4 Sat Jan 16 14:32:02 2010 (r202444) @@ -104,7 +104,7 @@ support on top of it. .Xr bpf 4 , .Xr if_bridge 4 , .Xr vlan 4 , -.Xr loader.conf 5, +.Xr loader.conf 5 , .Xr rc.conf 5 , .Xr ifconfig 8 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 14:33:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3922B1065672; Sat, 16 Jan 2010 14:33:23 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2964D8FC0A; Sat, 16 Jan 2010 14:33:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GEXNnl022742; Sat, 16 Jan 2010 14:33:23 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GEXNdD022740; Sat, 16 Jan 2010 14:33:23 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001161433.o0GEXNdD022740@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 16 Jan 2010 14:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202445 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 14:33:23 -0000 Author: gavin Date: Sat Jan 16 14:33:22 2010 New Revision: 202445 URL: http://svn.freebsd.org/changeset/base/202445 Log: Fix HISTORY section to detail the history of the driver, not the man page. Approved by: ed (mentor, implicit) Modified: head/share/man/man4/sysmouse.4 Modified: head/share/man/man4/sysmouse.4 ============================================================================== --- head/share/man/man4/sysmouse.4 Sat Jan 16 14:32:02 2010 (r202444) +++ head/share/man/man4/sysmouse.4 Sat Jan 16 14:33:22 2010 (r202445) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 3, 1997 +.Dd January 16, 2010 .Dt SYSMOUSE 4 .Os .Sh NAME @@ -467,7 +467,7 @@ virtual consoles .Sh HISTORY The .Nm -manual page example first appeared in +driver first appeared in .Fx 2.2 . .Sh AUTHORS .An -nosplit From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 15:00:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FD291065694; Sat, 16 Jan 2010 15:00:36 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F1598FC14; Sat, 16 Jan 2010 15:00:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GF0aNb028770; Sat, 16 Jan 2010 15:00:36 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GF0akx028768; Sat, 16 Jan 2010 15:00:36 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001161500.o0GF0akx028768@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 16 Jan 2010 15:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202446 - stable/8/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 15:00:36 -0000 Author: gavin Date: Sat Jan 16 15:00:35 2010 New Revision: 202446 URL: http://svn.freebsd.org/changeset/base/202446 Log: MFC r200587: ifconfig(8) is documented to take a ISO 3166-1 country code to set the regulatory domain with the "country" parameter, but will also take a full country name. The man page warns that only the ISO code is unambiguous. In reality, however, the first match on either would be accepted, leading to "DE" being interpreted as the "DEBUG" country rather than Germany, and "MO" selecting Morocco rather than the correct country, Macau. Fix this by always checking for an ISO CC match first, and only search on the full country name if that fails. PR: bin/140571 Tested by: Dirk Meyer dirk.meyer dinoex.sub.org Reviewed by: sam Approved by: ed (mentor, implicit) Modified: stable/8/sbin/ifconfig/regdomain.c Directory Properties: stable/8/sbin/ifconfig/ (props changed) Modified: stable/8/sbin/ifconfig/regdomain.c ============================================================================== --- stable/8/sbin/ifconfig/regdomain.c Sat Jan 16 14:33:22 2010 (r202445) +++ stable/8/sbin/ifconfig/regdomain.c Sat Jan 16 15:00:35 2010 (r202446) @@ -694,8 +694,11 @@ lib80211_country_findbyname(const struct len = strlen(name); LIST_FOREACH(cp, &rdp->countries, next) { - if (strcasecmp(cp->isoname, name) == 0 || - strncasecmp(cp->name, name, len) == 0) + if (strcasecmp(cp->isoname, name) == 0) + return cp; + } + LIST_FOREACH(cp, &rdp->countries, next) { + if (strncasecmp(cp->name, name, len) == 0) return cp; } return NULL; From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 15:36:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 870E31065672; Sat, 16 Jan 2010 15:36:21 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 99FB88FC0A; Sat, 16 Jan 2010 15:36:20 +0000 (UTC) Received: by fxm27 with SMTP id 27so999483fxm.3 for ; Sat, 16 Jan 2010 07:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=U6JrlyKUxo5NBAl3Vd3tpmf8NdxOF6/xhY9J8kdhQa8=; b=e6kbeqzIRrH6efdZOh03GygI8iDrOtd0avd+z6iKP17IBqJeB7NCbwVA1NKKVkhlWj bWC/d2M4iwofSA7dP+of+zmQ0J/5bsS+Q8ipEZ1PDemUfRMGTLO+bxJBhKHC9YkeBvZl dZjClCMrJiiqRhB6M5CqrCkdWj6hD7sGi13xI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=YmgqpUmu66CaxyezQ2TxIUrAPwv/uzZzjUvA7zQm4cDYYrjqR9QW2qSAzU6zNlaqxe wX3VkZtkAbeVK5WK17jc0mJXwHR91MWnK2zBuo+c+57qlAjIRtIsQgtheLJ9NpLuV2pe XUX9xjRApPalq9QU7RlujUMtPKvhWOF8A7eF4= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.4.84 with SMTP id 20mr4280916faq.97.1263656176611; Sat, 16 Jan 2010 07:36:16 -0800 (PST) In-Reply-To: <20100116.220840.91363215.nyan@FreeBSD.org> References: <201001161224.o0GCOCOI094360@svn.freebsd.org> <20100116.220840.91363215.nyan@FreeBSD.org> Date: Sat, 16 Jan 2010 16:36:16 +0100 X-Google-Sender-Auth: 80989bc2bb756f33 Message-ID: <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> From: Attilio Rao To: TAKAHASHI Yoshihiro Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202441 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 15:36:21 -0000 2010/1/16 TAKAHASHI Yoshihiro : > In article <201001161224.o0GCOCOI094360@svn.freebsd.org> > Attilio Rao writes: > >> Log: >> =C2=A0 Unbreak the build for pc98. Specify the newly introduced, for ia3= 2, >> =C2=A0 DEV_ATPIC also for pc98. > > This is not enough to real fix since DEV_ATPIC is never defined on > pc98. =C2=A0I attached my incomplete patch. =C2=A0Even with this change, = it's > error if the apic device (and SMP option) is not defined in a kernel > config file. > > BTW, the same problem exists on i386. Thanks for reporting this. This further patch should fix the problem for i386 and possibly pc98 (linked with your patch): http://www.freebsd.org/~attilio/atpic.diff Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 17:05:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC6CB1065692; Sat, 16 Jan 2010 17:05:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBD4E8FC0A; Sat, 16 Jan 2010 17:05:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GH5R7c056242; Sat, 16 Jan 2010 17:05:27 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GH5ReU056240; Sat, 16 Jan 2010 17:05:27 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001161705.o0GH5ReU056240@svn.freebsd.org> From: Ed Schouten Date: Sat, 16 Jan 2010 17:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202447 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 17:05:27 -0000 Author: ed Date: Sat Jan 16 17:05:27 2010 New Revision: 202447 URL: http://svn.freebsd.org/changeset/base/202447 Log: Unexpose the old uname(3) function. Nowadays uname(3) is an inline function around __xuname(3). Prevent linkage of new binaries against this compatibility function, similar to what I did with ttyslot(3). Modified: head/lib/libc/gen/Symbol.map head/lib/libc/gen/uname.c Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Sat Jan 16 15:00:35 2010 (r202446) +++ head/lib/libc/gen/Symbol.map Sat Jan 16 17:05:27 2010 (r202447) @@ -296,7 +296,6 @@ FBSD_1.0 { tcflow; ualarm; ulimit; - uname; unvis; strunvis; strunvisx; Modified: head/lib/libc/gen/uname.c ============================================================================== --- head/lib/libc/gen/uname.c Sat Jan 16 15:00:35 2010 (r202446) +++ head/lib/libc/gen/uname.c Sat Jan 16 17:05:27 2010 (r202447) @@ -33,15 +33,15 @@ static char sccsid[] = "From: @(#)uname. #include __FBSDID("$FreeBSD$"); -#define uname wrapped_uname #include #include #include #include -#undef uname int -uname(struct utsname *name) +__uname(struct utsname *name) { return __xuname(32, name); } + +__sym_compat(uname, __uname, FBSD_1.0); From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 17:08:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A8BB1065692; Sat, 16 Jan 2010 17:08:22 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69DF28FC13; Sat, 16 Jan 2010 17:08:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GH8MNn056898; Sat, 16 Jan 2010 17:08:22 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GH8M88056896; Sat, 16 Jan 2010 17:08:22 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001161708.o0GH8M88056896@svn.freebsd.org> From: Antoine Brodin Date: Sat, 16 Jan 2010 17:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202448 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 17:08:22 -0000 Author: antoine Date: Sat Jan 16 17:08:22 2010 New Revision: 202448 URL: http://svn.freebsd.org/changeset/base/202448 Log: Do not build netgraph kernel modules if WITHOUT_NETGRAPH is set in src.conf Submitted by: bf MFC after: 2 weeks Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jan 16 17:05:27 2010 (r202447) +++ head/sys/modules/Makefile Sat Jan 16 17:08:22 2010 (r202448) @@ -192,7 +192,7 @@ SUBDIR= ${_3dfx} \ ${_ncp} \ ${_ncv} \ ${_ndis} \ - netgraph \ + ${_netgraph} \ ${_nfe} \ nfscl \ nfsclient \ @@ -327,6 +327,10 @@ _random= random _ipfilter= ipfilter .endif +.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) +_netgraph= netgraph +.endif + .if ${MK_PF} != "no" || defined(ALL_MODULES) _pf= pf _pflog= pflog From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 20:04:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9237106568B; Sat, 16 Jan 2010 20:04:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5A178FC08; Sat, 16 Jan 2010 20:04:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GK4HAT095647; Sat, 16 Jan 2010 20:04:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GK4H2s095640; Sat, 16 Jan 2010 20:04:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001162004.o0GK4H2s095640@svn.freebsd.org> From: Michael Tuexen Date: Sat, 16 Jan 2010 20:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202449 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 20:04:17 -0000 Author: tuexen Date: Sat Jan 16 20:04:17 2010 New Revision: 202449 URL: http://svn.freebsd.org/changeset/base/202449 Log: Get rid of support of an old version of the SCTP-AUTH draft. Get rid of unused MD5 code. MFC after: 1 week Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_auth.h head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_uio.h Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Sat Jan 16 17:08:22 2010 (r202448) +++ head/sys/netinet/sctp_auth.c Sat Jan 16 20:04:17 2010 (r202449) @@ -456,21 +456,6 @@ sctp_compute_hashkey(sctp_key_t * key1, /* concatenate the keys */ if (sctp_compare_key(key1, key2) <= 0) { -#ifdef SCTP_AUTH_DRAFT_04 - /* key is key1 + shared + key2 */ - if (sctp_get_keylen(key1)) { - bcopy(key1->key, key_ptr, key1->keylen); - key_ptr += key1->keylen; - } - if (sctp_get_keylen(shared)) { - bcopy(shared->key, key_ptr, shared->keylen); - key_ptr += shared->keylen; - } - if (sctp_get_keylen(key2)) { - bcopy(key2->key, key_ptr, key2->keylen); - key_ptr += key2->keylen; - } -#else /* key is shared + key1 + key2 */ if (sctp_get_keylen(shared)) { bcopy(shared->key, key_ptr, shared->keylen); @@ -484,23 +469,7 @@ sctp_compute_hashkey(sctp_key_t * key1, bcopy(key2->key, key_ptr, key2->keylen); key_ptr += key2->keylen; } -#endif } else { -#ifdef SCTP_AUTH_DRAFT_04 - /* key is key2 + shared + key1 */ - if (sctp_get_keylen(key2)) { - bcopy(key2->key, key_ptr, key2->keylen); - key_ptr += key2->keylen; - } - if (sctp_get_keylen(shared)) { - bcopy(shared->key, key_ptr, shared->keylen); - key_ptr += shared->keylen; - } - if (sctp_get_keylen(key1)) { - bcopy(key1->key, key_ptr, key1->keylen); - key_ptr += key1->keylen; - } -#else /* key is shared + key2 + key1 */ if (sctp_get_keylen(shared)) { bcopy(shared->key, key_ptr, shared->keylen); @@ -514,7 +483,6 @@ sctp_compute_hashkey(sctp_key_t * key1, bcopy(key1->key, key_ptr, key1->keylen); key_ptr += key1->keylen; } -#endif } return (new_key); } @@ -739,7 +707,7 @@ sctp_auth_add_hmacid(sctp_hmaclist_t * l (hmac_id != SCTP_AUTH_HMAC_ID_SHA384) && (hmac_id != SCTP_AUTH_HMAC_ID_SHA512) && #endif - (hmac_id != SCTP_AUTH_HMAC_ID_MD5)) { + 1) { return (-1); } /* Now is it already in the list */ @@ -802,12 +770,6 @@ sctp_negotiate_hmacid(sctp_hmaclist_t * for (i = 0; i < peer->num_algo; i++) { for (j = 0; j < local->num_algo; j++) { if (peer->hmac[i] == local->hmac[j]) { -#ifndef SCTP_AUTH_DRAFT_04 - /* "skip" MD5 as it's been deprecated */ - if (peer->hmac[i] == SCTP_AUTH_HMAC_ID_MD5) - continue; -#endif - /* found the "best" one */ SCTPDBG(SCTP_DEBUG_AUTH1, "SCTP: negotiated peer HMAC id %u\n", @@ -911,8 +873,6 @@ sctp_get_hmac_digest_len(uint16_t hmac_a switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: return (SCTP_AUTH_DIGEST_LEN_SHA1); - case SCTP_AUTH_HMAC_ID_MD5: - return (SCTP_AUTH_DIGEST_LEN_MD5); #ifdef HAVE_SHA224 case SCTP_AUTH_HMAC_ID_SHA224: return (SCTP_AUTH_DIGEST_LEN_SHA224); @@ -936,7 +896,6 @@ sctp_get_hmac_block_len(uint16_t hmac_al { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: - case SCTP_AUTH_HMAC_ID_MD5: #ifdef HAVE_SHA224 case SCTP_AUTH_HMAC_ID_SHA224: #endif @@ -962,9 +921,6 @@ sctp_hmac_init(uint16_t hmac_algo, sctp_ case SCTP_AUTH_HMAC_ID_SHA1: SHA1_Init(&ctx->sha1); break; - case SCTP_AUTH_HMAC_ID_MD5: - MD5_Init(&ctx->md5); - break; #ifdef HAVE_SHA224 case SCTP_AUTH_HMAC_ID_SHA224: break; @@ -995,9 +951,6 @@ sctp_hmac_update(uint16_t hmac_algo, sct case SCTP_AUTH_HMAC_ID_SHA1: SHA1_Update(&ctx->sha1, text, textlen); break; - case SCTP_AUTH_HMAC_ID_MD5: - MD5_Update(&ctx->md5, text, textlen); - break; #ifdef HAVE_SHA224 case SCTP_AUTH_HMAC_ID_SHA224: break; @@ -1028,9 +981,6 @@ sctp_hmac_final(uint16_t hmac_algo, sctp case SCTP_AUTH_HMAC_ID_SHA1: SHA1_Final(digest, &ctx->sha1); break; - case SCTP_AUTH_HMAC_ID_MD5: - MD5_Final(digest, &ctx->md5); - break; #ifdef HAVE_SHA224 case SCTP_AUTH_HMAC_ID_SHA224: break; @@ -1636,15 +1586,6 @@ sctp_auth_get_cookie_params(struct sctp_ (uint8_t *) & tmp_param); } /* concatenate the full random key */ -#ifdef SCTP_AUTH_DRAFT_04 - keylen = random_len; - new_key = sctp_alloc_key(keylen); - if (new_key != NULL) { - /* copy in the RANDOM */ - if (p_random != NULL) - bcopy(p_random->random_data, new_key->key, random_len); - } -#else keylen = sizeof(*p_random) + random_len + sizeof(*hmacs) + hmacs_len; if (chunks != NULL) { keylen += sizeof(*chunks) + num_chunks; @@ -1668,15 +1609,10 @@ sctp_auth_get_cookie_params(struct sctp_ sizeof(*hmacs) + hmacs_len); } } -#endif if (stcb->asoc.authinfo.random != NULL) sctp_free_key(stcb->asoc.authinfo.random); stcb->asoc.authinfo.random = new_key; stcb->asoc.authinfo.random_len = random_len; -#ifdef SCTP_AUTH_DRAFT_04 - /* don't include the chunks and hmacs for draft -04 */ - stcb->asoc.authinfo.random->keylen = random_len; -#endif sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.assoc_keyid); sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.recv_keyid); @@ -2143,11 +2079,6 @@ sctp_initialize_auth_params(struct sctp_ &stcb->asoc.shared_keys); /* now set the concatenated key (random + chunks + hmacs) */ -#ifdef SCTP_AUTH_DRAFT_04 - /* don't include the chunks and hmacs for draft -04 */ - keylen = random_len; - new_key = sctp_generate_random_key(keylen); -#else /* key includes parameter headers */ keylen = (3 * sizeof(struct sctp_paramhdr)) + random_len + chunks_len + hmacs_len; @@ -2188,436 +2119,8 @@ sctp_initialize_auth_params(struct sctp_ (void)sctp_serialize_hmaclist(stcb->asoc.local_hmacs, new_key->key + keylen); } -#endif if (stcb->asoc.authinfo.random != NULL) sctp_free_key(stcb->asoc.authinfo.random); stcb->asoc.authinfo.random = new_key; stcb->asoc.authinfo.random_len = random_len; } - - -#ifdef SCTP_HMAC_TEST -/* - * HMAC and key concatenation tests - */ -static void -sctp_print_digest(uint8_t * digest, uint32_t digestlen, const char *str) -{ - uint32_t i; - - printf("\n%s: 0x", str); - if (digest == NULL) - return; - - for (i = 0; i < digestlen; i++) - printf("%02x", digest[i]); -} - -static int -sctp_test_hmac(const char *str, uint16_t hmac_id, uint8_t * key, - uint32_t keylen, uint8_t * text, uint32_t textlen, - uint8_t * digest, uint32_t digestlen) -{ - uint8_t computed_digest[SCTP_AUTH_DIGEST_LEN_MAX]; - - printf("\n%s:", str); - sctp_hmac(hmac_id, key, keylen, text, textlen, computed_digest); - sctp_print_digest(digest, digestlen, "Expected digest"); - sctp_print_digest(computed_digest, digestlen, "Computed digest"); - if (memcmp(digest, computed_digest, digestlen) != 0) { - printf("\nFAILED"); - return (-1); - } else { - printf("\nPASSED"); - return (0); - } -} - - -/* - * RFC 2202: HMAC-SHA1 test cases - */ -void -sctp_test_hmac_sha1(void) -{ - uint8_t *digest; - uint8_t key[128]; - uint32_t keylen; - uint8_t text[128]; - uint32_t textlen; - uint32_t digestlen = 20; - int failed = 0; - - /*- - * test_case = 1 - * key = 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b - * key_len = 20 - * data = "Hi There" - * data_len = 8 - * digest = 0xb617318655057264e28bc0b6fb378c8ef146be00 - */ - keylen = 20; - memset(key, 0x0b, keylen); - textlen = 8; - strcpy(text, "Hi There"); - digest = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1\x46\xbe\x00"; - if (sctp_test_hmac("SHA1 test case 1", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 2 - * key = "Jefe" - * key_len = 4 - * data = "what do ya want for nothing?" - * data_len = 28 - * digest = 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79 - */ - keylen = 4; - strcpy(key, "Jefe"); - textlen = 28; - strcpy(text, "what do ya want for nothing?"); - digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79"; - if (sctp_test_hmac("SHA1 test case 2", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 3 - * key = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - * key_len = 20 - * data = 0xdd repeated 50 times - * data_len = 50 - * digest = 0x125d7342b9ac11cd91a39af48aa17b4f63f175d3 - */ - keylen = 20; - memset(key, 0xaa, keylen); - textlen = 50; - memset(text, 0xdd, textlen); - digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3"; - if (sctp_test_hmac("SHA1 test case 3", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 4 - * key = 0x0102030405060708090a0b0c0d0e0f10111213141516171819 - * key_len = 25 - * data = 0xcd repeated 50 times - * data_len = 50 - * digest = 0x4c9007f4026250c6bc8414f9bf50c86c2d7235da - */ - keylen = 25; - memcpy(key, "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", keylen); - textlen = 50; - memset(text, 0xcd, textlen); - digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda"; - if (sctp_test_hmac("SHA1 test case 4", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 5 - * key = 0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c - * key_len = 20 - * data = "Test With Truncation" - * data_len = 20 - * digest = 0x4c1a03424b55e07fe7f27be1d58bb9324a9a5a04 - * digest-96 = 0x4c1a03424b55e07fe7f27be1 - */ - keylen = 20; - memset(key, 0x0c, keylen); - textlen = 20; - strcpy(text, "Test With Truncation"); - digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04"; - if (sctp_test_hmac("SHA1 test case 5", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 6 - * key = 0xaa repeated 80 times - * key_len = 80 - * data = "Test Using Larger Than Block-Size Key - Hash Key First" - * data_len = 54 - * digest = 0xaa4ae5e15272d00e95705637ce8a3b55ed402112 - */ - keylen = 80; - memset(key, 0xaa, keylen); - textlen = 54; - strcpy(text, "Test Using Larger Than Block-Size Key - Hash Key First"); - digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12"; - if (sctp_test_hmac("SHA1 test case 6", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 7 - * key = 0xaa repeated 80 times - * key_len = 80 - * data = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data" - * data_len = 73 - * digest = 0xe8e99d0f45237d786d6bbaa7965c7808bbff1a91 - */ - keylen = 80; - memset(key, 0xaa, keylen); - textlen = 73; - strcpy(text, "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"); - digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91"; - if (sctp_test_hmac("SHA1 test case 7", SCTP_AUTH_HMAC_ID_SHA1, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /* done with all tests */ - if (failed) - printf("\nSHA1 test results: %d cases failed", failed); - else - printf("\nSHA1 test results: all test cases passed"); -} - -/* - * RFC 2202: HMAC-MD5 test cases - */ -void -sctp_test_hmac_md5(void) -{ - uint8_t *digest; - uint8_t key[128]; - uint32_t keylen; - uint8_t text[128]; - uint32_t textlen; - uint32_t digestlen = 16; - int failed = 0; - - /*- - * test_case = 1 - * key = 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b - * key_len = 16 - * data = "Hi There" - * data_len = 8 - * digest = 0x9294727a3638bb1c13f48ef8158bfc9d - */ - keylen = 16; - memset(key, 0x0b, keylen); - textlen = 8; - strcpy(text, "Hi There"); - digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d"; - if (sctp_test_hmac("MD5 test case 1", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 2 - * key = "Jefe" - * key_len = 4 - * data = "what do ya want for nothing?" - * data_len = 28 - * digest = 0x750c783e6ab0b503eaa86e310a5db738 - */ - keylen = 4; - strcpy(key, "Jefe"); - textlen = 28; - strcpy(text, "what do ya want for nothing?"); - digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38"; - if (sctp_test_hmac("MD5 test case 2", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 3 - * key = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - * key_len = 16 - * data = 0xdd repeated 50 times - * data_len = 50 - * digest = 0x56be34521d144c88dbb8c733f0e8b3f6 - */ - keylen = 16; - memset(key, 0xaa, keylen); - textlen = 50; - memset(text, 0xdd, textlen); - digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6"; - if (sctp_test_hmac("MD5 test case 3", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 4 - * key = 0x0102030405060708090a0b0c0d0e0f10111213141516171819 - * key_len = 25 - * data = 0xcd repeated 50 times - * data_len = 50 - * digest = 0x697eaf0aca3a3aea3a75164746ffaa79 - */ - keylen = 25; - memcpy(key, "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", keylen); - textlen = 50; - memset(text, 0xcd, textlen); - digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea\x3a\x75\x16\x47\x46\xff\xaa\x79"; - if (sctp_test_hmac("MD5 test case 4", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 5 - * key = 0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c - * key_len = 16 - * data = "Test With Truncation" - * data_len = 20 - * digest = 0x56461ef2342edc00f9bab995690efd4c - * digest-96 = 0x56461ef2342edc00f9bab995 - */ - keylen = 16; - memset(key, 0x0c, keylen); - textlen = 20; - strcpy(text, "Test With Truncation"); - digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00\xf9\xba\xb9\x95\x69\x0e\xfd\x4c"; - if (sctp_test_hmac("MD5 test case 5", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 6 - * key = 0xaa repeated 80 times - * key_len = 80 - * data = "Test Using Larger Than Block-Size Key - Hash Key First" - * data_len = 54 - * digest = 0x6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd - */ - keylen = 80; - memset(key, 0xaa, keylen); - textlen = 54; - strcpy(text, "Test Using Larger Than Block-Size Key - Hash Key First"); - digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f\x0b\x62\xe6\xce\x61\xb9\xd0\xcd"; - if (sctp_test_hmac("MD5 test case 6", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /*- - * test_case = 7 - * key = 0xaa repeated 80 times - * key_len = 80 - * data = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data" - * data_len = 73 - * digest = 0x6f630fad67cda0ee1fb1f562db3aa53e - */ - keylen = 80; - memset(key, 0xaa, keylen); - textlen = 73; - strcpy(text, "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"); - digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e"; - if (sctp_test_hmac("MD5 test case 7", SCTP_AUTH_HMAC_ID_MD5, key, keylen, - text, textlen, digest, digestlen) < 0) - failed++; - - /* done with all tests */ - if (failed) - printf("\nMD5 test results: %d cases failed", failed); - else - printf("\nMD5 test results: all test cases passed"); -} - -/* - * test assoc key concatenation - */ -static int -sctp_test_key_concatenation(sctp_key_t * key1, sctp_key_t * key2, - sctp_key_t * expected_key) -{ - sctp_key_t *key; - int ret_val; - - sctp_show_key(key1, "\nkey1"); - sctp_show_key(key2, "\nkey2"); - key = sctp_compute_hashkey(key1, key2, NULL); - sctp_show_key(expected_key, "\nExpected"); - sctp_show_key(key, "\nComputed"); - if (memcmp(key, expected_key, expected_key->keylen) != 0) { - printf("\nFAILED"); - ret_val = -1; - } else { - printf("\nPASSED"); - ret_val = 0; - } - sctp_free_key(key1); - sctp_free_key(key2); - sctp_free_key(expected_key); - sctp_free_key(key); - return (ret_val); -} - - -void -sctp_test_authkey(void) -{ - sctp_key_t *key1, *key2, *expected_key; - int failed = 0; - - /* test case 1 */ - key1 = sctp_set_key("\x01\x01\x01\x01", 4); - key2 = sctp_set_key("\x01\x02\x03\x04", 4); - expected_key = sctp_set_key("\x01\x01\x01\x01\x01\x02\x03\x04", 8); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 2 */ - key1 = sctp_set_key("\x00\x00\x00\x01", 4); - key2 = sctp_set_key("\x02", 1); - expected_key = sctp_set_key("\x00\x00\x00\x01\x02", 5); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 3 */ - key1 = sctp_set_key("\x01", 1); - key2 = sctp_set_key("\x00\x00\x00\x02", 4); - expected_key = sctp_set_key("\x01\x00\x00\x00\x02", 5); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 4 */ - key1 = sctp_set_key("\x00\x00\x00\x01", 4); - key2 = sctp_set_key("\x01", 1); - expected_key = sctp_set_key("\x01\x00\x00\x00\x01", 5); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 5 */ - key1 = sctp_set_key("\x01", 1); - key2 = sctp_set_key("\x00\x00\x00\x01", 4); - expected_key = sctp_set_key("\x01\x00\x00\x00\x01", 5); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 6 */ - key1 = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07", 11); - key2 = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x08", 11); - expected_key = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x08", 22); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* test case 7 */ - key1 = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x08", 11); - key2 = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07", 11); - expected_key = sctp_set_key("\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x08", 22); - if (sctp_test_key_concatenation(key1, key2, expected_key) < 0) - failed++; - - /* done with all tests */ - if (failed) - printf("\nKey concatenation test results: %d cases failed", failed); - else - printf("\nKey concatenation test results: all test cases passed"); -} - - -#if defined(STANDALONE_HMAC_TEST) -int -main(void) -{ - sctp_test_hmac_sha1(); - sctp_test_hmac_md5(); - sctp_test_authkey(); -} - -#endif /* STANDALONE_HMAC_TEST */ - -#endif /* SCTP_HMAC_TEST */ Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Sat Jan 16 17:08:22 2010 (r202448) +++ head/sys/netinet/sctp_auth.h Sat Jan 16 20:04:17 2010 (r202449) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); /* digest lengths */ #define SCTP_AUTH_DIGEST_LEN_SHA1 20 -#define SCTP_AUTH_DIGEST_LEN_MD5 16 #define SCTP_AUTH_DIGEST_LEN_SHA224 28 #define SCTP_AUTH_DIGEST_LEN_SHA256 32 #define SCTP_AUTH_DIGEST_LEN_SHA384 48 @@ -52,7 +51,6 @@ __FBSDID("$FreeBSD$"); /* union of all supported HMAC algorithm contexts */ typedef union sctp_hash_context { SHA1_CTX sha1; - MD5_CTX md5; #ifdef HAVE_SHA2 SHA256_CTX sha256; SHA384_CTX sha384; @@ -234,8 +232,4 @@ sctp_initialize_auth_params(struct sctp_ struct sctp_tcb *stcb); /* test functions */ -extern void sctp_test_hmac_sha1(void); -extern void sctp_test_hmac_md5(void); -extern void sctp_test_authkey(void); - #endif /* __SCTP_AUTH_H__ */ Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Sat Jan 16 17:08:22 2010 (r202448) +++ head/sys/netinet/sctp_os_bsd.h Sat Jan 16 20:04:17 2010 (r202449) @@ -478,12 +478,6 @@ sctp_get_mbuf_for_msg(unsigned int space #include #endif -#include -/* map standard crypto API names */ -#define MD5_Init MD5Init -#define MD5_Update MD5Update -#define MD5_Final MD5Final - #endif #define SCTP_DECREMENT_AND_CHECK_REFCOUNT(addr) (atomic_fetchadd_int(addr, -1) == 1) Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Jan 16 17:08:22 2010 (r202448) +++ head/sys/netinet/sctp_output.c Sat Jan 16 20:04:17 2010 (r202449) @@ -4313,16 +4313,8 @@ sctp_send_initiate(struct sctp_inpcb *in if (stcb->asoc.authinfo.random != NULL) { randp = (struct sctp_auth_random *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m)); p_len = sizeof(*randp) + stcb->asoc.authinfo.random_len; -#ifdef SCTP_AUTH_DRAFT_04 - randp->ph.param_type = htons(SCTP_RANDOM); - randp->ph.param_length = htons(p_len); - bcopy(stcb->asoc.authinfo.random->key, - randp->random_data, - stcb->asoc.authinfo.random_len); -#else /* random key already contains the header */ bcopy(stcb->asoc.authinfo.random->key, randp, p_len); -#endif /* zero out any padding required */ bzero((caddr_t)randp + p_len, SCTP_SIZE32(p_len) - p_len); SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sat Jan 16 17:08:22 2010 (r202448) +++ head/sys/netinet/sctp_pcb.c Sat Jan 16 20:04:17 2010 (r202449) @@ -6254,15 +6254,6 @@ next_param: return (-33); } /* concatenate the full random key */ -#ifdef SCTP_AUTH_DRAFT_04 - keylen = random_len; - new_key = sctp_alloc_key(keylen); - if (new_key != NULL) { - /* copy in the RANDOM */ - if (p_random != NULL) - bcopy(p_random->random_data, new_key->key, random_len); - } -#else keylen = sizeof(*p_random) + random_len + sizeof(*hmacs) + hmacs_len; if (chunks != NULL) { keylen += sizeof(*chunks) + num_chunks; @@ -6285,19 +6276,13 @@ next_param: bcopy(hmacs, new_key->key + keylen, sizeof(*hmacs) + hmacs_len); } - } -#endif - else { + } else { /* failed to get memory for the key */ return (-34); } if (stcb->asoc.authinfo.peer_random != NULL) sctp_free_key(stcb->asoc.authinfo.peer_random); stcb->asoc.authinfo.peer_random = new_key; -#ifdef SCTP_AUTH_DRAFT_04 - /* don't include the chunks and hmacs for draft -04 */ - stcb->asoc.authinfo.peer_random->keylen = random_len; -#endif sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.assoc_keyid); sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.recv_keyid); Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Sat Jan 16 17:08:22 2010 (r202448) +++ head/sys/netinet/sctp_uio.h Sat Jan 16 20:04:17 2010 (r202449) @@ -526,7 +526,6 @@ struct sctp_hmacalgo { /* AUTH hmac_id */ #define SCTP_AUTH_HMAC_ID_RSVD 0x0000 #define SCTP_AUTH_HMAC_ID_SHA1 0x0001 /* default, mandatory */ -#define SCTP_AUTH_HMAC_ID_MD5 0x0002 /* deprecated */ #define SCTP_AUTH_HMAC_ID_SHA256 0x0003 #define SCTP_AUTH_HMAC_ID_SHA224 0x0004 #define SCTP_AUTH_HMAC_ID_SHA384 0x0005 From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 20:36:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB4C9106566C; Sat, 16 Jan 2010 20:36:27 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 989408FC08; Sat, 16 Jan 2010 20:36:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GKaRgS002848; Sat, 16 Jan 2010 20:36:27 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GKaRF5002846; Sat, 16 Jan 2010 20:36:27 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001162036.o0GKaRF5002846@svn.freebsd.org> From: Antoine Brodin Date: Sat, 16 Jan 2010 20:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202450 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 20:36:27 -0000 Author: antoine Date: Sat Jan 16 20:36:27 2010 New Revision: 202450 URL: http://svn.freebsd.org/changeset/base/202450 Log: Add files to remove when MK_CALENDAR=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 16 20:04:17 2010 (r202449) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 16 20:36:27 2010 (r202450) @@ -466,9 +466,65 @@ OLD_FILES+=usr/share/man/man8/sdpd.8.gz # to be filled in #.endif -#.if ${MK_CALENDAR} == no -# to be filled in -#.endif +.if ${MK_CALENDAR} == no +OLD_FILES+=etc/periodic/daily/300.calendar +OLD_FILES+=usr/bin/calendar +OLD_FILES+=usr/share/calendar/calendar.all +OLD_FILES+=usr/share/calendar/calendar.australia +OLD_FILES+=usr/share/calendar/calendar.birthday +OLD_FILES+=usr/share/calendar/calendar.christian +OLD_FILES+=usr/share/calendar/calendar.computer +OLD_FILES+=usr/share/calendar/calendar.croatian +OLD_FILES+=usr/share/calendar/calendar.dutch +OLD_FILES+=usr/share/calendar/calendar.freebsd +OLD_FILES+=usr/share/calendar/calendar.french +OLD_FILES+=usr/share/calendar/calendar.german +OLD_FILES+=usr/share/calendar/calendar.history +OLD_FILES+=usr/share/calendar/calendar.holiday +OLD_FILES+=usr/share/calendar/calendar.hungarian +OLD_FILES+=usr/share/calendar/calendar.judaic +OLD_FILES+=usr/share/calendar/calendar.lotr +OLD_FILES+=usr/share/calendar/calendar.music +OLD_FILES+=usr/share/calendar/calendar.newzealand +OLD_FILES+=usr/share/calendar/calendar.russian +OLD_FILES+=usr/share/calendar/calendar.southafrica +OLD_FILES+=usr/share/calendar/calendar.ukrainian +OLD_FILES+=usr/share/calendar/calendar.usholiday +OLD_FILES+=usr/share/calendar/calendar.world +OLD_DIRS+=usr/share/calendar/de_AT.ISO_8859-15 +OLD_FILES+=usr/share/calendar/de_AT.ISO_8859-15/calendar.feiertag +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.all +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.feiertag +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.geschichte +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.kirche +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.literatur +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.musik +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.wissenschaft +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-15 +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.all +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.fetes +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.french +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.jferies +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.proverbes +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-15 +OLD_FILES+=usr/share/calendar/hr_HR.ISO8859-2/calendar.all +OLD_FILES+=usr/share/calendar/hr_HR.ISO8859-2/calendar.praznici +OLD_FILES+=usr/share/calendar/hu_HU.ISO8859-2/calendar.all +OLD_FILES+=usr/share/calendar/hu_HU.ISO8859-2/calendar.nevnapok +OLD_FILES+=usr/share/calendar/hu_HU.ISO8859-2/calendar.unnepek +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.all +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.common +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.holiday +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.military +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.msk +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.orthodox +OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.pagan +OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.all +OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.holiday +OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.misc +OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.orthodox +OLD_FILES+=usr/share/man/man1/calendar.1.gz +.endif .if ${MK_CDDL} == no OLD_LIBS+=lib/libavl.so.1 From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 20:40:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 846E9106566B; Sat, 16 Jan 2010 20:40:12 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58F698FC0A; Sat, 16 Jan 2010 20:40:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GKeCsI003773; Sat, 16 Jan 2010 20:40:12 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GKeCDW003771; Sat, 16 Jan 2010 20:40:12 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001162040.o0GKeCDW003771@svn.freebsd.org> From: Antoine Brodin Date: Sat, 16 Jan 2010 20:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202451 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 20:40:12 -0000 Author: antoine Date: Sat Jan 16 20:40:12 2010 New Revision: 202451 URL: http://svn.freebsd.org/changeset/base/202451 Log: Update files to remove when MK_CDDL=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 16 20:36:27 2010 (r202450) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 16 20:40:12 2010 (r202451) @@ -527,18 +527,69 @@ OLD_FILES+=usr/share/man/man1/calendar.1 .endif .if ${MK_CDDL} == no -OLD_LIBS+=lib/libavl.so.1 -OLD_LIBS+=lib/libnvpair.so.1 -OLD_LIBS+=lib/libumem.so.1 -OLD_LIBS+=lib/libuutil.so.1 +OLD_LIBS+=lib/libavl.so.2 +OLD_LIBS+=lib/libctf.so.2 +OLD_LIBS+=lib/libdtrace.so.2 +OLD_LIBS+=lib/libnvpair.so.2 +OLD_LIBS+=lib/libumem.so.2 +OLD_LIBS+=lib/libuutil.so.2 +OLD_FILES+=usr/bin/ctfconvert +OLD_FILES+=usr/bin/ctfdump +OLD_FILES+=usr/bin/ctfmerge +OLD_FILES+=usr/bin/sgsmsg +OLD_FILES+=usr/lib/dtrace/drti.o +OLD_FILES+=usr/lib/dtrace/errno.d +OLD_FILES+=usr/lib/dtrace/psinfo.d +OLD_FILES+=usr/lib/dtrace/signal.d +OLD_FILES+=usr/lib/dtrace/unistd.d OLD_FILES+=usr/lib/libavl.a OLD_FILES+=usr/lib/libavl.so +OLD_FILES+=usr/lib/libavl_p.a +OLD_FILES+=usr/lib/libctf.a +OLD_FILES+=usr/lib/libctf.so +OLD_FILES+=usr/lib/libctf_p.a +OLD_FILES+=usr/lib/libdtrace.a +OLD_FILES+=usr/lib/libdtrace.so +OLD_FILES+=usr/lib/libdtrace_p.a OLD_FILES+=usr/lib/libnvpair.a OLD_FILES+=usr/lib/libnvpair.so +OLD_FILES+=usr/lib/libnvpair_p.a OLD_FILES+=usr/lib/libumem.a OLD_FILES+=usr/lib/libumem.so +OLD_FILES+=usr/lib/libumem_p.a OLD_FILES+=usr/lib/libuutil.a OLD_FILES+=usr/lib/libuutil.so +OLD_FILES+=usr/lib/libuutil_p.a +.if ${TARGET_ARCH} == "amd64" +OLD_FILES+=usr/lib32/dtrace/drti.o +OLD_FILES+=usr/lib32/libavl.a +OLD_FILES+=usr/lib32/libavl.so +OLD_LIBS+=usr/lib32/libavl.so.2 +OLD_FILES+=usr/lib32/libavl_p.a +OLD_FILES+=usr/lib32/libctf.a +OLD_FILES+=usr/lib32/libctf.so +OLD_LIBS+=usr/lib32/libctf.so.2 +OLD_FILES+=usr/lib32/libctf_p.a +OLD_FILES+=usr/lib32/libdtrace.a +OLD_FILES+=usr/lib32/libdtrace.so +OLD_LIBS+=usr/lib32/libdtrace.so.2 +OLD_FILES+=usr/lib32/libdtrace_p.a +OLD_FILES+=usr/lib32/libnvpair.a +OLD_FILES+=usr/lib32/libnvpair.so +OLD_LIBS+=usr/lib32/libnvpair.so.2 +OLD_FILES+=usr/lib32/libnvpair_p.a +OLD_FILES+=usr/lib32/libumem.a +OLD_FILES+=usr/lib32/libumem.so +OLD_LIBS+=usr/lib32/libumem.so.2 +OLD_FILES+=usr/lib32/libumem_p.a +OLD_FILES+=usr/lib32/libuutil.a +OLD_FILES+=usr/lib32/libuutil.so +OLD_LIBS+=usr/lib32/libuutil.so.2 +OLD_FILES+=usr/lib32/libuutil_p.a +.endif +OLD_FILES+=usr/sbin/dtrace +OLD_FILES+=usr/sbin/lockstat +OLD_FILES+=usr/share/man/man1/dtrace.1.gz .endif .if ${MK_ZFS} == no From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 20:42:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA581065679; Sat, 16 Jan 2010 20:42:50 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DD898FC0C; Sat, 16 Jan 2010 20:42:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GKgodV004382; Sat, 16 Jan 2010 20:42:50 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GKgoQI004380; Sat, 16 Jan 2010 20:42:50 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001162042.o0GKgoQI004380@svn.freebsd.org> From: Antoine Brodin Date: Sat, 16 Jan 2010 20:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202452 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 20:42:50 -0000 Author: antoine Date: Sat Jan 16 20:42:50 2010 New Revision: 202452 URL: http://svn.freebsd.org/changeset/base/202452 Log: Update files to remove when MK_ZFS=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 16 20:40:12 2010 (r202451) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 16 20:42:50 2010 (r202452) @@ -593,15 +593,31 @@ OLD_FILES+=usr/share/man/man1/dtrace.1.g .endif .if ${MK_ZFS} == no -OLD_LIBS+=lib/libzfs.so.1 -OLD_LIBS+=lib/libzpool.so.1 +OLD_FILES+=boot/gptzfsboot +OLD_FILES+=boot/zfsboot +OLD_FILES+=boot/zfsloader +OLD_LIBS+=lib/libzfs.so.2 +OLD_LIBS+=lib/libzpool.so.2 +OLD_FILES+=rescue/zfs +OLD_FILES+=rescue/zpool OLD_FILES+=sbin/zfs OLD_FILES+=sbin/zpool +OLD_FILES+=usr/bin/zinject +OLD_FILES+=usr/bin/ztest OLD_FILES+=usr/lib/libzfs.a OLD_FILES+=usr/lib/libzfs.so +OLD_FILES+=usr/lib/libzfs_p.a OLD_FILES+=usr/lib/libzpool.a OLD_FILES+=usr/lib/libzpool.so -OLD_FILES+=usr/bin/ztest +.if ${TARGET_ARCH} == "amd64" +OLD_FILES+=usr/lib32/libzfs.a +OLD_FILES+=usr/lib32/libzfs.so +OLD_LIBS+=usr/lib32/libzfs.so.2 +OLD_FILES+=usr/lib32/libzfs_p.a +OLD_FILES+=usr/lib32/libzpool.a +OLD_FILES+=usr/lib32/libzpool.so +OLD_LIBS+=usr/lib32/libzpool.so.2 +.endif OLD_FILES+=usr/sbin/zdb OLD_FILES+=usr/share/man/man8/zdb.8.gz OLD_FILES+=usr/share/man/man8/zfs.8.gz From owner-svn-src-all@FreeBSD.ORG Sat Jan 16 20:51:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2AF71065676; Sat, 16 Jan 2010 20:51:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D074A8FC0C; Sat, 16 Jan 2010 20:51:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0GKpXQU006419; Sat, 16 Jan 2010 20:51:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0GKpX8O006417; Sat, 16 Jan 2010 20:51:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001162051.o0GKpX8O006417@svn.freebsd.org> From: Marius Strobl Date: Sat, 16 Jan 2010 20:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202453 - head/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2010 20:51:34 -0000 Author: marius Date: Sat Jan 16 20:51:33 2010 New Revision: 202453 URL: http://svn.freebsd.org/changeset/base/202453 Log: Update the sparc64 hardware list regarding machines that will be supported by 7.3-RELEASE. Approved by: blackend MFC after: 3 days Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Sat Jan 16 20:42:50 2010 (r202452) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Sat Jan 16 20:51:33 2010 (r202453) @@ -515,6 +515,10 @@ + &sun.fire; V215 (support first appeared in 7.3-RELEASE) + + + &sun.fire; V250 @@ -524,6 +528,11 @@ + &sun.fire; V480 (501-6780 and 501-6790 centerplanes only, for + which support first appeared in 7.3-RELEASE) + + + &sun.fire; V880 @@ -543,6 +552,10 @@ &sun.fire; V240 + + + &sun.fire; V245 (support first appeared in 7.3-RELEASE) +