From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:12:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D235A11; Sun, 4 Jan 2015 00:12:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89808368F; Sun, 4 Jan 2015 00:12:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t040CV9b060683; Sun, 4 Jan 2015 00:12:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040CVDf060682; Sun, 4 Jan 2015 00:12:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501040012.t040CVDf060682@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Jan 2015 00:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276645 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 00:12:31 -0000 Author: ian Date: Sun Jan 4 00:12:30 2015 New Revision: 276645 URL: https://svnweb.freebsd.org/changeset/base/276645 Log: Don't allow clang to use fpu instructions or registers in kernel modules. Submitted by: Keith White Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sat Jan 3 23:57:03 2015 (r276644) +++ head/sys/conf/kmod.mk Sun Jan 4 00:12:30 2015 (r276645) @@ -119,8 +119,10 @@ CFLAGS+= -fno-omit-frame-pointer -mno-om .endif # Temporary workaround for PR 196407, which contains the fascinating details. +# Don't allow clang to use fpu instructions or registers in kernel modules. .if ${MACHINE_CPUARCH} == arm CFLAGS.clang+= -mllvm -arm-use-movt=0 +CFLAGS.clang+= -mfpu=none .endif .if ${MACHINE_CPUARCH} == powerpc From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:33:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06DD7C2E; Sun, 4 Jan 2015 00:33:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E74333918; Sun, 4 Jan 2015 00:33:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t040XgEV070081; Sun, 4 Jan 2015 00:33:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040XgoC070080; Sun, 4 Jan 2015 00:33:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501040033.t040XgoC070080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 4 Jan 2015 00:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276646 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 00:33:43 -0000 Author: kib Date: Sun Jan 4 00:33:41 2015 New Revision: 276646 URL: https://svnweb.freebsd.org/changeset/base/276646 Log: Do not erronously export 'openat' symbol from rtld. The symbol leaked after r276630 since lib/libc/sys/openat.c defines versions for openat using .symver (version script cannot assign two versions to one symbol), and rtld uses openat. Instead, directly use __sys_openat(). Reported and tested by: antoine Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sun Jan 4 00:12:30 2015 (r276645) +++ head/libexec/rtld-elf/rtld.c Sun Jan 4 00:33:41 2015 (r276646) @@ -166,6 +166,8 @@ static bool matched_symbol(SymLook *, co void r_debug_state(struct r_debug *, struct link_map *) __noinline; void _r_debug_postinit(struct link_map *) __noinline; +int __sys_openat(int, const char *, int, ...); + /* * Data declarations. */ @@ -2824,7 +2826,7 @@ search_library_pathfds(const char *name, dirfd = parse_libdir(fdstr); if (dirfd < 0) break; - fd = openat(dirfd, name, O_RDONLY | O_CLOEXEC); + fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC); if (fd >= 0) { *fdp = fd; len = strlen(fdstr) + strlen(name) + 3; From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:44:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 402DDF78; Sun, 4 Jan 2015 00:44:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CBF73AD6; Sun, 4 Jan 2015 00:44:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t040iQYL074836; Sun, 4 Jan 2015 00:44:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040iPHJ074834; Sun, 4 Jan 2015 00:44:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501040044.t040iPHJ074834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 4 Jan 2015 00:44:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276647 - head/contrib/binutils/gas/doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 00:44:26 -0000 Author: bapt Date: Sun Jan 4 00:44:24 2015 New Revision: 276647 URL: https://svnweb.freebsd.org/changeset/base/276647 Log: Fix generating documents with modern texinfo Modified: head/contrib/binutils/gas/doc/c-arm.texi head/contrib/binutils/gas/doc/c-mips.texi Modified: head/contrib/binutils/gas/doc/c-arm.texi ============================================================================== --- head/contrib/binutils/gas/doc/c-arm.texi Sun Jan 4 00:33:41 2015 (r276646) +++ head/contrib/binutils/gas/doc/c-arm.texi Sun Jan 4 00:44:24 2015 (r276647) @@ -317,13 +317,6 @@ Either @samp{#} or @samp{$} can be used @cindex register names, ARM *TODO* Explain about ARM register naming, and the predefined names. -@node ARM Floating Point -@section Floating Point - -@cindex floating point, ARM (@sc{ieee}) -@cindex ARM floating point (@sc{ieee}) -The ARM family uses @sc{ieee} floating-point numbers. - @node ARM-Relocations @subsection ARM relocation generation @@ -365,6 +358,13 @@ respectively. For example to load the 3 MOVT r0, #:upper16:foo @end smallexample +@node ARM Floating Point +@section Floating Point + +@cindex floating point, ARM (@sc{ieee}) +@cindex ARM floating point (@sc{ieee}) +The ARM family uses @sc{ieee} floating-point numbers. + @node ARM Directives @section ARM Machine Directives Modified: head/contrib/binutils/gas/doc/c-mips.texi ============================================================================== --- head/contrib/binutils/gas/doc/c-mips.texi Sun Jan 4 00:33:41 2015 (r276646) +++ head/contrib/binutils/gas/doc/c-mips.texi Sun Jan 4 00:44:24 2015 (r276647) @@ -196,7 +196,7 @@ the @samp{mad} and @samp{madu} instructi instructions around accesses to the @samp{HI} and @samp{LO} registers. @samp{-no-m4650} turns off this option. -@itemx -m3900 +@item -m3900 @itemx -no-m3900 @itemx -m4100 @itemx -no-m4100 From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:54:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7697455C; Sun, 4 Jan 2015 00:54:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62ECF3E51; Sun, 4 Jan 2015 00:54:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t040sUD3079585; Sun, 4 Jan 2015 00:54:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040sUJ4079584; Sun, 4 Jan 2015 00:54:30 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501040054.t040sUJ4079584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 4 Jan 2015 00:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276650 - head/contrib/binutils/ld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 00:54:30 -0000 Author: bapt Date: Sun Jan 4 00:54:29 2015 New Revision: 276650 URL: https://svnweb.freebsd.org/changeset/base/276650 Log: Fix generating documentation with modern texinfo Modified: head/contrib/binutils/ld/ld.texinfo Modified: head/contrib/binutils/ld/ld.texinfo ============================================================================== --- head/contrib/binutils/ld/ld.texinfo Sun Jan 4 00:49:45 2015 (r276649) +++ head/contrib/binutils/ld/ld.texinfo Sun Jan 4 00:54:29 2015 (r276650) @@ -1725,7 +1725,7 @@ the linker script being used by the link @kindex --version-script=@var{version-scriptfile} @cindex version script, symbol versions -@itemx --version-script=@var{version-scriptfile} +@item --version-script=@var{version-scriptfile} Specify the name of a version script to the linker. This is typically used when creating shared libraries to specify additional information about the version hierarchy for the library being created. This option From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:58:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DA7D6AD; Sun, 4 Jan 2015 00:58:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 266033E9D; Sun, 4 Jan 2015 00:58:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t040wW3C080117; Sun, 4 Jan 2015 00:58:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040wViV080114; Sun, 4 Jan 2015 00:58:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501040058.t040wViV080114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 4 Jan 2015 00:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276651 - in head: contrib/binutils/bfd/doc contrib/binutils/gas/doc contrib/binutils/ld etc/mtree gnu/usr.bin/binutils gnu/usr.bin/binutils/doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 00:58:32 -0000 Author: bapt Date: Sun Jan 4 00:58:30 2015 New Revision: 276651 URL: https://svnweb.freebsd.org/changeset/base/276651 Log: Add pregenerated documentation for as(1) and ld(1) Added: head/contrib/binutils/bfd/doc/bfdver.texi head/contrib/binutils/gas/doc/as.txt (contents, props changed) head/contrib/binutils/gas/doc/asconfig.texi head/contrib/binutils/ld/configdoc.texi - copied unchanged from r276637, head/contrib/binutils/ld/gen-doc.texi head/contrib/binutils/ld/ld.txt (contents, props changed) head/gnu/usr.bin/binutils/doc/ head/gnu/usr.bin/binutils/doc/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.usr.dist head/gnu/usr.bin/binutils/Makefile Added: head/contrib/binutils/bfd/doc/bfdver.texi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/binutils/bfd/doc/bfdver.texi Sun Jan 4 00:58:30 2015 (r276651) @@ -0,0 +1 @@ +@set VERSION "2.17.50 [FreeBSD] 2007-07-03" Added: head/contrib/binutils/gas/doc/as.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/binutils/gas/doc/as.txt Sun Jan 4 00:58:30 2015 (r276651) @@ -0,0 +1,13924 @@ +START-INFO-DIR-ENTRY +* As: (as). The GNU assembler. +* Gas: (as). The GNU assembler. +END-INFO-DIR-ENTRY + +Using as +1 Overview + 1.1 Structure of this Manual + 1.2 The GNU Assembler + 1.3 Object File Formats + 1.4 Command Line + 1.5 Input Files + 1.6 Output (Object) File + 1.7 Error and Warning Messages +2 Command-Line Options + 2.1 Enable Listings: '-a[cdhlns]' + 2.2 '--alternate' + 2.3 '-D' + 2.4 Work Faster: '-f' + 2.5 '.include' Search Path: '-I' PATH + 2.6 Difference Tables: '-K' + 2.7 Include Local Symbols: '-L' + 2.8 Configuring listing output: '--listing' + 2.9 Assemble in MRI Compatibility Mode: '-M' + 2.10 Dependency Tracking: '--MD' + 2.11 Name the Object File: '-o' + 2.12 Join Data and Text Sections: '-R' + 2.13 Display Assembly Statistics: '--statistics' + 2.14 Compatible Output: '--traditional-format' + 2.15 Announce Version: '-v' + 2.16 Control Warnings: '-W', '--warn', '--no-warn', '--fatal-warnings' + 2.17 Generate Object File in Spite of Errors: '-Z' +3 Syntax + 3.1 Preprocessing + 3.2 Whitespace + 3.3 Comments + 3.4 Symbols + 3.5 Statements + 3.6 Constants + 3.6.1 Character Constants + 3.6.1.1 Strings + 3.6.1.2 Characters + 3.6.2 Number Constants + 3.6.2.1 Integers + 3.6.2.2 Bignums + 3.6.2.3 Flonums +4 Sections and Relocation + 4.1 Background + 4.2 Linker Sections + 4.3 Assembler Internal Sections + 4.4 Sub-Sections + 4.5 bss Section +5 Symbols + 5.1 Labels + 5.2 Giving Symbols Other Values + 5.3 Symbol Names + 5.4 The Special Dot Symbol + 5.5 Symbol Attributes + 5.5.1 Value + 5.5.2 Type +6 Expressions + 6.1 Empty Expressions + 6.2 Integer Expressions + 6.2.1 Arguments + 6.2.2 Operators + 6.2.3 Prefix Operator + 6.2.4 Infix Operators +7 Assembler Directives + 7.1 '.abort' + 7.2 '.align ABS-EXPR, ABS-EXPR, ABS-EXPR' + 7.3 '.ascii "STRING"'... + 7.4 '.asciz "STRING"'... + 7.5 '.balign[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR' + 7.6 '.byte EXPRESSIONS' + 7.7 '.comm SYMBOL , LENGTH ' + 7.8 '.cfi_startproc [simple]' + 7.9 '.cfi_endproc' + 7.10 '.cfi_personality ENCODING [, EXP]' + 7.11 '.cfi_lsda ENCODING [, EXP]' + 7.12 '.cfi_def_cfa REGISTER, OFFSET' + 7.13 '.cfi_def_cfa_register REGISTER' + 7.14 '.cfi_def_cfa_offset OFFSET' + 7.15 '.cfi_adjust_cfa_offset OFFSET' + 7.16 '.cfi_offset REGISTER, OFFSET' + 7.17 '.cfi_rel_offset REGISTER, OFFSET' + 7.18 '.cfi_register REGISTER1, REGISTER2' + 7.19 '.cfi_restore REGISTER' + 7.20 '.cfi_undefined REGISTER' + 7.21 '.cfi_same_value REGISTER' + 7.22 '.cfi_remember_state', + 7.23 '.cfi_return_column REGISTER' + 7.24 '.cfi_signal_frame' + 7.25 '.cfi_window_save' + 7.26 '.cfi_escape' EXPRESSION[, ...] + 7.27 '.file FILENO FILENAME' + 7.28 '.loc FILENO LINENO [COLUMN] [OPTIONS]' + 7.29 '.loc_mark_blocks ENABLE' + 7.30 '.data SUBSECTION' + 7.31 '.double FLONUMS' + 7.32 '.eject' + 7.33 '.else' + 7.34 '.elseif' + 7.35 '.end' + 7.36 '.endfunc' + 7.37 '.endif' + 7.38 '.equ SYMBOL, EXPRESSION' + 7.39 '.equiv SYMBOL, EXPRESSION' + 7.40 '.eqv SYMBOL, EXPRESSION' + 7.41 '.err' + 7.42 '.error "STRING"' + 7.43 '.exitm' + 7.44 '.extern' + 7.45 '.fail EXPRESSION' + 7.46 '.file STRING' + 7.47 '.fill REPEAT , SIZE , VALUE' + 7.48 '.float FLONUMS' + 7.49 '.func NAME[,LABEL]' + 7.50 '.global SYMBOL', '.globl SYMBOL' + 7.51 '.hidden NAMES' + 7.52 '.hword EXPRESSIONS' + 7.53 '.ident' + 7.54 '.if ABSOLUTE EXPRESSION' + 7.55 '.incbin "FILE"[,SKIP[,COUNT]]' + 7.56 '.include "FILE"' + 7.57 '.int EXPRESSIONS' + 7.58 '.internal NAMES' + 7.59 '.irp SYMBOL,VALUES'... + 7.60 '.irpc SYMBOL,VALUES'... + 7.61 '.lcomm SYMBOL , LENGTH' + 7.62 '.lflags' + 7.63 '.line LINE-NUMBER' + 7.64 '.linkonce [TYPE]' + 7.65 '.ln LINE-NUMBER' + 7.66 '.mri VAL' + 7.67 '.list' + 7.68 '.long EXPRESSIONS' + 7.69 '.macro' + 7.70 '.altmacro' + 7.71 '.noaltmacro' + 7.72 '.nolist' + 7.73 '.octa BIGNUMS' + 7.74 '.org NEW-LC , FILL' + 7.75 '.p2align[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR' + 7.76 '.previous' + 7.77 '.popsection' + 7.78 '.print STRING' + 7.79 '.protected NAMES' + 7.80 '.psize LINES , COLUMNS' + 7.81 '.purgem NAME' + 7.82 '.pushsection NAME , SUBSECTION' + 7.83 '.quad BIGNUMS' + 7.84 '.reloc OFFSET, RELOC_NAME[, EXPRESSION]' + 7.85 '.rept COUNT' + 7.86 '.sbttl "SUBHEADING"' + 7.87 '.section NAME' + 7.88 '.set SYMBOL, EXPRESSION' + 7.89 '.short EXPRESSIONS' + 7.90 '.single FLONUMS' + 7.91 '.size' + 7.92 '.sleb128 EXPRESSIONS' + 7.93 '.skip SIZE , FILL' + 7.94 '.space SIZE , FILL' + 7.95 '.stabd, .stabn, .stabs' + 7.96 '.string' "STR" + 7.97 '.struct EXPRESSION' + 7.98 '.subsection NAME' + 7.99 '.symver' + 7.100 '.text SUBSECTION' + 7.101 '.title "HEADING"' + 7.102 '.type' + 7.103 '.uleb128 EXPRESSIONS' + 7.104 '.version "STRING"' + 7.105 '.vtable_entry TABLE, OFFSET' + 7.106 '.vtable_inherit CHILD, PARENT' + 7.107 '.warning "STRING"' + 7.108 '.weak NAMES' + 7.109 '.weakref ALIAS, TARGET' + 7.110 '.word EXPRESSIONS' + 7.111 Deprecated Directives +8 ARM Dependent Features + 8.1 Options + 8.2 Syntax + 8.2.1 Special Characters + 8.2.2 Register Names + 8.2.3 ARM relocation generation + 8.3 Floating Point + 8.4 ARM Machine Directives + 8.5 Opcodes + 8.6 Mapping Symbols +9 80386 Dependent Features + 9.1 Options + 9.2 AT&T Syntax versus Intel Syntax + 9.3 Instruction Naming + 9.4 Register Naming + 9.5 Instruction Prefixes + 9.6 Memory References + 9.7 Handling of Jump Instructions + 9.8 Floating Point + 9.9 Intel's MMX and AMD's 3DNow! SIMD Operations + 9.10 Writing 16-bit Code + 9.11 AT&T Syntax bugs + 9.12 Specifying CPU Architecture + 9.13 Notes +10 IA-64 Dependent Features + 10.1 Options + 10.2 Syntax + 10.2.1 Special Characters + 10.2.2 Register Names + 10.2.3 IA-64 Processor-Status-Register (PSR) Bit Names + 10.3 Opcodes +11 MIPS Dependent Features + 11.1 Assembler options + 11.2 MIPS ECOFF object code + 11.3 Directives for debugging information + 11.4 Directives to override the size of symbols + 11.5 Directives to override the ISA level + 11.6 Directives for extending MIPS 16 bit instructions + 11.7 Directive to mark data as an instruction + 11.8 Directives to save and restore options + 11.9 Directives to control generation of MIPS ASE instructions +12 PowerPC Dependent Features + 12.1 Options + 12.2 PowerPC Assembler Directives +13 SPARC Dependent Features + 13.1 Options + 13.2 Enforcing aligned data + 13.3 Floating Point + 13.4 Sparc Machine Directives +14 Reporting Bugs + 14.1 Have You Found a Bug? + 14.2 How to Report Bugs +15 Acknowledgements +Appendix A GNU Free Documentation License + ADDENDUM: How to use this License for your documents +AS Index +Using as +******** + +This file is a user guide to the GNU assembler 'as' version "2.17.50 +[FreeBSD] 2007-07-03". This version of the file describes 'as' +configured to generate code for machine specific architectures. + + This document is distributed under the terms of the GNU Free +Documentation License. A copy of the license is included in the section +entitled "GNU Free Documentation License". + +1 Overview +********** + +Here is a brief summary of how to invoke 'as'. For details, see *note +Command-Line Options: Invoking. + + as [-a[cdhlns][=FILE]] [-alternate] [-D] + [-defsym SYM=VAL] [-f] [-g] [-gstabs] + [-gstabs+] [-gdwarf-2] [-help] [-I DIR] [-J] + [-K] [-L] [-listing-lhs-width=NUM] + [-listing-lhs-width2=NUM] [-listing-rhs-width=NUM] + [-listing-cont-lines=NUM] [-keep-locals] [-o + OBJFILE] [-R] [-reduce-memory-overheads] [-statistics] + [-v] [-version] [-version] [-W] [-warn] + [-fatal-warnings] [-w] [-x] [-Z] [@FILE] + [-target-help] [TARGET-OPTIONS] + [-|FILES ...] + + _Target ARM options:_ + [-mcpu=PROCESSOR[+EXTENSION...]] + [-march=ARCHITECTURE[+EXTENSION...]] + [-mfpu=FLOATING-POINT-FORMAT] + [-mfloat-abi=ABI] + [-meabi=VER] + [-mthumb] + [-EB|-EL] + [-mapcs-32|-mapcs-26|-mapcs-float| + -mapcs-reentrant] + [-mthumb-interwork] [-k] + + _Target i386 options:_ + [-32|-64] [-n] + [-march=CPU] [-mtune=CPU] + + _Target IA-64 options:_ + [-mconstant-gp|-mauto-pic] + [-milp32|-milp64|-mlp64|-mp64] + [-mle|mbe] + [-mtune=itanium1|-mtune=itanium2] + [-munwind-check=warning|-munwind-check=error] + [-mhint.b=ok|-mhint.b=warning|-mhint.b=error] + [-x|-xexplicit] [-xauto] [-xdebug] + + _Target MIPS options:_ + [-nocpp] [-EL] [-EB] [-O[OPTIMIZATION LEVEL]] + [-g[DEBUG LEVEL]] [-G NUM] [-KPIC] [-call_shared] + [-non_shared] [-xgot [-mvxworks-pic] + [-mabi=ABI] [-32] [-n32] [-64] [-mfp32] [-mgp32] + [-march=CPU] [-mtune=CPU] [-mips1] [-mips2] + [-mips3] [-mips4] [-mips5] [-mips32] [-mips32r2] + [-mips64] [-mips64r2] + [-construct-floats] [-no-construct-floats] + [-trap] [-no-break] [-break] [-no-trap] + [-mfix7000] [-mno-fix7000] + [-mips16] [-no-mips16] + [-msmartmips] [-mno-smartmips] + [-mips3d] [-no-mips3d] + [-mdmx] [-no-mdmx] + [-mdsp] [-mno-dsp] + [-mdspr2] [-mno-dspr2] + [-mmt] [-mno-mt] + [-mdebug] [-no-mdebug] + [-mpdr] [-mno-pdr] + + _Target PowerPC options:_ + [-mpwrx|-mpwr2|-mpwr|-m601|-mppc|-mppc32|-m603|-m604| + -m403|-m405|-mppc64|-m620|-mppc64bridge|-mbooke| + -mbooke32|-mbooke64] + [-mcom|-many|-maltivec] [-memb] + [-mregnames|-mno-regnames] + [-mrelocatable|-mrelocatable-lib] + [-mlittle|-mlittle-endian|-mbig|-mbig-endian] + [-msolaris|-mno-solaris] + + _Target SPARC options:_ + [-Av6|-Av7|-Av8|-Asparclet|-Asparclite + -Av8plus|-Av8plusa|-Av9|-Av9a] + [-xarch=v8plus|-xarch=v8plusa] [-bump] + [-32|-64] + + + +'@FILE' + Read command-line options from FILE. The options read are inserted + in place of the original @FILE option. If FILE does not exist, or + cannot be read, then the option will be treated literally, and not + removed. + + Options in FILE are separated by whitespace. A whitespace + character may be included in an option by surrounding the entire + option in either single or double quotes. Any character (including + a backslash) may be included by prefixing the character to be + included with a backslash. The FILE may itself contain additional + @FILE options; any such options will be processed recursively. + +'-a[cdhlmns]' + Turn on listings, in any of a variety of ways: + + '-ac' + omit false conditionals + + '-ad' + omit debugging directives + + '-ah' + include high-level source + + '-al' + include assembly + + '-am' + include macro expansions + + '-an' + omit forms processing + + '-as' + include symbols + + '=file' + set the name of the listing file + + You may combine these options; for example, use '-aln' for assembly + listing without forms processing. The '=file' option, if used, + must be the last one. By itself, '-a' defaults to '-ahls'. + +'--alternate' + Begin in alternate macro mode. *Note '.altmacro': Altmacro. + +'-D' + Ignored. This option is accepted for script compatibility with + calls to other assemblers. + +'--defsym SYM=VALUE' + Define the symbol SYM to be VALUE before assembling the input file. + VALUE must be an integer constant. As in C, a leading '0x' + indicates a hexadecimal value, and a leading '0' indicates an octal + value. The value of the symbol can be overridden inside a source + file via the use of a '.set' pseudo-op. + +'-f' + "fast"--skip whitespace and comment preprocessing (assume source is + compiler output). + +'-g' +'--gen-debug' + Generate debugging information for each assembler source line using + whichever debug format is preferred by the target. This currently + means either STABS, ECOFF or DWARF2. + +'--gstabs' + Generate stabs debugging information for each assembler line. This + may help debugging assembler code, if the debugger can handle it. + +'--gstabs+' + Generate stabs debugging information for each assembler line, with + GNU extensions that probably only gdb can handle, and that could + make other debuggers crash or refuse to read your program. This + may help debugging assembler code. Currently the only GNU + extension is the location of the current working directory at + assembling time. + +'--gdwarf-2' + Generate DWARF2 debugging information for each assembler line. + This may help debugging assembler code, if the debugger can handle + it. Note--this option is only supported by some targets, not all + of them. + +'--help' + Print a summary of the command line options and exit. + +'--target-help' + Print a summary of all target specific options and exit. + +'-I DIR' + Add directory DIR to the search list for '.include' directives. + +'-J' + Don't warn about signed overflow. + +'-K' + This option is accepted but has no effect on the machine specific + family. + +'-L' +'--keep-locals' + Keep (in the symbol table) local symbols. These symbols start with + system-specific local label prefixes, typically '.L' for ELF + systems or 'L' for traditional a.out systems. *Note Symbol + Names::. + +'--listing-lhs-width=NUMBER' + Set the maximum width, in words, of the output data column for an + assembler listing to NUMBER. + +'--listing-lhs-width2=NUMBER' + Set the maximum width, in words, of the output data column for + continuation lines in an assembler listing to NUMBER. + +'--listing-rhs-width=NUMBER' + Set the maximum width of an input source line, as displayed in a + listing, to NUMBER bytes. + +'--listing-cont-lines=NUMBER' + Set the maximum number of lines printed in a listing for a single + line of input to NUMBER + 1. + +'-o OBJFILE' + Name the object-file output from 'as' OBJFILE. + +'-R' + Fold the data section into the text section. + + Set the default size of GAS's hash tables to a prime number close + to NUMBER. Increasing this value can reduce the length of time it + takes the assembler to perform its tasks, at the expense of + increasing the assembler's memory requirements. Similarly reducing + this value can reduce the memory requirements at the expense of + speed. + +'--reduce-memory-overheads' + This option reduces GAS's memory requirements, at the expense of + making the assembly processes slower. Currently this switch is a + synonym for '--hash-size=4051', but in the future it may have other + effects as well. + +'--statistics' + Print the maximum space (in bytes) and total time (in seconds) used + by assembly. + +'--strip-local-absolute' + Remove local absolute symbols from the outgoing symbol table. + +'-v' +'-version' + Print the 'as' version. + +'--version' + Print the 'as' version and exit. + +'-W' +'--no-warn' + Suppress warning messages. + +'--fatal-warnings' + Treat warnings as errors. + +'--warn' + Don't suppress warning messages or treat them as errors. + +'-w' + Ignored. + +'-x' + Ignored. + +'-Z' + Generate an object file even after errors. + +'-- | FILES ...' + Standard input, or source files to assemble. + + The following options are available when as is configured for the ARM +processor family. + +'-mcpu=PROCESSOR[+EXTENSION...]' + Specify which ARM processor variant is the target. +'-march=ARCHITECTURE[+EXTENSION...]' + Specify which ARM architecture variant is used by the target. +'-mfpu=FLOATING-POINT-FORMAT' + Select which Floating Point architecture is the target. +'-mfloat-abi=ABI' + Select which floating point ABI is in use. +'-mthumb' + Enable Thumb only instruction decoding. +'-mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant' + Select which procedure calling convention is in use. +'-EB | -EL' + Select either big-endian (-EB) or little-endian (-EL) output. +'-mthumb-interwork' + Specify that the code has been generated with interworking between + Thumb and ARM code in mind. +'-k' + Specify that PIC code has been generated. + + The following options are available when 'as' is configured for the +SPARC architecture: + +'-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite' +'-Av8plus | -Av8plusa | -Av9 | -Av9a' + Explicitly select a variant of the SPARC architecture. + + '-Av8plus' and '-Av8plusa' select a 32 bit environment. '-Av9' and + '-Av9a' select a 64 bit environment. + + '-Av8plusa' and '-Av9a' enable the SPARC V9 instruction set with + UltraSPARC extensions. + +'-xarch=v8plus | -xarch=v8plusa' + For compatibility with the Solaris v9 assembler. These options are + equivalent to -Av8plus and -Av8plusa, respectively. + +'-bump' + Warn when the assembler switches to another architecture. + + The following options are available when as is configured for a MIPS +processor. + +'-G NUM' + This option sets the largest size of an object that can be + referenced implicitly with the 'gp' register. It is only accepted + for targets that use ECOFF format, such as a DECstation running + Ultrix. The default value is 8. + +'-EB' + Generate "big endian" format output. + +'-EL' + Generate "little endian" format output. + +'-mips1' +'-mips2' +'-mips3' +'-mips4' +'-mips5' +'-mips32' +'-mips32r2' +'-mips64' +'-mips64r2' + Generate code for a particular MIPS Instruction Set Architecture + level. '-mips1' is an alias for '-march=r3000', '-mips2' is an + alias for '-march=r6000', '-mips3' is an alias for '-march=r4000' + and '-mips4' is an alias for '-march=r8000'. '-mips5', '-mips32', + '-mips32r2', '-mips64', and '-mips64r2' correspond to generic 'MIPS + V', 'MIPS32', 'MIPS32 Release 2', 'MIPS64', and 'MIPS64 Release 2' + ISA processors, respectively. + +'-march=CPU' + Generate code for a particular MIPS cpu. + +'-mtune=CPU' + Schedule and tune for a particular MIPS cpu. + +'-mfix7000' +'-mno-fix7000' + Cause nops to be inserted if the read of the destination register + of an mfhi or mflo instruction occurs in the following two + instructions. + +'-mdebug' +'-no-mdebug' + Cause stabs-style debugging output to go into an ECOFF-style + .mdebug section instead of the standard ELF .stabs sections. + +'-mpdr' +'-mno-pdr' + Control generation of '.pdr' sections. + +'-mgp32' +'-mfp32' + The register sizes are normally inferred from the ISA and ABI, but + these flags force a certain group of registers to be treated as 32 + bits wide at all times. '-mgp32' controls the size of + general-purpose registers and '-mfp32' controls the size of + floating-point registers. + +'-mips16' +'-no-mips16' + Generate code for the MIPS 16 processor. This is equivalent to + putting '.set mips16' at the start of the assembly file. + '-no-mips16' turns off this option. + +'-msmartmips' +'-mno-smartmips' + Enables the SmartMIPS extension to the MIPS32 instruction set. + This is equivalent to putting '.set smartmips' at the start of the + assembly file. '-mno-smartmips' turns off this option. + +'-mips3d' +'-no-mips3d' + Generate code for the MIPS-3D Application Specific Extension. This + tells the assembler to accept MIPS-3D instructions. '-no-mips3d' + turns off this option. + +'-mdmx' +'-no-mdmx' + Generate code for the MDMX Application Specific Extension. This + tells the assembler to accept MDMX instructions. '-no-mdmx' turns + off this option. + +'-mdsp' +'-mno-dsp' + Generate code for the DSP Release 1 Application Specific Extension. + This tells the assembler to accept DSP Release 1 instructions. + '-mno-dsp' turns off this option. + +'-mdspr2' +'-mno-dspr2' + Generate code for the DSP Release 2 Application Specific Extension. + This option implies -mdsp. This tells the assembler to accept DSP + Release 2 instructions. '-mno-dspr2' turns off this option. + +'-mmt' +'-mno-mt' + Generate code for the MT Application Specific Extension. This + tells the assembler to accept MT instructions. '-mno-mt' turns off + this option. + +'--construct-floats' +'--no-construct-floats' + The '--no-construct-floats' option disables the construction of + double width floating point constants by loading the two halves of + the value into the two single width floating point registers that + make up the double width register. By default '--construct-floats' + is selected, allowing construction of these floating point + constants. + +'--emulation=NAME' + This option causes 'as' to emulate 'as' configured for some other + target, in all respects, including output format (choosing between + ELF and ECOFF only), handling of pseudo-opcodes which may generate + debugging information or store symbol table information, and + default endianness. The available configuration names are: + 'mipsecoff', 'mipself', 'mipslecoff', 'mipsbecoff', 'mipslelf', + 'mipsbelf'. The first two do not alter the default endianness from + that of the primary target for which the assembler was configured; + the others change the default to little- or big-endian as indicated + by the 'b' or 'l' in the name. Using '-EB' or '-EL' will override + the endianness selection in any case. + + This option is currently supported only when the primary target + 'as' is configured for is a MIPS ELF or ECOFF target. Furthermore, + the primary target or others specified with '--enable-targets=...' + at configuration time must include support for the other format, if + both are to be available. For example, the Irix 5 configuration + includes support for both. + + Eventually, this option will support more configurations, with more + fine-grained control over the assembler's behavior, and will be + supported for more processors. + +'-nocpp' + 'as' ignores this option. It is accepted for compatibility with + the native tools. + +'--trap' +'--no-trap' +'--break' +'--no-break' + Control how to deal with multiplication overflow and division by + zero. '--trap' or '--no-break' (which are synonyms) take a trap + exception (and only work for Instruction Set Architecture level 2 + and higher); '--break' or '--no-trap' (also synonyms, and the + default) take a break exception. + +'-n' + When this option is used, 'as' will issue a warning every time it + generates a nop instruction from a macro. + +1.1 Structure of this Manual +============================ + +This manual is intended to describe what you need to know to use GNU +'as'. We cover the syntax expected in source files, including notation +for symbols, constants, and expressions; the directives that 'as' +understands; and of course how to invoke 'as'. + + We also cover special features in the machine specific configuration +of 'as', including assembler directives. + + On the other hand, this manual is _not_ intended as an introduction +to programming in assembly language--let alone programming in general! +In a similar vein, we make no attempt to introduce the machine +architecture; we do _not_ describe the instruction set, standard +mnemonics, registers or addressing modes that are standard to a +particular architecture. + +1.2 The GNU Assembler +===================== + +GNU 'as' is really a family of assemblers. This manual describes 'as', +a member of that family which is configured for the machine specific +architectures. If you use (or have used) the GNU assembler on one +architecture, you should find a fairly similar environment when you use +it on another architecture. Each version has much in common with the +others, including object file formats, most assembler directives (often +called "pseudo-ops") and assembler syntax. + + 'as' is primarily intended to assemble the output of the GNU C +compiler 'gcc' for use by the linker 'ld'. Nevertheless, we've tried to +make 'as' assemble correctly everything that other assemblers for the +same machine would assemble. + + Unlike older assemblers, 'as' is designed to assemble a source +program in one pass of the source file. This has a subtle impact on the +'.org' directive (*note '.org': Org.). + +1.3 Object File Formats +======================= + +The GNU assembler can be configured to produce several alternative +object file formats. For the most part, this does not affect how you +write assembly language programs; but directives for debugging symbols +are typically different in different file formats. *Note Symbol +Attributes: Symbol Attributes. For the machine specific target, 'as' is +configured to produce ELF format object files. + +1.4 Command Line +================ + +After the program name 'as', the command line may contain options and +file names. Options may appear in any order, and may be before, after, +or between file names. The order of file names is significant. + + '--' (two hyphens) by itself names the standard input file +explicitly, as one of the files for 'as' to assemble. + + Except for '--' any command line argument that begins with a hyphen +('-') is an option. Each option changes the behavior of 'as'. No +option changes the way another option works. An option is a '-' +followed by one or more letters; the case of the letter is important. +All options are optional. + + Some options expect exactly one file name to follow them. The file +name may either immediately follow the option's letter (compatible with +older assemblers) or it may be the next command argument (GNU standard). +These two command lines are equivalent: + + as -o my-object-file.o mumble.s + as -omy-object-file.o mumble.s + +1.5 Input Files +=============== + +We use the phrase "source program", abbreviated "source", to describe +the program input to one run of 'as'. The program may be in one or more +files; how the source is partitioned into files doesn't change the +meaning of the source. + + The source program is a concatenation of the text in all the files, +in the order specified. + + Each time you run 'as' it assembles exactly one source program. The +source program is made up of one or more files. (The standard input is +also a file.) + + You give 'as' a command line that has zero or more input file names. +The input files are read (from left file name to right). A command line +argument (in any position) that has no special meaning is taken to be an +input file name. + + If you give 'as' no file names it attempts to read one input file +from the 'as' standard input, which is normally your terminal. You may +have to type to tell 'as' there is no more program to assemble. + + Use '--' if you need to explicitly name the standard input file in +your command line. + + If the source is empty, 'as' produces a small, empty object file. + +Filenames and Line-numbers +-------------------------- + +There are two ways of locating a line in the input file (or files) and +either may be used in reporting error messages. One way refers to a +line number in a physical file; the other refers to a line number in a +"logical" file. *Note Error and Warning Messages: Errors. + + "Physical files" are those files named in the command line given to +'as'. + + "Logical files" are simply names declared explicitly by assembler +directives; they bear no relation to physical files. Logical file names +help error messages reflect the original source file, when 'as' source +is itself synthesized from other files. 'as' understands the '#' +directives emitted by the 'gcc' preprocessor. See also *note '.file': +File. + +1.6 Output (Object) File +======================== + +Every time you run 'as' it produces an output file, which is your +assembly language program translated into numbers. This file is the +object file. Its default name is 'a.out'. You can give it another name +by using the '-o' option. Conventionally, object file names end with +'.o'. The default name is used for historical reasons: older assemblers +were capable of assembling self-contained programs directly into a +runnable program. (For some formats, this isn't currently possible, but +it can be done for the 'a.out' format.) + + The object file is meant for input to the linker 'ld'. It contains +assembled program code, information to help 'ld' integrate the assembled +program into a runnable file, and (optionally) symbolic information for +the debugger. + +1.7 Error and Warning Messages +============================== + +'as' may write warnings and error messages to the standard error file +(usually your terminal). This should not happen when a compiler runs +'as' automatically. Warnings report an assumption made so that 'as' +could keep assembling a flawed program; errors report a grave problem +that stops the assembly. + + Warning messages have the format + + file_name:NNN:Warning Message Text + +(where NNN is a line number). If a logical file name has been given +(*note '.file': File.) it is used for the filename, otherwise the name +of the current input file is used. If a logical line number was given +then it is used to calculate the number printed, otherwise the actual +line in the current source file is printed. The message text is +intended to be self explanatory (in the grand Unix tradition). + + Error messages have the format + file_name:NNN:FATAL:Error Message Text + The file name and line number are derived as for warning messages. +The actual message text may be rather less explanatory because many of +them aren't supposed to happen. + +2 Command-Line Options +********************** + +This chapter describes command-line options available in _all_ versions +of the GNU assembler; see *note Machine Dependencies::, for options +specific to the machine specific target. + + If you are invoking 'as' via the GNU C compiler, you can use the +'-Wa' option to pass arguments through to the assembler. The assembler +arguments must be separated from each other (and the '-Wa') by commas. +For example: + + gcc -c -g -O -Wa,-alh,-L file.c + +This passes two options to the assembler: '-alh' (emit a listing to +standard output with high-level and assembly source) and '-L' (retain +local symbols in the symbol table). + + Usually you do not need to use this '-Wa' mechanism, since many +compiler command-line options are automatically passed to the assembler +by the compiler. (You can call the GNU compiler driver with the '-v' +option to see precisely what options it passes to each compilation pass, +including the assembler.) + +2.1 Enable Listings: '-a[cdhlns]' +================================= + +These options enable listing output from the assembler. By itself, '-a' +requests high-level, assembly, and symbols listing. You can use other +letters to select specific options for the list: '-ah' requests a +high-level language listing, '-al' requests an output-program assembly +listing, and '-as' requests a symbol table listing. High-level listings +require that a compiler debugging option like '-g' be used, and that +assembly listings ('-al') be requested also. + + Use the '-ac' option to omit false conditionals from a listing. Any +lines which are not assembled because of a false '.if' (or '.ifdef', or +any other conditional), or a true '.if' followed by an '.else', will be +omitted from the listing. + + Use the '-ad' option to omit debugging directives from the listing. + + Once you have specified one of these options, you can further control +listing output and its appearance using the directives '.list', +'.nolist', '.psize', '.eject', '.title', and '.sbttl'. The '-an' option +turns off all forms processing. If you do not request listing output +with one of the '-a' options, the listing-control directives have no +effect. + + The letters after '-a' may be combined into one option, _e.g._, +'-aln'. + + Note if the assembler source is coming from the standard input (e.g., +because it is being created by 'gcc' and the '-pipe' command line switch +is being used) then the listing will not contain any comments or +preprocessor directives. This is because the listing code buffers input +source lines from stdin only after they have been preprocessed by the +assembler. This reduces memory usage and makes the code more efficient. + +2.2 '--alternate' +================= + +Begin in alternate macro mode, see *note '.altmacro': Altmacro. + +2.3 '-D' +======== + +This option has no effect whatsoever, but it is accepted to make it more +likely that scripts written for other assemblers also work with 'as'. + +2.4 Work Faster: '-f' +===================== + +'-f' should only be used when assembling programs written by a (trusted) +compiler. '-f' stops the assembler from doing whitespace and comment +preprocessing on the input file(s) before assembling them. *Note +Preprocessing: Preprocessing. + + _Warning:_ if you use '-f' when the files actually need to be + preprocessed (if they contain comments, for example), 'as' does not + work correctly. + +2.5 '.include' Search Path: '-I' PATH +===================================== + +Use this option to add a PATH to the list of directories 'as' searches +for files specified in '.include' directives (*note '.include': +Include.). You may use '-I' as many times as necessary to include a +variety of paths. The current working directory is always searched +first; after that, 'as' searches any '-I' directories in the same order +as they were specified (left to right) on the command line. + +2.6 Difference Tables: '-K' +=========================== + +On the machine specific family, this option is allowed, but has no +effect. It is permitted for compatibility with the GNU assembler on +other platforms, where it can be used to warn when the assembler alters +the machine code generated for '.word' directives in difference tables. +The machine specific family does not have the addressing limitations +that sometimes lead to this alteration on other platforms. + +2.7 Include Local Symbols: '-L' +=============================== + +Symbols beginning with system-specific local label prefixes, typically +'.L' for ELF systems or 'L' for traditional a.out systems, are called +"local symbols". *Note Symbol Names::. Normally you do not see such +symbols when debugging, because they are intended for the use of +programs (like compilers) that compose assembler programs, not for your +notice. Normally both 'as' and 'ld' discard such symbols, so you do not +normally debug with them. + + This option tells 'as' to retain those local symbols in the object +file. Usually if you do this you also tell the linker 'ld' to preserve +those symbols. + +2.8 Configuring listing output: '--listing' +=========================================== + +The listing feature of the assembler can be enabled via the command line +switch '-a' (*note a::). This feature combines the input source file(s) +with a hex dump of the corresponding locations in the output object +file, and displays them as a listing file. The format of this listing +can be controlled by directives inside the assembler source (i.e., +'.list' (*note List::), '.title' (*note Title::), '.sbttl' (*note *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 01:45:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84691B8C; Sun, 4 Jan 2015 01:45:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 709701542; Sun, 4 Jan 2015 01:45:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t041jRTg002902; Sun, 4 Jan 2015 01:45:27 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t041jR6v002901; Sun, 4 Jan 2015 01:45:27 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201501040145.t041jR6v002901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 4 Jan 2015 01:45:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276652 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 01:45:27 -0000 Author: jhibbits Date: Sun Jan 4 01:45:26 2015 New Revision: 276652 URL: https://svnweb.freebsd.org/changeset/base/276652 Log: Truncate DB_SMALL_VALUE_MAX to a much lower value. Unlike the other architectures, the PowerPC kernel is loaded under the 2GB boundary. MFC after: 2 weeks Modified: head/sys/powerpc/include/db_machdep.h Modified: head/sys/powerpc/include/db_machdep.h ============================================================================== --- head/sys/powerpc/include/db_machdep.h Sun Jan 4 00:58:30 2015 (r276651) +++ head/sys/powerpc/include/db_machdep.h Sun Jan 4 01:45:26 2015 (r276652) @@ -87,7 +87,7 @@ typedef intptr_t db_expr_t; /* expressio #define inst_load(ins) 0 #define inst_store(ins) 0 -#define DB_SMALL_VALUE_MAX (0x7fffffff) +#define DB_SMALL_VALUE_MAX (KERNBASE-1) #define DB_SMALL_VALUE_MIN (-0x40001) #endif /* _POWERPC_DB_MACHDEP_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 08:41:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32E49420; Sun, 4 Jan 2015 08:41:15 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id E7F0E2F6E; Sun, 4 Jan 2015 08:41:14 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id C6CA7422F57; Sun, 4 Jan 2015 19:22:49 +1100 (AEDT) Date: Sun, 4 Jan 2015 19:22:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Justin Hibbits Subject: Re: svn commit: r276652 - head/sys/powerpc/include In-Reply-To: <201501040145.t041jR6v002901@svn.freebsd.org> Message-ID: <20150104175630.N938@besplex.bde.org> References: <201501040145.t041jR6v002901@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Qdxf4Krv c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=Y9atxNZRGnVNfphMyhYA:9 a=C8cKej9PWVs444H1:21 a=Ed0aNJ1LHaQMm8G0:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 08:41:15 -0000 On Sun, 4 Jan 2015, Justin Hibbits wrote: > Log: > Truncate DB_SMALL_VALUE_MAX to a much lower value. > > Unlike the other architectures, the PowerPC kernel is loaded under the 2GB > boundary. > > MFC after: 2 weeks > > Modified: > head/sys/powerpc/include/db_machdep.h > > Modified: head/sys/powerpc/include/db_machdep.h > ============================================================================== > --- head/sys/powerpc/include/db_machdep.h Sun Jan 4 00:58:30 2015 (r276651) > +++ head/sys/powerpc/include/db_machdep.h Sun Jan 4 01:45:26 2015 (r276652) > @@ -87,7 +87,7 @@ typedef intptr_t db_expr_t; /* expressio > #define inst_load(ins) 0 > #define inst_store(ins) 0 > > -#define DB_SMALL_VALUE_MAX (0x7fffffff) > +#define DB_SMALL_VALUE_MAX (KERNBASE-1) > #define DB_SMALL_VALUE_MIN (-0x40001) > > #endif /* _POWERPC_DB_MACHDEP_H_ */ DB_SMALL_VALUE was broken on all arches AFAIK. Hopefully it now sort of works for PowerPC, and you can fix it better for PowerPC and then other arches. It was first implemented in: X RCS file: /home/ncvs/src/sys/ddb/db_sym.c,v X Working file: db_sym.c X head: 1.35 X ... X ---------------------------- X revision 1.17 X date: 1997/01/16 11:27:10; author: bde; state: Exp; lines: +8 -2 X Fixed printing of small offsets. E.g., -4(%ebp) is now printed X as -0x4(%ebp) instead of as _APTD+0xffc(%ebp), and if GUPROF is X defined, 8(%ebp) is now printed as 0x8(%ebp) instead of as X GMON_PROF_HIRES+0x4(%ebp). X ---------------------------- This depends on magic symbols like _APTD. Someone broke this on i386 by removing these magic symbols without updating the definition of DB_SMALL_VALUE_MAX. Other arches are even more broken. They never had a suitable magic symbol and/or the i386 value was copied without changing it except to expand to 64 bits. The brokenness is especially large on 64-bit arches. It causes small negative offsets from the stack or frame pointer to be misclassified as large, so they are printed as huge cryptic unsigned values instead of as small signed values. E.g., -24(%ebp) is printed as 0xffffffe8(%ebp) on i386 and -24(%rbp) is printed as 0xffffffffffffffe8(%ebp) on amd64. I use the following quick fixes for i386: X Index: db_sym.c X =================================================================== X RCS file: /home/ncvs/src/sys/ddb/db_sym.c,v X retrieving revision 1.35 X diff -u -2 -r1.35 db_sym.c X --- db_sym.c 24 Feb 2004 22:51:42 -0000 1.35 X +++ db_sym.c 25 Feb 2004 10:11:09 -0000 X @@ -303,5 +303,9 @@ X if (name == 0) X value = off; X +#ifdef magic_large_symbols_unbroken X if (value >= DB_SMALL_VALUE_MIN && value <= DB_SMALL_VALUE_MAX) { X +#else X + if (off >= DB_SMALL_VALUE_MIN && off <= DB_SMALL_VALUE_MAX) { X +#endif X db_printf("%+#lr", (long)off); X return; X Index: db_machdep.h X =================================================================== X RCS file: /home/ncvs/src/sys/i386/include/db_machdep.h,v X retrieving revision 1.17 X diff -u -2 -r1.17 db_machdep.h X --- db_machdep.h 15 Sep 2001 11:06:07 -0000 1.17 X +++ db_machdep.h 9 Nov 2003 15:54:26 -0000 X @@ -87,7 +87,9 @@ X * _APTmap = 0xffc00000. Accepting this is OK (unless db_maxoff is X * set to >= 0x400000 - (max stack offset)). X + * XXX _APTD and _APTmap went away. Now there are SMP_prvspace = 0xffc00000 X + * and lapic = 0xfffff000. X */ X #define DB_SMALL_VALUE_MAX 0x7fffffff X -#define DB_SMALL_VALUE_MIN (-0x400001) X +#define DB_SMALL_VALUE_MIN (-0x3fffff) X X #endif /* !_MACHINE_DB_MACHDEP_H_ */ I forget why I changed the logic in db_sym.c. It is only a heuristic. DB_SMALL_VALUE_MAX should probably be related to KERNBASE on all arches, or just be much smaller. 0x7fffffff obviously doesn't work on i386 either if KERNBASE is smaller than that. Namespace problems prevent defining the DB* symbols in terms of KERNBASE and even more so for symbols like _APTD that were only defined in object files. 0x7fffffff allowed reduction of KERNBASE well below its default value at the time of the original implementation. It was only about 32MB or 256MB below the top. Now its default is 3GB and 2GB isn't much lower, but it is not very useful on i386 to change the split to much more for the kernel and much less for applications. DB_SMALL_VALUE_MIN is related to the memory layout. There may be symbols near the top of the address space no matter what KERNBASE is. This happens on i386 -- most kernel symbols are near KERNBASE (default 0xc0000000) but there are some magic symbols related mainly to page tables near the top. We want to print all of these symbols by name, or at least as large unsigned values (the latter happens too much for constant literals in ddb and gdb, and objdump is worse). So DB_SMALL_VALUE_MIN must be fairly small. Also, the address space should be laid out so as to not have any important symbols near the top, to leave space for DB_SMALL_VALUE_MIN not needing to be too small. To avoid the namespace bugs and to de-magic the limits, the definitions show be something like: /* Set in locore; currently only used in ldscript: */ extern char kernbase[]; /* If not already defined somwhere: */ extern char end[]; #define DB_SMALL_VALUE_MAX kernbase #define DB_SMALL_VALUE_MIN (-(intptr_t)end) /* does this work? */ Or with less magic: /* Set these in locore like kernbase: */ extern char db_smallest_ksym[]; extern char db_largest_ksym[]; #define DB_SMALL_VALUE_MAX db_smallest_ksym #define DB_SMALL_VALUE_MIN (-(intptr_t)db_largest_ksym) It is difficult to define the magic symbols with best values to work with the heuristic even when you control them. Addresses outside of the statically known address space may be generated by loading modules and malloc()ing data. These shouldn't be printed as signed. The above definitions give too wide a range of small values. So db_largest_ksym should be set to something more like its current value of a few MB below the top, perhaps to max(this value, end). I don't know how to write this expression in asm. It could be written in C: #define DB_SMALL_VALUE_MIN MAX(-3xfffff, -(intptr_t)db_largest_ksym) db_largest_ksym must also be larger than INTPTR_MAX for the sign magic to work. That probably won't happen automatically if all static kernel symbols are in the lower half of the address space. The i386 kernel address space now looks like: X 00400000 A kernload X bfc00000 A PTmap X bfeff000 A PTD X bfeffbfc A PTDpde X c0000000 A kernbase X c0453fd0 T btext X c0454039 t begin X ... X c092f494 A _end X c092f494 A end This hasn't changed for more than 10 years. Apparently the page table stuff was moved from the top of the address space to just below kernbase, so there are no symbols near the top. DB_SMALL_VALUE_MAX needs to be below kernbase. The low kernload symbol might be a problem. The amd64 address space now looks like: X w uart_sab82532_class X w uart_z8530_class No values? X 0000000000200000 A kernphys X ffff800000000000 A loc_PTmap X ffff804000000000 A loc_PDmap X ffff804020000000 A loc_PDPmap X ffff804020100000 A loc_PML4map X ffff804020100800 A loc_PML4pml4e X fffff80000000000 A dmapbase X fffffc0000000000 A dmapend X ffffffff80000000 A kernbase X ffffffff802baa50 T btext X ... X ffffffff8123be08 A _end Essentially the same. The smallest symbol of interest is much further below kernbase, and I think malloced memory is below kernbase too (there is only 2GB above). Bruce From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 10:34:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33C09E15; Sun, 4 Jan 2015 10:34:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13DCE2E8F; Sun, 4 Jan 2015 10:34:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04AY41C048619; Sun, 4 Jan 2015 10:34:04 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04AY3nc048613; Sun, 4 Jan 2015 10:34:03 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501041034.t04AY3nc048613@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 4 Jan 2015 10:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276654 - in head/sys: compat/freebsd32 compat/linux kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 10:34:05 -0000 Author: dchagin Date: Sun Jan 4 10:34:02 2015 New Revision: 276654 URL: https://svnweb.freebsd.org/changeset/base/276654 Log: Indeed, instead of hiding the kern___getcwd() bug by bogus cast in r276564, change path type to char * (pathnames are always char *). And remove bogus casts of malloc(). kern___getcwd() internally doesn't actually use or support u_char * paths, except to copy them to a normal char * path. These changes are not visible to libc as libc/gen/getcwd.c misdeclares __getcwd() as taking a plain char * path. While here remove _SYS_SYSPROTO_H_ for __getcwd() syscall as we always have sysproto.h. Pointed out by: bde MFC after: 1 week Modified: head/sys/compat/freebsd32/syscalls.master head/sys/compat/linux/linux_getcwd.c head/sys/kern/syscalls.master head/sys/kern/vfs_cache.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Sun Jan 4 05:40:41 2015 (r276653) +++ head/sys/compat/freebsd32/syscalls.master Sun Jan 4 10:34:02 2015 (r276654) @@ -583,7 +583,7 @@ 323 AUE_NULL OBSOL thr_wakeup 324 AUE_MLOCKALL NOPROTO { int mlockall(int how); } 325 AUE_MUNLOCKALL NOPROTO { int munlockall(void); } -326 AUE_GETCWD NOPROTO { int __getcwd(u_char *buf, u_int buflen); } +326 AUE_GETCWD NOPROTO { int __getcwd(char *buf, u_int buflen); } 327 AUE_NULL NOPROTO { int sched_setparam (pid_t pid, \ const struct sched_param *param); } Modified: head/sys/compat/linux/linux_getcwd.c ============================================================================== --- head/sys/compat/linux/linux_getcwd.c Sun Jan 4 05:40:41 2015 (r276653) +++ head/sys/compat/linux/linux_getcwd.c Sun Jan 4 10:34:02 2015 (r276654) @@ -186,7 +186,7 @@ linux_getcwd_scandir(lvpp, uvpp, bpp, bu dirbuflen = DIRBLKSIZ; if (dirbuflen < va.va_blocksize) dirbuflen = va.va_blocksize; - dirbuf = (char *)malloc(dirbuflen, M_TEMP, M_WAITOK); + dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); #if 0 unionread: @@ -413,7 +413,7 @@ out: int linux_getcwd(struct thread *td, struct linux_getcwd_args *args) { - caddr_t bp, bend, path; + char *bp, *bend, *path; int error, len, lenused; #ifdef DEBUG @@ -428,9 +428,9 @@ linux_getcwd(struct thread *td, struct l else if (len < 2) return ERANGE; - path = (char *)malloc(len, M_TEMP, M_WAITOK); + path = malloc(len, M_TEMP, M_WAITOK); - error = kern___getcwd(td, (u_char *)path, UIO_SYSSPACE, len); + error = kern___getcwd(td, path, UIO_SYSSPACE, len); if (!error) { lenused = strlen(path) + 1; if (lenused <= args->bufsize) { Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Sun Jan 4 05:40:41 2015 (r276653) +++ head/sys/kern/syscalls.master Sun Jan 4 10:34:02 2015 (r276654) @@ -571,7 +571,7 @@ 323 AUE_NULL OBSOL thr_wakeup 324 AUE_MLOCKALL STD { int mlockall(int how); } 325 AUE_MUNLOCKALL STD { int munlockall(void); } -326 AUE_GETCWD STD { int __getcwd(u_char *buf, u_int buflen); } +326 AUE_GETCWD STD { int __getcwd(char *buf, u_int buflen); } 327 AUE_NULL STD { int sched_setparam (pid_t pid, \ const struct sched_param *param); } Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Jan 4 05:40:41 2015 (r276653) +++ head/sys/kern/vfs_cache.c Sun Jan 4 10:34:02 2015 (r276654) @@ -1043,14 +1043,6 @@ vfs_cache_lookup(ap) return (error); } - -#ifndef _SYS_SYSPROTO_H_ -struct __getcwd_args { - u_char *buf; - u_int buflen; -}; -#endif - /* * XXX All of these sysctls would probably be more productive dead. */ @@ -1069,7 +1061,7 @@ sys___getcwd(td, uap) } int -kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, u_int buflen) +kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen) { char *bp, *tmpbuf; struct filedesc *fdp; Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Sun Jan 4 05:40:41 2015 (r276653) +++ head/sys/sys/syscallsubr.h Sun Jan 4 10:34:02 2015 (r276654) @@ -57,7 +57,7 @@ struct stat; struct thr_param; struct __wrusage; -int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, +int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen); int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 10:40:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54DC623C; Sun, 4 Jan 2015 10:40:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3537C2F00; Sun, 4 Jan 2015 10:40:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04AeRTN050068; Sun, 4 Jan 2015 10:40:27 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04AeO0h050051; Sun, 4 Jan 2015 10:40:24 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501041040.t04AeO0h050051@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 4 Jan 2015 10:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276655 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 10:40:27 -0000 Author: dchagin Date: Sun Jan 4 10:40:23 2015 New Revision: 276655 URL: https://svnweb.freebsd.org/changeset/base/276655 Log: Regen for r276654 (__getcwd()). Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/compat/freebsd32/freebsd32_proto.h Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #define FREEBSD32_SYS_syscall 0 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ const char *freebsd32_syscallnames[] = { Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #include "opt_compat.h" Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Jan 4 10:40:23 2015 (r276655) @@ -1615,7 +1615,7 @@ systrace_args(int sysnum, void *params, /* __getcwd */ case 326: { struct __getcwd_args *p = params; - uarg[0] = (intptr_t) p->buf; /* u_char * */ + uarg[0] = (intptr_t) p->buf; /* char * */ uarg[1] = p->buflen; /* u_int */ *n_args = 2; break; @@ -5859,7 +5859,7 @@ systrace_entry_setargdesc(int sysnum, in case 326: switch(ndx) { case 0: - p = "u_char *"; + p = "char *"; break; case 1: p = "u_int"; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/kern/init_sysent.c Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #include "opt_compat.h" Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/kern/syscalls.c Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ const char *syscallnames[] = { Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/kern/systrace_args.c Sun Jan 4 10:40:23 2015 (r276655) @@ -1712,7 +1712,7 @@ systrace_args(int sysnum, void *params, /* __getcwd */ case 326: { struct __getcwd_args *p = params; - uarg[0] = (intptr_t) p->buf; /* u_char * */ + uarg[0] = (intptr_t) p->buf; /* char * */ uarg[1] = p->buflen; /* u_int */ *n_args = 2; break; @@ -6108,7 +6108,7 @@ systrace_entry_setargdesc(int sysnum, in case 326: switch(ndx) { case 0: - p = "u_char *"; + p = "char *"; break; case 1: p = "u_int"; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/sys/syscall.h Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #define SYS_syscall 0 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/sys/syscall.mk Sun Jan 4 10:40:23 2015 (r276655) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 274462 2014-11-13 05:26:14Z dchagin +# created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin MIASM = \ syscall.o \ exit.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/sys/sysproto.h Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #ifndef _SYS_SYSPROTO_H_ @@ -905,7 +905,7 @@ struct munlockall_args { register_t dummy; }; struct __getcwd_args { - char buf_l_[PADL_(u_char *)]; u_char * buf; char buf_r_[PADR_(u_char *)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; char buflen_l_[PADL_(u_int)]; u_int buflen; char buflen_r_[PADR_(u_int)]; }; struct sched_setparam_args { From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:36:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F095A1E; Sun, 4 Jan 2015 12:36:14 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 5F6691150; Sun, 4 Jan 2015 12:36:13 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 11B4FD64629; Sun, 4 Jan 2015 23:36:04 +1100 (AEDT) Date: Sun, 4 Jan 2015 23:36:03 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Hans Petter Selasky Subject: Re: svn commit: r276626 - head/sys/kern In-Reply-To: <54A87C28.2030304@selasky.org> Message-ID: <20150104211113.A1445@besplex.bde.org> References: <201501031721.t03HLKHp060964@svn.freebsd.org> <20150104045338.V2929@besplex.bde.org> <54A87C28.2030304@selasky.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R8o6R7hX c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=MvYiGNustJpYgA7wAtwA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 12:36:14 -0000 On Sun, 4 Jan 2015, Hans Petter Selasky wrote: > On 01/03/15 21:17, Bruce Evans wrote: >> On Sat, 3 Jan 2015, Hans Petter Selasky wrote: >> >>> Log: >>> Rework r276532 a bit. Always avoid recursing into the console drivers >>> clients, hence they might not handle it very well. This change allows >>> debugging mutex problems with kernel console drivers when >>> "debug.witness.skipspin=0" is set in the boot environment. >> >> This keeps getting worse. Console drivers are required to be reentrant >> so that console i/o works in any context, including reentering the >> console driver a couple of times. Please trim quotes. [quotes trimmed excessively since 2 copies of everything is too much already] >>> ... >>> + if (mtx_owned(&cnputs_mtx)) >>> + return; >> >> The largest obvious new bug here is losing all output from panic() >> (and possibly other critical output) for panics that occur while >> the mutex is held by the same CPU. The previous change made this >> case work (for reentrant console drivers) instead of deadlocking. > Thanks for your analysis. I can get the the full backtrace if you like, but > not right now. It is quite long! > > Quickly summarized, the problem is that printf recurses from inside a > mtx_lock_spin() because of a LOR, due to some testing I'm doing, which is > because witness calls directly to printf() again. In other words, we cannot > use printf() to debug problems in the console drivers, and actually printf() > should be disabled when we are inside certain code paths, simply. I now remember more of the problem. Broken console drivers use mutex locks. The most broken ones don't even declare these locks as MTX_NOWITNESS. Thus when a LOR is detected in one of these locks, it causes endless recursion into the console driver. Finally, LORs _should_ be detected for many uses of these locks, since the fundamantal brokenness of using mutex locks in console drivers includes there being no single correct order for them. printf() is required to work in any context. It shouldn't be disabled. Making it work for witnessing of itself is especially easy compared with making it work for ddb'ing itself. For witness, the recursion only occurs in certain contexts that can be limited. For ddb, it occurs on any instruction within the console driver (when all the instructions are stepped through). printf() is perhaps the must useful place to put a ddb breakpoint at. I often sprinkle debugging printf()s which are rarely excuted and put a breakpoint a printf() instead of in all the callers. Then when the printf() is reached, I sometimes step a fair way into it. The surprising thing is that the recursion/deadlock doesn't happen more often. This seems to be because: - most systems configure MTX_SKIPSPIN, so witness never detects LORs with spinlocks - most console drivers aren't so broken as to not use MTX_NOWITNESS You said that you force !MTX_SKIPSPIN. I suspect that you also use one of the broken console drivers. (Oops, you say later that you are using vt). vt and usb_serial are obviously broken, since they do unconditional mutex locking with a non-recursive witnessed mutex, without even the kdb_active hack to ignore the lock while in ddb. The above change helps a little for these drivers. The higher-level lock prevents interference from console calls from cnputs(). All other console calls, which include all output when PRINTF_BUFR_SIZE is configured and all ddb output, just deadlock as before. Note that when the less broken console drivers are called while kdb is active, the kdb_active hack results in the locking having no effect. Recursive cases just proceed (but without risk of recursing endless unless another lock is (mis)used), so the lock is useless in this case. This case must work without the lock, and once it does the lock is not needed in non-ddb cases either. The quick fix for recursion in witness is to use MTX_NOWITNESS for all console driver locks. This is undesireable since it breaks witnessing of these locks in other contexts, but sio always did it. MTX_RECURSE might also be needed, but is too dangerous, and it takes very large locking bugs or rare races (something like printf()s in trap handlers) for recursion to occur, once you have removed the recursion for witnessing a bug in yourself. The fundamental LOR problem with using mutex locking in console drivers is: - console drivers need to be callable from anywhere, so their locks need to be ordered after all others - however, to be useful on devices with the console shared with a normal device, the same lock needs to be used for the console part as for the main part. (Sharing the lock gives potential deadlock or just too long a delay before the console i/o is done, but normally the main part releases the lock soon enough.) In the main part, the lock is not special. It shouldn't be MTX_NOWITNESS, and other locks may be acquired while it is held. For no LOR for acquiring these other locks, the other locks need to be ordered after the console lock. This conflicts with the requirement that the console lock be ordered after all others. The locking table is ordered so that there is no LOR for the normal use. Thus there is almost always a LOR for console use. This LOR is normally harmless, but not always. It may indicate larger locking bugs in console drivers. To avoid seeing this LOR and getting endless recursion from it, MTX_NOWITNESS must be used. I tried reordering the locking table to put console locks last. This seemed to work at first, but that was only because MTX_SKIPSPIN was enabled. When spinlocks were properly witnessed, (false) LORs were detected in normal operation. I now use the following which gives only minor reording by pushing down console locks as far as possible. This was only done carefully for console and serial drivers that I used (sio, cy and syscons). X diff -c2 ./kern/subr_witness.c~ ./kern/subr_witness.c X *** ./kern/subr_witness.c~ Tue Apr 10 01:51:12 2012 X --- ./kern/subr_witness.c Tue Oct 21 19:14:20 2014 X *************** X *** 629,635 **** X #endif X { "rm.mutex_mtx", &lock_class_mtx_spin }, X { "sio", &lock_class_mtx_spin }, X { "scrlock", &lock_class_mtx_spin }, X - #ifdef __i386__ X { "cy", &lock_class_mtx_spin }, X #endif X --- 629,637 ---- X #endif X { "rm.mutex_mtx", &lock_class_mtx_spin }, X + #define MISORDERED X + #undef MISORDERED X + #ifdef MISORDERED X { "sio", &lock_class_mtx_spin }, X { "scrlock", &lock_class_mtx_spin }, X { "cy", &lock_class_mtx_spin }, X #endif cy is neither i386-specific or a console driver. X *************** X *** 639,643 **** X --- 641,647 ---- X #endif X { "scc_hwmtx", &lock_class_mtx_spin }, X + #ifdef MISORDERED X { "uart_hwmtx", &lock_class_mtx_spin }, X + #endif X { "fast_taskqueue", &lock_class_mtx_spin }, X { "intr table", &lock_class_mtx_spin }, X *************** X *** 650,662 **** X --- 654,679 ---- X { "rm_spinlock", &lock_class_mtx_spin }, X { "turnstile chain", &lock_class_mtx_spin }, X + #ifndef MISORDERED X + { "sio", &lock_class_mtx_spin }, X + { "cy", &lock_class_mtx_spin }, X + #endif X { "turnstile lock", &lock_class_mtx_spin }, X { "sched lock", &lock_class_mtx_spin }, X { "td_contested", &lock_class_mtx_spin }, When the interrupt handler calls the scheduler, its lock must be ordered before scheduler locks. X + #ifndef MISORDERED X + { "scrlock", &lock_class_mtx_spin }, X + #endif X { "callout", &lock_class_mtx_spin }, X { "entropy harvest mutex", &lock_class_mtx_spin }, X + #ifdef MISORDERED X { "syscons video lock", &lock_class_mtx_spin }, X + #endif X #ifdef SMP X { "smp rendezvous", &lock_class_mtx_spin }, X #endif X + #ifndef MISORDERED X + { "uart_hwmtx", &lock_class_mtx_spin }, X + { "syscons video lock", &lock_class_mtx_spin }, X + #endif I think uart can be pushed down this far. Its locked regions are too short, but I think it releases the lock before acquiring others, so it can be a leaf lock for all uses. This has barely been tested. X #ifdef __powerpc__ X { "tlb0", &lock_class_mtx_spin }, > Instead of a nice LOR printout, I immediately hit a panic, because other > mutexes marked as non-recursive suddenly got recursed inside the console > drivers, in this case "dev/vt". For now, printouts are not allowed if inside > "cnputc()". This at least got me on with the debugging. Previously > "cnputs_mtx" was marked non-recursive, and I think that is correct. So it was just new bug in vt. Try the quick fix for its console mutex. Or better, use syscons and use the quick fix for its mutexes. Its bugs are better understood and partly fixed in a one of my versions. vt is also missing the kdb_active hack. It also has some lower-level spin mutexes (mainly VTBUF_LOCK()?). This gives obvious deadlocks. E.g., one CPU may be doing normal outout and hold VTBUF_LOCK(). Then a debugger trap on another CPU will first stop the first CPU and then deadlock on VTBUF_LOCK(). If the kdb_active hack is used to avoid this deadlock, then the locking simply doesn't work. vt's locks don't seem to be in the static LOR table. The table is small, so there must be many other locks like that. I don't see how a default order can work. Non-recursive is mostly correct. The recursion indicates another bug. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:38:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E42D7B5F; Sun, 4 Jan 2015 12:38:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE1351174; Sun, 4 Jan 2015 12:38:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04Cc4AC008305; Sun, 4 Jan 2015 12:38:04 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04Cc1Ui008283; Sun, 4 Jan 2015 12:38:01 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201501041238.t04Cc1Ui008283@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sun, 4 Jan 2015 12:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276657 - head/lib/libpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 12:38:05 -0000 Author: joel (doc committer) Date: Sun Jan 4 12:38:00 2015 New Revision: 276657 URL: https://svnweb.freebsd.org/changeset/base/276657 Log: mdoc: sort SEE ALSO. Modified: head/lib/libpmc/pmc.corei7.3 head/lib/libpmc/pmc.corei7uc.3 head/lib/libpmc/pmc.haswell.3 head/lib/libpmc/pmc.ivybridge.3 head/lib/libpmc/pmc.ivybridgexeon.3 head/lib/libpmc/pmc.sandybridgexeon.3 head/lib/libpmc/pmc.soft.3 head/lib/libpmc/pmc.ucf.3 head/lib/libpmc/pmc.westmere.3 head/lib/libpmc/pmc.westmereuc.3 head/lib/libpmc/pmc.xscale.3 head/lib/libpmc/pmc_capabilities.3 Modified: head/lib/libpmc/pmc.corei7.3 ============================================================================== --- head/lib/libpmc/pmc.corei7.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.corei7.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -1549,18 +1549,18 @@ Counts number of segment register loads. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.corei7uc.3 ============================================================================== --- head/lib/libpmc/pmc.corei7uc.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.corei7uc.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -853,18 +853,18 @@ refreshed or needs to go into a power do .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.haswell.3 ============================================================================== --- head/lib/libpmc/pmc.haswell.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.haswell.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -936,25 +936,25 @@ Dirty L2 cache lines evicted by demand. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , +.Xr pmc.haswelluc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , +.Xr pmc.ivybridge 3 , +.Xr pmc.ivybridgexeon 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.haswelluc 3 , -.Xr pmc.ivybridge 3 , -.Xr pmc.ivybridgexeon 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.ivybridge.3 ============================================================================== --- head/lib/libpmc/pmc.ivybridge.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.ivybridge.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -844,23 +844,23 @@ Dirty L2 cache lines evicted by the MLC .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , +.Xr pmc.ivybridgexeon 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.ivybridgexeon 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.ivybridgexeon.3 ============================================================================== --- head/lib/libpmc/pmc.ivybridgexeon.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.ivybridgexeon.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -874,23 +874,23 @@ Dirty L2 cache lines filling the L2. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , +.Xr pmc.ivybridge 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.ivybridge 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.sandybridgexeon.3 ============================================================================== --- head/lib/libpmc/pmc.sandybridgexeon.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.sandybridgexeon.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -987,23 +987,24 @@ Split locks in SQ. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , +.Xr pmc.haswelluc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , +.Xr pmc.ivybridge 3 , +.Xr pmc.ivybridgexeon 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.ivybridge 3 , -.Xr pmc.ivybridgexeon 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.soft.3 ============================================================================== --- head/lib/libpmc/pmc.soft.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.soft.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -76,17 +76,17 @@ Write page fault. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.ucf.3 ============================================================================== --- head/lib/libpmc/pmc.ucf.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.ucf.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -86,18 +86,18 @@ offset C0H under device number 0 and Fun .Xr pmc.atom 3 , .Xr pmc.core 3 , .Xr pmc.core2 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.westmere.3 ============================================================================== --- head/lib/libpmc/pmc.westmere.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.westmere.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -1371,18 +1371,18 @@ Counts number of SID integer 64 bit shif .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.westmereuc.3 ============================================================================== --- head/lib/libpmc/pmc.westmereuc.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.westmereuc.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -1056,18 +1056,18 @@ disabled. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.westmere 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.xscale.3 ============================================================================== --- head/lib/libpmc/pmc.xscale.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.xscale.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -132,9 +132,9 @@ and the underlying hardware events used. .El .Sh SEE ALSO .Xr pmc 3 , +.Xr pmc.soft 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , -.Xr pmc.soft 3 , .Xr hwpmc 4 .Sh HISTORY The Modified: head/lib/libpmc/pmc_capabilities.3 ============================================================================== --- head/lib/libpmc/pmc_capabilities.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc_capabilities.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -223,8 +223,8 @@ The argument to the function was invalid .Xr pmc_allocate 3 , .Xr pmc_get_driver_stats 3 , .Xr pmc_name_of_capability 3 , -.Xr pmc_name_of_cputype 3 , .Xr pmc_name_of_class 3 , +.Xr pmc_name_of_cputype 3 , .Xr pmc_name_of_event 3 , .Xr pmc_name_of_mode 3 , .Xr hwpmc 4 From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:42:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35BB6D41; Sun, 4 Jan 2015 12:42:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21B33128C; Sun, 4 Jan 2015 12:42:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04Cg9Hs012228; Sun, 4 Jan 2015 12:42:09 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04Cg8lS012227; Sun, 4 Jan 2015 12:42:08 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201501041242.t04Cg8lS012227@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sun, 4 Jan 2015 12:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276658 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 12:42:09 -0000 Author: joel (doc committer) Date: Sun Jan 4 12:42:08 2015 New Revision: 276658 URL: https://svnweb.freebsd.org/changeset/base/276658 Log: mdoc: use An macro. Modified: head/usr.bin/sort/sort.1.in Modified: head/usr.bin/sort/sort.1.in ============================================================================== --- head/usr.bin/sort/sort.1.in Sun Jan 4 12:38:00 2015 (r276657) +++ head/usr.bin/sort/sort.1.in Sun Jan 4 12:42:08 2015 (r276658) @@ -610,9 +610,9 @@ A command first appeared in .At v3 . .Sh AUTHORS -Gabor Kovesdan , +.An Gabor Kovesdan Aq Mt gabor@FreeBSD.org , .Pp -Oleg Moskalenko +.An Oleg Moskalenko Aq Mt mom040267@gmail.com .Sh NOTES This implementation of .Nm From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:49:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40D0DEEB; Sun, 4 Jan 2015 12:49:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C11C12EF; Sun, 4 Jan 2015 12:49:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04CnQkD013141; Sun, 4 Jan 2015 12:49:26 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04CnPZ7013137; Sun, 4 Jan 2015 12:49:25 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201501041249.t04CnPZ7013137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sun, 4 Jan 2015 12:49:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276659 - in head: lib/libc/iconv sbin/camcontrol sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 12:49:26 -0000 Author: joel (doc committer) Date: Sun Jan 4 12:49:24 2015 New Revision: 276659 URL: https://svnweb.freebsd.org/changeset/base/276659 Log: mdoc: paragraph improvements. Modified: head/lib/libc/iconv/iconv.3 head/sbin/camcontrol/camcontrol.8 head/sbin/hastd/hast.conf.5 Modified: head/lib/libc/iconv/iconv.3 ============================================================================== --- head/lib/libc/iconv/iconv.3 Sun Jan 4 12:42:08 2015 (r276658) +++ head/lib/libc/iconv/iconv.3 Sun Jan 4 12:49:24 2015 (r276659) @@ -176,8 +176,8 @@ may be .Dv NULL . In this case, the shift sequence for the destination switching to the initial state is discarded. -.Pp .El +.Pp The .Fn __iconv function works just like Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sun Jan 4 12:42:08 2015 (r276658) +++ head/sbin/camcontrol/camcontrol.8 Sun Jan 4 12:49:24 2015 (r276659) @@ -1364,8 +1364,8 @@ Defaults to Confirm yes to dangerous options such as .Fl e without prompting for confirmation. -.Pp .El +.Pp If the password specified for any action commands does not match the configured password for the specified user the command will fail. .Pp @@ -1434,8 +1434,8 @@ additional unlock calls until after a po Confirm yes to dangerous options such as .Fl e without prompting for confirmation -.Pp .El +.Pp The password for all HPA commands is limited to 32 characters, longer passwords will fail. .It Ic fwdownload @@ -1924,7 +1924,6 @@ power-on or hardware reset! .Pp .Em DO NOT use this on a device which has an active filesystem! -.Pp .Bd -literal -offset indent camcontrol persist da0 -v -i read_keys .Ed Modified: head/sbin/hastd/hast.conf.5 ============================================================================== --- head/sbin/hastd/hast.conf.5 Sun Jan 4 12:42:08 2015 (r276658) +++ head/sbin/hastd/hast.conf.5 Sun Jan 4 12:49:24 2015 (r276659) @@ -270,39 +270,33 @@ program is executed with: .It Ic " role " .Pp Executed on both primary and secondary nodes when resource role is changed. -.Pp .It Ic " connect " .Pp Executed on both primary and secondary nodes when connection for the given resource between the nodes is established. -.Pp .It Ic " disconnect " .Pp Executed on both primary and secondary nodes when connection for the given resource between the nodes is lost. -.Pp .It Ic " syncstart " .Pp Executed on primary node when synchronization process of secondary node is started. -.Pp .It Ic " syncdone " .Pp Executed on primary node when synchronization process of secondary node is completed successfully. -.Pp .It Ic " syncintr " .Pp Executed on primary node when synchronization process of secondary node is interrupted, most likely due to secondary node outage or connection failure between the nodes. -.Pp .It Ic " split-brain " .Pp Executed on both primary and secondary nodes when split-brain condition is detected. -.Pp .El +.Pp The .Aq path argument should contain full path to executable program. @@ -330,7 +324,6 @@ It can be one of: .Ar init , .Ar secondary , .Ar primary . -.Pp .It Ic metaflush on | off .Pp When set to @@ -349,7 +342,6 @@ will disable automatically. The default value is .Va on . -.Pp .It Ic name Aq name .Pp GEOM provider name that will appear as From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 15:26:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C192B3AD; Sun, 4 Jan 2015 15:26:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADD9564AD4; Sun, 4 Jan 2015 15:26:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04FQ3bp088657; Sun, 4 Jan 2015 15:26:03 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04FQ3uX088656; Sun, 4 Jan 2015 15:26:03 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201501041526.t04FQ3uX088656@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sun, 4 Jan 2015 15:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276660 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 15:26:03 -0000 Author: kevlo Date: Sun Jan 4 15:26:02 2015 New Revision: 276660 URL: https://svnweb.freebsd.org/changeset/base/276660 Log: Change the type of blksize_t from uint32_t to a POSIX compliant int32_t http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html Modified: head/sys/sys/_types.h Modified: head/sys/sys/_types.h ============================================================================== --- head/sys/sys/_types.h Sun Jan 4 12:49:24 2015 (r276659) +++ head/sys/sys/_types.h Sun Jan 4 15:26:02 2015 (r276660) @@ -35,7 +35,7 @@ /* * Standard type definitions. */ -typedef __uint32_t __blksize_t; /* file block size */ +typedef __int32_t __blksize_t; /* file block size */ typedef __int64_t __blkcnt_t; /* file block count */ typedef __int32_t __clockid_t; /* clock_gettime()... */ typedef __uint32_t __fflags_t; /* file flags */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 19:06:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C37D4841; Sun, 4 Jan 2015 19:06:43 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 533EBD1E; Sun, 4 Jan 2015 19:06:43 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id ex7so2049421wid.12; Sun, 04 Jan 2015 11:06:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=YZCQj/4NPzrOXN3Fty4xeSmzn6w8NzUz1Q03uxxUOyk=; b=xEZyjS5+cqIkC+NC+NA26LZP6ZSnZCeE4KREx6FJBHh9mDHC+j+T48OBHHpVVXA22b 2FFki1rmKq0qOZjyQOOeVc3eyRK8QVD/RXpdP4iR52/C+XuO4vknD1YCcbjmMrcKF8iN am9meKdpk95R1KUHx9Nw6NtirelfGbWwNaF/t32+DUgq4Vp3enyUYnswP/8io5WDFsCr WrCZsbneSDZ78Vu2QjPxQjRDGnBR7D/xr2KT87twVOLExjWNpGNVT2GmWK+Qv1XfcSPF Adolucqx9MjH7GlhenMPm2VlwJrIjv+m4NAic426xFHtL3hC6MyoP4xllEG3Xvp6y9UV cWww== X-Received: by 10.180.75.42 with SMTP id z10mr18374627wiv.70.1420398401608; Sun, 04 Jan 2015 11:06:41 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id q10sm62715028wjx.34.2015.01.04.11.06.39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 04 Jan 2015 11:06:40 -0800 (PST) Date: Sun, 4 Jan 2015 20:06:37 +0100 From: Mateusz Guzik To: "Bjoern A. Zeeb" Subject: Re: svn commit: r276424 - head/sys/kern Message-ID: <20150104190637.GA5807@dft-labs.eu> References: <201412302140.sBULek5f076019@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 19:06:43 -0000 On Tue, Dec 30, 2014 at 10:45:43PM +0000, Bjoern A. Zeeb wrote: > > > On 30 Dec 2014, at 21:40 , Mateusz Guzik wrote: > > > > Author: mjg > > Date: Tue Dec 30 21:40:45 2014 > > New Revision: 276424 > > URL: https://svnweb.freebsd.org/changeset/base/276424 > > > > Log: > > Convert vfs hash lock from a mutex to an rwlock. > > This is very obvious from the change. > > What is not and should be described as well is some of this: > > - Why? > - What are the benefits? > - What are the locking implications? > - Does it make a performance difference? If yes, was it measured? > - … (you got the idea) > Sorry for late reply. This is just one of many minor things which showed up in lock profiling during make -j 40 buildkernel. I don't expect the gain to be quite noticeable (at least not now since there way more serious bottlenecks), thus there are no claims stuff is way faster in the commit message. This change is entirely transparent to callers and callees. -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 19:55:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05F3110D; Sun, 4 Jan 2015 19:55:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E46CB340D; Sun, 4 Jan 2015 19:55:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04JtjqJ017344; Sun, 4 Jan 2015 19:55:45 GMT (envelope-from gibbs@FreeBSD.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04JtjCM017342; Sun, 4 Jan 2015 19:55:45 GMT (envelope-from gibbs@FreeBSD.org) Message-Id: <201501041955.t04JtjCM017342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gibbs set sender to gibbs@FreeBSD.org using -f From: "Justin T. Gibbs" Date: Sun, 4 Jan 2015 19:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276665 - in head: share/man/man9 sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 19:55:46 -0000 Author: gibbs Date: Sun Jan 4 19:55:44 2015 New Revision: 276665 URL: https://svnweb.freebsd.org/changeset/base/276665 Log: Prevent live-lock and access of destroyed data in taskqueue_drain_all(). Phabric: https://reviews.freebsd.org/D1247 Reviewed by: jhb, avg Sponsored by: Spectra Logic Corporation sys/kern_subr_taskqueue.c: Modify taskqueue_drain_all() processing to use a temporary "barrier task", rather than rely on a user task that may be destroyed during taskqueue_drain_all()'s execution. The barrier task is queued behind all previously queued tasks and then has its priority elevated so that future tasks cannot pass it in the queue. Use a similar barrier scheme to drain threads processing current tasks. This requires taskqueue_run_locked() to insert and remove the taskqueue_busy object for the running thread for every task processed. share/man/man9/taskqueue.9: Remove warning about live-lock issues with taskqueue_drain_all() and indicate that it does not wait for tasks queued after it begins processing. Modified: head/share/man/man9/taskqueue.9 head/sys/kern/subr_taskqueue.c Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Sun Jan 4 19:05:16 2015 (r276664) +++ head/share/man/man9/taskqueue.9 Sun Jan 4 19:55:44 2015 (r276665) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 24, 2014 +.Dd January 4, 2015 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -285,10 +285,16 @@ The .Fn taskqueue_drain_all function is used to wait for all pending and running tasks that are enqueued on the taskqueue to finish. -The caller must arrange that the tasks are not re-enqueued. -Note that +Tasks posted to the taskqueue after .Fn taskqueue_drain_all -currently does not handle tasks with delayed enqueueing. +begins processing, +including pending enqueues scheduled by a previous call to +.Fn taskqueue_enqueue_timeout , +do not extend the wait time of +.Fn taskqueue_drain_all +and may complete after +.Fn taskqueue_drain_all +returns. .Pp The .Fn taskqueue_block Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Sun Jan 4 19:05:16 2015 (r276664) +++ head/sys/kern/subr_taskqueue.c Sun Jan 4 19:55:44 2015 (r276665) @@ -56,6 +56,8 @@ struct taskqueue_busy { TAILQ_ENTRY(taskqueue_busy) tb_link; }; +struct task * const TB_DRAIN_WAITER = (struct task *)0x1; + struct taskqueue { STAILQ_HEAD(, task) tq_queue; taskqueue_enqueue_fn tq_enqueue; @@ -241,6 +243,7 @@ taskqueue_enqueue_locked(struct taskqueu /* Return with lock released. */ return (0); } + int taskqueue_enqueue(struct taskqueue *queue, struct task *task) { @@ -302,12 +305,82 @@ taskqueue_enqueue_timeout(struct taskque } static void -taskqueue_drain_running(struct taskqueue *queue) +taskqueue_task_nop_fn(void *context, int pending) +{ +} + +/* + * Block until all currently queued tasks in this taskqueue + * have begun execution. Tasks queued during execution of + * this function are ignored. + */ +static void +taskqueue_drain_tq_queue(struct taskqueue *queue) { + struct task t_barrier; - while (!TAILQ_EMPTY(&queue->tq_active)) - TQ_SLEEP(queue, &queue->tq_active, &queue->tq_mutex, - PWAIT, "-", 0); + if (STAILQ_EMPTY(&queue->tq_queue)) + return; + + /* + * Enqueue our barrier with the lowest possible priority + * so we are inserted after all current tasks. + */ + TASK_INIT(&t_barrier, 0, taskqueue_task_nop_fn, &t_barrier); + taskqueue_enqueue_locked(queue, &t_barrier); + + /* + * Raise the barrier's priority so newly queued tasks cannot + * pass it. + */ + t_barrier.ta_priority = USHRT_MAX; + + /* + * Once the barrier has executed, all previously queued tasks + * have completed or are currently executing. + */ + while (t_barrier.ta_pending != 0) + TQ_SLEEP(queue, &t_barrier, &queue->tq_mutex, PWAIT, "-", 0); +} + +/* + * Block until all currently executing tasks for this taskqueue + * complete. Tasks that begin execution during the execution + * of this function are ignored. + */ +static void +taskqueue_drain_tq_active(struct taskqueue *queue) +{ + struct taskqueue_busy tb_marker, *tb_first; + + if (TAILQ_EMPTY(&queue->tq_active)) + return; + + /* Block taskq_terminate().*/ + queue->tq_callouts++; + + /* + * Wait for all currently executing taskqueue threads + * to go idle. + */ + tb_marker.tb_running = TB_DRAIN_WAITER; + TAILQ_INSERT_TAIL(&queue->tq_active, &tb_marker, tb_link); + while (TAILQ_FIRST(&queue->tq_active) != &tb_marker) + TQ_SLEEP(queue, &tb_marker, &queue->tq_mutex, PWAIT, "-", 0); + TAILQ_REMOVE(&queue->tq_active, &tb_marker, tb_link); + + /* + * Wakeup any other drain waiter that happened to queue up + * without any intervening active thread. + */ + tb_first = TAILQ_FIRST(&queue->tq_active); + if (tb_first != NULL && tb_first->tb_running == TB_DRAIN_WAITER) + wakeup(tb_first); + + /* Release taskqueue_terminate(). */ + queue->tq_callouts--; + if ((queue->tq_flags & TQ_FLAGS_ACTIVE) == 0) + wakeup_one(queue->tq_threads); } void @@ -334,14 +407,16 @@ static void taskqueue_run_locked(struct taskqueue *queue) { struct taskqueue_busy tb; + struct taskqueue_busy *tb_first; struct task *task; int pending; TQ_ASSERT_LOCKED(queue); tb.tb_running = NULL; - TAILQ_INSERT_TAIL(&queue->tq_active, &tb, tb_link); while (STAILQ_FIRST(&queue->tq_queue)) { + TAILQ_INSERT_TAIL(&queue->tq_active, &tb, tb_link); + /* * Carefully remove the first task from the queue and * zero its pending count. @@ -358,10 +433,13 @@ taskqueue_run_locked(struct taskqueue *q TQ_LOCK(queue); tb.tb_running = NULL; wakeup(task); + + TAILQ_REMOVE(&queue->tq_active, &tb, tb_link); + tb_first = TAILQ_FIRST(&queue->tq_active); + if (tb_first != NULL && + tb_first->tb_running == TB_DRAIN_WAITER) + wakeup(tb_first); } - TAILQ_REMOVE(&queue->tq_active, &tb, tb_link); - if (TAILQ_EMPTY(&queue->tq_active)) - wakeup(&queue->tq_active); } void @@ -448,19 +526,13 @@ taskqueue_drain(struct taskqueue *queue, void taskqueue_drain_all(struct taskqueue *queue) { - struct task *task; if (!queue->tq_spin) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, __func__); TQ_LOCK(queue); - task = STAILQ_LAST(&queue->tq_queue, task, ta_link); - if (task != NULL) - while (task->ta_pending != 0) - TQ_SLEEP(queue, task, &queue->tq_mutex, PWAIT, "-", 0); - taskqueue_drain_running(queue); - KASSERT(STAILQ_EMPTY(&queue->tq_queue), - ("taskqueue queue is not empty after draining")); + taskqueue_drain_tq_queue(queue); + taskqueue_drain_tq_active(queue); TQ_UNLOCK(queue); } From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 20:08:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FFB34A5; Sun, 4 Jan 2015 20:08:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B4B935C2; Sun, 4 Jan 2015 20:08:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04K8PU6022617; Sun, 4 Jan 2015 20:08:25 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04K8P6A022616; Sun, 4 Jan 2015 20:08:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501042008.t04K8P6A022616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Jan 2015 20:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276666 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 20:08:26 -0000 Author: ian Date: Sun Jan 4 20:08:24 2015 New Revision: 276666 URL: https://svnweb.freebsd.org/changeset/base/276666 Log: Eliminate uninitialized variable warnings in kernel and module builds when building with gcc 4.2 This has been requested several times over the past few months by several people (including me), because gcc 4.2 just gets it wrong too often. It's causing us to litter the code with lots of bogus initializers just to squelch the warnings. We still have clang and coverity telling us about uninitialized variables, and they do so more accurately. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sun Jan 4 19:55:44 2015 (r276665) +++ head/sys/conf/kern.mk Sun Jan 4 20:08:24 2015 (r276666) @@ -31,7 +31,8 @@ CWARNEXTRA?= -Wno-error-tautological-com -Wno-error-pointer-sign -Wno-error-format -Wno-error-parentheses .endif -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40300 +.if ${COMPILER_TYPE} == "gcc" +.if ${COMPILER_VERSION} >= 40300 # Catch-all for all the things that are in our tree, but for which we're # not yet ready for this compiler. Note: we likely only really "support" # building with gcc 4.8 and newer. Nothing older has been tested. @@ -40,6 +41,10 @@ CWARNEXTRA?= -Wno-error=inline -Wno-erro -Wno-error=array-bounds -Wno-error=address \ -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes \ -Wno-error=strict-overflow -Wno-error=overflow +.else +# For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. +CWARNEXTRA?= -Wno-uninitialized +.endif .endif # External compilers may not support our format extensions. Allow them From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 21:53:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 435A8C36; Sun, 4 Jan 2015 21:53:59 +0000 (UTC) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09B32283D; Sun, 4 Jan 2015 21:53:59 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id p10so26720638pdj.41; Sun, 04 Jan 2015 13:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=939G5Qz9ZBATjaPlEh85scHK+s1Qn0sN5I+2fwKKSZI=; b=0pzfsggO7SMBu8iSzMVhJnkTZ6s2zodkmhU2UqEHIJq8v18vu5aaaxAa7t+CUkNTCt sMqbyBjzTHLbIUnk0+GJt4D6sO5ZVQM4thYjK+xuehX6+XgRcXGgkg48rm04Ykhvl7ny X6HjH9ZwouR4+drmBFFOK1Hr2fbEy5sOM4CadhBTatGqGLJOi1fyzdXFwXzlHE7jtccB 1YClhaPmUjfkIJEicAw/hGS1tT4nCTFZtuaEaXUuw5fwnjMvzX6X/MXwfOWj721LXDdC iUWYikgLySAQxJgKplE7djmjDANOGpHFfnL+Zx8UjKxaMyG+0fm5x6eafZyFio0bxtTA SBNQ== X-Received: by 10.66.184.175 with SMTP id ev15mr108339358pac.78.1420408438595; Sun, 04 Jan 2015 13:53:58 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:d0fa:d4cd:367f:233d? ([2601:8:ab80:7d6:d0fa:d4cd:367f:233d]) by mx.google.com with ESMTPSA id ah1sm40239088pad.16.2015.01.04.13.53.57 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 04 Jan 2015 13:53:57 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_EA093892-D0C9-4847-A611-887012DA5B8A"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r276521 - head/contrib/netbsd-tests/lib/libm From: Garrett Cooper In-Reply-To: <20150102185046.K943@besplex.bde.org> Date: Sun, 4 Jan 2015 13:53:52 -0800 Message-Id: <9E7EDF01-88C2-4CB5-B26F-1F557E4441DF@gmail.com> References: <201501020057.t020vf4d063191@svn.freebsd.org> <20150102185046.K943@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 21:53:59 -0000 --Apple-Mail=_EA093892-D0C9-4847-A611-887012DA5B8A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jan 2, 2015, at 0:03, Bruce Evans wrote: > On Fri, 2 Jan 2015, Garrett Cooper wrote: >=20 >> Log: >> Reset errno in :scalbnf_val and :scalbnl_val before running the tests = so the >> tested errno isn't stale >=20 > It is a bug to even test errno. No function in libm accesses errno. I=92ll have to look again, but I=92m pretty sure NetBSD is using this to = test errors dealing with ranges and input, and it=92s probably = implementation dependent. It=92s still interesting that it was setting EINVAL (errno =3D=3D 2) = when running the tests and not others (and that potentially deserves = investigation). What=92s also curious is that this issue doesn=92t manifest itself on = 11-CURRENT as well, but I haven=92t taken the time to figure out why = that is, yet (apart from having merged some revisions from head which = didn=92t affect things), so the underlying issue is probably buried = somewhere in another library (libc, libthr, etc). >> This was needed in order for the test to pass on amd64 with stable/10 >>=20 >> MFC after: 3 days >>=20 >> Modified: >> head/contrib/netbsd-tests/lib/libm/t_scalbn.c >>=20 >> Modified: head/contrib/netbsd-tests/lib/libm/t_scalbn.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/contrib/netbsd-tests/lib/libm/t_scalbn.c Thu Jan 1 = 23:21:46 2015 (r276520) >> +++ head/contrib/netbsd-tests/lib/libm/t_scalbn.c Fri Jan 2 = 00:57:40 2015 (r276521) >> @@ -225,6 +225,9 @@ ATF_TC_BODY(scalbnf_val, tc) >> double rv; >>=20 >> for (i =3D 0; i < tcnt; i++) { >> +#ifdef __FreeBSD__ >> + errno =3D 0; >> +#endif >=20 > This is not FreeBSD-specific. A correct test might test > errno under the condition (math_errhandling & MATH_ERRNO), but that > would be a lot of work to test a fundamentally broken implementation. It definitely isn=92t. It=92s an item that I=92ll need to bring up with = the NetBSD folks/resolve differently in the future. >> rv =3D scalbnf(tests[i].inval, tests[i].exp); >> ATF_CHECK_EQ_MSG(errno, tests[i].error, >> "test %zu: errno %d instead of %d", i, errno, >=20 > The tests might set errno elsewhere, but scalbnf() obviously doesn't > in FreeBSD (and shouldn't unless MATH_ERRNO), so the = ATF_CHECK_EQ_MSG() > test can have no effect. It is surprising that it doesn't sometimes > fail if errno is always 0. If it always succeeds, then tests[i].error > must be dead data (always 0) and the ATF_CHECK_EQ_MSG() test dead code > (always pass). Hmmm=85 How is MATH_ERRNO supposed to work in FreeBSD. Based on = documentation I found =97 = http://en.cppreference.com/w/cpp/numeric/math/math_errhandling =97 it=92s = supposed to be used for reporting errors with errno since c++11, but = that doesn=92t seem to be implemented in libc++/libstdc++ (at least not = based on my limited grep)? FWIW it seems like this value should be 0, = not 1... Thanks! $ grep -r MATH_ERRNO contrib/binutils contrib/gcc* contrib/lib* = contrib/llvm/ include lib sys/sys/ lib/msun/src/math.h:#define MATH_ERRNO 1 contrib/libc++/include/cmath: MATH_ERRNO // C99 $ --Apple-Mail=_EA093892-D0C9-4847-A611-887012DA5B8A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUqbZwAAoJEMZr5QU6S73eXBcH/1NQf+GIElihOz9QhypYVeMs diZH2sinafOeN0lTGk8HJemYU9Q/GaQbK4bYUj5xOxpnl9Fon5wsycs9F1HwXAqI lYFNzsIZFbPSPjY15BAYVdP5Y8QyNWOOnV4Fzh+/SQg1PLwhXNbuOnZS1v0bAfZj mIuUbSQ+3CtGcTfuUg2KirG0AVZ4TtEy2oDrPVX4j+KHySYpGhnicJblox1pQji6 o2T0TIvjrnXKlTq0dPRIZ8AlV28TjnTbRZ1jGXhkUJOSt8W5XZzZl0jqy+TEUqA+ +uZvIBysKfQGDrazVdwaazeMeos2xlAxbWw2+Pl7zy71G1U+nx6ky3Esqmrz4SI= =psvE -----END PGP SIGNATURE----- --Apple-Mail=_EA093892-D0C9-4847-A611-887012DA5B8A-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:08:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EDB4127; Sun, 4 Jan 2015 22:08:51 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 095C629E0; Sun, 4 Jan 2015 22:08:50 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t04M8mdS076694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 5 Jan 2015 01:08:48 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t04M8mlX076693; Mon, 5 Jan 2015 01:08:48 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 5 Jan 2015 01:08:48 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r276626 - head/sys/kern Message-ID: <20150104220848.GU15484@FreeBSD.org> References: <201501031721.t03HLKHp060964@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501031721.t03HLKHp060964@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, avg@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 22:08:51 -0000 Hi! On Sat, Jan 03, 2015 at 05:21:20PM +0000, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Sat Jan 3 17:21:19 2015 H> New Revision: 276626 H> URL: https://svnweb.freebsd.org/changeset/base/276626 H> H> Log: H> Rework r276532 a bit. Always avoid recursing into the console drivers H> clients, hence they might not handle it very well. This change allows H> debugging mutex problems with kernel console drivers when H> "debug.witness.skipspin=0" is set in the boot environment. H> H> MFC after: 1 week I'd ask Andriy avg@ to review r276532 and this change. AFAIR, he attacked this problem in 2011/2012 and it appeared much more complex than just adding MTX_RECURSE flag. H> Modified: H> head/sys/kern/kern_cons.c H> H> Modified: head/sys/kern/kern_cons.c H> ============================================================================== H> --- head/sys/kern/kern_cons.c Sat Jan 3 16:48:08 2015 (r276625) H> +++ head/sys/kern/kern_cons.c Sat Jan 3 17:21:19 2015 (r276626) H> @@ -512,6 +512,13 @@ cnputs(char *p) H> int unlock_reqd = 0; H> H> if (use_cnputs_mtx) { H> + /* H> + * NOTE: Debug prints and/or witness printouts in H> + * console driver clients can cause the "cnputs_mtx" H> + * mutex to recurse. Simply return if that happens. H> + */ H> + if (mtx_owned(&cnputs_mtx)) H> + return; H> mtx_lock_spin(&cnputs_mtx); H> unlock_reqd = 1; H> } H> @@ -601,13 +608,7 @@ static void H> cn_drvinit(void *unused) H> { H> H> - /* H> - * NOTE: Debug prints and/or witness printouts in console H> - * driver clients can cause the "cnputs_mtx" mutex to H> - * recurse. Make sure the "MTX_RECURSE" flags is set! H> - */ H> - mtx_init(&cnputs_mtx, "cnputs_mtx", NULL, MTX_SPIN | H> - MTX_NOWITNESS | MTX_RECURSE); H> + mtx_init(&cnputs_mtx, "cnputs_mtx", NULL, MTX_SPIN | MTX_NOWITNESS); H> use_cnputs_mtx = 1; H> } H> H> -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:25:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A99C688; Sun, 4 Jan 2015 22:25:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C5422CA0; Sun, 4 Jan 2015 22:25:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04MPIwe092681; Sun, 4 Jan 2015 22:25:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04MPH9s092663; Sun, 4 Jan 2015 22:25:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501042225.t04MPH9s092663@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 4 Jan 2015 22:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276668 - in head: . etc/mtree sbin/ifconfig sbin/ifconfig/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 22:25:18 -0000 Author: ngie Date: Sun Jan 4 22:25:16 2015 New Revision: 276668 URL: https://svnweb.freebsd.org/changeset/base/276668 Log: Integrate sbin/ifconfig/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division Added: head/sbin/ifconfig/tests/Makefile (contents, props changed) Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.tests.dist head/sbin/ifconfig/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Jan 4 21:16:53 2015 (r276667) +++ head/ObsoleteFiles.inc Sun Jan 4 22:25:16 2015 (r276668) @@ -308,7 +308,6 @@ OLD_DIRS+=usr/include/clang/3.4 OLD_FILES+=usr/share/mk/src.opts.mk # 20140505: Reject PR kern/187551 OLD_DIRS+=usr/tests/sbin/ifconfig -OLD_FILES+=usr/tests/sbin/ifconfig/Kyuafile OLD_FILES+=usr/tests/sbin/ifconfig/fibs_test # 20140502: Removal of lindev(4) OLD_FILES+=usr/share/man/man4/lindev.4.gz Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Jan 4 21:16:53 2015 (r276667) +++ head/etc/mtree/BSD.tests.dist Sun Jan 4 22:25:16 2015 (r276668) @@ -160,6 +160,8 @@ .. growfs .. + ifconfig + .. mdconfig .. .. Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Sun Jan 4 21:16:53 2015 (r276667) +++ head/sbin/ifconfig/Makefile Sun Jan 4 22:25:16 2015 (r276668) @@ -65,4 +65,8 @@ MAN= ifconfig.8 CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs WARNS?= 2 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/sbin/ifconfig/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/ifconfig/tests/Makefile Sun Jan 4 22:25:16 2015 (r276668) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR}/../../.. +SRCTOP= ${.CURDIR}/../../.. +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/sbin/ifconfig + +TESTSDIR= ${TESTSBASE}/sbin/ifconfig + +NETBSD_ATF_TESTS_SH= nonexistent_test + +.include + +.include From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:37:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5E79A0E; Sun, 4 Jan 2015 22:37:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B18BE2E38; Sun, 4 Jan 2015 22:37:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04MbkO3097840; Sun, 4 Jan 2015 22:37:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04MbkEp097835; Sun, 4 Jan 2015 22:37:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501042237.t04MbkEp097835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 4 Jan 2015 22:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276669 - in head: bin/cat bin/cat/tests etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 22:37:46 -0000 Author: ngie Date: Sun Jan 4 22:37:44 2015 New Revision: 276669 URL: https://svnweb.freebsd.org/changeset/base/276669 Log: Integrate bin/cat/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division Added: head/bin/cat/tests/ head/bin/cat/tests/Makefile (contents, props changed) Modified: head/bin/cat/Makefile head/etc/mtree/BSD.tests.dist Modified: head/bin/cat/Makefile ============================================================================== --- head/bin/cat/Makefile Sun Jan 4 22:25:16 2015 (r276668) +++ head/bin/cat/Makefile Sun Jan 4 22:37:44 2015 (r276669) @@ -1,6 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ +.include + PROG= cat +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/bin/cat/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/cat/tests/Makefile Sun Jan 4 22:37:44 2015 (r276669) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR}/../../.. +SRCTOP= ${.CURDIR}/../../.. +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/cat + +TESTSDIR= ${TESTSBASE}/bin/cat + +NETBSD_ATF_TESTS_SH= cat_test + +.include + +.include Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Jan 4 22:25:16 2015 (r276668) +++ head/etc/mtree/BSD.tests.dist Sun Jan 4 22:37:44 2015 (r276669) @@ -6,6 +6,8 @@ /set type=dir uname=root gname=wheel mode=0755 . bin + cat + .. chown .. date From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 23:14:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABC33FF1; Sun, 4 Jan 2015 23:14:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97DD71354; Sun, 4 Jan 2015 23:14:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04NE5qm016431; Sun, 4 Jan 2015 23:14:05 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04NE5CD016429; Sun, 4 Jan 2015 23:14:05 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501042314.t04NE5CD016429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sun, 4 Jan 2015 23:14:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276670 - in head/sys/dev: altera/pio beri/virtio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 23:14:05 -0000 Author: br Date: Sun Jan 4 23:14:04 2015 New Revision: 276670 URL: https://svnweb.freebsd.org/changeset/base/276670 Log: Do not configure Altera PIO device on ARM startup. PIO is a device implemented in soft-core and becomes available after flashing FPGA only. Modified: head/sys/dev/altera/pio/pio.c head/sys/dev/beri/virtio/virtio.c Modified: head/sys/dev/altera/pio/pio.c ============================================================================== --- head/sys/dev/altera/pio/pio.c Sun Jan 4 22:37:44 2015 (r276669) +++ head/sys/dev/altera/pio/pio.c Sun Jan 4 23:14:04 2015 (r276670) @@ -178,8 +178,6 @@ pio_attach(device_t dev) sc->bst = rman_get_bustag(sc->res[0]); sc->bsh = rman_get_bushandle(sc->res[0]); - WRITE4(sc, PIO_DATA, 0); - if ((node = ofw_bus_get_node(sc->dev)) == -1) return (ENXIO); Modified: head/sys/dev/beri/virtio/virtio.c ============================================================================== --- head/sys/dev/beri/virtio/virtio.c Sun Jan 4 22:37:44 2015 (r276669) +++ head/sys/dev/beri/virtio/virtio.c Sun Jan 4 23:14:04 2015 (r276670) @@ -211,8 +211,6 @@ setup_pio(device_t dev, char *name, devi SLIST_FOREACH(ic, &fdt_ic_list_head, fdt_ics) { if (ic->iph == pio_node) { *pio_dev = ic->dev; - PIO_CONFIGURE(*pio_dev, PIO_OUT_ALL, - PIO_UNMASK_ALL); return (0); } } From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 23:41:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D66D2412; Sun, 4 Jan 2015 23:41:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2B2F17EE; Sun, 4 Jan 2015 23:41:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04NfIdM028158; Sun, 4 Jan 2015 23:41:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04NfI2G028157; Sun, 4 Jan 2015 23:41:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501042341.t04NfI2G028157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 4 Jan 2015 23:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276671 - head/contrib/netbsd-tests/bin/expr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 23:41:19 -0000 Author: ngie Date: Sun Jan 4 23:41:17 2015 New Revision: 276671 URL: https://svnweb.freebsd.org/changeset/base/276671 Log: Expect :arithmetic_ops_body to fail with syntax errors on FreeBSD MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/bin/expr/t_expr.sh Modified: head/contrib/netbsd-tests/bin/expr/t_expr.sh ============================================================================== --- head/contrib/netbsd-tests/bin/expr/t_expr.sh Sun Jan 4 23:14:04 2015 (r276670) +++ head/contrib/netbsd-tests/bin/expr/t_expr.sh Sun Jan 4 23:41:17 2015 (r276671) @@ -105,6 +105,9 @@ arithmetic_ops_head() { atf_set "descr" "Dangling arithemtic operator" } arithmetic_ops_body() { + # Begin FreeBSD + atf_expect_fail "the following testcases fail with syntax errors on FreeBSD" + # End FreeBSD test_expr '.java_wrapper : /' '0' test_expr '4 : \*' '0' test_expr '4 : +' '0' From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 00:03:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40383926; Mon, 5 Jan 2015 00:03:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CAAF29F5; Mon, 5 Jan 2015 00:03:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0503hgc040527; Mon, 5 Jan 2015 00:03:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0503h0I040526; Mon, 5 Jan 2015 00:03:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501050003.t0503h0I040526@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 5 Jan 2015 00:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276673 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 00:03:43 -0000 Author: ngie Date: Mon Jan 5 00:03:42 2015 New Revision: 276673 URL: https://svnweb.freebsd.org/changeset/base/276673 Log: Bump .Dd again for the change done in r276483 Pointyhat to: me Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Mon Jan 5 00:02:11 2015 (r276672) +++ head/share/man/man7/build.7 Mon Jan 5 00:03:42 2015 (r276673) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 18, 2014 +.Dd December 31, 2014 .Dt BUILD 7 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 00:50:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95D9B65C; Mon, 5 Jan 2015 00:50:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 771D13154; Mon, 5 Jan 2015 00:50:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t050oIH1064806; Mon, 5 Jan 2015 00:50:18 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t050oHCU064802; Mon, 5 Jan 2015 00:50:17 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501050050.t050oHCU064802@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 5 Jan 2015 00:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276679 - in head/sys: dev/vt/hw/fb powerpc/ps3 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 00:50:18 -0000 Author: nwhitehorn Date: Mon Jan 5 00:50:16 2015 New Revision: 276679 URL: https://svnweb.freebsd.org/changeset/base/276679 Log: Make PS3 work with the userspace kboot loader. loader.ps3 will disappear from the tree in the near future. Done at: Hackathon Modified: head/sys/dev/vt/hw/fb/vt_fb.c head/sys/powerpc/ps3/ps3_syscons.c head/sys/sys/fbio.h Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Mon Jan 5 00:15:27 2015 (r276678) +++ head/sys/dev/vt/hw/fb/vt_fb.c Mon Jan 5 00:50:16 2015 (r276679) @@ -154,6 +154,9 @@ vt_fb_setpixel(struct vt_device *vd, int c = info->fb_cmap[color]; o = info->fb_stride * y + x * FBTYPE_GET_BYTESPP(info); + if (info->fb_flags & FB_FLAG_NOWRITE) + return; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); switch (FBTYPE_GET_BYTESPP(info)) { @@ -205,6 +208,9 @@ vt_fb_blank(struct vt_device *vd, term_c info = vd->vd_softc; c = info->fb_cmap[color]; + if (info->fb_flags & FB_FLAG_NOWRITE) + return; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); switch (FBTYPE_GET_BYTESPP(info)) { @@ -260,6 +266,9 @@ vt_fb_bitblt_bitmap(struct vt_device *vd b = m = 0; bpl = (width + 7) >> 3; /* Bytes per source line. */ + if (info->fb_flags & FB_FLAG_NOWRITE) + return; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); line = (info->fb_stride * y) + (x * bpp); Modified: head/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- head/sys/powerpc/ps3/ps3_syscons.c Mon Jan 5 00:15:27 2015 (r276678) +++ head/sys/powerpc/ps3/ps3_syscons.c Mon Jan 5 00:50:16 2015 (r276679) @@ -155,7 +155,8 @@ ps3fb_remap(void) sc->fb_info.fb_pbase = fb_paddr; for (va = 0; va < PS3FB_SIZE; va += PAGE_SIZE) pmap_kenter_attr(0x10000000 + va, fb_paddr + va, - VM_MEMATTR_WRITE_COMBINING); + VM_MEMATTR_WRITE_COMBINING); + sc->fb_info.fb_flags &= ~FB_FLAG_NOWRITE; } static int @@ -175,10 +176,12 @@ ps3fb_init(struct vt_device *vd) sc->fb_info.fb_bpp = sc->fb_info.fb_stride / sc->fb_info.fb_width * 8; /* - * The loader puts the FB at 0x10000000, so use that for now. + * Arbitrarily choose address for the framebuffer */ sc->fb_info.fb_vbase = 0x10000000; + sc->fb_info.fb_flags |= FB_FLAG_NOWRITE; /* Not available yet */ + sc->fb_info.fb_cmsize = 16; /* 32-bit VGA palette */ vt_generate_cons_palette(sc->fb_info.fb_cmap, COLOR_FORMAT_RGB, Modified: head/sys/sys/fbio.h ============================================================================== --- head/sys/sys/fbio.h Mon Jan 5 00:15:27 2015 (r276678) +++ head/sys/sys/fbio.h Mon Jan 5 00:50:16 2015 (r276679) @@ -135,9 +135,10 @@ struct fb_info { void *fb_priv; /* First argument for read/write. */ const char *fb_name; uint32_t fb_flags; +#define FB_FLAG_NOMMAP 1 /* mmap unsupported. */ +#define FB_FLAG_NOWRITE 2 /* disable writes for the time being */ int fb_stride; int fb_bpp; /* bits per pixel */ -#define FB_FLAG_NOMMAP 1 /* mmap unsupported. */ uint32_t fb_cmap[16]; }; From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 01:05:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2F679B3; Mon, 5 Jan 2015 01:05:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C54C133C3; Mon, 5 Jan 2015 01:05:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0515aBH071877; Mon, 5 Jan 2015 01:05:36 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0515abb071875; Mon, 5 Jan 2015 01:05:36 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501050105.t0515abb071875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 5 Jan 2015 01:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276680 - head/sys/powerpc/ps3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 01:05:37 -0000 Author: nwhitehorn Date: Mon Jan 5 01:05:35 2015 New Revision: 276680 URL: https://svnweb.freebsd.org/changeset/base/276680 Log: Use FDT properties to identify a PS3 if present. Modified: head/sys/powerpc/ps3/platform_ps3.c head/sys/powerpc/ps3/ps3_syscons.c Modified: head/sys/powerpc/ps3/platform_ps3.c ============================================================================== --- head/sys/powerpc/ps3/platform_ps3.c Mon Jan 5 00:50:16 2015 (r276679) +++ head/sys/powerpc/ps3/platform_ps3.c Mon Jan 5 01:05:35 2015 (r276680) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "platform_if.h" #include "ps3-hvcall.h" @@ -103,8 +105,17 @@ PLATFORM_DEF(ps3_platform); static int ps3_probe(platform_t plat) { + phandle_t root; + char compatible[64]; + + root = OF_finddevice("/"); + if (OF_getprop(root, "compatible", compatible, sizeof(compatible)) <= 0) + return (BUS_PROBE_NOWILDCARD); + + if (strncmp(compatible, "sony,ps3", sizeof(compatible)) != 0) + return (BUS_PROBE_NOWILDCARD); - return (BUS_PROBE_NOWILDCARD); + return (BUS_PROBE_SPECIFIC); } static int Modified: head/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- head/sys/powerpc/ps3/ps3_syscons.c Mon Jan 5 00:50:16 2015 (r276679) +++ head/sys/powerpc/ps3/ps3_syscons.c Mon Jan 5 01:05:35 2015 (r276680) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -95,9 +96,7 @@ ps3fb_probe(struct vt_device *vd) struct ps3fb_softc *sc; int disable; char compatible[64]; -#if 0 phandle_t root; -#endif disable = 0; TUNABLE_INT_FETCH("hw.syscons.disable", &disable); @@ -106,18 +105,16 @@ ps3fb_probe(struct vt_device *vd) sc = &ps3fb_softc; -#if 0 + TUNABLE_STR_FETCH("hw.platform", compatible, sizeof(compatible)); + if (strcmp(compatible, "ps3") == 0) + return (CN_INTERNAL); + root = OF_finddevice("/"); if (OF_getprop(root, "compatible", compatible, sizeof(compatible)) <= 0) - return (0); + return (CN_DEAD); if (strncmp(compatible, "sony,ps3", sizeof(compatible)) != 0) - return (0); -#else - TUNABLE_STR_FETCH("hw.platform", compatible, sizeof(compatible)); - if (strcmp(compatible, "ps3") != 0) return (CN_DEAD); -#endif return (CN_INTERNAL); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 01:06:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 654A9AFA; Mon, 5 Jan 2015 01:06:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51ED933F6; Mon, 5 Jan 2015 01:06:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0516uRj072116; Mon, 5 Jan 2015 01:06:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0516tEM072111; Mon, 5 Jan 2015 01:06:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501050106.t0516tEM072111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 5 Jan 2015 01:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276681 - in head/lib: libc/include libc/sys libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 01:06:56 -0000 Author: kib Date: Mon Jan 5 01:06:54 2015 New Revision: 276681 URL: https://svnweb.freebsd.org/changeset/base/276681 Log: Avoid calling internal libc function through PLT or accessing data though GOT, by staticizing and hiding. Add setter for __error_selector to hide it as well. Suggested and reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/include/libc_private.h head/lib/libc/sys/Symbol.map head/lib/libc/sys/__error.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_syscalls.c Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Mon Jan 5 01:05:35 2015 (r276680) +++ head/lib/libc/include/libc_private.h Mon Jan 5 01:06:54 2015 (r276681) @@ -173,13 +173,13 @@ typedef pthread_func_t pthread_func_entr extern pthread_func_entry_t __thr_jtable[]; -extern int *(*__error_selector)(void); +void __set_error_selector(int *(*arg)(void)); int _pthread_mutex_init_calloc_cb_stub(pthread_mutex_t *mutex, void *(calloc_cb)(__size_t, __size_t)); typedef int (*interpos_func_t)(void); interpos_func_t *__libc_interposing_slot(int interposno); -extern interpos_func_t __libc_interposing[]; +extern interpos_func_t __libc_interposing[] __hidden; enum { INTERPOS_accept, Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Mon Jan 5 01:05:35 2015 (r276680) +++ head/lib/libc/sys/Symbol.map Mon Jan 5 01:06:54 2015 (r276681) @@ -1045,8 +1045,7 @@ FBSDprivate_1.0 { __sys_write; _writev; __sys_writev; - __error_unthreaded; - __error_selector; + __set_error_selector; nlm_syscall; gssd_syscall; __libc_interposing_slot; Modified: head/lib/libc/sys/__error.c ============================================================================== --- head/lib/libc/sys/__error.c Mon Jan 5 01:05:35 2015 (r276680) +++ head/lib/libc/sys/__error.c Mon Jan 5 01:06:54 2015 (r276681) @@ -32,13 +32,21 @@ __FBSDID("$FreeBSD$"); extern int errno; -int * +static int * __error_unthreaded(void) { - return(&errno); + + return (&errno); } -int *(*__error_selector)(void) = __error_unthreaded; +static int *(*__error_selector)(void) = __error_unthreaded; + +void +__set_error_selector(int *(*arg)(void)) +{ + + __error_selector = arg; +} int * __error(void) Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Mon Jan 5 01:05:35 2015 (r276680) +++ head/lib/libthr/thread/thr_private.h Mon Jan 5 01:06:54 2015 (r276681) @@ -914,7 +914,7 @@ void _thr_tsd_unload(struct dl_phdr_info void _thr_sigact_unload(struct dl_phdr_info *phdr_info) __hidden; void _thr_stack_fix_protection(struct pthread *thrd); -int *__error_threaded(void); +int *__error_threaded(void) __hidden; void __thr_interpose_libc(void) __hidden; pid_t __thr_fork(void); int __thr_pause(void) __hidden; Modified: head/lib/libthr/thread/thr_syscalls.c ============================================================================== --- head/lib/libthr/thread/thr_syscalls.c Mon Jan 5 01:05:35 2015 (r276680) +++ head/lib/libthr/thread/thr_syscalls.c Mon Jan 5 01:06:54 2015 (r276681) @@ -692,7 +692,7 @@ void __thr_interpose_libc(void) { - __error_selector = __error_threaded; + __set_error_selector(__error_threaded); #define SLOT(name) \ *(__libc_interposing_slot(INTERPOS_##name)) = \ (interpos_func_t)__thr_##name; From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 01:44:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E369344; Mon, 5 Jan 2015 01:44:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FB9B64A39; Mon, 5 Jan 2015 01:44:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t051iOYO090236; Mon, 5 Jan 2015 01:44:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t051iOXp090235; Mon, 5 Jan 2015 01:44:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050144.t051iOXp090235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 01:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276682 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 01:44:24 -0000 Author: adrian Date: Mon Jan 5 01:44:23 2015 New Revision: 276682 URL: https://svnweb.freebsd.org/changeset/base/276682 Log: Add QCA955x series register definitions. There's likely a bunch of register offsets that I have to add the register window base to before I use them. Done at: Hackathon Obtained from: Linux OpenWRT Added: head/sys/mips/atheros/qca955xreg.h (contents, props changed) Added: head/sys/mips/atheros/qca955xreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/qca955xreg.h Mon Jan 5 01:44:23 2015 (r276682) @@ -0,0 +1,183 @@ +/*- + * Copyright (c) 2013 Adrian Chadd + * 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 __QCA955XREG_H__ +#define __QCA955XREG_H__ + +#define BIT(x) (1 << (x)) + +/* Revision ID information */ +#define REV_ID_MAJOR_QCA9556 0x0130 +#define REV_ID_MAJOR_QCA9558 0x1130 +#define QCA955X_REV_ID_REVISION_MASK 0xf + +#define QCA955X_PCI_MEM_BASE0 0x10000000 +#define QCA955X_PCI_MEM_BASE1 0x12000000 +#define QCA955X_PCI_MEM_SIZE 0x02000000 +#define QCA955X_PCI_CFG_BASE0 0x14000000 +#define QCA955X_PCI_CFG_BASE1 0x16000000 +#define QCA955X_PCI_CFG_SIZE 0x1000 +#define QCA955X_PCI_CRP_BASE0 (AR71XX_APB_BASE + 0x000c0000) +#define QCA955X_PCI_CRP_BASE1 (AR71XX_APB_BASE + 0x00250000) +#define QCA955X_PCI_CRP_SIZE 0x1000 +#define QCA955X_PCI_CTRL_BASE0 (AR71XX_APB_BASE + 0x000f0000) +#define QCA955X_PCI_CTRL_BASE1 (AR71XX_APB_BASE + 0x00280000) +#define QCA955X_PCI_CTRL_SIZE 0x100 + +#define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000) +#define QCA955X_WMAC_SIZE 0x20000 +#define QCA955X_EHCI0_BASE 0x1b000000 +#define QCA955X_EHCI1_BASE 0x1b400000 +#define QCA955X_EHCI_SIZE 0x1000 + +/* PLL block */ + +#define QCA955X_PLL_CPU_CONFIG_REG (AR71XX_PLL_CPU_BASE + 0x00) +#define QCA955X_PLL_DDR_CONFIG_REG (AR71XX_PLL_CPU_BASE + 0x04) +#define QCA955X_PLL_CLK_CTRL_REG (AR71XX_PLL_CPU_BASE + 0x08) + +#define QCA955X_PLL_CPU_CONFIG_NFRAC_SHIFT 0 +#define QCA955X_PLL_CPU_CONFIG_NFRAC_MASK 0x3f +#define QCA955X_PLL_CPU_CONFIG_NINT_SHIFT 6 +#define QCA955X_PLL_CPU_CONFIG_NINT_MASK 0x3f +#define QCA955X_PLL_CPU_CONFIG_REFDIV_SHIFT 12 +#define QCA955X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f +#define QCA955X_PLL_CPU_CONFIG_OUTDIV_SHIFT 19 +#define QCA955X_PLL_CPU_CONFIG_OUTDIV_MASK 0x3 + +#define QCA955X_PLL_DDR_CONFIG_NFRAC_SHIFT 0 +#define QCA955X_PLL_DDR_CONFIG_NFRAC_MASK 0x3ff +#define QCA955X_PLL_DDR_CONFIG_NINT_SHIFT 10 +#define QCA955X_PLL_DDR_CONFIG_NINT_MASK 0x3f +#define QCA955X_PLL_DDR_CONFIG_REFDIV_SHIFT 16 +#define QCA955X_PLL_DDR_CONFIG_REFDIV_MASK 0x1f +#define QCA955X_PLL_DDR_CONFIG_OUTDIV_SHIFT 23 +#define QCA955X_PLL_DDR_CONFIG_OUTDIV_MASK 0x7 + +#define QCA955X_PLL_CLK_CTRL_CPU_PLL_BYPASS BIT(2) +#define QCA955X_PLL_CLK_CTRL_DDR_PLL_BYPASS BIT(3) +#define QCA955X_PLL_CLK_CTRL_AHB_PLL_BYPASS BIT(4) +#define QCA955X_PLL_CLK_CTRL_CPU_POST_DIV_SHIFT 5 +#define QCA955X_PLL_CLK_CTRL_CPU_POST_DIV_MASK 0x1f +#define QCA955X_PLL_CLK_CTRL_DDR_POST_DIV_SHIFT 10 +#define QCA955X_PLL_CLK_CTRL_DDR_POST_DIV_MASK 0x1f +#define QCA955X_PLL_CLK_CTRL_AHB_POST_DIV_SHIFT 15 +#define QCA955X_PLL_CLK_CTRL_AHB_POST_DIV_MASK 0x1f +#define QCA955X_PLL_CLK_CTRL_CPUCLK_FROM_CPUPLL BIT(20) +#define QCA955X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL BIT(21) +#define QCA955X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24) + +#define QCA955X_PLL_ETH_XMII_CONTROL_REG (AR71XX_PLL_CPU_BASE + 0x28) +#define QCA955X_PLL_ETH_SGMII_CONTROL_REG (AR71XX_PLL_CPU_BASE + 0x48) + +/* Reset block */ +#define QCA955X_RESET_REG_RESET_MODULE (AR71XX_RST_BLOCK_BASE + 0x1c) +#define QCA955X_RESET_REG_BOOTSTRAP (AR71XX_RST_BLOCK_BASE + 0xb0) +#define QCA955X_RESET_REG_EXT_INT_STATUS (AR71XX_RST_BLOCK_BASE + 0xac) + +#define QCA955X_BOOTSTRAP_REF_CLK_40 BIT(4) + +#define QCA955X_EXT_INT_WMAC_MISC BIT(0) +#define QCA955X_EXT_INT_WMAC_TX BIT(1) +#define QCA955X_EXT_INT_WMAC_RXLP BIT(2) +#define QCA955X_EXT_INT_WMAC_RXHP BIT(3) +#define QCA955X_EXT_INT_PCIE_RC1 BIT(4) +#define QCA955X_EXT_INT_PCIE_RC1_INT0 BIT(5) +#define QCA955X_EXT_INT_PCIE_RC1_INT1 BIT(6) +#define QCA955X_EXT_INT_PCIE_RC1_INT2 BIT(7) +#define QCA955X_EXT_INT_PCIE_RC1_INT3 BIT(8) +#define QCA955X_EXT_INT_PCIE_RC2 BIT(12) +#define QCA955X_EXT_INT_PCIE_RC2_INT0 BIT(13) +#define QCA955X_EXT_INT_PCIE_RC2_INT1 BIT(14) +#define QCA955X_EXT_INT_PCIE_RC2_INT2 BIT(15) +#define QCA955X_EXT_INT_PCIE_RC2_INT3 BIT(16) +#define QCA955X_EXT_INT_USB1 BIT(24) +#define QCA955X_EXT_INT_USB2 BIT(28) + +#define QCA955X_EXT_INT_WMAC_ALL \ + (QCA955X_EXT_INT_WMAC_MISC | QCA955X_EXT_INT_WMAC_TX | \ + QCA955X_EXT_INT_WMAC_RXLP | QCA955X_EXT_INT_WMAC_RXHP) + +#define QCA955X_EXT_INT_PCIE_RC1_ALL \ + (QCA955X_EXT_INT_PCIE_RC1 | QCA955X_EXT_INT_PCIE_RC1_INT0 | \ + QCA955X_EXT_INT_PCIE_RC1_INT1 | QCA955X_EXT_INT_PCIE_RC1_INT2 | \ + QCA955X_EXT_INT_PCIE_RC1_INT3) + +#define QCA955X_EXT_INT_PCIE_RC2_ALL \ + (QCA955X_EXT_INT_PCIE_RC2 | QCA955X_EXT_INT_PCIE_RC2_INT0 | \ + QCA955X_EXT_INT_PCIE_RC2_INT1 | QCA955X_EXT_INT_PCIE_RC2_INT2 | \ + QCA955X_EXT_INT_PCIE_RC2_INT3) + +#define QCA955X_RESET_HOST BIT(31) +#define QCA955X_RESET_SLIC BIT(30) +#define QCA955X_RESET_HDMA BIT(29) +#define QCA955X_RESET_EXTERNAL BIT(28) +#define QCA955X_RESET_RTC BIT(27) +#define QCA955X_RESET_PCIE_EP_INT BIT(26) +#define QCA955X_RESET_CHKSUM_ACC BIT(25) +#define QCA955X_RESET_FULL_CHIP BIT(24) +#define QCA955X_RESET_GE1_MDIO BIT(23) +#define QCA955X_RESET_GE0_MDIO BIT(22) +#define QCA955X_RESET_CPU_NMI BIT(21) +#define QCA955X_RESET_CPU_COLD BIT(20) +#define QCA955X_RESET_HOST_RESET_INT BIT(19) +#define QCA955X_RESET_PCIE_EP BIT(18) +#define QCA955X_RESET_UART1 BIT(17) +#define QCA955X_RESET_DDR BIT(16) +#define QCA955X_RESET_USB_PHY_PLL_PWD_EXT BIT(15) +#define QCA955X_RESET_NANDF BIT(14) +#define QCA955X_RESET_GE1_MAC BIT(13) +#define QCA955X_RESET_SGMII_ANALOG BIT(12) +#define QCA955X_RESET_USB_PHY_ANALOG BIT(11) +#define QCA955X_RESET_HOST_DMA_INT BIT(10) +#define QCA955X_RESET_GE0_MAC BIT(9) +#define QCA955X_RESET_SGMII BIT(8) +#define QCA955X_RESET_PCIE_PHY BIT(7) +#define QCA955X_RESET_PCIE BIT(6) +#define QCA955X_RESET_USB_HOST BIT(5) +#define QCA955X_RESET_USB_PHY BIT(4) +#define QCA955X_RESET_USBSUS_OVERRIDE BIT(3) +#define QCA955X_RESET_LUT BIT(2) +#define QCA955X_RESET_MBOX BIT(1) +#define QCA955X_RESET_I2S BIT(0) + +/* GPIO block */ +#define QCA955X_GPIO_COUNT 24 + +#define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000) +#define QCA955X_GMAC_SIZE 0x40 +#define QCA955X_NFC_BASE 0x1b800200 +#define QCA955X_NFC_SIZE 0xb8 + + +/* GMAC Interface */ +#define QCA955X_GMAC_REG_ETH_CFG 0x00 /* XXX register base? */ + +#define QCA955X_ETH_CFG_RGMII_EN BIT(0) +#define QCA955X_ETH_CFG_GE0_SGMII BIT(6) + +#endif /* __QCA955XREG_H__ */ From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 01:59:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0811A67D; Mon, 5 Jan 2015 01:59:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8E5C64C5D; Mon, 5 Jan 2015 01:59:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t051xj9g095439; Mon, 5 Jan 2015 01:59:45 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t051xjki095438; Mon, 5 Jan 2015 01:59:45 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050159.t051xjki095438@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 01:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276683 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 01:59:46 -0000 Author: adrian Date: Mon Jan 5 01:59:44 2015 New Revision: 276683 URL: https://svnweb.freebsd.org/changeset/base/276683 Log: add QCA955x SoC types. Modified: head/sys/mips/atheros/ar71xx_setup.h Modified: head/sys/mips/atheros/ar71xx_setup.h ============================================================================== --- head/sys/mips/atheros/ar71xx_setup.h Mon Jan 5 01:44:23 2015 (r276682) +++ head/sys/mips/atheros/ar71xx_setup.h Mon Jan 5 01:59:44 2015 (r276683) @@ -44,8 +44,10 @@ enum ar71xx_soc_type { AR71XX_SOC_AR9341, AR71XX_SOC_AR9342, AR71XX_SOC_AR9344, + AR71XX_SOC_QCA9556, + AR71XX_SOC_QCA9558, }; -extern enum ar71xx_soc_type ar71xx_soc; +extern enum ar71xx_soc_type ar71xx_soc; extern void ar71xx_detect_sys_type(void); extern const char *ar71xx_get_system_type(void); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 02:00:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 364867C2; Mon, 5 Jan 2015 02:00:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 239F664C70; Mon, 5 Jan 2015 02:00:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0520gRt096874; Mon, 5 Jan 2015 02:00:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0520gTN096873; Mon, 5 Jan 2015 02:00:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050200.t0520gTN096873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 02:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276684 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 02:00:42 -0000 Author: adrian Date: Mon Jan 5 02:00:41 2015 New Revision: 276684 URL: https://svnweb.freebsd.org/changeset/base/276684 Log: ACK interrupts on the new SoCs. Modified: head/sys/mips/atheros/apb.c Modified: head/sys/mips/atheros/apb.c ============================================================================== --- head/sys/mips/atheros/apb.c Mon Jan 5 01:59:44 2015 (r276683) +++ head/sys/mips/atheros/apb.c Mon Jan 5 02:00:41 2015 (r276684) @@ -364,6 +364,8 @@ apb_filter(void *arg) case AR71XX_SOC_AR9341: case AR71XX_SOC_AR9342: case AR71XX_SOC_AR9344: + case AR71XX_SOC_QCA9556: + case AR71XX_SOC_QCA9558: /* ACK/clear the given interrupt */ ATH_WRITE_REG(AR71XX_MISC_INTR_STATUS, (1 << irq)); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 02:06:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9D77B02; Mon, 5 Jan 2015 02:06:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5B3D64DCA; Mon, 5 Jan 2015 02:06:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0526Sra099933; Mon, 5 Jan 2015 02:06:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0526RLp099929; Mon, 5 Jan 2015 02:06:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050206.t0526RLp099929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 02:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276685 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 02:06:29 -0000 Author: adrian Date: Mon Jan 5 02:06:26 2015 New Revision: 276685 URL: https://svnweb.freebsd.org/changeset/base/276685 Log: Add initial Qualcomm Atheros QCA955x SoC support. This adds the initial frequency poking and configures up enough for it to boot and spit out data over the console. There's still a whole bunch of work to do in the reset path and devices to support this thing, but hey, it's alive! ath> go 0x80050100 ## Starting application at 0x80050100 ... CPU platform: Atheros AR9558 rev 0 CPU Frequency=720 MHz CPU DDR Frequency=600 MHz CPU AHB Frequency=200 MHz platform frequency: 720 MHz CPU reference clock: 0 MHz CPU MDIO clock: 40 MHz Done at: hackathon Obtained from: Linux OpenWRT, Qualcomm Atheros Added: head/sys/mips/atheros/qca955x_chip.c (contents, props changed) head/sys/mips/atheros/qca955x_chip.h (contents, props changed) Modified: head/sys/mips/atheros/ar71xx_setup.c head/sys/mips/atheros/files.ar71xx Modified: head/sys/mips/atheros/ar71xx_setup.c ============================================================================== --- head/sys/mips/atheros/ar71xx_setup.c Mon Jan 5 02:00:41 2015 (r276684) +++ head/sys/mips/atheros/ar71xx_setup.c Mon Jan 5 02:06:26 2015 (r276685) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -64,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define AR71XX_SYS_TYPE_LEN 128 @@ -184,6 +186,22 @@ ar71xx_detect_sys_type(void) ar71xx_cpu_ops = &ar934x_chip_def; break; + case REV_ID_MAJOR_QCA9556: + minor = 0; + rev = (id & QCA955X_REV_ID_REVISION_MASK); + chip = "9556"; + ar71xx_soc = AR71XX_SOC_QCA9556; + ar71xx_cpu_ops = &qca955x_chip_def; + break; + + case REV_ID_MAJOR_QCA9558: + minor = 0; + rev = (id & QCA955X_REV_ID_REVISION_MASK); + chip = "9558"; + ar71xx_soc = AR71XX_SOC_QCA9558; + ar71xx_cpu_ops = &qca955x_chip_def; + break; + default: panic("ar71xx: unknown chip id:0x%08x\n", id); } Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Mon Jan 5 02:00:41 2015 (r276684) +++ head/sys/mips/atheros/files.ar71xx Mon Jan 5 02:06:26 2015 (r276685) @@ -26,6 +26,7 @@ mips/atheros/ar724x_chip.c standard mips/atheros/ar91xx_chip.c standard mips/atheros/ar933x_chip.c standard mips/atheros/ar934x_chip.c standard +mips/atheros/qca955x_chip.c standard mips/atheros/ar71xx_fixup.c optional ar71xx_ath_eeprom dev/hwpmc/hwpmc_mips24k.c optional hwpmc_mips24k Added: head/sys/mips/atheros/qca955x_chip.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/qca955x_chip.c Mon Jan 5 02:06:26 2015 (r276685) @@ -0,0 +1,449 @@ +/*- + * Copyright (c) 2015 Adrian Chadd + * 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 "opt_ddb.h" + +#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 + +static void +qca955x_chip_detect_mem_size(void) +{ +} + +static void +qca955x_chip_detect_sys_frequency(void) +{ + unsigned long ref_rate; + unsigned long cpu_rate; + unsigned long ddr_rate; + unsigned long ahb_rate; + uint32_t pll, out_div, ref_div, nint, frac, clk_ctrl, postdiv; + uint32_t cpu_pll, ddr_pll; + uint32_t bootstrap; + + bootstrap = ATH_READ_REG(QCA955X_RESET_REG_BOOTSTRAP); + if (bootstrap & QCA955X_BOOTSTRAP_REF_CLK_40) + ref_rate = 40 * 1000 * 1000; + else + ref_rate = 25 * 1000 * 1000; + + pll = ATH_READ_REG(QCA955X_PLL_CPU_CONFIG_REG); + out_div = (pll >> QCA955X_PLL_CPU_CONFIG_OUTDIV_SHIFT) & + QCA955X_PLL_CPU_CONFIG_OUTDIV_MASK; + ref_div = (pll >> QCA955X_PLL_CPU_CONFIG_REFDIV_SHIFT) & + QCA955X_PLL_CPU_CONFIG_REFDIV_MASK; + nint = (pll >> QCA955X_PLL_CPU_CONFIG_NINT_SHIFT) & + QCA955X_PLL_CPU_CONFIG_NINT_MASK; + frac = (pll >> QCA955X_PLL_CPU_CONFIG_NFRAC_SHIFT) & + QCA955X_PLL_CPU_CONFIG_NFRAC_MASK; + + cpu_pll = nint * ref_rate / ref_div; + cpu_pll += frac * ref_rate / (ref_div * (1 << 6)); + cpu_pll /= (1 << out_div); + + pll = ATH_READ_REG(QCA955X_PLL_DDR_CONFIG_REG); + out_div = (pll >> QCA955X_PLL_DDR_CONFIG_OUTDIV_SHIFT) & + QCA955X_PLL_DDR_CONFIG_OUTDIV_MASK; + ref_div = (pll >> QCA955X_PLL_DDR_CONFIG_REFDIV_SHIFT) & + QCA955X_PLL_DDR_CONFIG_REFDIV_MASK; + nint = (pll >> QCA955X_PLL_DDR_CONFIG_NINT_SHIFT) & + QCA955X_PLL_DDR_CONFIG_NINT_MASK; + frac = (pll >> QCA955X_PLL_DDR_CONFIG_NFRAC_SHIFT) & + QCA955X_PLL_DDR_CONFIG_NFRAC_MASK; + + ddr_pll = nint * ref_rate / ref_div; + ddr_pll += frac * ref_rate / (ref_div * (1 << 10)); + ddr_pll /= (1 << out_div); + + clk_ctrl = ATH_READ_REG(QCA955X_PLL_CLK_CTRL_REG); + + postdiv = (clk_ctrl >> QCA955X_PLL_CLK_CTRL_CPU_POST_DIV_SHIFT) & + QCA955X_PLL_CLK_CTRL_CPU_POST_DIV_MASK; + + if (clk_ctrl & QCA955X_PLL_CLK_CTRL_CPU_PLL_BYPASS) + cpu_rate = ref_rate; + else if (clk_ctrl & QCA955X_PLL_CLK_CTRL_CPUCLK_FROM_CPUPLL) + cpu_rate = ddr_pll / (postdiv + 1); + else + cpu_rate = cpu_pll / (postdiv + 1); + + postdiv = (clk_ctrl >> QCA955X_PLL_CLK_CTRL_DDR_POST_DIV_SHIFT) & + QCA955X_PLL_CLK_CTRL_DDR_POST_DIV_MASK; + + if (clk_ctrl & QCA955X_PLL_CLK_CTRL_DDR_PLL_BYPASS) + ddr_rate = ref_rate; + else if (clk_ctrl & QCA955X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL) + ddr_rate = cpu_pll / (postdiv + 1); + else + ddr_rate = ddr_pll / (postdiv + 1); + + postdiv = (clk_ctrl >> QCA955X_PLL_CLK_CTRL_AHB_POST_DIV_SHIFT) & + QCA955X_PLL_CLK_CTRL_AHB_POST_DIV_MASK; + + if (clk_ctrl & QCA955X_PLL_CLK_CTRL_AHB_PLL_BYPASS) + ahb_rate = ref_rate; + else if (clk_ctrl & QCA955X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL) + ahb_rate = ddr_pll / (postdiv + 1); + else + ahb_rate = cpu_pll / (postdiv + 1); + +#if 0 + ath79_add_sys_clkdev("ref", ref_rate); + ath79_add_sys_clkdev("cpu", cpu_rate); + ath79_add_sys_clkdev("ddr", ddr_rate); + ath79_add_sys_clkdev("ahb", ahb_rate); + + clk_add_alias("wdt", NULL, "ref", NULL); + clk_add_alias("uart", NULL, "ref", NULL); +#endif + + u_ar71xx_ddr_freq = ddr_rate; + u_ar71xx_cpu_freq = cpu_rate; + u_ar71xx_ahb_freq = ahb_rate; + + u_ar71xx_wdt_freq = ref_rate; + u_ar71xx_uart_freq = ref_rate; + u_ar71xx_mdio_freq = ref_rate; + + +} + +static void +qca955x_chip_device_stop(uint32_t mask) +{ + uint32_t reg; + + reg = ATH_READ_REG(QCA955X_RESET_REG_RESET_MODULE); + ATH_WRITE_REG(QCA955X_RESET_REG_RESET_MODULE, reg | mask); +} + +static void +qca955x_chip_device_start(uint32_t mask) +{ + uint32_t reg; + + reg = ATH_READ_REG(QCA955X_RESET_REG_RESET_MODULE); + ATH_WRITE_REG(QCA955X_RESET_REG_RESET_MODULE, reg & ~mask); +} + +static int +qca955x_chip_device_stopped(uint32_t mask) +{ + uint32_t reg; + + reg = ATH_READ_REG(QCA955X_RESET_REG_RESET_MODULE); + return ((reg & mask) == mask); +} + +static void +qca955x_chip_set_mii_speed(uint32_t unit, uint32_t speed) +{ + + /* XXX TODO */ + return; +} + +/* + * XXX TODO !! + */ +static void +qca955x_chip_set_pll_ge(int unit, int speed, uint32_t pll) +{ +#if 0 + switch (unit) { + case 0: + ATH_WRITE_REG(AR934X_PLL_ETH_XMII_CONTROL_REG, pll); + break; + case 1: + /* XXX nothing */ + break; + default: + printf("%s: invalid PLL set for arge unit: %d\n", + __func__, unit); + return; + } +#endif +} + +static void +qca955x_chip_ddr_flush_ge(int unit) +{ +#if 0 + switch (unit) { + case 0: + ar71xx_ddr_flush(AR934X_DDR_REG_FLUSH_GE0); + break; + case 1: + ar71xx_ddr_flush(AR934X_DDR_REG_FLUSH_GE1); + break; + default: + printf("%s: invalid DDR flush for arge unit: %d\n", + __func__, unit); + return; + } +#endif +} + +static void +qca955x_chip_ddr_flush_ip2(void) +{ +#if 0 + ar71xx_ddr_flush(AR934X_DDR_REG_FLUSH_WMAC); +#endif +} + +static uint32_t +qca955x_chip_get_eth_pll(unsigned int mac, int speed) +{ +#if 0 + uint32_t pll; + + switch (speed) { + case 10: + pll = AR934X_PLL_VAL_10; + break; + case 100: + pll = AR934X_PLL_VAL_100; + break; + case 1000: + pll = AR934X_PLL_VAL_1000; + break; + default: + printf("%s%d: invalid speed %d\n", __func__, mac, speed); + pll = 0; + } + return (pll); +#else + return (0); +#endif +} + +static void +qca955x_chip_reset_ethernet_switch(void) +{ +#if 0 + ar71xx_device_stop(AR934X_RESET_ETH_SWITCH); + DELAY(100); + ar71xx_device_start(AR934X_RESET_ETH_SWITCH); + DELAY(100); +#endif +} + +#if 0 +static void +qca955x_configure_gmac(uint32_t gmac_cfg) +{ + uint32_t reg; + + reg = ATH_READ_REG(AR934X_GMAC_REG_ETH_CFG); + printf("%s: ETH_CFG=0x%08x\n", __func__, reg); + + reg &= ~(AR934X_ETH_CFG_RGMII_GMAC0 | AR934X_ETH_CFG_MII_GMAC0 | + AR934X_ETH_CFG_MII_GMAC0 | AR934X_ETH_CFG_SW_ONLY_MODE | + AR934X_ETH_CFG_SW_PHY_SWAP); + + reg |= gmac_cfg; + + ATH_WRITE_REG(AR934X_GMAC_REG_ETH_CFG, reg); +} +#endif + +static void +qca955x_chip_init_usb_peripheral(void) +{ +#if 0 + uint32_t reg; + + reg = ATH_READ_REG(AR934X_RESET_REG_BOOTSTRAP); + if (reg & AR934X_BOOTSTRAP_USB_MODE_DEVICE) + return; + + ar71xx_device_stop(AR934X_RESET_USBSUS_OVERRIDE); + DELAY(100); + + ar71xx_device_start(AR934X_RESET_USB_PHY); + DELAY(100); + + ar71xx_device_start(AR934X_RESET_USB_PHY_ANALOG); + DELAY(100); + + ar71xx_device_start(AR934X_RESET_USB_HOST); + DELAY(100); +#endif +} + +static void +qca955x_chip_set_mii_if(uint32_t unit, uint32_t mii_mode) +{ + + /* + * XXX ! + * + * Nothing to see here; although gmac0 can have its + * MII configuration changed, the register values + * are slightly different. + */ +} + +/* + * XXX TODO: fetch default MII divider configuration + */ + +static void +qca955x_chip_reset_wmac(void) +{ + + /* XXX TODO */ +} + +static void +qca955x_chip_init_gmac(void) +{ +#if 0 + long gmac_cfg; + + if (resource_long_value("ar934x_gmac", 0, "gmac_cfg", + &gmac_cfg) == 0) { + printf("%s: gmac_cfg=0x%08lx\n", + __func__, + (long) gmac_cfg); + ar934x_configure_gmac((uint32_t) gmac_cfg); + } +#endif +} + +/* + * Reset the NAND Flash Controller. + * + * + active=1 means "make it active". + * + active=0 means "make it inactive". + */ +static void +qca955x_chip_reset_nfc(int active) +{ +#if 0 + if (active) { + ar71xx_device_start(AR934X_RESET_NANDF); + DELAY(100); + + ar71xx_device_start(AR934X_RESET_ETH_SWITCH_ANALOG); + DELAY(250); + } else { + ar71xx_device_stop(AR934X_RESET_ETH_SWITCH_ANALOG); + DELAY(250); + + ar71xx_device_stop(AR934X_RESET_NANDF); + DELAY(100); + } +#endif +} + +/* + * Configure the GPIO output mux setup. + * + * The AR934x introduced an output mux which allowed + * certain functions to be configured on any pin. + * Specifically, the switch PHY link LEDs and + * WMAC external RX LNA switches are not limited to + * a specific GPIO pin. + */ +static void +qca955x_chip_gpio_output_configure(int gpio, uint8_t func) +{ +#if 0 + uint32_t reg, s; + uint32_t t; + + if (gpio > QCA955X_GPIO_COUNT) + return; + + reg = AR934X_GPIO_REG_OUT_FUNC0 + 4 * (gpio / 4); + s = 8 * (gpio % 4); + + /* read-modify-write */ + t = ATH_READ_REG(AR71XX_GPIO_BASE + reg); + t &= ~(0xff << s); + t |= func << s; + ATH_WRITE_REG(AR71XX_GPIO_BASE + reg, t); + + /* flush write */ + ATH_READ_REG(AR71XX_GPIO_BASE + reg); +#endif +} + +struct ar71xx_cpu_def qca955x_chip_def = { + &qca955x_chip_detect_mem_size, + &qca955x_chip_detect_sys_frequency, + &qca955x_chip_device_stop, + &qca955x_chip_device_start, + &qca955x_chip_device_stopped, + &qca955x_chip_set_pll_ge, + &qca955x_chip_set_mii_speed, + &qca955x_chip_set_mii_if, + &qca955x_chip_ddr_flush_ge, + &qca955x_chip_get_eth_pll, + &qca955x_chip_ddr_flush_ip2, + &qca955x_chip_init_usb_peripheral, + &qca955x_chip_reset_ethernet_switch, + &qca955x_chip_reset_wmac, + &qca955x_chip_init_gmac, + &qca955x_chip_reset_nfc, + &qca955x_chip_gpio_output_configure, +}; Added: head/sys/mips/atheros/qca955x_chip.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/qca955x_chip.h Mon Jan 5 02:06:26 2015 (r276685) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2015 Adrian Chadd + * 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 __QCA955X_CHIP_H__ +#define __QCA955X_CHIP_H__ + +extern struct ar71xx_cpu_def qca955x_chip_def; + +#endif From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 04:33:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FE47881; Mon, 5 Jan 2015 04:33:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B0311870; Mon, 5 Jan 2015 04:33:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t054XeWj070344; Mon, 5 Jan 2015 04:33:40 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t054XeFG070343; Mon, 5 Jan 2015 04:33:40 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501050433.t054XeFG070343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 5 Jan 2015 04:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276688 - head/sys/boot/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 04:33:40 -0000 Author: nwhitehorn Date: Mon Jan 5 04:33:39 2015 New Revision: 276688 URL: https://svnweb.freebsd.org/changeset/base/276688 Log: Add kexec-based Linux shim loader for use with the firmware petitboot loader on PS3 and POWER8 systems. This is reasonably portable to other architectures, especially FDT-based ones, if similar features are useful elsewhere. Netboot support is missing for now and will be added in a future commit, at which time loader.ps3 will be garbage collected. Done at: Hackathon Added: - copied from r276687, user/nwhitehorn/kboot/powerpc/kboot/ Directory Properties: head/sys/boot/powerpc/kboot/ (props changed) Modified: head/sys/boot/powerpc/Makefile Modified: head/sys/boot/powerpc/Makefile ============================================================================== --- head/sys/boot/powerpc/Makefile Mon Jan 5 04:30:21 2015 (r276687) +++ head/sys/boot/powerpc/Makefile Mon Jan 5 04:33:39 2015 (r276688) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= boot1.chrp ofw ps3 uboot +SUBDIR= boot1.chrp kboot ofw ps3 uboot .include From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 04:56:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 984F9D21; Mon, 5 Jan 2015 04:56:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83E9A1B17; Mon, 5 Jan 2015 04:56:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t054udq9079892; Mon, 5 Jan 2015 04:56:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t054udQO079891; Mon, 5 Jan 2015 04:56:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501050456.t054udQO079891@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 5 Jan 2015 04:56:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276689 - head/contrib/elftoolchain/addr2line X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 04:56:39 -0000 Author: emaste Date: Mon Jan 5 04:56:38 2015 New Revision: 276689 URL: https://svnweb.freebsd.org/changeset/base/276689 Log: addr2line: fflush output after each address lookup Certain tools spawn addr2line and pass addresses one at a time for resolution. PR: 195561 Reported by: antoine Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/addr2line/addr2line.c Modified: head/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.c Mon Jan 5 04:33:39 2015 (r276688) +++ head/contrib/elftoolchain/addr2line/addr2line.c Mon Jan 5 04:56:38 2015 (r276689) @@ -399,8 +399,10 @@ main(int argc, char **argv) for (i = 0; i < argc; i++) translate(dbg, argv[i]); else - while (fgets(line, sizeof(line), stdin) != NULL) + while (fgets(line, sizeof(line), stdin) != NULL) { translate(dbg, line); + fflush(stdout); + } dwarf_finish(dbg, &de); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 05:26:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 468B290; Mon, 5 Jan 2015 05:26:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 318003FF4; Mon, 5 Jan 2015 05:26:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t055Qw0F093804; Mon, 5 Jan 2015 05:26:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t055QwtD093803; Mon, 5 Jan 2015 05:26:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050526.t055QwtD093803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 05:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276690 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 05:26:58 -0000 Author: adrian Date: Mon Jan 5 05:26:57 2015 New Revision: 276690 URL: https://svnweb.freebsd.org/changeset/base/276690 Log: Oops - missed refclk. Tested: * AP135, QCA955x SoC Modified: head/sys/mips/atheros/qca955x_chip.c Modified: head/sys/mips/atheros/qca955x_chip.c ============================================================================== --- head/sys/mips/atheros/qca955x_chip.c Mon Jan 5 04:56:38 2015 (r276689) +++ head/sys/mips/atheros/qca955x_chip.c Mon Jan 5 05:26:57 2015 (r276690) @@ -161,8 +161,7 @@ qca955x_chip_detect_sys_frequency(void) u_ar71xx_wdt_freq = ref_rate; u_ar71xx_uart_freq = ref_rate; u_ar71xx_mdio_freq = ref_rate; - - + u_ar71xx_refclk = ref_rate; } static void From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 05:30:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 862041EF; Mon, 5 Jan 2015 05:30:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7179D2040; Mon, 5 Jan 2015 05:30:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t055U8GC094293; Mon, 5 Jan 2015 05:30:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t055U8f7094292; Mon, 5 Jan 2015 05:30:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050530.t055U8f7094292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 05:30:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276691 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 05:30:08 -0000 Author: adrian Date: Mon Jan 5 05:30:07 2015 New Revision: 276691 URL: https://svnweb.freebsd.org/changeset/base/276691 Log: Remove the remnants of the OpenWRT/Linux bits that this was based off of. Obtained from: Linux/OpenWRT Modified: head/sys/mips/atheros/qca955x_chip.c Modified: head/sys/mips/atheros/qca955x_chip.c ============================================================================== --- head/sys/mips/atheros/qca955x_chip.c Mon Jan 5 05:26:57 2015 (r276690) +++ head/sys/mips/atheros/qca955x_chip.c Mon Jan 5 05:30:07 2015 (r276691) @@ -144,16 +144,6 @@ qca955x_chip_detect_sys_frequency(void) else ahb_rate = cpu_pll / (postdiv + 1); -#if 0 - ath79_add_sys_clkdev("ref", ref_rate); - ath79_add_sys_clkdev("cpu", cpu_rate); - ath79_add_sys_clkdev("ddr", ddr_rate); - ath79_add_sys_clkdev("ahb", ahb_rate); - - clk_add_alias("wdt", NULL, "ref", NULL); - clk_add_alias("uart", NULL, "ref", NULL); -#endif - u_ar71xx_ddr_freq = ddr_rate; u_ar71xx_cpu_freq = cpu_rate; u_ar71xx_ahb_freq = ahb_rate; From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 09:58:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0192138; Mon, 5 Jan 2015 09:58:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bit