From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 00:16:06 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 DC74D772; Sun, 15 Mar 2015 00:16:06 +0000 (UTC) Received: from relay.mailchannels.net (ftx-008-i767.relay.mailchannels.net [50.61.143.67]) by mx1.freebsd.org (Postfix) with ESMTP id EF7173EC; Sun, 15 Mar 2015 00:16:03 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp7.ore.mailhop.org (ip-10-204-4-183.us-west-2.compute.internal [10.204.4.183]) by relay.mailchannels.net (Postfix) with ESMTPA id E388710010B; Sat, 14 Mar 2015 23:58:16 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp7.ore.mailhop.org (smtp7.ore.mailhop.org [10.83.15.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Sat, 14 Mar 2015 23:58:18 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1426377498029:1708916054 X-MC-Ingress-Time: 1426377498029 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp7.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YWvwc-0005BH-SV; Sat, 14 Mar 2015 23:58:15 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t2ENwBK5019713; Sat, 14 Mar 2015 17:58:11 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+mJ0dj0e0WVJmHGcXncvtz Message-ID: <1426377491.39727.4.camel@freebsd.org> Subject: Re: svn commit: r279997 - head/sys/netinet From: Ian Lepore To: John Baldwin Date: Sat, 14 Mar 2015 17:58:11 -0600 In-Reply-To: <12123739.Rz3jP8R4fM@ralph.baldwin.cx> References: <201503141811.t2EIBPeE006504@svn.freebsd.org> <12123739.Rz3jP8R4fM@ralph.baldwin.cx> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie 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, 15 Mar 2015 00:16:07 -0000 On Sat, 2015-03-14 at 17:52 -0400, John Baldwin wrote: > On Saturday, March 14, 2015 06:11:25 PM Ian Lepore wrote: > > Author: ian > > Date: Sat Mar 14 18:11:24 2015 > > New Revision: 279997 > > URL: https://svnweb.freebsd.org/changeset/base/279997 > > > > Log: > > Use sbuf_new_for_sysctl() instead of plain sbuf_new() to ensure sysctl > > string returned to userland is nulterminated. > > > > PR: 195668 > > This is not safe. sbuf_printf() is invoked with a lock held, so it isn't > safe for the sbuf code to do a drain here. With sbuf_new_for_sysctl(), > any call to an sbuf routine is a potential page fault, so the handler must > either use sysctl_wire_old_buffer(), or the contents need to be output in > one go. For this case I would prefer to use sbuf_len(sb) + 1 (or add > INCLUDENUL to the args when creating it) and leave the sole SYSCTL_OUT() > at the end. > > You will want to check the one or two other places you converted for this > same issue as well. > Doh! I was trying to keep an eye out for locks, but I missed that one. Fixed in r280014. I'm at that point in a big maintenance task where I've looked at too much code in too short a time, thanks for keeping a watchful eye on all this. -- Ian From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 00:36:09 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 466749F5; Sun, 15 Mar 2015 00:36: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 31D697C0; Sun, 15 Mar 2015 00:36: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 t2F0a9wS087469; Sun, 15 Mar 2015 00:36:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2F0a9jt087468; Sun, 15 Mar 2015 00:36:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503150036.t2F0a9jt087468@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 15 Mar 2015 00:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280015 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 00:36:09 -0000 Author: ian Date: Sun Mar 15 00:36:08 2015 New Revision: 280015 URL: https://svnweb.freebsd.org/changeset/base/280015 Log: Include the nulterm byte in the sysctl string. PR: 195668 Modified: head/sys/kern/kern_cons.c Modified: head/sys/kern/kern_cons.c ============================================================================== --- head/sys/kern/kern_cons.c Sat Mar 14 23:57:33 2015 (r280014) +++ head/sys/kern/kern_cons.c Sun Mar 15 00:36:08 2015 (r280015) @@ -292,7 +292,8 @@ sysctl_kern_console(SYSCTL_HANDLER_ARGS) int delete, error; struct sbuf *sb; - sb = sbuf_new(NULL, NULL, CNDEVPATHMAX * 2, SBUF_AUTOEXTEND); + sb = sbuf_new(NULL, NULL, CNDEVPATHMAX * 2, SBUF_AUTOEXTEND | + SBUF_INCLUDENUL); if (sb == NULL) return (ENOMEM); sbuf_clear(sb); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 00:39:19 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 865AABCE; Sun, 15 Mar 2015 00:39:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72A687E9; Sun, 15 Mar 2015 00:39:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2F0dJpI087903; Sun, 15 Mar 2015 00:39:19 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2F0dJ26087902; Sun, 15 Mar 2015 00:39:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503150039.t2F0dJ26087902@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 15 Mar 2015 00:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280016 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 00:39:19 -0000 Author: ian Date: Sun Mar 15 00:39:18 2015 New Revision: 280016 URL: https://svnweb.freebsd.org/changeset/base/280016 Log: Add a nulterm byte to the returned sysctl string. PR: 195668 Modified: head/sys/kern/subr_prf.c Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Sun Mar 15 00:36:08 2015 (r280015) +++ head/sys/kern/subr_prf.c Sun Mar 15 00:39:18 2015 (r280016) @@ -1009,7 +1009,7 @@ sysctl_kern_msgbuf(SYSCTL_HANDLER_ARGS) len = msgbuf_peekbytes(msgbufp, buf, sizeof(buf), &seq); mtx_unlock(&msgbuf_lock); if (len == 0) - return (0); + return (SYSCTL_OUT(req, "", 1)); /* add nulterm */ error = sysctl_handle_opaque(oidp, buf, len, req); if (error) From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 08:09:57 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 8D1B4CE6; Sun, 15 Mar 2015 08:09:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75A88D99; Sun, 15 Mar 2015 08:09:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2F89v6h095798; Sun, 15 Mar 2015 08:09:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2F89vAS095796; Sun, 15 Mar 2015 08:09:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503150809.t2F89vAS095796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Mar 2015 08:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280017 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 08:09:57 -0000 Author: mav Date: Sun Mar 15 08:09:56 2015 New Revision: 280017 URL: https://svnweb.freebsd.org/changeset/base/280017 Log: Block delete capability for read-only devices. Submitted by: neel MFC after: 2 weeks Modified: head/usr.sbin/bhyve/block_if.c head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Sun Mar 15 00:39:18 2015 (r280016) +++ head/usr.sbin/bhyve/block_if.c Sun Mar 15 08:09:56 2015 (r280017) @@ -230,6 +230,8 @@ blockif_proc(struct blockif_ctxt *bc, st case BOP_DELETE: if (!bc->bc_candelete) err = EOPNOTSUPP; + else if (bc->bc_rdonly) + err = EROFS; else if (bc->bc_ischr) { arg[0] = br->br_offset; arg[1] = br->br_iov[0].iov_len; Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Sun Mar 15 00:39:18 2015 (r280016) +++ head/usr.sbin/bhyve/pci_ahci.c Sun Mar 15 08:09:56 2015 (r280017) @@ -840,10 +840,11 @@ handle_identify(struct ahci_port *p, int } else { uint16_t buf[256]; uint64_t sectors; - int sectsz, psectsz, psectoff, candelete; + int sectsz, psectsz, psectoff, candelete, ro; uint16_t cyl; uint8_t sech, heads; + ro = blockif_is_ro(p->bctx); candelete = blockif_candelete(p->bctx); sectsz = blockif_sectsz(p->bctx); sectors = blockif_size(p->bctx) / sectsz; @@ -906,7 +907,7 @@ handle_identify(struct ahci_port *p, int buf[101] = (sectors >> 16); buf[102] = (sectors >> 32); buf[103] = (sectors >> 48); - if (candelete) { + if (candelete && !ro) { buf[69] |= ATA_SUPPORT_RZAT | ATA_SUPPORT_DRAT; buf[105] = 1; buf[169] = ATA_SUPPORT_DSM_TRIM; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 11:35: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 01C93E3D; Sun, 15 Mar 2015 11:35:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEECD365; Sun, 15 Mar 2015 11:35: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 t2FBZjUS098507; Sun, 15 Mar 2015 11:35:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FBZetV098471; Sun, 15 Mar 2015 11:35:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201503151135.t2FBZetV098471@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 15 Mar 2015 11:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280025 - head/contrib/mdocml X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 11:35:46 -0000 Author: bapt Date: Sun Mar 15 11:35:39 2015 New Revision: 280025 URL: https://svnweb.freebsd.org/changeset/base/280025 Log: Import mdocml 1.13.3 Deleted: head/contrib/mdocml/Makefile.local Modified: head/contrib/mdocml/INSTALL head/contrib/mdocml/Makefile head/contrib/mdocml/NEWS head/contrib/mdocml/TODO head/contrib/mdocml/config.h head/contrib/mdocml/configure head/contrib/mdocml/eqn.7 head/contrib/mdocml/eqn.c head/contrib/mdocml/main.c head/contrib/mdocml/man_html.c head/contrib/mdocml/man_term.c head/contrib/mdocml/mandocdb.c head/contrib/mdocml/mansearch.c head/contrib/mdocml/mdoc_html.c head/contrib/mdocml/mdoc_term.c head/contrib/mdocml/preconv.c head/contrib/mdocml/read.c head/contrib/mdocml/tbl_term.c head/contrib/mdocml/term.c Directory Properties: head/contrib/mdocml/ (props changed) Modified: head/contrib/mdocml/INSTALL ============================================================================== --- head/contrib/mdocml/INSTALL Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/INSTALL Sun Mar 15 11:35:39 2015 (r280025) @@ -1,18 +1,13 @@ -$Id: INSTALL,v 1.9 2014/12/11 07:44:46 schwarze Exp $ +$Id: INSTALL,v 1.10 2015/03/09 21:00:14 schwarze Exp $ About mdocml, the portable mandoc distribution ---------------------------------------------- The mandoc manpage compiler toolset is a suite of tools compiling mdoc(7), the roff(7) macro language of choice for BSD manual pages, and man(7), the predominant historical language for UNIX manuals. -Since the present version 1.13.2, it includes a man(1) manual viewer -in addition to the apropos(1) manual page search tool. +It includes a man(1) manual viewer and additional tools. For general information, see . -In this document, we describe the installation and deployment of -mandoc(1), first as a simple, standalone formatter, and then as part of -the man(1) system. - In case you have questions or want to provide feedback, read . Consider subscribing to the discuss@ mailing list mentioned on that page. If you intend to @@ -21,7 +16,7 @@ tech@ mailing list, too. Enjoy using the mandoc toolset! -Ingo Schwarze, Karlsruhe, December 2014 +Ingo Schwarze, Karlsruhe, March 2015 Installation @@ -32,10 +27,6 @@ or available via a binary package or a p latest bundled and ported versions of mandoc for various operating systems is maintained at . -If mandoc is installed, you can check the version by running "mandoc -V". -You can find the version contained in this distribution tarball -by running "./configure". - Regarding how packages and ports are maintained for your operating system, please consult your operating system documentation. To install mandoc manually, the following steps are needed: @@ -66,17 +57,34 @@ package using some kind of fake root mec command like "make DESTDIR=... install". Read the *-install targets in the "Makefile" to understand how DESTDIR is used. -6. To set up a man.cgi(8) server, read its manual page. - -7. To use mandoc(1) as your man(1) formatter, read the "Deployment" -sections below. +6. If you want to use the integrated man(1) and your system uses +manpath(1), make sure it is configured correctly, in particular, +it returns all directory trees where manual pages are installed. +Otherwise, if your system uses man.conf(5), make sure it contains +a "_whatdb" line for each directory tree, and the order of these +lines meets your wishes. + +7. If you compiled with database support, run the command "sudo +makewhatis" to build mandoc.db(5) databases in all the directory +trees configured in step 6. Whenever installing new manual pages, +re-run makewhatis(8) to update the databases, or apropos(1) will +not find the new pages. + +8. To set up a man.cgi(8) server, read its manual page. + +Note that some man(7) pages may contain low-level roff(7) markup +that mandoc does not yet understand. On some BSD systems using +mandoc, third-party software is vetted on whether it may be formatted +with mandoc. If not, groff(1) is pulled in as a dependency and +used to install a pre-formatted "catpage" instead of directly as +manual page source. Understanding mandoc dependencies --------------------------------- -The mandoc(1) and demandoc(1) utilities have no external dependencies. -However, makewhatis(8), apropos(1), and man(1) depend on the following -software: +The mandoc(1), man(1), and demandoc(1) utilities have no external +dependencies, but makewhatis(8) and apropos(1) depend on the +following software: 1. The SQLite database system, see . The recommended version of SQLite is 3.8.4.3 or newer. The mandoc @@ -142,76 +150,3 @@ for unexpected failures. Those are most or libraries are installed in unusual places or interfaces defined in unusual headers. You can also look at the file "config.h" and check that no "#define HAVE_*" differ from your expectations. - - -Deployment using the integrated man(1) viewer ---------------------------------------------- -This mode of deployment requires database support. In case of -doubt, look at the section "user settings related to database -support" in the file configure.local.example. - -Deployment requires the following steps: - -1. Build and install mandoc as described above in steps 2 to 5 -below "Installation". - -2. If your system uses manpath(1), make sure it is configured -correctly, in particular, it returns all directory trees where -manual pages are installed. If your system uses man.conf(5), make -sure it contains a "_whatdb" line for each directory tree, and the -order of these lines meets your wishes. - -3. Run the command "sudo makewhatis" to build mandoc.db(5) databases -in all the directory trees configured in step 2. - -At this point, your new man(1), apropos(1), and whatis(1) should work. -Otherwise, please look at , both -for help and to have these instructions improved. - -Whenever installing new manual pages, re-run makewhatis(8) to update -the databases, or man(1) will not find the new pages. - - -Deployment using your system's native man(1) viewer ---------------------------------------------------- -This mode of deployment does not require database support, -so it works even if you don't have SQLite3. - -Usually, you can have your default installation and mandoc(1) work right -alongside each other by using user-specific versions of the files -mentioned below. - -0. Back up each file you want to change! - -1. First see whether your system has "/etc/man.conf" or "/etc/manpath.conf" -(if it has neither, but man(1) is functional, then let us know) or, -if running as your own user, a per-user override file. In either -case, find where man(1) is executing nroff(1) or groff(1) to format -manuals. Replace these calls with mandoc(1). - -2. Then make sure that man(1) isn't running preprocessors, so you may -need to replace tbl(1), eqn(1), and similar references with cat(1). -Some man(1) implementations, like that on Mac OSX, let you run "man -d" -to see how the formatter is invoked. Use this to test your changes. On -Mac OS X, for instance, man(1) will prepend all files with ".ll" and -".nr" to set the terminal size, so you need to pass "tail -n+2 | -mandoc(1)" to disregard them. - -3. Finally, make sure that mandoc(1) is actually being invoked instead -of cached pages being pulled up. You can usually do this by commenting -out NOCACHE or similar. - - -mandoc(1) still has a long way to go in understanding non-trivial -low-level roff(7) markup embedded in some man(7) pages. On the BSD -systems using mandoc(1), third-party software is generally vetted -on whether it may be formatted with mandoc(1). If not, groff(1) -is pulled in as a dependency and used to install a pre-formatted -"catpage" instead of directly as manual page source. - -For more background on switching operating systems to use mandoc(1) -instead of groff(1) to format manuals, see the BSDCan and EuroBSDCon -presentations by Ingo Schwarze: - - - Modified: head/contrib/mdocml/Makefile ============================================================================== --- head/contrib/mdocml/Makefile Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/Makefile Sun Mar 15 11:35:39 2015 (r280025) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.456 2015/02/16 16:23:54 schwarze Exp $ +# $Id: Makefile,v 1.457 2015/03/13 12:35:32 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons -# Copyright (c) 2011, 2013, 2014 Ingo Schwarze +# Copyright (c) 2011, 2013, 2014, 2015 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -15,7 +15,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -VERSION = 1.13.2 +VERSION = 1.13.3 # === LIST OF FILES ==================================================== Modified: head/contrib/mdocml/NEWS ============================================================================== --- head/contrib/mdocml/NEWS Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/NEWS Sun Mar 15 11:35:39 2015 (r280025) @@ -1,7 +1,122 @@ -$Id: NEWS,v 1.8 2014/12/13 13:43:47 schwarze Exp $ +$Id: NEWS,v 1.9 2015/03/13 12:35:32 schwarze Exp $ This file lists the most important changes in the mdocml.bsd.lv distribution. +Changes in version 1.13.3, released on March 13, 2015 + + --- MAJOR NEW FEATURES --- + * When a manual is missing from an outdated database, let man(1) + show it anyway, using a KISS file system lookup as a fallback. + * Use this to always provide man(1), even without database support. + * Fatal errors no longer exist. If a file can be opened, mandoc + will produce some output; at worst, the output may be almost empty. + * New -Wunsupp message level. + --- POTENTIONALLY SECURITY RELEVANT BUGFIXES --- + * Fix a potential write buffer overrun on incomplete string conditionals. + http://mdocml.bsd.lv/cgi-bin/cvsweb/roff.c#rev1.241 + * Fix a potential write buffer overrun on backslash at EOF in a conditional. + http://mdocml.bsd.lv/cgi-bin/cvsweb/roff.c#rev1.247 + * Fix a use after free sometimes hit when validation deletes a block. + http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_macro.c#rev1.180 + --- MAJOR FUNCTIONALLY RELEVANT BUGFIXES --- + * Let man(1) show manuals for the current architecture by default, + and support the MACHINE environment variable. + * Fix the man(1) and apropos(1) -m option, it didn't work at all. + * Do not spawn a pager when there is no output. + * In makewhatis(8), fix detection of hardlinked manuals on platforms + having padding in struct inodev (typically 64bit platforms). + --- PORTABILITY IMPROVEMENTS --- + * Ignore O_CLOEXEC when the operating system doesn't provide it. + * Avoid forward reference to enum type which violates ISO C99. + * Support homebrew-style linking on Mac OS X. + --- MINOR NEW FEATURES --- + * lookup: Accept digit+letter and "n" as section names in man(1), + and consistently handle digit+letter in file name extensions. + * lookup: Speed up -s/-S by using the "mlinks" rather than the "keys" table. + * output: Insert horizontal lines between formatted manual pages. + * input: New stricter and more resilient UTF-8 parser. + * mdoc(7): Refactor block rewinding for simpler and more robust parsing. + * man(7): Use the -Ios option when .TH has less than four arguments. + * tbl(7): Implement the "center" option. + * tbl(7): New option and format parsers, improved in many respects. + * roff(7): Basic implementation of the \o escape sequence (overstrike), + and improved rendering of overstrikes in PostScript and PDF output. + * Message improvements, in particular for, but not restricted to, + eqn(7), tbl(7), and wrong numbers of arguments in mdoc(7) and man(7), + in various cases also improving output generated by invalid input. + * Delete the -V option. It serves no purpose but keeps confusing people. + * gmdiff: Minimal support for Heirloom roff. + --- RELIABILITY BUGFIXES --- + * tbl(7): Fix a read buffer overrun on 'f' at EOL in a layout. + * roff(7): Fix a read buffer overrun on incomplete numerical conditions. + * mdoc(7): Fix a NULL pointer access on .Nd followed by an explicit block. + * mdoc(7): Fix a NULL pointer access on .It Xo without .Xc. + * mdoc(7): Fix a NULL pointer access on .Eo without a tail. + * mdoc(7): Fix a NULL pointer access in the validation of empty .St macros. + * man(7)/tbl(7): Fix a NULL pointer access on .TS right after .TP. + * tbl(7): Fix a NULL pointer access on layout lines without any cells. + * eqn(7): Fix NULL pointer accesses in the terminal formatter. + * roff(7): Fix a NULL pointer access on trailing \s-/\s+ without an argument. + * gz: Fix a potential NULL pointer access after waitpid() failure. + * roff(7): Don't let the modulo operator divide by zero. + * input: Fix an assertion failure on certain invalid UTF-8 input. + * terminal output: Allow arbitrary depth of the font stack (assertion fix). + * mdoc(7): Fix assertion failures and endless loops on invalid block closing. + * mdoc(7): Fix an assertion failure on .Bl .Sm not followed by .It. + * mdoc(7): Fix an assertion failure on .Bl -column ... .El .Ta. + * tbl(7): Fix assertion failures by macros inside table data, + but do not throw away the macro arguments. + * Prevent certain kinds of unreasonable input from producing excessive + output, in one case caused by unsigned integer underflow. + * Fix a potential memory leak in makewhatis(8) on very long filenames. + --- MINOR BUGFIXES --- + * mdoc(7): Fix parsing of badly nested blocks with multiple identical blocks. + * mdoc(7): Support negative indentations for displays and lists. + * mdoc(7): Don't mistreat negative .sp arguments as large positive ones. + * mdoc(7): Some spacing fixes for .Eo/.Ec. + * man(7): Support negative horizontal widths. + * man(7): Do not print out invalid .IP arguments. + * man(7): Correctly handle scaling units after .PD. + * man(7): Support .RE with an argument. + * man(7): Fix restoring indentation after .RS with large negative arguments. + * tbl(7): Prevent tables from breaking the filling of preceding text. + * tbl(7): Fix vertical spacing at the beginning of tables. + * tbl(7): Parser and formatter fixes for line drawing and font modifiers. + * tbl(7): Correct handling of blank data lines. + * eqn(7): Add sometimes missing whitespace before equation output. + * roff(7): Fix vertical scaling, most of it was wrong. + * roff(7): Slightly improve \w width measurements. + * roff(7): Accept the historic aliases \s10 to \s39 for \s(10 to \s(39. + * roff(7): Correctly escape quotes when expanding macro arguments. + * roff(7): Correctly handle scaling units in numerical expressions, + and some other improvements to the parsing of numerical expressions. + * roff(7): Three minor fixes with respect to evaluation of conditionals. + * roff(7): Let .it accept numerical expressions, not just constants. + * mandoc_char(7): Correct some character names and renderings. + * If earlier files set a non-zero exit status, never reset it to zero. + --- THANKS TO --- + * Jonathan Gray (OpenBSD) for yet more testing with afl (the American + Fuzzy Lop security fuzzer), again resulting in many bug reports. + * Theo de Raadt (OpenBSD) for suggesting the main new feature (man(1) file + system lookup) and for reporting an important bug (pager without output). + * Theo Buehler for an important bug report (-s/-S slowness) + and for proposing a nice new feature (lines between pages). + * Jason McIntyre for an important bug report (hardlink detection) + and multiple documentation patches. + * Pascal Stumpf (OpenBSD) and Alessandro de Laurenzis for + important bug reports (architecture and man -m, respectively). + * Thomas Klausner (NetBSD) for proposing a new feature (man(7) -Ios), + a bug report, and release testing. + * Anthony Bentley, Daniel Dickman, Ted Unangst (OpenBSD) and + Kristaps Dzonsons (bsd.lv) for source code patches and bug reports. + * Christian Weisgerber (OpenBSD) for more than half a dozen bug reports. + * Carsten Kunze (Heirloom troff) for bug reports and release testing. + * Antoine Jacoutot (OpenBSD) for release testing. + * Alexis Hildebrandt (Homebrew), Baptiste Daroussin (FreeBSD), + Jonathan Perkin (SmartOS), Pedro Giffuni (FreeBSD), Svyatoslav + Mishyn (Crux Linux), Ulrich Spoerlein (FreeBSD), Jan Stary, Patrick + Keshishian, Sebastien Marie, and Steffen Nurpmeso for bug reports. + Changes in version 1.13.2, released on December 13, 2014 --- MAJOR NEW FEATURES --- Modified: head/contrib/mdocml/TODO ============================================================================== --- head/contrib/mdocml/TODO Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/TODO Sun Mar 15 11:35:39 2015 (r280025) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.201 2015/02/20 13:47:28 schwarze Exp $ +* $Id: TODO,v 1.202 2015/03/11 13:11:22 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -557,6 +557,11 @@ Several areas can be cleaned up to make * structural issues ************************************************************************ +- Improve -O suboption parsing. Do it in the main program such that + errors can be reported. Pay attention to distinguishing the + mandoc(1) and apropos(1) styles of both options. + loc ** exist * algo ** size ** imp *** + - Use libz directly instead of forking gunzip(1). Suggested by bapt at FreeBSD among others. Modified: head/contrib/mdocml/config.h ============================================================================== --- head/contrib/mdocml/config.h Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/config.h Sun Mar 15 11:35:39 2015 (r280025) @@ -7,7 +7,6 @@ #include -#define VERSION "1.13.2" #define HAVE_DIRENT_NAMLEN 1 #define HAVE_FGETLN 1 #define HAVE_FTS 1 Modified: head/contrib/mdocml/configure ============================================================================== --- head/contrib/mdocml/configure Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/configure Sun Mar 15 11:35:39 2015 (r280025) @@ -237,9 +237,7 @@ elif [ -z "${DBLIB}" ]; then fi # --- manpath --- -if [ ${BUILD_DB} -eq 0 ]; then - HAVE_MANPATH=0 -elif ismanual manpath "${HAVE_MANPATH}"; then +if ismanual manpath "${HAVE_MANPATH}"; then : elif manpath 1>&3 2>&3; then echo "manpath: yes" 1>&2 Modified: head/contrib/mdocml/eqn.7 ============================================================================== --- head/contrib/mdocml/eqn.7 Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/eqn.7 Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -.\" $Id: eqn.7,v 1.33 2015/01/29 00:33:57 schwarze Exp $ +.\" $Id: eqn.7,v 1.34 2015/03/09 20:17:23 schwarze Exp $ .\" .\" Copyright (c) 2011 Kristaps Dzonsons .\" Copyright (c) 2014 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 29 2015 $ +.Dd $Mdocdate: March 9 2015 $ .Dt EQN 7 .Os .Sh NAME @@ -72,31 +72,31 @@ case-sensitive literals in the input: .Bd -literal -offset indent eqn : box | eqn box box : text - | \*q{\*q eqn \*q}\*q - | \*qdefine\*q text text - | \*qndefine\*q text text - | \*qtdefine\*q text text - | \*qgfont\*q text - | \*qgsize\*q text - | \*qset\*q text text - | \*qundef\*q text - | \*qsqrt\*q box + | \(dq{\(dq eqn \(dq}\(dq + | \(dqdefine\(dq text text + | \(dqndefine\(dq text text + | \(dqtdefine\(dq text text + | \(dqgfont\(dq text + | \(dqgsize\(dq text + | \(dqset\(dq text text + | \(dqundef\(dq text + | \(dqsqrt\(dq box | box pos box | box mark - | \*qmatrix\*q \*q{\*q [col \*q{\*q list \*q}\*q ]* - | pile \*q{\*q list \*q}\*q + | \(dqmatrix\(dq \(dq{\(dq [col \(dq{\(dq list \(dq}\(dq ]* + | pile \(dq{\(dq list \(dq}\(dq | font box - | \*qsize\*q text box - | \*qleft\*q text eqn [\*qright\*q text] -col : \*qlcol\*q | \*qrcol\*q | \*qccol\*q | \*qcol\*q -text : [^space\e\*q]+ | \e\*q.*\e\*q -pile : \*qlpile\*q | \*qcpile\*q | \*qrpile\*q | \*qpile\*q -pos : \*qover\*q | \*qsup\*q | \*qsub\*q | \*qto\*q | \*qfrom\*q -mark : \*qdot\*q | \*qdotdot\*q | \*qhat\*q | \*qtilde\*q | \*qvec\*q - | \*qdyad\*q | \*qbar\*q | \*qunder\*q -font : \*qroman\*q | \*qitalic\*q | \*qbold\*q | \*qfat\*q + | \(dqsize\(dq text box + | \(dqleft\(dq text eqn [\(dqright\(dq text] +col : \(dqlcol\(dq | \(dqrcol\(dq | \(dqccol\(dq | \(dqcol\(dq +text : [^space\e\(dq]+ | \e\(dq.*\e\(dq +pile : \(dqlpile\(dq | \(dqcpile\(dq | \(dqrpile\(dq | \(dqpile\(dq +pos : \(dqover\(dq | \(dqsup\(dq | \(dqsub\(dq | \(dqto\(dq | \(dqfrom\(dq +mark : \(dqdot\(dq | \(dqdotdot\(dq | \(dqhat\(dq | \(dqtilde\(dq | \(dqvec\(dq + | \(dqdyad\(dq | \(dqbar\(dq | \(dqunder\(dq +font : \(dqroman\(dq | \(dqitalic\(dq | \(dqbold\(dq | \(dqfat\(dq list : eqn - | list \*qabove\*q eqn + | list \(dqabove\(dq eqn space : [\e^~ \et] .Ed .Pp @@ -434,7 +434,7 @@ implementation (including GNU troff). .Bl -dash -compact .It The text string -.Sq \e\*q +.Sq \e\(dq is interpreted as a literal quote in troff. In mandoc, this is interpreted as a comment. .It Modified: head/contrib/mdocml/eqn.c ============================================================================== --- head/contrib/mdocml/eqn.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/eqn.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: eqn.c,v 1.57 2015/01/28 21:11:53 schwarze Exp $ */ +/* $Id: eqn.c,v 1.58 2015/03/04 12:19:49 schwarze Exp $ */ /* * Copyright (c) 2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -194,6 +194,7 @@ enum eqn_symt { EQNSYM_equiv, EQNSYM_lessequal, EQNSYM_moreequal, + EQNSYM_minus, EQNSYM__MAX }; @@ -249,7 +250,7 @@ static const struct eqnsym eqnsyms[EQNSY { "cdot", "pc" }, /* EQNSYM_cdot */ { "nothing", "&" }, /* EQNSYM_nothing */ { "approx", "~~" }, /* EQNSYM_approx */ - { "prime", "aq" }, /* EQNSYM_prime */ + { "prime", "fm" }, /* EQNSYM_prime */ { "half", "12" }, /* EQNSYM_half */ { "partial", "pd" }, /* EQNSYM_partial */ { "inf", "if" }, /* EQNSYM_inf */ @@ -262,6 +263,7 @@ static const struct eqnsym eqnsyms[EQNSY { "==", "==" }, /* EQNSYM_equiv */ { "<=", "<=" }, /* EQNSYM_lessequal */ { ">=", ">=" }, /* EQNSYM_moreequal */ + { "-", "mi" }, /* EQNSYM_minus */ }; static struct eqn_box *eqn_box_alloc(struct eqn_node *, struct eqn_box *); Modified: head/contrib/mdocml/main.c ============================================================================== --- head/contrib/mdocml/main.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/main.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.222 2015/02/27 16:02:10 schwarze Exp $ */ +/* $Id: main.c,v 1.225 2015/03/10 13:50:03 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze @@ -20,6 +20,7 @@ #include #include /* MACHINE */ +#include #include #include @@ -101,7 +102,7 @@ static void mmsg(enum mandocerr, enum static void parse(struct curparse *, int, const char *, enum mandoclevel *); static enum mandoclevel passthrough(const char *, int, int); -static void spawn_pager(void); +static pid_t spawn_pager(void); static int toptions(struct curparse *, char *); static void usage(enum argmode) __attribute__((noreturn)); static int woptions(struct curparse *, char *); @@ -130,9 +131,9 @@ main(int argc, char *argv[]) enum outmode outmode; int fd; int show_usage; - int use_pager; int options; int c; + pid_t pager_pid; /* 0: don't use; 1: not yet spawned. */ if (argc < 1) progname = "mandoc"; @@ -174,7 +175,7 @@ main(int argc, char *argv[]) options = MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1; defos = NULL; - use_pager = 1; + pager_pid = 1; show_usage = 0; synopsis_only = 0; outmode = OUTMODE_DEF; @@ -189,7 +190,7 @@ main(int argc, char *argv[]) conf_file = optarg; break; case 'c': - use_pager = 0; + pager_pid = 0; break; case 'f': search.argmode = ARG_WORD; @@ -197,7 +198,7 @@ main(int argc, char *argv[]) case 'h': (void)strlcat(curp.outopts, "synopsis,", BUFSIZ); synopsis_only = 1; - use_pager = 0; + pager_pid = 0; outmode = OUTMODE_ALL; break; case 'I': @@ -272,7 +273,7 @@ main(int argc, char *argv[]) switch (search.argmode) { case ARG_FILE: outmode = OUTMODE_ALL; - use_pager = 0; + pager_pid = 0; break; case ARG_NAME: outmode = OUTMODE_ONE; @@ -303,18 +304,20 @@ main(int argc, char *argv[]) argc = 1; } } else if (argc > 1 && - ((uc = argv[0]) != NULL) && + ((uc = (unsigned char *)argv[0]) != NULL) && ((isdigit(uc[0]) && (uc[1] == '\0' || (isalpha(uc[1]) && uc[2] == '\0'))) || (uc[0] == 'n' && uc[1] == '\0'))) { - search.sec = uc; + search.sec = (char *)uc; argv++; argc--; } if (search.arch == NULL) search.arch = getenv("MACHINE"); +#ifdef MACHINE if (search.arch == NULL) search.arch = MACHINE; +#endif } rc = MANDOCLEVEL_OK; @@ -415,8 +418,8 @@ main(int argc, char *argv[]) mparse_keep(curp.mp); if (argc < 1) { - if (use_pager && isatty(STDOUT_FILENO)) - spawn_pager(); + if (pager_pid == 1 && isatty(STDOUT_FILENO)) + pager_pid = spawn_pager(); parse(&curp, STDIN_FILENO, "", &rc); } @@ -427,9 +430,8 @@ main(int argc, char *argv[]) rc = rctmp; if (fd != -1) { - if (use_pager && isatty(STDOUT_FILENO)) - spawn_pager(); - use_pager = 0; + if (pager_pid == 1 && isatty(STDOUT_FILENO)) + pager_pid = spawn_pager(); if (resp == NULL) parse(&curp, fd, *argv, &rc); @@ -479,6 +481,17 @@ out: free(defos); + /* + * If a pager is attached, flush the pipe leading to it + * and signal end of file such that the user can browse + * to the end. Then wait for the user to close the pager. + */ + + if (pager_pid != 0 && pager_pid != 1) { + fclose(stdout); + waitpid(pager_pid, NULL, 0); + } + return((int)rc); } @@ -927,7 +940,7 @@ mmsg(enum mandocerr t, enum mandoclevel fputc('\n', stderr); } -static void +static pid_t spawn_pager(void) { #define MAX_PAGER_ARGS 16 @@ -936,31 +949,33 @@ spawn_pager(void) char *cp; int fildes[2]; int argc; + pid_t pager_pid; if (pipe(fildes) == -1) { fprintf(stderr, "%s: pipe: %s\n", progname, strerror(errno)); - return; + return(0); } - switch (fork()) { + switch (pager_pid = fork()) { case -1: fprintf(stderr, "%s: fork: %s\n", progname, strerror(errno)); exit((int)MANDOCLEVEL_SYSERR); case 0: + break; + default: close(fildes[0]); if (dup2(fildes[1], STDOUT_FILENO) == -1) { fprintf(stderr, "%s: dup output: %s\n", progname, strerror(errno)); exit((int)MANDOCLEVEL_SYSERR); } - return; - default: - break; + close(fildes[1]); + return(pager_pid); } - /* The original process becomes the pager. */ + /* The child process becomes the pager. */ close(fildes[1]); if (dup2(fildes[0], STDIN_FILENO) == -1) { @@ -968,6 +983,7 @@ spawn_pager(void) progname, strerror(errno)); exit((int)MANDOCLEVEL_SYSERR); } + close(fildes[0]); pager = getenv("MANPAGER"); if (pager == NULL || *pager == '\0') Modified: head/contrib/mdocml/man_html.c ============================================================================== --- head/contrib/mdocml/man_html.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/man_html.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.111 2015/02/10 08:05:30 schwarze Exp $ */ +/* $Id: man_html.c,v 1.112 2015/03/03 21:11:34 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015 Ingo Schwarze @@ -223,6 +223,8 @@ print_man_node(MAN_ARGS) print_text(h, n->string); return; case MAN_EQN: + if (n->flags & MAN_LINE) + putchar('\n'); print_eqn(h, n->eqn); break; case MAN_TBL: Modified: head/contrib/mdocml/man_term.c ============================================================================== --- head/contrib/mdocml/man_term.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/man_term.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.168 2015/01/30 22:04:44 schwarze Exp $ */ +/* $Id: man_term.c,v 1.169 2015/03/06 15:48:52 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -945,12 +945,8 @@ print_man_node(DECL_ARGS) p->flags |= TERMP_NOSPACE; return; case MAN_TBL: - /* - * Tables are preceded by a newline. Then process a - * table line, which will cause line termination, - */ - if (n->span->prev == NULL) - term_newln(p); + if (p->tbl.cols == NULL) + term_vspace(p); term_tbl(p, n->span); return; default: Modified: head/contrib/mdocml/mandocdb.c ============================================================================== --- head/contrib/mdocml/mandocdb.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/mandocdb.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.185 2015/02/27 16:22:09 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.186 2015/03/13 00:19:41 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2015 Ingo Schwarze @@ -942,6 +942,7 @@ mlink_add(struct mlink *mlink, const str assert(NULL == ohash_find(&mlinks, slot)); ohash_insert(&mlinks, slot, mlink); + memset(&inodev, 0, sizeof(inodev)); /* Clear padding. */ inodev.st_ino = st->st_ino; inodev.st_dev = st->st_dev; slot = ohash_lookup_memory(&mpages, (char *)&inodev, Modified: head/contrib/mdocml/mansearch.c ============================================================================== --- head/contrib/mdocml/mansearch.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/mansearch.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: mansearch.c,v 1.54 2015/02/27 16:02:10 schwarze Exp $ */ +/* $Id: mansearch.c,v 1.55 2015/03/11 13:11:22 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015 Ingo Schwarze @@ -195,8 +195,8 @@ mansearch(const struct mansearch *search if (NULL == (e = exprcomp(search, argc, argv))) goto out; - outbit = 0; if (NULL != search->outkey) { + outbit = TYPE_Nd; for (indexbit = 0, iterbit = 1; indexbit < mansearch_keymax; indexbit++, iterbit <<= 1) { @@ -206,7 +206,8 @@ mansearch(const struct mansearch *search break; } } - } + } else + outbit = 0; /* * Save a descriptor to the current working directory. Modified: head/contrib/mdocml/mdoc_html.c ============================================================================== --- head/contrib/mdocml/mdoc_html.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/mdoc_html.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.225 2015/02/12 12:24:33 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.226 2015/03/03 21:11:34 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -411,6 +411,8 @@ print_mdoc_node(MDOC_ARGS) h->flags |= HTML_NOSPACE; return; case MDOC_EQN: + if (n->flags & MDOC_LINE) + putchar('\n'); print_eqn(h, n->eqn); break; case MDOC_TBL: Modified: head/contrib/mdocml/mdoc_term.c ============================================================================== --- head/contrib/mdocml/mdoc_term.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/mdoc_term.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.311 2015/02/17 20:37:17 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.313 2015/03/06 15:48:52 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012-2015 Ingo Schwarze @@ -348,6 +348,8 @@ print_mdoc_node(DECL_ARGS) p->flags |= TERMP_NOSPACE; break; case MDOC_TBL: + if (p->tbl.cols == NULL) + term_newln(p); term_tbl(p, n->span); break; default: @@ -1808,7 +1810,7 @@ static int termp_sp_pre(DECL_ARGS) { struct roffsu su; - size_t i, len; + int i, len; switch (n->tok) { case MDOC_sp: @@ -1829,8 +1831,11 @@ termp_sp_pre(DECL_ARGS) if (0 == len) term_newln(p); - for (i = 0; i < len; i++) - term_vspace(p); + else if (len < 0) + p->skipvsp -= len; + else + for (i = 0; i < len; i++) + term_vspace(p); return(0); } Modified: head/contrib/mdocml/preconv.c ============================================================================== --- head/contrib/mdocml/preconv.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/preconv.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: preconv.c,v 1.13 2014/12/19 04:58:35 schwarze Exp $ */ +/* $Id: preconv.c,v 1.14 2015/03/06 09:24:59 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -33,7 +33,7 @@ preconv_encode(struct buf *ib, size_t *i int nby; unsigned int accum; - cu = ib->buf + *ii; + cu = (unsigned char *)ib->buf + *ii; assert(*cu & 0x80); if ( ! (*filenc & MPARSE_UTF8)) Modified: head/contrib/mdocml/read.c ============================================================================== --- head/contrib/mdocml/read.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/read.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.129 2015/03/02 14:50:17 schwarze Exp $ */ +/* $Id: read.c,v 1.131 2015/03/11 13:05:20 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -636,7 +636,7 @@ read_whole_file(struct mparse *curp, con */ if (S_ISREG(st.st_mode)) { - if (st.st_size >= (1U << 31)) { + if (st.st_size > 0x7fffffff) { mandoc_msg(MANDOCERR_TOOLARGE, curp, 0, 0, NULL); return(0); } Modified: head/contrib/mdocml/tbl_term.c ============================================================================== --- head/contrib/mdocml/tbl_term.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/tbl_term.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: tbl_term.c,v 1.38 2015/01/31 00:12:41 schwarze Exp $ */ +/* $Id: tbl_term.c,v 1.40 2015/03/06 15:48:53 schwarze Exp $ */ /* * Copyright (c) 2009, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2014, 2015 Ingo Schwarze @@ -82,8 +82,6 @@ term_tbl(struct termp *tp, const struct */ if (tp->tbl.cols == NULL) { - term_flushln(tp); - tp->tbl.len = term_tbl_len; tp->tbl.slen = term_tbl_strlen; tp->tbl.arg = tp; Modified: head/contrib/mdocml/term.c ============================================================================== --- head/contrib/mdocml/term.c Sun Mar 15 11:29:33 2015 (r280024) +++ head/contrib/mdocml/term.c Sun Mar 15 11:35:39 2015 (r280025) @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.244 2015/01/31 00:12:41 schwarze Exp $ */ +/* $Id: term.c,v 1.245 2015/03/06 13:02:43 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -413,6 +413,7 @@ term_word(struct termp *p, const char *w p->flags |= TERMP_NOSPACE; p->flags &= ~(TERMP_SENTENCE | TERMP_NONEWLINE); + p->skipvsp = 0; while ('\0' != *word) { if ('\\' != *word) { From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 11:37: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 516EC6D; Sun, 15 Mar 2015 11:37: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 3C1D8385; Sun, 15 Mar 2015 11:37: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 t2FBb9CT098760; Sun, 15 Mar 2015 11:37:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FBb7Hw098755; Sun, 15 Mar 2015 11:37:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503151137.t2FBb7Hw098755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Mar 2015 11:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280026 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 11:37:09 -0000 Author: mav Date: Sun Mar 15 11:37:07 2015 New Revision: 280026 URL: https://svnweb.freebsd.org/changeset/base/280026 Log: Modify virtqueue helpers added in r253440 to allow queuing. Original virtqueue design allows queued and out-of-order processing, but helpers added in r253440 suppose only direct blocking in-order one. It could be fine for network, etc., but it is a huge limitation for storage devices. Modified: head/usr.sbin/bhyve/pci_virtio_block.c head/usr.sbin/bhyve/pci_virtio_net.c head/usr.sbin/bhyve/pci_virtio_rnd.c head/usr.sbin/bhyve/virtio.c head/usr.sbin/bhyve/virtio.h Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Sun Mar 15 11:35:39 2015 (r280025) +++ head/usr.sbin/bhyve/pci_virtio_block.c Sun Mar 15 11:37:07 2015 (r280026) @@ -170,9 +170,9 @@ pci_vtblk_proc(struct pci_vtblk_softc *s int writeop, type; off_t offset; struct iovec iov[VTBLK_MAXSEGS + 2]; - uint16_t flags[VTBLK_MAXSEGS + 2]; + uint16_t idx, flags[VTBLK_MAXSEGS + 2]; - n = vq_getchain(vq, iov, VTBLK_MAXSEGS + 2, flags); + n = vq_getchain(vq, &idx, iov, VTBLK_MAXSEGS + 2, flags); /* * The first descriptor will be the read-only fixed header, @@ -258,7 +258,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *s * Return the descriptor back to the host. * We wrote 1 byte (our status) to host. */ - vq_relchain(vq, 1); + vq_relchain(vq, idx, 1); } static void @@ -266,7 +266,6 @@ pci_vtblk_notify(void *vsc, struct vqueu { struct pci_vtblk_softc *sc = vsc; - vq_startchains(vq); while (vq_has_descs(vq)) pci_vtblk_proc(sc, vq); vq_endchains(vq, 1); /* Generate interrupt if appropriate. */ Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Sun Mar 15 11:35:39 2015 (r280025) +++ head/usr.sbin/bhyve/pci_virtio_net.c Sun Mar 15 11:37:07 2015 (r280026) @@ -288,6 +288,7 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc struct vqueue_info *vq; void *vrx; int len, n; + uint16_t idx; /* * Should never be called without a valid tap fd @@ -310,7 +311,6 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc * Check for available rx buffers */ vq = &sc->vsc_queues[VTNET_RXQ]; - vq_startchains(vq); if (!vq_has_descs(vq)) { /* * Drop the packet and try later. Interrupt on @@ -325,7 +325,7 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc /* * Get descriptor chain. */ - n = vq_getchain(vq, iov, VTNET_MAXSEGS, NULL); + n = vq_getchain(vq, &idx, iov, VTNET_MAXSEGS, NULL); assert(n >= 1 && n <= VTNET_MAXSEGS); /* @@ -362,7 +362,7 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc /* * Release this chain and handle more chains. */ - vq_relchain(vq, len + sc->rx_vhdrlen); + vq_relchain(vq, idx, len + sc->rx_vhdrlen); } while (vq_has_descs(vq)); /* Interrupt if needed, including for NOTIFY_ON_EMPTY. */ @@ -401,13 +401,14 @@ pci_vtnet_proctx(struct pci_vtnet_softc struct iovec iov[VTNET_MAXSEGS + 1]; int i, n; int plen, tlen; + uint16_t idx; /* * Obtain chain of descriptors. The first one is * really the header descriptor, so we need to sum * up two lengths: packet length and transfer length. */ - n = vq_getchain(vq, iov, VTNET_MAXSEGS, NULL); + n = vq_getchain(vq, &idx, iov, VTNET_MAXSEGS, NULL); assert(n >= 1 && n <= VTNET_MAXSEGS); plen = 0; tlen = iov[0].iov_len; @@ -420,7 +421,7 @@ pci_vtnet_proctx(struct pci_vtnet_softc pci_vtnet_tap_tx(sc, &iov[1], n - 1, plen); /* chain is processed, release it and set tlen */ - vq_relchain(vq, tlen); + vq_relchain(vq, idx, tlen); } static void @@ -479,7 +480,6 @@ pci_vtnet_tx_thread(void *param) sc->tx_in_progress = 1; pthread_mutex_unlock(&sc->tx_mtx); - vq_startchains(vq); do { /* * Run through entries, placing them into Modified: head/usr.sbin/bhyve/pci_virtio_rnd.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_rnd.c Sun Mar 15 11:35:39 2015 (r280025) +++ head/usr.sbin/bhyve/pci_virtio_rnd.c Sun Mar 15 11:37:07 2015 (r280026) @@ -103,18 +103,17 @@ pci_vtrnd_notify(void *vsc, struct vqueu struct iovec iov; struct pci_vtrnd_softc *sc; int len; + uint16_t idx; sc = vsc; - vq_startchains(vq); - if (sc->vrsc_fd < 0) { vq_endchains(vq, 0); return; } while (vq_has_descs(vq)) { - vq_getchain(vq, &iov, 1, NULL); + vq_getchain(vq, &idx, &iov, 1, NULL); len = read(sc->vrsc_fd, iov.iov_base, iov.iov_len); @@ -126,7 +125,7 @@ pci_vtrnd_notify(void *vsc, struct vqueu /* * Release this chain and handle more */ - vq_relchain(vq, len); + vq_relchain(vq, idx, len); } vq_endchains(vq, 1); /* Generate interrupt if appropriate. */ } Modified: head/usr.sbin/bhyve/virtio.c ============================================================================== --- head/usr.sbin/bhyve/virtio.c Sun Mar 15 11:35:39 2015 (r280025) +++ head/usr.sbin/bhyve/virtio.c Sun Mar 15 11:37:07 2015 (r280026) @@ -97,6 +97,7 @@ vi_reset_dev(struct virtio_softc *vs) for (vq = vs->vs_queues, i = 0; i < nvq; vq++, i++) { vq->vq_flags = 0; vq->vq_last_avail = 0; + vq->vq_save_used = 0; vq->vq_pfn = 0; vq->vq_msix_idx = VIRTIO_MSI_NO_VECTOR; } @@ -188,6 +189,7 @@ vi_vq_init(struct virtio_softc *vs, uint /* Mark queue as allocated, and start at 0 when we use it. */ vq->vq_flags = VQ_ALLOC; vq->vq_last_avail = 0; + vq->vq_save_used = 0; } /* @@ -247,12 +249,12 @@ _vq_record(int i, volatile struct virtio * that vq_has_descs() does one). */ int -vq_getchain(struct vqueue_info *vq, +vq_getchain(struct vqueue_info *vq, uint16_t *pidx, struct iovec *iov, int n_iov, uint16_t *flags) { int i; u_int ndesc, n_indir; - u_int idx, head, next; + u_int idx, next; volatile struct virtio_desc *vdir, *vindir, *vp; struct vmctx *ctx; struct virtio_softc *vs; @@ -295,8 +297,8 @@ vq_getchain(struct vqueue_info *vq, * index, but we just abort if the count gets excessive. */ ctx = vs->vs_pi->pi_vmctx; - head = vq->vq_avail->va_ring[idx & (vq->vq_qsize - 1)]; - next = head; + *pidx = next = vq->vq_avail->va_ring[idx & (vq->vq_qsize - 1)]; + vq->vq_last_avail++; for (i = 0; i < VQ_MAX_DESCRIPTORS; next = vdir->vd_next) { if (next >= vq->vq_qsize) { fprintf(stderr, @@ -377,9 +379,9 @@ loopy: * and used its positive return value.) */ void -vq_relchain(struct vqueue_info *vq, uint32_t iolen) +vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen) { - uint16_t head, uidx, mask; + uint16_t uidx, mask; volatile struct vring_used *vuh; volatile struct virtio_used *vue; @@ -395,11 +397,10 @@ vq_relchain(struct vqueue_info *vq, uint */ mask = vq->vq_qsize - 1; vuh = vq->vq_used; - head = vq->vq_avail->va_ring[vq->vq_last_avail++ & mask]; uidx = vuh->vu_idx; vue = &vuh->vu_ring[uidx++ & mask]; - vue->vu_idx = head; /* ie, vue->id = head */ + vue->vu_idx = idx; vue->vu_tlen = iolen; vuh->vu_idx = uidx; } @@ -436,8 +437,8 @@ vq_endchains(struct vqueue_info *vq, int * entire avail was processed, we need to interrupt always. */ vs = vq->vq_vs; - new_idx = vq->vq_used->vu_idx; old_idx = vq->vq_save_used; + vq->vq_save_used = new_idx = vq->vq_used->vu_idx; if (used_all_avail && (vs->vs_negotiated_caps & VIRTIO_F_NOTIFY_ON_EMPTY)) intr = 1; Modified: head/usr.sbin/bhyve/virtio.h ============================================================================== --- head/usr.sbin/bhyve/virtio.h Sun Mar 15 11:35:39 2015 (r280025) +++ head/usr.sbin/bhyve/virtio.h Sun Mar 15 11:37:07 2015 (r280026) @@ -425,20 +425,6 @@ vq_has_descs(struct vqueue_info *vq) } /* - * Called by virtio driver as it starts processing chains. Each - * completed chain (obtained from vq_getchain()) is released by - * calling vq_relchain(), then when all are done, vq_endchains() - * can tell if / how-many chains were processed and know whether - * and how to generate an interrupt. - */ -static inline void -vq_startchains(struct vqueue_info *vq) -{ - - vq->vq_save_used = vq->vq_used->vu_idx; -} - -/* * Deliver an interrupt to guest on the given virtual queue * (if possible, or a generic MSI interrupt if not using MSI-X). */ @@ -465,9 +451,9 @@ int vi_intr_init(struct virtio_softc *vs void vi_reset_dev(struct virtio_softc *); void vi_set_io_bar(struct virtio_softc *, int); -int vq_getchain(struct vqueue_info *vq, +int vq_getchain(struct vqueue_info *vq, uint16_t *pidx, struct iovec *iov, int n_iov, uint16_t *flags); -void vq_relchain(struct vqueue_info *vq, uint32_t iolen); +void vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen); void vq_endchains(struct vqueue_info *vq, int used_all_avail); uint64_t vi_pci_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 13:31:21 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 C3F503F0; Sun, 15 Mar 2015 13:31:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7BDAED; Sun, 15 Mar 2015 13:31:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FDVL0h056467; Sun, 15 Mar 2015 13:31:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FDVIXC056452; Sun, 15 Mar 2015 13:31:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503151331.t2FDVIXC056452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 15 Mar 2015 13:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280031 - in head: . contrib/compiler-rt/include/sanitizer contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/asan/scripts contrib/compiler-rt/lib/asan/tests contrib/compiler-rt/lib/b... X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 13:31:22 -0000 Author: dim Date: Sun Mar 15 13:31:13 2015 New Revision: 280031 URL: https://svnweb.freebsd.org/changeset/base/280031 Log: Upgrade our copy of clang, llvm and lldb to 3.6.0 release. Please note that from 3.5.0 onwards, clang/llvm/lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm and clang can be found here: Thanks to Ed Maste for the lldb part of this upgrade. Exp-run: antoine Added: head/contrib/compiler-rt/include/sanitizer/coverage_interface.h - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/include/sanitizer/coverage_interface.h head/contrib/compiler-rt/lib/asan/asan_activation_flags.inc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/asan/asan_activation_flags.inc head/contrib/compiler-rt/lib/asan/asan_allocator.cc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/asan/asan_allocator.cc head/contrib/compiler-rt/lib/asan/asan_flags.cc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/asan/asan_flags.cc head/contrib/compiler-rt/lib/asan/asan_flags.inc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/asan/asan_flags.inc head/contrib/compiler-rt/lib/dfsan/dfsan_flags.inc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/dfsan/dfsan_flags.inc head/contrib/compiler-rt/lib/lsan/lsan_flags.inc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/lsan/lsan_flags.inc head/contrib/compiler-rt/lib/msan/msan_flags.inc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/msan/msan_flags.inc head/contrib/compiler-rt/lib/msan/msan_poisoning.cc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/msan/msan_poisoning.cc head/contrib/compiler-rt/lib/msan/msan_poisoning.h - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/msan/msan_poisoning.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.h - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.inc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.inc head/contrib/compiler-rt/lib/ubsan/ubsan_flags.inc - copied unchanged from r280030, projects/clang360-import/contrib/compiler-rt/lib/ubsan/ubsan_flags.inc head/contrib/llvm/include/llvm/Analysis/AssumptionCache.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/Analysis/AssumptionCache.h head/contrib/llvm/include/llvm/Analysis/FunctionTargetTransformInfo.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/Analysis/FunctionTargetTransformInfo.h head/contrib/llvm/include/llvm/CodeGen/DIE.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/CodeGen/DIE.h head/contrib/llvm/include/llvm/CodeGen/ForwardControlFlowIntegrity.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/CodeGen/ForwardControlFlowIntegrity.h head/contrib/llvm/include/llvm/CodeGen/MachineCombinerPattern.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/CodeGen/MachineCombinerPattern.h head/contrib/llvm/include/llvm/CodeGen/PBQPRAConstraint.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/CodeGen/PBQPRAConstraint.h head/contrib/llvm/include/llvm/DebugInfo/DWARFAbbreviationDeclaration.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFAbbreviationDeclaration.h head/contrib/llvm/include/llvm/DebugInfo/DWARFAcceleratorTable.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFAcceleratorTable.h head/contrib/llvm/include/llvm/DebugInfo/DWARFCompileUnit.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFCompileUnit.h head/contrib/llvm/include/llvm/DebugInfo/DWARFContext.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFContext.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugAbbrev.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFDebugAbbrev.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugArangeSet.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFDebugArangeSet.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugAranges.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFDebugAranges.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugFrame.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFDebugFrame.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugInfoEntry.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFDebugInfoEntry.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugLine.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFDebugLine.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugLoc.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFDebugLoc.h head/contrib/llvm/include/llvm/DebugInfo/DWARFDebugRangeList.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFDebugRangeList.h head/contrib/llvm/include/llvm/DebugInfo/DWARFRelocMap.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFRelocMap.h head/contrib/llvm/include/llvm/DebugInfo/DWARFSection.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFSection.h head/contrib/llvm/include/llvm/DebugInfo/DWARFTypeUnit.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFTypeUnit.h head/contrib/llvm/include/llvm/DebugInfo/DWARFUnit.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/DebugInfo/DWARFUnit.h head/contrib/llvm/include/llvm/IR/Metadata.def - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/IR/Metadata.def head/contrib/llvm/include/llvm/IR/MetadataTracking.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/IR/MetadataTracking.h head/contrib/llvm/include/llvm/IR/PassManagerInternal.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/IR/PassManagerInternal.h head/contrib/llvm/include/llvm/IR/Statepoint.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/IR/Statepoint.h head/contrib/llvm/include/llvm/IR/TrackingMDRef.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/IR/TrackingMDRef.h head/contrib/llvm/include/llvm/IR/UseListOrder.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/IR/UseListOrder.h head/contrib/llvm/include/llvm/ProfileData/CoverageMapping.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/ProfileData/CoverageMapping.h head/contrib/llvm/include/llvm/ProfileData/CoverageMappingReader.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/ProfileData/CoverageMappingReader.h head/contrib/llvm/include/llvm/ProfileData/CoverageMappingWriter.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/ProfileData/CoverageMappingWriter.h head/contrib/llvm/include/llvm/ProfileData/SampleProf.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/ProfileData/SampleProf.h head/contrib/llvm/include/llvm/ProfileData/SampleProfReader.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/ProfileData/SampleProfReader.h head/contrib/llvm/include/llvm/ProfileData/SampleProfWriter.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/ProfileData/SampleProfWriter.h head/contrib/llvm/include/llvm/Support/ELFRelocs/ - copied from r280030, projects/clang360-import/contrib/llvm/include/llvm/Support/ELFRelocs/ head/contrib/llvm/include/llvm/Support/Options.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/Support/Options.h head/contrib/llvm/include/llvm/Support/StreamingMemoryObject.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/Support/StreamingMemoryObject.h head/contrib/llvm/include/llvm/Support/UniqueLock.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/Support/UniqueLock.h head/contrib/llvm/include/llvm/Transforms/Utils/SymbolRewriter.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/include/llvm/Transforms/Utils/SymbolRewriter.h head/contrib/llvm/lib/Analysis/AssumptionCache.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Analysis/AssumptionCache.cpp head/contrib/llvm/lib/Analysis/CFLAliasAnalysis.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Analysis/CFLAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/FunctionTargetTransformInfo.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Analysis/FunctionTargetTransformInfo.cpp head/contrib/llvm/lib/Analysis/ScopedNoAliasAA.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Analysis/ScopedNoAliasAA.cpp head/contrib/llvm/lib/Analysis/StratifiedSets.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Analysis/StratifiedSets.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h head/contrib/llvm/lib/CodeGen/AsmPrinter/Win64Exception.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/AsmPrinter/Win64Exception.h head/contrib/llvm/lib/CodeGen/AtomicExpandPass.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/AtomicExpandPass.cpp head/contrib/llvm/lib/CodeGen/ForwardControlFlowIntegrity.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/ForwardControlFlowIntegrity.cpp head/contrib/llvm/lib/CodeGen/MachineCombiner.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/MachineCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h head/contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp head/contrib/llvm/lib/DebugInfo/DWARFAcceleratorTable.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/DebugInfo/DWARFAcceleratorTable.cpp head/contrib/llvm/lib/DebugInfo/SyntaxHighlighting.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/DebugInfo/SyntaxHighlighting.cpp head/contrib/llvm/lib/DebugInfo/SyntaxHighlighting.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/DebugInfo/SyntaxHighlighting.h head/contrib/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/ObjectBuffer.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/ExecutionEngine/MCJIT/ObjectBuffer.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h head/contrib/llvm/lib/IR/MetadataTracking.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/IR/MetadataTracking.cpp head/contrib/llvm/lib/IR/Statepoint.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/IR/Statepoint.cpp head/contrib/llvm/lib/IR/UseListOrder.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/IR/UseListOrder.cpp head/contrib/llvm/lib/MC/MCDisassembler/MCDisassembler.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/MC/MCDisassembler/MCDisassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp head/contrib/llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp head/contrib/llvm/lib/MC/MCWinEH.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/MC/MCWinEH.cpp head/contrib/llvm/lib/ProfileData/CoverageMapping.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/ProfileData/CoverageMapping.cpp head/contrib/llvm/lib/ProfileData/CoverageMappingReader.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/ProfileData/CoverageMappingReader.cpp head/contrib/llvm/lib/ProfileData/CoverageMappingWriter.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/ProfileData/CoverageMappingWriter.cpp head/contrib/llvm/lib/ProfileData/SampleProf.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/ProfileData/SampleProf.cpp head/contrib/llvm/lib/ProfileData/SampleProfReader.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/ProfileData/SampleProfReader.cpp head/contrib/llvm/lib/ProfileData/SampleProfWriter.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/ProfileData/SampleProfWriter.cpp head/contrib/llvm/lib/Support/MathExtras.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Support/MathExtras.cpp head/contrib/llvm/lib/Support/Options.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Support/Options.cpp head/contrib/llvm/lib/Support/StreamingMemoryObject.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Support/StreamingMemoryObject.cpp head/contrib/llvm/lib/Target/AArch64/AArch64A53Fix835769.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64A53Fix835769.cpp head/contrib/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CallingConvention.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64CallingConvention.h head/contrib/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp head/contrib/llvm/lib/Target/AArch64/AArch64MachineCombinerPattern.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64MachineCombinerPattern.h head/contrib/llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp head/contrib/llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendELF.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendELF.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendWinCOFF.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendWinCOFF.h head/contrib/llvm/lib/Target/Hexagon/Disassembler/ - copied from r280030, projects/clang360-import/contrib/llvm/lib/Target/Hexagon/Disassembler/ head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerStructArgs.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/NVPTX/NVPTXLowerStructArgs.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.h head/contrib/llvm/lib/Target/PowerPC/PPCInstrSPE.td - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/PowerPC/PPCInstrSPE.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleP8.td - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/PowerPC/PPCScheduleP8.td head/contrib/llvm/lib/Target/R600/AMDGPUAlwaysInlinePass.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/R600/AMDGPUAlwaysInlinePass.cpp head/contrib/llvm/lib/Target/R600/AMDKernelCodeT.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/R600/AMDKernelCodeT.h head/contrib/llvm/lib/Target/R600/AsmParser/ - copied from r280030, projects/clang360-import/contrib/llvm/lib/Target/R600/AsmParser/ head/contrib/llvm/lib/Target/R600/CIInstructions.td - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/R600/CIInstructions.td head/contrib/llvm/lib/Target/R600/SIFoldOperands.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/R600/SIFoldOperands.cpp head/contrib/llvm/lib/Target/R600/SILoadStoreOptimizer.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/R600/SILoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/R600/SIPrepareScratchRegs.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/R600/SIPrepareScratchRegs.cpp head/contrib/llvm/lib/Target/R600/VIInstrFormats.td - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/R600/VIInstrFormats.td head/contrib/llvm/lib/Target/R600/VIInstructions.td - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/R600/VIInstructions.td head/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp head/contrib/llvm/lib/Target/X86/X86InstrSGX.td - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/X86/X86InstrSGX.td head/contrib/llvm/lib/Target/X86/X86IntrinsicsInfo.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/X86/X86IntrinsicsInfo.h head/contrib/llvm/lib/Target/X86/X86ScheduleBtVer2.td - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Target/X86/X86ScheduleBtVer2.td head/contrib/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysisEvaluator.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysisEvaluator.cpp head/contrib/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp head/contrib/llvm/lib/Transforms/Utils/SymbolRewriter.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/lib/Transforms/Utils/SymbolRewriter.cpp head/contrib/llvm/patches/patch-01-freebsd-kprintf.diff - copied unchanged from r280030, projects/clang360-import/contrib/llvm/patches/patch-01-freebsd-kprintf.diff head/contrib/llvm/patches/patch-02-clang-vendor-suffix.diff - copied unchanged from r280030, projects/clang360-import/contrib/llvm/patches/patch-02-clang-vendor-suffix.diff head/contrib/llvm/patches/patch-03-add-CC-aliases.diff - copied unchanged from r280030, projects/clang360-import/contrib/llvm/patches/patch-03-add-CC-aliases.diff head/contrib/llvm/patches/patch-04-add-llvm-gvn-option.diff - copied unchanged from r280030, projects/clang360-import/contrib/llvm/patches/patch-04-add-llvm-gvn-option.diff head/contrib/llvm/patches/patch-05-enable-armv6-clrex.diff - copied unchanged from r280030, projects/clang360-import/contrib/llvm/patches/patch-05-enable-armv6-clrex.diff head/contrib/llvm/patches/patch-06-clang-add-mips-triples.diff - copied unchanged from r280030, projects/clang360-import/contrib/llvm/patches/patch-06-clang-add-mips-triples.diff head/contrib/llvm/patches/patch-07-llvm-r227752-boot2-shrink.diff - copied unchanged from r280030, projects/clang360-import/contrib/llvm/patches/patch-07-llvm-r227752-boot2-shrink.diff head/contrib/llvm/patches/patch-08-llvm-r227089-fix-mips-i128.diff - copied unchanged from r280030, projects/clang360-import/contrib/llvm/patches/patch-08-llvm-r227089-fix-mips-i128.diff head/contrib/llvm/patches/patch-09-llvm-r230058-indirectbrs-assert.diff - copied unchanged from r280030, projects/clang360-import/contrib/llvm/patches/patch-09-llvm-r230058-indirectbrs-assert.diff head/contrib/llvm/tools/clang/include/clang/Analysis/CodeInjector.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/include/clang/Analysis/CodeInjector.h head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsLe64.def - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsLe64.def head/contrib/llvm/tools/clang/include/clang/Basic/SanitizerBlacklist.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/include/clang/Basic/SanitizerBlacklist.h head/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.h head/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnosticReader.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnosticReader.h head/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnostics.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnostics.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/ModelConsumer.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/ModelConsumer.h head/contrib/llvm/tools/clang/include/clang/Tooling/Core/ - copied from r280030, projects/clang360-import/contrib/llvm/tools/clang/include/clang/Tooling/Core/ head/contrib/llvm/tools/clang/lib/Analysis/CodeInjector.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Analysis/CodeInjector.cpp head/contrib/llvm/tools/clang/lib/Basic/SanitizerBlacklist.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Basic/SanitizerBlacklist.cpp head/contrib/llvm/tools/clang/lib/Basic/Sanitizers.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Basic/Sanitizers.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.h head/contrib/llvm/tools/clang/lib/CodeGen/SanitizerMetadata.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/CodeGen/SanitizerMetadata.cpp head/contrib/llvm/tools/clang/lib/CodeGen/SanitizerMetadata.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/CodeGen/SanitizerMetadata.h head/contrib/llvm/tools/clang/lib/Driver/CrossWindowsToolChain.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Driver/CrossWindowsToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/MSVCToolChain.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Driver/MSVCToolChain.cpp head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineFormatter.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Format/UnwrappedLineFormatter.cpp head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineFormatter.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Format/UnwrappedLineFormatter.h head/contrib/llvm/tools/clang/lib/Frontend/CodeGenOptions.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Frontend/CodeGenOptions.cpp head/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticReader.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticReader.cpp head/contrib/llvm/tools/clang/lib/Headers/__stddef_max_align_t.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Headers/__stddef_max_align_t.h head/contrib/llvm/tools/clang/lib/Headers/adxintrin.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Headers/adxintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512bwintrin.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Headers/avx512bwintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512erintrin.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Headers/avx512erintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vlbwintrin.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Headers/avx512vlbwintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vlintrin.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Headers/avx512vlintrin.h head/contrib/llvm/tools/clang/lib/Headers/stdatomic.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Headers/stdatomic.h head/contrib/llvm/tools/clang/lib/Headers/vadefs.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Headers/vadefs.h head/contrib/llvm/tools/clang/lib/Sema/SemaCUDA.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Sema/SemaCUDA.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelConsumer.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelConsumer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h head/contrib/llvm/tools/clang/lib/Tooling/Core/ - copied from r280030, projects/clang360-import/contrib/llvm/tools/clang/lib/Tooling/Core/ head/contrib/llvm/tools/lldb/include/lldb/API/SBExecutionContext.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/API/SBExecutionContext.h head/contrib/llvm/tools/lldb/include/lldb/API/SBThreadCollection.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/API/SBThreadCollection.h head/contrib/llvm/tools/lldb/include/lldb/API/SBThreadPlan.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/API/SBThreadPlan.h head/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeDenseMap.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeDenseMap.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/StringPrinter.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/DataFormatters/StringPrinter.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeValidator.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeValidator.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangModulesDeclVendor.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Expression/ClangModulesDeclVendor.h head/contrib/llvm/tools/lldb/include/lldb/Host/ConnectionFileDescriptor.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/ConnectionFileDescriptor.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeProcess.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeProcess.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeProcessBase.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeProcessBase.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeThread.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeThread.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeThreadBase.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeThreadBase.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeThreadForward.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeThreadForward.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostThread.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/HostThread.h head/contrib/llvm/tools/lldb/include/lldb/Host/MonitoringProcessLauncher.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/MonitoringProcessLauncher.h head/contrib/llvm/tools/lldb/include/lldb/Host/PipeBase.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/PipeBase.h head/contrib/llvm/tools/lldb/include/lldb/Host/ProcessLauncher.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/ProcessLauncher.h head/contrib/llvm/tools/lldb/include/lldb/Host/ThisThread.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/ThisThread.h head/contrib/llvm/tools/lldb/include/lldb/Host/ThreadLauncher.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/ThreadLauncher.h head/contrib/llvm/tools/lldb/include/lldb/Host/freebsd/HostThreadFreeBSD.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/freebsd/HostThreadFreeBSD.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostThreadPosix.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostThreadPosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/PipePosix.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/posix/PipePosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/ProcessLauncherPosix.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Host/posix/ProcessLauncherPosix.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueChar.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueChar.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompactUnwindInfo.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Symbol/CompactUnwindInfo.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/DeclVendor.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Symbol/DeclVendor.h head/contrib/llvm/tools/lldb/include/lldb/Target/InstrumentationRuntime.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Target/InstrumentationRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h head/contrib/llvm/tools/lldb/include/lldb/Target/MemoryHistory.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Target/MemoryHistory.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadCollection.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Target/ThreadCollection.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanPython.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanPython.h head/contrib/llvm/tools/lldb/include/lldb/Utility/ProcessStructReader.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Utility/ProcessStructReader.h head/contrib/llvm/tools/lldb/include/lldb/Utility/RegisterNumber.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/include/lldb/Utility/RegisterNumber.h head/contrib/llvm/tools/lldb/source/API/SBExecutionContext.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/API/SBExecutionContext.cpp head/contrib/llvm/tools/lldb/source/API/SBThreadCollection.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/API/SBThreadCollection.cpp head/contrib/llvm/tools/lldb/source/API/SBThreadPlan.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/API/SBThreadPlan.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxInitializerList.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxInitializerList.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxVector.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxVector.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/NSIndexPath.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/DataFormatters/NSIndexPath.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/StringPrinter.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/DataFormatters/StringPrinter.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeValidator.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/DataFormatters/TypeValidator.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangModulesDeclVendor.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Expression/ClangModulesDeclVendor.cpp head/contrib/llvm/tools/lldb/source/Host/common/HostNativeThreadBase.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/common/HostNativeThreadBase.cpp head/contrib/llvm/tools/lldb/source/Host/common/HostProcess.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/common/HostProcess.cpp head/contrib/llvm/tools/lldb/source/Host/common/HostThread.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/common/HostThread.cpp head/contrib/llvm/tools/lldb/source/Host/common/MonitoringProcessLauncher.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/common/MonitoringProcessLauncher.cpp head/contrib/llvm/tools/lldb/source/Host/common/PipeBase.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/common/PipeBase.cpp head/contrib/llvm/tools/lldb/source/Host/common/ThisThread.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/common/ThisThread.cpp head/contrib/llvm/tools/lldb/source/Host/common/ThreadLauncher.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/common/ThreadLauncher.cpp head/contrib/llvm/tools/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Host/freebsd/ThisThread.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/freebsd/ThisThread.cpp head/contrib/llvm/tools/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/HostThreadPosix.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/posix/HostThreadPosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/PipePosix.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/posix/PipePosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/ProcessLauncherPosix.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Host/posix/ProcessLauncherPosix.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueChar.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Interpreter/OptionValueChar.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc/ - copied from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc/ head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc64/ - copied from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc64/ head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ - copied from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ head/contrib/llvm/tools/lldb/source/Plugins/MemoryHistory/ - copied from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/MemoryHistory/ head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_powerpc.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h head/contrib/llvm/tools/lldb/source/Symbol/CompactUnwindInfo.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Symbol/CompactUnwindInfo.cpp head/contrib/llvm/tools/lldb/source/Target/InstrumentationRuntime.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Target/InstrumentationRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/InstrumentationRuntimeStopInfo.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Target/InstrumentationRuntimeStopInfo.cpp head/contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadCollection.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Target/ThreadCollection.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanPython.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Target/ThreadPlanPython.cpp head/contrib/llvm/tools/lldb/source/Utility/RegisterNumber.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Utility/RegisterNumber.cpp head/contrib/llvm/tools/lldb/source/Utility/UriParser.cpp - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Utility/UriParser.cpp head/contrib/llvm/tools/lldb/source/Utility/UriParser.h - copied unchanged from r280030, projects/clang360-import/contrib/llvm/tools/lldb/source/Utility/UriParser.h head/contrib/llvm/tools/lldb/tools/compact-unwind/ - copied from r280030, projects/clang360-import/contrib/llvm/tools/lldb/tools/compact-unwind/ head/lib/clang/liblldbPluginABISysV_ppc/ - copied from r280030, projects/clang360-import/lib/clang/liblldbPluginABISysV_ppc/ head/lib/clang/liblldbPluginABISysV_ppc64/ - copied from r280030, projects/clang360-import/lib/clang/liblldbPluginABISysV_ppc64/ head/lib/clang/liblldbPluginInstrumentationRuntimeAddressSanitizer/ - copied from r280030, projects/clang360-import/lib/clang/liblldbPluginInstrumentationRuntimeAddressSanitizer/ head/lib/clang/liblldbPluginMemoryHistoryASan/ - copied from r280030, projects/clang360-import/lib/clang/liblldbPluginMemoryHistoryASan/ Deleted: head/contrib/compiler-rt/lib/asan/asan_allocator2.cc head/contrib/compiler-rt/lib/tsan/Makefile.old head/contrib/compiler-rt/lib/tsan/rtl/Makefile.old head/contrib/llvm/include/llvm/Analysis/FindUsedTypes.h head/contrib/llvm/include/llvm/CodeGen/JITCodeEmitter.h head/contrib/llvm/include/llvm/CodeGen/MachineCodeEmitter.h head/contrib/llvm/include/llvm/CodeGen/MachineCodeInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineRelocation.h head/contrib/llvm/include/llvm/CodeGen/PBQP/RegAllocSolver.h head/contrib/llvm/include/llvm/ExecutionEngine/JIT.h head/contrib/llvm/include/llvm/ExecutionEngine/JITMemoryManager.h head/contrib/llvm/include/llvm/ExecutionEngine/ObjectBuffer.h head/contrib/llvm/include/llvm/ExecutionEngine/ObjectImage.h head/contrib/llvm/include/llvm/IR/LeakDetector.h head/contrib/llvm/include/llvm/MC/MCAnalysis/MCAtom.h head/contrib/llvm/include/llvm/MC/MCAnalysis/MCFunction.h head/contrib/llvm/include/llvm/MC/MCAnalysis/MCModule.h head/contrib/llvm/include/llvm/MC/MCAnalysis/MCModuleYAML.h head/contrib/llvm/include/llvm/MC/MCObjectDisassembler.h head/contrib/llvm/include/llvm/MC/MCObjectSymbolizer.h head/contrib/llvm/include/llvm/Support/IncludeFile.h head/contrib/llvm/include/llvm/Support/StreamableMemoryObject.h head/contrib/llvm/include/llvm/Support/StringRefMemoryObject.h head/contrib/llvm/include/llvm/Target/TargetJITInfo.h head/contrib/llvm/lib/Analysis/IPA/FindUsedTypes.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.h head/contrib/llvm/lib/CodeGen/AtomicExpandLoadLinkedPass.cpp head/contrib/llvm/lib/CodeGen/JITCodeEmitter.cpp head/contrib/llvm/lib/CodeGen/MachineCodeEmitter.cpp head/contrib/llvm/lib/CodeGen/Spiller.cpp head/contrib/llvm/lib/DebugInfo/DWARFAbbreviationDeclaration.h head/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.h head/contrib/llvm/lib/DebugInfo/DWARFContext.h head/contrib/llvm/lib/DebugInfo/DWARFDebugAbbrev.h head/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h head/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.h head/contrib/llvm/lib/DebugInfo/DWARFDebugFrame.h head/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.h head/contrib/llvm/lib/DebugInfo/DWARFDebugLine.h head/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.h head/contrib/llvm/lib/DebugInfo/DWARFDebugRangeList.h head/contrib/llvm/lib/DebugInfo/DWARFRelocMap.h head/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.h head/contrib/llvm/lib/DebugInfo/DWARFUnit.h head/contrib/llvm/lib/ExecutionEngine/JIT/JIT.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JIT.h head/contrib/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp head/contrib/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h head/contrib/llvm/lib/IR/LeakDetector.cpp head/contrib/llvm/lib/MC/MCAnalysis/MCAtom.cpp head/contrib/llvm/lib/MC/MCAnalysis/MCFunction.cpp head/contrib/llvm/lib/MC/MCAnalysis/MCModule.cpp head/contrib/llvm/lib/MC/MCAnalysis/MCModuleYAML.cpp head/contrib/llvm/lib/MC/MCAnalysis/MCObjectDisassembler.cpp head/contrib/llvm/lib/MC/MCAnalysis/MCObjectSymbolizer.cpp head/contrib/llvm/lib/MC/MCDisassembler.cpp head/contrib/llvm/lib/MC/MCExternalSymbolizer.cpp head/contrib/llvm/lib/MC/MCRelocationInfo.cpp head/contrib/llvm/lib/Support/IncludeFile.cpp head/contrib/llvm/lib/Support/StreamableMemoryObject.cpp head/contrib/llvm/lib/Support/StringRefMemoryObject.cpp head/contrib/llvm/lib/Target/ARM/ARMCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/ARMJITInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMJITInfo.h head/contrib/llvm/lib/Target/ARM/ARMRelocations.h head/contrib/llvm/lib/Target/Hexagon/InstPrinter/ head/contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsABIInfo.h head/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsJITInfo.h head/contrib/llvm/lib/Target/Mips/MipsRelocations.h head/contrib/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCJITInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCJITInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCRelocations.h head/contrib/llvm/lib/Target/Sparc/SparcCodeEmitter.cpp head/contrib/llvm/lib/Target/Sparc/SparcJITInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcJITInfo.h head/contrib/llvm/lib/Target/Sparc/SparcRelocations.h head/contrib/llvm/lib/Target/TargetJITInfo.cpp head/contrib/llvm/lib/Target/X86/X86AtomicExpandPass.cpp head/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp head/contrib/llvm/lib/Target/X86/X86JITInfo.cpp head/contrib/llvm/lib/Target/X86/X86JITInfo.h head/contrib/llvm/lib/Target/X86/X86Relocations.h head/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.cpp head/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.h head/contrib/llvm/patches/patch-01-clang-version-include.diff head/contrib/llvm/patches/patch-02-format-extensions.diff head/contrib/llvm/patches/patch-03-clang-vendor-suffix.diff head/contrib/llvm/patches/patch-04-default-target-triple.diff head/contrib/llvm/patches/patch-05-add-CC-aliases.diff head/contrib/llvm/patches/patch-06-clang-arm-target-cpu.diff head/contrib/llvm/patches/patch-07-llvm-r216989-r216990-fix-movw-armv6.diff head/contrib/llvm/patches/patch-08-clang-r217410-i386-garbage-float.diff head/contrib/llvm/patches/patch-09-llvm-r221709-debug-oom.diff head/contrib/llvm/patches/patch-10-llvm-r222562-loop-rotate.diff head/contrib/llvm/patches/patch-11-add-llvm-gvn-option.diff head/contrib/llvm/patches/patch-12-llvm-r218241-dwarf2-warning.diff head/contrib/llvm/patches/patch-13-llvm-r215352-aarch64-dyn-loader.diff head/contrib/llvm/patches/patch-14-llvm-r216571-dynamiclib-usability.diff head/contrib/llvm/patches/patch-15-clang-r221900-freebsd-aarch64.diff head/contrib/llvm/patches/patch-16-llvm-r222856-libapr-miscompile.diff head/contrib/llvm/patches/patch-17-llvm-r214802-armv6-cp10-cp11.diff head/contrib/llvm/patches/patch-18-llvm-r215811-arm-fpu-directive.diff head/contrib/llvm/patches/patch-19-enable-armv6-clrex.diff head/contrib/llvm/patches/patch-20-llvm-r223147-arm-cpu-directive.diff head/contrib/llvm/patches/patch-21-llvm-r221170-ppc-vaarg.diff head/contrib/llvm/patches/patch-22-llvm-r221791-ppc-small-pic.diff head/contrib/llvm/patches/patch-23-llvm-r224415-ppc-local.diff head/contrib/llvm/patches/patch-24-llvm-r213890-ppc-eh_frame.diff head/contrib/llvm/patches/patch-25-llvm-r224890-ppc-ctr-tls-loop.diff head/contrib/llvm/patches/patch-26-clang-r213790-type_traits-crash.diff head/contrib/llvm/patches/patch-27-llvm-r222587-arm-add-pc.diff head/contrib/llvm/patches/patch-28-llvm-r222292-aarch64-no-neon.diff head/contrib/llvm/patches/patch-29-clang-add-mips-triples.diff head/contrib/llvm/patches/patch-30-llvm-r226664-aarch64-x18.diff head/contrib/llvm/patches/patch-31-clang-r227062-fixes-x18.diff head/contrib/llvm/patches/patch-32-llvm-r230058-indirectbrs-assert.diff head/contrib/llvm/tools/clang/lib/AST/MangleNumberingContext.cpp head/contrib/llvm/tools/clang/lib/CodeGen/SanitizerBlacklist.cpp head/contrib/llvm/tools/clang/lib/CodeGen/SanitizerBlacklist.h head/contrib/llvm/tools/clang/lib/Driver/WindowsToolChain.cpp head/contrib/llvm/tools/lldb/include/lldb/Core/ConnectionFileDescriptor.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/TypeVendor.h head/contrib/llvm/tools/lldb/source/Core/ConnectionFileDescriptor.cpp head/contrib/llvm/tools/lldb/source/Host/common/Pipe.cpp head/lib/clang/libllvmjit/ head/lib/clang/libllvmmcanalysis/ Modified: head/ObsoleteFiles.inc head/UPDATING head/contrib/compiler-rt/include/sanitizer/asan_interface.h head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h head/contrib/compiler-rt/include/sanitizer/msan_interface.h head/contrib/compiler-rt/lib/asan/README.txt head/contrib/compiler-rt/lib/asan/asan_activation.cc head/contrib/compiler-rt/lib/asan/asan_activation.h head/contrib/compiler-rt/lib/asan/asan_allocator.h head/contrib/compiler-rt/lib/asan/asan_debugging.cc head/contrib/compiler-rt/lib/asan/asan_fake_stack.cc head/contrib/compiler-rt/lib/asan/asan_flags.h head/contrib/compiler-rt/lib/asan/asan_globals.cc head/contrib/compiler-rt/lib/asan/asan_init_version.h head/contrib/compiler-rt/lib/asan/asan_interceptors.cc head/contrib/compiler-rt/lib/asan/asan_interface_internal.h head/contrib/compiler-rt/lib/asan/asan_internal.h head/contrib/compiler-rt/lib/asan/asan_linux.cc head/contrib/compiler-rt/lib/asan/asan_mac.cc head/contrib/compiler-rt/lib/asan/asan_malloc_mac.cc head/contrib/compiler-rt/lib/asan/asan_mapping.h head/contrib/compiler-rt/lib/asan/asan_poisoning.cc head/contrib/compiler-rt/lib/asan/asan_poisoning.h head/contrib/compiler-rt/lib/asan/asan_report.cc head/contrib/compiler-rt/lib/asan/asan_rtl.cc head/contrib/compiler-rt/lib/asan/asan_stack.cc head/contrib/compiler-rt/lib/asan/asan_stack.h head/contrib/compiler-rt/lib/asan/asan_suppressions.cc head/contrib/compiler-rt/lib/asan/asan_win.cc head/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc head/contrib/compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc head/contrib/compiler-rt/lib/asan/scripts/asan_device_setup head/contrib/compiler-rt/lib/asan/scripts/asan_symbolize.py head/contrib/compiler-rt/lib/asan/tests/asan_interface_test.cc head/contrib/compiler-rt/lib/asan/tests/asan_noinst_test.cc head/contrib/compiler-rt/lib/asan/tests/asan_test.cc head/contrib/compiler-rt/lib/builtins/atomic.c head/contrib/compiler-rt/lib/builtins/clear_cache.c head/contrib/compiler-rt/lib/builtins/gcc_personality_v0.c head/contrib/compiler-rt/lib/builtins/int_types.h head/contrib/compiler-rt/lib/dfsan/dfsan.cc head/contrib/compiler-rt/lib/dfsan/dfsan.h head/contrib/compiler-rt/lib/dfsan/dfsan_custom.cc head/contrib/compiler-rt/lib/lsan/lsan.cc head/contrib/compiler-rt/lib/lsan/lsan_allocator.cc head/contrib/compiler-rt/lib/lsan/lsan_common.cc head/contrib/compiler-rt/lib/lsan/lsan_common.h head/contrib/compiler-rt/lib/msan/msan.cc head/contrib/compiler-rt/lib/msan/msan.h head/contrib/compiler-rt/lib/msan/msan_allocator.cc head/contrib/compiler-rt/lib/msan/msan_flags.h head/contrib/compiler-rt/lib/msan/msan_interceptors.cc head/contrib/compiler-rt/lib/msan/msan_linux.cc head/contrib/compiler-rt/lib/msan/msan_report.cc head/contrib/compiler-rt/lib/msan/msan_thread.cc head/contrib/compiler-rt/lib/msan/tests/msan_test.cc head/contrib/compiler-rt/lib/profile/InstrProfilingFile.c head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_mapping_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libc.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libc.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libignore.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libignore.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_list.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_quarantine.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.cc head/contrib/compiler-rt/lib/sanitizer_common/scripts/check_lint.sh head/contrib/compiler-rt/lib/sanitizer_common/scripts/sancov.py head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_deadlock_detector_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_flags_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_printf_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc head/contrib/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h head/contrib/compiler-rt/lib/tsan/check_analyze.sh head/contrib/compiler-rt/lib/tsan/dd/dd_rtl.cc head/contrib/compiler-rt/lib/tsan/go/build.bat head/contrib/compiler-rt/lib/tsan/go/buildgo.sh head/contrib/compiler-rt/lib/tsan/go/tsan_go.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_clock.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_defs.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface_java.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface_java.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_mman.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_mman.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_mutex.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_mutex.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_report.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_stat.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_suppressions.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_trace.h head/contrib/compiler-rt/lib/tsan/tests/rtl/tsan_string.cc head/contrib/compiler-rt/lib/tsan/tests/unit/tsan_clock_test.cc head/contrib/compiler-rt/lib/tsan/tests/unit/tsan_mman_test.cc head/contrib/compiler-rt/lib/tsan/tests/unit/tsan_mutex_test.cc head/contrib/compiler-rt/lib/ubsan/ubsan_diag.cc head/contrib/compiler-rt/lib/ubsan/ubsan_diag.h head/contrib/compiler-rt/lib/ubsan/ubsan_flags.cc head/contrib/compiler-rt/lib/ubsan/ubsan_flags.h head/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc head/contrib/compiler-rt/lib/ubsan/ubsan_handlers_cxx.cc head/contrib/compiler-rt/lib/ubsan/ubsan_init.cc head/contrib/compiler-rt/lib/ubsan/ubsan_type_hash.cc head/contrib/llvm/include/llvm-c/BitReader.h head/contrib/llvm/include/llvm-c/BitWriter.h head/contrib/llvm/include/llvm-c/Core.h head/contrib/llvm/include/llvm-c/Disassembler.h head/contrib/llvm/include/llvm-c/ExecutionEngine.h head/contrib/llvm/include/llvm-c/Initialization.h head/contrib/llvm/include/llvm-c/Linker.h head/contrib/llvm/include/llvm-c/Support.h head/contrib/llvm/include/llvm-c/Transforms/Scalar.h head/contrib/llvm/include/llvm-c/lto.h head/contrib/llvm/include/llvm/ADT/APFloat.h head/contrib/llvm/include/llvm/ADT/APInt.h head/contrib/llvm/include/llvm/ADT/APSInt.h head/contrib/llvm/include/llvm/ADT/ArrayRef.h head/contrib/llvm/include/llvm/ADT/BitVector.h head/contrib/llvm/include/llvm/ADT/DenseMap.h head/contrib/llvm/include/llvm/ADT/DenseSet.h head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h head/contrib/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h head/contrib/llvm/include/llvm/ADT/MapVector.h head/contrib/llvm/include/llvm/ADT/Optional.h head/contrib/llvm/include/llvm/ADT/PostOrderIterator.h head/contrib/llvm/include/llvm/ADT/STLExtras.h head/contrib/llvm/include/llvm/ADT/ScopedHashTable.h head/contrib/llvm/include/llvm/ADT/SetVector.h head/contrib/llvm/include/llvm/ADT/SmallBitVector.h head/contrib/llvm/include/llvm/ADT/SmallPtrSet.h head/contrib/llvm/include/llvm/ADT/SmallSet.h head/contrib/llvm/include/llvm/ADT/SmallVector.h head/contrib/llvm/include/llvm/ADT/SparseBitVector.h head/contrib/llvm/include/llvm/ADT/SparseMultiSet.h head/contrib/llvm/include/llvm/ADT/SparseSet.h head/contrib/llvm/include/llvm/ADT/StringMap.h head/contrib/llvm/include/llvm/ADT/StringRef.h head/contrib/llvm/include/llvm/ADT/StringSet.h head/contrib/llvm/include/llvm/ADT/TinyPtrVector.h head/contrib/llvm/include/llvm/ADT/Triple.h head/contrib/llvm/include/llvm/ADT/Twine.h head/contrib/llvm/include/llvm/ADT/VariadicFunction.h head/contrib/llvm/include/llvm/ADT/ilist.h head/contrib/llvm/include/llvm/ADT/ilist_node.h head/contrib/llvm/include/llvm/ADT/iterator.h head/contrib/llvm/include/llvm/ADT/iterator_range.h head/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h head/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h head/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h head/contrib/llvm/include/llvm/Analysis/CFGPrinter.h head/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h head/contrib/llvm/include/llvm/Analysis/CallGraph.h head/contrib/llvm/include/llvm/Analysis/CodeMetrics.h head/contrib/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h head/contrib/llvm/include/llvm/Analysis/DependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/DominanceFrontier.h head/contrib/llvm/include/llvm/Analysis/DominanceFrontierImpl.h head/contrib/llvm/include/llvm/Analysis/IVUsers.h head/contrib/llvm/include/llvm/Analysis/InlineCost.h head/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h head/contrib/llvm/include/llvm/Analysis/IntervalIterator.h head/contrib/llvm/include/llvm/Analysis/JumpInstrTableInfo.h head/contrib/llvm/include/llvm/Analysis/LazyCallGraph.h head/contrib/llvm/include/llvm/Analysis/LazyValueInfo.h head/contrib/llvm/include/llvm/Analysis/Loads.h head/contrib/llvm/include/llvm/Analysis/LoopPass.h head/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/PHITransAddr.h head/contrib/llvm/include/llvm/Analysis/Passes.h head/contrib/llvm/include/llvm/Analysis/PostDominators.h head/contrib/llvm/include/llvm/Analysis/RegionInfo.h head/contrib/llvm/include/llvm/Analysis/RegionInfoImpl.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h head/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h head/contrib/llvm/include/llvm/Analysis/ValueTracking.h head/contrib/llvm/include/llvm/AsmParser/Parser.h head/contrib/llvm/include/llvm/Bitcode/BitCodes.h head/contrib/llvm/include/llvm/Bitcode/BitcodeWriterPass.h head/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h head/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h head/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h head/contrib/llvm/include/llvm/Bitcode/ReaderWriter.h head/contrib/llvm/include/llvm/CodeGen/Analysis.h head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h head/contrib/llvm/include/llvm/CodeGen/CalcSpillWeights.h head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h head/contrib/llvm/include/llvm/CodeGen/CommandFlags.h head/contrib/llvm/include/llvm/CodeGen/DFAPacketizer.h head/contrib/llvm/include/llvm/CodeGen/FastISel.h head/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h head/contrib/llvm/include/llvm/CodeGen/GCMetadata.h head/contrib/llvm/include/llvm/CodeGen/GCMetadataPrinter.h head/contrib/llvm/include/llvm/CodeGen/GCStrategy.h head/contrib/llvm/include/llvm/CodeGen/GCs.h head/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h head/contrib/llvm/include/llvm/CodeGen/JumpInstrTables.h head/contrib/llvm/include/llvm/CodeGen/LexicalScopes.h head/contrib/llvm/include/llvm/CodeGen/LinkAllCodegenComponents.h head/contrib/llvm/include/llvm/CodeGen/LiveInterval.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervalUnion.h head/contrib/llvm/include/llvm/CodeGen/LivePhysRegs.h head/contrib/llvm/include/llvm/CodeGen/LiveRangeEdit.h head/contrib/llvm/include/llvm/CodeGen/LiveVariables.h head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h head/contrib/llvm/include/llvm/CodeGen/MachineDominators.h head/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineFunction.h head/contrib/llvm/include/llvm/CodeGen/MachineInstr.h head/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h head/contrib/llvm/include/llvm/CodeGen/MachineMemOperand.h head/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineOperand.h head/contrib/llvm/include/llvm/CodeGen/MachinePostDominators.h head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h head/contrib/llvm/include/llvm/CodeGen/MachineTraceMetrics.h head/contrib/llvm/include/llvm/CodeGen/MachineValueType.h head/contrib/llvm/include/llvm/CodeGen/PBQP/CostAllocator.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Math.h head/contrib/llvm/include/llvm/CodeGen/PBQP/ReductionRules.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Solution.h head/contrib/llvm/include/llvm/CodeGen/Passes.h head/contrib/llvm/include/llvm/CodeGen/RegAllocPBQP.h head/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h head/contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h head/contrib/llvm/include/llvm/CodeGen/StackMapLivenessAnalysis.h head/contrib/llvm/include/llvm/CodeGen/StackMaps.h head/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h head/contrib/llvm/include/llvm/CodeGen/TargetSchedule.h head/contrib/llvm/include/llvm/DebugInfo/DIContext.h head/contrib/llvm/include/llvm/DebugInfo/DWARFFormValue.h head/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h head/contrib/llvm/include/llvm/ExecutionEngine/JITEventListener.h head/contrib/llvm/include/llvm/ExecutionEngine/ObjectCache.h head/contrib/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h head/contrib/llvm/include/llvm/IR/Argument.h head/contrib/llvm/include/llvm/IR/AssemblyAnnotationWriter.h head/contrib/llvm/include/llvm/IR/BasicBlock.h head/contrib/llvm/include/llvm/IR/CFG.h head/contrib/llvm/include/llvm/IR/CallingConv.h head/contrib/llvm/include/llvm/IR/Constant.h head/contrib/llvm/include/llvm/IR/ConstantRange.h head/contrib/llvm/include/llvm/IR/Constants.h head/contrib/llvm/include/llvm/IR/DIBuilder.h head/contrib/llvm/include/llvm/IR/DataLayout.h head/contrib/llvm/include/llvm/IR/DebugInfo.h head/contrib/llvm/include/llvm/IR/DebugLoc.h head/contrib/llvm/include/llvm/IR/DerivedTypes.h head/contrib/llvm/include/llvm/IR/DiagnosticInfo.h head/contrib/llvm/include/llvm/IR/DiagnosticPrinter.h head/contrib/llvm/include/llvm/IR/Dominators.h head/contrib/llvm/include/llvm/IR/Function.h head/contrib/llvm/include/llvm/IR/GVMaterializer.h head/contrib/llvm/include/llvm/IR/GlobalObject.h head/contrib/llvm/include/llvm/IR/GlobalValue.h head/contrib/llvm/include/llvm/IR/IRBuilder.h head/contrib/llvm/include/llvm/IR/IRPrintingPasses.h head/contrib/llvm/include/llvm/IR/InlineAsm.h head/contrib/llvm/include/llvm/IR/InstrTypes.h head/contrib/llvm/include/llvm/IR/Instruction.h head/contrib/llvm/include/llvm/IR/Instructions.h head/contrib/llvm/include/llvm/IR/IntrinsicInst.h head/contrib/llvm/include/llvm/IR/Intrinsics.h head/contrib/llvm/include/llvm/IR/Intrinsics.td head/contrib/llvm/include/llvm/IR/IntrinsicsARM.td head/contrib/llvm/include/llvm/IR/IntrinsicsNVVM.td head/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td head/contrib/llvm/include/llvm/IR/IntrinsicsR600.td head/contrib/llvm/include/llvm/IR/IntrinsicsX86.td head/contrib/llvm/include/llvm/IR/LLVMContext.h head/contrib/llvm/include/llvm/IR/LegacyPassManager.h head/contrib/llvm/include/llvm/IR/LegacyPassManagers.h head/contrib/llvm/include/llvm/IR/MDBuilder.h head/contrib/llvm/include/llvm/IR/Mangler.h head/contrib/llvm/include/llvm/IR/Metadata.h head/contrib/llvm/include/llvm/IR/Module.h head/contrib/llvm/include/llvm/IR/Operator.h head/contrib/llvm/include/llvm/IR/PassManager.h head/contrib/llvm/include/llvm/IR/PatternMatch.h head/contrib/llvm/include/llvm/IR/PredIteratorCache.h head/contrib/llvm/include/llvm/IR/Type.h head/contrib/llvm/include/llvm/IR/TypeFinder.h head/contrib/llvm/include/llvm/IR/User.h head/contrib/llvm/include/llvm/IR/Value.h head/contrib/llvm/include/llvm/IR/ValueHandle.h head/contrib/llvm/include/llvm/IR/ValueMap.h head/contrib/llvm/include/llvm/IR/Verifier.h head/contrib/llvm/include/llvm/IRReader/IRReader.h head/contrib/llvm/include/llvm/InitializePasses.h head/contrib/llvm/include/llvm/LTO/LTOCodeGenerator.h head/contrib/llvm/include/llvm/LTO/LTOModule.h head/contrib/llvm/include/llvm/LinkAllPasses.h head/contrib/llvm/include/llvm/Linker/Linker.h head/contrib/llvm/include/llvm/MC/ConstantPools.h head/contrib/llvm/include/llvm/MC/MCAsmBackend.h head/contrib/llvm/include/llvm/MC/MCAsmInfo.h head/contrib/llvm/include/llvm/MC/MCAsmInfoDarwin.h head/contrib/llvm/include/llvm/MC/MCAsmInfoELF.h head/contrib/llvm/include/llvm/MC/MCAssembler.h head/contrib/llvm/include/llvm/MC/MCContext.h head/contrib/llvm/include/llvm/MC/MCDisassembler.h head/contrib/llvm/include/llvm/MC/MCDwarf.h head/contrib/llvm/include/llvm/MC/MCELFStreamer.h head/contrib/llvm/include/llvm/MC/MCExpr.h head/contrib/llvm/include/llvm/MC/MCInst.h head/contrib/llvm/include/llvm/MC/MCInstPrinter.h head/contrib/llvm/include/llvm/MC/MCInstrDesc.h head/contrib/llvm/include/llvm/MC/MCInstrItineraries.h head/contrib/llvm/include/llvm/MC/MCLinkerOptimizationHint.h head/contrib/llvm/include/llvm/MC/MCMachObjectWriter.h head/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h head/contrib/llvm/include/llvm/MC/MCObjectStreamer.h head/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h head/contrib/llvm/include/llvm/MC/MCRegisterInfo.h head/contrib/llvm/include/llvm/MC/MCSchedule.h head/contrib/llvm/include/llvm/MC/MCStreamer.h head/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h head/contrib/llvm/include/llvm/MC/MCSymbol.h head/contrib/llvm/include/llvm/MC/MCTargetAsmParser.h head/contrib/llvm/include/llvm/MC/MCTargetOptions.h head/contrib/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h head/contrib/llvm/include/llvm/MC/MCWin64EH.h head/contrib/llvm/include/llvm/MC/MCWinCOFFStreamer.h head/contrib/llvm/include/llvm/MC/MCWinEH.h head/contrib/llvm/include/llvm/MC/StringTableBuilder.h head/contrib/llvm/include/llvm/MC/SubtargetFeature.h head/contrib/llvm/include/llvm/Object/Archive.h head/contrib/llvm/include/llvm/Object/Binary.h head/contrib/llvm/include/llvm/Object/COFF.h head/contrib/llvm/include/llvm/Object/COFFYAML.h head/contrib/llvm/include/llvm/Object/ELF.h head/contrib/llvm/include/llvm/Object/ELFObjectFile.h head/contrib/llvm/include/llvm/Object/ELFTypes.h head/contrib/llvm/include/llvm/Object/ELFYAML.h head/contrib/llvm/include/llvm/Object/Error.h head/contrib/llvm/include/llvm/Object/IRObjectFile.h head/contrib/llvm/include/llvm/Object/MachO.h head/contrib/llvm/include/llvm/Object/MachOUniversal.h head/contrib/llvm/include/llvm/Object/ObjectFile.h head/contrib/llvm/include/llvm/Object/RelocVisitor.h head/contrib/llvm/include/llvm/Object/SymbolicFile.h head/contrib/llvm/include/llvm/Option/ArgList.h head/contrib/llvm/include/llvm/PassRegistry.h head/contrib/llvm/include/llvm/PassSupport.h head/contrib/llvm/include/llvm/ProfileData/InstrProfReader.h head/contrib/llvm/include/llvm/ProfileData/InstrProfWriter.h head/contrib/llvm/include/llvm/Support/ARMBuildAttributes.h head/contrib/llvm/include/llvm/Support/ARMEHABI.h head/contrib/llvm/include/llvm/Support/ARMWinEH.h head/contrib/llvm/include/llvm/Support/Allocator.h head/contrib/llvm/include/llvm/Support/CBindingWrapping.h head/contrib/llvm/include/llvm/Support/COFF.h head/contrib/llvm/include/llvm/Support/Casting.h head/contrib/llvm/include/llvm/Support/CommandLine.h head/contrib/llvm/include/llvm/Support/Compiler.h head/contrib/llvm/include/llvm/Support/Compression.h head/contrib/llvm/include/llvm/Support/CrashRecoveryContext.h head/contrib/llvm/include/llvm/Support/DataExtractor.h head/contrib/llvm/include/llvm/Support/DataTypes.h.in head/contrib/llvm/include/llvm/Support/Dwarf.h head/contrib/llvm/include/llvm/Support/DynamicLibrary.h head/contrib/llvm/include/llvm/Support/ELF.h head/contrib/llvm/include/llvm/Support/Endian.h head/contrib/llvm/include/llvm/Support/EndianStream.h head/contrib/llvm/include/llvm/Support/ErrorOr.h head/contrib/llvm/include/llvm/Support/FileOutputBuffer.h head/contrib/llvm/include/llvm/Support/FileSystem.h head/contrib/llvm/include/llvm/Support/Format.h head/contrib/llvm/include/llvm/Support/GCOV.h head/contrib/llvm/include/llvm/Support/GenericDomTree.h head/contrib/llvm/include/llvm/Support/GenericDomTreeConstruction.h head/contrib/llvm/include/llvm/Support/LEB128.h head/contrib/llvm/include/llvm/Support/LineIterator.h head/contrib/llvm/include/llvm/Support/MD5.h head/contrib/llvm/include/llvm/Support/MachO.h head/contrib/llvm/include/llvm/Support/ManagedStatic.h head/contrib/llvm/include/llvm/Support/MathExtras.h head/contrib/llvm/include/llvm/Support/MemoryBuffer.h head/contrib/llvm/include/llvm/Support/MemoryObject.h head/contrib/llvm/include/llvm/Support/Mutex.h head/contrib/llvm/include/llvm/Support/MutexGuard.h head/contrib/llvm/include/llvm/Support/OnDiskHashTable.h head/contrib/llvm/include/llvm/Support/Path.h head/contrib/llvm/include/llvm/Support/Process.h head/contrib/llvm/include/llvm/Support/Program.h head/contrib/llvm/include/llvm/Support/RWMutex.h head/contrib/llvm/include/llvm/Support/RandomNumberGenerator.h head/contrib/llvm/include/llvm/Support/Registry.h head/contrib/llvm/include/llvm/Support/ScaledNumber.h head/contrib/llvm/include/llvm/Support/SourceMgr.h head/contrib/llvm/include/llvm/Support/SpecialCaseList.h head/contrib/llvm/include/llvm/Support/StringPool.h head/contrib/llvm/include/llvm/Support/SwapByteOrder.h head/contrib/llvm/include/llvm/Support/TargetRegistry.h head/contrib/llvm/include/llvm/Support/ThreadLocal.h head/contrib/llvm/include/llvm/Support/Threading.h head/contrib/llvm/include/llvm/Support/TimeValue.h head/contrib/llvm/include/llvm/Support/ToolOutputFile.h head/contrib/llvm/include/llvm/Support/Win64EH.h head/contrib/llvm/include/llvm/Support/WindowsError.h head/contrib/llvm/include/llvm/Support/YAMLParser.h head/contrib/llvm/include/llvm/Support/YAMLTraits.h head/contrib/llvm/include/llvm/Support/raw_ostream.h head/contrib/llvm/include/llvm/TableGen/Record.h head/contrib/llvm/include/llvm/TableGen/SetTheory.h head/contrib/llvm/include/llvm/TableGen/StringToOffsetTable.h head/contrib/llvm/include/llvm/Target/Target.td head/contrib/llvm/include/llvm/Target/TargetFrameLowering.h head/contrib/llvm/include/llvm/Target/TargetInstrInfo.h head/contrib/llvm/include/llvm/Target/TargetIntrinsicInfo.h head/contrib/llvm/include/llvm/Target/TargetLibraryInfo.h head/contrib/llvm/include/llvm/Target/TargetLowering.h head/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h head/contrib/llvm/include/llvm/Target/TargetMachine.h head/contrib/llvm/include/llvm/Target/TargetOpcodes.h head/contrib/llvm/include/llvm/Target/TargetOptions.h head/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h head/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td head/contrib/llvm/include/llvm/Target/TargetSelectionDAGInfo.h head/contrib/llvm/include/llvm/Target/TargetSubtargetInfo.h head/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h head/contrib/llvm/include/llvm/Transforms/Instrumentation.h head/contrib/llvm/include/llvm/Transforms/Scalar.h head/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h head/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h head/contrib/llvm/include/llvm/Transforms/Utils/CodeExtractor.h head/contrib/llvm/include/llvm/Transforms/Utils/CtorUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/Local.h head/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/ModuleUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h head/contrib/llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h head/contrib/llvm/include/llvm/Transforms/Utils/UnrollLoop.h head/contrib/llvm/include/llvm/Transforms/Utils/ValueMapper.h head/contrib/llvm/include/llvm/Transforms/Utils/VectorUtils.h head/contrib/llvm/include/llvm/module.modulemap head/contrib/llvm/lib/Analysis/AliasAnalysis.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp head/contrib/llvm/lib/Analysis/Analysis.cpp head/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp head/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp head/contrib/llvm/lib/Analysis/CFG.cpp head/contrib/llvm/lib/Analysis/CFGPrinter.cpp head/contrib/llvm/lib/Analysis/CGSCCPassManager.cpp head/contrib/llvm/lib/Analysis/CaptureTracking.cpp head/contrib/llvm/lib/Analysis/CodeMetrics.cpp head/contrib/llvm/lib/Analysis/ConstantFolding.cpp head/contrib/llvm/lib/Analysis/DependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/IPA/CallGraph.cpp head/contrib/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp head/contrib/llvm/lib/Analysis/IPA/IPA.cpp head/contrib/llvm/lib/Analysis/IPA/InlineCost.cpp head/contrib/llvm/lib/Analysis/IVUsers.cpp head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp head/contrib/llvm/lib/Analysis/JumpInstrTableInfo.cpp head/contrib/llvm/lib/Analysis/LazyCallGraph.cpp head/contrib/llvm/lib/Analysis/LazyValueInfo.cpp head/contrib/llvm/lib/Analysis/LibCallSemantics.cpp head/contrib/llvm/lib/Analysis/Lint.cpp head/contrib/llvm/lib/Analysis/Loads.cpp head/contrib/llvm/lib/Analysis/LoopInfo.cpp head/contrib/llvm/lib/Analysis/LoopPass.cpp head/contrib/llvm/lib/Analysis/MemDepPrinter.cpp head/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp head/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/NoAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/PHITransAddr.cpp head/contrib/llvm/lib/Analysis/PtrUseVisitor.cpp head/contrib/llvm/lib/Analysis/RegionInfo.cpp head/contrib/llvm/lib/Analysis/RegionPass.cpp head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp head/contrib/llvm/lib/Analysis/TargetTransformInfo.cpp head/contrib/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/AsmParser/LLLexer.cpp head/contrib/llvm/lib/AsmParser/LLLexer.h head/contrib/llvm/lib/AsmParser/LLParser.cpp head/contrib/llvm/lib/AsmParser/LLParser.h head/contrib/llvm/lib/AsmParser/LLToken.h head/contrib/llvm/lib/AsmParser/Parser.cpp head/contrib/llvm/lib/Bitcode/Reader/BitReader.cpp head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.h head/contrib/llvm/lib/Bitcode/Reader/BitstreamReader.cpp head/contrib/llvm/lib/Bitcode/Writer/BitWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.h head/contrib/llvm/lib/CodeGen/AllocationOrder.h head/contrib/llvm/lib/CodeGen/Analysis.cpp head/contrib/llvm/lib/CodeGen/AntiDepBreaker.h head/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AddressPool.h head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterHandler.h head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocList.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h head/contrib/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/EHStreamer.h head/contrib/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h head/contrib/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.h head/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp head/contrib/llvm/lib/CodeGen/CallingConvLower.cpp head/contrib/llvm/lib/CodeGen/CodeGen.cpp head/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.h head/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp head/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp head/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp head/contrib/llvm/lib/CodeGen/EarlyIfConversion.cpp head/contrib/llvm/lib/CodeGen/ErlangGC.cpp head/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp head/contrib/llvm/lib/CodeGen/ExpandISelPseudos.cpp head/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp head/contrib/llvm/lib/CodeGen/GCMetadata.cpp head/contrib/llvm/lib/CodeGen/GCMetadataPrinter.cpp head/contrib/llvm/lib/CodeGen/GCStrategy.cpp head/contrib/llvm/lib/CodeGen/GlobalMerge.cpp head/contrib/llvm/lib/CodeGen/IfConversion.cpp head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp head/contrib/llvm/lib/CodeGen/InterferenceCache.h head/contrib/llvm/lib/CodeGen/IntrinsicLowering.cpp head/contrib/llvm/lib/CodeGen/JumpInstrTables.cpp head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp head/contrib/llvm/lib/CodeGen/LexicalScopes.cpp head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp head/contrib/llvm/lib/CodeGen/LiveDebugVariables.h head/contrib/llvm/lib/CodeGen/LiveInterval.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalUnion.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.h head/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp head/contrib/llvm/lib/CodeGen/LiveRegMatrix.cpp head/contrib/llvm/lib/CodeGen/LiveStackAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveVariables.cpp head/contrib/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp head/contrib/llvm/lib/CodeGen/MachineCSE.cpp head/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp head/contrib/llvm/lib/CodeGen/MachineDominanceFrontier.cpp head/contrib/llvm/lib/CodeGen/MachineDominators.cpp head/contrib/llvm/lib/CodeGen/MachineFunction.cpp head/contrib/llvm/lib/CodeGen/MachineFunctionAnalysis.cpp head/contrib/llvm/lib/CodeGen/MachineFunctionPass.cpp head/contrib/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp head/contrib/llvm/lib/CodeGen/MachineInstr.cpp head/contrib/llvm/lib/CodeGen/MachineInstrBundle.cpp head/contrib/llvm/lib/CodeGen/MachineLICM.cpp head/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp head/contrib/llvm/lib/CodeGen/MachineRegionInfo.cpp head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/MachineSSAUpdater.cpp head/contrib/llvm/lib/CodeGen/MachineScheduler.cpp head/contrib/llvm/lib/CodeGen/MachineSink.cpp head/contrib/llvm/lib/CodeGen/MachineTraceMetrics.cpp head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp head/contrib/llvm/lib/CodeGen/OptimizePHIs.cpp head/contrib/llvm/lib/CodeGen/PHIElimination.cpp head/contrib/llvm/lib/CodeGen/PHIEliminationUtils.h head/contrib/llvm/lib/CodeGen/Passes.cpp head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp head/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp head/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.h head/contrib/llvm/lib/CodeGen/PseudoSourceValue.cpp head/contrib/llvm/lib/CodeGen/RegAllocBase.cpp head/contrib/llvm/lib/CodeGen/RegAllocBase.h head/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp head/contrib/llvm/lib/CodeGen/RegAllocFast.cpp head/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp head/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp head/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp head/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp head/contrib/llvm/lib/CodeGen/RegisterCoalescer.h head/contrib/llvm/lib/CodeGen/RegisterPressure.cpp head/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp head/contrib/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm/lib/CodeGen/ShadowStackGC.cpp head/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.h head/contrib/llvm/lib/CodeGen/Spiller.h head/contrib/llvm/lib/CodeGen/SplitKit.cpp head/contrib/llvm/lib/CodeGen/SplitKit.h head/contrib/llvm/lib/CodeGen/StackColoring.cpp head/contrib/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp head/contrib/llvm/lib/CodeGen/StackMaps.cpp head/contrib/llvm/lib/CodeGen/StackProtector.cpp head/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp head/contrib/llvm/lib/CodeGen/TailDuplication.cpp head/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp head/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringBase.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp head/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp head/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/TargetSchedule.cpp head/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp head/contrib/llvm/lib/CodeGen/UnreachableBlockElim.cpp head/contrib/llvm/lib/CodeGen/VirtRegMap.cpp head/contrib/llvm/lib/DebugInfo/DIContext.cpp head/contrib/llvm/lib/DebugInfo/DWARFAbbreviationDeclaration.cpp head/contrib/llvm/lib/DebugInfo/DWARFCompileUnit.cpp head/contrib/llvm/lib/DebugInfo/DWARFContext.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugAbbrev.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugAranges.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugFrame.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugLine.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugLoc.cpp head/contrib/llvm/lib/DebugInfo/DWARFDebugRangeList.cpp head/contrib/llvm/lib/DebugInfo/DWARFFormValue.cpp head/contrib/llvm/lib/DebugInfo/DWARFTypeUnit.cpp head/contrib/llvm/lib/DebugInfo/DWARFUnit.cpp head/contrib/llvm/lib/ExecutionEngine/EventListenerCommon.h head/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp head/contrib/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h head/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h head/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp head/contrib/llvm/lib/IR/AsmWriter.cpp head/contrib/llvm/lib/IR/AsmWriter.h head/contrib/llvm/lib/IR/AttributeImpl.h head/contrib/llvm/lib/IR/AutoUpgrade.cpp head/contrib/llvm/lib/IR/BasicBlock.cpp head/contrib/llvm/lib/IR/ConstantFold.cpp head/contrib/llvm/lib/IR/ConstantFold.h head/contrib/llvm/lib/IR/Constants.cpp head/contrib/llvm/lib/IR/ConstantsContext.h head/contrib/llvm/lib/IR/Core.cpp head/contrib/llvm/lib/IR/DIBuilder.cpp head/contrib/llvm/lib/IR/DataLayout.cpp head/contrib/llvm/lib/IR/DebugInfo.cpp head/contrib/llvm/lib/IR/DebugLoc.cpp head/contrib/llvm/lib/IR/DiagnosticInfo.cpp head/contrib/llvm/lib/IR/DiagnosticPrinter.cpp head/contrib/llvm/lib/IR/Dominators.cpp head/contrib/llvm/lib/IR/Function.cpp head/contrib/llvm/lib/IR/GCOV.cpp head/contrib/llvm/lib/IR/Globals.cpp head/contrib/llvm/lib/IR/IRBuilder.cpp head/contrib/llvm/lib/IR/IRPrintingPasses.cpp head/contrib/llvm/lib/IR/InlineAsm.cpp head/contrib/llvm/lib/IR/Instruction.cpp head/contrib/llvm/lib/IR/Instructions.cpp head/contrib/llvm/lib/IR/IntrinsicInst.cpp head/contrib/llvm/lib/IR/LLVMContext.cpp head/contrib/llvm/lib/IR/LLVMContextImpl.cpp head/contrib/llvm/lib/IR/LLVMContextImpl.h head/contrib/llvm/lib/IR/LeaksContext.h head/contrib/llvm/lib/IR/LegacyPassManager.cpp head/contrib/llvm/lib/IR/MDBuilder.cpp head/contrib/llvm/lib/IR/Mangler.cpp head/contrib/llvm/lib/IR/Metadata.cpp head/contrib/llvm/lib/IR/Module.cpp head/contrib/llvm/lib/IR/PassManager.cpp head/contrib/llvm/lib/IR/PassRegistry.cpp head/contrib/llvm/lib/IR/SymbolTableListTraitsImpl.h head/contrib/llvm/lib/IR/Type.cpp head/contrib/llvm/lib/IR/TypeFinder.cpp head/contrib/llvm/lib/IR/Use.cpp head/contrib/llvm/lib/IR/User.cpp head/contrib/llvm/lib/IR/Value.cpp head/contrib/llvm/lib/IR/ValueSymbolTable.cpp head/contrib/llvm/lib/IR/Verifier.cpp head/contrib/llvm/lib/IRReader/IRReader.cpp head/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp head/contrib/llvm/lib/LTO/LTOModule.cpp head/contrib/llvm/lib/Linker/LinkModules.cpp head/contrib/llvm/lib/MC/ConstantPools.cpp head/contrib/llvm/lib/MC/ELFObjectWriter.cpp head/contrib/llvm/lib/MC/MCAsmInfo.cpp head/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp head/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp head/contrib/llvm/lib/MC/MCAsmInfoELF.cpp head/contrib/llvm/lib/MC/MCAsmStreamer.cpp head/contrib/llvm/lib/MC/MCAssembler.cpp head/contrib/llvm/lib/MC/MCContext.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h head/contrib/llvm/lib/MC/MCDwarf.cpp head/contrib/llvm/lib/MC/MCELFStreamer.cpp head/contrib/llvm/lib/MC/MCExpr.cpp head/contrib/llvm/lib/MC/MCLinkerOptimizationHint.cpp head/contrib/llvm/lib/MC/MCMachOStreamer.cpp head/contrib/llvm/lib/MC/MCNullStreamer.cpp head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp head/contrib/llvm/lib/MC/MCObjectStreamer.cpp head/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp head/contrib/llvm/lib/MC/MCParser/COFFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmParser.cpp head/contrib/llvm/lib/MC/MCSectionCOFF.cpp head/contrib/llvm/lib/MC/MCSectionELF.cpp head/contrib/llvm/lib/MC/MCStreamer.cpp head/contrib/llvm/lib/MC/MCSubtargetInfo.cpp head/contrib/llvm/lib/MC/MCTargetOptions.cpp head/contrib/llvm/lib/MC/MCWin64EH.cpp head/contrib/llvm/lib/MC/MachObjectWriter.cpp head/contrib/llvm/lib/MC/StringTableBuilder.cpp head/contrib/llvm/lib/MC/SubtargetFeature.cpp head/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp head/contrib/llvm/lib/MC/WinCOFFStreamer.cpp head/contrib/llvm/lib/Object/Archive.cpp head/contrib/llvm/lib/Object/Binary.cpp head/contrib/llvm/lib/Object/COFFObjectFile.cpp head/contrib/llvm/lib/Object/COFFYAML.cpp head/contrib/llvm/lib/Object/ELF.cpp head/contrib/llvm/lib/Object/ELFObjectFile.cpp head/contrib/llvm/lib/Object/ELFYAML.cpp head/contrib/llvm/lib/Object/Error.cpp head/contrib/llvm/lib/Object/IRObjectFile.cpp head/contrib/llvm/lib/Object/MachOObjectFile.cpp head/contrib/llvm/lib/Object/MachOUniversal.cpp head/contrib/llvm/lib/Object/Object.cpp head/contrib/llvm/lib/Object/ObjectFile.cpp head/contrib/llvm/lib/Object/RecordStreamer.h head/contrib/llvm/lib/Object/SymbolicFile.cpp head/contrib/llvm/lib/Option/ArgList.cpp head/contrib/llvm/lib/Option/OptTable.cpp head/contrib/llvm/lib/Option/Option.cpp head/contrib/llvm/lib/ProfileData/InstrProf.cpp head/contrib/llvm/lib/ProfileData/InstrProfIndexed.h head/contrib/llvm/lib/ProfileData/InstrProfReader.cpp head/contrib/llvm/lib/ProfileData/InstrProfWriter.cpp head/contrib/llvm/lib/Support/APFloat.cpp head/contrib/llvm/lib/Support/APInt.cpp head/contrib/llvm/lib/Support/CommandLine.cpp head/contrib/llvm/lib/Support/Compression.cpp head/contrib/llvm/lib/Support/DataStream.cpp head/contrib/llvm/lib/Support/Debug.cpp head/contrib/llvm/lib/Support/Dwarf.cpp head/contrib/llvm/lib/Support/Errno.cpp head/contrib/llvm/lib/Support/ErrorHandling.cpp head/contrib/llvm/lib/Support/FileOutputBuffer.cpp head/contrib/llvm/lib/Support/FileUtilities.cpp head/contrib/llvm/lib/Support/GraphWriter.cpp head/contrib/llvm/lib/Support/Host.cpp head/contrib/llvm/lib/Support/LineIterator.cpp head/contrib/llvm/lib/Support/LockFileManager.cpp head/contrib/llvm/lib/Support/MD5.cpp head/contrib/llvm/lib/Support/MemoryBuffer.cpp head/contrib/llvm/lib/Support/MemoryObject.cpp head/contrib/llvm/lib/Support/Path.cpp head/contrib/llvm/lib/Support/Process.cpp head/contrib/llvm/lib/Support/RandomNumberGenerator.cpp head/contrib/llvm/lib/Support/ScaledNumber.cpp head/contrib/llvm/lib/Support/SmallPtrSet.cpp head/contrib/llvm/lib/Support/SourceMgr.cpp head/contrib/llvm/lib/Support/SpecialCaseList.cpp head/contrib/llvm/lib/Support/StringRef.cpp head/contrib/llvm/lib/Support/ThreadLocal.cpp head/contrib/llvm/lib/Support/TimeValue.cpp head/contrib/llvm/lib/Support/Timer.cpp head/contrib/llvm/lib/Support/ToolOutputFile.cpp head/contrib/llvm/lib/Support/Triple.cpp head/contrib/llvm/lib/Support/Unix/Host.inc head/contrib/llvm/lib/Support/Unix/Memory.inc head/contrib/llvm/lib/Support/Unix/Path.inc head/contrib/llvm/lib/Support/Unix/Process.inc head/contrib/llvm/lib/Support/Unix/Program.inc head/contrib/llvm/lib/Support/Unix/RWMutex.inc head/contrib/llvm/lib/Support/Unix/Signals.inc head/contrib/llvm/lib/Support/Unix/ThreadLocal.inc head/contrib/llvm/lib/Support/Unix/TimeValue.inc head/contrib/llvm/lib/Support/Unix/Unix.h head/contrib/llvm/lib/Support/Windows/DynamicLibrary.inc head/contrib/llvm/lib/Support/Windows/Host.inc head/contrib/llvm/lib/Support/Windows/Path.inc head/contrib/llvm/lib/Support/Windows/Process.inc head/contrib/llvm/lib/Support/Windows/Program.inc head/contrib/llvm/lib/Support/Windows/RWMutex.inc head/contrib/llvm/lib/Support/Windows/ThreadLocal.inc head/contrib/llvm/lib/Support/Windows/WindowsSupport.h head/contrib/llvm/lib/Support/Windows/explicit_symbols.inc head/contrib/llvm/lib/Support/YAMLParser.cpp head/contrib/llvm/lib/Support/YAMLTraits.cpp head/contrib/llvm/lib/Support/raw_ostream.cpp head/contrib/llvm/lib/Support/regcomp.c head/contrib/llvm/lib/TableGen/Main.cpp head/contrib/llvm/lib/TableGen/Record.cpp head/contrib/llvm/lib/TableGen/TGLexer.cpp head/contrib/llvm/lib/TableGen/TGLexer.h head/contrib/llvm/lib/TableGen/TGParser.cpp head/contrib/llvm/lib/TableGen/TGParser.h head/contrib/llvm/lib/Target/AArch64/AArch64.h head/contrib/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp head/contrib/llvm/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp head/contrib/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CallingConvention.td head/contrib/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp head/contrib/llvm/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FastISel.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.h head/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h head/contrib/llvm/lib/Target/AArch64/AArch64InstrAtomics.td head/contrib/llvm/lib/Target/AArch64/AArch64InstrFormats.td head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td head/contrib/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.cpp head/contrib/llvm/lib/Target/AArch64/AArch64MCInstLower.h head/contrib/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64PerfectShuffle.h head/contrib/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedA57.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedA57WriteRes.td head/contrib/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp head/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.cpp head/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h head/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp head/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.h head/contrib/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h head/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp head/contrib/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.h head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.h head/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp head/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64FixupKinds.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp head/contrib/llvm/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h head/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARM.h head/contrib/llvm/lib/Target/ARM/ARM.td head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.h head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h head/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h head/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/ARM/ARMFPUName.def head/contrib/llvm/lib/Target/ARM/ARMFPUName.h head/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp head/contrib/llvm/lib/Target/ARM/ARMFeatures.h head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h head/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.cpp head/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.h head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.h head/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td head/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td head/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td head/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARMMCInstLower.cpp head/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h head/contrib/llvm/lib/Target/ARM/ARMOptimizeBarriersPass.cpp head/contrib/llvm/lib/Target/ARM/ARMPerfectShuffle.h head/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.h head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h head/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.h head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.h head/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.h head/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMArchName.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h head/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.h head/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.h head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp head/contrib/llvm/lib/Target/CppBackend/CPPTargetMachine.h head/contrib/llvm/lib/Target/Hexagon/Hexagon.h head/contrib/llvm/lib/Target/Hexagon/Hexagon.td head/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.h head/contrib/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonCallingConvLower.h head/contrib/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.h head/contrib/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.h head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV3.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV5.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsics.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsDerived.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonMachineFunctionInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.h head/contrib/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonOperands.td head/contrib/llvm/lib/Target/Hexagon/HexagonPeephole.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td head/contrib/llvm/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.h head/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.h head/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.h head/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonVarargsCallingConvention.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.h head/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.h head/contrib/llvm/lib/Target/MSP430/MSP430.h head/contrib/llvm/lib/Target/MSP430/MSP430BranchSelector.cpp head/contrib/llvm/lib/Target/MSP430/MSP430CallingConv.td head/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp head/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.h head/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.td head/contrib/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp head/contrib/llvm/lib/Target/MSP430/MSP430MCInstLower.h head/contrib/llvm/lib/Target/MSP430/MSP430MachineFunctionInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.td head/contrib/llvm/lib/Target/MSP430/MSP430SelectionDAGInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430Subtarget.cpp head/contrib/llvm/lib/Target/MSP430/MSP430Subtarget.h head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.h head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCNaCl.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp head/contrib/llvm/lib/Target/Mips/MicroMipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips.h head/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.h head/contrib/llvm/lib/Target/Mips/Mips16HardFloat.cpp head/contrib/llvm/lib/Target/Mips/Mips16HardFloat.h head/contrib/llvm/lib/Target/Mips/Mips16HardFloatInfo.h head/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.h head/contrib/llvm/lib/Target/Mips/Mips16InstrFormats.td head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.h head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.h head/contrib/llvm/lib/Target/Mips/Mips32r6InstrFormats.td head/contrib/llvm/lib/Target/Mips/Mips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.cpp head/contrib/llvm/lib/Target/Mips/MipsAnalyzeImmediate.h head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.h head/contrib/llvm/lib/Target/Mips/MipsCCState.h head/contrib/llvm/lib/Target/Mips/MipsCallingConv.td head/contrib/llvm/lib/Target/Mips/MipsCondMov.td head/contrib/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp head/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp head/contrib/llvm/lib/Target/Mips/MipsFastISel.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp head/contrib/llvm/lib/Target/Mips/MipsMCInstLower.h head/contrib/llvm/lib/Target/Mips/MipsMSAInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.cpp head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.h head/contrib/llvm/lib/Target/Mips/MipsModuleISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsOptimizePICCall.cpp head/contrib/llvm/lib/Target/Mips/MipsOptionRecord.h head/contrib/llvm/lib/Target/Mips/MipsOs16.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.h head/contrib/llvm/lib/Target/Mips/MipsSelectionDAGInfo.h head/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp head/contrib/llvm/lib/Target/Mips/MipsSubtarget.h head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h head/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.h head/contrib/llvm/lib/Target/Mips/MipsTargetStreamer.h head/contrib/llvm/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.h head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXBaseInfo.h head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.h head/contrib/llvm/lib/Target/NVPTX/ManagedStringPool.h head/contrib/llvm/lib/Target/NVPTX/NVPTX.h head/contrib/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.h head/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h head/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.h head/contrib/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h head/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.h head/contrib/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.h head/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.h head/contrib/llvm/lib/Target/NVPTX/NVPTXMachineFunctionInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXSection.h head/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h head/contrib/llvm/lib/Target/NVPTX/NVPTXUtilities.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXUtilities.h head/contrib/llvm/lib/Target/NVPTX/NVPTXVector.td head/contrib/llvm/lib/Target/NVPTX/NVPTXutil.h head/contrib/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp head/contrib/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h head/contrib/llvm/lib/Target/PowerPC/PPC.h head/contrib/llvm/lib/Target/PowerPC/PPC.td head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td head/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.h head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrAltivec.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrBuilder.h head/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrVSX.td head/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCPerfectShuffle.h head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCSchedule.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleP7.td head/contrib/llvm/lib/Target/PowerPC/PPCSelectionDAGInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetStreamer.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp head/contrib/llvm/lib/Target/R600/AMDGPU.h head/contrib/llvm/lib/Target/R600/AMDGPU.td head/contrib/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp head/contrib/llvm/lib/Target/R600/AMDGPUAsmPrinter.h head/contrib/llvm/lib/Target/R600/AMDGPUCallingConv.td head/contrib/llvm/lib/Target/R600/AMDGPUFrameLowering.h head/contrib/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp head/contrib/llvm/lib/Target/R600/AMDGPUISelLowering.cpp head/contrib/llvm/lib/Target/R600/AMDGPUISelLowering.h head/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.cpp head/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.h head/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.td head/contrib/llvm/lib/Target/R600/AMDGPUInstructions.td head/contrib/llvm/lib/Target/R600/AMDGPUIntrinsicInfo.cpp head/contrib/llvm/lib/Target/R600/AMDGPUIntrinsicInfo.h head/contrib/llvm/lib/Target/R600/AMDGPUMCInstLower.cpp head/contrib/llvm/lib/Target/R600/AMDGPUMCInstLower.h head/contrib/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp head/contrib/llvm/lib/Target/R600/AMDGPUMachineFunction.h head/contrib/llvm/lib/Target/R600/AMDGPUPromoteAlloca.cpp head/contrib/llvm/lib/Target/R600/AMDGPURegisterInfo.cpp head/contrib/llvm/lib/Target/R600/AMDGPURegisterInfo.h head/contrib/llvm/lib/Target/R600/AMDGPUSubtarget.cpp head/contrib/llvm/lib/Target/R600/AMDGPUSubtarget.h head/contrib/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp head/contrib/llvm/lib/Target/R600/AMDGPUTargetMachine.h head/contrib/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp head/contrib/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp head/contrib/llvm/lib/Target/R600/CaymanInstructions.td head/contrib/llvm/lib/Target/R600/EvergreenInstructions.td head/contrib/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp head/contrib/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h head/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp head/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUFixupKinds.h head/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp head/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.h head/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h head/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.cpp head/contrib/llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.h head/contrib/llvm/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp head/contrib/llvm/lib/Target/R600/Processors.td head/contrib/llvm/lib/Target/R600/R600ClauseMergePass.cpp head/contrib/llvm/lib/Target/R600/R600ControlFlowFinalizer.cpp head/contrib/llvm/lib/Target/R600/R600Defines.h head/contrib/llvm/lib/Target/R600/R600EmitClauseMarkers.cpp head/contrib/llvm/lib/Target/R600/R600ExpandSpecialInstrs.cpp head/contrib/llvm/lib/Target/R600/R600ISelLowering.cpp head/contrib/llvm/lib/Target/R600/R600ISelLowering.h head/contrib/llvm/lib/Target/R600/R600InstrFormats.td head/contrib/llvm/lib/Target/R600/R600InstrInfo.cpp head/contrib/llvm/lib/Target/R600/R600InstrInfo.h head/contrib/llvm/lib/Target/R600/R600Instructions.td head/contrib/llvm/lib/Target/R600/R600MachineFunctionInfo.h head/contrib/llvm/lib/Target/R600/R600MachineScheduler.cpp head/contrib/llvm/lib/Target/R600/R600MachineScheduler.h head/contrib/llvm/lib/Target/R600/R600OptimizeVectorRegisters.cpp head/contrib/llvm/lib/Target/R600/R600Packetizer.cpp head/contrib/llvm/lib/Target/R600/R600RegisterInfo.h head/contrib/llvm/lib/Target/R600/SIAnnotateControlFlow.cpp head/contrib/llvm/lib/Target/R600/SIDefines.h head/contrib/llvm/lib/Target/R600/SIFixSGPRCopies.cpp head/contrib/llvm/lib/Target/R600/SIFixSGPRLiveRanges.cpp head/contrib/llvm/lib/Target/R600/SIISelLowering.cpp head/contrib/llvm/lib/Target/R600/SIISelLowering.h head/contrib/llvm/lib/Target/R600/SIInsertWaits.cpp head/contrib/llvm/lib/Target/R600/SIInstrFormats.td head/contrib/llvm/lib/Target/R600/SIInstrInfo.cpp head/contrib/llvm/lib/Target/R600/SIInstrInfo.h head/contrib/llvm/lib/Target/R600/SIInstrInfo.td head/contrib/llvm/lib/Target/R600/SIInstructions.td head/contrib/llvm/lib/Target/R600/SILowerControlFlow.cpp head/contrib/llvm/lib/Target/R600/SILowerI1Copies.cpp head/contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.cpp head/contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.h head/contrib/llvm/lib/Target/R600/SIRegisterInfo.cpp head/contrib/llvm/lib/Target/R600/SIRegisterInfo.h head/contrib/llvm/lib/Target/R600/SIRegisterInfo.td head/contrib/llvm/lib/Target/R600/SISchedule.td head/contrib/llvm/lib/Target/R600/SIShrinkInstructions.cpp head/contrib/llvm/lib/Target/R600/SITypeRewriter.cpp head/contrib/llvm/lib/Target/R600/TargetInfo/AMDGPUTargetInfo.cpp head/contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp (contents, props changed) head/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp head/contrib/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp (contents, props changed) head/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.h (contents, props changed) head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h head/contrib/llvm/lib/Target/Sparc/Sparc.h head/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp head/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.h head/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.h head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td head/contrib/llvm/lib/Target/Sparc/SparcInstrVIS.td head/contrib/llvm/lib/Target/Sparc/SparcMachineFunctionInfo.h head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h head/contrib/llvm/lib/Target/Sparc/SparcSelectionDAGInfo.h head/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h head/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.h head/contrib/llvm/lib/Target/Sparc/SparcTargetStreamer.h head/contrib/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp head/contrib/llvm/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp head/contrib/llvm/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCFixups.h head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h head/contrib/llvm/lib/Target/SystemZ/SystemZ.h head/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.h head/contrib/llvm/lib/Target/SystemZ/SystemZCallingConv.h head/contrib/llvm/lib/Target/SystemZ/SystemZConstantPoolValue.h head/contrib/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.h head/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrBuilder.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrFP.td head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.td head/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZMCInstLower.h head/contrib/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.h head/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.h head/contrib/llvm/lib/Target/Target.cpp head/contrib/llvm/lib/Target/TargetLibraryInfo.cpp head/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp head/contrib/llvm/lib/Target/TargetMachine.cpp head/contrib/llvm/lib/Target/TargetMachineC.cpp head/contrib/llvm/lib/Target/TargetSubtargetInfo.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.h head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParserCommon.h head/contrib/llvm/lib/Target/X86/AsmParser/X86Operand.h head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.h head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86FixupKinds.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp head/contrib/llvm/lib/Target/X86/TargetInfo/X86TargetInfo.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h head/contrib/llvm/lib/Target/X86/X86.h head/contrib/llvm/lib/Target/X86/X86.td head/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp head/contrib/llvm/lib/Target/X86/X86AsmPrinter.h head/contrib/llvm/lib/Target/X86/X86CallingConv.h head/contrib/llvm/lib/Target/X86/X86CallingConv.td head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp head/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.h head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm/lib/Target/X86/X86InstrAVX512.td head/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td head/contrib/llvm/lib/Target/X86/X86InstrBuilder.h head/contrib/llvm/lib/Target/X86/X86InstrCompiler.td head/contrib/llvm/lib/Target/X86/X86InstrControl.td head/contrib/llvm/lib/Target/X86/X86InstrExtension.td head/contrib/llvm/lib/Target/X86/X86InstrFMA.td head/contrib/llvm/lib/Target/X86/X86InstrFPStack.td head/contrib/llvm/lib/Target/X86/X86InstrFormats.td head/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86InstrInfo.h head/contrib/llvm/lib/Target/X86/X86InstrInfo.td head/contrib/llvm/lib/Target/X86/X86InstrMMX.td head/contrib/llvm/lib/Target/X86/X86InstrSSE.td head/contrib/llvm/lib/Target/X86/X86InstrShiftRotate.td head/contrib/llvm/lib/Target/X86/X86InstrSystem.td head/contrib/llvm/lib/Target/X86/X86InstrTSX.td head/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp head/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.cpp head/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.h head/contrib/llvm/lib/Target/X86/X86PadShortFunction.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.h head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td head/contrib/llvm/lib/Target/X86/X86SchedHaswell.td head/contrib/llvm/lib/Target/X86/X86SchedSandyBridge.td head/contrib/llvm/lib/Target/X86/X86Schedule.td head/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td head/contrib/llvm/lib/Target/X86/X86ScheduleSLM.td head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.h head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.h head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/lib/Target/X86/X86TargetMachine.h head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp head/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp head/contrib/llvm/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp head/contrib/llvm/lib/Target/XCore/InstPrinter/XCoreInstPrinter.h head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.h head/contrib/llvm/lib/Target/XCore/XCore.h head/contrib/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.h head/contrib/llvm/lib/Target/XCore/XCoreFrameToArgsOffsetElim.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.h head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td head/contrib/llvm/lib/Target/XCore/XCoreMCInstLower.h head/contrib/llvm/lib/Target/XCore/XCoreMachineFunctionInfo.h head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h head/contrib/llvm/lib/Target/XCore/XCoreSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreSelectionDAGInfo.h head/contrib/llvm/lib/Target/XCore/XCoreSubtarget.h head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.h head/contrib/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetObjectFile.h head/contrib/llvm/lib/Target/XCore/XCoreTargetStreamer.h head/contrib/llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp head/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp head/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp head/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp head/contrib/llvm/lib/Transforms/IPO/ExtractGV.cpp head/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalDCE.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp head/contrib/llvm/lib/Transforms/IPO/InlineAlways.cpp head/contrib/llvm/lib/Transforms/IPO/InlineSimple.cpp head/contrib/llvm/lib/Transforms/IPO/Inliner.cpp head/contrib/llvm/lib/Transforms/IPO/Internalize.cpp head/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp head/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp head/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp head/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineWorklist.h head/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp head/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp head/contrib/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h head/contrib/llvm/lib/Transforms/ObjCARC/DependencyAnalysis.cpp head/contrib/llvm/lib/Transforms/ObjCARC/DependencyAnalysis.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARC.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARC.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ProvenanceAnalysis.h head/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp head/contrib/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp head/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp head/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp head/contrib/llvm/lib/Transforms/Scalar/GVN.cpp head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp head/contrib/llvm/lib/Transforms/Scalar/LICM.cpp head/contrib/llvm/lib/Transforms/Scalar/LoadCombine.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopDeletion.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp head/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp head/contrib/llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp head/contrib/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp head/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/Reg2Mem.cpp head/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp head/contrib/llvm/lib/Transforms/Scalar/SampleProfile.cpp head/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp head/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp head/contrib/llvm/lib/Transforms/Scalar/Scalarizer.cpp head/contrib/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp head/contrib/llvm/lib/Transforms/Scalar/Sink.cpp head/contrib/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp head/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp head/contrib/llvm/lib/Transforms/Utils/AddDiscriminators.cpp head/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp head/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp head/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp head/contrib/llvm/lib/Transforms/Utils/CloneModule.cpp head/contrib/llvm/lib/Transforms/Utils/CtorUtils.cpp head/contrib/llvm/lib/Transforms/Utils/FlattenCFG.cpp head/contrib/llvm/lib/Transforms/Utils/GlobalStatus.cpp head/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp head/contrib/llvm/lib/Transforms/Utils/IntegerDivision.cpp head/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp head/contrib/llvm/lib/Transforms/Utils/Local.cpp head/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp head/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp head/contrib/llvm/lib/Transforms/Utils/Mem2Reg.cpp head/contrib/llvm/lib/Transforms/Utils/ModuleUtils.cpp head/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyInstructions.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp head/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp head/contrib/llvm/lib/Transforms/Vectorize/BBVectorize.cpp head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp head/contrib/llvm/patches/README.TXT head/contrib/llvm/tools/bugpoint/BugDriver.cpp head/contrib/llvm/tools/bugpoint/BugDriver.h head/contrib/llvm/tools/bugpoint/CrashDebugger.cpp head/contrib/llvm/tools/bugpoint/ExtractFunction.cpp head/contrib/llvm/tools/bugpoint/ListReducer.h head/contrib/llvm/tools/bugpoint/Miscompilation.cpp head/contrib/llvm/tools/bugpoint/OptimizerDriver.cpp head/contrib/llvm/tools/bugpoint/ToolRunner.cpp head/contrib/llvm/tools/bugpoint/ToolRunner.h head/contrib/llvm/tools/bugpoint/bugpoint.cpp head/contrib/llvm/tools/clang/include/clang-c/BuildSystem.h head/contrib/llvm/tools/clang/include/clang-c/CXCompilationDatabase.h head/contrib/llvm/tools/clang/include/clang-c/CXErrorCode.h head/contrib/llvm/tools/clang/include/clang-c/CXString.h head/contrib/llvm/tools/clang/include/clang-c/Documentation.h head/contrib/llvm/tools/clang/include/clang-c/Index.h head/contrib/llvm/tools/clang/include/clang-c/Platform.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMTActions.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/FileRemapper.h head/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h head/contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h head/contrib/llvm/tools/clang/include/clang/AST/ASTFwd.h head/contrib/llvm/tools/clang/include/clang/AST/ASTLambda.h head/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h head/contrib/llvm/tools/clang/include/clang/AST/ASTTypeTraits.h head/contrib/llvm/tools/clang/include/clang/AST/ASTVector.h head/contrib/llvm/tools/clang/include/clang/AST/Attr.h head/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h head/contrib/llvm/tools/clang/include/clang/AST/Comment.h head/contrib/llvm/tools/clang/include/clang/AST/CommentBriefParser.h head/contrib/llvm/tools/clang/include/clang/AST/CommentCommandTraits.h head/contrib/llvm/tools/clang/include/clang/AST/CommentDiagnostic.h head/contrib/llvm/tools/clang/include/clang/AST/CommentLexer.h head/contrib/llvm/tools/clang/include/clang/AST/CommentParser.h head/contrib/llvm/tools/clang/include/clang/AST/CommentSema.h head/contrib/llvm/tools/clang/include/clang/AST/DataRecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Decl.h head/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h head/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h head/contrib/llvm/tools/clang/include/clang/AST/DeclLookups.h head/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h head/contrib/llvm/tools/clang/include/clang/AST/DeclOpenMP.h head/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h head/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h head/contrib/llvm/tools/clang/include/clang/AST/DependentDiagnostic.h head/contrib/llvm/tools/clang/include/clang/AST/EvaluatedExprVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Expr.h head/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h head/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h head/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h head/contrib/llvm/tools/clang/include/clang/AST/LambdaCapture.h head/contrib/llvm/tools/clang/include/clang/AST/Mangle.h head/contrib/llvm/tools/clang/include/clang/AST/MangleNumberingContext.h head/contrib/llvm/tools/clang/include/clang/AST/NSAPI.h head/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h head/contrib/llvm/tools/clang/include/clang/AST/OpenMPClause.h head/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.h head/contrib/llvm/tools/clang/include/clang/AST/ParentMap.h head/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h head/contrib/llvm/tools/clang/include/clang/AST/RawCommentList.h head/contrib/llvm/tools/clang/include/clang/AST/RecordLayout.h head/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Stmt.h head/contrib/llvm/tools/clang/include/clang/AST/StmtGraphTraits.h head/contrib/llvm/tools/clang/include/clang/AST/StmtIterator.h head/contrib/llvm/tools/clang/include/clang/AST/StmtOpenMP.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h head/contrib/llvm/tools/clang/include/clang/AST/Type.h head/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h head/contrib/llvm/tools/clang/include/clang/AST/TypeOrdering.h head/contrib/llvm/tools/clang/include/clang/AST/UnresolvedSet.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchFinder.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersMacros.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/Parser.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/Registry.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Consumed.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Dominators.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ReachableCode.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyLogical.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyOps.def head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h head/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h head/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h head/contrib/llvm/tools/clang/include/clang/Analysis/CFGStmtMap.h head/contrib/llvm/tools/clang/include/clang/Analysis/CallGraph.h head/contrib/llvm/tools/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h head/contrib/llvm/tools/clang/include/clang/Analysis/DomainSpecific/ObjCNoReturn.h head/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h head/contrib/llvm/tools/clang/include/clang/Analysis/Support/BumpVector.h head/contrib/llvm/tools/clang/include/clang/Basic/ABI.h head/contrib/llvm/tools/clang/include/clang/Basic/AddressSpaces.h head/contrib/llvm/tools/clang/include/clang/Basic/AllDiagnostics.h head/contrib/llvm/tools/clang/include/clang/Basic/Attr.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/Attributes.h head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsNVPTX.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsPPC.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsR600.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def head/contrib/llvm/tools/clang/include/clang/Basic/CharInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/CommentOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.def head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/ExceptionSpecificationType.h head/contrib/llvm/tools/clang/include/clang/Basic/ExpressionTraits.h head/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h head/contrib/llvm/tools/clang/include/clang/Basic/FileSystemStatCache.h head/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h head/contrib/llvm/tools/clang/include/clang/Basic/LLVM.h head/contrib/llvm/tools/clang/include/clang/Basic/Lambda.h head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/Module.h head/contrib/llvm/tools/clang/include/clang/Basic/ObjCRuntime.h head/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/OperatorKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/OperatorPrecedence.h head/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/PlistSupport.h head/contrib/llvm/tools/clang/include/clang/Basic/PrettyStackTrace.h head/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.def head/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManagerInternals.h head/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h head/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/TargetBuiltins.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetCXXABI.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/TemplateKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h head/contrib/llvm/tools/clang/include/clang/Basic/VersionTuple.h head/contrib/llvm/tools/clang/include/clang/Basic/VirtualFileSystem.h head/contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td head/contrib/llvm/tools/clang/include/clang/CodeGen/BackendUtil.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CGFunctionInfo.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenABITypes.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenAction.h head/contrib/llvm/tools/clang/include/clang/CodeGen/ModuleBuilder.h head/contrib/llvm/tools/clang/include/clang/Driver/Action.h head/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td head/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td head/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h head/contrib/llvm/tools/clang/include/clang/Driver/Driver.h head/contrib/llvm/tools/clang/include/clang/Driver/DriverDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Driver/Job.h head/contrib/llvm/tools/clang/include/clang/Driver/Multilib.h head/contrib/llvm/tools/clang/include/clang/Driver/Options.h head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/include/clang/Driver/Phases.h head/contrib/llvm/tools/clang/include/clang/Driver/SanitizerArgs.h head/contrib/llvm/tools/clang/include/clang/Driver/Tool.h head/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h head/contrib/llvm/tools/clang/include/clang/Driver/Types.h head/contrib/llvm/tools/clang/include/clang/Driver/Util.h head/contrib/llvm/tools/clang/include/clang/Format/Format.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h head/contrib/llvm/tools/clang/include/clang/Frontend/ChainedDiagnosticConsumer.h head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h head/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticRenderer.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendPluginRegistry.h head/contrib/llvm/tools/clang/include/clang/Frontend/LangStandard.h head/contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def head/contrib/llvm/tools/clang/include/clang/Frontend/LogDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/MigratorOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/MultiplexConsumer.h head/contrib/llvm/tools/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticBuffer.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h head/contrib/llvm/tools/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h head/contrib/llvm/tools/clang/include/clang/Lex/ExternalPreprocessorSource.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderMap.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearchOptions.h head/contrib/llvm/tools/clang/include/clang/Lex/LexDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h head/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroArgs.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h head/contrib/llvm/tools/clang/include/clang/Lex/ModuleLoader.h head/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h head/contrib/llvm/tools/clang/include/clang/Lex/MultipleIncludeOpt.h head/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h head/contrib/llvm/tools/clang/include/clang/Lex/PTHLexer.h head/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h head/contrib/llvm/tools/clang/include/clang/Lex/Pragma.h head/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h head/contrib/llvm/tools/clang/include/clang/Lex/ScratchBuffer.h head/contrib/llvm/tools/clang/include/clang/Lex/Token.h head/contrib/llvm/tools/clang/include/clang/Lex/TokenConcatenation.h head/contrib/llvm/tools/clang/include/clang/Lex/TokenLexer.h head/contrib/llvm/tools/clang/include/clang/Parse/ParseDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Parse/Parser.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/DeltaTree.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/HTMLRewrite.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/RewriteRope.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/Rewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Core/TokenRewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/FixItRewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/Rewriters.h head/contrib/llvm/tools/clang/include/clang/Sema/AnalysisBasedWarnings.h head/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h head/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h head/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/IdentifierResolver.h head/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h head/contrib/llvm/tools/clang/include/clang/Sema/LoopHint.h head/contrib/llvm/tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/ObjCMethodList.h head/contrib/llvm/tools/clang/include/clang/Sema/Overload.h head/contrib/llvm/tools/clang/include/clang/Sema/PrettyDeclStackTrace.h head/contrib/llvm/tools/clang/include/clang/Sema/Scope.h head/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h head/contrib/llvm/tools/clang/include/clang/Sema/Sema.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaFixItUtils.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaInternal.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaLambda.h head/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h head/contrib/llvm/tools/clang/include/clang/Sema/TypoCorrection.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTDeserializationListener.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h head/contrib/llvm/tools/clang/include/clang/Serialization/ContinuousRangeMap.h head/contrib/llvm/tools/clang/include/clang/Serialization/GlobalModuleIndex.h head/contrib/llvm/tools/clang/include/clang/Serialization/Module.h head/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h head/contrib/llvm/tools/clang/include/clang/Serialization/SerializationDiagnostic.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/LocalCheckers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintTag.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Tooling/ArgumentsAdjusters.h head/contrib/llvm/tools/clang/include/clang/Tooling/CommonOptionsParser.h head/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabase.h head/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabasePluginRegistry.h head/contrib/llvm/tools/clang/include/clang/Tooling/FileMatchTrie.h head/contrib/llvm/tools/clang/include/clang/Tooling/JSONCompilationDatabase.h head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring.h head/contrib/llvm/tools/clang/include/clang/Tooling/RefactoringCallbacks.h head/contrib/llvm/tools/clang/include/clang/Tooling/ReplacementsYaml.h head/contrib/llvm/tools/clang/include/clang/Tooling/Tooling.h head/contrib/llvm/tools/clang/include/clang/module.modulemap head/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/FileRemapper.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/Internals.h head/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/PlistReporter.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransformActions.cpp head/contrib/llvm/tools/clang/lib/AST/APValue.cpp head/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDumper.cpp head/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp head/contrib/llvm/tools/clang/lib/AST/ASTTypeTraits.cpp head/contrib/llvm/tools/clang/lib/AST/CXXABI.h head/contrib/llvm/tools/clang/lib/AST/Comment.cpp head/contrib/llvm/tools/clang/lib/AST/CommentCommandTraits.cpp head/contrib/llvm/tools/clang/lib/AST/CommentLexer.cpp head/contrib/llvm/tools/clang/lib/AST/Decl.cpp head/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp head/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp head/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp head/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/Expr.cpp head/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp head/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp head/contrib/llvm/tools/clang/lib/AST/Mangle.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp head/contrib/llvm/tools/clang/lib/AST/NSAPI.cpp head/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/Stmt.cpp head/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp head/contrib/llvm/tools/clang/lib/AST/Type.cpp head/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp head/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp head/contrib/llvm/tools/clang/lib/AST/VTTBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Marshallers.h head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Parser.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/VariantValue.cpp head/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp head/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.cpp head/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.h head/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp head/contrib/llvm/tools/clang/lib/Analysis/CallGraph.cpp head/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/FormatStringParsing.h head/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp head/contrib/llvm/tools/clang/lib/Analysis/ScanfFormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafetyCommon.cpp head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafetyTIL.cpp head/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp head/contrib/llvm/tools/clang/lib/Basic/Attributes.cpp head/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp head/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp head/contrib/llvm/tools/clang/lib/Basic/FileSystemStatCache.cpp head/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp head/contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp head/contrib/llvm/tools/clang/lib/Basic/Module.cpp head/contrib/llvm/tools/clang/lib/Basic/OpenMPKinds.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp head/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/Basic/VersionTuple.cpp head/contrib/llvm/tools/clang/lib/Basic/VirtualFileSystem.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuilder.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h head/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h head/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenABITypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h head/contrib/llvm/tools/clang/lib/CodeGen/EHScopeStack.h head/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h head/contrib/llvm/tools/clang/lib/Driver/Action.cpp head/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Driver/InputInfo.h head/contrib/llvm/tools/clang/lib/Driver/Job.cpp head/contrib/llvm/tools/clang/lib/Driver/Multilib.cpp head/contrib/llvm/tools/clang/lib/Driver/Phases.cpp head/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp head/contrib/llvm/tools/clang/lib/Driver/Tool.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp head/contrib/llvm/tools/clang/lib/Driver/Tools.h head/contrib/llvm/tools/clang/lib/Driver/Types.cpp head/contrib/llvm/tools/clang/lib/Edit/EditedSource.cpp head/contrib/llvm/tools/clang/lib/Edit/RewriteObjCFoundationAPI.cpp head/contrib/llvm/tools/clang/lib/Format/BreakableToken.cpp head/contrib/llvm/tools/clang/lib/Format/BreakableToken.h head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h head/contrib/llvm/tools/clang/lib/Format/Encoding.h head/contrib/llvm/tools/clang/lib/Format/Format.cpp head/contrib/llvm/tools/clang/lib/Format/FormatToken.cpp head/contrib/llvm/tools/clang/lib/Format/FormatToken.h head/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp head/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h head/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp head/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.h head/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp head/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp head/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp head/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp head/contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp head/contrib/llvm/tools/clang/lib/Frontend/DiagnosticRenderer.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/HeaderIncludeGen.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp head/contrib/llvm/tools/clang/lib/Frontend/LogDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp head/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp head/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/FixItRewriter.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/HTMLPrint.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/RewriteObjC.cpp head/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp head/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Headers/Intrin.h head/contrib/llvm/tools/clang/lib/Headers/altivec.h head/contrib/llvm/tools/clang/lib/Headers/arm_acle.h head/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h head/contrib/llvm/tools/clang/lib/Headers/cpuid.h head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h head/contrib/llvm/tools/clang/lib/Headers/float.h head/contrib/llvm/tools/clang/lib/Headers/immintrin.h head/contrib/llvm/tools/clang/lib/Headers/lzcntintrin.h head/contrib/llvm/tools/clang/lib/Headers/module.modulemap head/contrib/llvm/tools/clang/lib/Headers/shaintrin.h head/contrib/llvm/tools/clang/lib/Headers/stddef.h head/contrib/llvm/tools/clang/lib/Headers/unwind.h head/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h head/contrib/llvm/tools/clang/lib/Index/CommentToXML.cpp head/contrib/llvm/tools/clang/lib/Index/SimpleFormatContext.h head/contrib/llvm/tools/clang/lib/Index/USRGeneration.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp head/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroArgs.cpp head/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp head/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp head/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp head/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp head/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp head/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp head/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp head/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/UnicodeCharSets.h head/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseOpenMP.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseStmtAsm.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp head/contrib/llvm/tools/clang/lib/Parse/Parser.cpp head/contrib/llvm/tools/clang/lib/Parse/RAIIObjectsForParser.h head/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Rewriter.cpp head/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp head/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp head/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp head/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp head/contrib/llvm/tools/clang/lib/Sema/Scope.cpp head/contrib/llvm/tools/clang/lib/Sema/ScopeInfo.cpp head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h head/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.h head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderInternals.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/GlobalModuleIndex.cpp head/contrib/llvm/tools/clang/lib/Serialization/Module.cpp head/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AllocationDiagnostics.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/InterCheckerAPI.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SelectorExtras.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Tooling/ArgumentsAdjusters.cpp head/contrib/llvm/tools/clang/lib/Tooling/CommonOptionsParser.cpp head/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp head/contrib/llvm/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp head/contrib/llvm/tools/clang/lib/Tooling/Refactoring.cpp head/contrib/llvm/tools/clang/lib/Tooling/Tooling.cpp head/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp head/contrib/llvm/tools/clang/tools/driver/driver.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/TableGenBackends.h head/contrib/llvm/tools/llc/llc.cpp head/contrib/llvm/tools/lldb/docs/lldb.1 head/contrib/llvm/tools/lldb/include/lldb/API/LLDB.h head/contrib/llvm/tools/lldb/include/lldb/API/SBAddress.h head/contrib/llvm/tools/lldb/include/lldb/API/SBBreakpoint.h head/contrib/llvm/tools/lldb/include/lldb/API/SBCommandInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/API/SBCompileUnit.h head/contrib/llvm/tools/lldb/include/lldb/API/SBData.h head/contrib/llvm/tools/lldb/include/lldb/API/SBDebugger.h head/contrib/llvm/tools/lldb/include/lldb/API/SBDefines.h head/contrib/llvm/tools/lldb/include/lldb/API/SBEvent.h head/contrib/llvm/tools/lldb/include/lldb/API/SBFileSpec.h head/contrib/llvm/tools/lldb/include/lldb/API/SBFrame.h head/contrib/llvm/tools/lldb/include/lldb/API/SBFunction.h head/contrib/llvm/tools/lldb/include/lldb/API/SBListener.h head/contrib/llvm/tools/lldb/include/lldb/API/SBProcess.h head/contrib/llvm/tools/lldb/include/lldb/API/SBSection.h head/contrib/llvm/tools/lldb/include/lldb/API/SBStream.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTarget.h head/contrib/llvm/tools/lldb/include/lldb/API/SBThread.h head/contrib/llvm/tools/lldb/include/lldb/API/SBType.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTypeSummary.h head/contrib/llvm/tools/lldb/include/lldb/API/SBValue.h head/contrib/llvm/tools/lldb/include/lldb/API/SBValueList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/Breakpoint.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointID.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointIDList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocation.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolver.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverName.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointSite.h head/contrib/llvm/tools/lldb/include/lldb/Core/Address.h head/contrib/llvm/tools/lldb/include/lldb/Core/ArchSpec.h head/contrib/llvm/tools/lldb/include/lldb/Core/Communication.h head/contrib/llvm/tools/lldb/include/lldb/Core/Connection.h head/contrib/llvm/tools/lldb/include/lldb/Core/DataBuffer.h head/contrib/llvm/tools/lldb/include/lldb/Core/DataExtractor.h head/contrib/llvm/tools/lldb/include/lldb/Core/Debugger.h head/contrib/llvm/tools/lldb/include/lldb/Core/Disassembler.h head/contrib/llvm/tools/lldb/include/lldb/Core/FileSpecList.h head/contrib/llvm/tools/lldb/include/lldb/Core/IOHandler.h head/contrib/llvm/tools/lldb/include/lldb/Core/Mangled.h head/contrib/llvm/tools/lldb/include/lldb/Core/ModuleList.h head/contrib/llvm/tools/lldb/include/lldb/Core/PluginManager.h head/contrib/llvm/tools/lldb/include/lldb/Core/RegularExpression.h head/contrib/llvm/tools/lldb/include/lldb/Core/SearchFilter.h head/contrib/llvm/tools/lldb/include/lldb/Core/Section.h head/contrib/llvm/tools/lldb/include/lldb/Core/StreamString.h head/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeSTLMap.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObject.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectChild.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResult.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResultImpl.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/CXXFormatterFunctions.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/DataVisualization.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatCache.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatManager.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormattersContainer.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeCategory.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeCategoryMap.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeSummary.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeSynthetic.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangExpressionParser.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangExpressionVariable.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangFunction.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ClangUserExpression.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRExecutionUnit.h head/contrib/llvm/tools/lldb/include/lldb/Host/Config.h head/contrib/llvm/tools/lldb/include/lldb/Host/Editline.h head/contrib/llvm/tools/lldb/include/lldb/Host/FileSpec.h head/contrib/llvm/tools/lldb/include/lldb/Host/Host.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostInfoBase.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostProcess.h head/contrib/llvm/tools/lldb/include/lldb/Host/Pipe.h head/contrib/llvm/tools/lldb/include/lldb/Host/Predicate.h head/contrib/llvm/tools/lldb/include/lldb/Host/Socket.h head/contrib/llvm/tools/lldb/include/lldb/Host/TimeValue.h head/contrib/llvm/tools/lldb/include/lldb/Host/freebsd/HostInfoFreeBSD.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostInfoPosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostProcessPosix.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/Args.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObject.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValue.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueProperties.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValues.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/Property.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/ScriptInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTContext.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTType.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangExternalASTSourceCommon.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/DWARFCallFrameInfo.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/FuncUnwinders.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolContext.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Type.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/UnwindPlan.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/UnwindTable.h head/contrib/llvm/tools/lldb/include/lldb/Target/ABI.h head/contrib/llvm/tools/lldb/include/lldb/Target/CPPLanguageRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/FileAction.h head/contrib/llvm/tools/lldb/include/lldb/Target/ObjCLanguageRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/Platform.h head/contrib/llvm/tools/lldb/include/lldb/Target/Process.h head/contrib/llvm/tools/lldb/include/lldb/Target/ProcessLaunchInfo.h head/contrib/llvm/tools/lldb/include/lldb/Target/StackFrame.h head/contrib/llvm/tools/lldb/include/lldb/Target/StopInfo.h head/contrib/llvm/tools/lldb/include/lldb/Target/Target.h head/contrib/llvm/tools/lldb/include/lldb/Target/TargetList.h head/contrib/llvm/tools/lldb/include/lldb/Target/Thread.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadList.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlan.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepRange.h head/contrib/llvm/tools/lldb/include/lldb/Target/Unwind.h head/contrib/llvm/tools/lldb/include/lldb/Utility/CleanUp.h head/contrib/llvm/tools/lldb/include/lldb/Utility/Iterable.h head/contrib/llvm/tools/lldb/include/lldb/Utility/StringLexer.h head/contrib/llvm/tools/lldb/include/lldb/lldb-defines.h head/contrib/llvm/tools/lldb/include/lldb/lldb-enumerations.h head/contrib/llvm/tools/lldb/include/lldb/lldb-forward.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-enumerations.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-interfaces.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-types.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private.h head/contrib/llvm/tools/lldb/include/lldb/lldb-types.h head/contrib/llvm/tools/lldb/source/API/SBAddress.cpp head/contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp head/contrib/llvm/tools/lldb/source/API/SBCommandInterpreter.cpp head/contrib/llvm/tools/lldb/source/API/SBCommunication.cpp head/contrib/llvm/tools/lldb/source/API/SBCompileUnit.cpp head/contrib/llvm/tools/lldb/source/API/SBDebugger.cpp head/contrib/llvm/tools/lldb/source/API/SBEvent.cpp head/contrib/llvm/tools/lldb/source/API/SBFunction.cpp head/contrib/llvm/tools/lldb/source/API/SBHostOS.cpp head/contrib/llvm/tools/lldb/source/API/SBInstruction.cpp head/contrib/llvm/tools/lldb/source/API/SBInstructionList.cpp head/contrib/llvm/tools/lldb/source/API/SBListener.cpp head/contrib/llvm/tools/lldb/source/API/SBPlatform.cpp head/contrib/llvm/tools/lldb/source/API/SBProcess.cpp head/contrib/llvm/tools/lldb/source/API/SBSection.cpp head/contrib/llvm/tools/lldb/source/API/SBTarget.cpp head/contrib/llvm/tools/lldb/source/API/SBThread.cpp head/contrib/llvm/tools/lldb/source/API/SBType.cpp head/contrib/llvm/tools/lldb/source/API/SBTypeSummary.cpp head/contrib/llvm/tools/lldb/source/API/SBValue.cpp head/contrib/llvm/tools/lldb/source/API/SBValueList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointID.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointIDList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationCollection.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointOptions.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverAddress.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverName.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointSite.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandCompletions.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpoint.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpointCommand.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectCommands.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectExpression.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectMemory.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlatform.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSource.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSyntax.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectTarget.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectThread.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectType.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpointCommand.cpp head/contrib/llvm/tools/lldb/source/Core/Address.cpp head/contrib/llvm/tools/lldb/source/Core/AddressRange.cpp head/contrib/llvm/tools/lldb/source/Core/AddressResolverFileLine.cpp head/contrib/llvm/tools/lldb/source/Core/ArchSpec.cpp head/contrib/llvm/tools/lldb/source/Core/Communication.cpp head/contrib/llvm/tools/lldb/source/Core/Connection.cpp head/contrib/llvm/tools/lldb/source/Core/ConnectionSharedMemory.cpp head/contrib/llvm/tools/lldb/source/Core/ConstString.cpp head/contrib/llvm/tools/lldb/source/Core/DataExtractor.cpp head/contrib/llvm/tools/lldb/source/Core/Debugger.cpp head/contrib/llvm/tools/lldb/source/Core/Disassembler.cpp head/contrib/llvm/tools/lldb/source/Core/FastDemangle.cpp head/contrib/llvm/tools/lldb/source/Core/FileSpecList.cpp head/contrib/llvm/tools/lldb/source/Core/IOHandler.cpp head/contrib/llvm/tools/lldb/source/Core/Log.cpp head/contrib/llvm/tools/lldb/source/Core/Mangled.cpp head/contrib/llvm/tools/lldb/source/Core/Module.cpp head/contrib/llvm/tools/lldb/source/Core/ModuleList.cpp head/contrib/llvm/tools/lldb/source/Core/PluginManager.cpp head/contrib/llvm/tools/lldb/source/Core/RegularExpression.cpp head/contrib/llvm/tools/lldb/source/Core/SearchFilter.cpp head/contrib/llvm/tools/lldb/source/Core/Section.cpp head/contrib/llvm/tools/lldb/source/Core/StreamString.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObject.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectCast.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectChild.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResult.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResultImpl.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectDynamicValue.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectMemory.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectSyntheticFilter.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectVariable.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/CF.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/CXXFormatterFunctions.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/Cocoa.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/DataVisualization.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/FormatCache.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/FormatManager.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxx.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxList.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxMap.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibCxxUnorderedMap.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/LibStdcpp.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/NSArray.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/NSDictionary.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/NSSet.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeCategory.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeCategoryMap.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeFormat.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeSummary.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeSynthetic.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/ValueObjectPrinter.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangASTSource.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangExpressionDeclMap.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangExpressionVariable.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangFunction.cpp head/contrib/llvm/tools/lldb/source/Expression/ClangUserExpression.cpp head/contrib/llvm/tools/lldb/source/Expression/DWARFExpression.cpp head/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp head/contrib/llvm/tools/lldb/source/Expression/IRForTarget.cpp head/contrib/llvm/tools/lldb/source/Host/common/Editline.cpp head/contrib/llvm/tools/lldb/source/Host/common/File.cpp head/contrib/llvm/tools/lldb/source/Host/common/FileSpec.cpp head/contrib/llvm/tools/lldb/source/Host/common/Host.cpp head/contrib/llvm/tools/lldb/source/Host/common/HostInfoBase.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeProcessProtocol.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeProcessProtocol.h head/contrib/llvm/tools/lldb/source/Host/common/NativeThreadProtocol.h head/contrib/llvm/tools/lldb/source/Host/common/Socket.cpp head/contrib/llvm/tools/lldb/source/Host/common/SocketAddress.cpp head/contrib/llvm/tools/lldb/source/Host/common/SoftwareBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Host/freebsd/Host.cpp head/contrib/llvm/tools/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Host/posix/HostInfoPosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/HostProcessPosix.cpp head/contrib/llvm/tools/lldb/source/Interpreter/Args.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObject.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObjectRegexCommand.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupPlatform.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValue.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArch.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArray.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueBoolean.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueDictionary.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueEnumeration.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFileSpec.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFormat.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValuePathMappings.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueProperties.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueRegex.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueSInt64.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueString.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueUInt64.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueUUID.cpp head/contrib/llvm/tools/lldb/source/Interpreter/Property.cpp head/contrib/llvm/tools/lldb/source/Interpreter/ScriptInterpreter.cpp head/contrib/llvm/tools/lldb/source/Interpreter/ScriptInterpreterPython.cpp head/contrib/llvm/tools/lldb/source/Interpreter/embedded_interpreter.py head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h head/contrib/llvm/tools/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp head/contrib/llvm/tools/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp head/contrib/llvm/tools/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h head/contrib/llvm/tools/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h head/contrib/llvm/tools/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h head/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.h head/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/ARMDefines.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryThread.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryThread.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryUnwind.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/InstructionUtils.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_i386.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h head/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp head/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangASTImporter.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangExternalASTSourceCommon.cpp head/contrib/llvm/tools/lldb/source/Symbol/CompileUnit.cpp head/contrib/llvm/tools/lldb/source/Symbol/DWARFCallFrameInfo.cpp head/contrib/llvm/tools/lldb/source/Symbol/Declaration.cpp head/contrib/llvm/tools/lldb/source/Symbol/FuncUnwinders.cpp head/contrib/llvm/tools/lldb/source/Symbol/LineTable.cpp head/contrib/llvm/tools/lldb/source/Symbol/ObjectFile.cpp head/contrib/llvm/tools/lldb/source/Symbol/Symbol.cpp head/contrib/llvm/tools/lldb/source/Symbol/SymbolContext.cpp head/contrib/llvm/tools/lldb/source/Symbol/Type.cpp head/contrib/llvm/tools/lldb/source/Symbol/UnwindPlan.cpp head/contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp head/contrib/llvm/tools/lldb/source/Symbol/Variable.cpp head/contrib/llvm/tools/lldb/source/Target/CPPLanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/FileAction.cpp head/contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/Memory.cpp head/contrib/llvm/tools/lldb/source/Target/ObjCLanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/Platform.cpp head/contrib/llvm/tools/lldb/source/Target/Process.cpp head/contrib/llvm/tools/lldb/source/Target/ProcessLaunchInfo.cpp head/contrib/llvm/tools/lldb/source/Target/StackFrame.cpp head/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp head/contrib/llvm/tools/lldb/source/Target/StopInfo.cpp head/contrib/llvm/tools/lldb/source/Target/Target.cpp head/contrib/llvm/tools/lldb/source/Target/TargetList.cpp head/contrib/llvm/tools/lldb/source/Target/Thread.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadList.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOut.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOverRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepThrough.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanTracer.cpp head/contrib/llvm/tools/lldb/source/Utility/PseudoTerminal.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractor.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractor.h head/contrib/llvm/tools/lldb/source/Utility/StringExtractorGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Utility/StringLexer.cpp head/contrib/llvm/tools/lldb/source/lldb-log.cpp head/contrib/llvm/tools/lldb/source/lldb.cpp head/contrib/llvm/tools/lldb/tools/driver/Driver.cpp head/contrib/llvm/tools/lldb/tools/driver/Driver.h head/contrib/llvm/tools/lldb/tools/driver/Platform.h head/contrib/llvm/tools/lldb/tools/lldb-mi/Driver.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/Driver.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgContext.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgContext.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgSet.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgSet.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValBase.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValConsume.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValConsume.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValFile.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValFile.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListBase.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListOfN.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValListOfN.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValNumber.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValNumber.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionLong.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionShort.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValString.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValString.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValThreadGrp.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValThreadGrp.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdBase.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmd.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdBreak.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdBreak.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdData.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdData.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdEnviro.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdEnviro.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdExec.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdExec.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdFile.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdFile.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbInfo.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbInfo.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbSet.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbThread.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbThread.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdMiscellanous.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdMiscellanous.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdStack.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdStack.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportInfo.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportInfo.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportList.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdSupportList.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTarget.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTarget.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdThread.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdThread.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTrace.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTrace.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdVar.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdVar.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCommands.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCommands.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdData.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdData.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdFactory.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdFactory.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInterpreter.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInterpreter.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInvoker.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdInvoker.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgr.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgr.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnBase.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnConfig.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugger.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLog.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLog.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLogMediumFile.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLogMediumFile.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIResultRecord.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIResultRecord.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValue.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValue.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueConst.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueConst.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueList.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueList.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueResult.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueResult.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueTuple.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueTuple.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnResources.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnResources.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStderr.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStderr.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdin.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdin.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdinLinux.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdinLinux.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdinWindows.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdinWindows.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdout.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnStreamStdout.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnThreadMgrStd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnThreadMgrStd.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDataTypes.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriver.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverBase.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMain.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMgr.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIDriverMgr.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDateTimeStd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDateTimeStd.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDebug.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilDebug.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilFileStd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilFileStd.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilMapIdToVariant.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilMapIdToVariant.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSingletonBase.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSingletonHelper.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilString.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilString.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemLinux.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemLinux.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemOsx.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemOsx.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemWindows.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemWindows.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilTermios.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilTermios.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilThreadBaseStd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilThreadBaseStd.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilVariant.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilVariant.h head/contrib/llvm/tools/lldb/tools/lldb-mi/Platform.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/Platform.h head/contrib/llvm/tools/lldb/tools/lldb-platform/lldb-platform.cpp head/contrib/llvm/tools/lli/ChildTarget/ChildTarget.cpp head/contrib/llvm/tools/lli/RPCChannel.h head/contrib/llvm/tools/lli/RemoteMemoryManager.cpp head/contrib/llvm/tools/lli/RemoteMemoryManager.h head/contrib/llvm/tools/lli/RemoteTarget.h head/contrib/llvm/tools/lli/RemoteTargetExternal.h head/contrib/llvm/tools/lli/RemoteTargetMessage.h head/contrib/llvm/tools/lli/lli.cpp head/contrib/llvm/tools/llvm-ar/llvm-ar.cpp head/contrib/llvm/tools/llvm-as/llvm-as.cpp head/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp head/contrib/llvm/tools/llvm-diff/DiffConsumer.h head/contrib/llvm/tools/llvm-diff/DiffLog.h head/contrib/llvm/tools/llvm-diff/DifferenceEngine.h head/contrib/llvm/tools/llvm-diff/llvm-diff.cpp head/contrib/llvm/tools/llvm-dis/llvm-dis.cpp head/contrib/llvm/tools/llvm-extract/llvm-extract.cpp head/contrib/llvm/tools/llvm-link/llvm-link.cpp head/contrib/llvm/tools/llvm-mc/Disassembler.cpp head/contrib/llvm/tools/llvm-mc/Disassembler.h head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp head/contrib/llvm/tools/llvm-nm/llvm-nm.cpp head/contrib/llvm/tools/llvm-objdump/COFFDump.cpp head/contrib/llvm/tools/llvm-objdump/MachODump.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.h head/contrib/llvm/tools/llvm-readobj/ARMAttributeParser.cpp head/contrib/llvm/tools/llvm-readobj/ARMAttributeParser.h head/contrib/llvm/tools/llvm-readobj/ARMEHABIPrinter.h head/contrib/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp head/contrib/llvm/tools/llvm-readobj/ARMWinEHPrinter.h head/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp head/contrib/llvm/tools/llvm-readobj/ELFDumper.cpp head/contrib/llvm/tools/llvm-readobj/Error.cpp head/contrib/llvm/tools/llvm-readobj/Error.h head/contrib/llvm/tools/llvm-readobj/MachODumper.cpp head/contrib/llvm/tools/llvm-readobj/ObjDumper.h head/contrib/llvm/tools/llvm-readobj/StreamWriter.h head/contrib/llvm/tools/llvm-readobj/Win64EHDumper.h head/contrib/llvm/tools/llvm-readobj/llvm-readobj.cpp head/contrib/llvm/tools/llvm-readobj/llvm-readobj.h head/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp head/contrib/llvm/tools/llvm-stress/llvm-stress.cpp head/contrib/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp head/contrib/llvm/tools/llvm-symbolizer/LLVMSymbolize.h head/contrib/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp head/contrib/llvm/tools/macho-dump/macho-dump.cpp head/contrib/llvm/tools/opt/BreakpointPrinter.cpp head/contrib/llvm/tools/opt/NewPMDriver.cpp head/contrib/llvm/tools/opt/NewPMDriver.h head/contrib/llvm/tools/opt/PassRegistry.def head/contrib/llvm/tools/opt/Passes.cpp head/contrib/llvm/tools/opt/Passes.h head/contrib/llvm/tools/opt/opt.cpp head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterInst.cpp head/contrib/llvm/utils/TableGen/AsmWriterInst.h head/contrib/llvm/utils/TableGen/CTagsEmitter.cpp head/contrib/llvm/utils/TableGen/CallingConvEmitter.cpp head/contrib/llvm/utils/TableGen/CodeEmitterGen.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h head/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp head/contrib/llvm/utils/TableGen/CodeGenInstruction.h head/contrib/llvm/utils/TableGen/CodeGenIntrinsics.h head/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.h head/contrib/llvm/utils/TableGen/CodeGenSchedule.cpp head/contrib/llvm/utils/TableGen/CodeGenSchedule.h head/contrib/llvm/utils/TableGen/CodeGenTarget.cpp head/contrib/llvm/utils/TableGen/CodeGenTarget.h head/contrib/llvm/utils/TableGen/DAGISelEmitter.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcher.h head/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherOpt.cpp head/contrib/llvm/utils/TableGen/FastISelEmitter.cpp head/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp head/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp head/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp head/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.cpp head/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp head/contrib/llvm/utils/TableGen/SequenceToOffsetTable.h head/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp head/contrib/llvm/utils/TableGen/TableGen.cpp head/contrib/llvm/utils/TableGen/TableGenBackends.h head/contrib/llvm/utils/TableGen/X86DisassemblerShared.h head/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp head/contrib/llvm/utils/TableGen/X86DisassemblerTables.h head/contrib/llvm/utils/TableGen/X86ModRMFilters.h head/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp head/contrib/llvm/utils/TableGen/X86RecognizableInstr.h head/contrib/openpam/CREDITS head/contrib/openpam/configure.ac head/contrib/openpam/lib/libpam/openpam_dispatch.c head/contrib/openpam/modules/pam_unix/pam_unix.c head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.include.dist head/etc/mtree/BSD.usr.dist head/lib/clang/Makefile head/lib/clang/clang.build.mk head/lib/clang/include/Makefile head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/clang/Config/config.h head/lib/clang/include/llvm/Config/config.h head/lib/clang/include/llvm/Config/llvm-config.h head/lib/clang/include/llvm/Support/DataTypes.h head/lib/clang/libclanganalysis/Makefile head/lib/clang/libclangast/Makefile head/lib/clang/libclangbasic/Makefile head/lib/clang/libclangcodegen/Makefile head/lib/clang/libclangdriver/Makefile head/lib/clang/libclangfrontend/Makefile head/lib/clang/libclangfrontendtool/Makefile head/lib/clang/libclangsema/Makefile head/lib/clang/libclangstaticanalyzerfrontend/Makefile head/lib/clang/liblldbAPI/Makefile head/lib/clang/liblldbCore/Makefile head/lib/clang/liblldbDataFormatters/Makefile head/lib/clang/liblldbExpression/Makefile head/lib/clang/liblldbHostCommon/Makefile head/lib/clang/liblldbHostFreeBSD/Makefile head/lib/clang/liblldbHostPOSIX/Makefile head/lib/clang/liblldbInterpreter/Makefile head/lib/clang/liblldbPluginProcessElfCore/Makefile head/lib/clang/liblldbPluginProcessPOSIX/Makefile head/lib/clang/liblldbPluginProcessUtility/Makefile head/lib/clang/liblldbSymbol/Makefile head/lib/clang/liblldbTarget/Makefile head/lib/clang/liblldbUtility/Makefile head/lib/clang/libllvmaarch64codegen/Makefile head/lib/clang/libllvmanalysis/Makefile head/lib/clang/libllvmarmcodegen/Makefile head/lib/clang/libllvmasmprinter/Makefile head/lib/clang/libllvmcodegen/Makefile head/lib/clang/libllvmcore/Makefile head/lib/clang/libllvmdebuginfo/Makefile head/lib/clang/libllvmexecutionengine/Makefile head/lib/clang/libllvminstrumentation/Makefile head/lib/clang/libllvmipa/Makefile head/lib/clang/libllvmmc/Makefile head/lib/clang/libllvmmcdisassembler/Makefile head/lib/clang/libllvmmipscodegen/Makefile head/lib/clang/libllvmmipsdesc/Makefile head/lib/clang/libllvmobjcarcopts/Makefile head/lib/clang/libllvmpowerpccodegen/Makefile head/lib/clang/libllvmprofiledata/Makefile head/lib/clang/libllvmruntimedyld/Makefile head/lib/clang/libllvmscalaropts/Makefile head/lib/clang/libllvmselectiondag/Makefile head/lib/clang/libllvmsparccodegen/Makefile head/lib/clang/libllvmsupport/Makefile head/lib/clang/libllvmtarget/Makefile head/lib/clang/libllvmtransformutils/Makefile head/lib/clang/libllvmx86codegen/Makefile head/lib/libclang_rt/Makefile.inc head/lib/libclang_rt/asan/Makefile head/lib/libclang_rt/san/Makefile head/lib/libcompiler_rt/Makefile head/share/mk/bsd.sys.mk head/sys/boot/efi/libefi/Makefile head/sys/boot/i386/libi386/Makefile head/sys/boot/pc98/libpc98/Makefile head/sys/conf/kern.mk head/sys/sys/param.h head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/bugpoint/Makefile head/usr.bin/clang/bugpoint/bugpoint.1 head/usr.bin/clang/clang/Makefile head/usr.bin/clang/clang/clang.1 head/usr.bin/clang/llc/Makefile head/usr.bin/clang/llc/llc.1 head/usr.bin/clang/lldb/Makefile head/usr.bin/clang/lli/Makefile head/usr.bin/clang/lli/lli.1 head/usr.bin/clang/llvm-ar/Makefile head/usr.bin/clang/llvm-ar/llvm-ar.1 head/usr.bin/clang/llvm-as/llvm-as.1 head/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 head/usr.bin/clang/llvm-diff/llvm-diff.1 head/usr.bin/clang/llvm-dis/llvm-dis.1 head/usr.bin/clang/llvm-extract/Makefile head/usr.bin/clang/llvm-extract/llvm-extract.1 head/usr.bin/clang/llvm-link/llvm-link.1 head/usr.bin/clang/llvm-mc/Makefile head/usr.bin/clang/llvm-nm/Makefile head/usr.bin/clang/llvm-nm/llvm-nm.1 head/usr.bin/clang/llvm-objdump/Makefile head/usr.bin/clang/llvm-rtdyld/Makefile head/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 head/usr.bin/clang/opt/Makefile head/usr.bin/clang/opt/opt.1 head/usr.bin/clang/tblgen/tblgen.1 Directory Properties: head/ (props changed) head/cddl/ (props changed) head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/contrib/amd/ (props changed) head/contrib/binutils/ (props changed) head/contrib/bmake/ (props changed) head/contrib/compiler-rt/ (props changed) head/contrib/ee/ (props changed) head/contrib/elftoolchain/ (props changed) head/contrib/gcc/ (props changed) head/contrib/gdb/ (props changed) head/contrib/groff/ (props changed) head/contrib/ipfilter/ (props changed) head/contrib/libc++/ (props changed) head/contrib/libcxxrt/ (props changed) head/contrib/libucl/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) head/contrib/mdocml/ (props changed) head/contrib/openpam/ (props changed) head/contrib/sendmail/ (props changed) head/contrib/tcpdump/ (props changed) head/contrib/top/ (props changed) head/contrib/tzdata/ (props changed) head/contrib/xz/ (props changed) head/etc/ (props changed) head/gnu/usr.bin/binutils/ (props changed) head/include/ (props changed) head/lib/libc/ (props changed) head/lib/libutil/ (props changed) head/lib/libvmmapi/ (props changed) head/sbin/ (props changed) head/sbin/ipfw/ (props changed) head/share/ (props changed) head/share/man/man4/ (props changed) head/sys/ (props changed) head/sys/amd64/include/vmm.h (props changed) head/sys/amd64/vmm/ (props changed) head/sys/boot/ (props changed) head/sys/boot/powerpc/kboot/ (props changed) head/sys/boot/powerpc/ofw/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) head/sys/conf/ (props changed) head/sys/contrib/dev/acpica/ (props changed) head/sys/dev/hyperv/ (props changed) head/sys/gnu/dts/ (props changed) head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/include/ (props changed) head/sys/modules/vmm/ (props changed) head/usr.bin/calendar/ (props changed) head/usr.bin/mkimg/ (props changed) head/usr.bin/procstat/ (props changed) head/usr.sbin/bhyve/ (props changed) head/usr.sbin/jail/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 15 11:58:52 2015 (r280030) +++ head/ObsoleteFiles.inc Sun Mar 15 13:31:13 2015 (r280031) @@ -38,6 +38,61 @@ # xargs -n1 | sort | uniq -d; # done +# 20150315: new clang import which bumps version from 3.5.1 to 3.6.0. +OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_aes.h +OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_pclmul.h +OLD_FILES+=usr/include/clang/3.5.1/altivec.h +OLD_FILES+=usr/include/clang/3.5.1/ammintrin.h +OLD_FILES+=usr/include/clang/3.5.1/arm_acle.h +OLD_FILES+=usr/include/clang/3.5.1/arm_neon.h +OLD_FILES+=usr/include/clang/3.5.1/avx2intrin.h +OLD_FILES+=usr/include/clang/3.5.1/avxintrin.h +OLD_FILES+=usr/include/clang/3.5.1/bmi2intrin.h +OLD_FILES+=usr/include/clang/3.5.1/bmiintrin.h +OLD_FILES+=usr/include/clang/3.5.1/cpuid.h +OLD_FILES+=usr/include/clang/3.5.1/emmintrin.h +OLD_FILES+=usr/include/clang/3.5.1/f16cintrin.h +OLD_FILES+=usr/include/clang/3.5.1/fma4intrin.h +OLD_FILES+=usr/include/clang/3.5.1/fmaintrin.h +OLD_FILES+=usr/include/clang/3.5.1/ia32intrin.h +OLD_FILES+=usr/include/clang/3.5.1/immintrin.h +OLD_FILES+=usr/include/clang/3.5.1/lzcntintrin.h +OLD_FILES+=usr/include/clang/3.5.1/mm3dnow.h +OLD_FILES+=usr/include/clang/3.5.1/mm_malloc.h +OLD_FILES+=usr/include/clang/3.5.1/mmintrin.h +OLD_FILES+=usr/include/clang/3.5.1/module.modulemap +OLD_FILES+=usr/include/clang/3.5.1/nmmintrin.h +OLD_FILES+=usr/include/clang/3.5.1/pmmintrin.h +OLD_FILES+=usr/include/clang/3.5.1/popcntintrin.h +OLD_FILES+=usr/include/clang/3.5.1/prfchwintrin.h +OLD_FILES+=usr/include/clang/3.5.1/rdseedintrin.h +OLD_FILES+=usr/include/clang/3.5.1/rtmintrin.h +OLD_FILES+=usr/include/clang/3.5.1/shaintrin.h +OLD_FILES+=usr/include/clang/3.5.1/smmintrin.h +OLD_FILES+=usr/include/clang/3.5.1/tbmintrin.h +OLD_FILES+=usr/include/clang/3.5.1/tmmintrin.h +OLD_FILES+=usr/include/clang/3.5.1/wmmintrin.h +OLD_FILES+=usr/include/clang/3.5.1/x86intrin.h +OLD_FILES+=usr/include/clang/3.5.1/xmmintrin.h +OLD_FILES+=usr/include/clang/3.5.1/xopintrin.h +OLD_DIRS+=usr/include/clang/3.5.1 +OLD_DIRS+=usr/include/clang +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.san-i386.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.san-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan-i386.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/3.5.1/lib/freebsd +OLD_DIRS+=usr/lib/clang/3.5.1/lib +OLD_DIRS+=usr/lib/clang/3.5.1 # 20150302: binutils documentation distributed as a manpage OLD_FILES+=usr/share/doc/binutils/as.txt OLD_FILES+=usr/share/doc/binutils/ld.txt Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Mar 15 11:58:52 2015 (r280030) +++ head/UPDATING Sun Mar 15 13:31:13 2015 (r280031) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150315: + Clang, llvm and lldb have been upgraded to 3.6.0 release. Please see + the 20141231 entry below for information about prerequisites and + upgrading, if you are not already using 3.5.0 or higher. + 20150307: The 32-bit PowerPC kernel has been changed to a position-independent executable. This can only be booted with a version of loader(8) Modified: head/contrib/compiler-rt/include/sanitizer/asan_interface.h ============================================================================== --- head/contrib/compiler-rt/include/sanitizer/asan_interface.h Sun Mar 15 11:58:52 2015 (r280030) +++ head/contrib/compiler-rt/include/sanitizer/asan_interface.h Sun Mar 15 13:31:13 2015 (r280031) @@ -114,8 +114,7 @@ extern "C" { // Returns the old value. int __asan_set_error_exit_code(int exit_code); - // Sets the callback to be called right before death on error. - // Passing 0 will unset the callback. + // Deprecated. Call __sanitizer_set_death_callback instead. void __asan_set_death_callback(void (*callback)(void)); void __asan_set_error_report_callback(void (*callback)(const char*)); Modified: head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h ============================================================================== --- head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h Sun Mar 15 11:58:52 2015 (r280030) +++ head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h Sun Mar 15 13:31:13 2015 (r280031) @@ -62,18 +62,6 @@ extern "C" { void __sanitizer_unaligned_store32(void *p, uint32_t x); void __sanitizer_unaligned_store64(void *p, uint64_t x); - // Initialize coverage. - void __sanitizer_cov_init(); - // Record and dump coverage info. - void __sanitizer_cov_dump(); - // Open .sancov.packed in the coverage directory and return the file - // descriptor. Returns -1 on failure, or if coverage dumping is disabled. - // This is intended for use by sandboxing code. - intptr_t __sanitizer_maybe_open_cov_file(const char *name); - // Get the number of total unique covered entities (blocks, edges, calls). - // This can be useful for coverage-directed in-process fuzzers. - uintptr_t __sanitizer_get_total_unique_coverage(); - // Annotate the current state of a contiguous container, such as // std::vector, std::string or similar. // A contiguous container is a container that keeps all of its elements @@ -120,6 +108,9 @@ extern "C" { // Print the stack trace leading to this call. Useful for debugging user code. void __sanitizer_print_stack_trace(); + // Sets the callback to be called right before death on error. + // Passing 0 will unset the callback. + void __sanitizer_set_death_callback(void (*callback)(void)); #ifdef __cplusplus } // extern "C" #endif Copied: head/contrib/compiler-rt/include/sanitizer/coverage_interface.h (from r280030, projects/clang360-import/contrib/compiler-rt/include/sanitizer/coverage_interface.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/include/sanitizer/coverage_interface.h Sun Mar 15 13:31:13 2015 (r280031, copy of r280030, projects/clang360-import/contrib/compiler-rt/include/sanitizer/coverage_interface.h) @@ -0,0 +1,46 @@ +//===-- sanitizer/coverage_interface.h --------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Public interface for sanitizer coverage. +//===----------------------------------------------------------------------===// + +#ifndef SANITIZER_COVERAG_INTERFACE_H +#define SANITIZER_COVERAG_INTERFACE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + // Initialize coverage. + void __sanitizer_cov_init(); + // Record and dump coverage info. + void __sanitizer_cov_dump(); + // Open .sancov.packed in the coverage directory and return the file + // descriptor. Returns -1 on failure, or if coverage dumping is disabled. + // This is intended for use by sandboxing code. + intptr_t __sanitizer_maybe_open_cov_file(const char *name); + // Get the number of total unique covered entities (blocks, edges, calls). + // This can be useful for coverage-directed in-process fuzzers. + uintptr_t __sanitizer_get_total_unique_coverage(); + + // Reset the basic-block (edge) coverage to the initial state. + // Useful for in-process fuzzing to start collecting coverage from scratch. + // Experimental, will likely not work for multi-threaded process. + void __sanitizer_reset_coverage(); + // Set *data to the array of covered PCs and return the size of that array. + // Some of the entries in *data will be zero. + uintptr_t __sanitizer_get_coverage_guards(uintptr_t **data); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // SANITIZER_COVERAG_INTERFACE_H Modified: head/contrib/compiler-rt/include/sanitizer/msan_interface.h ============================================================================== --- head/contrib/compiler-rt/include/sanitizer/msan_interface.h Sun Mar 15 11:58:52 2015 (r280030) +++ head/contrib/compiler-rt/include/sanitizer/msan_interface.h Sun Mar 15 13:31:13 2015 (r280031) @@ -38,7 +38,9 @@ extern "C" { contents). */ void __msan_unpoison_string(const volatile char *a); - /* Make memory region fully uninitialized (without changing its contents). */ + /* Make memory region fully uninitialized (without changing its contents). + This is a legacy interface that does not update origin information. Use + __msan_allocated_memory() instead. */ void __msan_poison(const volatile void *a, size_t size); /* Make memory region partially uninitialized (without changing its contents). Modified: head/contrib/compiler-rt/lib/asan/README.txt ============================================================================== --- head/contrib/compiler-rt/lib/asan/README.txt Sun Mar 15 11:58:52 2015 (r280030) +++ head/contrib/compiler-rt/lib/asan/README.txt Sun Mar 15 13:31:13 2015 (r280031) @@ -1,7 +1,6 @@ AddressSanitizer RT ================================ -This directory contains sources of the AddressSanitizer (asan) runtime library. -We are in the process of integrating AddressSanitizer with LLVM, stay tuned. +This directory contains sources of the AddressSanitizer (ASan) runtime library. Directory structure: README.txt : This file. @@ -13,14 +12,13 @@ tests/* : ASan unit tests. Also ASan runtime needs the following libraries: lib/interception/ : Machinery used to intercept function calls. -lib/sanitizer_common/ : Code shared between ASan and TSan. +lib/sanitizer_common/ : Code shared between various sanitizers. -Currently ASan runtime can be built by both make and cmake build systems. -(see compiler-rt/make and files Makefile.mk for make-based build and -files CMakeLists.txt for cmake-based build). +ASan runtime currently also embeds part of LeakSanitizer runtime for +leak detection (lib/lsan/lsan_common.{cc,h}). -ASan unit and output tests work only with cmake. You may run this -command from the root of your cmake build tree: +ASan runtime can only be built by CMake. You can run ASan tests +from the root of your CMake build tree: make check-asan Modified: head/contrib/compiler-rt/lib/asan/asan_activation.cc ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_activation.cc Sun Mar 15 11:58:52 2015 (r280030) +++ head/contrib/compiler-rt/lib/asan/asan_activation.cc Sun Mar 15 13:31:13 2015 (r280031) @@ -16,40 +16,106 @@ #include "asan_allocator.h" #include "asan_flags.h" #include "asan_internal.h" +#include "asan_poisoning.h" +#include "asan_stack.h" #include "sanitizer_common/sanitizer_flags.h" namespace __asan { static struct AsanDeactivatedFlags { - int quarantine_size; - int max_redzone; + AllocatorOptions allocator_options; int malloc_context_size; bool poison_heap; - bool alloc_dealloc_mismatch; - bool allocator_may_return_null; + bool coverage; + const char *coverage_dir; + + void RegisterActivationFlags(FlagParser *parser, Flags *f, CommonFlags *cf) { +#define ASAN_ACTIVATION_FLAG(Type, Name) \ + RegisterFlag(parser, #Name, "", &f->Name); +#define COMMON_ACTIVATION_FLAG(Type, Name) \ + RegisterFlag(parser, #Name, "", &cf->Name); +#include "asan_activation_flags.inc" +#undef ASAN_ACTIVATION_FLAG +#undef COMMON_ACTIVATION_FLAG + + RegisterIncludeFlag(parser, cf); + } + + void OverrideFromActivationFlags() { + Flags f; + CommonFlags cf; + FlagParser parser; + RegisterActivationFlags(&parser, &f, &cf); + + // Copy the current activation flags. + allocator_options.CopyTo(&f, &cf); + cf.malloc_context_size = malloc_context_size; + f.poison_heap = poison_heap; + cf.coverage = coverage; + cf.coverage_dir = coverage_dir; + cf.verbosity = Verbosity(); + cf.help = false; // this is activation-specific help + + // Check if activation flags need to be overriden. + if (const char *env = GetEnv("ASAN_ACTIVATION_OPTIONS")) { + parser.ParseString(env); + } + + // Override from getprop asan.options. + char buf[100]; + GetExtraActivationFlags(buf, sizeof(buf)); + parser.ParseString(buf); + + SetVerbosity(cf.verbosity); + + if (Verbosity()) ReportUnrecognizedFlags(); + + if (cf.help) parser.PrintFlagDescriptions(); + + allocator_options.SetFrom(&f, &cf); + malloc_context_size = cf.malloc_context_size; + poison_heap = f.poison_heap; + coverage = cf.coverage; + coverage_dir = cf.coverage_dir; + } + + void Print() { + Report( + "quarantine_size_mb %d, max_redzone %d, poison_heap %d, " + "malloc_context_size %d, alloc_dealloc_mismatch %d, " + "allocator_may_return_null %d, coverage %d, coverage_dir %s\n", + allocator_options.quarantine_size_mb, allocator_options.max_redzone, + poison_heap, malloc_context_size, + allocator_options.alloc_dealloc_mismatch, + allocator_options.may_return_null, coverage, coverage_dir); + } } asan_deactivated_flags; static bool asan_is_deactivated; -void AsanStartDeactivated() { +void AsanDeactivate() { + CHECK(!asan_is_deactivated); VReport(1, "Deactivating ASan\n"); - // Save flag values. - asan_deactivated_flags.quarantine_size = flags()->quarantine_size; - asan_deactivated_flags.max_redzone = flags()->max_redzone; - asan_deactivated_flags.poison_heap = flags()->poison_heap; - asan_deactivated_flags.malloc_context_size = - common_flags()->malloc_context_size; - asan_deactivated_flags.alloc_dealloc_mismatch = - flags()->alloc_dealloc_mismatch; - asan_deactivated_flags.allocator_may_return_null = - common_flags()->allocator_may_return_null; - - flags()->quarantine_size = 0; - flags()->max_redzone = 16; - flags()->poison_heap = false; - common_flags()->malloc_context_size = 0; - flags()->alloc_dealloc_mismatch = false; - common_flags()->allocator_may_return_null = true; + + // Stash runtime state. + GetAllocatorOptions(&asan_deactivated_flags.allocator_options); + asan_deactivated_flags.malloc_context_size = GetMallocContextSize(); + asan_deactivated_flags.poison_heap = CanPoisonMemory(); + asan_deactivated_flags.coverage = common_flags()->coverage; + asan_deactivated_flags.coverage_dir = common_flags()->coverage_dir; + + // Deactivate the runtime. + SetCanPoisonMemory(false); + SetMallocContextSize(1); + ReInitializeCoverage(false, nullptr); + + AllocatorOptions disabled = asan_deactivated_flags.allocator_options; + disabled.quarantine_size_mb = 0; + disabled.min_redzone = 16; // Redzone must be at least 16 bytes long. + disabled.max_redzone = 16; + disabled.alloc_dealloc_mismatch = false; + disabled.may_return_null = true; + ReInitializeAllocator(disabled); asan_is_deactivated = true; } @@ -58,31 +124,19 @@ void AsanActivate() { if (!asan_is_deactivated) return; VReport(1, "Activating ASan\n"); - // Restore flag values. - // FIXME: this is not atomic, and there may be other threads alive. - flags()->quarantine_size = asan_deactivated_flags.quarantine_size; - flags()->max_redzone = asan_deactivated_flags.max_redzone; - flags()->poison_heap = asan_deactivated_flags.poison_heap; - common_flags()->malloc_context_size = - asan_deactivated_flags.malloc_context_size; - flags()->alloc_dealloc_mismatch = - asan_deactivated_flags.alloc_dealloc_mismatch; - common_flags()->allocator_may_return_null = - asan_deactivated_flags.allocator_may_return_null; - - ParseExtraActivationFlags(); + asan_deactivated_flags.OverrideFromActivationFlags(); - ReInitializeAllocator(); + SetCanPoisonMemory(asan_deactivated_flags.poison_heap); + SetMallocContextSize(asan_deactivated_flags.malloc_context_size); + ReInitializeCoverage(asan_deactivated_flags.coverage, + asan_deactivated_flags.coverage_dir); + ReInitializeAllocator(asan_deactivated_flags.allocator_options); asan_is_deactivated = false; - VReport( - 1, - "quarantine_size %d, max_redzone %d, poison_heap %d, " - "malloc_context_size %d, alloc_dealloc_mismatch %d, " - "allocator_may_return_null %d\n", - flags()->quarantine_size, flags()->max_redzone, flags()->poison_heap, - common_flags()->malloc_context_size, flags()->alloc_dealloc_mismatch, - common_flags()->allocator_may_return_null); + if (Verbosity()) { + Report("Activated with flags:\n"); + asan_deactivated_flags.Print(); + } } } // namespace __asan Modified: head/contrib/compiler-rt/lib/asan/asan_activation.h ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_activation.h Sun Mar 15 11:58:52 2015 (r280030) +++ head/contrib/compiler-rt/lib/asan/asan_activation.h Sun Mar 15 13:31:13 2015 (r280031) @@ -16,7 +16,7 @@ #define ASAN_ACTIVATION_H namespace __asan { -void AsanStartDeactivated(); +void AsanDeactivate(); void AsanActivate(); } // namespace __asan Copied: head/contrib/compiler-rt/lib/asan/asan_activation_flags.inc (from r280030, projects/clang360-import/contrib/compiler-rt/lib/asan/asan_activation_flags.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/lib/asan/asan_activation_flags.inc Sun Mar 15 13:31:13 2015 (r280031, copy of r280030, projects/clang360-import/contrib/compiler-rt/lib/asan/asan_activation_flags.inc) @@ -0,0 +1,35 @@ +//===-- asan_activation_flags.inc -------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// A subset of ASan (and common) runtime flags supported at activation time. +// +//===----------------------------------------------------------------------===// +#ifndef ASAN_ACTIVATION_FLAG +# error "Define ASAN_ACTIVATION_FLAG prior to including this file!" +#endif + +#ifndef COMMON_ACTIVATION_FLAG +# error "Define COMMON_ACTIVATION_FLAG prior to including this file!" +#endif + +// ASAN_ACTIVATION_FLAG(Type, Name) +// See COMMON_FLAG in sanitizer_flags.inc for more details. + +ASAN_ACTIVATION_FLAG(int, redzone) +ASAN_ACTIVATION_FLAG(int, max_redzone) +ASAN_ACTIVATION_FLAG(int, quarantine_size_mb) +ASAN_ACTIVATION_FLAG(bool, alloc_dealloc_mismatch) +ASAN_ACTIVATION_FLAG(bool, poison_heap) + +COMMON_ACTIVATION_FLAG(bool, allocator_may_return_null) +COMMON_ACTIVATION_FLAG(int, malloc_context_size) +COMMON_ACTIVATION_FLAG(bool, coverage) +COMMON_ACTIVATION_FLAG(const char *, coverage_dir) +COMMON_ACTIVATION_FLAG(int, verbosity) +COMMON_ACTIVATION_FLAG(bool, help) Copied: head/contrib/compiler-rt/lib/asan/asan_allocator.cc (from r280030, projects/clang360-import/contrib/compiler-rt/lib/asan/asan_allocator.cc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/lib/asan/asan_allocator.cc Sun Mar 15 13:31:13 2015 (r280031, copy of r280030, projects/clang360-import/contrib/compiler-rt/lib/asan/asan_allocator.cc) @@ -0,0 +1,909 @@ +//===-- asan_allocator.cc -------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of AddressSanitizer, an address sanity checker. +// +// Implementation of ASan's memory allocator, 2-nd version. +// This variant uses the allocator from sanitizer_common, i.e. the one shared +// with ThreadSanitizer and MemorySanitizer. +// +//===----------------------------------------------------------------------===// +#include "asan_allocator.h" + +#include "asan_mapping.h" +#include "asan_poisoning.h" +#include "asan_report.h" +#include "asan_stack.h" +#include "asan_thread.h" +#include "sanitizer_common/sanitizer_allocator_interface.h" +#include "sanitizer_common/sanitizer_flags.h" +#include "sanitizer_common/sanitizer_internal_defs.h" +#include "sanitizer_common/sanitizer_list.h" +#include "sanitizer_common/sanitizer_stackdepot.h" +#include "sanitizer_common/sanitizer_quarantine.h" +#include "lsan/lsan_common.h" + +namespace __asan { + +// Valid redzone sizes are 16, 32, 64, ... 2048, so we encode them in 3 bits. +// We use adaptive redzones: for larger allocation larger redzones are used. +static u32 RZLog2Size(u32 rz_log) { + CHECK_LT(rz_log, 8); + return 16 << rz_log; +} + +static u32 RZSize2Log(u32 rz_size) { + CHECK_GE(rz_size, 16); + CHECK_LE(rz_size, 2048); + CHECK(IsPowerOfTwo(rz_size)); + u32 res = Log2(rz_size) - 4; + CHECK_EQ(rz_size, RZLog2Size(res)); + return res; +} + +static AsanAllocator &get_allocator(); + +// The memory chunk allocated from the underlying allocator looks like this: +// L L L L L L H H U U U U U U R R +// L -- left redzone words (0 or more bytes) +// H -- ChunkHeader (16 bytes), which is also a part of the left redzone. +// U -- user memory. +// R -- right redzone (0 or more bytes) +// ChunkBase consists of ChunkHeader and other bytes that overlap with user +// memory. + +// If the left redzone is greater than the ChunkHeader size we store a magic +// value in the first uptr word of the memory block and store the address of +// ChunkBase in the next uptr. +// M B L L L L L L L L L H H U U U U U U +// | ^ +// ---------------------| +// M -- magic value kAllocBegMagic +// B -- address of ChunkHeader pointing to the first 'H' +static const uptr kAllocBegMagic = 0xCC6E96B9; + +struct ChunkHeader { + // 1-st 8 bytes. + u32 chunk_state : 8; // Must be first. + u32 alloc_tid : 24; + + u32 free_tid : 24; + u32 from_memalign : 1; + u32 alloc_type : 2; + u32 rz_log : 3; + u32 lsan_tag : 2; + // 2-nd 8 bytes + // This field is used for small sizes. For large sizes it is equal to + // SizeClassMap::kMaxSize and the actual size is stored in the + // SecondaryAllocator's metadata. + u32 user_requested_size; + u32 alloc_context_id; +}; + +struct ChunkBase : ChunkHeader { + // Header2, intersects with user memory. + u32 free_context_id; +}; + +static const uptr kChunkHeaderSize = sizeof(ChunkHeader); +static const uptr kChunkHeader2Size = sizeof(ChunkBase) - kChunkHeaderSize; +COMPILER_CHECK(kChunkHeaderSize == 16); +COMPILER_CHECK(kChunkHeader2Size <= 16); + +// Every chunk of memory allocated by this allocator can be in one of 3 states: +// CHUNK_AVAILABLE: the chunk is in the free list and ready to be allocated. +// CHUNK_ALLOCATED: the chunk is allocated and not yet freed. +// CHUNK_QUARANTINE: the chunk was freed and put into quarantine zone. +enum { + CHUNK_AVAILABLE = 0, // 0 is the default value even if we didn't set it. + CHUNK_ALLOCATED = 2, + CHUNK_QUARANTINE = 3 +}; + +struct AsanChunk: ChunkBase { + uptr Beg() { return reinterpret_cast(this) + kChunkHeaderSize; } + uptr UsedSize(bool locked_version = false) { + if (user_requested_size != SizeClassMap::kMaxSize) + return user_requested_size; + return *reinterpret_cast( + get_allocator().GetMetaData(AllocBeg(locked_version))); + } + void *AllocBeg(bool locked_version = false) { + if (from_memalign) { + if (locked_version) + return get_allocator().GetBlockBeginFastLocked( + reinterpret_cast(this)); + return get_allocator().GetBlockBegin(reinterpret_cast(this)); + } + return reinterpret_cast(Beg() - RZLog2Size(rz_log)); + } + bool AddrIsInside(uptr addr, bool locked_version = false) { + return (addr >= Beg()) && (addr < Beg() + UsedSize(locked_version)); + } +}; + +struct QuarantineCallback { + explicit QuarantineCallback(AllocatorCache *cache) + : cache_(cache) { + } + + void Recycle(AsanChunk *m) { + CHECK_EQ(m->chunk_state, CHUNK_QUARANTINE); + atomic_store((atomic_uint8_t*)m, CHUNK_AVAILABLE, memory_order_relaxed); + CHECK_NE(m->alloc_tid, kInvalidTid); + CHECK_NE(m->free_tid, kInvalidTid); + PoisonShadow(m->Beg(), + RoundUpTo(m->UsedSize(), SHADOW_GRANULARITY), + kAsanHeapLeftRedzoneMagic); + void *p = reinterpret_cast(m->AllocBeg()); + if (p != m) { + uptr *alloc_magic = reinterpret_cast(p); + CHECK_EQ(alloc_magic[0], kAllocBegMagic); + // Clear the magic value, as allocator internals may overwrite the + // contents of deallocated chunk, confusing GetAsanChunk lookup. + alloc_magic[0] = 0; + CHECK_EQ(alloc_magic[1], reinterpret_cast(m)); + } + + // Statistics. + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.real_frees++; + thread_stats.really_freed += m->UsedSize(); + + get_allocator().Deallocate(cache_, p); + } + + void *Allocate(uptr size) { + return get_allocator().Allocate(cache_, size, 1, false); + } + + void Deallocate(void *p) { + get_allocator().Deallocate(cache_, p); + } + + AllocatorCache *cache_; +}; + +typedef Quarantine AsanQuarantine; +typedef AsanQuarantine::Cache QuarantineCache; + +void AsanMapUnmapCallback::OnMap(uptr p, uptr size) const { + PoisonShadow(p, size, kAsanHeapLeftRedzoneMagic); + // Statistics. + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.mmaps++; + thread_stats.mmaped += size; +} +void AsanMapUnmapCallback::OnUnmap(uptr p, uptr size) const { + PoisonShadow(p, size, 0); + // We are about to unmap a chunk of user memory. + // Mark the corresponding shadow memory as not needed. + FlushUnneededASanShadowMemory(p, size); + // Statistics. + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.munmaps++; + thread_stats.munmaped += size; +} + +// We can not use THREADLOCAL because it is not supported on some of the +// platforms we care about (OSX 10.6, Android). +// static THREADLOCAL AllocatorCache cache; +AllocatorCache *GetAllocatorCache(AsanThreadLocalMallocStorage *ms) { + CHECK(ms); + return &ms->allocator_cache; +} + +QuarantineCache *GetQuarantineCache(AsanThreadLocalMallocStorage *ms) { + CHECK(ms); + CHECK_LE(sizeof(QuarantineCache), sizeof(ms->quarantine_cache)); + return reinterpret_cast(ms->quarantine_cache); +} + +void AllocatorOptions::SetFrom(const Flags *f, const CommonFlags *cf) { + quarantine_size_mb = f->quarantine_size_mb; + min_redzone = f->redzone; + max_redzone = f->max_redzone; + may_return_null = cf->allocator_may_return_null; + alloc_dealloc_mismatch = f->alloc_dealloc_mismatch; +} + +void AllocatorOptions::CopyTo(Flags *f, CommonFlags *cf) { + f->quarantine_size_mb = quarantine_size_mb; + f->redzone = min_redzone; + f->max_redzone = max_redzone; + cf->allocator_may_return_null = may_return_null; + f->alloc_dealloc_mismatch = alloc_dealloc_mismatch; +} + +struct Allocator { + static const uptr kMaxAllowedMallocSize = + FIRST_32_SECOND_64(3UL << 30, 64UL << 30); + static const uptr kMaxThreadLocalQuarantine = + FIRST_32_SECOND_64(1 << 18, 1 << 20); + + AsanAllocator allocator; + AsanQuarantine quarantine; + StaticSpinMutex fallback_mutex; + AllocatorCache fallback_allocator_cache; + QuarantineCache fallback_quarantine_cache; + + // ------------------- Options -------------------------- + atomic_uint16_t min_redzone; + atomic_uint16_t max_redzone; + atomic_uint8_t alloc_dealloc_mismatch; + + // ------------------- Initialization ------------------------ + explicit Allocator(LinkerInitialized) + : quarantine(LINKER_INITIALIZED), + fallback_quarantine_cache(LINKER_INITIALIZED) {} + + void CheckOptions(const AllocatorOptions &options) const { + CHECK_GE(options.min_redzone, 16); + CHECK_GE(options.max_redzone, options.min_redzone); + CHECK_LE(options.max_redzone, 2048); + CHECK(IsPowerOfTwo(options.min_redzone)); + CHECK(IsPowerOfTwo(options.max_redzone)); + } + + void SharedInitCode(const AllocatorOptions &options) { + CheckOptions(options); + quarantine.Init((uptr)options.quarantine_size_mb << 20, + kMaxThreadLocalQuarantine); + atomic_store(&alloc_dealloc_mismatch, options.alloc_dealloc_mismatch, + memory_order_release); + atomic_store(&min_redzone, options.min_redzone, memory_order_release); + atomic_store(&max_redzone, options.max_redzone, memory_order_release); + } + + void Initialize(const AllocatorOptions &options) { + allocator.Init(options.may_return_null); + SharedInitCode(options); + } + + void ReInitialize(const AllocatorOptions &options) { + allocator.SetMayReturnNull(options.may_return_null); + SharedInitCode(options); + } + + void GetOptions(AllocatorOptions *options) const { + options->quarantine_size_mb = quarantine.GetSize() >> 20; + options->min_redzone = atomic_load(&min_redzone, memory_order_acquire); + options->max_redzone = atomic_load(&max_redzone, memory_order_acquire); + options->may_return_null = allocator.MayReturnNull(); + options->alloc_dealloc_mismatch = + atomic_load(&alloc_dealloc_mismatch, memory_order_acquire); + } + + // -------------------- Helper methods. ------------------------- + uptr ComputeRZLog(uptr user_requested_size) { + u32 rz_log = + user_requested_size <= 64 - 16 ? 0 : + user_requested_size <= 128 - 32 ? 1 : + user_requested_size <= 512 - 64 ? 2 : + user_requested_size <= 4096 - 128 ? 3 : + user_requested_size <= (1 << 14) - 256 ? 4 : + user_requested_size <= (1 << 15) - 512 ? 5 : + user_requested_size <= (1 << 16) - 1024 ? 6 : 7; + u32 min_rz = atomic_load(&min_redzone, memory_order_acquire); + u32 max_rz = atomic_load(&max_redzone, memory_order_acquire); + return Min(Max(rz_log, RZSize2Log(min_rz)), RZSize2Log(max_rz)); + } + + // We have an address between two chunks, and we want to report just one. + AsanChunk *ChooseChunk(uptr addr, AsanChunk *left_chunk, + AsanChunk *right_chunk) { + // Prefer an allocated chunk over freed chunk and freed chunk + // over available chunk. + if (left_chunk->chunk_state != right_chunk->chunk_state) { + if (left_chunk->chunk_state == CHUNK_ALLOCATED) + return left_chunk; + if (right_chunk->chunk_state == CHUNK_ALLOCATED) + return right_chunk; + if (left_chunk->chunk_state == CHUNK_QUARANTINE) + return left_chunk; + if (right_chunk->chunk_state == CHUNK_QUARANTINE) + return right_chunk; + } + // Same chunk_state: choose based on offset. + sptr l_offset = 0, r_offset = 0; + CHECK(AsanChunkView(left_chunk).AddrIsAtRight(addr, 1, &l_offset)); + CHECK(AsanChunkView(right_chunk).AddrIsAtLeft(addr, 1, &r_offset)); + if (l_offset < r_offset) + return left_chunk; + return right_chunk; + } + + // -------------------- Allocation/Deallocation routines --------------- + void *Allocate(uptr size, uptr alignment, BufferedStackTrace *stack, + AllocType alloc_type, bool can_fill) { + if (UNLIKELY(!asan_inited)) + AsanInitFromRtl(); + Flags &fl = *flags(); + CHECK(stack); + const uptr min_alignment = SHADOW_GRANULARITY; + if (alignment < min_alignment) + alignment = min_alignment; + if (size == 0) { + // We'd be happy to avoid allocating memory for zero-size requests, but + // some programs/tests depend on this behavior and assume that malloc + // would not return NULL even for zero-size allocations. Moreover, it + // looks like operator new should never return NULL, and results of + // consecutive "new" calls must be different even if the allocated size + // is zero. + size = 1; + } + CHECK(IsPowerOfTwo(alignment)); + uptr rz_log = ComputeRZLog(size); + uptr rz_size = RZLog2Size(rz_log); + uptr rounded_size = RoundUpTo(Max(size, kChunkHeader2Size), alignment); + uptr needed_size = rounded_size + rz_size; + if (alignment > min_alignment) + needed_size += alignment; + bool using_primary_allocator = true; + // If we are allocating from the secondary allocator, there will be no + // automatic right redzone, so add the right redzone manually. + if (!PrimaryAllocator::CanAllocate(needed_size, alignment)) { + needed_size += rz_size; + using_primary_allocator = false; + } + CHECK(IsAligned(needed_size, min_alignment)); + if (size > kMaxAllowedMallocSize || needed_size > kMaxAllowedMallocSize) { + Report("WARNING: AddressSanitizer failed to allocate %p bytes\n", + (void*)size); + return allocator.ReturnNullOrDie(); + } + + AsanThread *t = GetCurrentThread(); + void *allocated; + bool check_rss_limit = true; + if (t) { + AllocatorCache *cache = GetAllocatorCache(&t->malloc_storage()); + allocated = + allocator.Allocate(cache, needed_size, 8, false, check_rss_limit); + } else { + SpinMutexLock l(&fallback_mutex); + AllocatorCache *cache = &fallback_allocator_cache; + allocated = + allocator.Allocate(cache, needed_size, 8, false, check_rss_limit); + } + + if (!allocated) + return allocator.ReturnNullOrDie(); + + if (*(u8 *)MEM_TO_SHADOW((uptr)allocated) == 0 && CanPoisonMemory()) { + // Heap poisoning is enabled, but the allocator provides an unpoisoned + // chunk. This is possible if CanPoisonMemory() was false for some + // time, for example, due to flags()->start_disabled. + // Anyway, poison the block before using it for anything else. + uptr allocated_size = allocator.GetActuallyAllocatedSize(allocated); + PoisonShadow((uptr)allocated, allocated_size, kAsanHeapLeftRedzoneMagic); + } + + uptr alloc_beg = reinterpret_cast(allocated); + uptr alloc_end = alloc_beg + needed_size; + uptr beg_plus_redzone = alloc_beg + rz_size; + uptr user_beg = beg_plus_redzone; + if (!IsAligned(user_beg, alignment)) + user_beg = RoundUpTo(user_beg, alignment); + uptr user_end = user_beg + size; + CHECK_LE(user_end, alloc_end); + uptr chunk_beg = user_beg - kChunkHeaderSize; + AsanChunk *m = reinterpret_cast(chunk_beg); + m->alloc_type = alloc_type; + m->rz_log = rz_log; + u32 alloc_tid = t ? t->tid() : 0; + m->alloc_tid = alloc_tid; + CHECK_EQ(alloc_tid, m->alloc_tid); // Does alloc_tid fit into the bitfield? + m->free_tid = kInvalidTid; + m->from_memalign = user_beg != beg_plus_redzone; + if (alloc_beg != chunk_beg) { + CHECK_LE(alloc_beg+ 2 * sizeof(uptr), chunk_beg); + reinterpret_cast(alloc_beg)[0] = kAllocBegMagic; + reinterpret_cast(alloc_beg)[1] = chunk_beg; + } + if (using_primary_allocator) { + CHECK(size); + m->user_requested_size = size; + CHECK(allocator.FromPrimary(allocated)); + } else { + CHECK(!allocator.FromPrimary(allocated)); + m->user_requested_size = SizeClassMap::kMaxSize; + uptr *meta = reinterpret_cast(allocator.GetMetaData(allocated)); + meta[0] = size; + meta[1] = chunk_beg; + } + + m->alloc_context_id = StackDepotPut(*stack); + + uptr size_rounded_down_to_granularity = + RoundDownTo(size, SHADOW_GRANULARITY); + // Unpoison the bulk of the memory region. + if (size_rounded_down_to_granularity) + PoisonShadow(user_beg, size_rounded_down_to_granularity, 0); + // Deal with the end of the region if size is not aligned to granularity. + if (size != size_rounded_down_to_granularity && CanPoisonMemory()) { + u8 *shadow = + (u8 *)MemToShadow(user_beg + size_rounded_down_to_granularity); + *shadow = fl.poison_partial ? (size & (SHADOW_GRANULARITY - 1)) : 0; + } + + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.mallocs++; + thread_stats.malloced += size; + thread_stats.malloced_redzones += needed_size - size; + uptr class_id = + Min(kNumberOfSizeClasses, SizeClassMap::ClassID(needed_size)); + thread_stats.malloced_by_size[class_id]++; + if (needed_size > SizeClassMap::kMaxSize) + thread_stats.malloc_large++; + + void *res = reinterpret_cast(user_beg); + if (can_fill && fl.max_malloc_fill_size) { + uptr fill_size = Min(size, (uptr)fl.max_malloc_fill_size); + REAL(memset)(res, fl.malloc_fill_byte, fill_size); + } +#if CAN_SANITIZE_LEAKS + m->lsan_tag = __lsan::DisabledInThisThread() ? __lsan::kIgnored + : __lsan::kDirectlyLeaked; +#endif + // Must be the last mutation of metadata in this function. + atomic_store((atomic_uint8_t *)m, CHUNK_ALLOCATED, memory_order_release); + ASAN_MALLOC_HOOK(res, size); + return res; + } + + void AtomicallySetQuarantineFlag(AsanChunk *m, void *ptr, + BufferedStackTrace *stack) { + u8 old_chunk_state = CHUNK_ALLOCATED; + // Flip the chunk_state atomically to avoid race on double-free. + if (!atomic_compare_exchange_strong((atomic_uint8_t*)m, &old_chunk_state, + CHUNK_QUARANTINE, memory_order_acquire)) + ReportInvalidFree(ptr, old_chunk_state, stack); + CHECK_EQ(CHUNK_ALLOCATED, old_chunk_state); + } + + // Expects the chunk to already be marked as quarantined by using + // AtomicallySetQuarantineFlag. + void QuarantineChunk(AsanChunk *m, void *ptr, BufferedStackTrace *stack, + AllocType alloc_type) { + CHECK_EQ(m->chunk_state, CHUNK_QUARANTINE); + + if (m->alloc_type != alloc_type) { + if (atomic_load(&alloc_dealloc_mismatch, memory_order_acquire)) { + ReportAllocTypeMismatch((uptr)ptr, stack, (AllocType)m->alloc_type, + (AllocType)alloc_type); + } + } + + CHECK_GE(m->alloc_tid, 0); + if (SANITIZER_WORDSIZE == 64) // On 32-bits this resides in user area. + CHECK_EQ(m->free_tid, kInvalidTid); + AsanThread *t = GetCurrentThread(); + m->free_tid = t ? t->tid() : 0; + m->free_context_id = StackDepotPut(*stack); + // Poison the region. + PoisonShadow(m->Beg(), + RoundUpTo(m->UsedSize(), SHADOW_GRANULARITY), + kAsanHeapFreeMagic); + + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.frees++; + thread_stats.freed += m->UsedSize(); + + // Push into quarantine. + if (t) { + AsanThreadLocalMallocStorage *ms = &t->malloc_storage(); + AllocatorCache *ac = GetAllocatorCache(ms); + quarantine.Put(GetQuarantineCache(ms), QuarantineCallback(ac), m, + m->UsedSize()); + } else { + SpinMutexLock l(&fallback_mutex); + AllocatorCache *ac = &fallback_allocator_cache; + quarantine.Put(&fallback_quarantine_cache, QuarantineCallback(ac), m, + m->UsedSize()); + } + } + + void Deallocate(void *ptr, uptr delete_size, BufferedStackTrace *stack, + AllocType alloc_type) { + uptr p = reinterpret_cast(ptr); + if (p == 0) return; + + uptr chunk_beg = p - kChunkHeaderSize; + AsanChunk *m = reinterpret_cast(chunk_beg); + if (delete_size && flags()->new_delete_type_mismatch && + delete_size != m->UsedSize()) { + ReportNewDeleteSizeMismatch(p, delete_size, stack); + } + ASAN_FREE_HOOK(ptr); + // Must mark the chunk as quarantined before any changes to its metadata. + AtomicallySetQuarantineFlag(m, ptr, stack); + QuarantineChunk(m, ptr, stack, alloc_type); + } + + void *Reallocate(void *old_ptr, uptr new_size, BufferedStackTrace *stack) { + CHECK(old_ptr && new_size); + uptr p = reinterpret_cast(old_ptr); + uptr chunk_beg = p - kChunkHeaderSize; + AsanChunk *m = reinterpret_cast(chunk_beg); + + AsanStats &thread_stats = GetCurrentThreadStats(); + thread_stats.reallocs++; + thread_stats.realloced += new_size; + + void *new_ptr = Allocate(new_size, 8, stack, FROM_MALLOC, true); + if (new_ptr) { + u8 chunk_state = m->chunk_state; + if (chunk_state != CHUNK_ALLOCATED) + ReportInvalidFree(old_ptr, chunk_state, stack); + CHECK_NE(REAL(memcpy), (void*)0); + uptr memcpy_size = Min(new_size, m->UsedSize()); + // If realloc() races with free(), we may start copying freed memory. + // However, we will report racy double-free later anyway. + REAL(memcpy)(new_ptr, old_ptr, memcpy_size); + Deallocate(old_ptr, 0, stack, FROM_MALLOC); + } + return new_ptr; + } + + void *Calloc(uptr nmemb, uptr size, BufferedStackTrace *stack) { + if (CallocShouldReturnNullDueToOverflow(size, nmemb)) + return allocator.ReturnNullOrDie(); + void *ptr = Allocate(nmemb * size, 8, stack, FROM_MALLOC, false); + // If the memory comes from the secondary allocator no need to clear it + // as it comes directly from mmap. + if (ptr && allocator.FromPrimary(ptr)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 14:12:41 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 A3DA4177; Sun, 15 Mar 2015 14:12:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F49E7BB; Sun, 15 Mar 2015 14:12:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FECf8A077259; Sun, 15 Mar 2015 14:12:41 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FECfAo077258; Sun, 15 Mar 2015 14:12:41 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201503151412.t2FECfAo077258@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Sun, 15 Mar 2015 14:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280035 - head/sys/cddl/dev/profile X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 14:12:41 -0000 Author: rwatson Date: Sun Mar 15 14:12:40 2015 New Revision: 280035 URL: https://svnweb.freebsd.org/changeset/base/280035 Log: Replace the completely arbitrary '3' with '9' for the number of frames to skip using the DTrace 'profile' provider on ARM. This causes stack traces to skip various driver-and callout-related things as they do on x86, where the likewise arbitrary values are '6' (32-bit) and '10' (64-bit) for similar sorts of reasons. MFC after: 3 days Sponsored by: DARPA, AFRL Modified: head/sys/cddl/dev/profile/profile.c Modified: head/sys/cddl/dev/profile/profile.c ============================================================================== --- head/sys/cddl/dev/profile/profile.c Sun Mar 15 14:05:55 2015 (r280034) +++ head/sys/cddl/dev/profile/profile.c Sun Mar 15 14:12:40 2015 (r280035) @@ -135,7 +135,7 @@ struct profile_probe_percpu; #ifdef __arm__ /* bogus */ -#define PROF_ARTIFICIAL_FRAMES 3 +#define PROF_ARTIFICIAL_FRAMES 9 #endif typedef struct profile_probe { From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 14:57:12 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 881E8B27; Sun, 15 Mar 2015 14:57:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68527B9C; Sun, 15 Mar 2015 14:57:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FEvCa0097554; Sun, 15 Mar 2015 14:57:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FEvBMo097551; Sun, 15 Mar 2015 14:57:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503151457.t2FEvBMo097551@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Mar 2015 14:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280037 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 14:57:12 -0000 Author: mav Date: Sun Mar 15 14:57:11 2015 New Revision: 280037 URL: https://svnweb.freebsd.org/changeset/base/280037 Log: Rewrite virtio block device driver to work asynchronously and use the block I/O interface. Asynchronous operation, based on r280026 change, allows to not block virtual CPU during I/O processing, that on slow/busy storage can take seconds. Use of recently improved block I/O interface allows to process multiple requests same time, that improves random I/O performance on wide storages. Benchmarks of virtual disk, backed by ZVOL on RAID10 pool of 4 HDDs, show ~3.5 times random read performance improvements, while no degradation on linear I/O. Guest CPU usage during test dropped from 100% to almost zero. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/block_if.c head/usr.sbin/bhyve/pci_virtio_block.c Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Sun Mar 15 14:41:26 2015 (r280036) +++ head/usr.sbin/bhyve/block_if.c Sun Mar 15 14:57:11 2015 (r280037) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); #define BLOCKIF_SIG 0xb109b109 -#define BLOCKIF_MAXREQ 33 +#define BLOCKIF_MAXREQ 64 #define BLOCKIF_NUMTHR 8 enum blockop { Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Sun Mar 15 14:41:26 2015 (r280036) +++ head/usr.sbin/bhyve/pci_virtio_block.c Sun Mar 15 14:57:11 2015 (r280037) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include "bhyverun.h" #include "pci_emul.h" #include "virtio.h" +#include "block_if.h" #define VTBLK_RINGSZ 64 @@ -120,6 +121,13 @@ static int pci_vtblk_debug; #define DPRINTF(params) if (pci_vtblk_debug) printf params #define WPRINTF(params) printf params +struct pci_vtblk_ioreq { + struct blockif_req io_req; + struct pci_vtblk_softc *io_sc; + uint8_t *io_status; + uint16_t io_idx; +}; + /* * Per-device softc */ @@ -127,10 +135,10 @@ struct pci_vtblk_softc { struct virtio_softc vbsc_vs; pthread_mutex_t vsc_mtx; struct vqueue_info vbsc_vq; - int vbsc_fd; - int vbsc_ischr; - struct vtblk_config vbsc_cfg; + struct vtblk_config vbsc_cfg; + struct blockif_ctxt *bc; char vbsc_ident[VTBLK_BLK_ID_BYTES]; + struct pci_vtblk_ioreq vbsc_ios[VTBLK_RINGSZ]; }; static void pci_vtblk_reset(void *); @@ -160,10 +168,34 @@ pci_vtblk_reset(void *vsc) } static void +pci_vtblk_done(struct blockif_req *br, int err) +{ + struct pci_vtblk_ioreq *io = br->br_param; + struct pci_vtblk_softc *sc = io->io_sc; + + /* convert errno into a virtio block error return */ + if (err == EOPNOTSUPP || err == ENOSYS) + *io->io_status = VTBLK_S_UNSUPP; + else if (err != 0) + *io->io_status = VTBLK_S_IOERR; + else + *io->io_status = VTBLK_S_OK; + + /* + * Return the descriptor back to the host. + * We wrote 1 byte (our status) to host. + */ + pthread_mutex_lock(&sc->vsc_mtx); + vq_relchain(&sc->vbsc_vq, io->io_idx, 1); + vq_endchains(&sc->vbsc_vq, 0); + pthread_mutex_unlock(&sc->vsc_mtx); +} + +static void pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vqueue_info *vq) { struct virtio_blk_hdr *vbh; - uint8_t *status; + struct pci_vtblk_ioreq *io; int i, n; int err; int iolen; @@ -184,11 +216,14 @@ pci_vtblk_proc(struct pci_vtblk_softc *s */ assert(n >= 2 && n <= VTBLK_MAXSEGS + 2); + io = &sc->vbsc_ios[idx]; assert((flags[0] & VRING_DESC_F_WRITE) == 0); assert(iov[0].iov_len == sizeof(struct virtio_blk_hdr)); vbh = iov[0].iov_base; - - status = iov[--n].iov_base; + memcpy(&io->io_req.br_iov, &iov[1], sizeof(struct iovec) * (n - 2)); + io->io_req.br_iovcnt = n - 2; + io->io_req.br_offset = vbh->vbh_sector * DEV_BSIZE; + io->io_status = iov[--n].iov_base; assert(iov[n].iov_len == 1); assert(flags[n] & VRING_DESC_F_WRITE); @@ -200,8 +235,6 @@ pci_vtblk_proc(struct pci_vtblk_softc *s type = vbh->vbh_type & ~VBH_FLAG_BARRIER; writeop = (type == VBH_OP_WRITE); - offset = vbh->vbh_sector * DEV_BSIZE; - iolen = 0; for (i = 1; i < n; i++) { /* @@ -217,48 +250,28 @@ pci_vtblk_proc(struct pci_vtblk_softc *s DPRINTF(("virtio-block: %s op, %d bytes, %d segs, offset %ld\n\r", writeop ? "write" : "read/ident", iolen, i - 1, offset)); - err = 0; switch (type) { + case VBH_OP_READ: + err = blockif_read(sc->bc, &io->io_req); + break; case VBH_OP_WRITE: - if (pwritev(sc->vbsc_fd, iov + 1, i - 1, offset) < 0) - err = errno; + err = blockif_write(sc->bc, &io->io_req); break; - case VBH_OP_READ: - if (preadv(sc->vbsc_fd, iov + 1, i - 1, offset) < 0) - err = errno; + case VBH_OP_FLUSH: + case VBH_OP_FLUSH_OUT: + err = blockif_flush(sc->bc, &io->io_req); break; case VBH_OP_IDENT: /* Assume a single buffer */ strlcpy(iov[1].iov_base, sc->vbsc_ident, MIN(iov[1].iov_len, sizeof(sc->vbsc_ident))); - err = 0; - break; - case VBH_OP_FLUSH: - case VBH_OP_FLUSH_OUT: - if (sc->vbsc_ischr) { - if (ioctl(sc->vbsc_fd, DIOCGFLUSH)) - err = errno; - } else if (fsync(sc->vbsc_fd)) - err = errno; - break; + pci_vtblk_done(&io->io_req, 0); + return; default: - err = -ENOSYS; - break; + pci_vtblk_done(&io->io_req, EOPNOTSUPP); + return; } - - /* convert errno into a virtio block error return */ - if (err == -ENOSYS) - *status = VTBLK_S_UNSUPP; - else if (err != 0) - *status = VTBLK_S_IOERR; - else - *status = VTBLK_S_OK; - - /* - * Return the descriptor back to the host. - * We wrote 1 byte (our status) to host. - */ - vq_relchain(vq, idx, 1); + assert(err == 0); } static void @@ -268,19 +281,18 @@ pci_vtblk_notify(void *vsc, struct vqueu while (vq_has_descs(vq)) pci_vtblk_proc(sc, vq); - vq_endchains(vq, 1); /* Generate interrupt if appropriate. */ } static int pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { - struct stat sbuf; + char bident[sizeof("XX:X:X")]; + struct blockif_ctxt *bctxt; MD5_CTX mdctx; u_char digest[16]; struct pci_vtblk_softc *sc; - off_t size, sts, sto; - int fd; - int sectsz; + off_t size; + int i, sectsz, sts, sto; if (opts == NULL) { printf("virtio-block: backing device required\n"); @@ -290,43 +302,26 @@ pci_vtblk_init(struct vmctx *ctx, struct /* * The supplied backing file has to exist */ - fd = open(opts, O_RDWR); - if (fd < 0) { + snprintf(bident, sizeof(bident), "%d:%d", pi->pi_slot, pi->pi_func); + bctxt = blockif_open(opts, bident); + if (bctxt == NULL) { perror("Could not open backing file"); return (1); } - if (fstat(fd, &sbuf) < 0) { - perror("Could not stat backing file"); - close(fd); - return (1); - } - - /* - * Deal with raw devices - */ - size = sbuf.st_size; - sectsz = DEV_BSIZE; - sts = sto = 0; - if (S_ISCHR(sbuf.st_mode)) { - if (ioctl(fd, DIOCGMEDIASIZE, &size) < 0 || - ioctl(fd, DIOCGSECTORSIZE, §sz)) { - perror("Could not fetch dev blk/sector size"); - close(fd); - return (1); - } - assert(size != 0); - assert(sectsz != 0); - if (ioctl(fd, DIOCGSTRIPESIZE, &sts) == 0 && sts > 0) - ioctl(fd, DIOCGSTRIPEOFFSET, &sto); - } else - sts = sbuf.st_blksize; + size = blockif_size(bctxt); + sectsz = blockif_sectsz(bctxt); + blockif_psectsz(bctxt, &sts, &sto); sc = calloc(1, sizeof(struct pci_vtblk_softc)); - - /* record fd of storage device/file */ - sc->vbsc_fd = fd; - sc->vbsc_ischr = S_ISCHR(sbuf.st_mode); + sc->bc = bctxt; + for (i = 0; i < VTBLK_RINGSZ; i++) { + struct pci_vtblk_ioreq *io = &sc->vbsc_ios[i]; + io->io_req.br_callback = pci_vtblk_done; + io->io_req.br_param = io; + io->io_sc = sc; + io->io_idx = i; + } pthread_mutex_init(&sc->vsc_mtx, NULL); @@ -375,8 +370,11 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_lintr_request(pi); - if (vi_intr_init(&sc->vbsc_vs, 1, fbsdrun_virtio_msix())) + if (vi_intr_init(&sc->vbsc_vs, 1, fbsdrun_virtio_msix())) { + blockif_close(sc->bc); + free(sc); return (1); + } vi_set_io_bar(&sc->vbsc_vs, 0); return (0); } From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 15:17:35 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 7041BF43; Sun, 15 Mar 2015 15:17:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A827D6D; Sun, 15 Mar 2015 15:17:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FFHZ4B007619; Sun, 15 Mar 2015 15:17:35 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FFHZ2g007618; Sun, 15 Mar 2015 15:17:35 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201503151517.t2FFHZ2g007618@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Sun, 15 Mar 2015 15:17:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280038 - head/sys/cddl/dev/dtrace/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 15:17:35 -0000 Author: rwatson Date: Sun Mar 15 15:17:34 2015 New Revision: 280038 URL: https://svnweb.freebsd.org/changeset/base/280038 Log: On ARM, unlike some other architectures, saved $pc values from in-kernel traps do appear in the regular call stack, rather than only in a special trap frame, so we don't need to inject the trap-frame $pc into a returned stack trace in DTrace. MFC after: 3 days Sponsored by: DARPA, AFRL Modified: head/sys/cddl/dev/dtrace/arm/dtrace_isa.c Modified: head/sys/cddl/dev/dtrace/arm/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/arm/dtrace_isa.c Sun Mar 15 14:57:11 2015 (r280037) +++ head/sys/cddl/dev/dtrace/arm/dtrace_isa.c Sun Mar 15 15:17:34 2015 (r280038) @@ -73,7 +73,6 @@ dtrace_getpcstack(pc_t *pcstack, int pcs register_t sp; int scp_offset; int depth = 0; - pc_t caller = (pc_t) solaris_cpu[curcpu].cpu_dtrace_caller; if (intrpc != 0) pcstack[depth++] = (pc_t) intrpc; @@ -92,13 +91,14 @@ dtrace_getpcstack(pc_t *pcstack, int pcs done = unwind_stack_one(&state, 1); + /* + * NB: Unlike some other architectures, we don't need to + * explicitly insert cpu_dtrace_caller as it appears in the + * normal kernel stack trace rather than a special trap frame. + */ if (aframes > 0) { aframes--; - if ((aframes == 0) && (caller != 0)) { - pcstack[depth++] = caller; - } - } - else { + } else { pcstack[depth++] = state.registers[PC]; } From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 15:19:03 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 41EF0119; Sun, 15 Mar 2015 15:19: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 2CBE3D7B; Sun, 15 Mar 2015 15:19: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 t2FFJ3R3007857; Sun, 15 Mar 2015 15:19:03 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FFJ3d9007856; Sun, 15 Mar 2015 15:19:03 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201503151519.t2FFJ3d9007856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Sun, 15 Mar 2015 15:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280039 - head/sys/cddl/dev/fbt/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 15:19:03 -0000 Author: rwatson Date: Sun Mar 15 15:19:02 2015 New Revision: 280039 URL: https://svnweb.freebsd.org/changeset/base/280039 Log: Now that DTrace stack traces handle exception frames better, skip fewer stack frames for FBT 'entry' probes on ARM. MFC after: 3 days Sponsored by: DARPA, AFRL Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/arm/fbt_isa.c Sun Mar 15 15:17:34 2015 (r280038) +++ head/sys/cddl/dev/fbt/arm/fbt_isa.c Sun Mar 15 15:19:02 2015 (r280039) @@ -172,7 +172,7 @@ again: fbt->fbtp_name = name; if (retfbt == NULL) { fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, - name, FBT_RETURN, 5, fbt); + name, FBT_RETURN, 3, fbt); } else { retfbt->fbtp_next = fbt; fbt->fbtp_id = retfbt->fbtp_id; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 15:29: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 8A3994BF; Sun, 15 Mar 2015 15:29: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 5B415E64; Sun, 15 Mar 2015 15:29: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 t2FFT4hp012904; Sun, 15 Mar 2015 15:29:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FFT4lN012903; Sun, 15 Mar 2015 15:29:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503151529.t2FFT4lN012903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Mar 2015 15:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280040 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 15:29:04 -0000 Author: mav Date: Sun Mar 15 15:29:03 2015 New Revision: 280040 URL: https://svnweb.freebsd.org/changeset/base/280040 Log: Give AHCI disk serial based on backing file path same as for virtio block. It is still not good that they may intersect on different hosts, but that is better then intersecting on the same host. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Sun Mar 15 15:19:02 2015 (r280039) +++ head/usr.sbin/bhyve/pci_ahci.c Sun Mar 15 15:29:03 2015 (r280040) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "bhyverun.h" #include "pci_emul.h" @@ -131,6 +132,7 @@ struct ahci_port { struct pci_ahci_softc *pr_sc; uint8_t *cmd_lst; uint8_t *rfis; + char ident[20 + 1]; int atapi; int reset; int mult_sectors; @@ -855,8 +857,7 @@ handle_identify(struct ahci_port *p, int buf[1] = cyl; buf[3] = heads; buf[6] = sech; - /* TODO emulate different serial? */ - ata_string((uint8_t *)(buf+10), "123456", 20); + ata_string((uint8_t *)(buf+10), p->ident, 20); ata_string((uint8_t *)(buf+23), "001", 8); ata_string((uint8_t *)(buf+27), "BHYVE SATA DISK", 40); buf[47] = (0x8000 | 128); @@ -946,8 +947,7 @@ handle_atapi_identify(struct ahci_port * memset(buf, 0, sizeof(buf)); buf[0] = (2 << 14 | 5 << 8 | 1 << 7 | 2 << 5); - /* TODO emulate different serial? */ - ata_string((uint8_t *)(buf+10), "123456", 20); + ata_string((uint8_t *)(buf+10), p->ident, 20); ata_string((uint8_t *)(buf+23), "001", 8); ata_string((uint8_t *)(buf+27), "BHYVE SATA DVD ROM", 40); buf[49] = (1 << 9 | 1 << 8); @@ -2167,6 +2167,8 @@ pci_ahci_init(struct vmctx *ctx, struct struct blockif_ctxt *bctxt; struct pci_ahci_softc *sc; int ret, slots; + MD5_CTX mdctx; + u_char digest[16]; ret = 0; @@ -2204,6 +2206,16 @@ pci_ahci_init(struct vmctx *ctx, struct sc->port[0].pr_sc = sc; /* + * Create an identifier for the backing file. Use parts of the + * md5 sum of the filename + */ + MD5Init(&mdctx); + MD5Update(&mdctx, opts, strlen(opts)); + MD5Final(digest, &mdctx); + sprintf(sc->port[0].ident, "BHYVE-%02X%02X-%02X%02X-%02X%02X", + digest[0], digest[1], digest[2], digest[3], digest[4], digest[5]); + + /* * Allocate blockif request structures and add them * to the free list */ From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 16:09:41 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 A5F4C8AD; Sun, 15 Mar 2015 16:09:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7688E2EE; Sun, 15 Mar 2015 16:09:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FG9ffw033844; Sun, 15 Mar 2015 16:09:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FG9eMc033841; Sun, 15 Mar 2015 16:09:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503151609.t2FG9eMc033841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Mar 2015 16:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280041 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 16:09:41 -0000 Author: mav Date: Sun Mar 15 16:09:39 2015 New Revision: 280041 URL: https://svnweb.freebsd.org/changeset/base/280041 Log: Fix networking problem after r280026. I've missed that network driver sometimes returns taken request back to available queue without processing. Add new helper function for that case. Reported by: flo MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_virtio_net.c head/usr.sbin/bhyve/virtio.c head/usr.sbin/bhyve/virtio.h Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Sun Mar 15 15:29:03 2015 (r280040) +++ head/usr.sbin/bhyve/pci_virtio_net.c Sun Mar 15 16:09:39 2015 (r280041) @@ -342,6 +342,7 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc * No more packets, but still some avail ring * entries. Interrupt if needed/appropriate. */ + vq_retchain(vq); vq_endchains(vq, 0); return; } Modified: head/usr.sbin/bhyve/virtio.c ============================================================================== --- head/usr.sbin/bhyve/virtio.c Sun Mar 15 15:29:03 2015 (r280040) +++ head/usr.sbin/bhyve/virtio.c Sun Mar 15 16:09:39 2015 (r280041) @@ -372,8 +372,21 @@ loopy: } /* - * Return the currently-first request chain to the guest, setting - * its I/O length to the provided value. + * Return the currently-first request chain back to the available queue. + * + * (This chain is the one you handled when you called vq_getchain() + * and used its positive return value.) + */ +void +vq_retchain(struct vqueue_info *vq) +{ + + vq->vq_last_avail--; +} + +/* + * Return specified request chain to the guest, setting its I/O length + * to the provided value. * * (This chain is the one you handled when you called vq_getchain() * and used its positive return value.) Modified: head/usr.sbin/bhyve/virtio.h ============================================================================== --- head/usr.sbin/bhyve/virtio.h Sun Mar 15 15:29:03 2015 (r280040) +++ head/usr.sbin/bhyve/virtio.h Sun Mar 15 16:09:39 2015 (r280041) @@ -453,6 +453,7 @@ void vi_set_io_bar(struct virtio_softc * int vq_getchain(struct vqueue_info *vq, uint16_t *pidx, struct iovec *iov, int n_iov, uint16_t *flags); +void vq_retchain(struct vqueue_info *vq); void vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen); void vq_endchains(struct vqueue_info *vq, int used_all_avail); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 16:18: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 DF4F7B11; Sun, 15 Mar 2015 16:18: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 CA4203D3; Sun, 15 Mar 2015 16:18: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 t2FGI4lx038386; Sun, 15 Mar 2015 16:18:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FGI4E4038385; Sun, 15 Mar 2015 16:18:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503151618.t2FGI4E4038385@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Mar 2015 16:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280042 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 16:18:05 -0000 Author: mav Date: Sun Mar 15 16:18:03 2015 New Revision: 280042 URL: https://svnweb.freebsd.org/changeset/base/280042 Log: Close potential race on blockif_close(). Reported by: vangyzen MFC after: 2 weeks Modified: head/usr.sbin/bhyve/block_if.c Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Sun Mar 15 16:09:39 2015 (r280041) +++ head/usr.sbin/bhyve/block_if.c Sun Mar 15 16:18:03 2015 (r280042) @@ -579,7 +579,9 @@ blockif_close(struct blockif_ctxt *bc) /* * Stop the block i/o thread */ + pthread_mutex_lock(&bc->bc_mtx); bc->bc_closing = 1; + pthread_mutex_unlock(&bc->bc_mtx); pthread_cond_broadcast(&bc->bc_cond); for (i = 0; i < BLOCKIF_NUMTHR; i++) pthread_join(bc->bc_btid[i], &jval); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 17:39: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 B851A25D; Sun, 15 Mar 2015 17:39: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 895CCCC1; Sun, 15 Mar 2015 17:39: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 t2FHddOP075612; Sun, 15 Mar 2015 17:39:39 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FHddsr075611; Sun, 15 Mar 2015 17:39:39 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503151739.t2FHddsr075611@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 15 Mar 2015 17:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280043 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 17:39:39 -0000 Author: ian Date: Sun Mar 15 17:39:38 2015 New Revision: 280043 URL: https://svnweb.freebsd.org/changeset/base/280043 Log: Remove redundant sysctl_handle_string() calls, the sbuf auto-drain takes care of that. Reviewed by: erj@ Modified: head/sys/dev/ixl/if_ixl.c Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Sun Mar 15 16:18:03 2015 (r280042) +++ head/sys/dev/ixl/if_ixl.c Sun Mar 15 17:39:38 2015 (r280043) @@ -4994,7 +4994,7 @@ ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_A u8 num_entries; struct i40e_aqc_switch_resource_alloc_element_resp resp[IXL_SW_RES_SIZE]; - buf = sbuf_new_for_sysctl(NULL, NULL, 0, req); + buf = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (!buf) { device_printf(dev, "Could not allocate sbuf for output.\n"); return (ENOMEM); @@ -5038,13 +5038,7 @@ ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_A error = sbuf_finish(buf); if (error) { device_printf(dev, "Error finishing sbuf: %d\n", error); - sbuf_delete(buf); - return error; } - - error = sysctl_handle_string(oidp, sbuf_data(buf), sbuf_len(buf), req); - if (error) - device_printf(dev, "sysctl error: %d\n", error); sbuf_delete(buf); return error; } @@ -5102,7 +5096,7 @@ ixl_sysctl_switch_config(SYSCTL_HANDLER_ struct i40e_aqc_get_switch_config_resp *sw_config; sw_config = (struct i40e_aqc_get_switch_config_resp *)aq_buf; - buf = sbuf_new_for_sysctl(NULL, NULL, 0, req); + buf = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (!buf) { device_printf(dev, "Could not allocate sbuf for sysctl output.\n"); return (ENOMEM); @@ -5121,6 +5115,7 @@ ixl_sysctl_switch_config(SYSCTL_HANDLER_ nmbuf = sbuf_new_auto(); if (!nmbuf) { device_printf(dev, "Could not allocate sbuf for name output.\n"); + sbuf_delete(buf); return (ENOMEM); } @@ -5155,13 +5150,7 @@ ixl_sysctl_switch_config(SYSCTL_HANDLER_ error = sbuf_finish(buf); if (error) { device_printf(dev, "Error finishing sbuf: %d\n", error); - sbuf_delete(buf); - return error; } - - error = sysctl_handle_string(oidp, sbuf_data(buf), sbuf_len(buf), req); - if (error) - device_printf(dev, "sysctl error: %d\n", error); sbuf_delete(buf); return (error); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 17:45:17 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 C83D33C2; Sun, 15 Mar 2015 17:45:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2D5FD6E; Sun, 15 Mar 2015 17:45:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FHjHUn079777; Sun, 15 Mar 2015 17:45:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FHjHgl079776; Sun, 15 Mar 2015 17:45:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503151745.t2FHjHgl079776@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Mar 2015 17:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280044 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 17:45:17 -0000 Author: mav Date: Sun Mar 15 17:45:16 2015 New Revision: 280044 URL: https://svnweb.freebsd.org/changeset/base/280044 Log: According to Linux and QEMU, s/n equal to buffer is not zero-terminated. This makes same s/n reported for both virtio and AHCI drivers. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_virtio_block.c Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Sun Mar 15 17:39:38 2015 (r280043) +++ head/usr.sbin/bhyve/pci_virtio_block.c Sun Mar 15 17:45:16 2015 (r280044) @@ -263,7 +263,9 @@ pci_vtblk_proc(struct pci_vtblk_softc *s break; case VBH_OP_IDENT: /* Assume a single buffer */ - strlcpy(iov[1].iov_base, sc->vbsc_ident, + /* S/n equal to buffer is not zero-terminated. */ + memset(iov[1].iov_base, 0, iov[1].iov_len); + strncpy(iov[1].iov_base, sc->vbsc_ident, MIN(iov[1].iov_len, sizeof(sc->vbsc_ident))); pci_vtblk_done(&io->io_req, 0); return; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 19:00:36 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 94E551AE; Sun, 15 Mar 2015 19:00: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 7FA05651; Sun, 15 Mar 2015 19:00: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 t2FJ0aIE015217; Sun, 15 Mar 2015 19:00:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FJ0ahO015215; Sun, 15 Mar 2015 19:00:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503151900.t2FJ0ahO015215@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 15 Mar 2015 19:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280047 - in head/sys/boot: amd64/efi efi/libefi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 19:00:36 -0000 Author: andrew Date: Sun Mar 15 19:00:35 2015 New Revision: 280047 URL: https://svnweb.freebsd.org/changeset/base/280047 Log: Move the x86 specific files to be built in the amd64 loader.efi. This will help with importing the arm and arm64 versions of loader.efi. Modified: head/sys/boot/amd64/efi/Makefile head/sys/boot/efi/libefi/Makefile Modified: head/sys/boot/amd64/efi/Makefile ============================================================================== --- head/sys/boot/amd64/efi/Makefile Sun Mar 15 18:42:19 2015 (r280046) +++ head/sys/boot/amd64/efi/Makefile Sun Mar 15 19:00:35 2015 (r280047) @@ -25,6 +25,9 @@ SRCS= autoload.c \ vers.c SRCS+= amd64_tramp.S \ start.S +.PATH: ${.CURDIR}/../../i386/libi386 +SRCS+= nullconsole.c \ + comconsole.c CFLAGS+= -fPIC CFLAGS+= -I. @@ -32,6 +35,7 @@ CFLAGS+= -I${.CURDIR}/../../efi/include CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include CFLAGS+= -I${.CURDIR}/../../.. +CFLAGS+= -DNO_PCI .if ${MK_FORTH} != "no" BOOT_FORTH= yes Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Sun Mar 15 18:42:19 2015 (r280046) +++ head/sys/boot/efi/libefi/Makefile Sun Mar 15 19:00:35 2015 (r280047) @@ -5,8 +5,6 @@ INTERNALLIB= SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \ libefi.c time.c -.PATH: ${.CURDIR}/../../i386/libi386 -SRCS+= nullconsole.c comconsole.c .if ${MACHINE_ARCH} == "amd64" CFLAGS+= -fPIC -mno-red-zone @@ -18,8 +16,6 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/li # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common -CFLAGS+= -DNO_PCI - # Handle FreeBSD specific %b and %D printf format specifiers CFLAGS+= ${FORMAT_EXTENSIONS} From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:09:48 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 A99A4C71; Sun, 15 Mar 2015 20:09:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 953A1D11; Sun, 15 Mar 2015 20:09:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FK9mUX049081; Sun, 15 Mar 2015 20:09:48 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FK9mh0049080; Sun, 15 Mar 2015 20:09:48 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152009.t2FK9mh0049080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280050 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:09:48 -0000 Author: adrian Date: Sun Mar 15 20:09:47 2015 New Revision: 280050 URL: https://svnweb.freebsd.org/changeset/base/280050 Log: Fix mbuf mapping errors in wpi_cmd2() + add check for nsegs PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 19:37:07 2015 (r280049) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:09:47 2015 (r280050) @@ -2272,7 +2272,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp } if (error != 0) { /* Too many DMA segments, linearize mbuf. */ - m1 = m_collapse(buf->m, M_NOWAIT, WPI_MAX_SCATTER); + m1 = m_collapse(buf->m, M_NOWAIT, WPI_MAX_SCATTER - 1); if (m1 == NULL) { device_printf(sc->sc_dev, "%s: could not defrag mbuf\n", __func__); @@ -2291,6 +2291,10 @@ wpi_cmd2(struct wpi_softc *sc, struct wp } } + KASSERT(nsegs < WPI_MAX_SCATTER, + ("too many DMA segments, nsegs (%d) should be less than %d", + nsegs, WPI_MAX_SCATTER)); + data->m = buf->m; data->ni = buf->ni; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:10: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 03D99DCB; Sun, 15 Mar 2015 20:10: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 E37CADAA; Sun, 15 Mar 2015 20:10:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKAtLq050412; Sun, 15 Mar 2015 20:10:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKAt9o050411; Sun, 15 Mar 2015 20:10:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152010.t2FKAt9o050411@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280051 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:10:56 -0000 Author: adrian Date: Sun Mar 15 20:10:55 2015 New Revision: 280051 URL: https://svnweb.freebsd.org/changeset/base/280051 Log: Fix a typo (IEEE80211_S_SCAN -> IEEE80211_F_SCAN) PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:09:47 2015 (r280050) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:10:55 2015 (r280051) @@ -1978,7 +1978,7 @@ wpi_notif_intr(struct wpi_softc *sc) le32toh(miss->total)); if (vap->iv_state == IEEE80211_S_RUN && - (ic->ic_flags & IEEE80211_S_SCAN) == 0) { + (ic->ic_flags & IEEE80211_F_SCAN) == 0) { if (misses >= vap->iv_bmissthreshold) { WPI_UNLOCK(sc); ieee80211_beacon_miss(ic); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:12:17 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 84449F35; Sun, 15 Mar 2015 20:12:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FE1FDBE; Sun, 15 Mar 2015 20:12:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKCHbs053010; Sun, 15 Mar 2015 20:12:17 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKCHvY053009; Sun, 15 Mar 2015 20:12:17 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152012.t2FKCHvY053009@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280052 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:12:17 -0000 Author: adrian Date: Sun Mar 15 20:12:16 2015 New Revision: 280052 URL: https://svnweb.freebsd.org/changeset/base/280052 Log: Add missed ieee80211_draintask() PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:10:55 2015 (r280051) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:12:16 2015 (r280052) @@ -635,6 +635,7 @@ wpi_detach(device_t dev) ieee80211_draintask(ic, &sc->sc_reinittask); ieee80211_draintask(ic, &sc->sc_radiooff_task); + ieee80211_draintask(ic, &sc->sc_radioon_task); wpi_stop(sc); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:13:08 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 01B00115; Sun, 15 Mar 2015 20:13:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E16ACDC8; Sun, 15 Mar 2015 20:13:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKD7RF053167; Sun, 15 Mar 2015 20:13:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKD7jv053166; Sun, 15 Mar 2015 20:13:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152013.t2FKD7jv053166@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280053 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:13:08 -0000 Author: adrian Date: Sun Mar 15 20:13:07 2015 New Revision: 280053 URL: https://svnweb.freebsd.org/changeset/base/280053 Log: Run callout_reset() with mutex held. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:12:16 2015 (r280052) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:13:07 2015 (r280053) @@ -4660,7 +4660,9 @@ wpi_radio_off(void *arg0, int pending) if (vap != NULL) ieee80211_stop(vap); + WPI_LOCK(sc); callout_reset(&sc->watchdog_rfkill, hz, wpi_watchdog_rfkill, sc); + WPI_UNLOCK(sc); } static void From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:13:59 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 B810326C; Sun, 15 Mar 2015 20:13:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3B99DD2; Sun, 15 Mar 2015 20:13:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKDxkC053320; Sun, 15 Mar 2015 20:13:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKDxX8053319; Sun, 15 Mar 2015 20:13:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152013.t2FKDxX8053319@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280054 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:13:59 -0000 Author: adrian Date: Sun Mar 15 20:13:58 2015 New Revision: 280054 URL: https://svnweb.freebsd.org/changeset/base/280054 Log: Divide ackfailcnt by 2 (firmware decreases rate after two unsuccessful retries) PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:13:07 2015 (r280053) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:13:58 2015 (r280054) @@ -1834,7 +1834,7 @@ wpi_tx_done(struct wpi_softc *sc, struct struct mbuf *m; struct ieee80211_node *ni; struct ieee80211vap *vap; - int ackfailcnt = stat->ackfailcnt; + int ackfailcnt = stat->ackfailcnt / 2; /* wpi_mrr_setup() */ int status = le32toh(stat->status); KASSERT(data->ni != NULL, ("no node")); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:15:11 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 515013DC; Sun, 15 Mar 2015 20:15:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CF0ADE2; Sun, 15 Mar 2015 20:15:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKFBx2053595; Sun, 15 Mar 2015 20:15:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKFBan053594; Sun, 15 Mar 2015 20:15:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152015.t2FKFBan053594@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:15:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280055 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:15:11 -0000 Author: adrian Date: Sun Mar 15 20:15:10 2015 New Revision: 280055 URL: https://svnweb.freebsd.org/changeset/base/280055 Log: Fix races between wpi_rx_done() and wpi_stop() PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:13:58 2015 (r280054) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:15:10 2015 (r280055) @@ -1952,6 +1952,12 @@ wpi_notif_intr(struct wpi_softc *sc) case WPI_RX_DONE: /* An 802.11 frame has been received. */ wpi_rx_done(sc, desc, data); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + /* wpi_stop() was called. */ + return; + } + break; case WPI_TX_DONE: From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:17: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 1D9B8596; Sun, 15 Mar 2015 20:17: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 09383E04; Sun, 15 Mar 2015 20:17: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 t2FKHPVQ053923; Sun, 15 Mar 2015 20:17:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKHP2s053922; Sun, 15 Mar 2015 20:17:25 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152017.t2FKHP2s053922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280056 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:17:26 -0000 Author: adrian Date: Sun Mar 15 20:17:25 2015 New Revision: 280056 URL: https://svnweb.freebsd.org/changeset/base/280056 Log: Fix panics in wpi_tx_done() when powersave is enabled PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:15:10 2015 (r280055) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:17:25 2015 (r280056) @@ -1024,6 +1024,11 @@ wpi_update_rx_ring(struct wpi_softc *sc) { struct wpi_rx_ring *ring = &sc->rxq; + if (ring->update != 0) { + /* Wait for INT_WAKEUP event. */ + return; + } + if (WPI_READ(sc, WPI_UCODE_GP1) & WPI_UCODE_GP1_MAC_SLEEP) { DPRINTF(sc, WPI_DEBUG_PWRSAVE, "%s: wakeup request\n", __func__); @@ -1179,6 +1184,11 @@ fail: wpi_free_tx_ring(sc, ring); static void wpi_update_tx_ring(struct wpi_softc *sc, struct wpi_tx_ring *ring) { + if (ring->update != 0) { + /* Wait for INT_WAKEUP event. */ + return; + } + if (WPI_READ(sc, WPI_UCODE_GP1) & WPI_UCODE_GP1_MAC_SLEEP) { DPRINTF(sc, WPI_DEBUG_PWRSAVE, "%s (%d): requesting wakeup\n", __func__, ring->qid); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:18:10 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 65AE76FB; Sun, 15 Mar 2015 20:18:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51774E13; Sun, 15 Mar 2015 20:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKIAZ9054081; Sun, 15 Mar 2015 20:18:10 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKIACf054080; Sun, 15 Mar 2015 20:18:10 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152018.t2FKIACf054080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280057 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:18:10 -0000 Author: adrian Date: Sun Mar 15 20:18:09 2015 New Revision: 280057 URL: https://svnweb.freebsd.org/changeset/base/280057 Log: Use correct pointer for wpi_softc PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:17:25 2015 (r280056) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:18:09 2015 (r280057) @@ -3850,9 +3850,8 @@ wpi_setup_beacon(struct wpi_softc *sc, s static void wpi_update_beacon(struct ieee80211vap *vap, int item) { + struct wpi_softc *sc = vap->iv_ic->ic_ifp->if_softc; struct ieee80211_node *ni = vap->iv_bss; - struct ifnet *ifp = vap->iv_ifp; - struct wpi_softc *sc = ifp->if_softc; int error; WPI_LOCK(sc); @@ -3970,8 +3969,7 @@ static int wpi_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, ieee80211_keyix *keyix, ieee80211_keyix *rxkeyix) { - struct ifnet *ifp = vap->iv_ifp; - struct wpi_softc *sc = ifp->if_softc; + struct wpi_softc *sc = vap->iv_ic->ic_ifp->if_softc; if (!(&vap->iv_nw_keys[0] <= k && k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:19:02 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 A3E28862; Sun, 15 Mar 2015 20:19:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F56CE1E; Sun, 15 Mar 2015 20:19:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKJ2ta054246; Sun, 15 Mar 2015 20:19:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKJ2Dn054243; Sun, 15 Mar 2015 20:19:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152019.t2FKJ2Dn054243@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:19:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280058 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:19:02 -0000 Author: adrian Date: Sun Mar 15 20:19:01 2015 New Revision: 280058 URL: https://svnweb.freebsd.org/changeset/base/280058 Log: Check some variables only on active TX rings PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:18:09 2015 (r280057) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:19:01 2015 (r280058) @@ -2096,7 +2096,7 @@ wpi_wakeup_intr(struct wpi_softc *sc) sc->rxq.update = 0; wpi_update_rx_ring(sc); } - for (qid = 0; qid < WPI_NTXQUEUES; qid++) { + for (qid = 0; qid < WPI_DRV_NTXQUEUES; qid++) { struct wpi_tx_ring *ring = &sc->txq[qid]; if (ring->update) { @@ -2165,7 +2165,7 @@ wpi_fatal_intr(struct wpi_softc *sc) wpi_nic_unlock(sc); /* Dump driver status (TX and RX rings) while we're here. */ printf("driver status:\n"); - for (i = 0; i < WPI_NTXQUEUES; i++) { + for (i = 0; i < WPI_DRV_NTXQUEUES; i++) { struct wpi_tx_ring *ring = &sc->txq[i]; printf(" tx ring %2d: qid=%-2d cur=%-3d queued=%-3d\n", i, ring->qid, ring->cur, ring->queued); Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Sun Mar 15 20:18:09 2015 (r280057) +++ head/sys/dev/wpi/if_wpireg.h Sun Mar 15 20:19:01 2015 (r280058) @@ -24,6 +24,7 @@ #define WPI_RX_RING_COUNT (1 << WPI_RX_RING_COUNT_LOG) #define WPI_NTXQUEUES 8 +#define WPI_DRV_NTXQUEUES 5 #define WPI_NDMACHNLS 6 /* Maximum scatter/gather. */ From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:19:56 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 663739C5; Sun, 15 Mar 2015 20:19: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 51624E2A; Sun, 15 Mar 2015 20:19: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 t2FKJuxE054391; Sun, 15 Mar 2015 20:19:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKJt6O054388; Sun, 15 Mar 2015 20:19:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152019.t2FKJt6O054388@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280059 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:19:56 -0000 Author: adrian Date: Sun Mar 15 20:19:54 2015 New Revision: 280059 URL: https://svnweb.freebsd.org/changeset/base/280059 Log: Fix indentation - non-functional change. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:19:01 2015 (r280058) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:19:54 2015 (r280059) @@ -313,7 +313,7 @@ wpi_attach(device_t dev) sc->sc_dev = dev; -#ifdef WPI_DEBUG +#ifdef WPI_DEBUG error = resource_int_value(device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev), "debug", &(sc->sc_debug)); if (error != 0) @@ -455,20 +455,21 @@ wpi_attach(device_t dev) device_printf(dev, "could not read EEPROM, error %d\n", error); goto fail; - } + } -#ifdef WPI_DEBUG +#ifdef WPI_DEBUG if (bootverbose) { - device_printf(sc->sc_dev, "Regulatory Domain: %.4s\n", sc->domain); - device_printf(sc->sc_dev, "Hardware Type: %c\n", - sc->type > 1 ? 'B': '?'); - device_printf(sc->sc_dev, "Hardware Revision: %c\n", - ((le16toh(sc->rev) & 0xf0) == 0xd0) ? 'D': '?'); - device_printf(sc->sc_dev, "SKU %s support 802.11a\n", - supportsa ? "does" : "does not"); + device_printf(sc->sc_dev, "Regulatory Domain: %.4s\n", + sc->domain); + device_printf(sc->sc_dev, "Hardware Type: %c\n", + sc->type > 1 ? 'B': '?'); + device_printf(sc->sc_dev, "Hardware Revision: %c\n", + ((le16toh(sc->rev) & 0xf0) == 0xd0) ? 'D': '?'); + device_printf(sc->sc_dev, "SKU %s support 802.11a\n", + supportsa ? "does" : "does not"); - /* XXX hw_config uses the PCIDEV for the Hardware rev. Must check - what sc->rev really represents - benjsc 20070615 */ + /* XXX hw_config uses the PCIDEV for the Hardware rev. Must + check what sc->rev really represents - benjsc 20070615 */ } #endif @@ -558,7 +559,7 @@ wpi_radiotap_attach(struct wpi_softc *sc static void wpi_sysctlattach(struct wpi_softc *sc) { -#ifdef WPI_DEBUG +#ifdef WPI_DEBUG struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); @@ -725,7 +726,7 @@ wpi_nic_lock(struct wpi_softc *sc) /* Spin until we actually get the lock. */ for (ntries = 0; ntries < 1000; ntries++) { if ((WPI_READ(sc, WPI_GP_CNTRL) & - (WPI_GP_CNTRL_MAC_ACCESS_ENA | WPI_GP_CNTRL_SLEEP)) == + (WPI_GP_CNTRL_MAC_ACCESS_ENA | WPI_GP_CNTRL_SLEEP)) == WPI_GP_CNTRL_MAC_ACCESS_ENA) return 0; DELAY(10); @@ -957,16 +958,16 @@ wpi_alloc_rx_ring(struct wpi_softc *sc) } /* Create RX buffer DMA tag. */ - error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MJUMPAGESIZE, 1, MJUMPAGESIZE, BUS_DMA_NOWAIT, NULL, NULL, &ring->data_dmat); - if (error != 0) { - device_printf(sc->sc_dev, + if (error != 0) { + device_printf(sc->sc_dev, "%s: could not create RX buf DMA tag, error %d\n", __func__, error); - goto fail; - } + goto fail; + } /* * Allocate and map RX buffers. @@ -2028,8 +2029,8 @@ wpi_notif_intr(struct wpi_softc *sc) } case WPI_STATE_CHANGED: { - bus_dmamap_sync(sc->rxq.data_dmat, data->map, - BUS_DMASYNC_POSTREAD); + bus_dmamap_sync(sc->rxq.data_dmat, data->map, + BUS_DMASYNC_POSTREAD); uint32_t *status = (uint32_t *)(desc + 1); @@ -2083,7 +2084,7 @@ wpi_notif_intr(struct wpi_softc *sc) * Process an INT_WAKEUP interrupt raised when the microcontroller wakes up * from power-down sleep mode. */ -static void +static void wpi_wakeup_intr(struct wpi_softc *sc) { int qid; @@ -2127,12 +2128,12 @@ wpi_fatal_intr(struct wpi_softc *sc) WPI_FW_DATA_BASE + WPI_FW_DATA_MAXSZ) { printf("%s: bad firmware error log address 0x%08x\n", __func__, sc->errptr); - return; - } + return; + } if (wpi_nic_lock(sc) != 0) { printf("%s: could not read firmware error log\n", __func__); - return; - } + return; + } /* Read number of entries in the log. */ count = wpi_mem_read(sc, sc->errptr); if (count == 0 || count * sizeof (dump) > WPI_FW_DATA_MAXSZ) { @@ -2381,7 +2382,7 @@ wpi_tx_data(struct wpi_softc *sc, struct } else { qos = 0; tid = 0; - } + } ac = M_WME_GETAC(m); chan = (ni->ni_chan != IEEE80211_CHAN_ANYC) ? @@ -3233,11 +3234,11 @@ wpi_get_power_index(struct wpi_softc *sc struct ieee80211_channel *c, int ridx) { /* Fixed-point arithmetic division using a n-bit fractional part. */ -#define fdivround(a, b, n) \ +#define fdivround(a, b, n) \ ((((1 << n) * (a)) / (b) + (1 << n) / 2) / (1 << n)) /* Linear interpolation. */ -#define interpolate(x, x1, y1, x2, y2, n) \ +#define interpolate(x, x1, y1, x2, y2, n) \ ((y1) + fdivround(((x) - (x1)) * ((y2) - (y1)), (x2) - (x1), n)) struct ifnet *ifp = sc->sc_ifp; @@ -3354,18 +3355,18 @@ wpi_set_pslevel(struct wpi_softc *sc, ui return wpi_cmd(sc, WPI_CMD_SET_POWER_MODE, &cmd, sizeof cmd, async); } -static int +static int wpi_send_btcoex(struct wpi_softc *sc) { struct wpi_bluetooth cmd; - memset(&cmd, 0, sizeof cmd); - cmd.flags = WPI_BT_COEX_MODE_4WIRE; - cmd.lead_time = WPI_BT_LEAD_TIME_DEF; - cmd.max_kill = WPI_BT_MAX_KILL_DEF; + memset(&cmd, 0, sizeof cmd); + cmd.flags = WPI_BT_COEX_MODE_4WIRE; + cmd.lead_time = WPI_BT_LEAD_TIME_DEF; + cmd.max_kill = WPI_BT_MAX_KILL_DEF; DPRINTF(sc, WPI_DEBUG_RESET, "%s: configuring bluetooth coexistence\n", __func__); - return wpi_cmd(sc, WPI_CMD_BT_COEX, &cmd, sizeof(cmd), 0); + return wpi_cmd(sc, WPI_CMD_BT_COEX, &cmd, sizeof(cmd), 0); } static int @@ -3719,7 +3720,7 @@ wpi_scan(struct wpi_softc *sc, struct ie chan->rf_gain = 0x28; DPRINTF(sc, WPI_DEBUG_SCAN, "Scanning %u Passive: %d\n", - chan->chan, IEEE80211_IS_CHAN_PASSIVE(c)); + chan->chan, IEEE80211_IS_CHAN_PASSIVE(c)); hdr->nchan++; chan++; @@ -4112,11 +4113,11 @@ wpi_post_alive(struct wpi_softc *sc) if (ntries == 1000) { device_printf(sc->sc_dev, "timeout waiting for thermal sensor calibration\n"); - return ETIMEDOUT; - } + return ETIMEDOUT; + } - DPRINTF(sc, WPI_DEBUG_TEMP, "temperature %d\n", sc->temp); - return 0; + DPRINTF(sc, WPI_DEBUG_TEMP, "temperature %d\n", sc->temp); + return 0; } /* Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Sun Mar 15 20:19:01 2015 (r280058) +++ head/sys/dev/wpi/if_wpireg.h Sun Mar 15 20:19:54 2015 (r280059) @@ -28,7 +28,7 @@ #define WPI_NDMACHNLS 6 /* Maximum scatter/gather. */ -#define WPI_MAX_SCATTER 4 +#define WPI_MAX_SCATTER 4 /* * Rings must be aligned on a 16K boundary. @@ -466,7 +466,7 @@ struct wpi_cmd_data { uint16_t lnext; uint32_t flags; #define WPI_TX_NEED_RTS (1 << 1) -#define WPI_TX_NEED_CTS (1 << 2) +#define WPI_TX_NEED_CTS (1 << 2) #define WPI_TX_NEED_ACK (1 << 3) #define WPI_TX_FULL_TXOP (1 << 7) #define WPI_TX_BT_DISABLE (1 << 12) /* bluetooth coexistence */ @@ -516,10 +516,10 @@ struct wpi_cmd_beacon { /* Structure for notification WPI_BEACON_MISSED. */ struct wpi_beacon_missed { - uint32_t consecutive; - uint32_t total; - uint32_t expected; - uint32_t received; + uint32_t consecutive; + uint32_t total; + uint32_t expected; + uint32_t received; } __packed; Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:19:01 2015 (r280058) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:19:54 2015 (r280059) @@ -52,7 +52,7 @@ struct wpi_tx_radiotap_header { struct wpi_dma_info { bus_dma_tag_t tag; - bus_dmamap_t map; + bus_dmamap_t map; bus_addr_t paddr; caddr_t vaddr; bus_size_t size; @@ -183,7 +183,7 @@ struct wpi_softc { bus_space_handle_t sc_sh; void *sc_ih; bus_size_t sc_sz; - int sc_cap_off; /* PCIe Capabilities. */ + int sc_cap_off; /* PCIe Capabilities. */ struct wpi_rxon rxon; int temp; @@ -223,8 +223,8 @@ struct wpi_softc { #define WPI_LOCK_INIT(_sc) \ mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ - MTX_NETWORK_LOCK, MTX_DEF) + MTX_NETWORK_LOCK, MTX_DEF) #define WPI_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define WPI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) +#define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) #define WPI_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:20:44 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 42C4CC0B; Sun, 15 Mar 2015 20:20:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E877EC6; Sun, 15 Mar 2015 20:20:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKKi2I055868; Sun, 15 Mar 2015 20:20:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKKi7e055867; Sun, 15 Mar 2015 20:20:44 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152020.t2FKKi7e055867@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280060 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:20:44 -0000 Author: adrian Date: Sun Mar 15 20:20:43 2015 New Revision: 280060 URL: https://svnweb.freebsd.org/changeset/base/280060 Log: Fix error handling in wpi_scan(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:19:54 2015 (r280059) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:20:43 2015 (r280060) @@ -3600,6 +3600,9 @@ wpi_scan(struct wpi_softc *sc, struct ie if (sc->sc_scan_timer) { device_printf(sc->sc_dev, "%s: called whilst scanning!\n", __func__); + + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); + return (EAGAIN); } @@ -3608,7 +3611,8 @@ wpi_scan(struct wpi_softc *sc, struct ie device_printf(sc->sc_dev, "%s: could not allocate buffer for scan command\n", __func__); - return ENOMEM; + error = ENOMEM; + goto fail; } hdr = (struct wpi_scan_hdr *)buf; @@ -3733,10 +3737,17 @@ wpi_scan(struct wpi_softc *sc, struct ie error = wpi_cmd(sc, WPI_CMD_SCAN, buf, buflen, 1); free(buf, M_DEVBUF); + if (error != 0) + goto fail; + sc->sc_scan_timer = 5; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); + return 0; + +fail: DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); + return error; } From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:21:31 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 8235AD79; Sun, 15 Mar 2015 20:21: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 6E10FEDA; Sun, 15 Mar 2015 20:21: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 t2FKLVCj056029; Sun, 15 Mar 2015 20:21:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKLVe2056028; Sun, 15 Mar 2015 20:21:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152021.t2FKLVe2056028@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280061 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:21:31 -0000 Author: adrian Date: Sun Mar 15 20:21:30 2015 New Revision: 280061 URL: https://svnweb.freebsd.org/changeset/base/280061 Log: Fix warning: Value stored to 'supportsa' is never read. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:20:43 2015 (r280060) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:21:30 2015 (r280061) @@ -307,8 +307,11 @@ wpi_attach(device_t dev) struct wpi_softc *sc = (struct wpi_softc *)device_get_softc(dev); struct ieee80211com *ic; struct ifnet *ifp; - int i, error, rid, supportsa = 1; + int i, error, rid; +#ifdef WPI_DEBUG + int supportsa = 1; const struct wpi_ident *ident; +#endif uint8_t macaddr[IEEE80211_ADDR_LEN]; sc->sc_dev = dev; @@ -339,6 +342,7 @@ wpi_attach(device_t dev) * this is one such card. A 0x0 in the subdevice table indicates * the entire subdevice range is to be ignored. */ +#ifdef WPI_DEBUG for (ident = wpi_ident_table; ident->name != NULL; ident++) { if (ident->subdevice && pci_get_subdevice(dev) == ident->subdevice) { @@ -346,6 +350,7 @@ wpi_attach(device_t dev) break; } } +#endif /* Clear device-specific "PCI retry timeout" register (41h). */ pci_write_config(dev, 0x41, 0, 1); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:22:17 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 1D3A9EF5; Sun, 15 Mar 2015 20:22:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0922CEF3; Sun, 15 Mar 2015 20:22:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKMGdM058542; Sun, 15 Mar 2015 20:22:16 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKMGhS058541; Sun, 15 Mar 2015 20:22:16 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152022.t2FKMGhS058541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280062 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:22:17 -0000 Author: adrian Date: Sun Mar 15 20:22:16 2015 New Revision: 280062 URL: https://svnweb.freebsd.org/changeset/base/280062 Log: msleep() -> mtx_sleep() PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:21:30 2015 (r280061) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:22:16 2015 (r280062) @@ -2882,7 +2882,7 @@ wpi_cmd(struct wpi_softc *sc, int code, return 0; } - return msleep(cmd, &sc->sc_mtx, PCATCH, "wpicmd", hz); + return mtx_sleep(cmd, &sc->sc_mtx, PCATCH, "wpicmd", hz); } /* @@ -4228,7 +4228,7 @@ wpi_load_firmware(struct wpi_softc *sc) WPI_WRITE(sc, WPI_RESET, 0); /* Wait at most one second for first alive notification. */ - if ((error = msleep(sc, &sc->sc_mtx, PCATCH, "wpiinit", hz)) != 0) { + if ((error = mtx_sleep(sc, &sc->sc_mtx, PCATCH, "wpiinit", hz)) != 0) { device_printf(sc->sc_dev, "%s: timeout waiting for adapter to initialize, error %d\n", __func__, error); @@ -4587,7 +4587,7 @@ wpi_hw_init(struct wpi_softc *sc) return error; } /* Wait at most one second for firmware alive notification. */ - if ((error = msleep(sc, &sc->sc_mtx, PCATCH, "wpiinit", hz)) != 0) { + if ((error = mtx_sleep(sc, &sc->sc_mtx, PCATCH, "wpiinit", hz)) != 0) { device_printf(sc->sc_dev, "%s: timeout waiting for adapter to initialize, error %d\n", __func__, error); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:24:00 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 E1C5F129; Sun, 15 Mar 2015 20:23:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C302FF02; Sun, 15 Mar 2015 20:23:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKNxlV058784; Sun, 15 Mar 2015 20:23:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKNx6p058782; Sun, 15 Mar 2015 20:23:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152023.t2FKNx6p058782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280063 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:24:00 -0000 Author: adrian Date: Sun Mar 15 20:23:58 2015 New Revision: 280063 URL: https://svnweb.freebsd.org/changeset/base/280063 Log: Wrap cast to (struct wpi_node *) into WPI_NODE macros PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:22:16 2015 (r280062) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:23:58 2015 (r280063) @@ -1530,7 +1530,7 @@ wpi_node_free(struct ieee80211_node *ni) { struct ieee80211com *ic = ni->ni_ic; struct wpi_softc *sc = ic->ic_ifp->if_softc; - struct wpi_node *wn = (struct wpi_node *)ni; + struct wpi_node *wn = WPI_NODE(ni); if (wn->id >= WPI_ID_IBSS_MIN && wn->id <= WPI_ID_IBSS_MAX) { free_unr(sc->sc_unr, wn->id); @@ -2365,7 +2365,7 @@ wpi_tx_data(struct wpi_softc *sc, struct const struct ieee80211_txparam *tp; struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); struct ieee80211_channel *chan; struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; @@ -2942,7 +2942,7 @@ static int wpi_add_node(struct wpi_softc *sc, struct ieee80211_node *ni) { struct ieee80211com *ic = ni->ni_ic; - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); struct wpi_node_info node; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); @@ -2987,7 +2987,7 @@ wpi_add_broadcast_node(struct wpi_softc static int wpi_add_ibss_node(struct wpi_softc *sc, struct ieee80211_node *ni) { - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); @@ -3005,7 +3005,7 @@ wpi_add_ibss_node(struct wpi_softc *sc, static void wpi_del_node(struct wpi_softc *sc, struct ieee80211_node *ni) { - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); struct wpi_cmd_del_node node; int error; @@ -4014,7 +4014,7 @@ wpi_key_set(struct ieee80211vap *vap, co struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni = vap->iv_bss; struct wpi_softc *sc = ic->ic_ifp->if_softc; - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); struct wpi_node_info node; uint16_t kflags; int error; @@ -4067,7 +4067,7 @@ wpi_key_delete(struct ieee80211vap *vap, struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni = vap->iv_bss; struct wpi_softc *sc = ic->ic_ifp->if_softc; - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); struct wpi_node_info node; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:22:16 2015 (r280062) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:23:58 2015 (r280063) @@ -96,6 +96,7 @@ struct wpi_node { struct ieee80211_node ni; /* must be the first */ uint8_t id; }; +#define WPI_NODE(ni) ((struct wpi_node *)(ni)) struct wpi_power_sample { uint8_t index; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:29:23 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 A631D2D1; Sun, 15 Mar 2015 20:29:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91A59F22; Sun, 15 Mar 2015 20:29:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKTNjm059479; Sun, 15 Mar 2015 20:29:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKTNBm059477; Sun, 15 Mar 2015 20:29:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152029.t2FKTNBm059477@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280064 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:29:23 -0000 Author: adrian Date: Sun Mar 15 20:29:22 2015 New Revision: 280064 URL: https://svnweb.freebsd.org/changeset/base/280064 Log: Replace few numbers with named constants. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:23:58 2015 (r280063) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:29:22 2015 (r280064) @@ -1138,7 +1138,7 @@ wpi_alloc_tx_ring(struct wpi_softc *sc, * to allocate commands space for other rings. * XXX Do we really need to allocate descriptors for other rings? */ - if (qid > 4) + if (qid > WPI_CMD_QUEUE_NUM) return 0; size = WPI_TX_RING_COUNT * sizeof (struct wpi_tx_cmd); @@ -1806,7 +1806,7 @@ wpi_rx_done(struct wpi_softc *sc, struct tap->wr_flags = 0; if (head->flags & htole16(WPI_STAT_FLAG_SHPREAMBLE)) tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; - tap->wr_dbm_antsignal = (int8_t)(stat->rssi - WPI_RSSI_OFFSET); + tap->wr_dbm_antsignal = (int8_t)(stat->rssi + WPI_RSSI_OFFSET); tap->wr_dbm_antnoise = (int8_t)le16toh(stat->noise); tap->wr_tsft = tail->tstamp; tap->wr_antenna = (le16toh(head->flags) >> 4) & 0xf; @@ -1817,11 +1817,11 @@ wpi_rx_done(struct wpi_softc *sc, struct /* Send the frame to the 802.11 layer. */ if (ni != NULL) { - (void)ieee80211_input(ni, m, stat->rssi, -WPI_RSSI_OFFSET); + (void)ieee80211_input(ni, m, stat->rssi, WPI_RSSI_OFFSET); /* Node is no longer needed. */ ieee80211_free_node(ni); } else - (void)ieee80211_input_all(ic, m, stat->rssi, -WPI_RSSI_OFFSET); + (void)ieee80211_input_all(ic, m, stat->rssi, WPI_RSSI_OFFSET); WPI_LOCK(sc); @@ -1906,7 +1906,7 @@ wpi_tx_done(struct wpi_softc *sc, struct static void wpi_cmd_done(struct wpi_softc *sc, struct wpi_rx_desc *desc) { - struct wpi_tx_ring *ring = &sc->txq[4]; + struct wpi_tx_ring *ring = &sc->txq[WPI_CMD_QUEUE_NUM]; struct wpi_tx_data *data; DPRINTF(sc, WPI_DEBUG_CMD, "cmd notification qid=%x idx=%d flags=%x " @@ -1914,7 +1914,7 @@ wpi_cmd_done(struct wpi_softc *sc, struc desc->flags, wpi_cmd_str(desc->type), le32toh(desc->len)); - if ((desc->qid & 7) != 4) + if ((desc->qid & WPI_RX_DESC_QID_MSK) != WPI_CMD_QUEUE_NUM) return; /* Not a command ack. */ data = &ring->data[desc->idx]; @@ -1961,8 +1961,10 @@ wpi_notif_intr(struct wpi_softc *sc) __func__, sc->rxq.cur, desc->qid, desc->idx, desc->flags, desc->type, wpi_cmd_str(desc->type), le32toh(desc->len)); - if (!(desc->qid & 0x80)) /* Reply to a command. */ + if (!(desc->qid & WPI_UNSOLICITED_RX_NOTIF)) { + /* Reply to a command. */ wpi_cmd_done(sc, desc); + } switch (desc->type) { case WPI_RX_DONE: @@ -2804,7 +2806,7 @@ static int wpi_cmd(struct wpi_softc *sc, int code, const void *buf, size_t size, int async) { - struct wpi_tx_ring *ring = &sc->txq[4]; + struct wpi_tx_ring *ring = &sc->txq[WPI_CMD_QUEUE_NUM]; struct wpi_tx_desc *desc; struct wpi_tx_data *data; struct wpi_tx_cmd *cmd; Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Sun Mar 15 20:23:58 2015 (r280063) +++ head/sys/dev/wpi/if_wpireg.h Sun Mar 15 20:29:22 2015 (r280064) @@ -25,6 +25,8 @@ #define WPI_NTXQUEUES 8 #define WPI_DRV_NTXQUEUES 5 +#define WPI_CMD_QUEUE_NUM 4 + #define WPI_NDMACHNLS 6 /* Maximum scatter/gather. */ @@ -222,7 +224,7 @@ #define WPI_APMG_PCI_STT_L1A_DIS (1 << 11) struct wpi_shared { - uint32_t txbase[8]; + uint32_t txbase[WPI_NTXQUEUES]; uint32_t next; uint32_t reserved[2]; } __packed; @@ -269,13 +271,16 @@ struct wpi_rx_desc { uint8_t qid; } __packed; +#define WPI_RX_DESC_QID_MSK 0x07 +#define WPI_UNSOLICITED_RX_NOTIF 0x80 + struct wpi_rx_stat { uint8_t len; #define WPI_STAT_MAXLEN 20 uint8_t id; uint8_t rssi; /* received signal strength */ -#define WPI_RSSI_OFFSET 95 +#define WPI_RSSI_OFFSET -95 uint8_t agc; /* access gain control */ uint16_t signal; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:30:04 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 D660B42D; Sun, 15 Mar 2015 20:30: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 C2911F2E; Sun, 15 Mar 2015 20:30: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 t2FKU4E1059708; Sun, 15 Mar 2015 20:30:04 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKU4c3059707; Sun, 15 Mar 2015 20:30:04 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152030.t2FKU4c3059707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280065 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:30:04 -0000 Author: adrian Date: Sun Mar 15 20:30:03 2015 New Revision: 280065 URL: https://svnweb.freebsd.org/changeset/base/280065 Log: wpi_intr(): remove duplicate code PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:29:22 2015 (r280064) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:30:03 2015 (r280065) @@ -2195,10 +2195,8 @@ wpi_intr(void *arg) r1 = WPI_READ(sc, WPI_INT); - if (r1 == 0xffffffff || (r1 & 0xfffffff0) == 0xa5a5a5a0) { - WPI_UNLOCK(sc); - return; /* Hardware gone! */ - } + if (r1 == 0xffffffff || (r1 & 0xfffffff0) == 0xa5a5a5a0) + goto end; /* Hardware gone! */ r2 = WPI_READ(sc, WPI_FH_INT); @@ -2222,8 +2220,7 @@ wpi_intr(void *arg) "(Hardware Error)"); ieee80211_runtask(ic, &sc->sc_reinittask); sc->flags &= ~WPI_FLAG_BUSY; - WPI_UNLOCK(sc); - return; + goto end; } if ((r1 & (WPI_INT_FH_RX | WPI_INT_SW_RX)) || @@ -2241,7 +2238,7 @@ done: if (ifp->if_flags & IFF_UP) WPI_WRITE(sc, WPI_INT_MASK, WPI_INT_MASK_DEF); - WPI_UNLOCK(sc); +end: WPI_UNLOCK(sc); } static int From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:31:22 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 9CE6B59F; Sun, 15 Mar 2015 20:31:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88B78F43; Sun, 15 Mar 2015 20:31:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKVMV7063341; Sun, 15 Mar 2015 20:31:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKVMsM063340; Sun, 15 Mar 2015 20:31:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152031.t2FKVMsM063340@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:31:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280066 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:31:22 -0000 Author: adrian Date: Sun Mar 15 20:31:21 2015 New Revision: 280066 URL: https://svnweb.freebsd.org/changeset/base/280066 Log: Reformatting - break lines ~ 80 characters. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:30:03 2015 (r280065) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:31:21 2015 (r280066) @@ -607,7 +607,8 @@ wpi_vap_create(struct ieee80211com *ic, ieee80211_ratectl_init(vap); /* Complete setup. */ - ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status); + ieee80211_vap_attach(vap, ieee80211_media_change, + ieee80211_media_status); ic->ic_opmode = opmode; return vap; } @@ -1299,8 +1300,8 @@ wpi_read_eeprom(struct wpi_softc *sc, ui WPI_CHK(wpi_read_prom_data(sc, WPI_EEPROM_TYPE, &sc->type, sizeof(sc->type))); - DPRINTF(sc, WPI_DEBUG_EEPROM, "cap=%x rev=%x type=%x\n", sc->cap, le16toh(sc->rev), - sc->type); + DPRINTF(sc, WPI_DEBUG_EEPROM, "cap=%x rev=%x type=%x\n", sc->cap, + le16toh(sc->rev), sc->type); /* Read the regulatory domain (4 ASCII characters.) */ WPI_CHK(wpi_read_prom_data(sc, WPI_EEPROM_DOMAIN, sc->domain, @@ -1377,14 +1378,18 @@ wpi_read_eeprom_band(struct wpi_softc *s c->ic_maxpower = 2*c->ic_maxregpower; if (n == 0) { /* 2GHz band */ - c->ic_freq = ieee80211_ieee2mhz(chan, IEEE80211_CHAN_G); + c->ic_freq = ieee80211_ieee2mhz(chan, + IEEE80211_CHAN_G); + /* G =>'s B is supported */ c->ic_flags = IEEE80211_CHAN_B | nflags; c = &ic->ic_channels[ic->ic_nchans++]; c[0] = c[-1]; c->ic_flags = IEEE80211_CHAN_G | nflags; } else { /* 5GHz band */ - c->ic_freq = ieee80211_ieee2mhz(chan, IEEE80211_CHAN_A); + c->ic_freq = ieee80211_ieee2mhz(chan, + IEEE80211_CHAN_A); + c->ic_flags = IEEE80211_CHAN_A | nflags; } @@ -2307,7 +2312,8 @@ wpi_cmd2(struct wpi_softc *sc, struct wp buf->m, segs, &nsegs, BUS_DMA_NOWAIT); if (error != 0) { device_printf(sc->sc_dev, - "%s: can't map mbuf (error %d)\n", __func__, error); + "%s: can't map mbuf (error %d)\n", __func__, + error); m_freem(buf->m); return error; } @@ -2532,8 +2538,8 @@ fail: m_freem(m); } static int -wpi_tx_data_raw(struct wpi_softc *sc, struct mbuf *m, struct ieee80211_node *ni, - const struct ieee80211_bpf_params *params) +wpi_tx_data_raw(struct wpi_softc *sc, struct mbuf *m, + struct ieee80211_node *ni, const struct ieee80211_bpf_params *params) { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame *wh; @@ -3476,7 +3482,8 @@ wpi_config(struct wpi_softc *sc) sc->rxon.mode = WPI_MODE_MONITOR; break; default: - device_printf(sc->sc_dev, "unknown opmode %d\n", ic->ic_opmode); + device_printf(sc->sc_dev, "unknown opmode %d\n", + ic->ic_opmode); return EINVAL; } sc->rxon.filter = htole32(sc->rxon.filter); @@ -4332,8 +4339,8 @@ wpi_read_firmware(struct wpi_softc *sc) DPRINTF(sc, WPI_DEBUG_FIRMWARE, "Firmware Version: Major %d, Minor %d, Driver %d, \n" - "runtime (text: %u, data: %u) init (text: %u, data %u) boot (text %u)\n", - hdr->major, hdr->minor, le32toh(hdr->driver), + "runtime (text: %u, data: %u) init (text: %u, data %u) " + "boot (text %u)\n", hdr->major, hdr->minor, le32toh(hdr->driver), fw->main.textsz, fw->main.datasz, fw->init.textsz, fw->init.datasz, fw->boot.textsz); @@ -4443,7 +4450,8 @@ wpi_apm_stop_master(struct wpi_softc *sc return; DELAY(10); } - device_printf(sc->sc_dev, "%s: timeout waiting for master\n", __func__); + device_printf(sc->sc_dev, "%s: timeout waiting for master\n", + __func__); } static void From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:32:13 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 4D490701; Sun, 15 Mar 2015 20:32:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38F73FDE; Sun, 15 Mar 2015 20:32:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKWDPE063523; Sun, 15 Mar 2015 20:32:13 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKWD1P063522; Sun, 15 Mar 2015 20:32:13 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152032.t2FKWD1P063522@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280067 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:32:13 -0000 Author: adrian Date: Sun Mar 15 20:32:12 2015 New Revision: 280067 URL: https://svnweb.freebsd.org/changeset/base/280067 Log: Remove some un-needed variables. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:31:21 2015 (r280066) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:32:12 2015 (r280067) @@ -3189,8 +3189,7 @@ wpi_power_calibration(struct wpi_softc * static int wpi_set_txpower(struct wpi_softc *sc, int async) { - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct ieee80211_channel *ch; struct wpi_power_group *group; struct wpi_cmd_txpower cmd; @@ -3251,8 +3250,7 @@ wpi_get_power_index(struct wpi_softc *sc #define interpolate(x, x1, y1, x2, y2, n) \ ((y1) + fdivround(((x) - (x1)) * ((y2) - (y1)), (x2) - (x1), n)) - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct wpi_power_sample *sample; int pwr, idx; u_int chan; @@ -4807,8 +4805,7 @@ wpi_stop(struct wpi_softc *sc) static void wpi_scan_start(struct ieee80211com *ic) { - struct ifnet *ifp = ic->ic_ifp; - struct wpi_softc *sc = ifp->if_softc; + struct wpi_softc *sc = ic->ic_ifp->if_softc; WPI_LOCK(sc); wpi_set_led(sc, WPI_LED_LINK, 20, 2); @@ -4883,8 +4880,7 @@ wpi_scan_curchan(struct ieee80211_scan_s { struct ieee80211vap *vap = ss->ss_vap; struct ieee80211com *ic = vap->iv_ic; - struct ifnet *ifp = ic->ic_ifp; - struct wpi_softc *sc = ifp->if_softc; + struct wpi_softc *sc = ic->ic_ifp->if_softc; int error; if (sc->rxon.chan != ieee80211_chan2ieee(ic, ic->ic_curchan)) { From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:33: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 D5EBB86D; Sun, 15 Mar 2015 20:33:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7C90FEB; Sun, 15 Mar 2015 20:33:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKXEXY063735; Sun, 15 Mar 2015 20:33:14 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKXEEF063734; Sun, 15 Mar 2015 20:33:14 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152033.t2FKXEEF063734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:33:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280068 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:33:14 -0000 Author: adrian Date: Sun Mar 15 20:33:13 2015 New Revision: 280068 URL: https://svnweb.freebsd.org/changeset/base/280068 Log: Move key processing in wpi_tx_data. (This is in preparation for further work to support hardware encryption.) PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:32:12 2015 (r280067) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:33:13 2015 (r280068) @@ -2379,7 +2379,7 @@ wpi_tx_data(struct wpi_softc *sc, struct uint32_t flags; uint16_t qos; uint8_t tid, type; - int ac, error, rate, ismcast, totlen; + int ac, error, swcrypt, rate, ismcast, totlen; wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; @@ -2422,6 +2422,8 @@ wpi_tx_data(struct wpi_softc *sc, struct error = ENOBUFS; goto fail; } + swcrypt = k->wk_flags & IEEE80211_KEY_SWCRYPT; + /* 802.11 header may have moved. */ wh = mtod(m, struct ieee80211_frame *); } @@ -2508,6 +2510,19 @@ wpi_tx_data(struct wpi_softc *sc, struct if (type != IEEE80211_FC0_TYPE_MGT) tx.data_ntries = tp->maxretry; + if (k != NULL && !swcrypt) { + switch (k->wk_cipher->ic_cipher) { + case IEEE80211_CIPHER_AES_CCM: + tx.security = WPI_CIPHER_CCMP; + break; + + default: + break; + } + + memcpy(tx.key, k->wk_key, k->wk_keylen); + } + tx.len = htole16(totlen); tx.flags = htole32(flags); tx.plcp = rate2plcp(rate); @@ -2517,13 +2532,6 @@ wpi_tx_data(struct wpi_softc *sc, struct tx.cck_mask = 0x0f; tx.rts_ntries = 7; - if (k != NULL && k->wk_cipher->ic_cipher == IEEE80211_CIPHER_AES_CCM) { - if (!(k->wk_flags & IEEE80211_KEY_SWCRYPT)) { - tx.security = WPI_CIPHER_CCMP; - memcpy(tx.key, k->wk_key, k->wk_keylen); - } - } - tx_data.data = &tx; tx_data.ni = ni; tx_data.m = m; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:34: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 053F8ABB; Sun, 15 Mar 2015 20:34: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 E4E599; Sun, 15 Mar 2015 20:34: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 t2FKYRLB064058; Sun, 15 Mar 2015 20:34:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKYR9a064056; Sun, 15 Mar 2015 20:34:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152034.t2FKYR9a064056@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280069 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:34:28 -0000 Author: adrian Date: Sun Mar 15 20:34:26 2015 New Revision: 280069 URL: https://svnweb.freebsd.org/changeset/base/280069 Log: Replace kernel unit allocator with local set of functions. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:33:13 2015 (r280068) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:34:26 2015 (r280069) @@ -169,6 +169,7 @@ static int wpi_setregdomain(struct ieee8 struct ieee80211_regdomain *, int, struct ieee80211_channel[]); static int wpi_read_eeprom_group(struct wpi_softc *, int); +static int wpi_add_node_entry_adhoc(struct wpi_softc *); static void wpi_node_free(struct ieee80211_node *); static struct ieee80211_node *wpi_node_alloc(struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN]); @@ -384,8 +385,6 @@ wpi_attach(device_t dev) WPI_LOCK_INIT(sc); - sc->sc_unr = new_unrhdr(WPI_ID_IBSS_MIN, WPI_ID_IBSS_MAX, &sc->sc_mtx); - /* Allocate DMA memory for firmware transfers. */ if ((error = wpi_alloc_fwmem(sc)) != 0) { device_printf(dev, @@ -679,8 +678,6 @@ wpi_detach(device_t dev) if (ifp != NULL) if_free(ifp); - delete_unrhdr(sc->sc_unr); - DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); WPI_LOCK_DESTROY(sc); return 0; @@ -1514,6 +1511,42 @@ wpi_read_eeprom_group(struct wpi_softc * return 0; } +static int +wpi_add_node_entry_adhoc(struct wpi_softc *sc) +{ + int newid = WPI_ID_IBSS_MIN; + + for (; newid <= WPI_ID_IBSS_MAX; newid++) { + if ((sc->nodesmsk & (1 << newid)) == 0) { + sc->nodesmsk |= 1 << newid; + return newid; + } + } + + return WPI_ID_UNDEFINED; +} + +static __inline int +wpi_check_node_entry(struct wpi_softc *sc, uint8_t id) +{ + if (id == WPI_ID_UNDEFINED) + return 0; + + return (sc->nodesmsk >> id) & 1; +} + +static __inline void +wpi_clear_node_table(struct wpi_softc *sc) +{ + sc->nodesmsk = 0; +} + +static __inline void +wpi_del_node_entry(struct wpi_softc *sc, uint8_t id) +{ + sc->nodesmsk &= ~(1 << id); +} + static struct ieee80211_node * wpi_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) { @@ -1538,11 +1571,11 @@ wpi_node_free(struct ieee80211_node *ni) struct wpi_node *wn = WPI_NODE(ni); if (wn->id >= WPI_ID_IBSS_MIN && wn->id <= WPI_ID_IBSS_MAX) { - free_unr(sc->sc_unr, wn->id); - WPI_LOCK(sc); - if (sc->rxon.filter & htole32(WPI_FILTER_BSS)) + if (wpi_check_node_entry(sc, wn->id)) { + wpi_del_node_entry(sc, wn->id); wpi_del_node(sc, ni); + } WPI_UNLOCK(sc); } @@ -2050,6 +2083,7 @@ wpi_notif_intr(struct wpi_softc *sc) le32toh(*status)); if (le32toh(*status) & 1) { + wpi_clear_node_table(sc); ieee80211_runtask(ic, &sc->sc_radiooff_task); return; } @@ -3001,18 +3035,25 @@ static int wpi_add_ibss_node(struct wpi_softc *sc, struct ieee80211_node *ni) { struct wpi_node *wn = WPI_NODE(ni); + int error; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); if (wn->id != WPI_ID_UNDEFINED) return EINVAL; - wn->id = alloc_unrl(sc->sc_unr); + if ((wn->id = wpi_add_node_entry_adhoc(sc)) == WPI_ID_UNDEFINED) { + device_printf(sc->sc_dev, "%s: h/w table is full\n", __func__); + return ENOMEM; + } - if (wn->id == (uint8_t)-1) - return ENOBUFS; + if ((error = wpi_add_node(sc, ni)) != 0) { + wpi_del_node_entry(sc, wn->id); + wn->id = WPI_ID_UNDEFINED; + return error; + } - return wpi_add_node(sc, ni); + return 0; } static void @@ -3404,6 +3445,8 @@ wpi_send_rxon(struct wpi_softc *sc, int } else { error = wpi_cmd(sc, WPI_CMD_RXON, &sc->rxon, sizeof (struct wpi_rxon), async); + + wpi_clear_node_table(sc); } if (error != 0) { device_printf(sc->sc_dev, "RXON command failed, error %d\n", Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:33:13 2015 (r280068) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:34:26 2015 (r280069) @@ -151,7 +151,6 @@ struct wpi_softc { int sc_debug; struct mtx sc_mtx; - struct unrhdr *sc_unr; /* Flags indicating the current state the driver * expects the hardware to be in @@ -189,6 +188,7 @@ struct wpi_softc { struct wpi_rxon rxon; int temp; uint32_t qfullmsk; + uint32_t nodesmsk; int sc_tx_timer; int sc_scan_timer; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:35: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 EB13CC27; Sun, 15 Mar 2015 20:35: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 BCBAD72; Sun, 15 Mar 2015 20:35: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 t2FKZQMC064276; Sun, 15 Mar 2015 20:35:26 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKZQaO064275; Sun, 15 Mar 2015 20:35:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152035.t2FKZQaO064275@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280070 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:35:27 -0000 Author: adrian Date: Sun Mar 15 20:35:25 2015 New Revision: 280070 URL: https://svnweb.freebsd.org/changeset/base/280070 Log: Wrap node addition in STA mode into wpi_add_sta_node(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:34:26 2015 (r280069) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:35:25 2015 (r280070) @@ -1527,6 +1527,14 @@ wpi_add_node_entry_adhoc(struct wpi_soft } static __inline int +wpi_add_node_entry_sta(struct wpi_softc *sc) +{ + sc->nodesmsk |= 1 << WPI_ID_BSS; + + return WPI_ID_BSS; +} + +static __inline int wpi_check_node_entry(struct wpi_softc *sc, uint8_t id) { if (id == WPI_ID_UNDEFINED) @@ -1570,7 +1578,7 @@ wpi_node_free(struct ieee80211_node *ni) struct wpi_softc *sc = ic->ic_ifp->if_softc; struct wpi_node *wn = WPI_NODE(ni); - if (wn->id >= WPI_ID_IBSS_MIN && wn->id <= WPI_ID_IBSS_MAX) { + if (wn->id != WPI_ID_UNDEFINED) { WPI_LOCK(sc); if (wpi_check_node_entry(sc, wn->id)) { wpi_del_node_entry(sc, wn->id); @@ -3032,6 +3040,25 @@ wpi_add_broadcast_node(struct wpi_softc } static int +wpi_add_sta_node(struct wpi_softc *sc, struct ieee80211_node *ni) +{ + struct wpi_node *wn = WPI_NODE(ni); + int error; + + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); + + wn->id = wpi_add_node_entry_sta(sc); + + if ((error = wpi_add_node(sc, ni)) != 0) { + wpi_del_node_entry(sc, wn->id); + wn->id = WPI_ID_UNDEFINED; + return error; + } + + return 0; +} + +static int wpi_add_ibss_node(struct wpi_softc *sc, struct ieee80211_node *ni) { struct wpi_node *wn = WPI_NODE(ni); @@ -4011,8 +4038,8 @@ wpi_run(struct wpi_softc *sc, struct iee if (vap->iv_opmode == IEEE80211_M_STA) { /* Add BSS node. */ - ((struct wpi_node *)ni)->id = WPI_ID_BSS; - if ((error = wpi_add_node(sc, ni)) != 0) { + error = wpi_add_sta_node(sc, ni); + if (error != 0) { device_printf(sc->sc_dev, "%s: could not add BSS node, error %d\n", __func__, error); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:40:13 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 12E8EDD5; Sun, 15 Mar 2015 20:40:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2F95D1; Sun, 15 Mar 2015 20:40:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKeCL8064921; Sun, 15 Mar 2015 20:40:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKeC30064917; Sun, 15 Mar 2015 20:40:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152040.t2FKeC30064917@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280071 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:40:13 -0000 Author: adrian Date: Sun Mar 15 20:40:11 2015 New Revision: 280071 URL: https://svnweb.freebsd.org/changeset/base/280071 Log: Add separate lock for TX queues. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:35:25 2015 (r280070) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:40:11 2015 (r280071) @@ -384,6 +384,7 @@ wpi_attach(device_t dev) } WPI_LOCK_INIT(sc); + WPI_TXQ_LOCK_INIT(sc); /* Allocate DMA memory for firmware transfers. */ if ((error = wpi_alloc_fwmem(sc)) != 0) { @@ -679,6 +680,7 @@ wpi_detach(device_t dev) if_free(ifp); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); + WPI_TXQ_LOCK_DESTROY(sc); WPI_LOCK_DESTROY(sc); return 0; } @@ -2151,6 +2153,7 @@ wpi_wakeup_intr(struct wpi_softc *sc) sc->rxq.update = 0; wpi_update_rx_ring(sc); } + WPI_TXQ_LOCK(sc); for (qid = 0; qid < WPI_DRV_NTXQUEUES; qid++) { struct wpi_tx_ring *ring = &sc->txq[qid]; @@ -2159,6 +2162,7 @@ wpi_wakeup_intr(struct wpi_softc *sc) wpi_update_tx_ring(sc, ring); } } + WPI_TXQ_UNLOCK(sc); WPI_CLRBITS(sc, WPI_GP_CNTRL, WPI_GP_CNTRL_MAC_ACCESS_REQ); } @@ -2220,11 +2224,13 @@ wpi_fatal_intr(struct wpi_softc *sc) wpi_nic_unlock(sc); /* Dump driver status (TX and RX rings) while we're here. */ printf("driver status:\n"); + WPI_TXQ_LOCK(sc); for (i = 0; i < WPI_DRV_NTXQUEUES; i++) { struct wpi_tx_ring *ring = &sc->txq[i]; printf(" tx ring %2d: qid=%-2d cur=%-3d queued=%-3d\n", i, ring->qid, ring->cur, ring->queued); } + WPI_TXQ_UNLOCK(sc); printf(" rx ring: cur=%d\n", sc->rxq.cur); } @@ -2302,8 +2308,16 @@ wpi_cmd2(struct wpi_softc *sc, struct wp WPI_LOCK_ASSERT(sc); + WPI_TXQ_LOCK(sc); + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); + if (sc->txq_active == 0) { + /* wpi_stop() was called */ + error = ENETDOWN; + goto fail; + } + wh = mtod(buf->m, struct ieee80211_frame *); hdrlen = ieee80211_anyhdrsize(wh); totlen = buf->m->m_pkthdr.len; @@ -2336,8 +2350,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (error != 0 && error != EFBIG) { device_printf(sc->sc_dev, "%s: can't map mbuf (error %d)\n", __func__, error); - m_freem(buf->m); - return error; + goto fail; } if (error != 0) { /* Too many DMA segments, linearize mbuf. */ @@ -2345,8 +2358,8 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (m1 == NULL) { device_printf(sc->sc_dev, "%s: could not defrag mbuf\n", __func__); - m_freem(buf->m); - return ENOBUFS; + error = ENOBUFS; + goto fail; } buf->m = m1; @@ -2356,8 +2369,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp device_printf(sc->sc_dev, "%s: can't map mbuf (error %d)\n", __func__, error); - m_freem(buf->m); - return error; + goto fail; } } @@ -2400,7 +2412,17 @@ wpi_cmd2(struct wpi_softc *sc, struct wp DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); + WPI_TXQ_UNLOCK(sc); + return 0; + +fail: m_freem(buf->m); + + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); + + WPI_TXQ_UNLOCK(sc); + + return error; } /* @@ -2867,8 +2889,16 @@ wpi_cmd(struct wpi_softc *sc, int code, bus_addr_t paddr; int totlen, error; + WPI_TXQ_LOCK(sc); + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); + if (sc->txq_active == 0) { + /* wpi_stop() was called */ + error = 0; + goto fail; + } + if (async == 0) WPI_LOCK_ASSERT(sc); @@ -2888,17 +2918,21 @@ wpi_cmd(struct wpi_softc *sc, int code, if (size > sizeof cmd->data) { /* Command is too large to fit in a descriptor. */ - if (totlen > MCLBYTES) - return EINVAL; + if (totlen > MCLBYTES) { + error = EINVAL; + goto fail; + } m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); - if (m == NULL) - return ENOMEM; + if (m == NULL) { + error = ENOMEM; + goto fail; + } cmd = mtod(m, struct wpi_tx_cmd *); error = bus_dmamap_load(ring->data_dmat, data->map, cmd, totlen, wpi_dma_map_addr, &paddr, BUS_DMA_NOWAIT); if (error != 0) { m_freem(m); - return error; + goto fail; } data->m = m; } else { @@ -2932,12 +2966,20 @@ wpi_cmd(struct wpi_softc *sc, int code, DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); + WPI_TXQ_UNLOCK(sc); + if (async) { sc->flags &= ~WPI_FLAG_BUSY; return 0; } return mtx_sleep(cmd, &sc->sc_mtx, PCATCH, "wpicmd", hz); + +fail: DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); + + WPI_TXQ_UNLOCK(sc); + + return error; } /* @@ -4817,6 +4859,7 @@ wpi_init_locked(struct wpi_softc *sc) } /* Configure adapter now that it is ready. */ + sc->txq_active = 1; if ((error = wpi_config(sc)) != 0) { device_printf(sc->sc_dev, "%s: could not configure device, error %d\n", __func__, @@ -4859,6 +4902,10 @@ wpi_stop_locked(struct wpi_softc *sc) WPI_LOCK_ASSERT(sc); + WPI_TXQ_LOCK(sc); + sc->txq_active = 0; + WPI_TXQ_UNLOCK(sc); + sc->sc_scan_timer = 0; sc->sc_tx_timer = 0; callout_stop(&sc->watchdog_to); Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:35:25 2015 (r280070) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:40:11 2015 (r280071) @@ -163,6 +163,9 @@ struct wpi_softc { struct wpi_shared *shared; struct wpi_tx_ring txq[WPI_NTXQUEUES]; + struct mtx txq_mtx; + uint32_t txq_active; + struct wpi_rx_ring rxq; /* TX Thermal Callibration. */ @@ -222,6 +225,8 @@ struct wpi_softc { char domain[4]; /* Regulatory domain. */ }; +/* WPI_LOCK > WPI_TXQ_LOCK */ + #define WPI_LOCK_INIT(_sc) \ mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ MTX_NETWORK_LOCK, MTX_DEF) @@ -229,3 +234,9 @@ struct wpi_softc { #define WPI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) #define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) #define WPI_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) + +#define WPI_TXQ_LOCK_INIT(_sc) \ + mtx_init(&(_sc)->txq_mtx, "txq/cmdq lock", NULL, MTX_DEF) +#define WPI_TXQ_LOCK(_sc) mtx_lock(&(_sc)->txq_mtx) +#define WPI_TXQ_UNLOCK(_sc) mtx_unlock(&(_sc)->txq_mtx) +#define WPI_TXQ_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->txq_mtx) From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:41:00 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 DAA9DF22; Sun, 15 Mar 2015 20:41:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE52C176; Sun, 15 Mar 2015 20:41:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKf0tX066608; Sun, 15 Mar 2015 20:41:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKexAO066599; Sun, 15 Mar 2015 20:40:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152040.t2FKexAO066599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280072 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:41:01 -0000 Author: adrian Date: Sun Mar 15 20:40:59 2015 New Revision: 280072 URL: https://svnweb.freebsd.org/changeset/base/280072 Log: Eliminate the WPI_FLAG_BUSY flag. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:40:11 2015 (r280071) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:40:59 2015 (r280072) @@ -1976,7 +1976,6 @@ wpi_cmd_done(struct wpi_softc *sc, struc data->m = NULL; } - sc->flags &= ~WPI_FLAG_BUSY; wakeup(&ring->cmd[desc->idx]); } @@ -2272,7 +2271,6 @@ wpi_intr(void *arg) "(%s)\n", (r1 & WPI_INT_SW_ERR) ? "(Software Error)" : "(Hardware Error)"); ieee80211_runtask(ic, &sc->sc_reinittask); - sc->flags &= ~WPI_FLAG_BUSY; goto end; } @@ -2905,13 +2903,6 @@ wpi_cmd(struct wpi_softc *sc, int code, DPRINTF(sc, WPI_DEBUG_CMD, "wpi_cmd %s size %zu async %d\n", wpi_cmd_str(code), size, async); - if (sc->flags & WPI_FLAG_BUSY) { - device_printf(sc->sc_dev, "%s: cmd %d not sent, busy\n", - __func__, code); - return EAGAIN; - } - sc->flags |= WPI_FLAG_BUSY; - desc = &ring->desc[ring->cur]; data = &ring->data[ring->cur]; totlen = 4 + size; @@ -2968,10 +2959,8 @@ wpi_cmd(struct wpi_softc *sc, int code, WPI_TXQ_UNLOCK(sc); - if (async) { - sc->flags &= ~WPI_FLAG_BUSY; + if (async) return 0; - } return mtx_sleep(cmd, &sc->sc_mtx, PCATCH, "wpicmd", hz); Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:40:11 2015 (r280071) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:40:59 2015 (r280072) @@ -152,12 +152,6 @@ struct wpi_softc { struct mtx sc_mtx; - /* Flags indicating the current state the driver - * expects the hardware to be in - */ - uint32_t flags; -#define WPI_FLAG_BUSY (1 << 0) - /* Shared area. */ struct wpi_dma_info shared_dma; struct wpi_shared *shared; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:41: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 2154212D; Sun, 15 Mar 2015 20:41: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 0D06418E; Sun, 15 Mar 2015 20:41: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 t2FKfvIX068634; Sun, 15 Mar 2015 20:41:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKfv6s068633; Sun, 15 Mar 2015 20:41:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152041.t2FKfv6s068633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280073 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:41:58 -0000 Author: adrian Date: Sun Mar 15 20:41:57 2015 New Revision: 280073 URL: https://svnweb.freebsd.org/changeset/base/280073 Log: Remove unnecessary locking. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:40:59 2015 (r280072) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:41:57 2015 (r280073) @@ -3168,11 +3168,7 @@ wpi_updateedca(struct ieee80211com *ic) cmd.ac[aci].cwmin, cmd.ac[aci].cwmax, cmd.ac[aci].txoplimit); } - IEEE80211_UNLOCK(ic); - WPI_LOCK(sc); error = wpi_cmd(sc, WPI_CMD_EDCA_PARAMS, &cmd, sizeof cmd, 1); - WPI_UNLOCK(sc); - IEEE80211_LOCK(ic); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); @@ -4921,9 +4917,7 @@ wpi_scan_start(struct ieee80211com *ic) { struct wpi_softc *sc = ic->ic_ifp->if_softc; - WPI_LOCK(sc); wpi_set_led(sc, WPI_LED_LINK, 20, 2); - WPI_UNLOCK(sc); } /* @@ -4936,11 +4930,8 @@ wpi_scan_end(struct ieee80211com *ic) struct wpi_softc *sc = ifp->if_softc; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - if (vap->iv_state == IEEE80211_S_RUN) { - WPI_LOCK(sc); + if (vap->iv_state == IEEE80211_S_RUN) wpi_set_led(sc, WPI_LED_LINK, 0, 1); - WPI_UNLOCK(sc); - } } /** From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:42:42 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 30E88292; Sun, 15 Mar 2015 20:42: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 1CA2A19F; Sun, 15 Mar 2015 20:42: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 t2FKgfhm068800; Sun, 15 Mar 2015 20:42:41 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKgfg6068799; Sun, 15 Mar 2015 20:42:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152042.t2FKgfg6068799@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280074 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:42:42 -0000 Author: adrian Date: Sun Mar 15 20:42:41 2015 New Revision: 280074 URL: https://svnweb.freebsd.org/changeset/base/280074 Log: Move some code under WPI_LOCK(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:41:57 2015 (r280073) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:42:41 2015 (r280074) @@ -2408,6 +2408,9 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (++ring->queued > WPI_TX_RING_HIMARK) sc->qfullmsk |= 1 << ring->qid; + if (ring->qid < WPI_CMD_QUEUE_NUM) + sc->sc_tx_timer = 5; + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); WPI_TXQ_UNLOCK(sc); @@ -2722,8 +2725,6 @@ wpi_raw_xmit(struct ieee80211_node *ni, return error; } - sc->sc_tx_timer = 5; - DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); return 0; @@ -2771,8 +2772,7 @@ wpi_start_locked(struct ifnet *ifp) ieee80211_free_node(ni); WPI_LOCK(sc); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - } else - sc->sc_tx_timer = 5; + } } DPRINTF(sc, WPI_DEBUG_XMIT, "%s: done\n", __func__); @@ -3195,9 +3195,9 @@ wpi_update_promisc(struct ifnet *ifp) { struct wpi_softc *sc = ifp->if_softc; + WPI_LOCK(sc); wpi_set_promisc(sc); - WPI_LOCK(sc); if (wpi_send_rxon(sc, 1, 1) != 0) { device_printf(sc->sc_dev, "%s: could not send RXON\n", __func__); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:43:23 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 1CC4C3E8; Sun, 15 Mar 2015 20:43:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 088D11A9; Sun, 15 Mar 2015 20:43:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKhMdX068949; Sun, 15 Mar 2015 20:43:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKhM2I068948; Sun, 15 Mar 2015 20:43:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152043.t2FKhM2I068948@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:43:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280075 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:43:23 -0000 Author: adrian Date: Sun Mar 15 20:43:22 2015 New Revision: 280075 URL: https://svnweb.freebsd.org/changeset/base/280075 Log: Use ring->queued for WPI_CMD_TX_DATA only. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:42:41 2015 (r280074) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:43:22 2015 (r280075) @@ -1965,6 +1965,8 @@ wpi_cmd_done(struct wpi_softc *sc, struc if ((desc->qid & WPI_RX_DESC_QID_MSK) != WPI_CMD_QUEUE_NUM) return; /* Not a command ack. */ + KASSERT(ring->queued == 0, ("ring->queued must be 0")); + data = &ring->data[desc->idx]; /* If the command was mapped in an mbuf, free it. */ @@ -2404,12 +2406,13 @@ wpi_cmd2(struct wpi_softc *sc, struct wp ring->cur = (ring->cur + 1) % WPI_TX_RING_COUNT; wpi_update_tx_ring(sc, ring); - /* Mark TX ring as full if we reach a certain threshold. */ - if (++ring->queued > WPI_TX_RING_HIMARK) - sc->qfullmsk |= 1 << ring->qid; + if (ring->qid < WPI_CMD_QUEUE_NUM) { + /* Mark TX ring as full if we reach a certain threshold. */ + if (++ring->queued > WPI_TX_RING_HIMARK) + sc->qfullmsk |= 1 << ring->qid; - if (ring->qid < WPI_CMD_QUEUE_NUM) sc->sc_tx_timer = 5; + } DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:43: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 5850852B; Sun, 15 Mar 2015 20:43:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 446D41AF; Sun, 15 Mar 2015 20:43:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKhx2F069071; Sun, 15 Mar 2015 20:43:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKhxfc069070; Sun, 15 Mar 2015 20:43:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152043.t2FKhxfc069070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280076 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:43:59 -0000 Author: adrian Date: Sun Mar 15 20:43:58 2015 New Revision: 280076 URL: https://svnweb.freebsd.org/changeset/base/280076 Log: Optimise sc->rev processing. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:43:22 2015 (r280075) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:43:58 2015 (r280076) @@ -469,7 +469,7 @@ wpi_attach(device_t dev) device_printf(sc->sc_dev, "Hardware Type: %c\n", sc->type > 1 ? 'B': '?'); device_printf(sc->sc_dev, "Hardware Revision: %c\n", - ((le16toh(sc->rev) & 0xf0) == 0xd0) ? 'D': '?'); + ((sc->rev & 0xf0) == 0xd0) ? 'D': '?'); device_printf(sc->sc_dev, "SKU %s support 802.11a\n", supportsa ? "does" : "does not"); @@ -1299,8 +1299,9 @@ wpi_read_eeprom(struct wpi_softc *sc, ui WPI_CHK(wpi_read_prom_data(sc, WPI_EEPROM_TYPE, &sc->type, sizeof(sc->type))); + sc->rev = le16toh(sc->rev); DPRINTF(sc, WPI_DEBUG_EEPROM, "cap=%x rev=%x type=%x\n", sc->cap, - le16toh(sc->rev), sc->type); + sc->rev, sc->type); /* Read the regulatory domain (4 ASCII characters.) */ WPI_CHK(wpi_read_prom_data(sc, WPI_EEPROM_DOMAIN, sc->domain, @@ -4589,7 +4590,7 @@ wpi_nic_config(struct wpi_softc *sc) if (sc->cap == 0x80) WPI_SETBITS(sc, WPI_HW_IF_CONFIG, WPI_HW_IF_CONFIG_SKU_MRC); - if ((le16toh(sc->rev) & 0xf0) == 0xd0) + if ((sc->rev & 0xf0) == 0xd0) WPI_SETBITS(sc, WPI_HW_IF_CONFIG, WPI_HW_IF_CONFIG_REV_D); else WPI_CLRBITS(sc, WPI_HW_IF_CONFIG, WPI_HW_IF_CONFIG_REV_D); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:44:54 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 333686A7; Sun, 15 Mar 2015 20:44:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F00D1BD; Sun, 15 Mar 2015 20:44:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKirOA069278; Sun, 15 Mar 2015 20:44:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKir7R069276; Sun, 15 Mar 2015 20:44:53 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152044.t2FKir7R069276@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280077 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:44:54 -0000 Author: adrian Date: Sun Mar 15 20:44:52 2015 New Revision: 280077 URL: https://svnweb.freebsd.org/changeset/base/280077 Log: Add node table lock - addresses LOR in wpi_node_free(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:43:58 2015 (r280076) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:44:52 2015 (r280077) @@ -384,6 +384,7 @@ wpi_attach(device_t dev) } WPI_LOCK_INIT(sc); + WPI_NT_LOCK_INIT(sc); WPI_TXQ_LOCK_INIT(sc); /* Allocate DMA memory for firmware transfers. */ @@ -681,6 +682,7 @@ wpi_detach(device_t dev) DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); WPI_TXQ_LOCK_DESTROY(sc); + WPI_NT_LOCK_DESTROY(sc); WPI_LOCK_DESTROY(sc); return 0; } @@ -1582,12 +1584,12 @@ wpi_node_free(struct ieee80211_node *ni) struct wpi_node *wn = WPI_NODE(ni); if (wn->id != WPI_ID_UNDEFINED) { - WPI_LOCK(sc); + WPI_NT_LOCK(sc); if (wpi_check_node_entry(sc, wn->id)) { wpi_del_node_entry(sc, wn->id); wpi_del_node(sc, ni); } - WPI_UNLOCK(sc); + WPI_NT_UNLOCK(sc); } sc->sc_node_free(ni); @@ -2095,7 +2097,9 @@ wpi_notif_intr(struct wpi_softc *sc) le32toh(*status)); if (le32toh(*status) & 1) { + WPI_NT_LOCK(sc); wpi_clear_node_table(sc); + WPI_NT_UNLOCK(sc); ieee80211_runtask(ic, &sc->sc_radiooff_task); return; } @@ -2557,7 +2561,9 @@ wpi_tx_data(struct wpi_softc *sc, struct if (wn->id == WPI_ID_UNDEFINED && (vap->iv_opmode == IEEE80211_M_IBSS || vap->iv_opmode == IEEE80211_M_AHDEMO)) { + WPI_NT_LOCK(sc); error = wpi_add_ibss_node(sc, ni); + WPI_NT_UNLOCK(sc); if (error != 0) { device_printf(sc->sc_dev, "%s: could not add IBSS node, error %d\n", @@ -3501,10 +3507,16 @@ wpi_send_rxon(struct wpi_softc *sc, int error = wpi_cmd(sc, WPI_CMD_RXON_ASSOC, &rxon_assoc, sizeof (struct wpi_assoc), async); } else { + if (async) + WPI_NT_LOCK(sc); + error = wpi_cmd(sc, WPI_CMD_RXON, &sc->rxon, sizeof (struct wpi_rxon), async); wpi_clear_node_table(sc); + + if (async) + WPI_NT_UNLOCK(sc); } if (error != 0) { device_printf(sc->sc_dev, "RXON command failed, error %d\n", @@ -4069,7 +4081,9 @@ wpi_run(struct wpi_softc *sc, struct iee if (vap->iv_opmode == IEEE80211_M_STA) { /* Add BSS node. */ + WPI_NT_LOCK(sc); error = wpi_add_sta_node(sc, ni); + WPI_NT_UNLOCK(sc); if (error != 0) { device_printf(sc->sc_dev, "%s: could not add BSS node, error %d\n", __func__, Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:43:58 2015 (r280076) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:44:52 2015 (r280077) @@ -185,7 +185,9 @@ struct wpi_softc { struct wpi_rxon rxon; int temp; uint32_t qfullmsk; + uint32_t nodesmsk; + struct mtx nt_mtx; int sc_tx_timer; int sc_scan_timer; @@ -219,7 +221,7 @@ struct wpi_softc { char domain[4]; /* Regulatory domain. */ }; -/* WPI_LOCK > WPI_TXQ_LOCK */ +/* WPI_LOCK > WPI_NT_LOCK > WPI_TXQ_LOCK */ #define WPI_LOCK_INIT(_sc) \ mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ @@ -229,6 +231,12 @@ struct wpi_softc { #define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) #define WPI_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) +#define WPI_NT_LOCK_INIT(_sc) \ + mtx_init(&(_sc)->nt_mtx, "node table lock", NULL, MTX_DEF) +#define WPI_NT_LOCK(_sc) mtx_lock(&(_sc)->nt_mtx) +#define WPI_NT_UNLOCK(_sc) mtx_unlock(&(_sc)->nt_mtx) +#define WPI_NT_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->nt_mtx) + #define WPI_TXQ_LOCK_INIT(_sc) \ mtx_init(&(_sc)->txq_mtx, "txq/cmdq lock", NULL, MTX_DEF) #define WPI_TXQ_LOCK(_sc) mtx_lock(&(_sc)->txq_mtx) From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:45:44 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 C4B6680E; Sun, 15 Mar 2015 20:45:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A68C41C9; Sun, 15 Mar 2015 20:45:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKji2N069494; Sun, 15 Mar 2015 20:45:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKjiX7069492; Sun, 15 Mar 2015 20:45:44 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152045.t2FKjiX7069492@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280078 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:45:45 -0000 Author: adrian Date: Sun Mar 15 20:45:43 2015 New Revision: 280078 URL: https://svnweb.freebsd.org/changeset/base/280078 Log: wpi_tx_done() shouldn't wait for wpi_start(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:44:52 2015 (r280077) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:45:43 2015 (r280078) @@ -195,6 +195,7 @@ static int wpi_raw_xmit(struct ieee80211 const struct ieee80211_bpf_params *); static void wpi_start(struct ifnet *); static void wpi_start_locked(struct ifnet *); +static void wpi_start_task(void *, int); static void wpi_watchdog_rfkill(void *); static void wpi_watchdog(void *); static int wpi_ioctl(struct ifnet *, u_long, caddr_t); @@ -515,6 +516,7 @@ wpi_attach(device_t dev) TASK_INIT(&sc->sc_reinittask, 0, wpi_hw_reset, sc); TASK_INIT(&sc->sc_radiooff_task, 0, wpi_radio_off, sc); TASK_INIT(&sc->sc_radioon_task, 0, wpi_radio_on, sc); + TASK_INIT(&sc->sc_start_task, 0, wpi_start_task, sc); wpi_sysctlattach(sc); @@ -644,6 +646,7 @@ wpi_detach(device_t dev) ieee80211_draintask(ic, &sc->sc_reinittask); ieee80211_draintask(ic, &sc->sc_radiooff_task); ieee80211_draintask(ic, &sc->sc_radioon_task); + ieee80211_draintask(ic, &sc->sc_start_task); wpi_stop(sc); @@ -1901,6 +1904,7 @@ wpi_tx_done(struct wpi_softc *sc, struct struct mbuf *m; struct ieee80211_node *ni; struct ieee80211vap *vap; + struct ieee80211com *ic; int ackfailcnt = stat->ackfailcnt / 2; /* wpi_mrr_setup() */ int status = le32toh(stat->status); @@ -1919,6 +1923,7 @@ wpi_tx_done(struct wpi_softc *sc, struct m = data->m, data->m = NULL; ni = data->ni, data->ni = NULL; vap = ni->ni_vap; + ic = vap->iv_ic; /* * Update rate control statistics for the node. @@ -1943,7 +1948,7 @@ wpi_tx_done(struct wpi_softc *sc, struct if (sc->qfullmsk == 0 && (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - wpi_start_locked(ifp); + ieee80211_runtask(ic, &sc->sc_start_task); } } @@ -2789,6 +2794,15 @@ wpi_start_locked(struct ifnet *ifp) } static void +wpi_start_task(void *arg0, int pending) +{ + struct wpi_softc *sc = arg0; + struct ifnet *ifp = sc->sc_ifp; + + wpi_start(ifp); +} + +static void wpi_watchdog_rfkill(void *arg) { struct wpi_softc *sc = arg; Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:44:52 2015 (r280077) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:45:43 2015 (r280078) @@ -209,6 +209,7 @@ struct wpi_softc { struct task sc_reinittask; struct task sc_radiooff_task; struct task sc_radioon_task; + struct task sc_start_task; /* Eeprom info. */ uint8_t cap; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:46:25 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 431F6965; Sun, 15 Mar 2015 20:46:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 154521D7; Sun, 15 Mar 2015 20:46:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKkOx2069647; Sun, 15 Mar 2015 20:46:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKkOXX069646; Sun, 15 Mar 2015 20:46:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152046.t2FKkOXX069646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280079 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:46:25 -0000 Author: adrian Date: Sun Mar 15 20:46:24 2015 New Revision: 280079 URL: https://svnweb.freebsd.org/changeset/base/280079 Log: Move IBSS assocation processing to wpi_newassoc(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:45:43 2015 (r280078) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:46:24 2015 (r280079) @@ -228,6 +228,7 @@ static int wpi_scan(struct wpi_softc *, static int wpi_auth(struct wpi_softc *, struct ieee80211vap *); static void wpi_update_beacon(struct ieee80211vap *, int); static int wpi_setup_beacon(struct wpi_softc *, struct ieee80211_node *); +static void wpi_newassoc(struct ieee80211_node *, int); static int wpi_run(struct wpi_softc *, struct ieee80211vap *); static int wpi_key_alloc(struct ieee80211vap *, struct ieee80211_key *, ieee80211_keyix *, ieee80211_keyix *); @@ -500,6 +501,7 @@ wpi_attach(device_t dev) ic->ic_wme.wme_update = wpi_updateedca; ic->ic_update_promisc = wpi_update_promisc; ic->ic_update_mcast = wpi_update_mcast; + ic->ic_newassoc = wpi_newassoc; ic->ic_scan_start = wpi_scan_start; ic->ic_scan_end = wpi_scan_end; ic->ic_set_channel = wpi_set_channel; @@ -2563,20 +2565,6 @@ wpi_tx_data(struct wpi_softc *sc, struct if (ismcast || type != IEEE80211_FC0_TYPE_DATA) tx.id = WPI_ID_BROADCAST; else { - if (wn->id == WPI_ID_UNDEFINED && - (vap->iv_opmode == IEEE80211_M_IBSS || - vap->iv_opmode == IEEE80211_M_AHDEMO)) { - WPI_NT_LOCK(sc); - error = wpi_add_ibss_node(sc, ni); - WPI_NT_UNLOCK(sc); - if (error != 0) { - device_printf(sc->sc_dev, - "%s: could not add IBSS node, error %d\n", - __func__, error); - goto fail; - } - } - if (wn->id == WPI_ID_UNDEFINED) { device_printf(sc->sc_dev, "%s: undefined node id\n", __func__); @@ -4019,6 +4007,28 @@ wpi_update_beacon(struct ieee80211vap *v WPI_UNLOCK(sc); } +static void +wpi_newassoc(struct ieee80211_node *ni, int isnew) +{ + struct ieee80211vap *vap = ni->ni_vap; + struct wpi_softc *sc = ni->ni_ic->ic_ifp->if_softc; + struct wpi_node *wn = WPI_NODE(ni); + int error; + + WPI_NT_LOCK(sc); + + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); + + if (vap->iv_opmode != IEEE80211_M_STA && wn->id == WPI_ID_UNDEFINED) { + if ((error = wpi_add_ibss_node(sc, ni)) != 0) { + device_printf(sc->sc_dev, + "%s: could not add IBSS node, error %d\n", + __func__, error); + } + } + WPI_NT_UNLOCK(sc); +} + static int wpi_run(struct wpi_softc *sc, struct ieee80211vap *vap) { From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:48:01 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 A0605AD4; Sun, 15 Mar 2015 20:48:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C3E31E8; Sun, 15 Mar 2015 20:48:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKm1vJ069904; Sun, 15 Mar 2015 20:48:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKm1CT069903; Sun, 15 Mar 2015 20:48:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152048.t2FKm1CT069903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280080 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:48:01 -0000 Author: adrian Date: Sun Mar 15 20:48:00 2015 New Revision: 280080 URL: https://svnweb.freebsd.org/changeset/base/280080 Log: Fix debug category in wpi_read_eeprom_band() PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:46:24 2015 (r280079) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:48:00 2015 (r280080) @@ -1370,7 +1370,7 @@ wpi_read_eeprom_band(struct wpi_softc *s for (i = 0; i < band->nchan; i++) { if (!(channels[i].flags & WPI_EEPROM_CHAN_VALID)) { - DPRINTF(sc, WPI_DEBUG_HW, + DPRINTF(sc, WPI_DEBUG_EEPROM, "Channel Not Valid: %d, band %d\n", band->chan[i],n); continue; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:48:33 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 E8D4FC2E; Sun, 15 Mar 2015 20:48:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4ACF1F2; Sun, 15 Mar 2015 20:48:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKmX8Z070034; Sun, 15 Mar 2015 20:48:33 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKmXY4070033; Sun, 15 Mar 2015 20:48:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152048.t2FKmXY4070033@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280081 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:48:34 -0000 Author: adrian Date: Sun Mar 15 20:48:32 2015 New Revision: 280081 URL: https://svnweb.freebsd.org/changeset/base/280081 Log: Use WPI_RSSI_OFFSET instead of stat->noise (always 0 for me) PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:48:00 2015 (r280080) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:48:32 2015 (r280081) @@ -1863,7 +1863,7 @@ wpi_rx_done(struct wpi_softc *sc, struct if (head->flags & htole16(WPI_STAT_FLAG_SHPREAMBLE)) tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; tap->wr_dbm_antsignal = (int8_t)(stat->rssi + WPI_RSSI_OFFSET); - tap->wr_dbm_antnoise = (int8_t)le16toh(stat->noise); + tap->wr_dbm_antnoise = WPI_RSSI_OFFSET; tap->wr_tsft = tail->tstamp; tap->wr_antenna = (le16toh(head->flags) >> 4) & 0xf; tap->wr_rate = plcp2rate(head->plcp); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:50:25 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 1F67CD9F; Sun, 15 Mar 2015 20:50:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 023EB206; Sun, 15 Mar 2015 20:50:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKoOkE070366; Sun, 15 Mar 2015 20:50:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKoOra070362; Sun, 15 Mar 2015 20:50:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152050.t2FKoOra070362@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280082 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:50:25 -0000 Author: adrian Date: Sun Mar 15 20:50:23 2015 New Revision: 280082 URL: https://svnweb.freebsd.org/changeset/base/280082 Log: Use a static buffer in wpi_cmd - rather than alloc/free'ing the beacon buffer frequently. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:48:32 2015 (r280081) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:50:23 2015 (r280082) @@ -586,7 +586,6 @@ wpi_vap_create(struct ieee80211com *ic, const uint8_t mac[IEEE80211_ADDR_LEN]) { struct wpi_vap *wvp; - struct wpi_buf *bcn; struct ieee80211vap *vap; if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ @@ -599,9 +598,6 @@ wpi_vap_create(struct ieee80211com *ic, vap = &wvp->vap; ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); - bcn = &wvp->wv_bcbuf; - bcn->data = NULL; - /* Override with driver methods. */ wvp->newstate = vap->iv_newstate; vap->iv_key_alloc = wpi_key_alloc; @@ -622,13 +618,10 @@ static void wpi_vap_delete(struct ieee80211vap *vap) { struct wpi_vap *wvp = WPI_VAP(vap); - struct wpi_buf *bcn = &wvp->wv_bcbuf; ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); - if (bcn->data != NULL) - free(bcn->data, M_DEVBUF); free(wvp, M_80211_VAP); } @@ -2322,6 +2315,8 @@ wpi_cmd2(struct wpi_softc *sc, struct wp WPI_TXQ_LOCK(sc); + KASSERT(buf->size <= sizeof(buf->data), ("buffer overflow")); + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); if (sc->txq_active == 0) { @@ -2454,8 +2449,8 @@ wpi_tx_data(struct wpi_softc *sc, struct struct ieee80211_channel *chan; struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; - struct wpi_cmd_data tx; struct wpi_buf tx_data; + struct wpi_cmd_data *tx = (struct wpi_cmd_data *)&tx_data.data; uint32_t flags; uint16_t qos; uint8_t tid, type; @@ -2548,7 +2543,7 @@ wpi_tx_data(struct wpi_softc *sc, struct flags |= WPI_TX_FULL_TXOP; } - memset(&tx, 0, sizeof (struct wpi_cmd_data)); + memset(tx, 0, sizeof (struct wpi_cmd_data)); if (type == IEEE80211_FC0_TYPE_MGT) { uint8_t subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; @@ -2557,13 +2552,13 @@ wpi_tx_data(struct wpi_softc *sc, struct flags |= WPI_TX_INSERT_TSTAMP; if (subtype == IEEE80211_FC0_SUBTYPE_ASSOC_REQ || subtype == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) - tx.timeout = htole16(3); + tx->timeout = htole16(3); else - tx.timeout = htole16(2); + tx->timeout = htole16(2); } if (ismcast || type != IEEE80211_FC0_TYPE_DATA) - tx.id = WPI_ID_BROADCAST; + tx->id = WPI_ID_BROADCAST; else { if (wn->id == WPI_ID_UNDEFINED) { device_printf(sc->sc_dev, @@ -2572,38 +2567,37 @@ wpi_tx_data(struct wpi_softc *sc, struct goto fail; } - tx.id = wn->id; + tx->id = wn->id; } if (type != IEEE80211_FC0_TYPE_MGT) - tx.data_ntries = tp->maxretry; + tx->data_ntries = tp->maxretry; if (k != NULL && !swcrypt) { switch (k->wk_cipher->ic_cipher) { case IEEE80211_CIPHER_AES_CCM: - tx.security = WPI_CIPHER_CCMP; + tx->security = WPI_CIPHER_CCMP; break; default: break; } - memcpy(tx.key, k->wk_key, k->wk_keylen); + memcpy(tx->key, k->wk_key, k->wk_keylen); } - tx.len = htole16(totlen); - tx.flags = htole32(flags); - tx.plcp = rate2plcp(rate); - tx.tid = tid; - tx.lifetime = htole32(WPI_LIFETIME_INFINITE); - tx.ofdm_mask = 0xff; - tx.cck_mask = 0x0f; - tx.rts_ntries = 7; + tx->len = htole16(totlen); + tx->flags = htole32(flags); + tx->plcp = rate2plcp(rate); + tx->tid = tid; + tx->lifetime = htole32(WPI_LIFETIME_INFINITE); + tx->ofdm_mask = 0xff; + tx->cck_mask = 0x0f; + tx->rts_ntries = 7; - tx_data.data = &tx; tx_data.ni = ni; tx_data.m = m; - tx_data.size = sizeof(tx); + tx_data.size = sizeof(struct wpi_cmd_data); tx_data.code = WPI_CMD_TX_DATA; tx_data.ac = ac; @@ -2619,8 +2613,8 @@ wpi_tx_data_raw(struct wpi_softc *sc, st { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame *wh; - struct wpi_cmd_data tx; struct wpi_buf tx_data; + struct wpi_cmd_data *tx = (struct wpi_cmd_data *)&tx_data.data; uint32_t flags; uint8_t type; int ac, rate, totlen; @@ -2653,7 +2647,7 @@ wpi_tx_data_raw(struct wpi_softc *sc, st ieee80211_radiotap_tx(vap, m); } - memset(&tx, 0, sizeof (struct wpi_cmd_data)); + memset(tx, 0, sizeof (struct wpi_cmd_data)); if (type == IEEE80211_FC0_TYPE_MGT) { uint8_t subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; @@ -2662,23 +2656,22 @@ wpi_tx_data_raw(struct wpi_softc *sc, st flags |= WPI_TX_INSERT_TSTAMP; if (subtype == IEEE80211_FC0_SUBTYPE_ASSOC_REQ || subtype == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) - tx.timeout = htole16(3); + tx->timeout = htole16(3); else - tx.timeout = htole16(2); + tx->timeout = htole16(2); } - tx.len = htole16(totlen); - tx.flags = htole32(flags); - tx.plcp = rate2plcp(rate); - tx.id = WPI_ID_BROADCAST; - tx.lifetime = htole32(WPI_LIFETIME_INFINITE); - tx.rts_ntries = params->ibp_try1; - tx.data_ntries = params->ibp_try0; + tx->len = htole16(totlen); + tx->flags = htole32(flags); + tx->plcp = rate2plcp(rate); + tx->id = WPI_ID_BROADCAST; + tx->lifetime = htole32(WPI_LIFETIME_INFINITE); + tx->rts_ntries = params->ibp_try1; + tx->data_ntries = params->ibp_try0; - tx_data.data = &tx; tx_data.ni = ni; tx_data.m = m; - tx_data.size = sizeof(tx); + tx_data.size = sizeof(struct wpi_cmd_data); tx_data.code = WPI_CMD_TX_DATA; tx_data.ac = ac; @@ -3933,13 +3926,11 @@ wpi_auth(struct wpi_softc *sc, struct ie static int wpi_setup_beacon(struct wpi_softc *sc, struct ieee80211_node *ni) { - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = ni->ni_vap; - struct wpi_vap *wvp = WPI_VAP(vap); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; + struct wpi_vap *wvp = WPI_VAP(ni->ni_vap); struct wpi_buf *bcn = &wvp->wv_bcbuf; struct ieee80211_beacon_offsets bo; - struct wpi_cmd_beacon *cmd; + struct wpi_cmd_beacon *cmd = (struct wpi_cmd_beacon *)&bcn->data; struct mbuf *m; int totlen; @@ -3956,30 +3947,16 @@ wpi_setup_beacon(struct wpi_softc *sc, s } totlen = m->m_pkthdr.len; - if (bcn->data == NULL) { - cmd = malloc(sizeof(struct wpi_cmd_beacon), M_DEVBUF, - M_NOWAIT | M_ZERO); - - if (cmd == NULL) { - device_printf(sc->sc_dev, - "could not allocate buffer for beacon command\n"); - m_freem(m); - return ENOMEM; - } - - cmd->id = WPI_ID_BROADCAST; - cmd->ofdm_mask = 0xff; - cmd->cck_mask = 0x0f; - cmd->lifetime = htole32(WPI_LIFETIME_INFINITE); - cmd->flags = htole32(WPI_TX_AUTO_SEQ | WPI_TX_INSERT_TSTAMP); - - bcn->data = cmd; - bcn->ni = NULL; - bcn->code = WPI_CMD_SET_BEACON; - bcn->ac = 4; - bcn->size = sizeof(struct wpi_cmd_beacon); - } else - cmd = bcn->data; + cmd->id = WPI_ID_BROADCAST; + cmd->ofdm_mask = 0xff; + cmd->cck_mask = 0x0f; + cmd->lifetime = htole32(WPI_LIFETIME_INFINITE); + cmd->flags = htole32(WPI_TX_AUTO_SEQ | WPI_TX_INSERT_TSTAMP); + + bcn->ni = NULL; + bcn->code = WPI_CMD_SET_BEACON; + bcn->ac = 4; + bcn->size = sizeof(struct wpi_cmd_beacon); cmd->len = htole16(totlen); cmd->plcp = (ic->ic_curmode == IEEE80211_MODE_11A) ? Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:48:32 2015 (r280081) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:50:23 2015 (r280082) @@ -112,7 +112,7 @@ struct wpi_power_group { }; struct wpi_buf { - void *data; + uint8_t data[56]; /* sizeof(struct wpi_cmd_beacon) */ struct ieee80211_node *ni; struct mbuf *m; size_t size; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:51:07 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 7FC53EE1; Sun, 15 Mar 2015 20:51:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 613542BB; Sun, 15 Mar 2015 20:51:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKp7ig071589; Sun, 15 Mar 2015 20:51:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKp7RR071588; Sun, 15 Mar 2015 20:51:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152051.t2FKp7RR071588@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:51:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280083 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:51:07 -0000 Author: adrian Date: Sun Mar 15 20:51:06 2015 New Revision: 280083 URL: https://svnweb.freebsd.org/changeset/base/280083 Log: Move beacon initialisation to wpi_init_beacon() PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:50:23 2015 (r280082) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:51:06 2015 (r280083) @@ -130,6 +130,7 @@ static int wpi_probe(device_t); static int wpi_attach(device_t); static void wpi_radiotap_attach(struct wpi_softc *); static void wpi_sysctlattach(struct wpi_softc *); +static void wpi_init_beacon(struct wpi_vap *); static struct ieee80211vap *wpi_vap_create(struct ieee80211com *, const char [IFNAMSIZ], int, enum ieee80211_opmode, int, const uint8_t [IEEE80211_ADDR_LEN], @@ -579,6 +580,23 @@ wpi_sysctlattach(struct wpi_softc *sc) #endif } +static void +wpi_init_beacon(struct wpi_vap *wvp) +{ + struct wpi_buf *bcn = &wvp->wv_bcbuf; + struct wpi_cmd_beacon *cmd = (struct wpi_cmd_beacon *)&bcn->data; + + cmd->id = WPI_ID_BROADCAST; + cmd->ofdm_mask = 0xff; + cmd->cck_mask = 0x0f; + cmd->lifetime = htole32(WPI_LIFETIME_INFINITE); + cmd->flags = htole32(WPI_TX_AUTO_SEQ | WPI_TX_INSERT_TSTAMP); + + bcn->code = WPI_CMD_SET_BEACON; + bcn->ac = WPI_CMD_QUEUE_NUM; + bcn->size = sizeof(struct wpi_cmd_beacon); +} + static struct ieee80211vap * wpi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, enum ieee80211_opmode opmode, int flags, @@ -598,6 +616,9 @@ wpi_vap_create(struct ieee80211com *ic, vap = &wvp->vap; ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); + if (opmode == IEEE80211_M_IBSS) + wpi_init_beacon(wvp); + /* Override with driver methods. */ wvp->newstate = vap->iv_newstate; vap->iv_key_alloc = wpi_key_alloc; @@ -3932,7 +3953,6 @@ wpi_setup_beacon(struct wpi_softc *sc, s struct ieee80211_beacon_offsets bo; struct wpi_cmd_beacon *cmd = (struct wpi_cmd_beacon *)&bcn->data; struct mbuf *m; - int totlen; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); @@ -3945,20 +3965,8 @@ wpi_setup_beacon(struct wpi_softc *sc, s "%s: could not allocate beacon frame\n", __func__); return ENOMEM; } - totlen = m->m_pkthdr.len; - - cmd->id = WPI_ID_BROADCAST; - cmd->ofdm_mask = 0xff; - cmd->cck_mask = 0x0f; - cmd->lifetime = htole32(WPI_LIFETIME_INFINITE); - cmd->flags = htole32(WPI_TX_AUTO_SEQ | WPI_TX_INSERT_TSTAMP); - - bcn->ni = NULL; - bcn->code = WPI_CMD_SET_BEACON; - bcn->ac = 4; - bcn->size = sizeof(struct wpi_cmd_beacon); - cmd->len = htole16(totlen); + cmd->len = htole16(m->m_pkthdr.len); cmd->plcp = (ic->ic_curmode == IEEE80211_MODE_11A) ? wpi_ridx_to_plcp[WPI_RIDX_OFDM6] : wpi_ridx_to_plcp[WPI_RIDX_CCK1]; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:51: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 E20F1E8; Sun, 15 Mar 2015 20:51:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C32612D9; Sun, 15 Mar 2015 20:51:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKpvWu074066; Sun, 15 Mar 2015 20:51:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKpvlX074064; Sun, 15 Mar 2015 20:51:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152051.t2FKpvlX074064@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280084 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:51:58 -0000 Author: adrian Date: Sun Mar 15 20:51:56 2015 New Revision: 280084 URL: https://svnweb.freebsd.org/changeset/base/280084 Log: Use ieee80211_beacon_update() for dynamic beacon contents. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:51:06 2015 (r280083) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:51:56 2015 (r280084) @@ -227,8 +227,9 @@ static uint16_t wpi_get_passive_dwell_ti struct ieee80211_channel *); static int wpi_scan(struct wpi_softc *, struct ieee80211_channel *); static int wpi_auth(struct wpi_softc *, struct ieee80211vap *); -static void wpi_update_beacon(struct ieee80211vap *, int); +static int wpi_config_beacon(struct wpi_vap *); static int wpi_setup_beacon(struct wpi_softc *, struct ieee80211_node *); +static void wpi_update_beacon(struct ieee80211vap *, int); static void wpi_newassoc(struct ieee80211_node *, int); static int wpi_run(struct wpi_softc *, struct ieee80211vap *); static int wpi_key_alloc(struct ieee80211vap *, struct ieee80211_key *, @@ -639,10 +640,17 @@ static void wpi_vap_delete(struct ieee80211vap *vap) { struct wpi_vap *wvp = WPI_VAP(vap); + struct wpi_buf *bcn = &wvp->wv_bcbuf; + enum ieee80211_opmode opmode = vap->iv_opmode; ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); + if (opmode == IEEE80211_M_IBSS) { + if (bcn->m != NULL) + m_freem(bcn->m); + } + free(wvp, M_80211_VAP); } @@ -3945,51 +3953,127 @@ wpi_auth(struct wpi_softc *sc, struct ie } static int +wpi_config_beacon(struct wpi_vap *wvp) +{ + struct ieee80211com *ic = wvp->vap.iv_ic; + struct ieee80211_beacon_offsets *bo = &wvp->wv_boff; + struct wpi_buf *bcn = &wvp->wv_bcbuf; + struct wpi_softc *sc = ic->ic_ifp->if_softc; + struct wpi_cmd_beacon *cmd = (struct wpi_cmd_beacon *)&bcn->data; + struct ieee80211_tim_ie *tie; + struct mbuf *m; + uint8_t *ptr; + int error; + + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); + + WPI_LOCK_ASSERT(sc); + + cmd->len = htole16(bcn->m->m_pkthdr.len); + cmd->plcp = (ic->ic_curmode == IEEE80211_MODE_11A) ? + wpi_ridx_to_plcp[WPI_RIDX_OFDM6] : wpi_ridx_to_plcp[WPI_RIDX_CCK1]; + + /* XXX seems to be unused */ + if (*(bo->bo_tim) == IEEE80211_ELEMID_TIM) { + tie = (struct ieee80211_tim_ie *) bo->bo_tim; + ptr = mtod(bcn->m, uint8_t *); + + cmd->tim = htole16(bo->bo_tim - ptr); + cmd->timsz = tie->tim_len; + } + + /* Necessary for recursion in ieee80211_beacon_update(). */ + m = bcn->m; + bcn->m = m_dup(m, M_NOWAIT); + if (bcn->m == NULL) { + device_printf(sc->sc_dev, + "%s: could not copy beacon frame\n", __func__); + error = ENOMEM; + goto end; + } + + if ((error = wpi_cmd2(sc, bcn)) != 0) { + device_printf(sc->sc_dev, + "%s: could not update beacon frame, error %d", __func__, + error); + } + + /* Restore mbuf. */ +end: bcn->m = m; + + return error; +} + +static int wpi_setup_beacon(struct wpi_softc *sc, struct ieee80211_node *ni) { - struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct wpi_vap *wvp = WPI_VAP(ni->ni_vap); struct wpi_buf *bcn = &wvp->wv_bcbuf; - struct ieee80211_beacon_offsets bo; - struct wpi_cmd_beacon *cmd = (struct wpi_cmd_beacon *)&bcn->data; + struct ieee80211_beacon_offsets *bo = &wvp->wv_boff; struct mbuf *m; + int error; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); if (ni->ni_chan == IEEE80211_CHAN_ANYC) return EINVAL; - m = ieee80211_beacon_alloc(ni, &bo); + m = ieee80211_beacon_alloc(ni, bo); if (m == NULL) { device_printf(sc->sc_dev, "%s: could not allocate beacon frame\n", __func__); return ENOMEM; } - cmd->len = htole16(m->m_pkthdr.len); - cmd->plcp = (ic->ic_curmode == IEEE80211_MODE_11A) ? - wpi_ridx_to_plcp[WPI_RIDX_OFDM6] : wpi_ridx_to_plcp[WPI_RIDX_CCK1]; + if (bcn->m != NULL) + m_freem(bcn->m); - /* NB: m will be freed in wpi_cmd_done() */ bcn->m = m; - return wpi_cmd2(sc, bcn); + error = wpi_config_beacon(wvp); + + return error; } static void wpi_update_beacon(struct ieee80211vap *vap, int item) { struct wpi_softc *sc = vap->iv_ic->ic_ifp->if_softc; + struct wpi_vap *wvp = WPI_VAP(vap); + struct wpi_buf *bcn = &wvp->wv_bcbuf; + struct ieee80211_beacon_offsets *bo = &wvp->wv_boff; struct ieee80211_node *ni = vap->iv_bss; - int error; + int mcast = 0; + + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); WPI_LOCK(sc); - if ((error = wpi_setup_beacon(sc, ni)) != 0) { - device_printf(sc->sc_dev, - "%s: could not update beacon frame, error %d", __func__, - error); + if (bcn->m == NULL) { + bcn->m = ieee80211_beacon_alloc(ni, bo); + if (bcn->m == NULL) { + device_printf(sc->sc_dev, + "%s: could not allocate beacon frame\n", __func__); + WPI_UNLOCK(sc); + + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, + __func__); + + return; + } } WPI_UNLOCK(sc); + + if (item == IEEE80211_BEACON_TIM) + mcast = 1; /* TODO */ + + setbit(bo->bo_flags, item); + ieee80211_beacon_update(ni, bo, bcn->m, mcast); + + WPI_LOCK(sc); + wpi_config_beacon(wvp); + WPI_UNLOCK(sc); + + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); } static void Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:51:06 2015 (r280083) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:51:56 2015 (r280084) @@ -121,11 +121,13 @@ struct wpi_buf { }; struct wpi_vap { - struct ieee80211vap vap; - struct wpi_buf wv_bcbuf; + struct ieee80211vap vap; - int (*newstate)(struct ieee80211vap *, - enum ieee80211_state, int); + struct wpi_buf wv_bcbuf; + struct ieee80211_beacon_offsets wv_boff; + + int (*newstate)(struct ieee80211vap *, + enum ieee80211_state, int); }; #define WPI_VAP(vap) ((struct wpi_vap *)(vap)) From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:52:48 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 969B8242; Sun, 15 Mar 2015 20:52:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68AD92EA; Sun, 15 Mar 2015 20:52:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKqmYU074245; Sun, 15 Mar 2015 20:52:48 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKqli4074240; Sun, 15 Mar 2015 20:52:48 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152052.t2FKqli4074240@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280085 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:52:48 -0000 Author: adrian Date: Sun Mar 15 20:52:47 2015 New Revision: 280085 URL: https://svnweb.freebsd.org/changeset/base/280085 Log: Add prefixes to field names. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:51:56 2015 (r280084) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:52:47 2015 (r280085) @@ -614,17 +614,17 @@ wpi_vap_create(struct ieee80211com *ic, M_80211_VAP, M_NOWAIT | M_ZERO); if (wvp == NULL) return NULL; - vap = &wvp->vap; + vap = &wvp->wv_vap; ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); if (opmode == IEEE80211_M_IBSS) wpi_init_beacon(wvp); /* Override with driver methods. */ - wvp->newstate = vap->iv_newstate; vap->iv_key_alloc = wpi_key_alloc; vap->iv_key_set = wpi_key_set; vap->iv_key_delete = wpi_key_delete; + wvp->wv_newstate = vap->iv_newstate; vap->iv_newstate = wpi_newstate; vap->iv_update_beacon = wpi_update_beacon; @@ -1704,7 +1704,7 @@ wpi_newstate(struct ieee80211vap *vap, e DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); - return wvp->newstate(vap, nstate, arg); + return wvp->wv_newstate(vap, nstate, arg); } static void @@ -3955,7 +3955,7 @@ wpi_auth(struct wpi_softc *sc, struct ie static int wpi_config_beacon(struct wpi_vap *wvp) { - struct ieee80211com *ic = wvp->vap.iv_ic; + struct ieee80211com *ic = wvp->wv_vap.iv_ic; struct ieee80211_beacon_offsets *bo = &wvp->wv_boff; struct wpi_buf *bcn = &wvp->wv_bcbuf; struct wpi_softc *sc = ic->ic_ifp->if_softc; Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:51:56 2015 (r280084) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:52:47 2015 (r280085) @@ -121,12 +121,12 @@ struct wpi_buf { }; struct wpi_vap { - struct ieee80211vap vap; + struct ieee80211vap wv_vap; struct wpi_buf wv_bcbuf; struct ieee80211_beacon_offsets wv_boff; - int (*newstate)(struct ieee80211vap *, + int (*wv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); }; #define WPI_VAP(vap) ((struct wpi_vap *)(vap)) From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:53:47 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 5AA033AE; Sun, 15 Mar 2015 20:53:47 +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 4637E2FF; Sun, 15 Mar 2015 20:53:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKrlph074416; Sun, 15 Mar 2015 20:53:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKrktY074414; Sun, 15 Mar 2015 20:53:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152053.t2FKrktY074414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280086 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:53:47 -0000 Author: adrian Date: Sun Mar 15 20:53:46 2015 New Revision: 280086 URL: https://svnweb.freebsd.org/changeset/base/280086 Log: Use separate mutex for wv_bcbuf and wv_boff structures. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:52:47 2015 (r280085) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:53:46 2015 (r280086) @@ -617,8 +617,10 @@ wpi_vap_create(struct ieee80211com *ic, vap = &wvp->wv_vap; ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); - if (opmode == IEEE80211_M_IBSS) + if (opmode == IEEE80211_M_IBSS) { + WPI_VAP_LOCK_INIT(wvp); wpi_init_beacon(wvp); + } /* Override with driver methods. */ vap->iv_key_alloc = wpi_key_alloc; @@ -649,6 +651,8 @@ wpi_vap_delete(struct ieee80211vap *vap) if (opmode == IEEE80211_M_IBSS) { if (bcn->m != NULL) m_freem(bcn->m); + + WPI_VAP_LOCK_DESTROY(wvp); } free(wvp, M_80211_VAP); @@ -2340,8 +2344,6 @@ wpi_cmd2(struct wpi_softc *sc, struct wp bus_dma_segment_t *seg, segs[WPI_MAX_SCATTER]; int error, i, hdrlen, nsegs, totlen, pad; - WPI_LOCK_ASSERT(sc); - WPI_TXQ_LOCK(sc); KASSERT(buf->size <= sizeof(buf->data), ("buffer overflow")); @@ -3967,7 +3969,7 @@ wpi_config_beacon(struct wpi_vap *wvp) DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); - WPI_LOCK_ASSERT(sc); + WPI_VAP_LOCK_ASSERT(wvp); cmd->len = htole16(bcn->m->m_pkthdr.len); cmd->plcp = (ic->ic_curmode == IEEE80211_MODE_11A) ? @@ -4025,12 +4027,14 @@ wpi_setup_beacon(struct wpi_softc *sc, s return ENOMEM; } + WPI_VAP_LOCK(wvp); if (bcn->m != NULL) m_freem(bcn->m); bcn->m = m; error = wpi_config_beacon(wvp); + WPI_VAP_UNLOCK(wvp); return error; } @@ -4047,21 +4051,21 @@ wpi_update_beacon(struct ieee80211vap *v DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); - WPI_LOCK(sc); + WPI_VAP_LOCK(wvp); if (bcn->m == NULL) { bcn->m = ieee80211_beacon_alloc(ni, bo); if (bcn->m == NULL) { device_printf(sc->sc_dev, "%s: could not allocate beacon frame\n", __func__); - WPI_UNLOCK(sc); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); + WPI_VAP_UNLOCK(wvp); return; } } - WPI_UNLOCK(sc); + WPI_VAP_UNLOCK(wvp); if (item == IEEE80211_BEACON_TIM) mcast = 1; /* TODO */ @@ -4069,9 +4073,9 @@ wpi_update_beacon(struct ieee80211vap *v setbit(bo->bo_flags, item); ieee80211_beacon_update(ni, bo, bcn->m, mcast); - WPI_LOCK(sc); + WPI_VAP_LOCK(wvp); wpi_config_beacon(wvp); - WPI_UNLOCK(sc); + WPI_VAP_UNLOCK(wvp); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); } Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:52:47 2015 (r280085) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:53:46 2015 (r280086) @@ -125,12 +125,21 @@ struct wpi_vap { struct wpi_buf wv_bcbuf; struct ieee80211_beacon_offsets wv_boff; + struct mtx wv_mtx; int (*wv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); }; #define WPI_VAP(vap) ((struct wpi_vap *)(vap)) +#define WPI_VAP_LOCK_INIT(_wvp) \ + mtx_init(&(_wvp)->wv_mtx, "lock for wv_bcbuf/wv_boff structures", \ + NULL, MTX_DEF) +#define WPI_VAP_LOCK(_wvp) mtx_lock(&(_wvp)->wv_mtx) +#define WPI_VAP_UNLOCK(_wvp) mtx_unlock(&(_wvp)->wv_mtx) +#define WPI_VAP_LOCK_ASSERT(_wvp) mtx_assert(&(_wvp)->wv_mtx, MA_OWNED) +#define WPI_VAP_LOCK_DESTROY(_wvp) mtx_destroy(&(_wvp)->wv_mtx) + struct wpi_fw_part { const uint8_t *text; uint32_t textsz; @@ -224,7 +233,7 @@ struct wpi_softc { char domain[4]; /* Regulatory domain. */ }; -/* WPI_LOCK > WPI_NT_LOCK > WPI_TXQ_LOCK */ +/* WPI_LOCK > WPI_NT_LOCK / WPI_VAP_LOCK > WPI_TXQ_LOCK */ #define WPI_LOCK_INIT(_sc) \ mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:54:11 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 4479551B; Sun, 15 Mar 2015 20:54:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1668E307; Sun, 15 Mar 2015 20:54:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKsAES074546; Sun, 15 Mar 2015 20:54:10 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKsAZE074545; Sun, 15 Mar 2015 20:54:10 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152054.t2FKsAZE074545@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280087 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:54:11 -0000 Author: adrian Date: Sun Mar 15 20:54:10 2015 New Revision: 280087 URL: https://svnweb.freebsd.org/changeset/base/280087 Log: Encrypt frame if IEEE80211_BPF_CRYPTO is set. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:53:46 2015 (r280086) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:54:10 2015 (r280087) @@ -2643,16 +2643,16 @@ wpi_tx_data_raw(struct wpi_softc *sc, st struct ieee80211_node *ni, const struct ieee80211_bpf_params *params) { struct ieee80211vap *vap = ni->ni_vap; + struct ieee80211_key *k = NULL; struct ieee80211_frame *wh; struct wpi_buf tx_data; struct wpi_cmd_data *tx = (struct wpi_cmd_data *)&tx_data.data; uint32_t flags; uint8_t type; - int ac, rate, totlen; + int ac, rate, swcrypt, totlen; wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; - totlen = m->m_pkthdr.len; ac = params->ibp_pri & 3; @@ -2669,11 +2669,28 @@ wpi_tx_data_raw(struct wpi_softc *sc, st if (flags & (WPI_TX_NEED_RTS | WPI_TX_NEED_CTS)) flags |= WPI_TX_FULL_TXOP; + /* Encrypt the frame if need be. */ + if (params->ibp_flags & IEEE80211_BPF_CRYPTO) { + /* Retrieve key for TX. */ + k = ieee80211_crypto_encap(ni, m); + if (k == NULL) { + m_freem(m); + return ENOBUFS; + } + swcrypt = k->wk_flags & IEEE80211_KEY_SWCRYPT; + + /* 802.11 header may have moved. */ + wh = mtod(m, struct ieee80211_frame *); + } + totlen = m->m_pkthdr.len; + if (ieee80211_radiotap_active_vap(vap)) { struct wpi_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; tap->wt_rate = rate; + if (params->ibp_flags & IEEE80211_BPF_CRYPTO) + tap->wt_flags |= IEEE80211_RADIOTAP_F_WEP; ieee80211_radiotap_tx(vap, m); } @@ -2692,6 +2709,19 @@ wpi_tx_data_raw(struct wpi_softc *sc, st tx->timeout = htole16(2); } + if (k != NULL && !swcrypt) { + switch (k->wk_cipher->ic_cipher) { + case IEEE80211_CIPHER_AES_CCM: + tx->security = WPI_CIPHER_CCMP; + break; + + default: + break; + } + + memcpy(tx->key, k->wk_key, k->wk_keylen); + } + tx->len = htole16(totlen); tx->flags = htole32(flags); tx->plcp = rate2plcp(rate); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:54:41 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 5BE8368A; Sun, 15 Mar 2015 20:54:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B865316; Sun, 15 Mar 2015 20:54:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKsf5c074664; Sun, 15 Mar 2015 20:54:41 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKse7h074661; Sun, 15 Mar 2015 20:54:40 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152054.t2FKse7h074661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280088 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:54:41 -0000 Author: adrian Date: Sun Mar 15 20:54:40 2015 New Revision: 280088 URL: https://svnweb.freebsd.org/changeset/base/280088 Log: Add support for AES-CCMP group keys. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:54:10 2015 (r280087) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:54:40 2015 (r280088) @@ -232,8 +232,15 @@ static int wpi_setup_beacon(struct wpi_s static void wpi_update_beacon(struct ieee80211vap *, int); static void wpi_newassoc(struct ieee80211_node *, int); static int wpi_run(struct wpi_softc *, struct ieee80211vap *); -static int wpi_key_alloc(struct ieee80211vap *, struct ieee80211_key *, - ieee80211_keyix *, ieee80211_keyix *); +static int wpi_load_key(struct ieee80211_node *, + const struct ieee80211_key *); +static void wpi_load_key_cb(void *, struct ieee80211_node *); +static int wpi_set_global_keys(struct ieee80211_node *); +static int wpi_del_key(struct ieee80211_node *, + const struct ieee80211_key *); +static void wpi_del_key_cb(void *, struct ieee80211_node *); +static int wpi_process_key(struct ieee80211vap *, + const struct ieee80211_key *, int); static int wpi_key_set(struct ieee80211vap *, const struct ieee80211_key *, const uint8_t mac[IEEE80211_ADDR_LEN]); @@ -623,7 +630,6 @@ wpi_vap_create(struct ieee80211com *ic, } /* Override with driver methods. */ - vap->iv_key_alloc = wpi_key_alloc; vap->iv_key_set = wpi_key_set; vap->iv_key_delete = wpi_key_delete; wvp->wv_newstate = vap->iv_newstate; @@ -1775,7 +1781,6 @@ wpi_rx_done(struct wpi_softc *sc, struct struct wpi_rx_data *data) { struct ifnet *ifp = sc->sc_ifp; - const struct ieee80211_cipher *cip = NULL; struct ieee80211com *ic = ifp->if_l2com; struct wpi_rx_ring *ring = &sc->rxq; struct wpi_rx_stat *stat; @@ -1863,16 +1868,9 @@ wpi_rx_done(struct wpi_softc *sc, struct /* Grab a reference to the source node. */ wh = mtod(m, struct ieee80211_frame *); - ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - if (ni != NULL) - cip = ni->ni_ucastkey.wk_cipher; if ((wh->i_fc[1] & IEEE80211_FC1_PROTECTED) && - !IEEE80211_IS_MULTICAST(wh->i_addr1) && - cip != NULL && cip->ic_cipher == IEEE80211_CIPHER_AES_CCM) { - if ((flags & WPI_RX_CIPHER_MASK) != WPI_RX_CIPHER_CCMP) - goto fail2; - + (flags & WPI_RX_CIPHER_MASK) == WPI_RX_CIPHER_CCMP) { /* Check whether decryption was successful or not. */ if ((flags & WPI_RX_DECRYPT_MASK) != WPI_RX_DECRYPT_OK) { DPRINTF(sc, WPI_DEBUG_RECV, @@ -1882,6 +1880,8 @@ wpi_rx_done(struct wpi_softc *sc, struct m->m_flags |= M_WEP; } + ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); + if (ieee80211_radiotap_active(ic)) { struct wpi_rx_radiotap_header *tap = &sc->sc_rxtap; @@ -1909,8 +1909,7 @@ wpi_rx_done(struct wpi_softc *sc, struct return; -fail2: ieee80211_free_node(ni); - m_freem(m); +fail2: m_freem(m); fail1: if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); } @@ -3094,8 +3093,10 @@ static int wpi_add_node(struct wpi_softc *sc, struct ieee80211_node *ni) { struct ieee80211com *ic = ni->ni_ic; + struct wpi_vap *wvp = WPI_VAP(ni->ni_vap); struct wpi_node *wn = WPI_NODE(ni); struct wpi_node_info node; + int error; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); @@ -3110,7 +3111,24 @@ wpi_add_node(struct wpi_softc *sc, struc node.action = htole32(WPI_ACTION_SET_RATE); node.antenna = WPI_ANTENNA_BOTH; - return wpi_cmd(sc, WPI_CMD_ADD_NODE, &node, sizeof node, 1); + error = wpi_cmd(sc, WPI_CMD_ADD_NODE, &node, sizeof node, 1); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: wpi_cmd() call failed with error code %d\n", __func__, + error); + return error; + } + + if (wvp->wv_gtk != 0) { + error = wpi_set_global_keys(ni); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: error while setting global keys\n", __func__); + return ENXIO; + } + } + + return 0; } /* @@ -4237,37 +4255,11 @@ wpi_run(struct wpi_softc *sc, struct iee } static int -wpi_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, - ieee80211_keyix *keyix, ieee80211_keyix *rxkeyix) -{ - struct wpi_softc *sc = vap->iv_ic->ic_ifp->if_softc; - - if (!(&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { - if (k->wk_flags & IEEE80211_KEY_GROUP) { - /* should not happen */ - DPRINTF(sc, WPI_DEBUG_KEY, "%s: bogus group key\n", - __func__); - return 0; - } - *keyix = 0; /* NB: use key index 0 for ucast key */ - } else { - *keyix = *rxkeyix = k - vap->iv_nw_keys; - - if (k->wk_cipher->ic_cipher == IEEE80211_CIPHER_AES_CCM) - k->wk_flags |= IEEE80211_KEY_SWCRYPT; - } - return 1; -} - -static int -wpi_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k, - const uint8_t mac[IEEE80211_ADDR_LEN]) +wpi_load_key(struct ieee80211_node *ni, const struct ieee80211_key *k) { const struct ieee80211_cipher *cip = k->wk_cipher; - struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_node *ni = vap->iv_bss; - struct wpi_softc *sc = ic->ic_ifp->if_softc; + struct ieee80211vap *vap = ni->ni_vap; + struct wpi_softc *sc = ni->ni_ic->ic_ifp->if_softc; struct wpi_node *wn = WPI_NODE(ni); struct wpi_node_info node; uint16_t kflags; @@ -4275,20 +4267,22 @@ wpi_key_set(struct ieee80211vap *vap, co DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); + if (wpi_check_node_entry(sc, wn->id) == 0) { + device_printf(sc->sc_dev, "%s: node does not exist\n", + __func__); + return 0; + } + switch (cip->ic_cipher) { case IEEE80211_CIPHER_AES_CCM: - if (k->wk_flags & IEEE80211_KEY_GROUP) - return 1; - kflags = WPI_KFLAG_CCMP; break; - default: - /* null_key_set() */ - return 1; - } - if (wn->id == WPI_ID_UNDEFINED) + default: + device_printf(sc->sc_dev, "%s: unknown cipher %d\n", __func__, + cip->ic_cipher); return 0; + } kflags |= WPI_KFLAG_KID(k->wk_keyix); if (k->wk_flags & IEEE80211_KEY_GROUP) @@ -4300,55 +4294,223 @@ wpi_key_set(struct ieee80211vap *vap, co node.flags = WPI_FLAG_KEY_SET; node.kflags = htole16(kflags); memcpy(node.key, k->wk_key, k->wk_keylen); - - DPRINTF(sc, WPI_DEBUG_KEY, "set key id=%d for node %d\n", k->wk_keyix, - node.id); +again: + DPRINTF(sc, WPI_DEBUG_KEY, + "%s: setting %s key id %d for node %d (%s)\n", __func__, + (kflags & WPI_KFLAG_MULTICAST) ? "group" : "ucast", k->wk_keyix, + node.id, ether_sprintf(ni->ni_macaddr)); error = wpi_cmd(sc, WPI_CMD_ADD_NODE, &node, sizeof node, 1); if (error != 0) { device_printf(sc->sc_dev, "can't update node info, error %d\n", error); - return 0; + return !error; + } + + if (!(kflags & WPI_KFLAG_MULTICAST) && &vap->iv_nw_keys[0] <= k && + k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + kflags |= WPI_KFLAG_MULTICAST; + node.kflags = htole16(kflags); + + goto again; } return 1; } +static void +wpi_load_key_cb(void *arg, struct ieee80211_node *ni) +{ + const struct ieee80211_key *k = arg; + struct ieee80211vap *vap = ni->ni_vap; + struct wpi_softc *sc = ni->ni_ic->ic_ifp->if_softc; + struct wpi_node *wn = WPI_NODE(ni); + int error; + + if (vap->iv_bss == ni && wn->id == WPI_ID_UNDEFINED) + return; + + WPI_NT_LOCK(sc); + error = wpi_load_key(ni, k); + WPI_NT_UNLOCK(sc); + + if (error == 0) { + device_printf(sc->sc_dev, "%s: error while setting key\n", + __func__); + } +} + static int -wpi_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) +wpi_set_global_keys(struct ieee80211_node *ni) { - const struct ieee80211_cipher *cip = k->wk_cipher; - struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_node *ni = vap->iv_bss; - struct wpi_softc *sc = ic->ic_ifp->if_softc; + struct ieee80211vap *vap = ni->ni_vap; + struct ieee80211_key *wk = &vap->iv_nw_keys[0]; + int error = 1; + + for (; wk < &vap->iv_nw_keys[IEEE80211_WEP_NKID] && error; wk++) + if (wk->wk_keyix != IEEE80211_KEYIX_NONE) + error = wpi_load_key(ni, wk); + + return !error; +} + +static int +wpi_del_key(struct ieee80211_node *ni, const struct ieee80211_key *k) +{ + struct ieee80211vap *vap = ni->ni_vap; + struct wpi_softc *sc = ni->ni_ic->ic_ifp->if_softc; struct wpi_node *wn = WPI_NODE(ni); struct wpi_node_info node; + uint16_t kflags; + int error; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); - switch (cip->ic_cipher) { - case IEEE80211_CIPHER_AES_CCM: - break; - default: - /* null_key_delete() */ - return 1; + if (wpi_check_node_entry(sc, wn->id) == 0) { + DPRINTF(sc, WPI_DEBUG_KEY, "%s: node was removed\n", __func__); + return 1; /* Nothing to do. */ } - if (vap->iv_state != IEEE80211_S_RUN || - (k->wk_flags & IEEE80211_KEY_GROUP)) - return 1; /* Nothing to do. */ + kflags = WPI_KFLAG_KID(k->wk_keyix); + if (k->wk_flags & IEEE80211_KEY_GROUP) + kflags |= WPI_KFLAG_MULTICAST; memset(&node, 0, sizeof node); node.id = wn->id; node.control = WPI_NODE_UPDATE; node.flags = WPI_FLAG_KEY_SET; + node.kflags = htole16(kflags); +again: + DPRINTF(sc, WPI_DEBUG_KEY, "%s: deleting %s key %d for node %d (%s)\n", + __func__, (kflags & WPI_KFLAG_MULTICAST) ? "group" : "ucast", + k->wk_keyix, node.id, ether_sprintf(ni->ni_macaddr)); - DPRINTF(sc, WPI_DEBUG_KEY, "delete keys for node %d\n", node.id); - (void)wpi_cmd(sc, WPI_CMD_ADD_NODE, &node, sizeof node, 1); + error = wpi_cmd(sc, WPI_CMD_ADD_NODE, &node, sizeof node, 1); + if (error != 0) { + device_printf(sc->sc_dev, "can't update node info, error %d\n", + error); + return !error; + } + + if (!(kflags & WPI_KFLAG_MULTICAST) && &vap->iv_nw_keys[0] <= k && + k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + kflags |= WPI_KFLAG_MULTICAST; + node.kflags = htole16(kflags); + + goto again; + } return 1; } +static void +wpi_del_key_cb(void *arg, struct ieee80211_node *ni) +{ + const struct ieee80211_key *k = arg; + struct ieee80211vap *vap = ni->ni_vap; + struct wpi_softc *sc = ni->ni_ic->ic_ifp->if_softc; + struct wpi_node *wn = WPI_NODE(ni); + int error; + + if (vap->iv_bss == ni && wn->id == WPI_ID_UNDEFINED) + return; + + WPI_NT_LOCK(sc); + error = wpi_del_key(ni, k); + WPI_NT_UNLOCK(sc); + + if (error == 0) { + device_printf(sc->sc_dev, "%s: error while deleting key\n", + __func__); + } +} + +static int +wpi_process_key(struct ieee80211vap *vap, const struct ieee80211_key *k, + int set) +{ + struct ieee80211com *ic = vap->iv_ic; + struct wpi_softc *sc = ic->ic_ifp->if_softc; + struct wpi_vap *wvp = WPI_VAP(vap); + struct ieee80211_node *ni; + int error, ni_ref = 0; + + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); + + if (k->wk_flags & IEEE80211_KEY_SWCRYPT) { + /* Not for us. */ + return 1; + } + + if (!(k->wk_flags & IEEE80211_KEY_RECV)) { + /* XMIT keys are handled in wpi_tx_data(). */ + return 1; + } + + /* Handle group keys. */ + if (&vap->iv_nw_keys[0] <= k && + k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + WPI_NT_LOCK(sc); + if (set) + wvp->wv_gtk |= WPI_VAP_KEY(k->wk_keyix); + else + wvp->wv_gtk &= ~WPI_VAP_KEY(k->wk_keyix); + WPI_NT_UNLOCK(sc); + + if (vap->iv_state == IEEE80211_S_RUN) { + ieee80211_iterate_nodes(&ic->ic_sta, + set ? wpi_load_key_cb : wpi_del_key_cb, (void *)k); + } + + return 1; + } + + switch (vap->iv_opmode) { + case IEEE80211_M_STA: + ni = vap->iv_bss; + break; + + case IEEE80211_M_IBSS: + case IEEE80211_M_AHDEMO: + ni = ieee80211_find_vap_node(&ic->ic_sta, vap, k->wk_macaddr); + if (ni == NULL) + return 0; /* should not happen */ + + ni_ref = 1; + break; + + default: + device_printf(sc->sc_dev, "%s: unknown opmode %d\n", __func__, + vap->iv_opmode); + return 0; + } + + WPI_NT_LOCK(sc); + if (set) + error = wpi_load_key(ni, k); + else + error = wpi_del_key(ni, k); + WPI_NT_UNLOCK(sc); + + if (ni_ref) + ieee80211_node_decref(ni); + + return error; +} + +static int +wpi_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k, + const uint8_t mac[IEEE80211_ADDR_LEN]) +{ + return wpi_process_key(vap, k, 1); +} + +static int +wpi_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) +{ + return wpi_process_key(vap, k, 0); +} + /* * This function is called after the runtime firmware notifies us of its * readiness (called in a process context). Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:54:10 2015 (r280087) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:54:40 2015 (r280088) @@ -127,6 +127,9 @@ struct wpi_vap { struct ieee80211_beacon_offsets wv_boff; struct mtx wv_mtx; + uint32_t wv_gtk; +#define WPI_VAP_KEY(kid) (1 << kid) + int (*wv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); }; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:55: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 7B5747DE; Sun, 15 Mar 2015 20:55: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 67360321; Sun, 15 Mar 2015 20:55: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 t2FKtOmh074866; Sun, 15 Mar 2015 20:55:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKtOai074865; Sun, 15 Mar 2015 20:55:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152055.t2FKtOai074865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280089 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 20:55:24 -0000 Author: adrian Date: Sun Mar 15 20:55:23 2015 New Revision: 280089 URL: https://svnweb.freebsd.org/changeset/base/280089 Log: Remove unnecessary debug output. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:54:40 2015 (r280088) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:55:23 2015 (r280089) @@ -1100,12 +1100,6 @@ wpi_reset_rx_ring(struct wpi_softc *sc) break; DELAY(10); } -#ifdef WPI_DEBUG - if (ntries == 1000) { - device_printf(sc->sc_dev, - "timeout resetting Rx ring\n"); - } -#endif wpi_nic_unlock(sc); } From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:00:11 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 BB367AC0; Sun, 15 Mar 2015 21:00:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A798436E; Sun, 15 Mar 2015 21:00:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FL0Bdj076158; Sun, 15 Mar 2015 21:00:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FL0BW0076156; Sun, 15 Mar 2015 21:00:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503152100.t2FL0BW0076156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Mar 2015 21:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280090 - in head/sys/dev/virtio: mmio pci X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:00:11 -0000 Author: mav Date: Sun Mar 15 21:00:10 2015 New Revision: 280090 URL: https://svnweb.freebsd.org/changeset/base/280090 Log: Hide virtio features negotiation messages under bootverbose. Those messages are noisy, but useless for average user. MFC after: 2 weeks Modified: head/sys/dev/virtio/mmio/virtio_mmio.c head/sys/dev/virtio/pci/virtio_pci.c Modified: head/sys/dev/virtio/mmio/virtio_mmio.c ============================================================================== --- head/sys/dev/virtio/mmio/virtio_mmio.c Sun Mar 15 20:55:23 2015 (r280089) +++ head/sys/dev/virtio/mmio/virtio_mmio.c Sun Mar 15 21:00:10 2015 (r280090) @@ -702,7 +702,7 @@ vtmmio_describe_features(struct vtmmio_s dev = sc->dev; child = sc->vtmmio_child_dev; - if (device_is_attached(child) && bootverbose == 0) + if (device_is_attached(child) || bootverbose == 0) return; virtio_describe(dev, msg, features, sc->vtmmio_child_feat_desc); Modified: head/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- head/sys/dev/virtio/pci/virtio_pci.c Sun Mar 15 20:55:23 2015 (r280089) +++ head/sys/dev/virtio/pci/virtio_pci.c Sun Mar 15 21:00:10 2015 (r280090) @@ -730,7 +730,7 @@ vtpci_describe_features(struct vtpci_sof dev = sc->vtpci_dev; child = sc->vtpci_child_dev; - if (device_is_attached(child) && bootverbose == 0) + if (device_is_attached(child) || bootverbose == 0) return; virtio_describe(dev, msg, features, sc->vtpci_child_feat_desc); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:03:00 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 8AE4CE66; Sun, 15 Mar 2015 21:03:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76AFF6A5; Sun, 15 Mar 2015 21:03:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FL30E9079483; Sun, 15 Mar 2015 21:03:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FL30lt079482; Sun, 15 Mar 2015 21:03:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152103.t2FL30lt079482@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280091 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:03:00 -0000 Author: adrian Date: Sun Mar 15 21:02:59 2015 New Revision: 280091 URL: https://svnweb.freebsd.org/changeset/base/280091 Log: Remove unnecessary assignment. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:00:10 2015 (r280090) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:02:59 2015 (r280091) @@ -375,8 +375,7 @@ wpi_attach(device_t dev) RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "can't map mem space\n"); - error = ENOMEM; - return error; + return ENOMEM; } sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:03:49 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 395D3124; Sun, 15 Mar 2015 21:03:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 255986BC; Sun, 15 Mar 2015 21:03:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FL3ng1079631; Sun, 15 Mar 2015 21:03:49 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FL3n5s079630; Sun, 15 Mar 2015 21:03:49 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152103.t2FL3n5s079630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280092 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:03:49 -0000 Author: adrian Date: Sun Mar 15 21:03:48 2015 New Revision: 280092 URL: https://svnweb.freebsd.org/changeset/base/280092 Log: Remove unrelated comment. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:02:59 2015 (r280091) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:03:48 2015 (r280092) @@ -4197,8 +4197,6 @@ wpi_run(struct wpi_softc *sc, struct iee } sc->rxon.filter |= htole32(WPI_FILTER_BSS); - /* XXX put somewhere HC_QOS_SUPPORT_ASSOC + HC_IBSS_START */ - DPRINTF(sc, WPI_DEBUG_STATE, "rxon chan %d flags %x\n", sc->rxon.chan, sc->rxon.flags); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:04:57 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 0500E369; Sun, 15 Mar 2015 21:04:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAE506CF; Sun, 15 Mar 2015 21:04: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 t2FL4uu1079831; Sun, 15 Mar 2015 21:04:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FL4uq8079828; Sun, 15 Mar 2015 21:04:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152104.t2FL4uq8079828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280093 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:04:57 -0000 Author: adrian Date: Sun Mar 15 21:04:55 2015 New Revision: 280093 URL: https://svnweb.freebsd.org/changeset/base/280093 Log: * Add new debug category * Refactor out / restructure / extend debugging information PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpi_debug.h head/sys/dev/wpi/if_wpireg.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:03:48 2015 (r280092) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:04:55 2015 (r280093) @@ -184,6 +184,9 @@ static void wpi_tx_done(struct wpi_softc static void wpi_cmd_done(struct wpi_softc *, struct wpi_rx_desc *); static void wpi_notif_intr(struct wpi_softc *); static void wpi_wakeup_intr(struct wpi_softc *); +#ifdef WPI_DEBUG +static void wpi_debug_registers(struct wpi_softc *); +#endif static void wpi_fatal_intr(struct wpi_softc *); static void wpi_intr(void *); static int wpi_cmd2(struct wpi_softc *, struct wpi_buf *); @@ -2199,6 +2202,69 @@ wpi_wakeup_intr(struct wpi_softc *sc) } /* + * This function prints firmware registers + */ +#ifdef WPI_DEBUG +static void +wpi_debug_registers(struct wpi_softc *sc) +{ +#define COUNTOF(array) (sizeof(array) / sizeof(array[0])) + int i; + static const uint32_t csr_tbl[] = { + WPI_HW_IF_CONFIG, + WPI_INT, + WPI_INT_MASK, + WPI_FH_INT, + WPI_GPIO_IN, + WPI_RESET, + WPI_GP_CNTRL, + WPI_EEPROM, + WPI_EEPROM_GP, + WPI_GIO, + WPI_UCODE_GP1, + WPI_UCODE_GP2, + WPI_GIO_CHICKEN, + WPI_ANA_PLL, + WPI_DBG_HPET_MEM, + }; + static const uint32_t prph_tbl[] = { + WPI_APMG_CLK_CTRL, + WPI_APMG_PS, + WPI_APMG_PCI_STT, + WPI_APMG_RFKILL, + }; + + DPRINTF(sc, WPI_DEBUG_REGISTER,"%s","\n"); + + for (i = 0; i < COUNTOF(csr_tbl); i++) { + DPRINTF(sc, WPI_DEBUG_REGISTER, " %-18s: 0x%08x ", + wpi_get_csr_string(csr_tbl[i]), WPI_READ(sc, csr_tbl[i])); + + if ((i + 1) % 2 == 0) + DPRINTF(sc, WPI_DEBUG_REGISTER, "\n"); + } + DPRINTF(sc, WPI_DEBUG_REGISTER, "\n\n"); + + if (wpi_nic_lock(sc) == 0) { + for (i = 0; i < COUNTOF(prph_tbl); i++) { + DPRINTF(sc, WPI_DEBUG_REGISTER, " %-18s: 0x%08x ", + wpi_get_prph_string(prph_tbl[i]), + wpi_prph_read(sc, prph_tbl[i])); + + if ((i + 1) % 2 == 0) + DPRINTF(sc, WPI_DEBUG_REGISTER, "\n"); + } + DPRINTF(sc, WPI_DEBUG_REGISTER, "\n"); + wpi_nic_unlock(sc); + } else { + DPRINTF(sc, WPI_DEBUG_REGISTER, + "Cannot access internal registers.\n"); + } +#undef COUNTOF +} +#endif + +/* * Dump the error log of the firmware when a firmware panic occurs. Although * we can't debug the firmware because it is neither open source nor free, it * can help us to identify certain classes of problems. @@ -2298,6 +2364,9 @@ wpi_intr(void *arg) struct ieee80211com *ic = ifp->if_l2com; device_printf(sc->sc_dev, "fatal firmware error\n"); +#ifdef WPI_DEBUG + wpi_debug_registers(sc); +#endif wpi_fatal_intr(sc); DPRINTF(sc, WPI_DEBUG_HW, "(%s)\n", (r1 & WPI_INT_SW_ERR) ? "(Software Error)" : Modified: head/sys/dev/wpi/if_wpi_debug.h ============================================================================== --- head/sys/dev/wpi/if_wpi_debug.h Sun Mar 15 21:03:48 2015 (r280092) +++ head/sys/dev/wpi/if_wpi_debug.h Sun Mar 15 21:04:55 2015 (r280093) @@ -41,6 +41,7 @@ enum { WPI_DEBUG_EEPROM = 0x00008000, /* EEPROM info */ WPI_DEBUG_KEY = 0x00010000, /* node key management */ WPI_DEBUG_EDCA = 0x00020000, /* WME info */ + WPI_DEBUG_REGISTER = 0x00080000, /* print chipset register */ WPI_DEBUG_ANY = 0xffffffff }; @@ -54,36 +55,38 @@ enum { #define TRACE_STR_END "->%s: end\n" #define TRACE_STR_END_ERR "->%s: end in error\n" +#define WPI_DESC(x) case x: return #x + static const char *wpi_cmd_str(int cmd) { switch (cmd) { - /* Notifications */ - case WPI_UC_READY: return "UC_READY"; - case WPI_RX_DONE: return "RX_DONE"; - case WPI_START_SCAN: return "START_SCAN"; - case WPI_SCAN_RESULTS: return "SCAN_RESULTS"; - case WPI_STOP_SCAN: return "STOP_SCAN"; - case WPI_BEACON_SENT: return "BEACON_SENT"; - case WPI_RX_STATISTICS: return "RX_STATS"; - case WPI_BEACON_STATISTICS: return "BEACON_STATS"; - case WPI_STATE_CHANGED: return "STATE_CHANGED"; - case WPI_BEACON_MISSED: return "BEACON_MISSED"; - - /* Command notifications */ - case WPI_CMD_RXON: return "WPI_CMD_RXON"; - case WPI_CMD_RXON_ASSOC: return "WPI_CMD_RXON_ASSOC"; - case WPI_CMD_EDCA_PARAMS: return "WPI_CMD_EDCA_PARAMS"; - case WPI_CMD_TIMING: return "WPI_CMD_TIMING"; - case WPI_CMD_ADD_NODE: return "WPI_CMD_ADD_NODE"; - case WPI_CMD_DEL_NODE: return "WPI_CMD_DEL_NODE"; - case WPI_CMD_TX_DATA: return "WPI_CMD_TX_DATA"; - case WPI_CMD_MRR_SETUP: return "WPI_CMD_MRR_SETUP"; - case WPI_CMD_SET_LED: return "WPI_CMD_SET_LED"; - case WPI_CMD_SET_POWER_MODE: return "WPI_CMD_SET_POWER_MODE"; - case WPI_CMD_SCAN: return "WPI_CMD_SCAN"; - case WPI_CMD_SET_BEACON: return "WPI_CMD_SET_BEACON"; - case WPI_CMD_TXPOWER: return "WPI_CMD_TXPOWER"; - case WPI_CMD_BT_COEX: return "WPI_CMD_BT_COEX"; + /* Notifications. */ + WPI_DESC(WPI_UC_READY); + WPI_DESC(WPI_RX_DONE); + WPI_DESC(WPI_START_SCAN); + WPI_DESC(WPI_SCAN_RESULTS); + WPI_DESC(WPI_STOP_SCAN); + WPI_DESC(WPI_BEACON_SENT); + WPI_DESC(WPI_RX_STATISTICS); + WPI_DESC(WPI_BEACON_STATISTICS); + WPI_DESC(WPI_STATE_CHANGED); + WPI_DESC(WPI_BEACON_MISSED); + + /* Command notifications. */ + WPI_DESC(WPI_CMD_RXON); + WPI_DESC(WPI_CMD_RXON_ASSOC); + WPI_DESC(WPI_CMD_EDCA_PARAMS); + WPI_DESC(WPI_CMD_TIMING); + WPI_DESC(WPI_CMD_ADD_NODE); + WPI_DESC(WPI_CMD_DEL_NODE); + WPI_DESC(WPI_CMD_TX_DATA); + WPI_DESC(WPI_CMD_MRR_SETUP); + WPI_DESC(WPI_CMD_SET_LED); + WPI_DESC(WPI_CMD_SET_POWER_MODE); + WPI_DESC(WPI_CMD_SCAN); + WPI_DESC(WPI_CMD_SET_BEACON); + WPI_DESC(WPI_CMD_TXPOWER); + WPI_DESC(WPI_CMD_BT_COEX); default: KASSERT(1, ("Unknown Command: %d\n", cmd)); @@ -91,6 +94,46 @@ static const char *wpi_cmd_str(int cmd) } } +/* + * Translate CSR code to string + */ +static const char *wpi_get_csr_string(int csr) +{ + switch (csr) { + WPI_DESC(WPI_HW_IF_CONFIG); + WPI_DESC(WPI_INT); + WPI_DESC(WPI_INT_MASK); + WPI_DESC(WPI_FH_INT); + WPI_DESC(WPI_GPIO_IN); + WPI_DESC(WPI_RESET); + WPI_DESC(WPI_GP_CNTRL); + WPI_DESC(WPI_EEPROM); + WPI_DESC(WPI_EEPROM_GP); + WPI_DESC(WPI_GIO); + WPI_DESC(WPI_UCODE_GP1); + WPI_DESC(WPI_UCODE_GP2); + WPI_DESC(WPI_GIO_CHICKEN); + WPI_DESC(WPI_ANA_PLL); + WPI_DESC(WPI_DBG_HPET_MEM); + default: + KASSERT(1, ("Unknown CSR: %d\n", csr)); + return "UNKNOWN CSR"; + } +} + +static const char *wpi_get_prph_string(int prph) +{ + switch (prph) { + WPI_DESC(WPI_APMG_CLK_CTRL); + WPI_DESC(WPI_APMG_PS); + WPI_DESC(WPI_APMG_PCI_STT); + WPI_DESC(WPI_APMG_RFKILL); + default: + KASSERT(1, ("Unknown register: %d\n", prph)); + return "UNKNOWN PRPH"; + } +} + #else #define DPRINTF(sc, m, ...) do { (void) sc; } while (0) #endif Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Sun Mar 15 21:03:48 2015 (r280092) +++ head/sys/dev/wpi/if_wpireg.h Sun Mar 15 21:04:55 2015 (r280093) @@ -97,6 +97,7 @@ #define WPI_ALM_SCHED_TXF5MF 0x2e20 #define WPI_ALM_SCHED_SBYPASS_MODE1 0x2e2c #define WPI_ALM_SCHED_SBYPASS_MODE2 0x2e30 +#define WPI_APMG_CLK_CTRL 0x3000 #define WPI_APMG_CLK_EN 0x3004 #define WPI_APMG_CLK_DIS 0x3008 #define WPI_APMG_PS 0x300c From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:06:00 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 BA3A24D0; Sun, 15 Mar 2015 21:06:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C12F6DF; Sun, 15 Mar 2015 21:06:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FL607C080056; Sun, 15 Mar 2015 21:06:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FL60dg080053; Sun, 15 Mar 2015 21:06:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152106.t2FL60dg080053@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280094 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:06:00 -0000 Author: adrian Date: Sun Mar 15 21:05:59 2015 New Revision: 280094 URL: https://svnweb.freebsd.org/changeset/base/280094 Log: Add WPI_DEBUG_NODE + some debugging. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpi_debug.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:04:55 2015 (r280093) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:05:59 2015 (r280094) @@ -3173,6 +3173,9 @@ wpi_add_node(struct wpi_softc *sc, struc node.action = htole32(WPI_ACTION_SET_RATE); node.antenna = WPI_ANTENNA_BOTH; + DPRINTF(sc, WPI_DEBUG_NODE, "%s: adding node %d (%s)\n", __func__, + wn->id, ether_sprintf(ni->ni_macaddr)); + error = wpi_cmd(sc, WPI_CMD_ADD_NODE, &node, sizeof node, 1); if (error != 0) { device_printf(sc->sc_dev, @@ -3213,6 +3216,8 @@ wpi_add_broadcast_node(struct wpi_softc node.action = htole32(WPI_ACTION_SET_RATE); node.antenna = WPI_ANTENNA_BOTH; + DPRINTF(sc, WPI_DEBUG_NODE, "%s: adding broadcast node\n", __func__); + return wpi_cmd(sc, WPI_CMD_ADD_NODE, &node, sizeof node, async); } @@ -3279,6 +3284,9 @@ wpi_del_node(struct wpi_softc *sc, struc IEEE80211_ADDR_COPY(node.macaddr, ni->ni_macaddr); node.count = 1; + DPRINTF(sc, WPI_DEBUG_NODE, "%s: deleting node %d (%s)\n", __func__, + wn->id, ether_sprintf(ni->ni_macaddr)); + error = wpi_cmd(sc, WPI_CMD_DEL_NODE, &node, sizeof node, 1); if (error != 0) { device_printf(sc->sc_dev, Modified: head/sys/dev/wpi/if_wpi_debug.h ============================================================================== --- head/sys/dev/wpi/if_wpi_debug.h Sun Mar 15 21:04:55 2015 (r280093) +++ head/sys/dev/wpi/if_wpi_debug.h Sun Mar 15 21:05:59 2015 (r280094) @@ -39,8 +39,9 @@ enum { WPI_DEBUG_TRACE = 0x00002000, /* Print begin and start driver function */ WPI_DEBUG_PWRSAVE = 0x00004000, /* Power save operations */ WPI_DEBUG_EEPROM = 0x00008000, /* EEPROM info */ - WPI_DEBUG_KEY = 0x00010000, /* node key management */ - WPI_DEBUG_EDCA = 0x00020000, /* WME info */ + WPI_DEBUG_NODE = 0x00010000, /* node addition/removal */ + WPI_DEBUG_KEY = 0x00020000, /* node key management */ + WPI_DEBUG_EDCA = 0x00040000, /* WME info */ WPI_DEBUG_REGISTER = 0x00080000, /* print chipset register */ WPI_DEBUG_ANY = 0xffffffff }; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:06: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 F1BCD613; Sun, 15 Mar 2015 21:06: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 DDB3A6EB; Sun, 15 Mar 2015 21:06: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 t2FL6amQ080194; Sun, 15 Mar 2015 21:06:36 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FL6a0P080193; Sun, 15 Mar 2015 21:06:36 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152106.t2FL6a0P080193@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280095 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:06:37 -0000 Author: adrian Date: Sun Mar 15 21:06:36 2015 New Revision: 280095 URL: https://svnweb.freebsd.org/changeset/base/280095 Log: Refactor wpi_ioctl(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:05:59 2015 (r280094) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:06:36 2015 (r280095) @@ -2964,30 +2964,23 @@ wpi_ioctl(struct ifnet *ifp, u_long cmd, struct ieee80211com *ic = ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); struct ifreq *ifr = (struct ifreq *) data; - int error = 0, startall = 0, stop = 0; + int error = 0; switch (cmd) { case SIOCGIFADDR: error = ether_ioctl(ifp, cmd, data); break; case SIOCSIFFLAGS: - WPI_LOCK(sc); if (ifp->if_flags & IFF_UP) { - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - wpi_init_locked(sc); - if (WPI_READ(sc, WPI_GP_CNTRL) & - WPI_GP_CNTRL_RFKILL) - startall = 1; - else - stop = 1; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + wpi_init(sc); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 && + vap != NULL) + ieee80211_stop(vap); } - } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) - wpi_stop_locked(sc); - WPI_UNLOCK(sc); - if (startall) - ieee80211_start_all(ic); - else if (vap != NULL && stop) - ieee80211_stop(vap); + } else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + wpi_stop(sc); break; case SIOCGIFMEDIA: error = ifmedia_ioctl(ifp, ifr, &ic->ic_media, cmd); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:07:44 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 481DD7FD; Sun, 15 Mar 2015 21:07:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA8475C; Sun, 15 Mar 2015 21:07:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FL7hZ2080385; Sun, 15 Mar 2015 21:07:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FL7hn8080384; Sun, 15 Mar 2015 21:07:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152107.t2FL7hn8080384@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280096 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:07:44 -0000 Author: adrian Date: Sun Mar 15 21:07:43 2015 New Revision: 280096 URL: https://svnweb.freebsd.org/changeset/base/280096 Log: Merge wpi_init() and wpi_init_locked(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:06:36 2015 (r280095) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:07:43 2015 (r280096) @@ -263,7 +263,6 @@ static int wpi_hw_init(struct wpi_softc static void wpi_hw_stop(struct wpi_softc *); static void wpi_radio_on(void *, int); static void wpi_radio_off(void *, int); -static void wpi_init_locked(struct wpi_softc *); static void wpi_init(void *); static void wpi_stop_locked(struct wpi_softc *); static void wpi_stop(struct wpi_softc *); @@ -2972,13 +2971,11 @@ wpi_ioctl(struct ifnet *ifp, u_long cmd, break; case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - wpi_init(sc); + wpi_init(sc); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 && - vap != NULL) - ieee80211_stop(vap); - } + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 && + vap != NULL) + ieee80211_stop(vap); } else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) wpi_stop(sc); break; @@ -5175,14 +5172,19 @@ wpi_radio_off(void *arg0, int pending) } static void -wpi_init_locked(struct wpi_softc *sc) +wpi_init(void *arg) { + struct wpi_softc *sc = arg; struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; int error; + WPI_LOCK(sc); + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); - WPI_LOCK_ASSERT(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + goto end; /* Check that the radio is not disabled by hardware switch. */ if (!(WPI_READ(sc, WPI_GP_CNTRL) & WPI_GP_CNTRL_RFKILL)) { @@ -5190,7 +5192,7 @@ wpi_init_locked(struct wpi_softc *sc) "RF switch: radio disabled (%s)\n", __func__); callout_reset(&sc->watchdog_rfkill, hz, wpi_watchdog_rfkill, sc); - return; + goto end; } /* Read firmware images from the filesystem. */ @@ -5227,25 +5229,15 @@ wpi_init_locked(struct wpi_softc *sc) DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); - return; + WPI_UNLOCK(sc); -fail: wpi_stop_locked(sc); - DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); -} + ieee80211_start_all(ic); -static void -wpi_init(void *arg) -{ - struct wpi_softc *sc = arg; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; + return; - WPI_LOCK(sc); - wpi_init_locked(sc); +fail: wpi_stop_locked(sc); +end: DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); WPI_UNLOCK(sc); - - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - ieee80211_start_all(ic); } static void From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:08:25 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 BB5C8942; Sun, 15 Mar 2015 21:08:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D483765; Sun, 15 Mar 2015 21:08:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FL8P3u080542; Sun, 15 Mar 2015 21:08:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FL8PEs080541; Sun, 15 Mar 2015 21:08:25 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152108.t2FL8PEs080541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280097 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:08:25 -0000 Author: adrian Date: Sun Mar 15 21:08:24 2015 New Revision: 280097 URL: https://svnweb.freebsd.org/changeset/base/280097 Log: Acquire ifq lock when checking / modifying IFF_DRV_OACTIVE flag. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:07:43 2015 (r280096) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:08:24 2015 (r280097) @@ -1967,11 +1967,14 @@ wpi_tx_done(struct wpi_softc *sc, struct sc->sc_tx_timer = 0; if (--ring->queued < WPI_TX_RING_LOMARK) { sc->qfullmsk &= ~(1 << ring->qid); + IF_LOCK(&ifp->if_snd); if (sc->qfullmsk == 0 && (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); ieee80211_runtask(ic, &sc->sc_start_task); - } + } else + IF_UNLOCK(&ifp->if_snd); } DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); @@ -2871,13 +2874,19 @@ wpi_start_locked(struct ifnet *ifp) DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); + IF_LOCK(&ifp->if_snd); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - (ifp->if_drv_flags & IFF_DRV_OACTIVE)) + (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { + IF_UNLOCK(&ifp->if_snd); return; + } + IF_UNLOCK(&ifp->if_snd); for (;;) { if (sc->qfullmsk != 0) { + IF_LOCK(&ifp->if_snd); ifp->if_drv_flags |= IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); break; } IFQ_DRV_DEQUEUE(&ifp->if_snd, m); @@ -5222,8 +5231,10 @@ wpi_init(void *arg) goto fail; } + IF_LOCK(&ifp->if_snd); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ifp->if_drv_flags |= IFF_DRV_RUNNING; + IF_UNLOCK(&ifp->if_snd); callout_reset(&sc->watchdog_to, hz, wpi_watchdog, sc); @@ -5255,7 +5266,10 @@ wpi_stop_locked(struct wpi_softc *sc) sc->sc_tx_timer = 0; callout_stop(&sc->watchdog_to); callout_stop(&sc->calib_to); + + IF_LOCK(&ifp->if_snd); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + IF_UNLOCK(&ifp->if_snd); /* Power OFF hardware. */ wpi_hw_stop(sc); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:08:54 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 ECEEBAB3; Sun, 15 Mar 2015 21:08:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8A5E773; Sun, 15 Mar 2015 21:08:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FL8saX080652; Sun, 15 Mar 2015 21:08:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FL8s5P080651; Sun, 15 Mar 2015 21:08:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152108.t2FL8s5P080651@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:08:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280098 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:08:55 -0000 Author: adrian Date: Sun Mar 15 21:08:54 2015 New Revision: 280098 URL: https://svnweb.freebsd.org/changeset/base/280098 Log: Do some cleanup before device startup. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:08:24 2015 (r280097) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:08:54 2015 (r280098) @@ -4881,6 +4881,10 @@ wpi_apm_init(struct wpi_softc *sc) /* Set FH wait threshold to max (HW bug under stress workaround). */ WPI_SETBITS(sc, WPI_DBG_HPET_MEM, 0xffff0000); + /* Cleanup. */ + wpi_prph_write(sc, WPI_APMG_CLK_DIS, 0x00000400); + wpi_prph_clrbits(sc, WPI_APMG_PS, 0x00000E00); + /* Retrieve PCIe Active State Power Management (ASPM). */ reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + 0x10, 1); /* Workaround for HW instability in PCIe L0->L0s->L1 transition. */ @@ -4903,8 +4907,6 @@ wpi_apm_init(struct wpi_softc *sc) DELAY(20); /* Disable L1-Active. */ wpi_prph_setbits(sc, WPI_APMG_PCI_STT, WPI_APMG_PCI_STT_L1A_DIS); - /* ??? */ - wpi_prph_clrbits(sc, WPI_APMG_PS, 0x00000E00); wpi_nic_unlock(sc); return 0; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:09:30 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 53CC5BF8; Sun, 15 Mar 2015 21:09: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 3F8F877E; Sun, 15 Mar 2015 21:09: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 t2FL9USA080786; Sun, 15 Mar 2015 21:09:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FL9Uw2080785; Sun, 15 Mar 2015 21:09:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152109.t2FL9Uw2080785@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:09:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280099 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:09:30 -0000 Author: adrian Date: Sun Mar 15 21:09:29 2015 New Revision: 280099 URL: https://svnweb.freebsd.org/changeset/base/280099 Log: Disable powersave in IBSS mode (packet loss > 90%.) PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:08:54 2015 (r280098) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:09:29 2015 (r280099) @@ -4311,7 +4311,8 @@ wpi_run(struct wpi_softc *sc, struct iee callout_reset(&sc->calib_to, 60*hz, wpi_calib_timeout, sc); /* Enable power-saving mode if requested by user. */ - if (vap->iv_flags & IEEE80211_F_PMGTON) + if ((vap->iv_flags & IEEE80211_F_PMGTON) && + vap->iv_opmode != IEEE80211_M_IBSS) (void)wpi_set_pslevel(sc, 0, 3, 1); else (void)wpi_set_pslevel(sc, 0, 0, 1); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:11:01 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 2EF41D98; Sun, 15 Mar 2015 21:11:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AD50836; Sun, 15 Mar 2015 21:11:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLB04s082054; Sun, 15 Mar 2015 21:11:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLB0lW082053; Sun, 15 Mar 2015 21:11:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152111.t2FLB0lW082053@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:11:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280100 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:11:01 -0000 Author: adrian Date: Sun Mar 15 21:11:00 2015 New Revision: 280100 URL: https://svnweb.freebsd.org/changeset/base/280100 Log: Add more KASSERTs. (Committer note: these checks will have to be re-established in a future commit as /well/ as having the KASSERTs.) PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:09:29 2015 (r280099) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:11:00 2015 (r280100) @@ -1931,6 +1931,7 @@ wpi_tx_done(struct wpi_softc *sc, struct int status = le32toh(stat->status); KASSERT(data->ni != NULL, ("no node")); + KASSERT(data->m != NULL, ("no mbuf")); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); @@ -3245,10 +3246,10 @@ wpi_add_ibss_node(struct wpi_softc *sc, struct wpi_node *wn = WPI_NODE(ni); int error; - DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); + KASSERT(wn->id == WPI_ID_UNDEFINED, + ("the node %d was added before", wn->id)); - if (wn->id != WPI_ID_UNDEFINED) - return EINVAL; + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); if ((wn->id = wpi_add_node_entry_adhoc(sc)) == WPI_ID_UNDEFINED) { device_printf(sc->sc_dev, "%s: h/w table is full\n", __func__); @@ -3271,13 +3272,9 @@ wpi_del_node(struct wpi_softc *sc, struc struct wpi_cmd_del_node node; int error; - DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); + KASSERT(wn->id != WPI_ID_UNDEFINED, ("undefined node id passed")); - if (wn->id == WPI_ID_UNDEFINED) { - device_printf(sc->sc_dev, "%s: undefined node id passed\n", - __func__); - return; - } + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); memset(&node, 0, sizeof node); IEEE80211_ADDR_COPY(node.macaddr, ni->ni_macaddr); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:12:06 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 9A88CF05; Sun, 15 Mar 2015 21:12:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D9C384F; Sun, 15 Mar 2015 21:12:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLC6VK084745; Sun, 15 Mar 2015 21:12:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLC6C6084744; Sun, 15 Mar 2015 21:12:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152112.t2FLC6C6084744@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280101 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:12:06 -0000 Author: adrian Date: Sun Mar 15 21:12:05 2015 New Revision: 280101 URL: https://svnweb.freebsd.org/changeset/base/280101 Log: Fix some printfs(); add some debugging. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:11:00 2015 (r280100) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:12:05 2015 (r280101) @@ -1172,8 +1172,10 @@ wpi_alloc_tx_ring(struct wpi_softc *sc, * to allocate commands space for other rings. * XXX Do we really need to allocate descriptors for other rings? */ - if (qid > WPI_CMD_QUEUE_NUM) + if (qid > WPI_CMD_QUEUE_NUM) { + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); return 0; + } size = WPI_TX_RING_COUNT * sizeof (struct wpi_tx_cmd); error = wpi_dma_contig_alloc(sc, &ring->cmd_dma, (void **)&ring->cmd, @@ -1991,8 +1993,8 @@ wpi_cmd_done(struct wpi_softc *sc, struc struct wpi_tx_ring *ring = &sc->txq[WPI_CMD_QUEUE_NUM]; struct wpi_tx_data *data; - DPRINTF(sc, WPI_DEBUG_CMD, "cmd notification qid=%x idx=%d flags=%x " - "type=%s len=%d\n", desc->qid, desc->idx, + DPRINTF(sc, WPI_DEBUG_CMD, "cmd notification qid %x idx %d flags %x " + "type %s len %d\n", desc->qid, desc->idx, desc->flags, wpi_cmd_str(desc->type), le32toh(desc->len)); @@ -3027,8 +3029,8 @@ wpi_cmd(struct wpi_softc *sc, int code, if (async == 0) WPI_LOCK_ASSERT(sc); - DPRINTF(sc, WPI_DEBUG_CMD, "wpi_cmd %s size %zu async %d\n", - wpi_cmd_str(code), size, async); + DPRINTF(sc, WPI_DEBUG_CMD, "%s: cmd %s size %zu async %d\n", + __func__, wpi_cmd_str(code), size, async); desc = &ring->desc[ring->cur]; data = &ring->data[ring->cur]; @@ -5343,7 +5345,7 @@ wpi_set_channel(struct ieee80211com *ic) } if ((error = wpi_send_rxon(sc, 0, 0)) != 0) device_printf(sc->sc_dev, - "%s: error %d settting channel\n", __func__, + "%s: error %d setting channel\n", __func__, error); } WPI_UNLOCK(sc); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:12:58 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 97865E9; Sun, 15 Mar 2015 21:12: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 6A2C885B; Sun, 15 Mar 2015 21:12: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 t2FLCwBe084902; Sun, 15 Mar 2015 21:12:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLCwr9084901; Sun, 15 Mar 2015 21:12:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152112.t2FLCwr9084901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280102 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:12:58 -0000 Author: adrian Date: Sun Mar 15 21:12:57 2015 New Revision: 280102 URL: https://svnweb.freebsd.org/changeset/base/280102 Log: Rearrange checks in wpi_send_rxon(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:12:05 2015 (r280101) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:12:57 2015 (r280102) @@ -3648,32 +3648,32 @@ wpi_send_rxon(struct wpi_softc *sc, int error = wpi_cmd(sc, WPI_CMD_RXON_ASSOC, &rxon_assoc, sizeof (struct wpi_assoc), async); + if (error != 0) { + device_printf(sc->sc_dev, + "RXON_ASSOC command failed, error %d\n", error); + return error; + } } else { - if (async) + if (async) { WPI_NT_LOCK(sc); - - error = wpi_cmd(sc, WPI_CMD_RXON, &sc->rxon, - sizeof (struct wpi_rxon), async); - - wpi_clear_node_table(sc); - - if (async) + error = wpi_cmd(sc, WPI_CMD_RXON, &sc->rxon, + sizeof (struct wpi_rxon), async); + if (error == 0) + wpi_clear_node_table(sc); WPI_NT_UNLOCK(sc); - } - if (error != 0) { - device_printf(sc->sc_dev, "RXON command failed, error %d\n", - error); - return error; - } + } else { + error = wpi_cmd(sc, WPI_CMD_RXON, &sc->rxon, + sizeof (struct wpi_rxon), async); + if (error == 0) + wpi_clear_node_table(sc); + } - /* Configuration has changed, set Tx power accordingly. */ - if ((error = wpi_set_txpower(sc, async)) != 0) { - device_printf(sc->sc_dev, - "%s: could not set TX power, error %d\n", __func__, error); - return error; - } + if (error != 0) { + device_printf(sc->sc_dev, + "RXON command failed, error %d\n", error); + return error; + } - if (!(sc->rxon.filter & htole32(WPI_FILTER_BSS))) { /* Add broadcast node. */ error = wpi_add_broadcast_node(sc, async); if (error != 0) { @@ -3683,6 +3683,13 @@ wpi_send_rxon(struct wpi_softc *sc, int } } + /* Configuration has changed, set Tx power accordingly. */ + if ((error = wpi_set_txpower(sc, async)) != 0) { + device_printf(sc->sc_dev, + "%s: could not set TX power, error %d\n", __func__, error); + return error; + } + return 0; } From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:17: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 BC22E27C; Sun, 15 Mar 2015 21:17: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 A817B884; Sun, 15 Mar 2015 21:17: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 t2FLH40M085491; Sun, 15 Mar 2015 21:17:04 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLH4NU085490; Sun, 15 Mar 2015 21:17:04 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152117.t2FLH4NU085490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:17:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280103 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:17:04 -0000 Author: adrian Date: Sun Mar 15 21:17:03 2015 New Revision: 280103 URL: https://svnweb.freebsd.org/changeset/base/280103 Log: Minor optimisation in wpi_limit_dwell() PR: kenr/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:12:57 2015 (r280102) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:17:03 2015 (r280103) @@ -3810,14 +3810,12 @@ static uint16_t wpi_limit_dwell(struct wpi_softc *sc, uint16_t dwell_time) { struct ieee80211com *ic = sc->sc_ifp->if_l2com; - struct ieee80211vap *vap = NULL; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); int bintval = 0; /* bintval is in TU (1.024mS) */ - if (! TAILQ_EMPTY(&ic->ic_vaps)) { - vap = TAILQ_FIRST(&ic->ic_vaps); + if (vap != NULL) bintval = vap->iv_bss->ni_intval; - } /* * If it's non-zero, we should calculate the minimum of From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:17:59 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 0A9CD3D7; Sun, 15 Mar 2015 21:17:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA9DC893; Sun, 15 Mar 2015 21:17: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 t2FLHwIS085642; Sun, 15 Mar 2015 21:17:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLHwIg085641; Sun, 15 Mar 2015 21:17:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152117.t2FLHwIg085641@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280104 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:17:59 -0000 Author: adrian Date: Sun Mar 15 21:17:58 2015 New Revision: 280104 URL: https://svnweb.freebsd.org/changeset/base/280104 Log: Merge wpi_start() and wpi_start_locked(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:17:03 2015 (r280103) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:17:58 2015 (r280104) @@ -198,7 +198,6 @@ static int wpi_tx_data_raw(struct wpi_so static int wpi_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); static void wpi_start(struct ifnet *); -static void wpi_start_locked(struct ifnet *); static void wpi_start_task(void *, int); static void wpi_watchdog_rfkill(void *); static void wpi_watchdog(void *); @@ -2860,21 +2859,9 @@ static void wpi_start(struct ifnet *ifp) { struct wpi_softc *sc = ifp->if_softc; - - WPI_LOCK(sc); - wpi_start_locked(ifp); - WPI_UNLOCK(sc); -} - -static void -wpi_start_locked(struct ifnet *ifp) -{ - struct wpi_softc *sc = ifp->if_softc; struct ieee80211_node *ni; struct mbuf *m; - WPI_LOCK_ASSERT(sc); - DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); IF_LOCK(&ifp->if_snd); @@ -2885,6 +2872,7 @@ wpi_start_locked(struct ifnet *ifp) } IF_UNLOCK(&ifp->if_snd); + WPI_LOCK(sc); for (;;) { if (sc->qfullmsk != 0) { IF_LOCK(&ifp->if_snd); @@ -2903,6 +2891,7 @@ wpi_start_locked(struct ifnet *ifp) if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } } + WPI_UNLOCK(sc); DPRINTF(sc, WPI_DEBUG_XMIT, "%s: done\n", __func__); } From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:18:19 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 63D5E512; Sun, 15 Mar 2015 21:18:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4589B898; Sun, 15 Mar 2015 21:18:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLIJJO085763; Sun, 15 Mar 2015 21:18:19 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLII17085761; Sun, 15 Mar 2015 21:18:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152118.t2FLII17085761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:18:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280105 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:18:19 -0000 Author: adrian Date: Sun Mar 15 21:18:18 2015 New Revision: 280105 URL: https://svnweb.freebsd.org/changeset/base/280105 Log: Add experimental HOSTAP support. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:17:58 2015 (r280104) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:18:18 2015 (r280105) @@ -447,6 +447,7 @@ wpi_attach(device_t dev) ic->ic_caps = IEEE80211_C_STA /* station mode supported */ | IEEE80211_C_IBSS /* IBSS mode supported */ + | IEEE80211_C_HOSTAP /* Host access point mode */ | IEEE80211_C_MONITOR /* monitor mode supported */ | IEEE80211_C_AHDEMO /* adhoc demo mode */ | IEEE80211_C_BGSCAN /* capable of bg scanning */ @@ -454,9 +455,6 @@ wpi_attach(device_t dev) | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_WPA /* 802.11i */ | IEEE80211_C_SHPREAMBLE /* short preamble supported */ -#if 0 - | IEEE80211_C_HOSTAP /* Host access point mode */ -#endif | IEEE80211_C_WME /* 802.11e */ | IEEE80211_C_PMGT /* Station-side power mgmt */ ; @@ -624,7 +622,7 @@ wpi_vap_create(struct ieee80211com *ic, vap = &wvp->wv_vap; ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); - if (opmode == IEEE80211_M_IBSS) { + if (opmode == IEEE80211_M_IBSS || opmode == IEEE80211_M_HOSTAP) { WPI_VAP_LOCK_INIT(wvp); wpi_init_beacon(wvp); } @@ -635,6 +633,7 @@ wpi_vap_create(struct ieee80211com *ic, wvp->wv_newstate = vap->iv_newstate; vap->iv_newstate = wpi_newstate; vap->iv_update_beacon = wpi_update_beacon; + vap->iv_max_aid = WPI_ID_IBSS_MAX - WPI_ID_IBSS_MIN + 1; ieee80211_ratectl_init(vap); /* Complete setup. */ @@ -654,7 +653,7 @@ wpi_vap_delete(struct ieee80211vap *vap) ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); - if (opmode == IEEE80211_M_IBSS) { + if (opmode == IEEE80211_M_IBSS || opmode == IEEE80211_M_HOSTAP) { if (bcn->m != NULL) m_freem(bcn->m); @@ -1382,6 +1381,10 @@ wpi_eeprom_channel_flags(struct wpi_eepr nflags |= IEEE80211_CHAN_NOADHOC; } + /* XXX HOSTAP uses WPI_MODE_IBSS */ + if (nflags & IEEE80211_CHAN_NOADHOC) + nflags |= IEEE80211_CHAN_NOHOSTAP; + return nflags; } @@ -1650,9 +1653,8 @@ wpi_newstate(struct ieee80211vap *vap, e WPI_LOCK(sc); switch (nstate) { case IEEE80211_S_SCAN: - if ((vap->iv_opmode == IEEE80211_M_IBSS || - vap->iv_opmode == IEEE80211_M_AHDEMO) && - (sc->rxon.filter & htole32(WPI_FILTER_BSS))) { + if ((sc->rxon.filter & htole32(WPI_FILTER_BSS)) && + vap->iv_opmode != IEEE80211_M_STA) { sc->rxon.filter &= ~htole32(WPI_FILTER_BSS); if ((error = wpi_send_rxon(sc, 0, 1)) != 0) { device_printf(sc->sc_dev, @@ -3321,9 +3323,13 @@ static void wpi_set_promisc(struct wpi_softc *sc) { struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); uint32_t promisc_filter; - promisc_filter = WPI_FILTER_PROMISC | WPI_FILTER_CTL; + promisc_filter = WPI_FILTER_CTL; + if (vap != NULL && vap->iv_opmode != IEEE80211_M_HOSTAP) + promisc_filter |= WPI_FILTER_PROMISC; if (ifp->if_flags & IFF_PROMISC) sc->rxon.filter |= htole32(promisc_filter); @@ -3730,9 +3736,13 @@ wpi_config(struct wpi_softc *sc) sc->rxon.mode = WPI_MODE_IBSS; sc->rxon.filter |= WPI_FILTER_BEACON; break; - /* XXX workaround for passive channels selection */ - case IEEE80211_M_AHDEMO: case IEEE80211_M_HOSTAP: + /* XXX workaround for beaconing */ + sc->rxon.mode = WPI_MODE_IBSS; + sc->rxon.filter |= WPI_FILTER_ASSOC | WPI_FILTER_PROMISC; + break; + case IEEE80211_M_AHDEMO: + /* XXX workaround for passive channels selection */ sc->rxon.mode = WPI_MODE_HOSTAP; break; case IEEE80211_M_MONITOR: @@ -4275,7 +4285,8 @@ wpi_run(struct wpi_softc *sc, struct iee return error; } - if (vap->iv_opmode == IEEE80211_M_IBSS) { + if (vap->iv_opmode == IEEE80211_M_IBSS || + vap->iv_opmode == IEEE80211_M_HOSTAP) { if ((error = wpi_setup_beacon(sc, ni)) != 0) { device_printf(sc->sc_dev, "%s: could not setup beacon, error %d\n", __func__, @@ -4533,6 +4544,7 @@ wpi_process_key(struct ieee80211vap *vap case IEEE80211_M_IBSS: case IEEE80211_M_AHDEMO: + case IEEE80211_M_HOSTAP: ni = ieee80211_find_vap_node(&ic->ic_sta, vap, k->wk_macaddr); if (ni == NULL) return 0; /* should not happen */ Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Sun Mar 15 21:17:58 2015 (r280104) +++ head/sys/dev/wpi/if_wpireg.h Sun Mar 15 21:18:18 2015 (r280105) @@ -375,6 +375,7 @@ struct wpi_rxon { #define WPI_FILTER_NODECRYPT (1 << 3) #define WPI_FILTER_BSS (1 << 5) #define WPI_FILTER_BEACON (1 << 6) +#define WPI_FILTER_ASSOC (1 << 7) /* Accept associaton requests. */ uint8_t chan; uint16_t reserved5; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:19:16 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 95310719; Sun, 15 Mar 2015 21:19:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80C318B6; Sun, 15 Mar 2015 21:19:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLJGD9085938; Sun, 15 Mar 2015 21:19:16 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLJGgB085936; Sun, 15 Mar 2015 21:19:16 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152119.t2FLJGgB085936@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:19:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280106 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:19:16 -0000 Author: adrian Date: Sun Mar 15 21:19:15 2015 New Revision: 280106 URL: https://svnweb.freebsd.org/changeset/base/280106 Log: Split TX and scan timeouts; use a callout now for the scan timeout. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:18:18 2015 (r280105) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:19:15 2015 (r280106) @@ -200,6 +200,7 @@ static int wpi_raw_xmit(struct ieee80211 static void wpi_start(struct ifnet *); static void wpi_start_task(void *, int); static void wpi_watchdog_rfkill(void *); +static void wpi_scan_timeout(void *); static void wpi_watchdog(void *); static int wpi_ioctl(struct ifnet *, u_long, caddr_t); static int wpi_cmd(struct wpi_softc *, int, const void *, size_t, int); @@ -520,6 +521,7 @@ wpi_attach(device_t dev) wpi_radiotap_attach(sc); callout_init_mtx(&sc->calib_to, &sc->sc_mtx, 0); + callout_init_mtx(&sc->scan_timeout, &sc->sc_mtx, 0); callout_init_mtx(&sc->watchdog_to, &sc->sc_mtx, 0); callout_init_mtx(&sc->watchdog_rfkill, &sc->sc_mtx, 0); TASK_INIT(&sc->sc_reinittask, 0, wpi_hw_reset, sc); @@ -683,8 +685,9 @@ wpi_detach(device_t dev) wpi_stop(sc); - callout_drain(&sc->watchdog_to); callout_drain(&sc->watchdog_rfkill); + callout_drain(&sc->watchdog_to); + callout_drain(&sc->scan_timeout); callout_drain(&sc->calib_to); ieee80211_ifdetach(ic); } @@ -2163,7 +2166,7 @@ wpi_notif_intr(struct wpi_softc *sc) "scan finished nchan=%d status=%d chan=%d\n", scan->nchan, scan->status, scan->chan); #endif - sc->sc_scan_timer = 0; + callout_stop(&sc->scan_timeout); WPI_UNLOCK(sc); ieee80211_scan_next(vap); WPI_LOCK(sc); @@ -2925,6 +2928,17 @@ wpi_watchdog_rfkill(void *arg) ieee80211_runtask(ic, &sc->sc_radioon_task); } +static void +wpi_scan_timeout(void *arg) +{ + struct wpi_softc *sc = arg; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + + if_printf(ifp, "scan timeout\n"); + ieee80211_runtask(ic, &sc->sc_reinittask); +} + /** * Called every second, wpi_watchdog used by the watch dog timer * to check that the card is still alive @@ -2946,15 +2960,6 @@ wpi_watchdog(void *arg) } } - if (sc->sc_scan_timer > 0) { - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - if (--sc->sc_scan_timer == 0 && vap != NULL) { - if_printf(ifp, "scan timeout\n"); - ieee80211_cancel_scan(vap); - ieee80211_runtask(ic, &sc->sc_reinittask); - } - } - if (ifp->if_drv_flags & IFF_DRV_RUNNING) callout_reset(&sc->watchdog_to, hz, wpi_watchdog, sc); } @@ -3873,7 +3878,7 @@ wpi_scan(struct wpi_softc *sc, struct ie * We are absolutely not allowed to send a scan command when another * scan command is pending. */ - if (sc->sc_scan_timer) { + if (callout_pending(&sc->scan_timeout)) { device_printf(sc->sc_dev, "%s: called whilst scanning!\n", __func__); @@ -4016,7 +4021,7 @@ wpi_scan(struct wpi_softc *sc, struct ie if (error != 0) goto fail; - sc->sc_scan_timer = 5; + callout_reset(&sc->scan_timeout, 5*hz, wpi_scan_timeout, sc); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); @@ -5270,9 +5275,9 @@ wpi_stop_locked(struct wpi_softc *sc) sc->txq_active = 0; WPI_TXQ_UNLOCK(sc); - sc->sc_scan_timer = 0; sc->sc_tx_timer = 0; callout_stop(&sc->watchdog_to); + callout_stop(&sc->scan_timeout); callout_stop(&sc->calib_to); IF_LOCK(&ifp->if_snd); @@ -5404,6 +5409,9 @@ wpi_hw_reset(void *arg, int pending) DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); + if (vap != NULL && (ic->ic_flags & IEEE80211_F_SCAN)) + ieee80211_cancel_scan(vap); + wpi_stop(sc); if (vap != NULL) ieee80211_stop(vap); Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:18:18 2015 (r280105) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:19:15 2015 (r280106) @@ -180,6 +180,8 @@ struct wpi_softc { struct callout calib_to; int calib_cnt; + struct callout scan_timeout; + /* Watch dog timers. */ struct callout watchdog_to; struct callout watchdog_rfkill; @@ -204,7 +206,6 @@ struct wpi_softc { struct mtx nt_mtx; int sc_tx_timer; - int sc_scan_timer; void (*sc_node_free)(struct ieee80211_node *); void (*sc_scan_curchan)(struct ieee80211_scan_state *, From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:19:53 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 362CF870; Sun, 15 Mar 2015 21:19:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 222418C6; Sun, 15 Mar 2015 21:19:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLJrPb086059; Sun, 15 Mar 2015 21:19:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLJqEW086058; Sun, 15 Mar 2015 21:19:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152119.t2FLJqEW086058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280107 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:19:53 -0000 Author: adrian Date: Sun Mar 15 21:19:52 2015 New Revision: 280107 URL: https://svnweb.freebsd.org/changeset/base/280107 Log: Use WPI_FILTER_BSS for checking current state. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:19:15 2015 (r280106) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:19:52 2015 (r280107) @@ -1722,11 +1722,8 @@ static void wpi_calib_timeout(void *arg) { struct wpi_softc *sc = arg; - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - if (vap->iv_state != IEEE80211_S_RUN) + if (!(sc->rxon.filter & htole32(WPI_FILTER_BSS))) return; wpi_power_calibration(sc); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:20: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 4EB46A11; Sun, 15 Mar 2015 21:20:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3001F96A; Sun, 15 Mar 2015 21:20:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLKxcM088650; Sun, 15 Mar 2015 21:20:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLKw02088648; Sun, 15 Mar 2015 21:20:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152120.t2FLKw02088648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280108 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:20:59 -0000 Author: adrian Date: Sun Mar 15 21:20:58 2015 New Revision: 280108 URL: https://svnweb.freebsd.org/changeset/base/280108 Log: Add mutex for RXON structure; convert some callouts/lock use to use RXON rather than the global WPI lock. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:19:52 2015 (r280107) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:20:58 2015 (r280108) @@ -396,6 +396,7 @@ wpi_attach(device_t dev) } WPI_LOCK_INIT(sc); + WPI_RXON_LOCK_INIT(sc); WPI_NT_LOCK_INIT(sc); WPI_TXQ_LOCK_INIT(sc); @@ -520,8 +521,8 @@ wpi_attach(device_t dev) wpi_radiotap_attach(sc); - callout_init_mtx(&sc->calib_to, &sc->sc_mtx, 0); - callout_init_mtx(&sc->scan_timeout, &sc->sc_mtx, 0); + callout_init_mtx(&sc->calib_to, &sc->rxon_mtx, 0); + callout_init_mtx(&sc->scan_timeout, &sc->rxon_mtx, 0); callout_init_mtx(&sc->watchdog_to, &sc->sc_mtx, 0); callout_init_mtx(&sc->watchdog_rfkill, &sc->sc_mtx, 0); TASK_INIT(&sc->sc_reinittask, 0, wpi_hw_reset, sc); @@ -722,6 +723,7 @@ wpi_detach(device_t dev) DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); WPI_TXQ_LOCK_DESTROY(sc); WPI_NT_LOCK_DESTROY(sc); + WPI_RXON_LOCK_DESTROY(sc); WPI_LOCK_DESTROY(sc); return 0; } @@ -1652,10 +1654,9 @@ wpi_newstate(struct ieee80211vap *vap, e ieee80211_state_name[vap->iv_state], ieee80211_state_name[nstate]); - IEEE80211_UNLOCK(ic); - WPI_LOCK(sc); switch (nstate) { case IEEE80211_S_SCAN: + WPI_RXON_LOCK(sc); if ((sc->rxon.filter & htole32(WPI_FILTER_BSS)) && vap->iv_opmode != IEEE80211_M_STA) { sc->rxon.filter &= ~htole32(WPI_FILTER_BSS); @@ -1664,6 +1665,7 @@ wpi_newstate(struct ieee80211vap *vap, e "%s: could not send RXON\n", __func__); } } + WPI_RXON_UNLOCK(sc); break; case IEEE80211_S_ASSOC: @@ -1688,7 +1690,9 @@ wpi_newstate(struct ieee80211vap *vap, e * RUN -> RUN transition; Just restart the timers. */ if (vap->iv_state == IEEE80211_S_RUN) { + WPI_RXON_LOCK(sc); wpi_calib_timeout(sc); + WPI_RXON_UNLOCK(sc); break; } @@ -1706,8 +1710,6 @@ wpi_newstate(struct ieee80211vap *vap, e default: break; } - WPI_UNLOCK(sc); - IEEE80211_LOCK(ic); if (error != 0) { DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); return error; @@ -2163,7 +2165,9 @@ wpi_notif_intr(struct wpi_softc *sc) "scan finished nchan=%d status=%d chan=%d\n", scan->nchan, scan->status, scan->chan); #endif + WPI_RXON_LOCK(sc); callout_stop(&sc->scan_timeout); + WPI_RXON_UNLOCK(sc); WPI_UNLOCK(sc); ieee80211_scan_next(vap); WPI_LOCK(sc); @@ -3344,14 +3348,14 @@ wpi_update_promisc(struct ifnet *ifp) { struct wpi_softc *sc = ifp->if_softc; - WPI_LOCK(sc); + WPI_RXON_LOCK(sc); wpi_set_promisc(sc); if (wpi_send_rxon(sc, 1, 1) != 0) { device_printf(sc->sc_dev, "%s: could not send RXON\n", __func__); } - WPI_UNLOCK(sc); + WPI_RXON_UNLOCK(sc); } static void @@ -3634,6 +3638,9 @@ wpi_send_rxon(struct wpi_softc *sc, int { int error; + if (async) + WPI_RXON_LOCK_ASSERT(sc); + if (assoc && (sc->rxon.filter & htole32(WPI_FILTER_BSS))) { struct wpi_assoc rxon_assoc; @@ -4036,6 +4043,8 @@ wpi_auth(struct wpi_softc *sc, struct ie struct ieee80211_node *ni = vap->iv_bss; int error; + WPI_RXON_LOCK(sc); + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); /* Update adapter configuration. */ @@ -4073,6 +4082,8 @@ wpi_auth(struct wpi_softc *sc, struct ie DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); + WPI_RXON_UNLOCK(sc); + return error; } @@ -4253,6 +4264,7 @@ wpi_run(struct wpi_softc *sc, struct iee } /* Update adapter configuration. */ + WPI_RXON_LOCK(sc); IEEE80211_ADDR_COPY(sc->rxon.bssid, ni->ni_bssid); sc->rxon.associd = htole16(IEEE80211_NODE_AID(ni)); sc->rxon.chan = ieee80211_chan2ieee(ic, ni->ni_chan); @@ -4287,6 +4299,11 @@ wpi_run(struct wpi_softc *sc, struct iee return error; } + /* Start periodic calibration timer. */ + callout_reset(&sc->calib_to, 60*hz, wpi_calib_timeout, sc); + + WPI_RXON_UNLOCK(sc); + if (vap->iv_opmode == IEEE80211_M_IBSS || vap->iv_opmode == IEEE80211_M_HOSTAP) { if ((error = wpi_setup_beacon(sc, ni)) != 0) { @@ -4313,9 +4330,6 @@ wpi_run(struct wpi_softc *sc, struct iee /* Link LED always on while associated. */ wpi_set_led(sc, WPI_LED_LINK, 0, 1); - /* Start periodic calibration timer. */ - callout_reset(&sc->calib_to, 60*hz, wpi_calib_timeout, sc); - /* Enable power-saving mode if requested by user. */ if ((vap->iv_flags & IEEE80211_F_PMGTON) && vap->iv_opmode != IEEE80211_M_IBSS) @@ -5274,8 +5288,11 @@ wpi_stop_locked(struct wpi_softc *sc) sc->sc_tx_timer = 0; callout_stop(&sc->watchdog_to); + + WPI_RXON_LOCK(sc); callout_stop(&sc->scan_timeout); callout_stop(&sc->calib_to); + WPI_RXON_UNLOCK(sc); IF_LOCK(&ifp->if_snd); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); @@ -5337,12 +5354,14 @@ wpi_set_channel(struct ieee80211com *ic) sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); + WPI_UNLOCK(sc); /* * Only need to set the channel in Monitor mode. AP scanning and auth * are already taken care of by their respective firmware commands. */ if (ic->ic_opmode == IEEE80211_M_MONITOR) { + WPI_RXON_LOCK(sc); sc->rxon.chan = ieee80211_chan2ieee(ic, c); if (IEEE80211_IS_CHAN_2GHZ(c)) { sc->rxon.flags |= htole32(WPI_RXON_AUTO | @@ -5351,12 +5370,12 @@ wpi_set_channel(struct ieee80211com *ic) sc->rxon.flags &= ~htole32(WPI_RXON_AUTO | WPI_RXON_24GHZ); } - if ((error = wpi_send_rxon(sc, 0, 0)) != 0) + if ((error = wpi_send_rxon(sc, 0, 1)) != 0) device_printf(sc->sc_dev, "%s: error %d setting channel\n", __func__, error); + WPI_RXON_UNLOCK(sc); } - WPI_UNLOCK(sc); } /** @@ -5372,13 +5391,14 @@ wpi_scan_curchan(struct ieee80211_scan_s struct wpi_softc *sc = ic->ic_ifp->if_softc; int error; + WPI_RXON_LOCK(sc); if (sc->rxon.chan != ieee80211_chan2ieee(ic, ic->ic_curchan)) { - WPI_LOCK(sc); error = wpi_scan(sc, ic->ic_curchan); - WPI_UNLOCK(sc); + WPI_RXON_UNLOCK(sc); if (error != 0) ieee80211_cancel_scan(vap); } else { + WPI_RXON_UNLOCK(sc); /* Send probe request when associated. */ sc->sc_scan_curchan(ss, maxdwell); } Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:19:52 2015 (r280107) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:20:58 2015 (r280108) @@ -199,6 +199,8 @@ struct wpi_softc { int sc_cap_off; /* PCIe Capabilities. */ struct wpi_rxon rxon; + struct mtx rxon_mtx; + int temp; uint32_t qfullmsk; @@ -237,7 +239,7 @@ struct wpi_softc { char domain[4]; /* Regulatory domain. */ }; -/* WPI_LOCK > WPI_NT_LOCK / WPI_VAP_LOCK > WPI_TXQ_LOCK */ +/* WPI_LOCK > WPI_RXON_LOCK > WPI_NT_LOCK / WPI_VAP_LOCK > WPI_TXQ_LOCK */ #define WPI_LOCK_INIT(_sc) \ mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ @@ -247,6 +249,13 @@ struct wpi_softc { #define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) #define WPI_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) +#define WPI_RXON_LOCK_INIT(_sc) \ + mtx_init(&(_sc)->rxon_mtx, "lock for wpi_rxon structure", NULL, MTX_DEF) +#define WPI_RXON_LOCK(_sc) mtx_lock(&(_sc)->rxon_mtx) +#define WPI_RXON_UNLOCK(_sc) mtx_unlock(&(_sc)->rxon_mtx) +#define WPI_RXON_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rxon_mtx, MA_OWNED) +#define WPI_RXON_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->rxon_mtx) + #define WPI_NT_LOCK_INIT(_sc) \ mtx_init(&(_sc)->nt_mtx, "node table lock", NULL, MTX_DEF) #define WPI_NT_LOCK(_sc) mtx_lock(&(_sc)->nt_mtx) From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:22: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 42B43B77; Sun, 15 Mar 2015 21:22: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 247F2981; Sun, 15 Mar 2015 21:22: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 t2FLM5iY089955; Sun, 15 Mar 2015 21:22:05 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLM4nU089953; Sun, 15 Mar 2015 21:22:04 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152122.t2FLM4nU089953@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280109 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:22:05 -0000 Author: adrian Date: Sun Mar 15 21:22:03 2015 New Revision: 280109 URL: https://svnweb.freebsd.org/changeset/base/280109 Log: turn sc_tx_timeout into its own callout, rather than a global watchdog timer. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:20:58 2015 (r280108) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:22:03 2015 (r280109) @@ -201,7 +201,7 @@ static void wpi_start(struct ifnet *); static void wpi_start_task(void *, int); static void wpi_watchdog_rfkill(void *); static void wpi_scan_timeout(void *); -static void wpi_watchdog(void *); +static void wpi_tx_timeout(void *); static int wpi_ioctl(struct ifnet *, u_long, caddr_t); static int wpi_cmd(struct wpi_softc *, int, const void *, size_t, int); static int wpi_mrr_setup(struct wpi_softc *); @@ -523,7 +523,7 @@ wpi_attach(device_t dev) callout_init_mtx(&sc->calib_to, &sc->rxon_mtx, 0); callout_init_mtx(&sc->scan_timeout, &sc->rxon_mtx, 0); - callout_init_mtx(&sc->watchdog_to, &sc->sc_mtx, 0); + callout_init_mtx(&sc->tx_timeout, &sc->sc_mtx, 0); callout_init_mtx(&sc->watchdog_rfkill, &sc->sc_mtx, 0); TASK_INIT(&sc->sc_reinittask, 0, wpi_hw_reset, sc); TASK_INIT(&sc->sc_radiooff_task, 0, wpi_radio_off, sc); @@ -687,7 +687,7 @@ wpi_detach(device_t dev) wpi_stop(sc); callout_drain(&sc->watchdog_rfkill); - callout_drain(&sc->watchdog_to); + callout_drain(&sc->tx_timeout); callout_drain(&sc->scan_timeout); callout_drain(&sc->calib_to); ieee80211_ifdetach(ic); @@ -1970,8 +1970,13 @@ wpi_tx_done(struct wpi_softc *sc, struct ieee80211_tx_complete(ni, m, (status & 0xff) != 1); WPI_LOCK(sc); - sc->sc_tx_timer = 0; - if (--ring->queued < WPI_TX_RING_LOMARK) { + ring->queued -= 1; + if (ring->queued > 0) + callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); + else + callout_stop(&sc->tx_timeout); + + if (ring->queued < WPI_TX_RING_LOMARK) { sc->qfullmsk &= ~(1 << ring->qid); IF_LOCK(&ifp->if_snd); if (sc->qfullmsk == 0 && @@ -2520,7 +2525,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (++ring->queued > WPI_TX_RING_HIMARK) sc->qfullmsk |= 1 << ring->qid; - sc->sc_tx_timer = 5; + callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); } DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); @@ -2940,29 +2945,16 @@ wpi_scan_timeout(void *arg) ieee80211_runtask(ic, &sc->sc_reinittask); } -/** - * Called every second, wpi_watchdog used by the watch dog timer - * to check that the card is still alive - */ static void -wpi_watchdog(void *arg) +wpi_tx_timeout(void *arg) { struct wpi_softc *sc = arg; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - DPRINTF(sc, WPI_DEBUG_WATCHDOG, "Watchdog: tick\n"); - - if (sc->sc_tx_timer > 0) { - if (--sc->sc_tx_timer == 0) { - if_printf(ifp, "device timeout\n"); - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - ieee80211_runtask(ic, &sc->sc_reinittask); - } - } - - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - callout_reset(&sc->watchdog_to, hz, wpi_watchdog, sc); + if_printf(ifp, "device timeout\n"); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + ieee80211_runtask(ic, &sc->sc_reinittask); } static int @@ -5260,8 +5252,6 @@ wpi_init(void *arg) ifp->if_drv_flags |= IFF_DRV_RUNNING; IF_UNLOCK(&ifp->if_snd); - callout_reset(&sc->watchdog_to, hz, wpi_watchdog, sc); - DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); WPI_UNLOCK(sc); @@ -5286,8 +5276,7 @@ wpi_stop_locked(struct wpi_softc *sc) sc->txq_active = 0; WPI_TXQ_UNLOCK(sc); - sc->sc_tx_timer = 0; - callout_stop(&sc->watchdog_to); + callout_stop(&sc->tx_timeout); WPI_RXON_LOCK(sc); callout_stop(&sc->scan_timeout); Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:20:58 2015 (r280108) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:22:03 2015 (r280109) @@ -181,9 +181,9 @@ struct wpi_softc { int calib_cnt; struct callout scan_timeout; + struct callout tx_timeout; - /* Watch dog timers. */ - struct callout watchdog_to; + /* Watch dog timer. */ struct callout watchdog_rfkill; /* Firmware image. */ @@ -207,8 +207,6 @@ struct wpi_softc { uint32_t nodesmsk; struct mtx nt_mtx; - int sc_tx_timer; - void (*sc_node_free)(struct ieee80211_node *); void (*sc_scan_curchan)(struct ieee80211_scan_state *, unsigned long); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:23: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 1B627CF8; Sun, 15 Mar 2015 21:23: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 E1842995; Sun, 15 Mar 2015 21:23: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 t2FLNjjE090200; Sun, 15 Mar 2015 21:23:45 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLNjsr090199; Sun, 15 Mar 2015 21:23:45 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152123.t2FLNjsr090199@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280110 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:23:46 -0000 Author: adrian Date: Sun Mar 15 21:23:45 2015 New Revision: 280110 URL: https://svnweb.freebsd.org/changeset/base/280110 Log: Don't use sc->qfullmsk in wpi_start(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:22:03 2015 (r280109) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:23:45 2015 (r280110) @@ -2411,6 +2411,7 @@ end: WPI_UNLOCK(sc); static int wpi_cmd2(struct wpi_softc *sc, struct wpi_buf *buf) { + struct ifnet *ifp = sc->sc_ifp; struct ieee80211_frame *wh; struct wpi_tx_cmd *cmd; struct wpi_tx_data *data; @@ -2522,9 +2523,14 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (ring->qid < WPI_CMD_QUEUE_NUM) { /* Mark TX ring as full if we reach a certain threshold. */ - if (++ring->queued > WPI_TX_RING_HIMARK) + if (++ring->queued > WPI_TX_RING_HIMARK) { sc->qfullmsk |= 1 << ring->qid; + IF_LOCK(&ifp->if_snd); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); + } + callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); } @@ -2873,24 +2879,18 @@ wpi_start(struct ifnet *ifp) struct ieee80211_node *ni; struct mbuf *m; + WPI_LOCK(sc); DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); - IF_LOCK(&ifp->if_snd); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || - (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { - IF_UNLOCK(&ifp->if_snd); - return; - } - IF_UNLOCK(&ifp->if_snd); - - WPI_LOCK(sc); for (;;) { - if (sc->qfullmsk != 0) { - IF_LOCK(&ifp->if_snd); - ifp->if_drv_flags |= IFF_DRV_OACTIVE; + IF_LOCK(&ifp->if_snd); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { IF_UNLOCK(&ifp->if_snd); break; } + IF_UNLOCK(&ifp->if_snd); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m); if (m == NULL) break; @@ -2902,9 +2902,9 @@ wpi_start(struct ifnet *ifp) if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } } - WPI_UNLOCK(sc); DPRINTF(sc, WPI_DEBUG_XMIT, "%s: done\n", __func__); + WPI_UNLOCK(sc); } static void From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:24:12 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 50787E56; Sun, 15 Mar 2015 21:24:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C46D9A1; Sun, 15 Mar 2015 21:24:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLOCet090328; Sun, 15 Mar 2015 21:24:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLOCNi090327; Sun, 15 Mar 2015 21:24:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152124.t2FLOCNi090327@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280111 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:24:12 -0000 Author: adrian Date: Sun Mar 15 21:24:11 2015 New Revision: 280111 URL: https://svnweb.freebsd.org/changeset/base/280111 Log: Regroup ring state checks in wpi_tx_done(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:23:45 2015 (r280110) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:24:11 2015 (r280111) @@ -1971,22 +1971,23 @@ wpi_tx_done(struct wpi_softc *sc, struct WPI_LOCK(sc); ring->queued -= 1; - if (ring->queued > 0) + if (ring->queued > 0) { callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); - else - callout_stop(&sc->tx_timeout); - if (ring->queued < WPI_TX_RING_LOMARK) { - sc->qfullmsk &= ~(1 << ring->qid); - IF_LOCK(&ifp->if_snd); - if (sc->qfullmsk == 0 && - (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - IF_UNLOCK(&ifp->if_snd); - ieee80211_runtask(ic, &sc->sc_start_task); - } else - IF_UNLOCK(&ifp->if_snd); - } + if (sc->qfullmsk != 0 && + ring->queued < WPI_TX_RING_LOMARK) { + sc->qfullmsk &= ~(1 << ring->qid); + IF_LOCK(&ifp->if_snd); + if (sc->qfullmsk == 0 && + (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); + ieee80211_runtask(ic, &sc->sc_start_task); + } else + IF_UNLOCK(&ifp->if_snd); + } + } else + callout_stop(&sc->tx_timeout); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); } From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:25: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 0A27CFD6; Sun, 15 Mar 2015 21:25: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 AB1CD9B2; Sun, 15 Mar 2015 21:25:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLP7NJ090534; Sun, 15 Mar 2015 21:25:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLP7ws090530; Sun, 15 Mar 2015 21:25:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152125.t2FLP7ws090530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280112 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:25:08 -0000 Author: adrian Date: Sun Mar 15 21:25:06 2015 New Revision: 280112 URL: https://svnweb.freebsd.org/changeset/base/280112 Log: Add an extra mutex for qfullmsk / ring->queued variables. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:24:11 2015 (r280111) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:25:06 2015 (r280112) @@ -399,6 +399,7 @@ wpi_attach(device_t dev) WPI_RXON_LOCK_INIT(sc); WPI_NT_LOCK_INIT(sc); WPI_TXQ_LOCK_INIT(sc); + WPI_TXQ_STATE_LOCK_INIT(sc); /* Allocate DMA memory for firmware transfers. */ if ((error = wpi_alloc_fwmem(sc)) != 0) { @@ -523,7 +524,7 @@ wpi_attach(device_t dev) callout_init_mtx(&sc->calib_to, &sc->rxon_mtx, 0); callout_init_mtx(&sc->scan_timeout, &sc->rxon_mtx, 0); - callout_init_mtx(&sc->tx_timeout, &sc->sc_mtx, 0); + callout_init_mtx(&sc->tx_timeout, &sc->txq_state_mtx, 0); callout_init_mtx(&sc->watchdog_rfkill, &sc->sc_mtx, 0); TASK_INIT(&sc->sc_reinittask, 0, wpi_hw_reset, sc); TASK_INIT(&sc->sc_radiooff_task, 0, wpi_radio_off, sc); @@ -721,6 +722,7 @@ wpi_detach(device_t dev) if_free(ifp); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); + WPI_TXQ_STATE_LOCK_DESTROY(sc); WPI_TXQ_LOCK_DESTROY(sc); WPI_NT_LOCK_DESTROY(sc); WPI_RXON_LOCK_DESTROY(sc); @@ -1970,6 +1972,7 @@ wpi_tx_done(struct wpi_softc *sc, struct ieee80211_tx_complete(ni, m, (status & 0xff) != 1); WPI_LOCK(sc); + WPI_TXQ_STATE_LOCK(sc); ring->queued -= 1; if (ring->queued > 0) { callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); @@ -1988,6 +1991,7 @@ wpi_tx_done(struct wpi_softc *sc, struct } } else callout_stop(&sc->tx_timeout); + WPI_TXQ_STATE_UNLOCK(sc); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); } @@ -2524,6 +2528,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (ring->qid < WPI_CMD_QUEUE_NUM) { /* Mark TX ring as full if we reach a certain threshold. */ + WPI_TXQ_STATE_LOCK(sc); if (++ring->queued > WPI_TX_RING_HIMARK) { sc->qfullmsk |= 1 << ring->qid; @@ -2533,6 +2538,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp } callout_reset(&sc->tx_timeout, 5*hz, wpi_tx_timeout, sc); + WPI_TXQ_STATE_UNLOCK(sc); } DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); @@ -5277,7 +5283,9 @@ wpi_stop_locked(struct wpi_softc *sc) sc->txq_active = 0; WPI_TXQ_UNLOCK(sc); + WPI_TXQ_STATE_LOCK(sc); callout_stop(&sc->tx_timeout); + WPI_TXQ_STATE_UNLOCK(sc); WPI_RXON_LOCK(sc); callout_stop(&sc->scan_timeout); Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:24:11 2015 (r280111) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:25:06 2015 (r280112) @@ -172,6 +172,7 @@ struct wpi_softc { struct wpi_tx_ring txq[WPI_NTXQUEUES]; struct mtx txq_mtx; + struct mtx txq_state_mtx; uint32_t txq_active; struct wpi_rx_ring rxq; @@ -237,7 +238,14 @@ struct wpi_softc { char domain[4]; /* Regulatory domain. */ }; -/* WPI_LOCK > WPI_RXON_LOCK > WPI_NT_LOCK / WPI_VAP_LOCK > WPI_TXQ_LOCK */ +/* + * Locking order: + * 1. WPI_LOCK; + * 2. WPI_RXON_LOCK; + * 3. WPI_NT_LOCK / WPI_VAP_LOCK; + * 4. WPI_TXQ_LOCK; + * 5. WPI_TXQ_STATE_LOCK; + */ #define WPI_LOCK_INIT(_sc) \ mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ @@ -265,3 +273,9 @@ struct wpi_softc { #define WPI_TXQ_LOCK(_sc) mtx_lock(&(_sc)->txq_mtx) #define WPI_TXQ_UNLOCK(_sc) mtx_unlock(&(_sc)->txq_mtx) #define WPI_TXQ_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->txq_mtx) + +#define WPI_TXQ_STATE_LOCK_INIT(_sc) \ + mtx_init(&(_sc)->txq_state_mtx, "txq state lock", NULL, MTX_DEF) +#define WPI_TXQ_STATE_LOCK(_sc) mtx_lock(&(_sc)->txq_state_mtx) +#define WPI_TXQ_STATE_UNLOCK(_sc) mtx_unlock(&(_sc)->txq_state_mtx) +#define WPI_TXQ_STATE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->txq_state_mtx) From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:26:23 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 D1F341BF; Sun, 15 Mar 2015 21:26:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD3789C3; Sun, 15 Mar 2015 21:26:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLQN3i090740; Sun, 15 Mar 2015 21:26:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLQNro090735; Sun, 15 Mar 2015 21:26:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152126.t2FLQNro090735@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:26:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280113 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:26:24 -0000 Author: adrian Date: Sun Mar 15 21:26:22 2015 New Revision: 280113 URL: https://svnweb.freebsd.org/changeset/base/280113 Log: Add another lock for the TX path. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:25:06 2015 (r280112) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:26:22 2015 (r280113) @@ -396,6 +396,7 @@ wpi_attach(device_t dev) } WPI_LOCK_INIT(sc); + WPI_TX_LOCK_INIT(sc); WPI_RXON_LOCK_INIT(sc); WPI_NT_LOCK_INIT(sc); WPI_TXQ_LOCK_INIT(sc); @@ -726,6 +727,7 @@ wpi_detach(device_t dev) WPI_TXQ_LOCK_DESTROY(sc); WPI_NT_LOCK_DESTROY(sc); WPI_RXON_LOCK_DESTROY(sc); + WPI_TX_LOCK_DESTROY(sc); WPI_LOCK_DESTROY(sc); return 0; } @@ -2845,7 +2847,7 @@ wpi_raw_xmit(struct ieee80211_node *ni, return ENETDOWN; } - WPI_LOCK(sc); + WPI_TX_LOCK(sc); if (params == NULL) { /* * Legacy path; interpret frame contents to decide @@ -2859,7 +2861,7 @@ wpi_raw_xmit(struct ieee80211_node *ni, */ error = wpi_tx_data_raw(sc, m, ni, params); } - WPI_UNLOCK(sc); + WPI_TX_UNLOCK(sc); if (error != 0) { /* NB: m is reclaimed on tx failure */ @@ -2886,7 +2888,7 @@ wpi_start(struct ifnet *ifp) struct ieee80211_node *ni; struct mbuf *m; - WPI_LOCK(sc); + WPI_TX_LOCK(sc); DPRINTF(sc, WPI_DEBUG_XMIT, "%s: called\n", __func__); for (;;) { @@ -2903,15 +2905,13 @@ wpi_start(struct ifnet *ifp) break; ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; if (wpi_tx_data(sc, m, ni) != 0) { - WPI_UNLOCK(sc); ieee80211_free_node(ni); - WPI_LOCK(sc); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } } DPRINTF(sc, WPI_DEBUG_XMIT, "%s: done\n", __func__); - WPI_UNLOCK(sc); + WPI_TX_UNLOCK(sc); } static void @@ -5350,9 +5350,11 @@ wpi_set_channel(struct ieee80211com *ic) WPI_LOCK(sc); sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq); sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); + WPI_UNLOCK(sc); + WPI_TX_LOCK(sc); sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); - WPI_UNLOCK(sc); + WPI_TX_UNLOCK(sc); /* * Only need to set the channel in Monitor mode. AP scanning and auth Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:25:06 2015 (r280112) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:26:22 2015 (r280113) @@ -165,6 +165,7 @@ struct wpi_softc { int sc_debug; struct mtx sc_mtx; + struct mtx tx_mtx; /* Shared area. */ struct wpi_dma_info shared_dma; @@ -242,9 +243,10 @@ struct wpi_softc { * Locking order: * 1. WPI_LOCK; * 2. WPI_RXON_LOCK; - * 3. WPI_NT_LOCK / WPI_VAP_LOCK; - * 4. WPI_TXQ_LOCK; - * 5. WPI_TXQ_STATE_LOCK; + * 3. WPI_TX_LOCK; + * 4. WPI_NT_LOCK / WPI_VAP_LOCK; + * 5. WPI_TXQ_LOCK; + * 6. WPI_TXQ_STATE_LOCK; */ #define WPI_LOCK_INIT(_sc) \ @@ -262,6 +264,12 @@ struct wpi_softc { #define WPI_RXON_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rxon_mtx, MA_OWNED) #define WPI_RXON_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->rxon_mtx) +#define WPI_TX_LOCK_INIT(_sc) \ + mtx_init(&(_sc)->tx_mtx, "tx path lock", NULL, MTX_DEF) +#define WPI_TX_LOCK(_sc) mtx_lock(&(_sc)->tx_mtx) +#define WPI_TX_UNLOCK(_sc) mtx_unlock(&(_sc)->tx_mtx) +#define WPI_TX_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->tx_mtx) + #define WPI_NT_LOCK_INIT(_sc) \ mtx_init(&(_sc)->nt_mtx, "node table lock", NULL, MTX_DEF) #define WPI_NT_LOCK(_sc) mtx_lock(&(_sc)->nt_mtx) From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:27:04 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 188F230B; Sun, 15 Mar 2015 21:27: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 0461B9CD; Sun, 15 Mar 2015 21:27: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 t2FLR3Gn090881; Sun, 15 Mar 2015 21:27:03 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLR38v090880; Sun, 15 Mar 2015 21:27:03 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152127.t2FLR38v090880@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:27:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280114 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:27:04 -0000 Author: adrian Date: Sun Mar 15 21:27:03 2015 New Revision: 280114 URL: https://svnweb.freebsd.org/changeset/base/280114 Log: Use correct types (attachment 154379) PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:26:22 2015 (r280113) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:27:03 2015 (r280114) @@ -1936,8 +1936,8 @@ wpi_tx_done(struct wpi_softc *sc, struct struct ieee80211_node *ni; struct ieee80211vap *vap; struct ieee80211com *ic; + uint32_t status = le32toh(stat->status); int ackfailcnt = stat->ackfailcnt / 2; /* wpi_mrr_setup() */ - int status = le32toh(stat->status); KASSERT(data->ni != NULL, ("no node")); KASSERT(data->m != NULL, ("no mbuf")); @@ -2038,7 +2038,7 @@ wpi_notif_intr(struct wpi_softc *sc) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - int hw; + uint32_t hw; bus_dmamap_sync(sc->shared_dma.tag, sc->shared_dma.map, BUS_DMASYNC_POSTREAD); @@ -2092,7 +2092,7 @@ wpi_notif_intr(struct wpi_softc *sc) { struct wpi_beacon_missed *miss = (struct wpi_beacon_missed *)(desc + 1); - int misses; + uint32_t misses; bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:27: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 E22C1481; Sun, 15 Mar 2015 21:27:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDFB09DC; Sun, 15 Mar 2015 21:27:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLRpAo091037; Sun, 15 Mar 2015 21:27:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLRpYF091036; Sun, 15 Mar 2015 21:27:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152127.t2FLRpYF091036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:27:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280115 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:27:52 -0000 Author: adrian Date: Sun Mar 15 21:27:50 2015 New Revision: 280115 URL: https://svnweb.freebsd.org/changeset/base/280115 Log: Reformatting changes. (attachment 154380) PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:27:03 2015 (r280114) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:27:50 2015 (r280115) @@ -213,8 +213,8 @@ struct wpi_softc { void (*sc_scan_curchan)(struct ieee80211_scan_state *, unsigned long); - struct wpi_rx_radiotap_header sc_rxtap; - struct wpi_tx_radiotap_header sc_txtap; + struct wpi_rx_radiotap_header sc_rxtap; + struct wpi_tx_radiotap_header sc_txtap; /* Firmware image. */ const struct firmware *fw_fp; @@ -254,7 +254,7 @@ struct wpi_softc { MTX_NETWORK_LOCK, MTX_DEF) #define WPI_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define WPI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) +#define WPI_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) #define WPI_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) #define WPI_RXON_LOCK_INIT(_sc) \ From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:29:20 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 3FA046CF; Sun, 15 Mar 2015 21:29:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68AFB9F1; Sun, 15 Mar 2015 21:29:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLTJS2091397; Sun, 15 Mar 2015 21:29:19 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLTJCB091396; Sun, 15 Mar 2015 21:29:19 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152129.t2FLTJCB091396@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280116 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:29:20 -0000 Author: adrian Date: Sun Mar 15 21:29:18 2015 New Revision: 280116 URL: https://svnweb.freebsd.org/changeset/base/280116 Log: Don't unlock mutex in interrupt thread (except for wpi_rx_done() - for now) - fixes various races between wpi_notif_intr() and wpi_stop_locked(). (attachment 154381) Committers note: yes, unlock/if_input/lock has to go away, but that'll have to be done later. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:27:50 2015 (r280115) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:29:18 2015 (r280116) @@ -1960,7 +1960,6 @@ wpi_tx_done(struct wpi_softc *sc, struct /* * Update rate control statistics for the node. */ - WPI_UNLOCK(sc); if ((status & 0xff) != 1) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ieee80211_ratectl_tx_complete(vap, ni, @@ -1972,7 +1971,6 @@ wpi_tx_done(struct wpi_softc *sc, struct } ieee80211_tx_complete(ni, m, (status & 0xff) != 1); - WPI_LOCK(sc); WPI_TXQ_STATE_LOCK(sc); ring->queued -= 1; @@ -2103,13 +2101,10 @@ wpi_notif_intr(struct wpi_softc *sc) le32toh(miss->total)); if (vap->iv_state == IEEE80211_S_RUN && - (ic->ic_flags & IEEE80211_F_SCAN) == 0) { - if (misses >= vap->iv_bmissthreshold) { - WPI_UNLOCK(sc); - ieee80211_beacon_miss(ic); - WPI_LOCK(sc); - } - } + (ic->ic_flags & IEEE80211_F_SCAN) == 0 && + misses >= vap->iv_bmissthreshold) + ieee80211_beacon_miss(ic); + break; } case WPI_UC_READY: @@ -2180,9 +2175,7 @@ wpi_notif_intr(struct wpi_softc *sc) WPI_RXON_LOCK(sc); callout_stop(&sc->scan_timeout); WPI_RXON_UNLOCK(sc); - WPI_UNLOCK(sc); ieee80211_scan_next(vap); - WPI_LOCK(sc); break; } } From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:29:21 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 DB1B06D1; Sun, 15 Mar 2015 21:29:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADA7A9F7; Sun, 15 Mar 2015 21:29:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLTLZF091453; Sun, 15 Mar 2015 21:29:21 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLTLhI091452; Sun, 15 Mar 2015 21:29:21 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201503152129.t2FLTLhI091452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 15 Mar 2015 21:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280117 - head/usr.bin/unzip X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:29:22 -0000 Author: jilles Date: Sun Mar 15 21:29:20 2015 New Revision: 280117 URL: https://svnweb.freebsd.org/changeset/base/280117 Log: unzip: Don't subvert vfs.timestamp_precision when setting atime to now. Also, preserve nanoseconds from libarchive, even though the zip file format does not currently support nanoseconds in timestamps. Modified: head/usr.bin/unzip/unzip.c Modified: head/usr.bin/unzip/unzip.c ============================================================================== --- head/usr.bin/unzip/unzip.c Sun Mar 15 21:29:18 2015 (r280116) +++ head/usr.bin/unzip/unzip.c Sun Mar 15 21:29:20 2015 (r280117) @@ -67,9 +67,6 @@ static int u_opt; /* update */ static int v_opt; /* verbose/list */ static int Z1_opt; /* zipinfo mode list files only */ -/* time when unzip started */ -static time_t now; - /* debug flag */ static int unzip_debug; @@ -470,9 +467,9 @@ static void extract_file(struct archive *a, struct archive_entry *e, char **path) { int mode; - time_t mtime; + struct timespec mtime; struct stat sb; - struct timeval tv[2]; + struct timespec ts[2]; int cr, fd, text, warn, check; ssize_t len; unsigned char *p, *q, *end; @@ -480,14 +477,18 @@ extract_file(struct archive *a, struct a mode = archive_entry_mode(e) & 0777; if (mode == 0) mode = 0644; - mtime = archive_entry_mtime(e); + mtime.tv_sec = archive_entry_mtime(e); + mtime.tv_nsec = archive_entry_mtime_nsec(e); /* look for existing file of same name */ recheck: if (lstat(*path, &sb) == 0) { if (u_opt || f_opt) { /* check if up-to-date */ - if (S_ISREG(sb.st_mode) && sb.st_mtime >= mtime) + if (S_ISREG(sb.st_mode) && + (sb.st_mtim.tv_sec > mtime.tv_sec || + (sb.st_mtim.tv_sec == mtime.tv_sec && + sb.st_mtim.tv_nsec >= mtime.tv_nsec))) return; (void)unlink(*path); } else if (o_opt) { @@ -593,12 +594,11 @@ recheck: info("\n"); /* set access and modification time */ - tv[0].tv_sec = now; - tv[0].tv_usec = 0; - tv[1].tv_sec = mtime; - tv[1].tv_usec = 0; - if (futimes(fd, tv) != 0) - error("utimes('%s')", *path); + ts[0].tv_sec = 0; + ts[0].tv_nsec = UTIME_NOW; + ts[1] = mtime; + if (futimens(fd, ts) != 0) + error("futimens('%s')", *path); if (close(fd) != 0) error("close('%s')", *path); } @@ -1065,8 +1065,6 @@ main(int argc, char *argv[]) if (n_opt + o_opt + u_opt > 1) errorx("-n, -o and -u are contradictory"); - time(&now); - unzip(zipfile); exit(0); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:29: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 E46FE950; Sun, 15 Mar 2015 21:29:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF462A00; Sun, 15 Mar 2015 21:29:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLTber091547; Sun, 15 Mar 2015 21:29:37 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLTbmc091546; Sun, 15 Mar 2015 21:29:37 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152129.t2FLTbmc091546@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280118 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:29:38 -0000 Author: adrian Date: Sun Mar 15 21:29:36 2015 New Revision: 280118 URL: https://svnweb.freebsd.org/changeset/base/280118 Log: Fix scan timeouts with powersave enabled. PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:29:20 2015 (r280117) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:29:36 2015 (r280118) @@ -1658,6 +1658,15 @@ wpi_newstate(struct ieee80211vap *vap, e ieee80211_state_name[vap->iv_state], ieee80211_state_name[nstate]); + if (vap->iv_state == IEEE80211_S_RUN && nstate != IEEE80211_S_RUN) { + if ((error = wpi_set_pslevel(sc, 0, 0, 1)) != 0) { + device_printf(sc->sc_dev, + "%s: could not set power saving level\n", + __func__); + return error; + } + } + switch (nstate) { case IEEE80211_S_SCAN: WPI_RXON_LOCK(sc); @@ -4326,8 +4335,6 @@ wpi_run(struct wpi_softc *sc, struct iee if ((vap->iv_flags & IEEE80211_F_PMGTON) && vap->iv_opmode != IEEE80211_M_IBSS) (void)wpi_set_pslevel(sc, 0, 3, 1); - else - (void)wpi_set_pslevel(sc, 0, 0, 1); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:30:21 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 30EEBBA3; Sun, 15 Mar 2015 21:30:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CE7AA18; Sun, 15 Mar 2015 21:30:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLUKjD092422; Sun, 15 Mar 2015 21:30:20 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLUK4G092420; Sun, 15 Mar 2015 21:30:20 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152130.t2FLUK4G092420@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280119 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:30:21 -0000 Author: adrian Date: Sun Mar 15 21:30:20 2015 New Revision: 280119 URL: https://svnweb.freebsd.org/changeset/base/280119 Log: Workaround delays caused by vmem_check(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpireg.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:29:36 2015 (r280118) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:30:20 2015 (r280119) @@ -2188,10 +2188,12 @@ wpi_notif_intr(struct wpi_softc *sc) break; } } - } - /* Tell the firmware what we have processed. */ - wpi_update_rx_ring(sc); + if (sc->rxq.cur % 8 == 0) { + /* Tell the firmware what we have processed. */ + wpi_update_rx_ring(sc); + } + } } /* Modified: head/sys/dev/wpi/if_wpireg.h ============================================================================== --- head/sys/dev/wpi/if_wpireg.h Sun Mar 15 21:29:36 2015 (r280118) +++ head/sys/dev/wpi/if_wpireg.h Sun Mar 15 21:30:20 2015 (r280119) @@ -20,7 +20,13 @@ #define WPI_TX_RING_COUNT 256 #define WPI_TX_RING_LOMARK 192 #define WPI_TX_RING_HIMARK 224 + +#ifdef DIAGNOSTIC +#define WPI_RX_RING_COUNT_LOG 8 +#else #define WPI_RX_RING_COUNT_LOG 6 +#endif + #define WPI_RX_RING_COUNT (1 << WPI_RX_RING_COUNT_LOG) #define WPI_NTXQUEUES 8 From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:32:12 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 304D6DFE; Sun, 15 Mar 2015 21:32:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11CB0AC2; Sun, 15 Mar 2015 21:32:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLWBd0095776; Sun, 15 Mar 2015 21:32:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLWBaw095774; Sun, 15 Mar 2015 21:32:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152132.t2FLWBaw095774@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280120 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:32:12 -0000 Author: adrian Date: Sun Mar 15 21:32:11 2015 New Revision: 280120 URL: https://svnweb.freebsd.org/changeset/base/280120 Log: Add a new taskqueue (device specific, not net80211 ic->tq); use it for device restart. (Committers note - once scan overhaul and a few other things have been fixed in net80211 to not block things in the taskqueue, this can disappear and the device specific taskqueues in other drivers can also go away.) PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:30:20 2015 (r280119) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:32:11 2015 (r280120) @@ -532,6 +532,14 @@ wpi_attach(device_t dev) TASK_INIT(&sc->sc_radioon_task, 0, wpi_radio_on, sc); TASK_INIT(&sc->sc_start_task, 0, wpi_start_task, sc); + sc->sc_tq = taskqueue_create("wpi_taskq", M_WAITOK, + taskqueue_thread_enqueue, &sc->sc_tq); + error = taskqueue_start_threads(&sc->sc_tq, 1, 0, "wpi_taskq"); + if (error != 0) { + device_printf(dev, "can't start threads, error %d\n", error); + goto fail; + } + wpi_sysctlattach(sc); /* @@ -688,6 +696,9 @@ wpi_detach(device_t dev) wpi_stop(sc); + taskqueue_drain_all(sc->sc_tq); + taskqueue_free(sc->sc_tq); + callout_drain(&sc->watchdog_rfkill); callout_drain(&sc->tx_timeout); callout_drain(&sc->scan_timeout); @@ -2387,8 +2398,6 @@ wpi_intr(void *arg) WPI_WRITE(sc, WPI_FH_INT, r2); if (r1 & (WPI_INT_SW_ERR | WPI_INT_HW_ERR)) { - struct ieee80211com *ic = ifp->if_l2com; - device_printf(sc->sc_dev, "fatal firmware error\n"); #ifdef WPI_DEBUG wpi_debug_registers(sc); @@ -2397,7 +2406,7 @@ wpi_intr(void *arg) DPRINTF(sc, WPI_DEBUG_HW, "(%s)\n", (r1 & WPI_INT_SW_ERR) ? "(Software Error)" : "(Hardware Error)"); - ieee80211_runtask(ic, &sc->sc_reinittask); + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); goto end; } @@ -2950,10 +2959,9 @@ wpi_scan_timeout(void *arg) { struct wpi_softc *sc = arg; struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; if_printf(ifp, "scan timeout\n"); - ieee80211_runtask(ic, &sc->sc_reinittask); + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); } static void @@ -2961,11 +2969,10 @@ wpi_tx_timeout(void *arg) { struct wpi_softc *sc = arg; struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; if_printf(ifp, "device timeout\n"); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - ieee80211_runtask(ic, &sc->sc_reinittask); + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); } static int Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:30:20 2015 (r280119) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:32:11 2015 (r280120) @@ -228,6 +228,9 @@ struct wpi_softc { struct task sc_radioon_task; struct task sc_start_task; + /* Taskqueue */ + struct taskqueue *sc_tq; + /* Eeprom info. */ uint8_t cap; uint16_t rev; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:35: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 612F6FD1; Sun, 15 Mar 2015 21:35:24 +0000 (UTC) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 25B8FADB; Sun, 15 Mar 2015 21:35:24 +0000 (UTC) Received: by igad1 with SMTP id d1so26361563iga.0; Sun, 15 Mar 2015 14:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=KXn16GAZSyGUeLolRl0Ujmbo3oqbkUR7Zks3Vmq62wI=; b=aCAo4z0NpZsFa/E+mXUMpUCyxXrzMttIpgNxQeLwtygjjvyjQVn51DV5BMHjp/tn9b tUI4SWYWmS7g/QT/8lRhci7iLhPfwPJYQmPi2miHXHfGcmEuZ3o7P/euxScR532hIEaL alFbvwYfCXx+jcAVuqmBr5Q0k9evsNX7nbMvQRKKE2+2SbPQusLEwet+wkVJ7Hy+LaOr SgHJdK7GjCZnz9+JI1rBh+cItOuO/u+OC/HQIPIddbG+Y3rAjMcGyP+zpS6XlMt3ApbH UL0kRso/l3iPTR4eGoYC4/e3TgmwJWMCb2Z3bBFry4GgZYy67suU+plmCRMVpa/YUuga DoVQ== MIME-Version: 1.0 X-Received: by 10.107.5.211 with SMTP id 202mr68518856iof.88.1426455323694; Sun, 15 Mar 2015 14:35:23 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sun, 15 Mar 2015 14:35:23 -0700 (PDT) In-Reply-To: <201503152132.t2FLWBaw095774@svn.freebsd.org> References: <201503152132.t2FLWBaw095774@svn.freebsd.org> Date: Sun, 15 Mar 2015 14:35:23 -0700 X-Google-Sender-Auth: 6UgcfewR5CpJcwJsQ--mV6ZjoIk Message-ID: Subject: Re: svn commit: r280120 - head/sys/dev/wpi From: Adrian Chadd To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 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, 15 Mar 2015 21:35:24 -0000 .. promise I'm done for now. (God, it'd be nice to use git, or some web ui that lets me batch review and commit things like this.) -a On 15 March 2015 at 14:32, Adrian Chadd wrote: > Author: adrian > Date: Sun Mar 15 21:32:11 2015 > New Revision: 280120 > URL: https://svnweb.freebsd.org/changeset/base/280120 > > Log: > Add a new taskqueue (device specific, not net80211 ic->tq); use it for > device restart. > > (Committers note - once scan overhaul and a few other things have been > fixed in net80211 to not block things in the taskqueue, this can disappear > and the device specific taskqueues in other drivers can also go away.) > > PR: kern/197143 > Submitted by: Andriy Voskoboinyk > > Modified: > head/sys/dev/wpi/if_wpi.c > head/sys/dev/wpi/if_wpivar.h > > Modified: head/sys/dev/wpi/if_wpi.c > ============================================================================== > --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:30:20 2015 (r280119) > +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:32:11 2015 (r280120) > @@ -532,6 +532,14 @@ wpi_attach(device_t dev) > TASK_INIT(&sc->sc_radioon_task, 0, wpi_radio_on, sc); > TASK_INIT(&sc->sc_start_task, 0, wpi_start_task, sc); > > + sc->sc_tq = taskqueue_create("wpi_taskq", M_WAITOK, > + taskqueue_thread_enqueue, &sc->sc_tq); > + error = taskqueue_start_threads(&sc->sc_tq, 1, 0, "wpi_taskq"); > + if (error != 0) { > + device_printf(dev, "can't start threads, error %d\n", error); > + goto fail; > + } > + > wpi_sysctlattach(sc); > > /* > @@ -688,6 +696,9 @@ wpi_detach(device_t dev) > > wpi_stop(sc); > > + taskqueue_drain_all(sc->sc_tq); > + taskqueue_free(sc->sc_tq); > + > callout_drain(&sc->watchdog_rfkill); > callout_drain(&sc->tx_timeout); > callout_drain(&sc->scan_timeout); > @@ -2387,8 +2398,6 @@ wpi_intr(void *arg) > WPI_WRITE(sc, WPI_FH_INT, r2); > > if (r1 & (WPI_INT_SW_ERR | WPI_INT_HW_ERR)) { > - struct ieee80211com *ic = ifp->if_l2com; > - > device_printf(sc->sc_dev, "fatal firmware error\n"); > #ifdef WPI_DEBUG > wpi_debug_registers(sc); > @@ -2397,7 +2406,7 @@ wpi_intr(void *arg) > DPRINTF(sc, WPI_DEBUG_HW, > "(%s)\n", (r1 & WPI_INT_SW_ERR) ? "(Software Error)" : > "(Hardware Error)"); > - ieee80211_runtask(ic, &sc->sc_reinittask); > + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); > goto end; > } > > @@ -2950,10 +2959,9 @@ wpi_scan_timeout(void *arg) > { > struct wpi_softc *sc = arg; > struct ifnet *ifp = sc->sc_ifp; > - struct ieee80211com *ic = ifp->if_l2com; > > if_printf(ifp, "scan timeout\n"); > - ieee80211_runtask(ic, &sc->sc_reinittask); > + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); > } > > static void > @@ -2961,11 +2969,10 @@ wpi_tx_timeout(void *arg) > { > struct wpi_softc *sc = arg; > struct ifnet *ifp = sc->sc_ifp; > - struct ieee80211com *ic = ifp->if_l2com; > > if_printf(ifp, "device timeout\n"); > if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); > - ieee80211_runtask(ic, &sc->sc_reinittask); > + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); > } > > static int > > Modified: head/sys/dev/wpi/if_wpivar.h > ============================================================================== > --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:30:20 2015 (r280119) > +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:32:11 2015 (r280120) > @@ -228,6 +228,9 @@ struct wpi_softc { > struct task sc_radioon_task; > struct task sc_start_task; > > + /* Taskqueue */ > + struct taskqueue *sc_tq; > + > /* Eeprom info. */ > uint8_t cap; > uint16_t rev; > From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:43:45 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 EFEF2205; Sun, 15 Mar 2015 21:43:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBEA9BF1; Sun, 15 Mar 2015 21:43:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLhiws000712; Sun, 15 Mar 2015 21:43:44 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLhijp000711; Sun, 15 Mar 2015 21:43:44 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201503152143.t2FLhijp000711@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 15 Mar 2015 21:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280121 - head/sys/security/audit X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:43:45 -0000 Author: mjg Date: Sun Mar 15 21:43:43 2015 New Revision: 280121 URL: https://svnweb.freebsd.org/changeset/base/280121 Log: audit: fix cred assignment when A_SETPMASK is used The code used to modify curproc instead of the target process. Discussed with: rwatson MFC after: 3 days Modified: head/sys/security/audit/audit_syscalls.c Modified: head/sys/security/audit/audit_syscalls.c ============================================================================== --- head/sys/security/audit/audit_syscalls.c Sun Mar 15 21:32:11 2015 (r280120) +++ head/sys/security/audit/audit_syscalls.c Sun Mar 15 21:43:43 2015 (r280121) @@ -461,7 +461,7 @@ sys_auditon(struct thread *td, struct au udata.au_aupinfo.ap_mask.am_success; newcred->cr_audit.ai_mask.am_failure = udata.au_aupinfo.ap_mask.am_failure; - td->td_proc->p_ucred = newcred; + tp->p_ucred = newcred; PROC_UNLOCK(tp); crfree(oldcred); break; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:44: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 79D81349; Sun, 15 Mar 2015 21:44:32 +0000 (UTC) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6B0BF9; Sun, 15 Mar 2015 21:44:32 +0000 (UTC) Received: by igad1 with SMTP id d1so26454130iga.0; Sun, 15 Mar 2015 14:44:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=naDJSsHa3ey3Zc84xEsblUOV5bhDwuekGay0x5Cj9VA=; b=av0j/XZtaFz6BIdnA9lfLEL8ji4p1ZIkOsvcGfGbZgrCj7JerRl2OrIRy3JkxweKED jSDlOsnOb/Aq7GUAQDyfXfd6SVTq81Hw6xaRcEoIhsoM8hgeETrrAQzhgcXJjQ5iTbNy s10/7X06qX6w1NqX7LNrb+HJumd6qgFLTQW98a+5k0FK9zSeJo5D6tqAjBOFkW66zBaR BcJXKpjNaDYvLOIRQ81aFrvSCFLNvvsIJnEtr/6YJ+1zgmg26T/Dew8+ISq1iFvHUPzg Dh2Hlt5LZ/AN39m9jBvPGSPkkYz9Mvf1tuXwkvkzOmKTWZKdJoiDH8a79EogRYAT/Htk ze2A== MIME-Version: 1.0 X-Received: by 10.43.64.134 with SMTP id xi6mr73259391icb.83.1426455871779; Sun, 15 Mar 2015 14:44:31 -0700 (PDT) Received: by 10.107.156.75 with HTTP; Sun, 15 Mar 2015 14:44:31 -0700 (PDT) In-Reply-To: References: <201503152132.t2FLWBaw095774@svn.freebsd.org> Date: Sun, 15 Mar 2015 17:44:31 -0400 Message-ID: Subject: Re: svn commit: r280120 - head/sys/dev/wpi From: Ryan Stone To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "freebsd-wireless@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, 15 Mar 2015 21:44:32 -0000 On Sun, Mar 15, 2015 at 5:35 PM, Adrian Chadd wrote: > .. promise I'm done for now. > > (God, it'd be nice to use git, or some web ui that lets me batch > review and commit things like this.) > I have a script that takes a series of git commits and makes a separate Differential review for each. I also have a second one that takes a series of commits from git and commits to the svn. I can share if anybody is interested. From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:45:11 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 1582549B; Sun, 15 Mar 2015 21:45:11 +0000 (UTC) Received: from mail-ie0-x233.google.com (mail-ie0-x233.google.com [IPv6:2607:f8b0:4001:c03::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9417BFE; Sun, 15 Mar 2015 21:45:10 +0000 (UTC) Received: by iegc3 with SMTP id c3so160046150ieg.3; Sun, 15 Mar 2015 14:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=aWV1ndr8tQroyND5Ga9j3KBkSSTVt8gyHhFVp/OX9e8=; b=xIGimrNGqd0QLzyDx0YSoMX3bYbtxzCYGFcJWLch0Y3uDXX1Jr65Xk9CEDOuGlFifJ Dh4X46lM7/XRGTy/jsqSiF3HV0e/RG3QZXP0+sZdMaRnGQEhb//FLfGkuQdG3u5AWcq0 5Fx3CmriNUFKTAolfUnA/+JNUqrtCllmPgC5JGItYJ5XbmvWgFwWuGuEq3FVTSQb1X02 hb+Ge2Gl+SJPI0SF0v3oIJFOMnOjGij88+1uX3+TBQP9JOgbVQPjgtCylu7AROSdzTgm 8ex8xnY8swW9uumiDxDz+9paHtuWcx4Oz9H32Q60d3n+yVrfUuZ0XyLPJOeavS0LsFJT mJdQ== MIME-Version: 1.0 X-Received: by 10.42.109.12 with SMTP id j12mr73028174icp.22.1426455910268; Sun, 15 Mar 2015 14:45:10 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sun, 15 Mar 2015 14:45:10 -0700 (PDT) In-Reply-To: References: <201503152132.t2FLWBaw095774@svn.freebsd.org> Date: Sun, 15 Mar 2015 14:45:10 -0700 X-Google-Sender-Auth: -GYkVRi2Fkf0zlngAiTXpmelVwI Message-ID: Subject: Re: svn commit: r280120 - head/sys/dev/wpi From: Adrian Chadd To: Ryan Stone Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "freebsd-wireless@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, 15 Mar 2015 21:45:11 -0000 On 15 March 2015 at 14:44, Ryan Stone wrote: > On Sun, Mar 15, 2015 at 5:35 PM, Adrian Chadd wrote: >> >> .. promise I'm done for now. >> >> (God, it'd be nice to use git, or some web ui that lets me batch >> review and commit things like this.) > > > I have a script that takes a series of git commits and makes a separate > Differential review for each. I also have a second one that takes a series > of commits from git and commits to the svn. I can share if anybody is > interested. Please place in tools/ somewhere. -a From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:48:02 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 1B5486F4; Sun, 15 Mar 2015 21:48:02 +0000 (UTC) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps.rulingia.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B0EEC29; Sun, 15 Mar 2015 21:47:59 +0000 (UTC) Received: from server.rulingia.com (c220-239-242-83.belrs5.nsw.optusnet.com.au [220.239.242.83]) by vps.rulingia.com (8.14.9/8.14.9) with ESMTP id t2FLliNZ037451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Mar 2015 08:47:49 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.9/8.14.9) with ESMTP id t2FLlbxn075605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 16 Mar 2015 08:47:38 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.9/8.14.9/Submit) id t2FLlb0R075604; Mon, 16 Mar 2015 08:47:37 +1100 (AEDT) (envelope-from peter) Date: Mon, 16 Mar 2015 08:47:37 +1100 From: Peter Jeremy To: Adrian Chadd Subject: Re: svn commit: r280120 - head/sys/dev/wpi Message-ID: <20150315214737.GB42847@server.rulingia.com> References: <201503152132.t2FLWBaw095774@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="O5XBE6gyVG5Rl6Rj" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "freebsd-wireless@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, 15 Mar 2015 21:48:02 -0000 --O5XBE6gyVG5Rl6Rj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2015-Mar-15 14:35:23 -0700, Adrian Chadd wrote: >.. promise I'm done for now. 69 commits (68 to the same file) and the perfect sequence only broken by pav@ and jilles@. I think you deserve some sort of reward. --=20 Peter Jeremy --O5XBE6gyVG5Rl6Rj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVBf35XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0tfMQAJ2BxXftjTt/je679vnQISom klHXnfAy/UfCmXCj7HT0W9O3VjfHYA8aAzdV2LPZ4yRxcGSJ6yYVa714L3q2kYKT ekXk68Hg0nAAWoPOw1xQVso3oMsgNNwlYsedUEyOxHsRvzCuVRtnrA2z8v52o3qU VzD6cOLRKm8QUIxSFwT5ZwxjBQ3ia5OYUORM8SsnINg4+glY5GkXmZXkmbkf20VD 8oP4QbIrhuLyGWw7+alolkkdJf4QX8d5wh3sdnN79fQILxPBO7/DiUYmQU0N64P/ hncaB4PME7V8GaCqs6n8A6MKYh+1GeQqE6xt7aRqvbLoqLrsm5r87Vxonzx53w3o wxkOYId4M4gA4kbZnSWGpYxg++Av/ifjCRFqYqyqjfpaGkGEx/x8UV17r9s6zOXU W4WGpYmcGHHnxrhm24GIvpRIGQKm+ROxo0XjpHb38h0SqfmXHPMAOkb4puTSmN6L TZKIFbl9tme3+d1c/fEg0p0axiKYxuVLPrIQBRhm+vmwlweD8j8t37jTfO/K5j4k YwcvRUf/j3oYK9PHQRWyokbwGn5B5k8ryZbxou/WTIyMav4uTYlbLSouZtj70guj QsvQDUzjpMYueD15AnkiJ/cBFG9p5vT/5X0AfDnz8brtY4x9zotbFgz3tH+UUyza ry8NkhUTCS6NTXdVmrGv =Y9N4 -----END PGP SIGNATURE----- --O5XBE6gyVG5Rl6Rj-- From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:48:50 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 A4C1F84E; Sun, 15 Mar 2015 21:48:50 +0000 (UTC) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66BC0C32; Sun, 15 Mar 2015 21:48:50 +0000 (UTC) Received: by igbue6 with SMTP id ue6so21618791igb.1; Sun, 15 Mar 2015 14:48:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=WlCJU6+bB50Hj0UaBxt59WJvgN7a62sSiLPjdxpuy9Q=; b=NOUOyA1NFONJkPcVwKYvkgBFxl20lItlja5MBWhInIQJ4qs0VzksCPKmiqotfyDFmK g6UA27tk+1DNxYkyeP4IbRNz/8KNQsZnkYCnLT5iq5kG7KvOdHgYxDBgl05W8qjLcOvK /1F9TxNn7LIqjACDquwsPbExXZCmQ0w+1sgRP0hy2tSS/6MN4++tiTshn34DoI5T/w+e H8fr0hWxEP7dgvY1j6jixhc1iuSfYFpkU6FLWiegQFldo1fAuFTEGuTl6v9Ge3BmB9ZT u08XPWR07nnXg64gfGrfPSTUNukKVcmyg2acj2aacFinj+macW4tkiHwnAQffbLaj4Ar Gwjw== MIME-Version: 1.0 X-Received: by 10.50.107.7 with SMTP id gy7mr102958448igb.49.1426456129923; Sun, 15 Mar 2015 14:48:49 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sun, 15 Mar 2015 14:48:49 -0700 (PDT) In-Reply-To: <20150315214737.GB42847@server.rulingia.com> References: <201503152132.t2FLWBaw095774@svn.freebsd.org> <20150315214737.GB42847@server.rulingia.com> Date: Sun, 15 Mar 2015 14:48:49 -0700 X-Google-Sender-Auth: aaDduTzxhBjREmKn0jZmYevJp4c Message-ID: Subject: Re: svn commit: r280120 - head/sys/dev/wpi From: Adrian Chadd To: Peter Jeremy Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "freebsd-wireless@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, 15 Mar 2015 21:48:50 -0000 On 15 March 2015 at 14:47, Peter Jeremy wrote: > On 2015-Mar-15 14:35:23 -0700, Adrian Chadd wrote: >>.. promise I'm done for now. > > 69 commits (68 to the same file) and the perfect sequence only broken > by pav@ and jilles@. I think you deserve some sort of reward. Check the bugzilla PR. I asked for him to break things up... he did exactly what I asked. That's my reward. -a From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:51:00 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 034229BA; Sun, 15 Mar 2015 21:51:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3B45C42; Sun, 15 Mar 2015 21:50:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLoxoT004248; Sun, 15 Mar 2015 21:50:59 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLoxhQ004247; Sun, 15 Mar 2015 21:50:59 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201503152150.t2FLoxhQ004247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 15 Mar 2015 21:50:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280122 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 21:51:00 -0000 Author: bapt Date: Sun Mar 15 21:50:58 2015 New Revision: 280122 URL: https://svnweb.freebsd.org/changeset/base/280122 Log: Symplify links installation by using multi variable for loop Using multi variable for loop not only simplify the code, it also ensures that the LINKS and SYMLINKS input have the right number of words Differential Revision: https://reviews.freebsd.org/D2069 Reviewed by: imp Modified: head/share/mk/bsd.links.mk Modified: head/share/mk/bsd.links.mk ============================================================================== --- head/share/mk/bsd.links.mk Sun Mar 15 21:43:43 2015 (r280121) +++ head/share/mk/bsd.links.mk Sun Mar 15 21:50:58 2015 (r280122) @@ -7,25 +7,11 @@ afterinstall: _installlinks .ORDER: realinstall _installlinks _installlinks: -.if defined(LINKS) && !empty(LINKS) - @set ${LINKS}; \ - while test $$# -ge 2; do \ - l=${DESTDIR}$$1; \ - shift; \ - t=${DESTDIR}$$1; \ - shift; \ - ${ECHO} $$t -\> $$l; \ - ${INSTALL_LINK} $$l $$t; \ - done; true -.endif -.if defined(SYMLINKS) && !empty(SYMLINKS) - @set ${SYMLINKS}; \ - while test $$# -ge 2; do \ - l=$$1; \ - shift; \ - t=${DESTDIR}$$1; \ - shift; \ - ${ECHO} $$t -\> $$l; \ - ${INSTALL_SYMLINK} $$l $$t; \ - done; true -.endif +.for s t in ${LINKS} + @${ECHO} "$t -> $s" ;\ + ${INSTALL_LINK} $s $t +.endfor +.for s t in ${SYMLINKS} + @${ECHO} "$t -> $s" ;\ + ${INSTALL_SYMLINK} $s $t +.endfor From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:53:55 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 9968AB34; Sun, 15 Mar 2015 21:53:55 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A5D2CF7; Sun, 15 Mar 2015 21:53:54 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2FLrnI0087366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 Mar 2015 23:53:49 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2FLrnI0087366 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2FLrmpe087365; Sun, 15 Mar 2015 23:53:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 15 Mar 2015 23:53:48 +0200 From: Konstantin Belousov To: Ian Lepore Subject: Re: svn commit: r279993 - in head/sys: dev/cxgb dev/cxgbe kern vm Message-ID: <20150315215348.GV2379@kib.kiev.ua> References: <201503141708.t2EH8TdR074383@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503141708.t2EH8TdR074383@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 21:53:55 -0000 On Sat, Mar 14, 2015 at 05:08:29PM +0000, Ian Lepore wrote: > Author: ian > Date: Sat Mar 14 17:08:28 2015 > New Revision: 279993 > URL: https://svnweb.freebsd.org/changeset/base/279993 > > Log: > Set the SBUF_INCLUDENUL flag in sbuf_new_for_sysctl() so that sysctl > strings returned to userland include the nulterm byte. > > Some uses of sbuf_new_for_sysctl() write binary data rather than strings; > clear the SBUF_INCLUDENUL flag after calling sbuf_new_for_sysctl() in > those cases. (Note that the sbuf code still automatically adds a nulterm > byte in sbuf_finish(), but since it's not included in the length it won't > get copied to userland along with the binary data.) > > Remove explicit adding of a nulterm byte in a couple places now that it > gets done automatically by the sbuf drain code. > > PR: 195668 I get the following panic on r280044: panic: wrote past end of sbuf (256 >= 256) cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at 0xffffffff8028db5b = db_trace_self_wrapper+0x2b/frame 0xfffffe022b6af5e0 vpanic() at 0xffffffff80356ad9 = vpanic+0x189/frame 0xfffffe022b6af660 kassert_panic() at 0xffffffff80356942 = kassert_panic+0x192/frame 0xfffffe022b6af6f0 sbuf_delete() at 0xffffffff803a3cad = sbuf_delete+0xad/frame 0xfffffe022b6af710 sysctl_kern_proc_args() at 0xffffffff80349b6d = sysctl_kern_proc_args+0x21d/frame 0xfffffe022b6af7a0 sysctl_root_handler_locked() at 0xffffffff80364034 = sysctl_root_handler_locked+0x94/frame 0xfffffe022b6af7e0 sysctl_root() at 0xffffffff80363878 = sysctl_root+0x188/frame 0xfffffe022b6af830 userland_sysctl() at 0xffffffff80363e12 = userland_sysctl+0x192/frame 0xfffffe022b6af8d0 sys___sysctl() at 0xffffffff80363c44 = sys___sysctl+0x74/frame 0xfffffe022b6af980 amd64_syscall() at 0xffffffff8057e9be = amd64_syscall+0x2ae/frame 0xfffffe022b6afab0 Xfast_syscall() at 0xffffffff8055d9bb = Xfast_syscall+0xfb/frame 0xfffffe022b6afab0 --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x800f9db0a, rsp = 0x7fffffffe2c8, rbp = 0x7fffffffe300 --- From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:56:13 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 E991AC96; Sun, 15 Mar 2015 21:56:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D476BD14; Sun, 15 Mar 2015 21:56:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLuDrC005875; Sun, 15 Mar 2015 21:56:13 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLuDUw005870; Sun, 15 Mar 2015 21:56:13 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152156.t2FLuDUw005870@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:56:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280123 - 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: Sun, 15 Mar 2015 21:56:14 -0000 Author: adrian Date: Sun Mar 15 21:56:12 2015 New Revision: 280123 URL: https://svnweb.freebsd.org/changeset/base/280123 Log: Start fleshing out some MAC address helper functions. A lot of these embedded boards don't have a unique MAC address per device stored somewhere unique - sometimes they'll have one MAC for both arge NICs; someties they'll have one MAC for both arge NICs /and/ the ath NICs. In these instances, we need to derive device specific MAC addresses from the base MAC address. These functions will be used by some follow-up code that'll slot into if_arge and if_ath. Added: head/sys/mips/atheros/ar71xx_macaddr.c (contents, props changed) head/sys/mips/atheros/ar71xx_macaddr.h (contents, props changed) Modified: head/sys/mips/atheros/files.ar71xx Added: head/sys/mips/atheros/ar71xx_macaddr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/ar71xx_macaddr.c Sun Mar 15 21:56:12 2015 (r280123) @@ -0,0 +1,107 @@ +/*- + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +/* + * Some boards don't have a separate MAC address for each individual + * device on-board, but instead need to derive them from a single MAC + * address stored somewhere. + */ + +/* + * Initialise a MAC address 'dst' from a MAC address 'src'. + * + * 'offset' is added to the low three bytes to allow for sequential + * MAC addresses to be derived from a single one. + * + * 'is_local' is whether this 'dst' should be made a local MAC address. + * + * Returns 0 if it was successfully initialised, -1 on error. + */ +int +ar71xx_mac_addr_init(unsigned char *dst, const unsigned char *src, + int offset, int is_local) +{ + int t; + + if (dst == NULL || src == NULL) + return (-1); + + /* XXX TODO: validate 'src' is a valid MAC address */ + + t = (((uint32_t) src[3]) << 16) + + (((uint32_t) src[4]) << 8) + + ((uint32_t) src[5]); + + /* Note: this is handles both positive and negative offsets */ + t += offset; + + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + dst[3] = (t >> 16) & 0xff; + dst[4] = (t >> 8) & 0xff; + dst[5] = t & 0xff; + + if (is_local) + dst[0] |= 0x02; + + /* Everything's okay */ + return (0); +} + +/* + * Initialise a random MAC address for use by if_arge.c and whatever + * else requires it. + * + * Returns 0 on success, -1 on error. + */ +int +ar71xx_mac_addr_random_init(unsigned char *dst) +{ + uint32_t rnd; + + rnd = arc4random(); + + dst[0] = 'b'; + dst[1] = 's'; + dst[2] = 'd'; + dst[3] = (rnd >> 24) & 0xff; + dst[4] = (rnd >> 16) & 0xff; + dst[5] = (rnd >> 8) & 0xff; + + return (0); +} Added: head/sys/mips/atheros/ar71xx_macaddr.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/ar71xx_macaddr.h Sun Mar 15 21:56:12 2015 (r280123) @@ -0,0 +1,37 @@ +/*- + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __ATHEROS_AR71XX_MACADDR_H__ +#define __ATHEROS_AR71XX_MACADDR_H__ + +extern int ar71xx_mac_addr_init(unsigned char *dst, const unsigned char *src, + int offset, int is_local); +extern int ar71xx_mac_addr_random_init(unsigned char *dst); + +#endif /* __ATHEROS_AR71XX_MACADDR_H__ */ Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Sun Mar 15 21:50:58 2015 (r280122) +++ head/sys/mips/atheros/files.ar71xx Sun Mar 15 21:56:12 2015 (r280123) @@ -9,6 +9,7 @@ mips/atheros/ar71xx_pci.c optional ar71x mips/atheros/ar724x_pci.c optional ar724x_pci pci mips/atheros/ar71xx_pci_bus_space.c optional pci mips/atheros/ar71xx_spi.c optional ar71xx_spi +mips/atheros/ar71xx_macaddr.c standard mips/atheros/pcf2123_rtc.c optional pcf2123_rtc ar71xx_spi mips/atheros/ar71xx_wdog.c optional ar71xx_wdog mips/atheros/if_arge.c optional arge @@ -28,5 +29,6 @@ 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 +mips/atheros/qca955x_apb.c optional qca955x_apb dev/hwpmc/hwpmc_mips24k.c optional hwpmc_mips24k From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:56:42 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 B4DA5DDA; Sun, 15 Mar 2015 21:56: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 A1429D1C; Sun, 15 Mar 2015 21:56: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 t2FLugN8005971; Sun, 15 Mar 2015 21:56:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLug29005970; Sun, 15 Mar 2015 21:56:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152156.t2FLug29005970@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280124 - 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: Sun, 15 Mar 2015 21:56:42 -0000 Author: adrian Date: Sun Mar 15 21:56:41 2015 New Revision: 280124 URL: https://svnweb.freebsd.org/changeset/base/280124 Log: Use ar71xx_mac_addr_random_init() instead of a hand-rolled random MAC address. Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Sun Mar 15 21:56:12 2015 (r280123) +++ head/sys/mips/atheros/if_arge.c Sun Mar 15 21:56:41 2015 (r280124) @@ -96,6 +96,7 @@ MODULE_VERSION(arge, 1); #include #include #include +#include typedef enum { ARGE_DBG_MII = 0x00000001, @@ -567,7 +568,6 @@ arge_attach(device_t dev) struct ifnet *ifp; struct arge_softc *sc; int error = 0, rid; - uint32_t rnd; int is_base_mac_empty, i; uint32_t hint; long eeprom_mac_addr = 0; @@ -746,14 +746,7 @@ arge_attach(device_t dev) if (bootverbose) device_printf(dev, "Generating random ethernet address.\n"); - - rnd = arc4random(); - sc->arge_eaddr[0] = 'b'; - sc->arge_eaddr[1] = 's'; - sc->arge_eaddr[2] = 'd'; - sc->arge_eaddr[3] = (rnd >> 24) & 0xff; - sc->arge_eaddr[4] = (rnd >> 16) & 0xff; - sc->arge_eaddr[5] = (rnd >> 8) & 0xff; + (void) ar71xx_mac_addr_random_init(sc->arge_eaddr); } /* From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 21:57:45 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 082DB15; Sun, 15 Mar 2015 21:57:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E86C8D2E; Sun, 15 Mar 2015 21:57:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLviNd006269; Sun, 15 Mar 2015 21:57:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLvihO006268; Sun, 15 Mar 2015 21:57:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201503152157.t2FLvihO006268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 15 Mar 2015 21:57:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280125 - head/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 21:57:45 -0000 Author: markj Date: Sun Mar 15 21:57:44 2015 New Revision: 280125 URL: https://svnweb.freebsd.org/changeset/base/280125 Log: Add a missing format string argument. PR: 197391 MFC after: 3 days Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c Sun Mar 15 21:56:41 2015 (r280124) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c Sun Mar 15 21:57:44 2015 (r280125) @@ -492,7 +492,7 @@ write_type(void *arg1, void *arg2) if (i > CTF_MAX_VLEN) { terminate("function %s has too many args: %d > %d\n", - i, CTF_MAX_VLEN); + tdesc_name(tp), i, CTF_MAX_VLEN); } ctt.ctt_info = CTF_TYPE_INFO(CTF_K_FUNCTION, isroot, i); From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 22:11: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 313DD3CC for ; Sun, 15 Mar 2015 22:11:59 +0000 (UTC) Received: from mail-yh0-f41.google.com (mail-yh0-f41.google.com [209.85.213.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5A61ED1 for ; Sun, 15 Mar 2015 22:11:58 +0000 (UTC) Received: by yhpt93 with SMTP id t93so11729406yhp.0 for ; Sun, 15 Mar 2015 15:11:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=9T3cvWjMtPHXmep7TwGOgSOguiIZj4zn62oWMe/XJbk=; b=Ipj2qOxtDNPpcT9RRaJMU+3FZyPixGlgDPGg4JvJy5gEpNRrBou21nfVRx+SeHjN+s Gp6xXWTvdW18pG0sXRLshkNjsQUWolODZauEwbO0sLYgOkIQBBSiw0DnKqRKhNOrambc f+fHOE/UgbTAVQm8JchuLAGW//p+9p7Lrmg8mYDFKLaTQiYnnO/s1Mq4UkmM5llB6q1d 12P6lZv3151wTnLXR1ktteKcguDar/+1CJUwaEv4PPknPR+KTbKha6aUXngeCWFZKCj9 uF7SVyeHrxJNkem3GnnGa7lVFNbuDoFE2vD3EatpCfZ0LPbMHdLbBWXJl3eQUj1MMYUc 6F3w== X-Gm-Message-State: ALoCoQnS1WyE5mJrR2+Qpw7UQG8bqxYbC3fel1swv7fzMNTJedrIvdAWA34bPFwoAp8DPgCAUiLT MIME-Version: 1.0 X-Received: by 10.236.40.74 with SMTP id e50mr59000899yhb.199.1426457512586; Sun, 15 Mar 2015 15:11:52 -0700 (PDT) Received: by 10.170.104.86 with HTTP; Sun, 15 Mar 2015 15:11:52 -0700 (PDT) In-Reply-To: References: <201503152132.t2FLWBaw095774@svn.freebsd.org> Date: Sun, 15 Mar 2015 23:11:52 +0100 Message-ID: Subject: Re: svn commit: r280120 - head/sys/dev/wpi From: Oliver Pinter To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "freebsd-wireless@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, 15 Mar 2015 22:11:59 -0000 On Sun, Mar 15, 2015 at 10:35 PM, Adrian Chadd wrote: > .. promise I'm done for now. > > (God, it'd be nice to use git, or some web ui that lets me batch > review and commit things like this.) http://svnweb.freebsd.org/socsvn/soc2014/op/tools/svn-cherry-pick-from-git.csh?view=markup > > > -a > > > On 15 March 2015 at 14:32, Adrian Chadd wrote: >> Author: adrian >> Date: Sun Mar 15 21:32:11 2015 >> New Revision: 280120 >> URL: https://svnweb.freebsd.org/changeset/base/280120 >> >> Log: >> Add a new taskqueue (device specific, not net80211 ic->tq); use it for >> device restart. >> >> (Committers note - once scan overhaul and a few other things have been >> fixed in net80211 to not block things in the taskqueue, this can disappear >> and the device specific taskqueues in other drivers can also go away.) >> >> PR: kern/197143 >> Submitted by: Andriy Voskoboinyk >> >> Modified: >> head/sys/dev/wpi/if_wpi.c >> head/sys/dev/wpi/if_wpivar.h >> >> Modified: head/sys/dev/wpi/if_wpi.c >> ============================================================================== >> --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:30:20 2015 (r280119) >> +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:32:11 2015 (r280120) >> @@ -532,6 +532,14 @@ wpi_attach(device_t dev) >> TASK_INIT(&sc->sc_radioon_task, 0, wpi_radio_on, sc); >> TASK_INIT(&sc->sc_start_task, 0, wpi_start_task, sc); >> >> + sc->sc_tq = taskqueue_create("wpi_taskq", M_WAITOK, >> + taskqueue_thread_enqueue, &sc->sc_tq); >> + error = taskqueue_start_threads(&sc->sc_tq, 1, 0, "wpi_taskq"); >> + if (error != 0) { >> + device_printf(dev, "can't start threads, error %d\n", error); >> + goto fail; >> + } >> + >> wpi_sysctlattach(sc); >> >> /* >> @@ -688,6 +696,9 @@ wpi_detach(device_t dev) >> >> wpi_stop(sc); >> >> + taskqueue_drain_all(sc->sc_tq); >> + taskqueue_free(sc->sc_tq); >> + >> callout_drain(&sc->watchdog_rfkill); >> callout_drain(&sc->tx_timeout); >> callout_drain(&sc->scan_timeout); >> @@ -2387,8 +2398,6 @@ wpi_intr(void *arg) >> WPI_WRITE(sc, WPI_FH_INT, r2); >> >> if (r1 & (WPI_INT_SW_ERR | WPI_INT_HW_ERR)) { >> - struct ieee80211com *ic = ifp->if_l2com; >> - >> device_printf(sc->sc_dev, "fatal firmware error\n"); >> #ifdef WPI_DEBUG >> wpi_debug_registers(sc); >> @@ -2397,7 +2406,7 @@ wpi_intr(void *arg) >> DPRINTF(sc, WPI_DEBUG_HW, >> "(%s)\n", (r1 & WPI_INT_SW_ERR) ? "(Software Error)" : >> "(Hardware Error)"); >> - ieee80211_runtask(ic, &sc->sc_reinittask); >> + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); >> goto end; >> } >> >> @@ -2950,10 +2959,9 @@ wpi_scan_timeout(void *arg) >> { >> struct wpi_softc *sc = arg; >> struct ifnet *ifp = sc->sc_ifp; >> - struct ieee80211com *ic = ifp->if_l2com; >> >> if_printf(ifp, "scan timeout\n"); >> - ieee80211_runtask(ic, &sc->sc_reinittask); >> + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); >> } >> >> static void >> @@ -2961,11 +2969,10 @@ wpi_tx_timeout(void *arg) >> { >> struct wpi_softc *sc = arg; >> struct ifnet *ifp = sc->sc_ifp; >> - struct ieee80211com *ic = ifp->if_l2com; >> >> if_printf(ifp, "device timeout\n"); >> if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); >> - ieee80211_runtask(ic, &sc->sc_reinittask); >> + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); >> } >> >> static int >> >> Modified: head/sys/dev/wpi/if_wpivar.h >> ============================================================================== >> --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:30:20 2015 (r280119) >> +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:32:11 2015 (r280120) >> @@ -228,6 +228,9 @@ struct wpi_softc { >> struct task sc_radioon_task; >> struct task sc_start_task; >> >> + /* Taskqueue */ >> + struct taskqueue *sc_tq; >> + >> /* Eeprom info. */ >> uint8_t cap; >> uint16_t rev; >> > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 22:44:54 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 4F812991; Sun, 15 Mar 2015 22:44:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B85B216; Sun, 15 Mar 2015 22:44:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FMirZT029469; Sun, 15 Mar 2015 22:44:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FMirGh029468; Sun, 15 Mar 2015 22:44:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503152244.t2FMirGh029468@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Mar 2015 22:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280126 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 22:44:54 -0000 Author: mav Date: Sun Mar 15 22:44:53 2015 New Revision: 280126 URL: https://svnweb.freebsd.org/changeset/base/280126 Log: Pre-allocate one extra request per processing thread. Processing threads call callbacks before freeing requests. As result, new requests may arrive before old ones are freed. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/block_if.c Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Sun Mar 15 21:57:44 2015 (r280125) +++ head/usr.sbin/bhyve/block_if.c Sun Mar 15 22:44:53 2015 (r280126) @@ -54,8 +54,8 @@ __FBSDID("$FreeBSD$"); #define BLOCKIF_SIG 0xb109b109 -#define BLOCKIF_MAXREQ 64 #define BLOCKIF_NUMTHR 8 +#define BLOCKIF_MAXREQ (64 + BLOCKIF_NUMTHR) enum blockop { BOP_READ, From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 23:04:20 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 E745ED8C; Sun, 15 Mar 2015 23:04:19 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A576A5EF; Sun, 15 Mar 2015 23:04:19 +0000 (UTC) Received: by iegc3 with SMTP id c3so160801145ieg.3; Sun, 15 Mar 2015 16:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=pN/8QAMKTJJYO59Eyush1ShpI65unm7l1hFi23aM2uM=; b=zxTjqa37UbPqetVbzQEs9uFiNcHockvWEf7ILvKpjFCmu7a2rd/+wI3Z65i8vMsScB QBArFMPfcx63iGZc7oRvD7eltdKau6ONyWRZbS0cGkOqFFvmmIymPiNRoW1cQ9gIaSoJ WohcjQON0NSjyW8ALIm2XCb/zijgzh1rjXDD6vTScMGrzVJBwrHDyaf4xSlfkGeQ9qaw xl4dx+wtrD0ewi8OmbpXACIDROn9dpDGrvvZfGAh7XEDHMkPL05tgMwogJqOSAHxUQWB +wW5VAE34+AgQd+Vk9bAvV0Rw1qfhHgo+7+MRNLb3cEQSnch0oXktQBphpCQQQdwOyvf 1uzw== MIME-Version: 1.0 X-Received: by 10.50.111.202 with SMTP id ik10mr103525821igb.37.1426460659047; Sun, 15 Mar 2015 16:04:19 -0700 (PDT) Received: by 10.107.156.75 with HTTP; Sun, 15 Mar 2015 16:04:18 -0700 (PDT) In-Reply-To: References: <201503152132.t2FLWBaw095774@svn.freebsd.org> Date: Sun, 15 Mar 2015 19:04:18 -0400 Message-ID: Subject: Re: svn commit: r280120 - head/sys/dev/wpi From: Ryan Stone To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "freebsd-wireless@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, 15 Mar 2015 23:04:20 -0000 Anyone want to review them before I commit them? (I'm going to put them in tools/tools/git/) On Sun, Mar 15, 2015 at 5:45 PM, Adrian Chadd wrote: > On 15 March 2015 at 14:44, Ryan Stone wrote: > > On Sun, Mar 15, 2015 at 5:35 PM, Adrian Chadd > wrote: > >> > >> .. promise I'm done for now. > >> > >> (God, it'd be nice to use git, or some web ui that lets me batch > >> review and commit things like this.) > > > > > > I have a script that takes a series of git commits and makes a separate > > Differential review for each. I also have a second one that takes a > series > > of commits from git and commits to the svn. I can share if anybody is > > interested. > > Please place in tools/ somewhere. > > > > -a > From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 23:04:49 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 6445AF1F for ; Sun, 15 Mar 2015 23:04:49 +0000 (UTC) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CBEB85F8 for ; Sun, 15 Mar 2015 23:04:48 +0000 (UTC) Received: by wifj2 with SMTP id j2so29088081wif.1 for ; Sun, 15 Mar 2015 16:04:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Hh2rKcFlKHBCPoHIbNI0vzr+3ArKcdddOiPYT4OAGHs=; b=kJyOF9Ku1HKskcl2P5gDc+UX9JPMDpUuibFWi1BcwfCwPQkZRlV005m5e7ir3t4doe SyOi3RMP24i0snAYdkk/AIS588s36hTBDLTT2+tdiQA1bUPnvyzosr3hPwVXIZBAzaw7 vsVAz2kIkeTCQUposCzRIl/f8zlUBtL52M74X9lVdK1GbYIso3o0/TL+JG1GPPqz71eU QLDOpWyHsuDgGcsYsqezNw5+4da5fUNm2rU75Atx/PKwTySVCs1Irj1RVWAAP8jTh3aI lI9f8TqIcY3m9roGqmxafYkOLY7zO84sYYMV1ziSB01s5W/WiftRD3CUbfl0sYVAjdIh wpBQ== X-Gm-Message-State: ALoCoQn2PlPVhDnwLCsDyh3KBZde9zWcXAm6yRFXHlDZwLgyzuY0tbpnwg9AnPU06m3WdjlAPgsK X-Received: by 10.194.75.193 with SMTP id e1mr113955083wjw.126.1426460681347; Sun, 15 Mar 2015 16:04:41 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id pa4sm12787222wjb.11.2015.03.15.16.04.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2015 16:04:40 -0700 (PDT) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <55061002.4070005@freebsd.org> Date: Sun, 15 Mar 2015 23:04:34 +0000 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280122 - head/share/mk References: <201503152150.t2FLoxhQ004247@svn.freebsd.org> In-Reply-To: <201503152150.t2FLoxhQ004247@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 23:04:49 -0000 This appears to break buildworld: make[4]: "/usr/home/smh/freebsd/base/head/share/mk/bsd.links.mk" line 10: Wrong number of words (1) in .for substitution list with 2 vars make[4]: Fatal errors encountered -- cannot continue make[4]: stopped in /usr/home/smh/freebsd/base/head/usr.bin/mandoc *** [cleandir_subdir_mandoc] Error code 1 On 15/03/2015 21:50, Baptiste Daroussin wrote: > Author: bapt > Date: Sun Mar 15 21:50:58 2015 > New Revision: 280122 > URL: https://svnweb.freebsd.org/changeset/base/280122 > > Log: > Symplify links installation by using multi variable for loop > > Using multi variable for loop not only simplify the code, it also ensures that > the LINKS and SYMLINKS input have the right number of words > > Differential Revision: https://reviews.freebsd.org/D2069 > Reviewed by: imp > > Modified: > head/share/mk/bsd.links.mk > > Modified: head/share/mk/bsd.links.mk > ============================================================================== > --- head/share/mk/bsd.links.mk Sun Mar 15 21:43:43 2015 (r280121) > +++ head/share/mk/bsd.links.mk Sun Mar 15 21:50:58 2015 (r280122) > @@ -7,25 +7,11 @@ > afterinstall: _installlinks > .ORDER: realinstall _installlinks > _installlinks: > -.if defined(LINKS) && !empty(LINKS) > - @set ${LINKS}; \ > - while test $$# -ge 2; do \ > - l=${DESTDIR}$$1; \ > - shift; \ > - t=${DESTDIR}$$1; \ > - shift; \ > - ${ECHO} $$t -\> $$l; \ > - ${INSTALL_LINK} $$l $$t; \ > - done; true > -.endif > -.if defined(SYMLINKS) && !empty(SYMLINKS) > - @set ${SYMLINKS}; \ > - while test $$# -ge 2; do \ > - l=$$1; \ > - shift; \ > - t=${DESTDIR}$$1; \ > - shift; \ > - ${ECHO} $$t -\> $$l; \ > - ${INSTALL_SYMLINK} $$l $$t; \ > - done; true > -.endif > +.for s t in ${LINKS} > + @${ECHO} "$t -> $s" ;\ > + ${INSTALL_LINK} $s $t > +.endfor > +.for s t in ${SYMLINKS} > + @${ECHO} "$t -> $s" ;\ > + ${INSTALL_SYMLINK} $s $t > +.endfor > From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 23:04:55 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 C62EBDD; Sun, 15 Mar 2015 23:04:55 +0000 (UTC) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C91B95F9; Sun, 15 Mar 2015 23:04:54 +0000 (UTC) Received: by iecvj10 with SMTP id vj10so153319231iec.0; Sun, 15 Mar 2015 16:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Vyb4UveMZEy1MQ1TN6Il06hlcV0Tzc8gqlrl0q8MjR8=; b=ZzEnQM6O5OOeq7vKrHluVhTmsoWYqmgOo4LXbJBA8fvUrLfOMRSmmX6sXFxfZagAZT hfd4lFaTJOfhYhZg5+rhRft/G+ODRB4IEnq5KdtcqYK2jSMTbHM6fAsSnN0Pe2MO3Cuk h/pXxOsT/iCt/etLHxqBkMMYOB56yan84VnBjLlOsL2OggosfMhJyQknxbrpAJgCG1hk dfgDAjsdIuOQ7nLIa5xRnopA/vSzWRUFlmjbklzOWhUecZ2kTforxSw0X8KJ5BWnHF80 ONPyrFlpbSYJM/L+sKnmnSlwWZg6w6ymuLkW2SeB5mNUU01yZDFivv221HeClRkI3TZ8 frTg== MIME-Version: 1.0 X-Received: by 10.42.93.83 with SMTP id w19mr73453697icm.37.1426460693838; Sun, 15 Mar 2015 16:04:53 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sun, 15 Mar 2015 16:04:53 -0700 (PDT) In-Reply-To: References: <201503152132.t2FLWBaw095774@svn.freebsd.org> Date: Sun, 15 Mar 2015 16:04:53 -0700 X-Google-Sender-Auth: kiEtpP6_5agRf2Y1O1rhw4eniUg Message-ID: Subject: Re: svn commit: r280120 - head/sys/dev/wpi From: Adrian Chadd To: Ryan Stone Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "freebsd-wireless@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, 15 Mar 2015 23:04:55 -0000 On 15 March 2015 at 16:04, Ryan Stone wrote: > Anyone want to review them before I commit them? (I'm going to put them in > tools/tools/git/) Sure, but we can always churn what's in tools/tools/ . -a From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 23: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 EC9FC233; Sun, 15 Mar 2015 23:05:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7555606; Sun, 15 Mar 2015 23:05:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FN5bnM039620; Sun, 15 Mar 2015 23:05:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FN5bLP039619; Sun, 15 Mar 2015 23:05:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503152305.t2FN5bLP039619@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 15 Mar 2015 23:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280127 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 23:05:38 -0000 Author: kib Date: Sun Mar 15 23:05:36 2015 New Revision: 280127 URL: https://svnweb.freebsd.org/changeset/base/280127 Log: Fix build with clang 3.6, silence -Wcast-qual warning. Sponsored by: The FreeBSD Foundation Acked by: adrian Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 22:44:53 2015 (r280126) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 23:05:36 2015 (r280127) @@ -4555,7 +4555,8 @@ wpi_process_key(struct ieee80211vap *vap if (vap->iv_state == IEEE80211_S_RUN) { ieee80211_iterate_nodes(&ic->ic_sta, - set ? wpi_load_key_cb : wpi_del_key_cb, (void *)k); + set ? wpi_load_key_cb : wpi_del_key_cb, + __DECONST(void *, k)); } return 1; From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 23:08:13 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 E91AE386; Sun, 15 Mar 2015 23:08:12 +0000 (UTC) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [IPv6:2a00:1450:400c:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7136B61D; Sun, 15 Mar 2015 23:08:12 +0000 (UTC) Received: by wegp1 with SMTP id p1so26636099weg.1; Sun, 15 Mar 2015 16:08:09 -0700 (PDT) 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:in-reply-to:user-agent; bh=MwOLfKZdxy6mNR/2Kwm331LN5252CsN6Pw61SwY+ZTY=; b=BSPLp2eel1MAVaDhrEmIDBRQtuM9h2dqiA4l8X5PP/3NQrc3h6gchhvOEh+Tsmy8z+ Oz6PhoEElan7CTOsivkiPJWTeiZailWFj57yQYr0CfDnYRh/2KUDLi8QvZKIqq066sxp 7FjiiJc+vv/MY9un3Ig5M2dymZcoHD15qKzmoY40j1hsLizylg683YwsnvEl5C1hUrTC nd72lhwtfLNHfJRthVBok3ea8t6dPN6PhVn0qfMdT+EsAtVzIVNxZsLrB75ipuSFC8F1 YXVStOKIoMACgazr3tdTM07X7T8GF4xh+u1M6Ujos6QZBsE58bFk1yngK5VUXFldCUgw eaiA== X-Received: by 10.180.20.238 with SMTP id q14mr33135605wie.70.1426460889870; Sun, 15 Mar 2015 16:08:09 -0700 (PDT) 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 l4sm12758385wiw.6.2015.03.15.16.08.07 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 15 Mar 2015 16:08:08 -0700 (PDT) Date: Mon, 16 Mar 2015 00:08:04 +0100 From: Mateusz Guzik To: Ryan Stone Subject: Re: svn commit: r280120 - head/sys/dev/wpi Message-ID: <20150315230803.GA21715@dft-labs.eu> References: <201503152132.t2FLWBaw095774@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "freebsd-wireless@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, 15 Mar 2015 23:08:13 -0000 On Sun, Mar 15, 2015 at 07:04:18PM -0400, Ryan Stone wrote: > Anyone want to review them before I commit them? (I'm going to put them in > tools/tools/git/) > I would say it would be nice see them + rough howto before we land stuff in the tree. I'm definitely more than happy to see usable git -> svn tools, largely because i'm too lazy to even try to write ones myself. > On Sun, Mar 15, 2015 at 5:45 PM, Adrian Chadd wrote: > > > On 15 March 2015 at 14:44, Ryan Stone wrote: > > > On Sun, Mar 15, 2015 at 5:35 PM, Adrian Chadd > > wrote: > > >> > > >> .. promise I'm done for now. > > >> > > >> (God, it'd be nice to use git, or some web ui that lets me batch > > >> review and commit things like this.) > > > > > > > > > I have a script that takes a series of git commits and makes a separate > > > Differential review for each. I also have a second one that takes a > > series > > > of commits from git and commits to the svn. I can share if anybody is > > > interested. > > > > Please place in tools/ somewhere. > > > > > > > > -a > > -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 23:29:54 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 724AE82A; Sun, 15 Mar 2015 23:29:54 +0000 (UTC) Received: from mail-we0-x231.google.com (mail-we0-x231.google.com [IPv6:2a00:1450:400c:c03::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1060785D; Sun, 15 Mar 2015 23:29:54 +0000 (UTC) Received: by wegp1 with SMTP id p1so26819302weg.1; Sun, 15 Mar 2015 16:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=5o/wMhRZ658Phm0at5JNdcCqIufwzhktY41JbNHfZEk=; b=j6F0D14LaaWYyDwUpM6z3apUXL7LOjJpY1Vq2/IxheuTuRjkqSNSBalfQZAZJLxK5c E+zGOBGiWbBKz1865YAzn0pK6jpAy/b9UH3hu1ip/rzCId+u06xoLQlVW96AffgFUwrX 5Vxa2PfdpOovopJjg9XOSxwXCQ/uBDgcUPW9BYjMUrNP943Lipqv0OUszISHRr8LVEQa Kz2OadWXIKKnwkWC3LSJ/99byYD4ZiI9kPZsPowmnJ0PQ6tq/j1gQMnCcl8IG+CHUCBg s5xxq27pBKAXd63TTRxWS08wS4ob6JGN3pKXB3eZ0/dBizx0V5ujoII4WuyGLV4rlIaK Fntw== X-Received: by 10.194.11.9 with SMTP id m9mr115208574wjb.82.1426462192417; Sun, 15 Mar 2015 16:29:52 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id s5sm8281168wia.1.2015.03.15.16.29.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2015 16:29:51 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 16 Mar 2015 00:29:49 +0100 From: Baptiste Daroussin To: Steven Hartland Subject: Re: svn commit: r280122 - head/share/mk Message-ID: <20150315232949.GD74861@ivaldir.etoilebsd.net> References: <201503152150.t2FLoxhQ004247@svn.freebsd.org> <55061002.4070005@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3Gf/FFewwPeBMqCJ" Content-Disposition: inline In-Reply-To: <55061002.4070005@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 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, 15 Mar 2015 23:29:54 -0000 --3Gf/FFewwPeBMqCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 15, 2015 at 11:04:34PM +0000, Steven Hartland wrote: > This appears to break buildworld: >=20 > make[4]: "/usr/home/smh/freebsd/base/head/share/mk/bsd.links.mk" line=20 > 10: Wrong number of words (1) in .for substitution list with 2 vars > make[4]: Fatal errors encountered -- cannot continue > make[4]: stopped in /usr/home/smh/freebsd/base/head/usr.bin/mandoc > *** [cleandir_subdir_mandoc] Error code 1 >=20 So it does its job at checking, sorry about the breakage I forgot I had this local patch in mandoc for a while, committed now. Best regards, Bapt --3Gf/FFewwPeBMqCJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUGFe0ACgkQ8kTtMUmk6ExdOACfQGtqzcVi1Yr5SKSfxmlhRVrw JUUAn3ekUte+cXJ6DsKS+Ka1Xc0DwU32 =wefc -----END PGP SIGNATURE----- --3Gf/FFewwPeBMqCJ-- From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 23:31:22 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 59615978; Sun, 15 Mar 2015 23:31:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 455BD888; Sun, 15 Mar 2015 23:31:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FNVMw1008673; Sun, 15 Mar 2015 23:31:22 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FNVLeO008672; Sun, 15 Mar 2015 23:31:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201503152331.t2FNVLeO008672@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 15 Mar 2015 23:31:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280128 - head/usr.bin/mandoc X-SVN-Group: head MIME-Version: 1.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, 15 Mar 2015 23:31:22 -0000 Author: bapt Date: Sun Mar 15 23:31:20 2015 New Revision: 280128 URL: https://svnweb.freebsd.org/changeset/base/280128 Log: Remove bad and useless LINKS Modified: head/usr.bin/mandoc/Makefile Modified: head/usr.bin/mandoc/Makefile ============================================================================== --- head/usr.bin/mandoc/Makefile Sun Mar 15 23:05:36 2015 (r280127) +++ head/usr.bin/mandoc/Makefile Sun Mar 15 23:31:20 2015 (r280128) @@ -6,7 +6,6 @@ MDOCMLDIR= ${.CURDIR}/../../contrib/mdoc PROG= mandoc FILES= example.style.css style.css FILESDIR= ${SHAREDIR}/mdocml -LINKS= mdocml MAN= mandoc.1 eqn.7 mandoc_char.7 tbl.7 man.7 mdoc.7 # roff.7 MLINKS= mandoc.1 mdocml.1 From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 23:40:51 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 819E3B84; Sun, 15 Mar 2015 23:40:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DC698DB; Sun, 15 Mar 2015 23:40:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FNepAe011778; Sun, 15 Mar 2015 23:40:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FNepUB011777; Sun, 15 Mar 2015 23:40:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201503152340.t2FNepUB011777@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 15 Mar 2015 23:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280129 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 15 Mar 2015 23:40:51 -0000 Author: bapt Date: Sun Mar 15 23:40:50 2015 New Revision: 280129 URL: https://svnweb.freebsd.org/changeset/base/280129 Log: Fix DESTDIR support Modified: head/share/mk/bsd.links.mk Modified: head/share/mk/bsd.links.mk ============================================================================== --- head/share/mk/bsd.links.mk Sun Mar 15 23:31:20 2015 (r280128) +++ head/share/mk/bsd.links.mk Sun Mar 15 23:40:50 2015 (r280129) @@ -9,9 +9,9 @@ afterinstall: _installlinks _installlinks: .for s t in ${LINKS} @${ECHO} "$t -> $s" ;\ - ${INSTALL_LINK} $s $t + ${INSTALL_LINK} ${DESTDIR}$s ${DESTDIR}$t .endfor .for s t in ${SYMLINKS} @${ECHO} "$t -> $s" ;\ - ${INSTALL_SYMLINK} $s $t + ${INSTALL_SYMLINK} $s ${DESTDIR}/$t .endfor From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 00:10: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 BB38A13A; Mon, 16 Mar 2015 00:10: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 9BF5ABD6; Mon, 16 Mar 2015 00:10: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 t2G0A8J0022919; Mon, 16 Mar 2015 00:10:08 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2G0A43G022898; Mon, 16 Mar 2015 00:10:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201503160010.t2G0A43G022898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 16 Mar 2015 00:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280130 - in head/sys: compat/linux kern security/audit security/mac security/mac_lomac 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, 16 Mar 2015 00:10:08 -0000 Author: mjg Date: Mon Mar 16 00:10:03 2015 New Revision: 280130 URL: https://svnweb.freebsd.org/changeset/base/280130 Log: cred: add proc_set_cred helper The goal here is to provide one place altering process credentials. This eases debugging and opens up posibilities to do additional work when such an action is performed. Modified: head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_uid16.c head/sys/kern/init_main.c head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/kern_jail.c head/sys/kern/kern_loginclass.c head/sys/kern/kern_prot.c head/sys/kern/sys_capability.c head/sys/security/audit/audit_syscalls.c head/sys/security/mac/mac_syscalls.c head/sys/security/mac_lomac/mac_lomac.c head/sys/sys/ucred.h Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/compat/linux/linux_misc.c Mon Mar 16 00:10:03 2015 (r280130) @@ -1138,7 +1138,7 @@ linux_setgroups(struct thread *td, struc newcred->cr_ngroups = 1; setsugid(p); - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); crfree(oldcred); error = 0; Modified: head/sys/compat/linux/linux_uid16.c ============================================================================== --- head/sys/compat/linux/linux_uid16.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/compat/linux/linux_uid16.c Mon Mar 16 00:10:03 2015 (r280130) @@ -213,7 +213,7 @@ linux_setgroups16(struct thread *td, str newcred->cr_ngroups = 1; setsugid(td->td_proc); - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); crfree(oldcred); error = 0; Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/kern/init_main.c Mon Mar 16 00:10:03 2015 (r280130) @@ -432,6 +432,7 @@ proc0_init(void *dummy __unused) { struct proc *p; struct thread *td; + struct ucred *newcred; vm_paddr_t pageablemem; int i; @@ -508,19 +509,20 @@ proc0_init(void *dummy __unused) callout_init(&td->td_slpcallout, CALLOUT_MPSAFE); /* Create credentials. */ - p->p_ucred = crget(); - p->p_ucred->cr_ngroups = 1; /* group 0 */ - p->p_ucred->cr_uidinfo = uifind(0); - p->p_ucred->cr_ruidinfo = uifind(0); - p->p_ucred->cr_prison = &prison0; - p->p_ucred->cr_loginclass = loginclass_find("default"); + newcred = crget(); + newcred->cr_ngroups = 1; /* group 0 */ + newcred->cr_uidinfo = uifind(0); + newcred->cr_ruidinfo = uifind(0); + newcred->cr_prison = &prison0; + newcred->cr_loginclass = loginclass_find("default"); + proc_set_cred(p, newcred); #ifdef AUDIT - audit_cred_kproc0(p->p_ucred); + audit_cred_kproc0(newcred); #endif #ifdef MAC - mac_cred_create_swapper(p->p_ucred); + mac_cred_create_swapper(newcred); #endif - td->td_ucred = crhold(p->p_ucred); + td->td_ucred = crhold(newcred); /* Create sigacts. */ p->p_sigacts = sigacts_alloc(); @@ -836,7 +838,7 @@ create_init(const void *udata __unused) #ifdef AUDIT audit_cred_proc1(newcred); #endif - initproc->p_ucred = newcred; + proc_set_cred(initproc, newcred); PROC_UNLOCK(initproc); sx_xunlock(&proctree_lock); crfree(oldcred); Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/kern/kern_exec.c Mon Mar 16 00:10:03 2015 (r280130) @@ -725,7 +725,7 @@ interpret: */ change_svuid(newcred, newcred->cr_uid); change_svgid(newcred, newcred->cr_gid); - p->p_ucred = newcred; + proc_set_cred(p, newcred); } else { if (oldcred->cr_uid == oldcred->cr_ruid && oldcred->cr_gid == oldcred->cr_rgid) @@ -751,7 +751,7 @@ interpret: PROC_LOCK(p); change_svuid(newcred, newcred->cr_uid); change_svgid(newcred, newcred->cr_gid); - p->p_ucred = newcred; + proc_set_cred(p, newcred); } } Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/kern/kern_exit.c Mon Mar 16 00:10:03 2015 (r280130) @@ -916,7 +916,7 @@ proc_reap(struct thread *td, struct proc * Free credentials, arguments, and sigacts. */ crfree(p->p_ucred); - p->p_ucred = NULL; + proc_set_cred(p, NULL); pargs_drop(p->p_args); p->p_args = NULL; sigacts_free(p->p_sigacts); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/kern/kern_fork.c Mon Mar 16 00:10:03 2015 (r280130) @@ -410,7 +410,8 @@ do_fork(struct thread *td, int flags, st bzero(&p2->p_startzero, __rangeof(struct proc, p_startzero, p_endzero)); - p2->p_ucred = crhold(td->td_ucred); + crhold(td->td_ucred); + proc_set_cred(p2, td->td_ucred); /* Tell the prison that we exist. */ prison_proc_hold(p2->p_ucred->cr_prison); @@ -869,7 +870,7 @@ fork1(struct thread *td, int flags, int * XXX: This is ugly; when we copy resource usage, we need to bump * per-cred resource counters. */ - newproc->p_ucred = p1->p_ucred; + proc_set_cred(newproc, p1->p_ucred); /* * Initialize resource accounting for the child process. Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/kern/kern_jail.c Mon Mar 16 00:10:03 2015 (r280130) @@ -2445,7 +2445,7 @@ do_jail_attach(struct thread *td, struct setsugid(p); crcopy(newcred, oldcred); newcred->cr_prison = pr; - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); Modified: head/sys/kern/kern_loginclass.c ============================================================================== --- head/sys/kern/kern_loginclass.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/kern/kern_loginclass.c Mon Mar 16 00:10:03 2015 (r280130) @@ -221,7 +221,7 @@ sys_setloginclass(struct thread *td, str PROC_LOCK(p); oldcred = crcopysafe(p, newcred); newcred->cr_loginclass = newlc; - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/kern/kern_prot.c Mon Mar 16 00:10:03 2015 (r280130) @@ -579,7 +579,7 @@ sys_setuid(struct thread *td, struct set change_euid(newcred, uip); setsugid(p); } - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); @@ -638,7 +638,7 @@ sys_seteuid(struct thread *td, struct se change_euid(newcred, euip); setsugid(p); } - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); uifree(euip); crfree(oldcred); @@ -738,7 +738,7 @@ sys_setgid(struct thread *td, struct set change_egid(newcred, gid); setsugid(p); } - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); crfree(oldcred); return (0); @@ -784,7 +784,7 @@ sys_setegid(struct thread *td, struct se change_egid(newcred, egid); setsugid(p); } - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); crfree(oldcred); return (0); @@ -864,7 +864,7 @@ kern_setgroups(struct thread *td, u_int crsetgroups_locked(newcred, ngrp, groups); } setsugid(p); - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); crfree(oldcred); return (0); @@ -927,7 +927,7 @@ sys_setreuid(register struct thread *td, change_svuid(newcred, newcred->cr_uid); setsugid(p); } - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); @@ -994,7 +994,7 @@ sys_setregid(register struct thread *td, change_svgid(newcred, newcred->cr_groups[0]); setsugid(p); } - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); crfree(oldcred); return (0); @@ -1068,7 +1068,7 @@ sys_setresuid(register struct thread *td change_svuid(newcred, suid); setsugid(p); } - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); @@ -1147,7 +1147,7 @@ sys_setresgid(register struct thread *td change_svgid(newcred, sgid); setsugid(p); } - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); crfree(oldcred); return (0); @@ -1953,6 +1953,31 @@ cred_update_thread(struct thread *td) crfree(cred); } +/* + * Change process credentials. + * Callers are responsible for providing the reference for current credentials + * and for freeing old ones. + * + * Process has to be locked except when it does not have credentials (as it + * should not be visible just yet) or when newcred is NULL (as this can be + * only used when the process is about to be freed, at which point it should + * not be visible anymore). + */ +struct ucred * +proc_set_cred(struct proc *p, struct ucred *newcred) +{ + struct ucred *oldcred; + + if (newcred == NULL) + MPASS(p->p_state == PRS_ZOMBIE); + else if (p->p_ucred != NULL) + PROC_LOCK_ASSERT(p, MA_OWNED); + + oldcred = p->p_ucred; + p->p_ucred = newcred; + return (oldcred); +} + struct ucred * crcopysafe(struct proc *p, struct ucred *cr) { Modified: head/sys/kern/sys_capability.c ============================================================================== --- head/sys/kern/sys_capability.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/kern/sys_capability.c Mon Mar 16 00:10:03 2015 (r280130) @@ -104,7 +104,7 @@ sys_cap_enter(struct thread *td, struct PROC_LOCK(p); oldcred = crcopysafe(p, newcred); newcred->cr_flags |= CRED_FLAG_CAPMODE; - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); crfree(oldcred); return (0); Modified: head/sys/security/audit/audit_syscalls.c ============================================================================== --- head/sys/security/audit/audit_syscalls.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/security/audit/audit_syscalls.c Mon Mar 16 00:10:03 2015 (r280130) @@ -461,7 +461,7 @@ sys_auditon(struct thread *td, struct au udata.au_aupinfo.ap_mask.am_success; newcred->cr_audit.ai_mask.am_failure = udata.au_aupinfo.ap_mask.am_failure; - tp->p_ucred = newcred; + proc_set_cred(tp, newcred); PROC_UNLOCK(tp); crfree(oldcred); break; @@ -600,7 +600,7 @@ sys_setauid(struct thread *td, struct se if (error) goto fail; newcred->cr_audit.ai_auid = id; - td->td_proc->p_ucred = newcred; + proc_set_cred(td->td_proc, newcred); PROC_UNLOCK(td->td_proc); crfree(oldcred); return (0); @@ -671,7 +671,7 @@ sys_setaudit(struct thread *td, struct s newcred->cr_audit.ai_termid.at_addr[0] = ai.ai_termid.machine; newcred->cr_audit.ai_termid.at_port = ai.ai_termid.port; newcred->cr_audit.ai_termid.at_type = AU_IPv4; - td->td_proc->p_ucred = newcred; + proc_set_cred(td->td_proc, newcred); PROC_UNLOCK(td->td_proc); crfree(oldcred); return (0); @@ -728,7 +728,7 @@ sys_setaudit_addr(struct thread *td, str if (error) goto fail; newcred->cr_audit = aia; - td->td_proc->p_ucred = newcred; + proc_set_cred(td->td_proc, newcred); PROC_UNLOCK(td->td_proc); crfree(oldcred); return (0); Modified: head/sys/security/mac/mac_syscalls.c ============================================================================== --- head/sys/security/mac/mac_syscalls.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/security/mac/mac_syscalls.c Mon Mar 16 00:10:03 2015 (r280130) @@ -208,7 +208,7 @@ sys___mac_set_proc(struct thread *td, st setsugid(p); crcopy(newcred, oldcred); mac_cred_relabel(newcred, intlabel); - p->p_ucred = newcred; + proc_set_cred(p, newcred); PROC_UNLOCK(p); crfree(oldcred); Modified: head/sys/security/mac_lomac/mac_lomac.c ============================================================================== --- head/sys/security/mac_lomac/mac_lomac.c Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/security/mac_lomac/mac_lomac.c Mon Mar 16 00:10:03 2015 (r280130) @@ -2255,7 +2255,7 @@ lomac_thread_userret(struct thread *td) crcopy(newcred, oldcred); crhold(newcred); lomac_copy(&subj->mac_lomac, SLOT(newcred->cr_label)); - p->p_ucred = newcred; + proc_set_cred(p, newcred); crfree(oldcred); dodrop = 1; out: Modified: head/sys/sys/ucred.h ============================================================================== --- head/sys/sys/ucred.h Sun Mar 15 23:40:50 2015 (r280129) +++ head/sys/sys/ucred.h Mon Mar 16 00:10:03 2015 (r280130) @@ -106,6 +106,7 @@ void crcopy(struct ucred *dest, struct u struct ucred *crcopysafe(struct proc *p, struct ucred *cr); struct ucred *crdup(struct ucred *cr); void cred_update_thread(struct thread *td); +struct ucred *proc_set_cred(struct proc *p, struct ucred *cr); void crfree(struct ucred *cr); struct ucred *crget(void); struct ucred *crhold(struct ucred *cr); From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 01:09:50 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 AD78EBC7; Mon, 16 Mar 2015 01:09:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99336152; Mon, 16 Mar 2015 01:09:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2G19oL4050866; Mon, 16 Mar 2015 01:09:50 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2G19oeb050865; Mon, 16 Mar 2015 01:09:50 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201503160109.t2G19oeb050865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 16 Mar 2015 01:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280131 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 01:09:50 -0000 Author: mjg Date: Mon Mar 16 01:09:49 2015 New Revision: 280131 URL: https://svnweb.freebsd.org/changeset/base/280131 Log: proc: get rid of proc lock + unlock pair in proc_reap A comment in the code stated we PROC_LOCK and as a side effect guarantee all writers released process lock. But at that point such lock was already taken while we were removing the process from all lists, so it should be already unreachable. Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Mon Mar 16 00:10:03 2015 (r280130) +++ head/sys/kern/kern_exit.c Mon Mar 16 01:09:49 2015 (r280131) @@ -887,12 +887,13 @@ proc_reap(struct thread *td, struct proc sx_xunlock(&proctree_lock); /* - * As a side effect of this lock, we know that all other writes to - * this proc are visible now, so no more locking is needed for p. + * Removal from allproc list and process group list paired with + * PROC_LOCK which was executed during that time should guarantee + * nothing can reach this process anymore. As such further locking + * is unnecessary. */ - PROC_LOCK(p); p->p_xstat = 0; /* XXX: why? */ - PROC_UNLOCK(p); + PROC_LOCK(q); ruadd(&q->p_stats->p_cru, &q->p_crux, &p->p_ru, &p->p_rux); PROC_UNLOCK(q); From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 01:15: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 88BCFD7E; Mon, 16 Mar 2015 01:15: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 73D66217; Mon, 16 Mar 2015 01:15: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 t2G1F9rv055050; Mon, 16 Mar 2015 01:15:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2G1F9DN055049; Mon, 16 Mar 2015 01:15:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201503160115.t2G1F9DN055049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 16 Mar 2015 01:15:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280132 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 01:15:09 -0000 Author: markj Date: Mon Mar 16 01:15:08 2015 New Revision: 280132 URL: https://svnweb.freebsd.org/changeset/base/280132 Log: Remove unused upstream DTrace provider implementations that are duplicates of providers under sys/cddl/dev/. Also remove sdt_subr.c, which isn't used in FreeBSD's SDT implementation. Suggested by: rwatson Deleted: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/lockstat.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/sdt_subr.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 02:53:57 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 96FCDA48; Mon, 16 Mar 2015 02:53:57 +0000 (UTC) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55EF6147; Mon, 16 Mar 2015 02:53:57 +0000 (UTC) Received: by igbue6 with SMTP id ue6so29687530igb.1; Sun, 15 Mar 2015 19:53:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kEfnXnISrAHGSfUrfYLxwKQXmh1yygh7btVV/RisSUM=; b=D15dPAGzRTXWwoNrlSIdpPtLmVSOJULvBpW35V0BG5uNJsnyh5oVFaW2qoQGotQAj4 sA7luX+y4LuSkTM+iXpY9d+ob12yj6nZOzCH7Yx67Xm3RijUKYz/VYhIqy0IrPUQMSWB YpwnvEJoCKYA/O2iGZgy2wfu2xpHYd/jwXf7fL0rrh2MDCqyV3Eqz25TXk+wbCw2wEdn wknUPRVzoN3hcfKexLTQ8Ukx/Av/VOJqmKTB2L4AHZ2/UC5cydVHQpK4/r8gNZzaOea9 zFM1DcGaNfG/YSIPCkDb5lYkBO3lL7WDhrlHSTCWUPe4qWBamcCAxIRunE+gFSvX8mBM vkJw== MIME-Version: 1.0 X-Received: by 10.42.207.206 with SMTP id fz14mr13937485icb.34.1426474436751; Sun, 15 Mar 2015 19:53:56 -0700 (PDT) Received: by 10.107.156.75 with HTTP; Sun, 15 Mar 2015 19:53:56 -0700 (PDT) In-Reply-To: <20150315230803.GA21715@dft-labs.eu> References: <201503152132.t2FLWBaw095774@svn.freebsd.org> <20150315230803.GA21715@dft-labs.eu> Date: Sun, 15 Mar 2015 22:53:56 -0400 Message-ID: Subject: Re: svn commit: r280120 - head/sys/dev/wpi From: Ryan Stone To: Mateusz Guzik Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "freebsd-wireless@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: Mon, 16 Mar 2015 02:53:57 -0000 I've thrown them up for review here: https://reviews.freebsd.org/D2071 Comments are welcome. I'll commit it all later this week. From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 07:04:50 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 D69FB268; Mon, 16 Mar 2015 07:04:50 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id B5BDDCFB; Mon, 16 Mar 2015 07:04:50 +0000 (UTC) Received: from [10.0.1.108] (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id C9B67341F877; Mon, 16 Mar 2015 00:04:48 -0700 (PDT) Subject: Re: svn commit: r280120 - head/sys/dev/wpi Mime-Version: 1.0 (Apple Message framework v1283) From: Alfred Perlstein In-Reply-To: Date: Mon, 16 Mar 2015 00:08:59 -0700 Message-Id: <148C400A-4E75-48ED-9135-70C3E07E0E1D@mu.org> References: <201503152132.t2FLWBaw095774@svn.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.1283) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "freebsd-wireless@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: Mon, 16 Mar 2015 07:04:51 -0000 Just use github, you can then just follow my directions on the = https://wiki.freebsd.org/GitWorkflow page. you can commit them as individual commits if you would like or make a = giant squash commit. Better would really be to replay all the commits into an svn branch, = then make a single svn merge commit. Although svn is meh. -Alfred On Mar 15, 2015, at 2:35 PM, Adrian Chadd wrote: > .. promise I'm done for now. >=20 > (God, it'd be nice to use git, or some web ui that lets me batch > review and commit things like this.) >=20 >=20 > -a >=20 >=20 > On 15 March 2015 at 14:32, Adrian Chadd wrote: >> Author: adrian >> Date: Sun Mar 15 21:32:11 2015 >> New Revision: 280120 >> URL: https://svnweb.freebsd.org/changeset/base/280120 >>=20 >> Log: >> Add a new taskqueue (device specific, not net80211 ic->tq); use it = for >> device restart. >>=20 >> (Committers note - once scan overhaul and a few other things have = been >> fixed in net80211 to not block things in the taskqueue, this can = disappear >> and the device specific taskqueues in other drivers can also go = away.) >>=20 >> PR: kern/197143 >> Submitted by: Andriy Voskoboinyk >>=20 >> Modified: >> head/sys/dev/wpi/if_wpi.c >> head/sys/dev/wpi/if_wpivar.h >>=20 >> Modified: head/sys/dev/wpi/if_wpi.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:30:20 2015 = (r280119) >> +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:32:11 2015 = (r280120) >> @@ -532,6 +532,14 @@ wpi_attach(device_t dev) >> TASK_INIT(&sc->sc_radioon_task, 0, wpi_radio_on, sc); >> TASK_INIT(&sc->sc_start_task, 0, wpi_start_task, sc); >>=20 >> + sc->sc_tq =3D taskqueue_create("wpi_taskq", M_WAITOK, >> + taskqueue_thread_enqueue, &sc->sc_tq); >> + error =3D taskqueue_start_threads(&sc->sc_tq, 1, 0, = "wpi_taskq"); >> + if (error !=3D 0) { >> + device_printf(dev, "can't start threads, error %d\n", = error); >> + goto fail; >> + } >> + >> wpi_sysctlattach(sc); >>=20 >> /* >> @@ -688,6 +696,9 @@ wpi_detach(device_t dev) >>=20 >> wpi_stop(sc); >>=20 >> + taskqueue_drain_all(sc->sc_tq); >> + taskqueue_free(sc->sc_tq); >> + >> callout_drain(&sc->watchdog_rfkill); >> callout_drain(&sc->tx_timeout); >> callout_drain(&sc->scan_timeout); >> @@ -2387,8 +2398,6 @@ wpi_intr(void *arg) >> WPI_WRITE(sc, WPI_FH_INT, r2); >>=20 >> if (r1 & (WPI_INT_SW_ERR | WPI_INT_HW_ERR)) { >> - struct ieee80211com *ic =3D ifp->if_l2com; >> - >> device_printf(sc->sc_dev, "fatal firmware error\n"); >> #ifdef WPI_DEBUG >> wpi_debug_registers(sc); >> @@ -2397,7 +2406,7 @@ wpi_intr(void *arg) >> DPRINTF(sc, WPI_DEBUG_HW, >> "(%s)\n", (r1 & WPI_INT_SW_ERR) ? "(Software = Error)" : >> "(Hardware Error)"); >> - ieee80211_runtask(ic, &sc->sc_reinittask); >> + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); >> goto end; >> } >>=20 >> @@ -2950,10 +2959,9 @@ wpi_scan_timeout(void *arg) >> { >> struct wpi_softc *sc =3D arg; >> struct ifnet *ifp =3D sc->sc_ifp; >> - struct ieee80211com *ic =3D ifp->if_l2com; >>=20 >> if_printf(ifp, "scan timeout\n"); >> - ieee80211_runtask(ic, &sc->sc_reinittask); >> + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); >> } >>=20 >> static void >> @@ -2961,11 +2969,10 @@ wpi_tx_timeout(void *arg) >> { >> struct wpi_softc *sc =3D arg; >> struct ifnet *ifp =3D sc->sc_ifp; >> - struct ieee80211com *ic =3D ifp->if_l2com; >>=20 >> if_printf(ifp, "device timeout\n"); >> if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); >> - ieee80211_runtask(ic, &sc->sc_reinittask); >> + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); >> } >>=20 >> static int >>=20 >> Modified: head/sys/dev/wpi/if_wpivar.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:30:20 2015 = (r280119) >> +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:32:11 2015 = (r280120) >> @@ -228,6 +228,9 @@ struct wpi_softc { >> struct task sc_radioon_task; >> struct task sc_start_task; >>=20 >> + /* Taskqueue */ >> + struct taskqueue *sc_tq; >> + >> /* Eeprom info. */ >> uint8_t cap; >> uint16_t rev; >>=20 >=20 From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 09:16:01 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 1673C5E5; Mon, 16 Mar 2015 09:16:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC8B7CCA; Mon, 16 Mar 2015 09:16:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2G9G0Yn095358; Mon, 16 Mar 2015 09:16:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2G9G01e095354; Mon, 16 Mar 2015 09:16:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503160916.t2G9G01e095354@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Mar 2015 09:16:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280133 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 09:16:01 -0000 Author: mav Date: Mon Mar 16 09:15:59 2015 New Revision: 280133 URL: https://svnweb.freebsd.org/changeset/base/280133 Log: Increase S/G list size of 32 to 33 entries. 32 entries are not enough for the worst case of misaligned 128KB request, that made FreeBSD to chunk large quests in odd pieces. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/block_if.h head/usr.sbin/bhyve/pci_virtio_block.c Modified: head/usr.sbin/bhyve/block_if.h ============================================================================== --- head/usr.sbin/bhyve/block_if.h Mon Mar 16 01:15:08 2015 (r280132) +++ head/usr.sbin/bhyve/block_if.h Mon Mar 16 09:15:59 2015 (r280133) @@ -39,7 +39,7 @@ #include #include -#define BLOCKIF_IOV_MAX 32 /* not practical to be IOV_MAX */ +#define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ struct blockif_req { struct iovec br_iov[BLOCKIF_IOV_MAX]; Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Mon Mar 16 01:15:08 2015 (r280132) +++ head/usr.sbin/bhyve/pci_virtio_block.c Mon Mar 16 09:15:59 2015 (r280133) @@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$"); #define VTBLK_RINGSZ 64 -#define VTBLK_MAXSEGS 32 - #define VTBLK_S_OK 0 #define VTBLK_S_IOERR 1 #define VTBLK_S_UNSUPP 2 @@ -201,10 +199,10 @@ pci_vtblk_proc(struct pci_vtblk_softc *s int iolen; int writeop, type; off_t offset; - struct iovec iov[VTBLK_MAXSEGS + 2]; - uint16_t idx, flags[VTBLK_MAXSEGS + 2]; + struct iovec iov[BLOCKIF_IOV_MAX + 2]; + uint16_t idx, flags[BLOCKIF_IOV_MAX + 2]; - n = vq_getchain(vq, &idx, iov, VTBLK_MAXSEGS + 2, flags); + n = vq_getchain(vq, &idx, iov, BLOCKIF_IOV_MAX + 2, flags); /* * The first descriptor will be the read-only fixed header, @@ -214,7 +212,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *s * XXX - note - this fails on crash dump, which does a * VIRTIO_BLK_T_FLUSH with a zero transfer length */ - assert(n >= 2 && n <= VTBLK_MAXSEGS + 2); + assert(n >= 2 && n <= BLOCKIF_IOV_MAX + 2); io = &sc->vbsc_ios[idx]; assert((flags[0] & VRING_DESC_F_WRITE) == 0); @@ -347,7 +345,7 @@ pci_vtblk_init(struct vmctx *ctx, struct /* setup virtio block config space */ sc->vbsc_cfg.vbc_capacity = size / DEV_BSIZE; /* 512-byte units */ sc->vbsc_cfg.vbc_size_max = 0; /* not negotiated */ - sc->vbsc_cfg.vbc_seg_max = VTBLK_MAXSEGS; + sc->vbsc_cfg.vbc_seg_max = BLOCKIF_IOV_MAX; sc->vbsc_cfg.vbc_geometry.cylinders = 0; /* no geometry */ sc->vbsc_cfg.vbc_geometry.heads = 0; sc->vbsc_cfg.vbc_geometry.sectors = 0; From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 11:57:04 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 C2EA6C70; Mon, 16 Mar 2015 11:57: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 AE6A31AD; Mon, 16 Mar 2015 11:57: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 t2GBv4r3069381; Mon, 16 Mar 2015 11:57:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GBv4YJ069380; Mon, 16 Mar 2015 11:57:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503161157.t2GBv4YJ069380@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Mar 2015 11:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280134 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 11:57:04 -0000 Author: mav Date: Mon Mar 16 11:57:03 2015 New Revision: 280134 URL: https://svnweb.freebsd.org/changeset/base/280134 Log: Report ARAT (APIC-Timer-always-running) feature for virtual CPU. This makes FreeBSD guest to not avoid using LAPIC timer, preferring HPET due to worries about non-existing for virtual CPUs deep sleep states. Benchmarks of usleep(1) on guest and host show such extra latencies: - 51us for virtual HPET, - 22us for virtual LAPIC timer, - 22us for host HPET and - 3us for host LAPIC timer. MFC after: 2 weeks Modified: head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Mon Mar 16 09:15:59 2015 (r280133) +++ head/sys/amd64/vmm/x86.c Mon Mar 16 11:57:03 2015 (r280134) @@ -361,6 +361,12 @@ x86_emulate_cpuid(struct vm *vm, int vcp break; case CPUID_0000_0006: + regs[0] = CPUTPM1_ARAT; + regs[1] = 0; + regs[2] = 0; + regs[3] = 0; + break; + case CPUID_0000_000A: /* * Handle the access, but report 0 for From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 12:39:43 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 6901B89C; Mon, 16 Mar 2015 12:39:43 +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 E34A1971; Mon, 16 Mar 2015 12:39:42 +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 t2GCdeol050249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 16 Mar 2015 15:39:40 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2GCdewH050248; Mon, 16 Mar 2015 15:39:40 +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, 16 Mar 2015 15:39:40 +0300 From: Gleb Smirnoff To: hiren panchasara Subject: Re: svn commit: r278729 - head/sys/sys Message-ID: <20150316123940.GA17947@FreeBSD.org> References: <201502132319.t1DNJZuP057045@svn.freebsd.org> <20150311213607.GN88380@strugglingcoder.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150311213607.GN88380@strugglingcoder.info> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "Simon J. Gerraty" , 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: Mon, 16 Mar 2015 12:39:43 -0000 On Wed, Mar 11, 2015 at 02:36:07PM -0700, hiren panchasara wrote: h> On 02/13/15 at 11:19P, Simon J. Gerraty wrote: h> > Author: sjg h> > Date: Fri Feb 13 23:19:35 2015 h> > New Revision: 278729 h> > URL: https://svnweb.freebsd.org/changeset/base/278729 h> > h> > Log: h> > sbspace: size of bleft, mleft must match sockbuf fields to avoid h> > overflow on amd64 h> > h> > Submitted by: anshukla@juniper.net h> > Obtained from: Juniper Networks h> h> Talking to sjg on -arch to MFC this. If he cannot get around doing that, h> I'll do it tomorrow. h> h> Letting people know here to see if there are any objections. Would that fix the bug we've been discussing? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 14:24:49 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 105A8FB5; Mon, 16 Mar 2015 14:24:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF7F1899; Mon, 16 Mar 2015 14:24:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2GEOmQT041814; Mon, 16 Mar 2015 14:24:48 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GEOm0D041812; Mon, 16 Mar 2015 14:24:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503161424.t2GEOm0D041812@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 16 Mar 2015 14:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280136 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 14:24:49 -0000 Author: glebius Date: Mon Mar 16 14:24:47 2015 New Revision: 280136 URL: https://svnweb.freebsd.org/changeset/base/280136 Log: Provide a comment explaining r279688. Suggested by: alc Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Mon Mar 16 14:12:41 2015 (r280135) +++ head/sys/vm/vnode_pager.c Mon Mar 16 14:24:47 2015 (r280136) @@ -772,6 +772,14 @@ vnode_pager_generic_getpages(struct vnod bsize = vp->v_mount->mnt_stat.f_iosize; foff = IDX_TO_OFF(m[reqpage]->pindex); + /* + * Synchronous and asynchronous paging operations use different + * free pbuf counters. This is done to avoid asynchronous requests + * to consume all pbufs. + * Allocate the pbuf at the very beginning of the function, so that + * if we are low on certain kind of pbufs don't even proceed to BMAP, + * but sleep. + */ freecnt = iodone != NULL ? &vnode_async_pbuf_freecnt : &vnode_pbuf_freecnt; bp = getpbuf(freecnt); From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:23:22 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 057395BE; Mon, 16 Mar 2015 15:23:22 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0E95125; Mon, 16 Mar 2015 15:23:21 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D68F4B98F; Mon, 16 Mar 2015 11:23:20 -0400 (EDT) From: John Baldwin To: Ian Lepore Subject: Re: svn commit: r279997 - head/sys/netinet Date: Mon, 16 Mar 2015 11:15:45 -0400 Message-ID: <3051755.qWx5SR0ixE@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <1426377491.39727.4.camel@freebsd.org> References: <201503141811.t2EIBPeE006504@svn.freebsd.org> <12123739.Rz3jP8R4fM@ralph.baldwin.cx> <1426377491.39727.4.camel@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 16 Mar 2015 11:23:20 -0400 (EDT) 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: Mon, 16 Mar 2015 15:23:22 -0000 On Saturday, March 14, 2015 05:58:11 PM Ian Lepore wrote: > On Sat, 2015-03-14 at 17:52 -0400, John Baldwin wrote: > > On Saturday, March 14, 2015 06:11:25 PM Ian Lepore wrote: > > > Author: ian > > > Date: Sat Mar 14 18:11:24 2015 > > > New Revision: 279997 > > > URL: https://svnweb.freebsd.org/changeset/base/279997 > > > > > > Log: > > > Use sbuf_new_for_sysctl() instead of plain sbuf_new() to ensure sysctl > > > string returned to userland is nulterminated. > > > > > > PR: 195668 > > > > This is not safe. sbuf_printf() is invoked with a lock held, so it isn't > > safe for the sbuf code to do a drain here. With sbuf_new_for_sysctl(), > > any call to an sbuf routine is a potential page fault, so the handler must > > either use sysctl_wire_old_buffer(), or the contents need to be output in > > one go. For this case I would prefer to use sbuf_len(sb) + 1 (or add > > INCLUDENUL to the args when creating it) and leave the sole SYSCTL_OUT() > > at the end. > > > > You will want to check the one or two other places you converted for this > > same issue as well. > > > > Doh! I was trying to keep an eye out for locks, but I missed that one. > Fixed in r280014. > > I'm at that point in a big maintenance task where I've looked at too > much code in too short a time, thanks for keeping a watchful eye on all > this. No problem. I've replied to a few others that I think need a similar fix. However, fixing the larger bug is much appreciated. :) -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:23:22 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 C233A5C0; Mon, 16 Mar 2015 15:23:22 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AC48126; Mon, 16 Mar 2015 15:23:22 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B136AB99A; Mon, 16 Mar 2015 11:23:21 -0400 (EDT) From: John Baldwin To: Ian Lepore Subject: Re: svn commit: r280012 - head/sys/kern Date: Mon, 16 Mar 2015 11:06:06 -0400 Message-ID: <4452324.gVbG3g7Nvg@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201503142316.t2ENGDdG049590@svn.freebsd.org> References: <201503142316.t2ENGDdG049590@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 16 Mar 2015 11:23:21 -0400 (EDT) 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: Mon, 16 Mar 2015 15:23:22 -0000 On Saturday, March 14, 2015 11:16:13 PM Ian Lepore wrote: > Author: ian > Date: Sat Mar 14 23:16:12 2015 > New Revision: 280012 > URL: https://svnweb.freebsd.org/changeset/base/280012 > > Log: > Use sbuf_printf() for sysctl strings instead of stack buffers and snprintf(). > > Modified: > head/sys/kern/kern_et.c > head/sys/kern/kern_tc.c The kern_et change is unsafe due to ET_LOCK(). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:23:23 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 75B3660C; Mon, 16 Mar 2015 15:23:23 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E2D0128; Mon, 16 Mar 2015 15:23:23 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 63B80B99B; Mon, 16 Mar 2015 11:23:22 -0400 (EDT) From: John Baldwin To: Ian Lepore Subject: Re: svn commit: r280000 - head/sys/kern Date: Mon, 16 Mar 2015 11:03:50 -0400 Message-ID: <12549176.JQXl7VCYPu@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201503141846.t2EIkX9f022164@svn.freebsd.org> References: <201503141846.t2EIkX9f022164@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 16 Mar 2015 11:23:22 -0400 (EDT) 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: Mon, 16 Mar 2015 15:23:23 -0000 On Saturday, March 14, 2015 06:46:33 PM Ian Lepore wrote: > Author: ian > Date: Sat Mar 14 18:46:33 2015 > New Revision: 280000 > URL: https://svnweb.freebsd.org/changeset/base/280000 > > Log: > Use sbuf_new_for_sysctl() instead of plain sbuf_new() to ensure sysctl > string returned to userland is nulterminated. > > PR: 195668 > > Modified: > head/sys/kern/kern_fail.c > > Modified: head/sys/kern/kern_fail.c > ============================================================================== > --- head/sys/kern/kern_fail.c Sat Mar 14 18:42:30 2015 (r279999) > +++ head/sys/kern/kern_fail.c Sat Mar 14 18:46:33 2015 (r280000) > @@ -394,11 +394,10 @@ fail_point_sysctl(SYSCTL_HANDLER_ARGS) > int error; > > /* Retrieving */ > - sbuf_new(&sb, NULL, 128, SBUF_AUTOEXTEND); > + sbuf_new_for_sysctl(&sb, NULL, 128, req); > fail_point_get(fp, &sb); > sbuf_trim(&sb); > - sbuf_finish(&sb); > - error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); > + error = sbuf_finish(&sb); > sbuf_delete(&sb); This one is also unsafe (fail_point_get() uses sbuf_printf() under FP_LOCK()). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15: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 9CAE3668; Mon, 16 Mar 2015 15: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 87E2682A; Mon, 16 Mar 2015 15: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 t2GFsUOx084646; Mon, 16 Mar 2015 15:54:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GFsUGi084645; Mon, 16 Mar 2015 15:54:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503161554.t2GFsUGi084645@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 16 Mar 2015 15:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280137 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 15:54:30 -0000 Author: gjb Date: Mon Mar 16 15:54:29 2015 New Revision: 280137 URL: https://svnweb.freebsd.org/changeset/base/280137 Log: Document r278970, acpi(4) update to 20150204. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 14:24:47 2015 (r280136) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:29 2015 (r280137) @@ -388,6 +388,9 @@ The &man.xz.1; utility has been updated to support multi-threaded compression. + + The &man.acpi.4; subsystem has been + updated to version 20150204. From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:54:33 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 4F510783; Mon, 16 Mar 2015 15:54:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B40882B; Mon, 16 Mar 2015 15:54:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2GFsXoB084694; Mon, 16 Mar 2015 15:54:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GFsXDC084693; Mon, 16 Mar 2015 15:54:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503161554.t2GFsXDC084693@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 16 Mar 2015 15:54:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280138 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 15:54:33 -0000 Author: gjb Date: Mon Mar 16 15:54:32 2015 New Revision: 280138 URL: https://svnweb.freebsd.org/changeset/base/280138 Log: Document r279186, setmode(3) set errno on failure. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:29 2015 (r280137) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:32 2015 (r280138) @@ -486,6 +486,10 @@ allows adding DTrace probes to userland applications and libraries without also linking against &man.elf.3;. + + The &man.setmode.3; function has been + updated to consistently set errno on + failure. From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:54:36 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 6F521894; Mon, 16 Mar 2015 15:54: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 2EECF82D; Mon, 16 Mar 2015 15:54: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 t2GFsaqS084744; Mon, 16 Mar 2015 15:54:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GFsaGb084743; Mon, 16 Mar 2015 15:54:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503161554.t2GFsaGb084743@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 16 Mar 2015 15:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280139 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 15:54:36 -0000 Author: gjb Date: Mon Mar 16 15:54:35 2015 New Revision: 280139 URL: https://svnweb.freebsd.org/changeset/base/280139 Log: Document r279189, VSX support. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:32 2015 (r280138) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:35 2015 (r280139) @@ -562,6 +562,11 @@ The userland and kernel must be updated before rebooting the system. + + Kernel support for Vector-Scalar eXtension + (VSX) found on POWER7 and POWER8 hardware + has been added. From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:54:39 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 3F4C09F3; Mon, 16 Mar 2015 15:54: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 2A973830; Mon, 16 Mar 2015 15:54: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 t2GFsdQT084788; Mon, 16 Mar 2015 15:54:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GFsdXA084787; Mon, 16 Mar 2015 15:54:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503161554.t2GFsdXA084787@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 16 Mar 2015 15:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280140 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 15:54:39 -0000 Author: gjb Date: Mon Mar 16 15:54:38 2015 New Revision: 280140 URL: https://svnweb.freebsd.org/changeset/base/280140 Log: Document r279252, pmap(9) overhaul for 64-bit PowerPC processors. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:35 2015 (r280139) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:38 2015 (r280140) @@ -567,6 +567,11 @@ arch="powerpc">Kernel support for Vector-Scalar eXtension (VSX) found on POWER7 and POWER8 hardware has been added. + + The &man.pmap.9; implementation for 64-bit + &powerpc; processors has been overhaulded to improve + concurrency. From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:54:45 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 1D1C7BC8; Mon, 16 Mar 2015 15:54:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08E4F839; Mon, 16 Mar 2015 15:54: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 t2GFsi11084884; Mon, 16 Mar 2015 15:54:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GFsidC084883; Mon, 16 Mar 2015 15:54:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503161554.t2GFsidC084883@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 16 Mar 2015 15:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280142 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 15:54:45 -0000 Author: gjb Date: Mon Mar 16 15:54:43 2015 New Revision: 280142 URL: https://svnweb.freebsd.org/changeset/base/280142 Log: Document r279361, kern.osrelease and kern.osreldate sysctls are now configurable jail(8) parameters. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:41 2015 (r280141) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:43 2015 (r280142) @@ -584,6 +584,10 @@ &man.hwpmc.4; default and maximum callchain depths have been increased. The default has been increased from 16 to 32, and the maximum increased from 32 to 128. + + The kern.osrelease + and kern.osreldate are now configurable + &man.jail.8; parameters. From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:54:42 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 2B29FAD3; Mon, 16 Mar 2015 15:54: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 16B99833; Mon, 16 Mar 2015 15:54: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 t2GFsfSb084840; Mon, 16 Mar 2015 15:54:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GFsfS3084839; Mon, 16 Mar 2015 15:54:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503161554.t2GFsfS3084839@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 16 Mar 2015 15:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280141 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 15:54:42 -0000 Author: gjb Date: Mon Mar 16 15:54:41 2015 New Revision: 280141 URL: https://svnweb.freebsd.org/changeset/base/280141 Log: Document r279315, uefisign(8) addition. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:38 2015 (r280140) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:41 2015 (r280141) @@ -309,6 +309,9 @@ attaching and detaching drivers, and enabling and disabling devices. The &man.devctl.8; utility uses the new &man.devctl.3; library. + + The + &man.uefisign.8; utility has been added. From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:54:54 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 CBAD2FD0; Mon, 16 Mar 2015 15:54:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B70BD847; Mon, 16 Mar 2015 15:54:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2GFssTt085038; Mon, 16 Mar 2015 15:54:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GFssCg085037; Mon, 16 Mar 2015 15:54:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503161554.t2GFssCg085037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 16 Mar 2015 15:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280145 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 15:54:54 -0000 Author: gjb Date: Mon Mar 16 15:54:53 2015 New Revision: 280145 URL: https://svnweb.freebsd.org/changeset/base/280145 Log: Document r279663, qsort(3) enhancements. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:50 2015 (r280144) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:53 2015 (r280145) @@ -504,6 +504,11 @@ The &man.setmode.3; function has been updated to consistently set errno on failure. + + The &man.qsort.3; functions have been + updated to be able to handle 32-bit aligned data on 64-bit + platforms, also providing a significant improvement in 32-bit + workloads. From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:54:48 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 A47C7D60; Mon, 16 Mar 2015 15:54:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DD18840; Mon, 16 Mar 2015 15:54:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2GFsmPK084937; Mon, 16 Mar 2015 15:54:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GFsmAr084935; Mon, 16 Mar 2015 15:54:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503161554.t2GFsmAr084935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 16 Mar 2015 15:54:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280143 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 15:54:48 -0000 Author: gjb Date: Mon Mar 16 15:54:47 2015 New Revision: 280143 URL: https://svnweb.freebsd.org/changeset/base/280143 Log: Document r279463, iovctl(8) rc(8) script. Add Sandvine Inc to sponsors.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:43 2015 (r280142) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:47 2015 (r280143) @@ -439,6 +439,12 @@ &man.rc.8; script has been removed from the base system. An equivalent script is available from the net/mrouted port. + + A new &man.rc.8; script, + iovctl, has been added, which allows + automatically starting the &man.iovctl.8; utility at + boot. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Mon Mar 16 15:54:43 2015 (r280142) +++ head/release/doc/share/xml/sponsor.ent Mon Mar 16 15:54:47 2015 (r280143) @@ -30,6 +30,7 @@ + From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:54:52 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 1D947E9C; Mon, 16 Mar 2015 15:54:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08A8C843; Mon, 16 Mar 2015 15:54:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2GFspMP084991; Mon, 16 Mar 2015 15:54:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GFspI2084989; Mon, 16 Mar 2015 15:54:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503161554.t2GFspI2084989@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 16 Mar 2015 15:54:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280144 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 15:54:52 -0000 Author: gjb Date: Mon Mar 16 15:54:50 2015 New Revision: 280144 URL: https://svnweb.freebsd.org/changeset/base/280144 Log: Document r279571, freebsd-update(8) will not download updates when a previous upgrade is not complete. Add ScaleEngine Inc to sponsors.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:47 2015 (r280143) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Mar 16 15:54:50 2015 (r280144) @@ -312,6 +312,11 @@ The &man.uefisign.8; utility has been added. + + The &man.freebsd-update.8; utility has + been updated to prevent fetching updated binary patches when + a previous upgrade has not been throughly completed. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Mon Mar 16 15:54:47 2015 (r280143) +++ head/release/doc/share/xml/sponsor.ent Mon Mar 16 15:54:50 2015 (r280144) @@ -31,6 +31,7 @@ + From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 15:56: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 7A5DC220; Mon, 16 Mar 2015 15:56: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 5451786E; Mon, 16 Mar 2015 15:56: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 t2GFu8gi085331; Mon, 16 Mar 2015 15:56:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GFu7Pt085325; Mon, 16 Mar 2015 15:56:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503161556.t2GFu7Pt085325@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 16 Mar 2015 15:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280146 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 15:56:08 -0000 Author: jhb Date: Mon Mar 16 15:56:06 2015 New Revision: 280146 URL: https://svnweb.freebsd.org/changeset/base/280146 Log: Move special DDP handling for closing a connection into a new handle_ddp_close() function in t4_ddp.c as the logic is similar to handle_ddp_data(). This allows all knowledge of the special DDP mbufs to be private to t4_ddp.c as well. Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Mon Mar 16 15:54:53 2015 (r280145) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Mon Mar 16 15:56:06 2015 (r280146) @@ -1105,19 +1105,7 @@ do_peer_close(struct sge_iq *iq, const s sb = &so->so_rcv; SOCKBUF_LOCK(sb); if (__predict_false(toep->ddp_flags & (DDP_BUF0_ACTIVE | DDP_BUF1_ACTIVE))) { - m = get_ddp_mbuf(be32toh(cpl->rcv_nxt) - tp->rcv_nxt); - tp->rcv_nxt = be32toh(cpl->rcv_nxt); - toep->ddp_flags &= ~(DDP_BUF0_ACTIVE | DDP_BUF1_ACTIVE); - - KASSERT(toep->sb_cc >= sbused(sb), - ("%s: sb %p has more data (%d) than last time (%d).", - __func__, sb, sbused(sb), toep->sb_cc)); - toep->rx_credits += toep->sb_cc - sbused(sb); -#ifdef USE_DDP_RX_FLOW_CONTROL - toep->rx_credits -= m->m_len; /* adjust for F_RX_FC_DDP */ -#endif - sbappendstream_locked(sb, m, 0); - toep->sb_cc = sbused(sb); + handle_ddp_close(toep, tp, sb, cpl->rcv_nxt); } socantrcvmore_locked(so); /* unlocks the sockbuf */ Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Mon Mar 16 15:54:53 2015 (r280145) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Mon Mar 16 15:56:06 2015 (r280146) @@ -72,6 +72,8 @@ VNET_DECLARE(int, tcp_autorcvbuf_inc); VNET_DECLARE(int, tcp_autorcvbuf_max); #define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) +static struct mbuf *get_ddp_mbuf(int len); + #define PPOD_SZ(n) ((n) * sizeof(struct pagepod)) #define PPOD_SIZE (PPOD_SZ(1)) @@ -454,6 +456,37 @@ wakeup: return (0); } +void +handle_ddp_close(struct toepcb *toep, struct tcpcb *tp, struct sockbuf *sb, + __be32 rcv_nxt) +{ + struct mbuf *m; + int len; + + SOCKBUF_LOCK_ASSERT(sb); + INP_WLOCK_ASSERT(toep->inp); + len = be32toh(rcv_nxt) - tp->rcv_nxt; + + /* Signal handle_ddp() to break out of its sleep loop. */ + toep->ddp_flags &= ~(DDP_BUF0_ACTIVE | DDP_BUF1_ACTIVE); + if (len == 0) + return; + + tp->rcv_nxt += len; + KASSERT(toep->sb_cc >= sbused(sb), + ("%s: sb %p has more data (%d) than last time (%d).", + __func__, sb, sbused(sb), toep->sb_cc)); + toep->rx_credits += toep->sb_cc - sbused(sb); +#ifdef USE_DDP_RX_FLOW_CONTROL + toep->rx_credits -= len; /* adjust for F_RX_FC_DDP */ +#endif + + m = get_ddp_mbuf(len); + + sbappendstream_locked(sb, m, 0); + toep->sb_cc = sbused(sb); +} + #define DDP_ERR (F_DDP_PPOD_MISMATCH | F_DDP_LLIMIT_ERR | F_DDP_ULIMIT_ERR |\ F_DDP_PPOD_PARITY_ERR | F_DDP_PADDING_ERR | F_DDP_OFFSET_ERR |\ F_DDP_INVALID_TAG | F_DDP_COLOR_ERR | F_DDP_TID_MISMATCH |\ @@ -992,7 +1025,7 @@ soreceive_rcvoob(struct socket *so, stru static char ddp_magic_str[] = "nothing to see here"; -struct mbuf * +static struct mbuf * get_ddp_mbuf(int len) { struct mbuf *m; Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Mon Mar 16 15:54:53 2015 (r280145) +++ head/sys/dev/cxgbe/tom/t4_tom.h Mon Mar 16 15:56:06 2015 (r280146) @@ -281,9 +281,10 @@ void t4_init_ddp(struct adapter *, struc void t4_uninit_ddp(struct adapter *, struct tom_data *); int t4_soreceive_ddp(struct socket *, struct sockaddr **, struct uio *, struct mbuf **, struct mbuf **, int *); -struct mbuf *get_ddp_mbuf(int); void enable_ddp(struct adapter *, struct toepcb *toep); void release_ddp_resources(struct toepcb *toep); +void handle_ddp_close(struct toepcb *, struct tcpcb *, struct sockbuf *, + uint32_t); void insert_ddp_data(struct toepcb *, uint32_t); /* ULP related */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 16:29:34 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 D55644F4; Mon, 16 Mar 2015 16:29:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6587CBD; Mon, 16 Mar 2015 16:29:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2GGTYrO001731; Mon, 16 Mar 2015 16:29:34 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GGTYQX001730; Mon, 16 Mar 2015 16:29:34 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201503161629.t2GGTYQX001730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 16 Mar 2015 16:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280147 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 16:29:34 -0000 Author: nwhitehorn Date: Mon Mar 16 16:29:33 2015 New Revision: 280147 URL: https://svnweb.freebsd.org/changeset/base/280147 Log: Convert PTE eviction lock from an RW lock to a RM lock. It is held for writing approximately never (< 0.00000001% under heavy VM load, and it can go for months without ever being acquired in normal operation). This provides a 10% (2-minute) improvement in wall clock time for make -j32 buildworld on a 4-core 32-thread POWER8. Modified: head/sys/powerpc/pseries/mmu_phyp.c Modified: head/sys/powerpc/pseries/mmu_phyp.c ============================================================================== --- head/sys/powerpc/pseries/mmu_phyp.c Mon Mar 16 15:56:06 2015 (r280146) +++ head/sys/powerpc/pseries/mmu_phyp.c Mon Mar 16 16:29:33 2015 (r280147) @@ -30,7 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); extern int n_slbs; -static struct rwlock mphyp_eviction_lock; +static struct rmlock mphyp_eviction_lock; /* * Kernel MMU interface @@ -119,7 +119,7 @@ mphyp_bootstrap(mmu_t mmup, vm_offset_t phandle_t dev, node, root; int idx, len, res; - rw_init(&mphyp_eviction_lock, "pte eviction"); + rm_init(&mphyp_eviction_lock, "pte eviction"); moea64_early_bootstrap(mmup, kernelstart, kernelend); @@ -262,6 +262,7 @@ mphyp_pte_synch(mmu_t mmu, struct pvo_en static int64_t mphyp_pte_clear(mmu_t mmu, struct pvo_entry *pvo, uint64_t ptebit) { + struct rm_priotracker track; int64_t refchg; uint64_t ptelo, junk; int err; @@ -274,11 +275,11 @@ mphyp_pte_clear(mmu_t mmu, struct pvo_en * shared eviction lock. */ PMAP_LOCK_ASSERT(pvo->pvo_pmap, MA_OWNED); - rw_rlock(&mphyp_eviction_lock); + rm_rlock(&mphyp_eviction_lock, &track); refchg = mphyp_pte_synch(mmu, pvo); if (refchg < 0) { - rw_runlock(&mphyp_eviction_lock); + rm_runlock(&mphyp_eviction_lock, &track); return (refchg); } @@ -288,7 +289,7 @@ mphyp_pte_clear(mmu_t mmu, struct pvo_en * Pessimistically claim that, once modified, it stays so * forever and that it is never referenced. */ - rw_runlock(&mphyp_eviction_lock); + rm_runlock(&mphyp_eviction_lock, &track); return (refchg & ~LPTE_REF); } @@ -307,7 +308,7 @@ mphyp_pte_clear(mmu_t mmu, struct pvo_en refchg |= (ptelo & LPTE_REF); } - rw_runlock(&mphyp_eviction_lock); + rm_runlock(&mphyp_eviction_lock, &track); return (refchg); } @@ -376,6 +377,7 @@ mphyp_pte_spillable_ident(uintptr_t pteg static int mphyp_pte_insert(mmu_t mmu, struct pvo_entry *pvo) { + struct rm_priotracker track; int64_t result; struct lpte evicted, pte; uint64_t index, junk, lastptelo; @@ -387,7 +389,7 @@ mphyp_pte_insert(mmu_t mmu, struct pvo_e evicted.pte_hi = 0; /* Make sure further insertion is locked out during evictions */ - rw_rlock(&mphyp_eviction_lock); + rm_rlock(&mphyp_eviction_lock, &track); /* * First try primary hash. @@ -396,7 +398,7 @@ mphyp_pte_insert(mmu_t mmu, struct pvo_e result = phyp_pft_hcall(H_ENTER, 0, pvo->pvo_pte.slot, pte.pte_hi, pte.pte_lo, &index, &evicted.pte_lo, &junk); if (result == H_SUCCESS) { - rw_runlock(&mphyp_eviction_lock); + rm_runlock(&mphyp_eviction_lock, &track); pvo->pvo_pte.slot = index; return (0); } @@ -414,7 +416,7 @@ mphyp_pte_insert(mmu_t mmu, struct pvo_e result = phyp_pft_hcall(H_ENTER, 0, pvo->pvo_pte.slot, pte.pte_hi, pte.pte_lo, &index, &evicted.pte_lo, &junk); if (result == H_SUCCESS) { - rw_runlock(&mphyp_eviction_lock); + rm_runlock(&mphyp_eviction_lock, &track); pvo->pvo_pte.slot = index; return (0); } @@ -426,10 +428,8 @@ mphyp_pte_insert(mmu_t mmu, struct pvo_e */ /* Lock out all insertions for a bit */ - if (!rw_try_upgrade(&mphyp_eviction_lock)) { - rw_runlock(&mphyp_eviction_lock); - rw_wlock(&mphyp_eviction_lock); - } + rm_runlock(&mphyp_eviction_lock, &track); + rm_wlock(&mphyp_eviction_lock); index = mphyp_pte_spillable_ident(pvo->pvo_pte.slot, &evicted); if (index == -1L) { @@ -442,7 +442,7 @@ mphyp_pte_insert(mmu_t mmu, struct pvo_e if (index == -1L) { /* No freeable slots in either PTEG? We're hosed. */ - rw_wunlock(&mphyp_eviction_lock); + rm_wunlock(&mphyp_eviction_lock); panic("mphyp_pte_insert: overflow"); return (-1); } @@ -462,7 +462,7 @@ mphyp_pte_insert(mmu_t mmu, struct pvo_e */ result = phyp_pft_hcall(H_ENTER, H_EXACT, index, pte.pte_hi, pte.pte_lo, &index, &evicted.pte_lo, &junk); - rw_wunlock(&mphyp_eviction_lock); /* All clear */ + rm_wunlock(&mphyp_eviction_lock); /* All clear */ pvo->pvo_pte.slot = index; if (result == H_SUCCESS) From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 16:29: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 7331D62B; Mon, 16 Mar 2015 16:29:39 +0000 (UTC) Received: from relay.mailchannels.net (tkt-001-i373.relay.mailchannels.net [174.136.5.175]) by mx1.freebsd.org (Postfix) with ESMTP id 5786CCBF; Mon, 16 Mar 2015 16:29:36 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp2.ore.mailhop.org (ip-10-220-9-73.us-west-2.compute.internal [10.220.9.73]) by relay.mailchannels.net (Postfix) with ESMTPA id D1E531004AA; Mon, 16 Mar 2015 16:29:26 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp2.ore.mailhop.org (smtp2.ore.mailhop.org [10.83.15.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Mon, 16 Mar 2015 16:29:28 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1426523367984:2575053586 X-MC-Ingress-Time: 1426523367984 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp2.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YXXtL-00046Q-Jq; Mon, 16 Mar 2015 16:29:23 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t2GGTJR8023520; Mon, 16 Mar 2015 10:29:19 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1/VxdgM2nHp25ntVma6NVPC Message-ID: <1426523359.95554.0.camel@freebsd.org> Subject: Re: svn commit: r279993 - in head/sys: dev/cxgb dev/cxgbe kern vm From: Ian Lepore To: Konstantin Belousov Date: Mon, 16 Mar 2015 10:29:19 -0600 In-Reply-To: <20150315215348.GV2379@kib.kiev.ua> References: <201503141708.t2EH8TdR074383@svn.freebsd.org> <20150315215348.GV2379@kib.kiev.ua> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie 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: Mon, 16 Mar 2015 16:29:39 -0000 On Sun, 2015-03-15 at 23:53 +0200, Konstantin Belousov wrote: > On Sat, Mar 14, 2015 at 05:08:29PM +0000, Ian Lepore wrote: > > Author: ian > > Date: Sat Mar 14 17:08:28 2015 > > New Revision: 279993 > > URL: https://svnweb.freebsd.org/changeset/base/279993 > > > > Log: > > Set the SBUF_INCLUDENUL flag in sbuf_new_for_sysctl() so that sysctl > > strings returned to userland include the nulterm byte. > > > > Some uses of sbuf_new_for_sysctl() write binary data rather than strings; > > clear the SBUF_INCLUDENUL flag after calling sbuf_new_for_sysctl() in > > those cases. (Note that the sbuf code still automatically adds a nulterm > > byte in sbuf_finish(), but since it's not included in the length it won't > > get copied to userland along with the binary data.) > > > > Remove explicit adding of a nulterm byte in a couple places now that it > > gets done automatically by the sbuf drain code. > > > > PR: 195668 > > I get the following panic on r280044: > > panic: wrote past end of sbuf (256 >= 256) > cpuid = 0 > KDB: stack backtrace: > db_trace_self_wrapper() at 0xffffffff8028db5b = db_trace_self_wrapper+0x2b/frame 0xfffffe022b6af5e0 > vpanic() at 0xffffffff80356ad9 = vpanic+0x189/frame 0xfffffe022b6af660 > kassert_panic() at 0xffffffff80356942 = kassert_panic+0x192/frame 0xfffffe022b6af6f0 > sbuf_delete() at 0xffffffff803a3cad = sbuf_delete+0xad/frame 0xfffffe022b6af710 > sysctl_kern_proc_args() at 0xffffffff80349b6d = sysctl_kern_proc_args+0x21d/frame 0xfffffe022b6af7a0 > sysctl_root_handler_locked() at 0xffffffff80364034 = sysctl_root_handler_locked+0x94/frame 0xfffffe022b6af7e0 > sysctl_root() at 0xffffffff80363878 = sysctl_root+0x188/frame 0xfffffe022b6af830 > userland_sysctl() at 0xffffffff80363e12 = userland_sysctl+0x192/frame 0xfffffe022b6af8d0 > sys___sysctl() at 0xffffffff80363c44 = sys___sysctl+0x74/frame 0xfffffe022b6af980 > amd64_syscall() at 0xffffffff8057e9be = amd64_syscall+0x2ae/frame 0xfffffe022b6afab0 > Xfast_syscall() at 0xffffffff8055d9bb = Xfast_syscall+0xfb/frame 0xfffffe022b6afab0 > --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x800f9db0a, rsp = 0x7fffffffe2c8, rbp = 0x7fffffffe300 --- > > Sorry about this, I was away from the computer all day yesterday, but I'm working on it now. -- Ian From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 17:42:54 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 C747D8B7; Mon, 16 Mar 2015 17:42:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9955887B; Mon, 16 Mar 2015 17:42:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2GHgsxI038601; Mon, 16 Mar 2015 17:42:54 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GHgsE3038599; Mon, 16 Mar 2015 17:42:54 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201503161742.t2GHgsE3038599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Mon, 16 Mar 2015 17:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280148 - 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: Mon, 16 Mar 2015 17:42:54 -0000 Author: rwatson Date: Mon Mar 16 17:42:53 2015 New Revision: 280148 URL: https://svnweb.freebsd.org/changeset/base/280148 Log: Introduce a cap_ioctl_t used for the 'cmds' arguments to cap_ioctls_limit() and cap_ioctls_get(). On FreeBSD, these are 'unsigned long', but on Linux, ioctl(2) takes an 'int', making mild abstraction desirable. MFC after: 3 days Sponsored by: Google, Inc. Modified: head/sys/sys/capsicum.h head/sys/sys/types.h Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Mon Mar 16 16:29:33 2015 (r280147) +++ head/sys/sys/capsicum.h Mon Mar 16 17:42:53 2015 (r280148) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008-2010 Robert N. M. Watson + * Copyright (c) 2008-2010, 2015 Robert N. M. Watson * Copyright (c) 2012 FreeBSD Foundation * All rights reserved. * @@ -398,13 +398,13 @@ int __cap_rights_get(int version, int fd /* * Limits allowed ioctls for the given descriptor. */ -int cap_ioctls_limit(int fd, const unsigned long *cmds, size_t ncmds); +int cap_ioctls_limit(int fd, const cap_ioctl_t *cmds, size_t ncmds); /* * Returns array of allowed ioctls for the given descriptor. * If all ioctls are allowed, the cmds array is not populated and * the function returns CAP_IOCTLS_ALL. */ -ssize_t cap_ioctls_get(int fd, unsigned long *cmds, size_t maxcmds); +ssize_t cap_ioctls_get(int fd, cap_ioctl_t *cmds, size_t maxcmds); /* * Limits allowed fcntls for the given descriptor (CAP_FCNTL_*). */ Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Mon Mar 16 16:29:33 2015 (r280147) +++ head/sys/sys/types.h Mon Mar 16 17:42:53 2015 (r280148) @@ -232,6 +232,11 @@ typedef __useconds_t useconds_t; /* micr #define _USECONDS_T_DECLARED #endif +#ifndef _CAP_IOCTL_T_DECLARED +#define _CAP_IOCTL_T_DECLARED +typedef unsigned long cap_ioctl_t; +#endif + #ifndef _CAP_RIGHTS_T_DECLARED #define _CAP_RIGHTS_T_DECLARED struct cap_rights; From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 17:45: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 09710A47; Mon, 16 Mar 2015 17:45: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 CF9588A6; Mon, 16 Mar 2015 17:45: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 t2GHjgVP039043; Mon, 16 Mar 2015 17:45:42 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GHjgBe039042; Mon, 16 Mar 2015 17:45:42 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503161745.t2GHjgBe039042@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 16 Mar 2015 17:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280149 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 17:45:43 -0000 Author: ian Date: Mon Mar 16 17:45:41 2015 New Revision: 280149 URL: https://svnweb.freebsd.org/changeset/base/280149 Log: Update an sbuf assertion to allow for the new SBUF_INCLUDENUL flag. If INCLUDENUL is set and sbuf_finish() has been called, the length has been incremented to count the nulterm byte, and in that case current length is allowed to be equal to buffer size, otherwise it must be less than. Add a predicate macro to test for SBUF_INCLUDENUL, and use it in tests, to be consistant with the style in the rest of this file. Modified: head/sys/kern/subr_sbuf.c Modified: head/sys/kern/subr_sbuf.c ============================================================================== --- head/sys/kern/subr_sbuf.c Mon Mar 16 17:42:53 2015 (r280148) +++ head/sys/kern/subr_sbuf.c Mon Mar 16 17:45:41 2015 (r280149) @@ -70,6 +70,7 @@ static MALLOC_DEFINE(M_SBUF, "sbuf", "st #define SBUF_FREESPACE(s) ((s)->s_size - ((s)->s_len + 1)) #define SBUF_CANEXTEND(s) ((s)->s_flags & SBUF_AUTOEXTEND) #define SBUF_ISSECTION(s) ((s)->s_flags & SBUF_INSECTION) +#define SBUF_NULINCLUDED(s) ((s)->s_flags & SBUF_INCLUDENUL) /* * Set / clear flags @@ -100,9 +101,15 @@ _assert_sbuf_integrity(const char *fun, ("%s called with a NULL sbuf pointer", fun)); KASSERT(s->s_buf != NULL, ("%s called with uninitialized or corrupt sbuf", fun)); - KASSERT(s->s_len < s->s_size, - ("wrote past end of sbuf (%jd >= %jd)", - (intmax_t)s->s_len, (intmax_t)s->s_size)); + if (SBUF_ISFINISHED(s) && SBUF_NULINCLUDED(s)) { + KASSERT(s->s_len <= s->s_size, + ("wrote past end of sbuf (%jd >= %jd)", + (intmax_t)s->s_len, (intmax_t)s->s_size)); + } else { + KASSERT(s->s_len < s->s_size, + ("wrote past end of sbuf (%jd >= %jd)", + (intmax_t)s->s_len, (intmax_t)s->s_size)); + } } static void @@ -720,7 +727,7 @@ sbuf_finish(struct sbuf *s) assert_sbuf_state(s, 0); s->s_buf[s->s_len] = '\0'; - if (s->s_flags & SBUF_INCLUDENUL) + if (SBUF_NULINCLUDED(s)) s->s_len++; if (s->s_drain_func != NULL) { while (s->s_len > 0 && s->s_error == 0) @@ -769,7 +776,7 @@ sbuf_len(struct sbuf *s) return (-1); /* If finished, nulterm is already in len, else add one. */ - if ((s->s_flags & (SBUF_INCLUDENUL | SBUF_FINISHED)) == SBUF_INCLUDENUL) + if (SBUF_NULINCLUDED(s) && !SBUF_ISFINISHED(s)) return (s->s_len + 1); return (s->s_len); } From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 17:56:11 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 E43EDCBD; Mon, 16 Mar 2015 17:56:10 +0000 (UTC) Received: from relay.mailchannels.net (si-002-i53.relay.mailchannels.net [184.154.112.227]) by mx1.freebsd.org (Postfix) with ESMTP id 876BF9B6; Mon, 16 Mar 2015 17:56:06 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (ip-10-213-14-133.us-west-2.compute.internal [10.213.14.133]) by relay.mailchannels.net (Postfix) with ESMTPA id A81931D06A0; Mon, 16 Mar 2015 17:48:00 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org ([TEMPUNAVAIL]. [10.45.8.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Mon, 16 Mar 2015 17:48:02 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1426528081830:1738845448 X-MC-Ingress-Time: 1426528081830 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp4.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YXZ7J-0005kF-GJ; Mon, 16 Mar 2015 17:47:53 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t2GHlprk023640; Mon, 16 Mar 2015 11:47:51 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+G/oyPHS569iDHcrRbTXxw Message-ID: <1426528071.95554.2.camel@freebsd.org> Subject: Re: svn commit: r279993 - in head/sys: dev/cxgb dev/cxgbe kern vm From: Ian Lepore To: Konstantin Belousov Date: Mon, 16 Mar 2015 11:47:51 -0600 In-Reply-To: <20150315215348.GV2379@kib.kiev.ua> References: <201503141708.t2EH8TdR074383@svn.freebsd.org> <20150315215348.GV2379@kib.kiev.ua> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie 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: Mon, 16 Mar 2015 17:56:11 -0000 On Sun, 2015-03-15 at 23:53 +0200, Konstantin Belousov wrote: > On Sat, Mar 14, 2015 at 05:08:29PM +0000, Ian Lepore wrote: > > Author: ian > > Date: Sat Mar 14 17:08:28 2015 > > New Revision: 279993 > > URL: https://svnweb.freebsd.org/changeset/base/279993 > > > > Log: > > Set the SBUF_INCLUDENUL flag in sbuf_new_for_sysctl() so that sysctl > > strings returned to userland include the nulterm byte. > > > > Some uses of sbuf_new_for_sysctl() write binary data rather than strings; > > clear the SBUF_INCLUDENUL flag after calling sbuf_new_for_sysctl() in > > those cases. (Note that the sbuf code still automatically adds a nulterm > > byte in sbuf_finish(), but since it's not included in the length it won't > > get copied to userland along with the binary data.) > > > > Remove explicit adding of a nulterm byte in a couple places now that it > > gets done automatically by the sbuf drain code. > > > > PR: 195668 > > I get the following panic on r280044: > > panic: wrote past end of sbuf (256 >= 256) > cpuid = 0 > KDB: stack backtrace: > db_trace_self_wrapper() at 0xffffffff8028db5b = db_trace_self_wrapper+0x2b/frame 0xfffffe022b6af5e0 > vpanic() at 0xffffffff80356ad9 = vpanic+0x189/frame 0xfffffe022b6af660 > kassert_panic() at 0xffffffff80356942 = kassert_panic+0x192/frame 0xfffffe022b6af6f0 > sbuf_delete() at 0xffffffff803a3cad = sbuf_delete+0xad/frame 0xfffffe022b6af710 > sysctl_kern_proc_args() at 0xffffffff80349b6d = sysctl_kern_proc_args+0x21d/frame 0xfffffe022b6af7a0 > sysctl_root_handler_locked() at 0xffffffff80364034 = sysctl_root_handler_locked+0x94/frame 0xfffffe022b6af7e0 > sysctl_root() at 0xffffffff80363878 = sysctl_root+0x188/frame 0xfffffe022b6af830 > userland_sysctl() at 0xffffffff80363e12 = userland_sysctl+0x192/frame 0xfffffe022b6af8d0 > sys___sysctl() at 0xffffffff80363c44 = sys___sysctl+0x74/frame 0xfffffe022b6af980 > amd64_syscall() at 0xffffffff8057e9be = amd64_syscall+0x2ae/frame 0xfffffe022b6afab0 > Xfast_syscall() at 0xffffffff8055d9bb = Xfast_syscall+0xfb/frame 0xfffffe022b6afab0 > --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x800f9db0a, rsp = 0x7fffffffe2c8, rbp = 0x7fffffffe300 --- This should now be fixed with r280149. I have no idea why I never hit this in testing even with the same commands that other people on irc said they were using to trigger it. Just lucky I guess. :) -- Ian From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 19:18:47 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 F23CDA03; Mon, 16 Mar 2015 19:18: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 DD54F3F7; Mon, 16 Mar 2015 19:18: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 t2GJIkbh081829; Mon, 16 Mar 2015 19:18:46 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GJIk2w081828; Mon, 16 Mar 2015 19:18:46 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503161918.t2GJIk2w081828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 16 Mar 2015 19:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280150 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 19:18:47 -0000 Author: ian Date: Mon Mar 16 19:18:45 2015 New Revision: 280150 URL: https://svnweb.freebsd.org/changeset/base/280150 Log: Use a regular sbuf + SYSCTL_OUT() rather than sbuf_new_for_sysctl() with auto-draining, to avoid a potential copyout fault while holding a lock. Pointed out by: jhb Pointy hat to: ian Modified: head/sys/kern/kern_fail.c Modified: head/sys/kern/kern_fail.c ============================================================================== --- head/sys/kern/kern_fail.c Mon Mar 16 17:45:41 2015 (r280149) +++ head/sys/kern/kern_fail.c Mon Mar 16 19:18:45 2015 (r280150) @@ -394,10 +394,12 @@ fail_point_sysctl(SYSCTL_HANDLER_ARGS) int error; /* Retrieving */ - sbuf_new_for_sysctl(&sb, NULL, 128, req); + sbuf_new(&sb, NULL, 128, SBUF_AUTOEXTEND | SBUF_INCLUDENUL); fail_point_get(fp, &sb); sbuf_trim(&sb); error = sbuf_finish(&sb); + if (error == 0) + error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); sbuf_delete(&sb); /* Setting */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 19:25: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 16CEAD1D; Mon, 16 Mar 2015 19:25: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 022066CD; Mon, 16 Mar 2015 19:25: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 t2GJP4w8086072; Mon, 16 Mar 2015 19:25:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GJP4hF086071; Mon, 16 Mar 2015 19:25:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503161925.t2GJP4hF086071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 16 Mar 2015 19:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280151 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 19:25:05 -0000 Author: ian Date: Mon Mar 16 19:25:03 2015 New Revision: 280151 URL: https://svnweb.freebsd.org/changeset/base/280151 Log: Modified: head/sys/kern/kern_et.c Modified: head/sys/kern/kern_et.c ============================================================================== --- head/sys/kern/kern_et.c Mon Mar 16 19:18:45 2015 (r280150) +++ head/sys/kern/kern_et.c Mon Mar 16 19:25:03 2015 (r280151) @@ -243,9 +243,7 @@ sysctl_kern_eventtimer_choice(SYSCTL_HAN struct eventtimer *et; int error; - if ((error = sysctl_wire_old_buffer(req, 0)) != 0) - return (error); - sbuf_new_for_sysctl(&sb, NULL, 0, req); + sbuf_new(&sb, NULL, 256, SBUF_AUTOEXTEND | SBUF_INCLUDENUL); ET_LOCK(); SLIST_FOREACH(et, &eventtimers, et_all) { @@ -256,6 +254,8 @@ sysctl_kern_eventtimer_choice(SYSCTL_HAN ET_UNLOCK(); error = sbuf_finish(&sb); + if (error == 0) + error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); sbuf_delete(&sb); return (error); } From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 19:29:20 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 B338EF40; Mon, 16 Mar 2015 19:29:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E4DA774; Mon, 16 Mar 2015 19:29:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2GJTKjm086591; Mon, 16 Mar 2015 19:29:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GJTKwT086590; Mon, 16 Mar 2015 19:29:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503161929.t2GJTKwT086590@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 16 Mar 2015 19:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280152 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 19:29:20 -0000 Author: ian Date: Mon Mar 16 19:29:19 2015 New Revision: 280152 URL: https://svnweb.freebsd.org/changeset/base/280152 Log: Trivial change / forced-commit to document prior change that slipped in without a commit message... Use sbuf_new() + SYSCTL_OUT() instead of wiring the userland buffer and using sbuf_new_for_sysctl(). The preallocated 256 byte buffer is always going to be big enough to hold these results, and this should be more efficient than wiring the old buffer. Modified: head/sys/kern/kern_et.c Modified: head/sys/kern/kern_et.c ============================================================================== --- head/sys/kern/kern_et.c Mon Mar 16 19:25:03 2015 (r280151) +++ head/sys/kern/kern_et.c Mon Mar 16 19:29:19 2015 (r280152) @@ -235,7 +235,7 @@ et_free(struct eventtimer *et) return (0); } -/* Report list of supported event timers hardware via sysctl. */ +/* Report list of supported event timer hardware via sysctl. */ static int sysctl_kern_eventtimer_choice(SYSCTL_HANDLER_ARGS) { From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 20:00:10 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 58B77694; Mon, 16 Mar 2015 20:00:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43E0CAEA; Mon, 16 Mar 2015 20:00:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2GK0Al7001421; Mon, 16 Mar 2015 20:00:10 GMT (envelope-from benno@FreeBSD.org) Received: (from benno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GK09Mm001419; Mon, 16 Mar 2015 20:00:10 GMT (envelope-from benno@FreeBSD.org) Message-Id: <201503162000.t2GK09Mm001419@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: benno set sender to benno@FreeBSD.org using -f From: Benno Rice Date: Mon, 16 Mar 2015 20:00:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280153 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 20:00:10 -0000 Author: benno Date: Mon Mar 16 20:00:09 2015 New Revision: 280153 URL: https://svnweb.freebsd.org/changeset/base/280153 Log: Reset bp->bio_done to unmapped_buf when removing a transient map in biodone. Submitted by: Scott Ferris Sponsored by: EMC / Isilon Storage Division Reviewed by: kib Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Mon Mar 16 19:29:19 2015 (r280152) +++ head/sys/kern/vfs_bio.c Mon Mar 16 20:00:09 2015 (r280153) @@ -3611,6 +3611,7 @@ biodone(struct bio *bp) bp->bio_flags |= BIO_UNMAPPED; start = trunc_page((vm_offset_t)bp->bio_data); end = round_page((vm_offset_t)bp->bio_data + bp->bio_length); + bp->bio_data = unmapped_buf; pmap_qremove(start, OFF_TO_IDX(end - start)); vmem_free(transient_arena, start, end - start); atomic_add_int(&inflight_transient_maps, -1); From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 20:02:56 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 C3E3B86A for ; Mon, 16 Mar 2015 20:02:56 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (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 91B25BEC for ; Mon, 16 Mar 2015 20:02:56 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id D87A920834 for ; Mon, 16 Mar 2015 16:02:47 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Mon, 16 Mar 2015 16:02:49 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding :message-id:references:to; s=smtpout; bh=wCv1anyIj1Re1Vrkm67LQg/ I9GM=; b=TsEYC9ZzT4NLxncWhXQZ7x+EHpH48CS3p32+SvezTFlsBCA4r4yzXR2 qYqw9m+kFzxGDeSUrP1BQV/CDX0LO+ArBQvQ59NcqBDUEKSbhka8yW3AEWqST+FD c8LlVfNCDnvt3VFNJx5Qn/Ekf6jvlyoI6KIHW5CJIJo4k15spcP0= X-Sasl-enc: PzUGfG/LhgOusGxReuE8flt1JYFuU6c+6pmkpr8ryzwL 1426536169 Received: from mittlerweile.west.isilon.com (unknown [67.182.131.225]) by mail.messagingengine.com (Postfix) with ESMTPA id 50C1FC0029D; Mon, 16 Mar 2015 16:02:49 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280153 - head/sys/kern From: Benno Rice In-Reply-To: <201503162000.t2GK09Mm001419@svn.freebsd.org> Date: Mon, 16 Mar 2015 13:02:48 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <086E7CF9-2DC3-4DF1-9D77-7A20A8E93515@FreeBSD.org> References: <201503162000.t2GK09Mm001419@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.2070.6) 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, 16 Mar 2015 20:02:56 -0000 Of course by bp->bio_done I mean bp->bio_data. Pointy hat to: benno > On Mar 16, 2015, at 1:00 PM, Benno Rice wrote: >=20 > Author: benno > Date: Mon Mar 16 20:00:09 2015 > New Revision: 280153 > URL: https://svnweb.freebsd.org/changeset/base/280153 >=20 > Log: > Reset bp->bio_done to unmapped_buf when removing a transient map in = biodone. >=20 > Submitted by: Scott Ferris > Sponsored by: EMC / Isilon Storage Division > Reviewed by: kib >=20 > Modified: > head/sys/kern/vfs_bio.c >=20 > Modified: head/sys/kern/vfs_bio.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/kern/vfs_bio.c Mon Mar 16 19:29:19 2015 = (r280152) > +++ head/sys/kern/vfs_bio.c Mon Mar 16 20:00:09 2015 = (r280153) > @@ -3611,6 +3611,7 @@ biodone(struct bio *bp) > bp->bio_flags |=3D BIO_UNMAPPED; > start =3D trunc_page((vm_offset_t)bp->bio_data); > end =3D round_page((vm_offset_t)bp->bio_data + = bp->bio_length); > + bp->bio_data =3D unmapped_buf; > pmap_qremove(start, OFF_TO_IDX(end - start)); > vmem_free(transient_arena, start, end - start); > atomic_add_int(&inflight_transient_maps, -1); >=20 From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 20:13: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 A92F9FD9; Mon, 16 Mar 2015 20:13: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 922E7D4C; Mon, 16 Mar 2015 20:13: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 t2GKDQEU009618; Mon, 16 Mar 2015 20:13:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GKDQFr009617; Mon, 16 Mar 2015 20:13:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503162013.t2GKDQFr009617@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 16 Mar 2015 20:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280154 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 20:13:26 -0000 Author: mav Date: Mon Mar 16 20:13:25 2015 New Revision: 280154 URL: https://svnweb.freebsd.org/changeset/base/280154 Log: Report that we may have write cache, and that we do support FLUSH. FreeBSD guest driver does not use that legacy flag, but Linux seems does. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_virtio_block.c Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Mon Mar 16 20:00:09 2015 (r280153) +++ head/usr.sbin/bhyve/pci_virtio_block.c Mon Mar 16 20:13:25 2015 (r280154) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); /* Capability bits */ #define VTBLK_F_SEG_MAX (1 << 2) /* Maximum request segments */ #define VTBLK_F_BLK_SIZE (1 << 6) /* cfg block size valid */ +#define VTBLK_F_FLUSH (1 << 9) /* Cache flush support */ #define VTBLK_F_TOPOLOGY (1 << 10) /* Optimal I/O alignment */ /* @@ -72,6 +73,7 @@ __FBSDID("$FreeBSD$"); #define VTBLK_S_HOSTCAPS \ ( VTBLK_F_SEG_MAX | \ VTBLK_F_BLK_SIZE | \ + VTBLK_F_FLUSH | \ VTBLK_F_TOPOLOGY | \ VIRTIO_RING_F_INDIRECT_DESC ) /* indirect descriptors */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 20:24:39 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 242B0308; Mon, 16 Mar 2015 20:24: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 0E984E6A; Mon, 16 Mar 2015 20:24: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 t2GKOcwW014428; Mon, 16 Mar 2015 20:24:38 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GKOcGj014427; Mon, 16 Mar 2015 20:24:38 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201503162024.t2GKOcGj014427@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Mon, 16 Mar 2015 20:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280155 - head/contrib/sendmail/src X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 20:24:39 -0000 Author: gshapiro Date: Mon Mar 16 20:24:37 2015 New Revision: 280155 URL: https://svnweb.freebsd.org/changeset/base/280155 Log: Default to turning off OpenSSL SSL_OP_TLSEXT_PADDING as it breaks compatibility with some sites This change comes from 8.15 but is being backported to FreeBSD releases not yet using 8.15. MFC after: 3 days Noted by: julian@ Modified: head/contrib/sendmail/src/readcf.c Modified: head/contrib/sendmail/src/readcf.c ============================================================================== --- head/contrib/sendmail/src/readcf.c Mon Mar 16 20:13:25 2015 (r280154) +++ head/contrib/sendmail/src/readcf.c Mon Mar 16 20:24:37 2015 (r280155) @@ -124,6 +124,11 @@ readcf(cfname, safe, e) | SSL_OP_NO_TICKET #endif ; +# ifdef SSL_OP_TLSEXT_PADDING + /* SSL_OP_TLSEXT_PADDING breaks compatibility with some sites */ + Srv_SSL_Options &= ~SSL_OP_TLSEXT_PADDING; + Clt_SSL_Options &= ~SSL_OP_TLSEXT_PADDING; +# endif /* SSL_OP_TLSEXT_PADDING */ #endif /* STARTTLS */ if (DontLockReadFiles) sff |= SFF_NOLOCK; @@ -2406,6 +2411,9 @@ static struct ssl_options #ifdef SSL_OP_CRYPTOPRO_TLSEXT_BUG { "SSL_OP_CRYPTOPRO_TLSEXT_BUG", SSL_OP_CRYPTOPRO_TLSEXT_BUG }, #endif +#ifdef SSL_OP_TLSEXT_PADDING + { "SSL_OP_TLSEXT_PADDING", SSL_OP_TLSEXT_PADDING }, +#endif { NULL, 0 } }; #endif /* STARTTLS && _FFR_TLS_1 */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 21:09:12 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 8BA17A96; Mon, 16 Mar 2015 21:09:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 768957BC; Mon, 16 Mar 2015 21:09:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2GL9CX9035347; Mon, 16 Mar 2015 21:09:12 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2GL9CCK035346; Mon, 16 Mar 2015 21:09:12 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503162109.t2GL9CCK035346@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 16 Mar 2015 21:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280156 - head/sbin/dmesg X-SVN-Group: head MIME-Version: 1.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, 16 Mar 2015 21:09:12 -0000 Author: ian Date: Mon Mar 16 21:09:11 2015 New Revision: 280156 URL: https://svnweb.freebsd.org/changeset/base/280156 Log: Fix minor fallout from sysctl strings being nulterminated now. The dmesg code can read the buffer via sysctl or from a core file. In the core file case there will be no nulterm, and the code copes with that, but now in the sysctl case there is a nulterm (there didn't used to be). The least disruptive way to restore the old behavior (and eliminate a spurious '\000' at the end of the output) is to remove the nulterm (by decrementing the buffer length) in the sysctl case. Modified: head/sbin/dmesg/dmesg.c Modified: head/sbin/dmesg/dmesg.c ============================================================================== --- head/sbin/dmesg/dmesg.c Mon Mar 16 20:24:37 2015 (r280155) +++ head/sbin/dmesg/dmesg.c Mon Mar 16 21:09:11 2015 (r280156) @@ -111,8 +111,10 @@ main(int argc, char *argv[]) if (memf == NULL) { /* - * Running kernel. Use sysctl. This gives an unwrapped - * buffer as a side effect. + * Running kernel. Use sysctl. This gives an unwrapped buffer + * as a side effect. Remove nulterm (if present) so the value + * returned by sysctl is formatted as the rest of the code + * expects (the same as the value read from a core file below). */ if (sysctlbyname("kern.msgbuf", NULL, &buflen, NULL, 0) == -1) err(1, "sysctl kern.msgbuf"); @@ -120,6 +122,8 @@ main(int argc, char *argv[]) errx(1, "malloc failed"); if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == -1) err(1, "sysctl kern.msgbuf"); + if (buflen > 0 && bp[buflen - 1] == '\0') + buflen--; if (clear) if (sysctlbyname("kern.msgbuf_clear", NULL, NULL, &clear, sizeof(int))) err(1, "sysctl kern.msgbuf_clear"); From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 21:14:19 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 9AA9EC61; Mon, 16 Mar 2015 21:14:19 +0000 (UTC) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B4748A3; Mon, 16 Mar 2015 21:14:19 +0000 (UTC) Received: by iecvj10 with SMTP id vj10so178390714iec.0; Mon, 16 Mar 2015 14:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=zMvZsVwDj2NUIhtV5yosv/QtV80UnHQx9vcZcps9ETI=; b=xDBo/Ub6PHqAEVw+Ec641SK7iD9pRWLwOMo+WQWPi48LKrpfQxnBY3jqmjjidKEION tjgRiBCr6XRPm6qZ3HGzT+6jv+XipG7YmEh32TKmO/+HK3P7MSBatzMC/HjumV89XanW HRGBbrgb8L2pqe8R6B92q5UEbn18+ZngAilNSZqWvXGx00rIGedwDSUg3X6E4GitXGgs 8YjNEO0L8nrMVIuIicC6UCxtEm9Hi6pNP99gSvf8swMZGrgKqBJAxXUqfa1+ozd3qgjK QYKjqnCjMECIM0iA612mO2DGRgoM6DM0BVqMbkicgtfDxWin4nWfzHKBL2BBhHnQAF2D Yltg== X-Received: by 10.51.17.7 with SMTP id ga7mr96332746igd.42.1426540458804; Mon, 16 Mar 2015 14:14:18 -0700 (PDT) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.98.234 with HTTP; Mon, 16 Mar 2015 14:13:48 -0700 (PDT) In-Reply-To: <201503162013.t2GKDQFr009617@svn.freebsd.org> References: <201503162013.t2GKDQFr009617@svn.freebsd.org> From: Bryan Venteicher Date: Mon, 16 Mar 2015 16:13:48 -0500 X-Google-Sender-Auth: gAz-q72Mzb2zF9QJw9XZ6doKx88 Message-ID: Subject: Re: svn commit: r280154 - head/usr.sbin/bhyve To: Alexander Motin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 21:14:19 -0000 On Mon, Mar 16, 2015 at 3:13 PM, Alexander Motin wrote: > Author: mav > Date: Mon Mar 16 20:13:25 2015 > New Revision: 280154 > URL: https://svnweb.freebsd.org/changeset/base/280154 > > Log: > Report that we may have write cache, and that we do support FLUSH. > > FreeBSD guest driver does not use that legacy flag, but Linux seems does. > > The guest driver calls it by a prior name: VIRTIO_BLK_F_WCE. The write cache stuff went through several iterations, and goes away in VirtIO 1.0 specification. > MFC after: 2 weeks > > Modified: > head/usr.sbin/bhyve/pci_virtio_block.c > > Modified: head/usr.sbin/bhyve/pci_virtio_block.c > > ============================================================================== > --- head/usr.sbin/bhyve/pci_virtio_block.c Mon Mar 16 20:00:09 2015 > (r280153) > +++ head/usr.sbin/bhyve/pci_virtio_block.c Mon Mar 16 20:13:25 2015 > (r280154) > @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); > /* Capability bits */ > #define VTBLK_F_SEG_MAX (1 << 2) /* Maximum request > segments */ > #define VTBLK_F_BLK_SIZE (1 << 6) /* cfg block size > valid */ > +#define VTBLK_F_FLUSH (1 << 9) /* Cache flush > support */ > #define VTBLK_F_TOPOLOGY (1 << 10) /* Optimal I/O > alignment */ > > /* > @@ -72,6 +73,7 @@ __FBSDID("$FreeBSD$"); > #define VTBLK_S_HOSTCAPS \ > ( VTBLK_F_SEG_MAX | \ > VTBLK_F_BLK_SIZE | \ > + VTBLK_F_FLUSH | \ > VTBLK_F_TOPOLOGY | \ > VIRTIO_RING_F_INDIRECT_DESC ) /* indirect descriptors */ > > > From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 21:24:21 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 757FDE67; Mon, 16 Mar 2015 21:24:21 +0000 (UTC) Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com [IPv6:2a00:1450:4010:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E40D199F; Mon, 16 Mar 2015 21:24:20 +0000 (UTC) Received: by labjg1 with SMTP id jg1so51399323lab.2; Mon, 16 Mar 2015 14:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=7igJ2vZDAQMqPdhDOIIevRDtld6grM7pKZyfAzef/Ak=; b=Z12viwfrtXEiB6J1eoNFJcmrMfk6PmkV6kWBnjkifbjKUafkv0CsC2hDOdVCTCypUl ZfdaFkIAWlHVSu5Ov+2lqpU8TSWwrDSF1inieafzy7yY4T4dNGO85zbXw56hJR9dPX4v GvcpelX2gquolBhunpyxUGhQgI1L7opHctLLM+qzS6c7MMUuybkA8yngxPsJQc0Bkb7Y UhRpR9/l4H/ZmastiEGrVsASGtB0XurBMA0Ny/MCLdX0/3b2AEM2S3lz69KNvf93PKZX Fv2eKmU8d/Ucb/4Y0ZGWtCamedStE+9wmPy20hUctbYd3tqAt7VH4Qz+07ajWhljssIk pNCA== X-Received: by 10.152.26.136 with SMTP id l8mr57419293lag.109.1426541058967; Mon, 16 Mar 2015 14:24:18 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id pd1sm1645205lbc.9.2015.03.16.14.24.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Mar 2015 14:24:17 -0700 (PDT) Sender: Alexander Motin Message-ID: <550749FE.5000901@FreeBSD.org> Date: Mon, 16 Mar 2015 23:24:14 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Bryan Venteicher Subject: Re: svn commit: r280154 - head/usr.sbin/bhyve References: <201503162013.t2GKDQFr009617@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 21:24:21 -0000 On 16.03.2015 23:13, Bryan Venteicher wrote: > On Mon, Mar 16, 2015 at 3:13 PM, Alexander Motin > wrote: > Author: mav > Date: Mon Mar 16 20:13:25 2015 > New Revision: 280154 > URL: https://svnweb.freebsd.org/changeset/base/280154 > > Log: > Report that we may have write cache, and that we do support FLUSH. > > FreeBSD guest driver does not use that legacy flag, but Linux > seems does. > > The guest driver calls it by a prior name: VIRTIO_BLK_F_WCE. The write > cache stuff went through several iterations, and goes away in VirtIO 1.0 > specification. Yes, I've found that in the driver after the commit. But as I can see driver does nothing about it, except reporting via sysctl. I was confused by not seeing any use of that flag in data path. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Mon Mar 16 22:43:51 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 B7D46560; Mon, 16 Mar 2015 22:43:51 +0000 (UTC) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (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 71201264; Mon, 16 Mar 2015 22:43:51 +0000 (UTC) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id D2A6016A409; Mon, 16 Mar 2015 23:43:47 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LDePYxsX3hgS; Mon, 16 Mar 2015 23:43:17 +0100 (CET) Received: from [192.168.10.9] (vaio [192.168.10.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id BBDBF16A405; Mon, 16 Mar 2015 23:43:17 +0100 (CET) Message-ID: <55075C8F.70001@digiware.nl> Date: Mon, 16 Mar 2015 23:43:27 +0100 From: Willem Jan Withagen User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Alexander Motin , Bryan Venteicher Subject: Re: svn commit: r280154 - head/usr.sbin/bhyve References: <201503162013.t2GKDQFr009617@svn.freebsd.org> <550749FE.5000901@FreeBSD.org> In-Reply-To: <550749FE.5000901@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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, 16 Mar 2015 22:43:51 -0000 On 16-3-2015 22:24, Alexander Motin wrote: > On 16.03.2015 23:13, Bryan Venteicher wrote: >> On Mon, Mar 16, 2015 at 3:13 PM, Alexander Motin > > wrote: >> Author: mav >> Date: Mon Mar 16 20:13:25 2015 >> New Revision: 280154 >> URL: https://svnweb.freebsd.org/changeset/base/280154 >> >> Log: >> Report that we may have write cache, and that we do support FLUSH. >> >> FreeBSD guest driver does not use that legacy flag, but Linux >> seems does. >> >> The guest driver calls it by a prior name: VIRTIO_BLK_F_WCE. The write >> cache stuff went through several iterations, and goes away in VirtIO 1.0 >> specification. > > Yes, I've found that in the driver after the commit. But as I can see > driver does nothing about it, except reporting via sysctl. I was > confused by not seeing any use of that flag in data path. > There was a point in time that this Flush was in the way of booting certain Linux versions. I guess that accepting, but ignoring, which what I did at a certain point in my code, got me going. Until extra code made it in the code and the command got us further with our progress in Bhyve. --WjW From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 00:12:31 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 F0E08695; Tue, 17 Mar 2015 00:12:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC048DD0; Tue, 17 Mar 2015 00:12: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 t2H0CUXt023919; Tue, 17 Mar 2015 00:12:30 GMT (envelope-from stas@FreeBSD.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H0CUxs023918; Tue, 17 Mar 2015 00:12:30 GMT (envelope-from stas@FreeBSD.org) Message-Id: <201503170012.t2H0CUxs023918@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: stas set sender to stas@FreeBSD.org using -f From: Stanislav Sedov Date: Tue, 17 Mar 2015 00:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280157 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 00:12:31 -0000 Author: stas Date: Tue Mar 17 00:12:29 2015 New Revision: 280157 URL: https://svnweb.freebsd.org/changeset/base/280157 Log: Document the `show devmap` DDB command. Modified: head/share/man/man4/ddb.4 Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Mon Mar 16 21:09:11 2015 (r280156) +++ head/share/man/man4/ddb.4 Tue Mar 17 00:12:29 2015 (r280157) @@ -620,6 +620,13 @@ for more details. Show registers specific to the Cyrix processor. .\" .Pp +.It Ic show Cm devmap +Prints the contents of the static device mapping table. +Currently only available on the +ARM +architecture. +.\" +.Pp .It Ic show Cm domain Ar addr Print protocol domain structure .Vt struct domain From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 00:15:56 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 E8CA07FC; Tue, 17 Mar 2015 00:15: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 D3BEBDE6; Tue, 17 Mar 2015 00:15: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 t2H0FulK024425; Tue, 17 Mar 2015 00:15:56 GMT (envelope-from stas@FreeBSD.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H0FufS024424; Tue, 17 Mar 2015 00:15:56 GMT (envelope-from stas@FreeBSD.org) Message-Id: <201503170015.t2H0FufS024424@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: stas set sender to stas@FreeBSD.org using -f From: Stanislav Sedov Date: Tue, 17 Mar 2015 00:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280158 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 00:15:57 -0000 Author: stas Date: Tue Mar 17 00:15:55 2015 New Revision: 280158 URL: https://svnweb.freebsd.org/changeset/base/280158 Log: Bump the date after the `show devmap` addition. Modified: head/share/man/man4/ddb.4 Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Tue Mar 17 00:12:29 2015 (r280157) +++ head/share/man/man4/ddb.4 Tue Mar 17 00:15:55 2015 (r280158) @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2014 +.Dd March 16, 2015 .Dt DDB 4 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 00:38:36 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 EAAAEB5C; Tue, 17 Mar 2015 00:38:36 +0000 (UTC) Received: from aslan.scsiguy.com (mail.scsiguy.com [70.89.174.89]) (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 C2547FB8; Tue, 17 Mar 2015 00:38:36 +0000 (UTC) Received: from jt-mbp.sldomain.com (slboulder.spectralogic.com [192.30.190.3] (may be forged)) (authenticated bits=0) by aslan.scsiguy.com (8.14.9/8.14.9) with ESMTP id t2H0cY7V063636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Mar 2015 18:38:35 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280133 - head/usr.sbin/bhyve From: "Justin T. Gibbs" In-Reply-To: <201503160916.t2G9G01e095354@svn.freebsd.org> Date: Mon, 16 Mar 2015 18:38:29 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <6A7A51CE-9EAA-4F62-BECB-3CFDD708E06E@scsiguy.com> References: <201503160916.t2G9G01e095354@svn.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.2070.6) 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: Tue, 17 Mar 2015 00:38:37 -0000 On Mar 16, 2015, at 3:16 AM, Alexander Motin wrote: >=20 > Author: mav > Date: Mon Mar 16 09:15:59 2015 > New Revision: 280133 > URL: https://svnweb.freebsd.org/changeset/base/280133 >=20 > Log: > Increase S/G list size of 32 to 33 entries. >=20 > 32 entries are not enough for the worst case of misaligned 128KB = request, > that made FreeBSD to chunk large quests in odd pieces. >=20 > MFC after: 2 weeks >=20 > Modified: > head/usr.sbin/bhyve/block_if.h > head/usr.sbin/bhyve/pci_virtio_block.c >=20 > Modified: head/usr.sbin/bhyve/block_if.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.sbin/bhyve/block_if.h Mon Mar 16 01:15:08 2015 = (r280132) > +++ head/usr.sbin/bhyve/block_if.h Mon Mar 16 09:15:59 2015 = (r280133) > @@ -39,7 +39,7 @@ > #include > #include >=20 > -#define BLOCKIF_IOV_MAX 32 /* not practical to be = IOV_MAX */ > +#define BLOCKIF_IOV_MAX 33 /* not practical to be = IOV_MAX */ Shouldn=E2=80=99t these be derived from MAXPHYS? =E2=80=94 Justin= From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 01:07:02 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 7737CEFA; Tue, 17 Mar 2015 01:07:02 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (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 5DC7F2EE; Tue, 17 Mar 2015 01:07:01 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 4B85D105571; Mon, 16 Mar 2015 18:06:54 -0700 (PDT) Date: Mon, 16 Mar 2015 18:06:54 -0700 From: hiren panchasara To: Gleb Smirnoff Subject: Re: svn commit: r278729 - head/sys/sys Message-ID: <20150317010654.GB53237@strugglingcoder.info> References: <201502132319.t1DNJZuP057045@svn.freebsd.org> <20150311213607.GN88380@strugglingcoder.info> <20150316123940.GA17947@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NDin8bjvE/0mNLFQ" Content-Disposition: inline In-Reply-To: <20150316123940.GA17947@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "Simon J. Gerraty" , 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: Tue, 17 Mar 2015 01:07:02 -0000 --NDin8bjvE/0mNLFQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 03/16/15 at 03:39P, Gleb Smirnoff wrote: > On Wed, Mar 11, 2015 at 02:36:07PM -0700, hiren panchasara wrote: > h> On 02/13/15 at 11:19P, Simon J. Gerraty wrote: > h> > Author: sjg > h> > Date: Fri Feb 13 23:19:35 2015 > h> > New Revision: 278729 > h> > URL: https://svnweb.freebsd.org/changeset/base/278729 > h> >=20 > h> > Log: > h> > sbspace: size of bleft, mleft must match sockbuf fields to avoid > h> > overflow on amd64 > h> > =20 > h> > Submitted by: anshukla@juniper.net > h> > Obtained from: Juniper Networks > h>=20 > h> Talking to sjg on -arch to MFC this. If he cannot get around doing tha= t, > h> I'll do it tomorrow.=20 > h>=20 > h> Letting people know here to see if there are any objections. >=20 > Would that fix the bug we've been discussing? Unsure as I am not sure what caused the issue I saw. For those who do not know the details, we recently saw a userland process stuck spinning at 100% around sbcut_internal(). Inside sbflush_internal(), the sb_cc was grown to be about 4G. And before passing it to sbcut_internal(), we cast it from uint to int which would make that valud -ve. Gleb pointed out to me that sbspace() is supposed to check/stop sb_cc =66rom growing that large. Now, I am not sure if we'd ever run into this situation again but current fix is a great catch anyways. I still have 2 questions around what we saw. It'd be great if someone can clarify them for my understanding: 1) Even if we get into such a scenario that we were in, following would help by not looping endlessly. --- uipc_sockbuf.c.0 2015-03-11 15:49:52.000000000 -0700 +++ uipc_sockbuf.c 2015-03-11 15:51:48.000000000 -0700 @@ -877,6 +877,9 @@ { struct mbuf *m, *n, *next, *mfree; + if (len < 0) + panic("%s: len is %d and it is supposed to be +ve", + __func__, len); + next =3D (m =3D sb->sb_mb) ? m->m_nextpkt : 0; mfree =3D NULL 2) We need 1) because we are casting a uint to int which _may_ rander a value -ve. Is there a way we can avoid the casting? cheers, Hiren --NDin8bjvE/0mNLFQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVB34tXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/ld9AH/1nGS6BhZb2+k6C/2TKuhIYn kEYDg42LlT3oJoKPNAqbmO8AS30cLz2hnf8dUNpfwuaaPt3zwuyXz70HhEcV1Snn b/GQzM/k3j87oZvq1Ao+QdE5+vBnttaDBUjo7xrWXj8/upZJDXLAlHpL1HxgTVDk mVJTbI2hNo2+rWn7xfIGDKBz+FXPa+BWG4f8ciidpaXNh65qCz+emWOxSF4uh+jb 65kWAAZ88h23y7H+JuG+RapBaB/F0RqNhJIasmirGojHswR/cGGrDJ5wtC9OE77I A/XN6Oc2AdUsEgLFH6WcmI5gWgx8FmB1/L4J/M2jkPUBJRHzf1R8zUwqoJARd8o= =NdEP -----END PGP SIGNATURE----- --NDin8bjvE/0mNLFQ-- From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 05:48:47 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 78623B8E; Tue, 17 Mar 2015 05:48:47 +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 62FC41DA; Tue, 17 Mar 2015 05:48:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2H5mkRM078608; Tue, 17 Mar 2015 05:48:46 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H5mkjo078605; Tue, 17 Mar 2015 05:48:46 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201503170548.t2H5mkjo078605@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 17 Mar 2015 05:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280159 - in head/share: examples/etc mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 05:48:47 -0000 Author: jkim Date: Tue Mar 17 05:48:45 2015 New Revision: 280159 URL: https://svnweb.freebsd.org/changeset/base/280159 Log: Catch up with Clang 3.6.0. Modified: head/share/examples/etc/make.conf head/share/mk/bsd.cpu.mk Modified: head/share/examples/etc/make.conf ============================================================================== --- head/share/examples/etc/make.conf Tue Mar 17 00:15:55 2015 (r280158) +++ head/share/examples/etc/make.conf Tue Mar 17 05:48:45 2015 (r280159) @@ -44,8 +44,9 @@ # if omitted), ultrasparc3 # Additionally the following CPU types are recognized by clang: # Intel x86 architecture (for both amd64 and i386): -# (AMD CPUs) bdver3, bdver2, bdver1, btver2, btver1 -# (Intel CPUs) slm, core-avx2, core-avx-i, corei7-avx, corei7, atom +# (AMD CPUs) bdver4, bdver3, bdver2, bdver1, btver2, btver1 +# (Intel CPUs) skylake, knl, broadwell, haswell, ivybridge, +# sandybridge, westmere, nehalem, silvermont, bonnell # # (?= allows to buildworld for a different CPUTYPE.) # Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Tue Mar 17 00:15:55 2015 (r280158) +++ head/share/mk/bsd.cpu.mk Tue Mar 17 05:48:45 2015 (r280159) @@ -24,41 +24,50 @@ MACHINE_CPU = mips # Handle aliases (not documented in make.conf to avoid user confusion # between e.g. i586 and pentium) -. if ${MACHINE_CPUARCH} == "i386" +. if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "barcelona" CPUTYPE = amdfam10 -. elif ${CPUTYPE} == "k7" -CPUTYPE = athlon -. elif ${CPUTYPE} == "westmere" || ${CPUTYPE} == "nehalem" -CPUTYPE = corei7 +. elif ${CPUTYPE} == "core-avx2" +CPUTYPE = haswell +. elif ${CPUTYPE} == "core-avx-i" +CPUTYPE = ivybridge +. elif ${CPUTYPE} == "corei7-avx" +CPUTYPE = sandybridge +. elif ${CPUTYPE} == "corei7" +CPUTYPE = nehalem +. elif ${CPUTYPE} == "slm" +CPUTYPE = silvermont +. elif ${CPUTYPE} == "atom" +CPUTYPE = bonnell . elif ${CPUTYPE} == "core" CPUTYPE = prescott -. elif ${CPUTYPE} == "p4" +. endif +. if ${MACHINE_CPUARCH} == "amd64" +. if ${CPUTYPE} == "prescott" +CPUTYPE = nocona +. endif +. else +. if ${CPUTYPE} == "k7" +CPUTYPE = athlon +. elif ${CPUTYPE} == "p4" CPUTYPE = pentium4 -. elif ${CPUTYPE} == "p4m" +. elif ${CPUTYPE} == "p4m" CPUTYPE = pentium4m -. elif ${CPUTYPE} == "p3" +. elif ${CPUTYPE} == "p3" CPUTYPE = pentium3 -. elif ${CPUTYPE} == "p3m" +. elif ${CPUTYPE} == "p3m" CPUTYPE = pentium3m -. elif ${CPUTYPE} == "p-m" +. elif ${CPUTYPE} == "p-m" CPUTYPE = pentium-m -. elif ${CPUTYPE} == "p2" +. elif ${CPUTYPE} == "p2" CPUTYPE = pentium2 -. elif ${CPUTYPE} == "i686" +. elif ${CPUTYPE} == "i686" CPUTYPE = pentiumpro -. elif ${CPUTYPE} == "i586/mmx" +. elif ${CPUTYPE} == "i586/mmx" CPUTYPE = pentium-mmx -. elif ${CPUTYPE} == "i586" +. elif ${CPUTYPE} == "i586" CPUTYPE = pentium -. endif -. elif ${MACHINE_CPUARCH} == "amd64" -. if ${CPUTYPE} == "barcelona" -CPUTYPE = amdfam10 -. elif ${CPUTYPE} == "westmere" || ${CPUTYPE} == "nehalem" -CPUTYPE = corei7 -. elif ${CPUTYPE} == "prescott" -CPUTYPE = nocona +. endif . endif . elif ${MACHINE_ARCH} == "sparc64" . if ${CPUTYPE} == "us" @@ -140,7 +149,9 @@ _CPUCFLAGS = -mcpu=ultrasparc3 # presence of a CPU feature. . if ${MACHINE_CPUARCH} == "i386" -. if ${CPUTYPE} == "bdver3" || ${CPUTYPE} == "bdver2" || \ +. if ${CPUTYPE} == "bdver4" +MACHINE_CPU = xop avx2 avx sse42 sse41 ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 +. elif ${CPUTYPE} == "bdver3" || ${CPUTYPE} == "bdver2" || \ ${CPUTYPE} == "bdver1" MACHINE_CPU = xop avx sse42 sse41 ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 . elif ${CPUTYPE} == "btver2" @@ -165,15 +176,18 @@ MACHINE_CPU = 3dnow mmx k6 k5 i586 MACHINE_CPU = mmx k6 k5 i586 . elif ${CPUTYPE} == "k5" MACHINE_CPU = k5 i586 -. elif ${CPUTYPE} == "core-avx2" +. elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "knl" +MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 +. elif ${CPUTYPE} == "broadwell" || ${CPUTYPE} == "haswell" MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 -. elif ${CPUTYPE} == "core-avx-i" || ${CPUTYPE} == "corei7-avx" +. elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 -. elif ${CPUTYPE} == "slm" || ${CPUTYPE} == "corei7" +. elif ${CPUTYPE} == "westmere" || ${CPUTYPE} == "nehalem" || \ + ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "penryn" MACHINE_CPU = sse41 ssse3 sse3 sse2 sse i686 mmx i586 -. elif ${CPUTYPE} == "atom" || ${CPUTYPE} == "core2" +. elif ${CPUTYPE} == "core2" || ${CPUTYPE} == "bonnell" MACHINE_CPU = ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "yonah" || ${CPUTYPE} == "prescott" MACHINE_CPU = sse3 sse2 sse i686 mmx i586 @@ -203,7 +217,9 @@ MACHINE_CPU = mmx . endif MACHINE_CPU += i486 . elif ${MACHINE_CPUARCH} == "amd64" -. if ${CPUTYPE} == "bdver3" || ${CPUTYPE} == "bdver2" || \ +. if ${CPUTYPE} == "bdver4" +MACHINE_CPU = xop avx2 avx sse42 sse41 ssse3 sse4a sse3 +. elif ${CPUTYPE} == "bdver3" || ${CPUTYPE} == "bdver2" || \ ${CPUTYPE} == "bdver1" MACHINE_CPU = xop avx sse42 sse41 ssse3 sse4a sse3 . elif ${CPUTYPE} == "btver2" @@ -218,15 +234,18 @@ MACHINE_CPU = k8 3dnow sse3 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ ${CPUTYPE} == "athlon-fx" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow -. elif ${CPUTYPE} == "core-avx2" +. elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "knl" +MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 +. elif ${CPUTYPE} == "broadwell" || ${CPUTYPE} == "haswell" MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 -. elif ${CPUTYPE} == "core-avx-i" || ${CPUTYPE} == "corei7-avx" +. elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 -. elif ${CPUTYPE} == "slm" || ${CPUTYPE} == "corei7" +. elif ${CPUTYPE} == "westmere" || ${CPUTYPE} == "nehalem" || \ + ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "penryn" MACHINE_CPU = sse41 ssse3 sse3 -. elif ${CPUTYPE} == "atom" || ${CPUTYPE} == "core2" +. elif ${CPUTYPE} == "core2" || ${CPUTYPE} == "bonnell" MACHINE_CPU = ssse3 sse3 . elif ${CPUTYPE} == "nocona" MACHINE_CPU = sse3 From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 08:03:02 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 AFF4BE91; Tue, 17 Mar 2015 08:03:02 +0000 (UTC) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27DBD1A6; Tue, 17 Mar 2015 08:03:02 +0000 (UTC) Received: by lbcds1 with SMTP id ds1so1305036lbc.3; Tue, 17 Mar 2015 01:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=XpNpJ0iVMhM+hpZnkCdTebaAMLWwsvF2cTXH7gQNzzE=; b=nLaEHi3BN5bDlbuIukl/cbdu3qBeARoXB3LMKTE17m+Yau9gusa3vgRMeZJYxTcYRC YEm4VtjAVA0qQkyKTpHtJkWmv0NkeO0JpWLlxDMFnrnG6V+7/G7R3SKyM++XFNibaphB TVg2sAFmeuCtYGGypf6x9UbuSa86CQGcav7DZuAQsn+eG5fVk7CdHamnuwqP3B/QLUuA PEhEw6d1FVx2QcVkAUAQeLgsBEmTfZnDVMFGWgaJFLCeHcwtau/B0EnQLYjCMbWDd/uA w9IzllDdze2/eudjJ2Hqkzpbdw6CBOMpU268jbMYio85/nrrrjPvp58gsiRXEmJJ06Wa inpQ== X-Received: by 10.112.212.106 with SMTP id nj10mr39900799lbc.36.1426579380075; Tue, 17 Mar 2015 01:03:00 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id ei4sm2649282lad.31.2015.03.17.01.02.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2015 01:02:58 -0700 (PDT) Sender: Alexander Motin Message-ID: <5507DFAF.9000808@FreeBSD.org> Date: Tue, 17 Mar 2015 10:02:55 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Justin T. Gibbs" Subject: Re: svn commit: r280133 - head/usr.sbin/bhyve References: <201503160916.t2G9G01e095354@svn.freebsd.org> <6A7A51CE-9EAA-4F62-BECB-3CFDD708E06E@scsiguy.com> In-Reply-To: <6A7A51CE-9EAA-4F62-BECB-3CFDD708E06E@scsiguy.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: Tue, 17 Mar 2015 08:03:02 -0000 On 17.03.2015 02:38, Justin T. Gibbs wrote: > On Mar 16, 2015, at 3:16 AM, Alexander Motin wrote: >> >> Author: mav >> Date: Mon Mar 16 09:15:59 2015 >> New Revision: 280133 >> URL: https://svnweb.freebsd.org/changeset/base/280133 >> >> Log: >> Increase S/G list size of 32 to 33 entries. >> >> 32 entries are not enough for the worst case of misaligned 128KB request, >> that made FreeBSD to chunk large quests in odd pieces. >> >> MFC after: 2 weeks >> >> Modified: >> head/usr.sbin/bhyve/block_if.h >> head/usr.sbin/bhyve/pci_virtio_block.c >> >> Modified: head/usr.sbin/bhyve/block_if.h >> ============================================================================== >> --- head/usr.sbin/bhyve/block_if.h Mon Mar 16 01:15:08 2015 (r280132) >> +++ head/usr.sbin/bhyve/block_if.h Mon Mar 16 09:15:59 2015 (r280133) >> @@ -39,7 +39,7 @@ >> #include >> #include >> >> -#define BLOCKIF_IOV_MAX 32 /* not practical to be IOV_MAX */ >> +#define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ > > Shouldn’t these be derived from MAXPHYS? I am not sure. This is user-level, what it know about MAXPHYS? And what MAXPHYS means for file I/O? It may be more tuned for guest's potential MAXPHYS rather then host's one. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 08:14:48 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 8382A1A7; Tue, 17 Mar 2015 08:14:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63E072DA; Tue, 17 Mar 2015 08:14:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2H8ElGV047257; Tue, 17 Mar 2015 08:14:47 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H8Elt2047254; Tue, 17 Mar 2015 08:14:47 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503170814.t2H8Elt2047254@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 17 Mar 2015 08:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280160 - in head: share/man/man4 sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 08:14:48 -0000 Author: arybchik Date: Tue Mar 17 08:14:46 2015 New Revision: 280160 URL: https://svnweb.freebsd.org/changeset/base/280160 Log: sfxge: add tunables to control LRO parameters on driver load time Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/share/man/man4/sfxge.4 head/sys/dev/sfxge/sfxge_rx.c Modified: head/share/man/man4/sfxge.4 ============================================================================== --- head/share/man/man4/sfxge.4 Tue Mar 17 05:48:45 2015 (r280159) +++ head/share/man/man4/sfxge.4 Tue Mar 17 08:14:46 2015 (r280160) @@ -120,6 +120,27 @@ The value must be greater than or equal The maximum number of allocated RSS channels for the Nth adapter. If set to 0 or unset, the number of channels is determined by the number of CPU cores. +.It Va hw.sfxge.lro.table_size +Size of the LRO hash table. +Must be a power of 2. +A larger table means we can accelerate a larger number of streams. +.It Va hw.sfxge.lro.chain_max +The maximum length of a hash chain. +If chains get too long then the lookup time increases and may exceed +the benefit of LRO. +.It Va hw.sfxge.lro.idle_ticks +The maximum time (in ticks) that a connection can be idle before it's LRO +state is discarded. +.It Va hw.sfxge.lro.slow_start_packets +Number of packets with payload that must arrive in-order before a connection +is eligible for LRO. +The idea is we should avoid coalescing segments when the sender is in +slow-start because reducing the ACK rate can damage performance. +.It Va hw.sfxge.lro.loss_packets +Number of packets with payload that must arrive in-order following loss +before a connection is eligible for LRO. +The idea is we should avoid coalescing segments when the sender is recovering +from loss, because reducing the ACK rate can damage performance. .El .Sh SUPPORT For general information and support, Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Tue Mar 17 05:48:45 2015 (r280159) +++ head/sys/dev/sfxge/sfxge_rx.c Tue Mar 17 08:14:46 2015 (r280160) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -58,20 +59,38 @@ __FBSDID("$FreeBSD$"); #ifdef SFXGE_LRO +SYSCTL_NODE(_hw_sfxge, OID_AUTO, lro, CTLFLAG_RD, NULL, + "Large receive offload (LRO) parameters"); + +#define SFXGE_LRO_PARAM(_param) SFXGE_PARAM(lro._param) + /* Size of the LRO hash table. Must be a power of 2. A larger table * means we can accelerate a larger number of streams. */ static unsigned lro_table_size = 128; +TUNABLE_INT(SFXGE_LRO_PARAM(table_size), &lro_table_size); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, table_size, CTLFLAG_RDTUN, + &lro_table_size, 0, + "Size of the LRO hash table (must be a power of 2)"); /* Maximum length of a hash chain. If chains get too long then the lookup * time increases and may exceed the benefit of LRO. */ static unsigned lro_chain_max = 20; +TUNABLE_INT(SFXGE_LRO_PARAM(chain_max), &lro_chain_max); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, chain_max, CTLFLAG_RDTUN, + &lro_chain_max, 0, + "The maximum length of a hash chain"); /* Maximum time (in ticks) that a connection can be idle before it's LRO * state is discarded. */ static unsigned lro_idle_ticks; /* initialised in sfxge_rx_init() */ +TUNABLE_INT(SFXGE_LRO_PARAM(idle_ticks), &lro_idle_ticks); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, idle_ticks, CTLFLAG_RDTUN, + &lro_idle_ticks, 0, + "The maximum time (in ticks) that a connection can be idle " + "before it's LRO state is discarded"); /* Number of packets with payload that must arrive in-order before a * connection is eligible for LRO. The idea is we should avoid coalescing @@ -79,6 +98,11 @@ static unsigned lro_idle_ticks; /* initi * can damage performance. */ static int lro_slow_start_packets = 2000; +TUNABLE_INT(SFXGE_LRO_PARAM(slow_start_packets), &lro_slow_start_packets); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, slow_start_packets, CTLFLAG_RDTUN, + &lro_slow_start_packets, 0, + "Number of packets with payload that must arrive in-order before " + "a connection is eligible for LRO"); /* Number of packets with payload that must arrive in-order following loss * before a connection is eligible for LRO. The idea is we should avoid @@ -86,6 +110,11 @@ static int lro_slow_start_packets = 2000 * reducing the ACK rate can damage performance. */ static int lro_loss_packets = 20; +TUNABLE_INT(SFXGE_LRO_PARAM(loss_packets), &lro_loss_packets); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, loss_packets, CTLFLAG_RDTUN, + &lro_loss_packets, 0, + "Number of packets with payload that must arrive in-order " + "following loss before a connection is eligible for LRO"); /* Flags for sfxge_lro_conn::l2_id; must not collide with EVL_VLID_MASK */ #define SFXGE_LRO_L2_ID_VLAN 0x4000 @@ -1239,6 +1268,13 @@ sfxge_rx_init(struct sfxge_softc *sc) int rc; #ifdef SFXGE_LRO + if (!ISP2(lro_table_size)) { + log(LOG_ERR, "%s=%u must be power of 2", + SFXGE_LRO_PARAM(table_size), lro_table_size); + rc = EINVAL; + goto fail_lro_table_size; + } + if (lro_idle_ticks == 0) lro_idle_ticks = hz / 10 + 1; /* 100 ms */ #endif @@ -1266,5 +1302,9 @@ fail: sfxge_rx_qfini(sc, index); sc->rxq_count = 0; + +#ifdef SFXGE_LRO +fail_lro_table_size: +#endif return (rc); } From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 08:16:38 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 A8FB041A; Tue, 17 Mar 2015 08:16:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89B8D316; Tue, 17 Mar 2015 08:16:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2H8Gciv047703; Tue, 17 Mar 2015 08:16:38 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H8GcBC047702; Tue, 17 Mar 2015 08:16:38 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503170816.t2H8GcBC047702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 17 Mar 2015 08:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280161 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 08:16:38 -0000 Author: arybchik Date: Tue Mar 17 08:16:37 2015 New Revision: 280161 URL: https://svnweb.freebsd.org/changeset/base/280161 Log: sfxge: move deferred packet list statistics to dedicated node It is done to structure sysctl and do not mix with Tx queue statistics to be added. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Tue Mar 17 08:14:46 2015 (r280160) +++ head/sys/dev/sfxge/sfxge_tx.c Tue Mar 17 08:16:37 2015 (r280161) @@ -1380,11 +1380,13 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u enum sfxge_txq_type type, unsigned int evq_index) { char name[16]; + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->dev); struct sysctl_oid *txq_node; struct sfxge_txq *txq; struct sfxge_evq *evq; #ifdef SFXGE_HAVE_MQ struct sfxge_tx_dpl *stdp; + struct sysctl_oid *dpl_node; #endif efsys_mem_t *esmp; unsigned int nmaps; @@ -1433,10 +1435,8 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u } snprintf(name, sizeof(name), "%u", txq_index); - txq_node = SYSCTL_ADD_NODE( - device_get_sysctl_ctx(sc->dev), - SYSCTL_CHILDREN(sc->txqs_node), - OID_AUTO, name, CTLFLAG_RD, NULL, ""); + txq_node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(sc->txqs_node), + OID_AUTO, name, CTLFLAG_RD, NULL, ""); if (txq_node == NULL) { rc = ENOMEM; goto fail_txq_node; @@ -1476,21 +1476,25 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u SFXGE_TXQ_LOCK_INIT(txq, device_get_nameunit(sc->dev), txq_index); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), - SYSCTL_CHILDREN(txq_node), OID_AUTO, - "dpl_get_count", CTLFLAG_RD | CTLFLAG_STATS, + dpl_node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(txq_node), OID_AUTO, + "dpl", CTLFLAG_RD, NULL, + "Deferred packet list statistics"); + if (dpl_node == NULL) { + rc = ENOMEM; + goto fail_dpl_node; + } + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + "get_count", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_get_count, 0, ""); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), - SYSCTL_CHILDREN(txq_node), OID_AUTO, - "dpl_get_non_tcp_count", CTLFLAG_RD | CTLFLAG_STATS, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + "get_non_tcp_count", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_get_non_tcp_count, 0, ""); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), - SYSCTL_CHILDREN(txq_node), OID_AUTO, - "dpl_get_hiwat", CTLFLAG_RD | CTLFLAG_STATS, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + "get_hiwat", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_get_hiwat, 0, ""); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), - SYSCTL_CHILDREN(txq_node), OID_AUTO, - "dpl_put_hiwat", CTLFLAG_RD | CTLFLAG_STATS, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + "put_hiwat", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_put_hiwat, 0, ""); #endif @@ -1501,6 +1505,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); +fail_dpl_node: fail_tx_dpl_put_max: fail_tx_dpl_get_max: fail3: From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 08:21: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 CE8CB5E8; Tue, 17 Mar 2015 08:21: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 B93AE3FD; Tue, 17 Mar 2015 08:21: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 t2H8LWca051702; Tue, 17 Mar 2015 08:21:32 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H8LV3R051696; Tue, 17 Mar 2015 08:21:31 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503170821.t2H8LV3R051696@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 17 Mar 2015 08:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280162 - in head/sys: dev/sfxge modules/sfxge X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 08:21:33 -0000 Author: arybchik Date: Tue Mar 17 08:21:31 2015 New Revision: 280162 URL: https://svnweb.freebsd.org/changeset/base/280162 Log: sfxge: adding version info to device description The information is required for NIC update and config tools. Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Added: head/sys/dev/sfxge/sfxge_version.h (contents, props changed) Modified: head/sys/dev/sfxge/sfxge.c head/sys/modules/sfxge/Makefile Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Tue Mar 17 08:16:37 2015 (r280161) +++ head/sys/dev/sfxge/sfxge.c Tue Mar 17 08:21:31 2015 (r280162) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" #include "sfxge_rx.h" +#include "sfxge_version.h" #define SFXGE_CAP (IFCAP_VLAN_MTU | \ IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \ @@ -475,6 +476,12 @@ sfxge_create(struct sfxge_softc *sc) if ((error = efx_nic_probe(enp)) != 0) goto fail5; + SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "version", CTLFLAG_RD, + SFXGE_VERSION_STRING, 0, + "Driver version"); + /* Initialize the NVRAM. */ if ((error = efx_nvram_init(enp)) != 0) goto fail6; Added: head/sys/dev/sfxge/sfxge_version.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/sfxge/sfxge_version.h Tue Mar 17 08:21:31 2015 (r280162) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2015 Solarflare Communications, Inc. + * All rights reserved. + * + * This software was developed in part by OKTET Labs under contract for + * Solarflare Communications, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 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 _SFXGE_VERSION_H +#define _SFXGE_VERSION_H + +#define SFXGE_VERSION_STRING "v3.3.4.6363" + +#endif /* _SFXGE_DRIVER_VERSION_H */ Modified: head/sys/modules/sfxge/Makefile ============================================================================== --- head/sys/modules/sfxge/Makefile Tue Mar 17 08:16:37 2015 (r280161) +++ head/sys/modules/sfxge/Makefile Tue Mar 17 08:21:31 2015 (r280162) @@ -11,7 +11,7 @@ SRCS+= opt_inet.h opt_inet6.h opt_sched. SRCS+= sfxge.c sfxge_dma.c sfxge_ev.c SRCS+= sfxge_intr.c sfxge_mcdi.c SRCS+= sfxge_port.c sfxge_rx.c sfxge_tx.c -SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h +SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h sfxge_version.h .PATH: ${.CURDIR}/../../dev/sfxge/common SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 08:23:16 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 80DB6779; Tue, 17 Mar 2015 08:23:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BE42606; Tue, 17 Mar 2015 08:23:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2H8NGSj051983; Tue, 17 Mar 2015 08:23:16 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H8NGv1051982; Tue, 17 Mar 2015 08:23:16 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503170823.t2H8NGv1051982@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 17 Mar 2015 08:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280163 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 08:23:16 -0000 Author: arybchik Date: Tue Mar 17 08:23:15 2015 New Revision: 280163 URL: https://svnweb.freebsd.org/changeset/base/280163 Log: sfxge: prefetch txq->common if TxQ is started only Transmit may be called when TxQ is not started yet (i.e. txq->common is invalid). TxQ state is checked below when mbuf is processed and dropped if TxQ is not started. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Tue Mar 17 08:21:31 2015 (r280162) +++ head/sys/dev/sfxge/sfxge_tx.c Tue Mar 17 08:23:15 2015 (r280163) @@ -423,8 +423,10 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx stdp = &txq->dpl; pushed = txq->added; - prefetch_read_many(sc->enp); - prefetch_read_many(txq->common); + if (__predict_true(txq->init_state == SFXGE_TXQ_STARTED)) { + prefetch_read_many(sc->enp); + prefetch_read_many(txq->common); + } mbuf = stdp->std_get; count = stdp->std_get_count; From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 08:23:47 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 B68D78C3; Tue, 17 Mar 2015 08:23:47 +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 A1834610; Tue, 17 Mar 2015 08:23:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2H8Nldc052081; Tue, 17 Mar 2015 08:23:47 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H8Nl6R052080; Tue, 17 Mar 2015 08:23:47 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503170823.t2H8Nl6R052080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 17 Mar 2015 08:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280164 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 08:23:47 -0000 Author: arybchik Date: Tue Mar 17 08:23:46 2015 New Revision: 280164 URL: https://svnweb.freebsd.org/changeset/base/280164 Log: sfxge: increase default put-list limit to 1024 Drops are observed under multi-stream TCP traffic due to put-list overflow with limit equal to 64. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Tue Mar 17 08:23:15 2015 (r280163) +++ head/sys/dev/sfxge/sfxge_tx.h Tue Mar 17 08:23:46 2015 (r280164) @@ -81,7 +81,7 @@ struct sfxge_tx_mapping { #define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT (64 * 1024) #define SFXGE_TX_DPL_GET_NON_TCP_PKT_LIMIT_DEFAULT 1024 -#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 +#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 1024 /* * Deferred packet list. From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 08:42:10 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 9E1B0DDF; Tue, 17 Mar 2015 08:42:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 884CF89F; Tue, 17 Mar 2015 08:42:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2H8gASL061130; Tue, 17 Mar 2015 08:42:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H8gA7E061129; Tue, 17 Mar 2015 08:42:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503170842.t2H8gA7E061129@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Mar 2015 08:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280165 - head/sys/dev/usb/storage X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 08:42:10 -0000 Author: hselasky Date: Tue Mar 17 08:42:09 2015 New Revision: 280165 URL: https://svnweb.freebsd.org/changeset/base/280165 Log: Use define instead of constant. Submitted by: Dmitry Luhtionov Modified: head/sys/dev/usb/storage/umass.c Modified: head/sys/dev/usb/storage/umass.c ============================================================================== --- head/sys/dev/usb/storage/umass.c Tue Mar 17 08:23:46 2015 (r280164) +++ head/sys/dev/usb/storage/umass.c Tue Mar 17 08:42:09 2015 (r280165) @@ -2698,8 +2698,7 @@ umass_rbc_transform(struct umass_softc * case START_STOP_UNIT: case SYNCHRONIZE_CACHE: case WRITE_10: - case 0x2f: /* VERIFY_10 is absent from - * scsi_all.h??? */ + case VERIFY_10: case INQUIRY: case MODE_SELECT_10: case MODE_SENSE_10: From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 09:21: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 5E4C5BC9; Tue, 17 Mar 2015 09:21: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 4932ED6F; Tue, 17 Mar 2015 09:21: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 t2H9LWYn079999; Tue, 17 Mar 2015 09:21:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H9LWBl079998; Tue, 17 Mar 2015 09:21:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503170921.t2H9LWBl079998@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 17 Mar 2015 09:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280166 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 09:21:32 -0000 Author: mav Date: Tue Mar 17 09:21:31 2015 New Revision: 280166 URL: https://svnweb.freebsd.org/changeset/base/280166 Log: Make ATA power management commands to work on SCSI HBAs via PASS THROUGH. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Tue Mar 17 08:42:09 2015 (r280165) +++ head/sbin/camcontrol/camcontrol.c Tue Mar 17 09:21:31 2015 (r280166) @@ -7964,39 +7964,21 @@ atapm(struct cam_device *device, int arg else sc = 253; - cam_fill_ataio(&ccb->ataio, - retry_count, - NULL, - /*flags*/CAM_DIR_NONE, - MSG_SIMPLE_Q_TAG, - /*data_ptr*/NULL, - /*dxfer_len*/0, - timeout ? timeout : 30 * 1000); - ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, sc); - - /* Disable freezing the device queue */ - ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; - - if (arglist & CAM_ARG_ERR_RECOVER) - ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; - - if (cam_send_ccb(device, ccb) < 0) { - warn("error sending command"); - - if (arglist & CAM_ARG_VERBOSE) - cam_error_print(device, ccb, CAM_ESF_ALL, - CAM_EPF_ALL, stderr); + retval = ata_do_28bit_cmd(device, + ccb, + /*retries*/retry_count, + /*flags*/CAM_DIR_NONE, + /*protocol*/AP_PROTO_NON_DATA, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/cmd, + /*features*/0, + /*lba*/0, + /*sector_count*/sc, + /*data_ptr*/NULL, + /*dxfer_len*/0, + /*timeout*/timeout ? timeout : 30 * 1000, + /*quiet*/1); - retval = 1; - goto bailout; - } - - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); - retval = 1; - goto bailout; - } -bailout: cam_freeccb(ccb); return (retval); } From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 11:08:00 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 D49FE81A; Tue, 17 Mar 2015 11:08:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF7E7C64; Tue, 17 Mar 2015 11:08:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HB800v027681; Tue, 17 Mar 2015 11:08:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HB80hL027677; Tue, 17 Mar 2015 11:08:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503171108.t2HB80hL027677@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 17 Mar 2015 11:08:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280168 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 11:08:00 -0000 Author: hselasky Date: Tue Mar 17 11:07:59 2015 New Revision: 280168 URL: https://svnweb.freebsd.org/changeset/base/280168 Log: Remove no longer used allocation type. Submitted by: Dmitry Luhtionov Modified: head/sys/dev/usb/usb.h head/sys/dev/usb/usb_core.c Modified: head/sys/dev/usb/usb.h ============================================================================== --- head/sys/dev/usb/usb.h Tue Mar 17 09:51:01 2015 (r280167) +++ head/sys/dev/usb/usb.h Tue Mar 17 11:07:59 2015 (r280168) @@ -55,7 +55,6 @@ SYSCTL_DECL(_hw_usb); MALLOC_DECLARE(M_USB); MALLOC_DECLARE(M_USBDEV); -MALLOC_DECLARE(M_USBHC); #endif /* _KERNEL */ #ifndef USB_GLOBAL_INCLUDE_FILE Modified: head/sys/dev/usb/usb_core.c ============================================================================== --- head/sys/dev/usb/usb_core.c Tue Mar 17 09:51:01 2015 (r280167) +++ head/sys/dev/usb/usb_core.c Tue Mar 17 11:07:59 2015 (r280168) @@ -63,6 +63,5 @@ const struct usb_string_lang usb_string_ MALLOC_DEFINE(M_USB, "USB", "USB"); MALLOC_DEFINE(M_USBDEV, "USBdev", "USB device"); -MALLOC_DEFINE(M_USBHC, "USBHC", "USB host controller"); MODULE_VERSION(usb, 1); From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 12:19: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 9EC24A6D; Tue, 17 Mar 2015 12:19: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 7FA0D676; Tue, 17 Mar 2015 12:19: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 t2HCJUE5060537; Tue, 17 Mar 2015 12:19:30 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HCJTe0060534; Tue, 17 Mar 2015 12:19:29 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503171219.t2HCJTe0060534@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 17 Mar 2015 12:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280169 - in head/sys: net netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 12:19:30 -0000 Author: glebius Date: Tue Mar 17 12:19:28 2015 New Revision: 280169 URL: https://svnweb.freebsd.org/changeset/base/280169 Log: Always lock the hash row of a source node when updating its 'states' counter. PR: 182401 Sponsored by: Nginx, Inc. Modified: head/sys/net/pfvar.h head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Tue Mar 17 11:07:59 2015 (r280168) +++ head/sys/net/pfvar.h Tue Mar 17 12:19:28 2015 (r280169) @@ -1550,7 +1550,6 @@ extern struct pf_state *pf_find_state_a extern struct pf_src_node *pf_find_src_node(struct pf_addr *, struct pf_rule *, sa_family_t, int); extern void pf_unlink_src_node(struct pf_src_node *); -extern void pf_unlink_src_node_locked(struct pf_src_node *); extern u_int pf_free_src_nodes(struct pf_src_node_list *); extern void pf_print_state(struct pf_state *); extern void pf_print_flags(u_int8_t); Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Tue Mar 17 11:07:59 2015 (r280168) +++ head/sys/netpfil/pf/pf.c Tue Mar 17 12:19:28 2015 (r280169) @@ -649,7 +649,10 @@ pf_find_src_node(struct pf_addr *src, st ((af == AF_INET && n->addr.v4.s_addr == src->v4.s_addr) || (af == AF_INET6 && bcmp(&n->addr, src, sizeof(*src)) == 0))) break; - if (n != NULL || returnlocked == 0) + if (n != NULL) { + n->states++; + PF_HASHROW_UNLOCK(sh); + } else if (returnlocked == 0) PF_HASHROW_UNLOCK(sh); return (n); @@ -693,6 +696,7 @@ pf_insert_src_node(struct pf_src_node ** LIST_INSERT_HEAD(&sh->nodes, *sn, entry); (*sn)->creation = time_uptime; (*sn)->ruletype = rule->action; + (*sn)->states = 1; if ((*sn)->rule.ptr != NULL) counter_u64_add((*sn)->rule.ptr->src_nodes, 1); PF_HASHROW_UNLOCK(sh); @@ -709,37 +713,13 @@ pf_insert_src_node(struct pf_src_node ** } void -pf_unlink_src_node_locked(struct pf_src_node *src) +pf_unlink_src_node(struct pf_src_node *src) { -#ifdef INVARIANTS - struct pf_srchash *sh; - sh = &V_pf_srchash[pf_hashsrc(&src->addr, src->af)]; - PF_HASHROW_ASSERT(sh); -#endif + PF_HASHROW_ASSERT(&V_pf_srchash[pf_hashsrc(&src->addr, src->af)]); LIST_REMOVE(src, entry); if (src->rule.ptr) counter_u64_add(src->rule.ptr->src_nodes, -1); - counter_u64_add(V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS], 1); -} - -void -pf_unlink_src_node(struct pf_src_node *src) -{ - struct pf_srchash *sh; - - sh = &V_pf_srchash[pf_hashsrc(&src->addr, src->af)]; - PF_HASHROW_LOCK(sh); - pf_unlink_src_node_locked(src); - PF_HASHROW_UNLOCK(sh); -} - -static void -pf_free_src_node(struct pf_src_node *sn) -{ - - KASSERT(sn->states == 0, ("%s: %p has refs", __func__, sn)); - uma_zfree(V_pf_sources_z, sn); } u_int @@ -749,10 +729,12 @@ pf_free_src_nodes(struct pf_src_node_lis u_int count = 0; LIST_FOREACH_SAFE(sn, head, entry, tmp) { - pf_free_src_node(sn); + uma_zfree(V_pf_sources_z, sn); count++; } + counter_u64_add(V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS], count); + return (count); } @@ -1542,7 +1524,7 @@ pf_purge_expired_src_nodes() PF_HASHROW_LOCK(sh); LIST_FOREACH_SAFE(cur, &sh->nodes, entry, next) if (cur->states == 0 && cur->expire <= time_uptime) { - pf_unlink_src_node_locked(cur); + pf_unlink_src_node(cur); LIST_INSERT_HEAD(&freelist, cur, entry); } else if (cur->rule.ptr != NULL) cur->rule.ptr->rule_flag |= PFRULE_REFS; @@ -1557,27 +1539,31 @@ pf_purge_expired_src_nodes() static void pf_src_tree_remove_state(struct pf_state *s) { - u_int32_t timeout; + struct pf_src_node *sn; + struct pf_srchash *sh; + uint32_t timeout; + + timeout = s->rule.ptr->timeout[PFTM_SRC_NODE] ? + s->rule.ptr->timeout[PFTM_SRC_NODE] : + V_pf_default_rule.timeout[PFTM_SRC_NODE]; if (s->src_node != NULL) { + sn = s->src_node; + sh = &V_pf_srchash[pf_hashsrc(&sn->addr, sn->af)]; + PF_HASHROW_LOCK(sh); if (s->src.tcp_est) - --s->src_node->conn; - if (--s->src_node->states == 0) { - timeout = s->rule.ptr->timeout[PFTM_SRC_NODE]; - if (!timeout) - timeout = - V_pf_default_rule.timeout[PFTM_SRC_NODE]; - s->src_node->expire = time_uptime + timeout; - } + --sn->conn; + if (--sn->states == 0) + sn->expire = time_uptime + timeout; + PF_HASHROW_UNLOCK(sh); } if (s->nat_src_node != s->src_node && s->nat_src_node != NULL) { - if (--s->nat_src_node->states == 0) { - timeout = s->rule.ptr->timeout[PFTM_SRC_NODE]; - if (!timeout) - timeout = - V_pf_default_rule.timeout[PFTM_SRC_NODE]; - s->nat_src_node->expire = time_uptime + timeout; - } + sn = s->nat_src_node; + sh = &V_pf_srchash[pf_hashsrc(&sn->addr, sn->af)]; + PF_HASHROW_LOCK(sh); + if (--sn->states == 0) + sn->expire = time_uptime + timeout; + PF_HASHROW_UNLOCK(sh); } s->src_node = s->nat_src_node = NULL; } @@ -3563,15 +3549,12 @@ pf_create_state(struct pf_rule *r, struc s->creation = time_uptime; s->expire = time_uptime; - if (sn != NULL) { + if (sn != NULL) s->src_node = sn; - s->src_node->states++; - } if (nsn != NULL) { /* XXX We only modify one side for now. */ PF_ACPY(&nsn->raddr, &nk->addr[1], pd->af); s->nat_src_node = nsn; - s->nat_src_node->states++; } if (pd->proto == IPPROTO_TCP) { if ((pd->flags & PFDESC_TCP_NORM) && pf_normalize_tcp_init(m, @@ -3669,14 +3652,32 @@ csfailed: if (nk != NULL) uma_zfree(V_pf_state_key_z, nk); - if (sn != NULL && sn->states == 0 && sn->expire == 0) { - pf_unlink_src_node(sn); - pf_free_src_node(sn); + if (sn != NULL) { + struct pf_srchash *sh; + + sh = &V_pf_srchash[pf_hashsrc(&sn->addr, sn->af)]; + PF_HASHROW_LOCK(sh); + if (--sn->states == 0 && sn->expire == 0) { + pf_unlink_src_node(sn); + uma_zfree(V_pf_sources_z, sn); + counter_u64_add( + V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS], 1); + } + PF_HASHROW_UNLOCK(sh); } - if (nsn != sn && nsn != NULL && nsn->states == 0 && nsn->expire == 0) { - pf_unlink_src_node(nsn); - pf_free_src_node(nsn); + if (nsn != sn && nsn != NULL) { + struct pf_srchash *sh; + + sh = &V_pf_srchash[pf_hashsrc(&nsn->addr, nsn->af)]; + PF_HASHROW_LOCK(sh); + if (--nsn->states == 1 && nsn->expire == 0) { + pf_unlink_src_node(nsn); + uma_zfree(V_pf_sources_z, nsn); + counter_u64_add( + V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS], 1); + } + PF_HASHROW_UNLOCK(sh); } return (PF_DROP); Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Tue Mar 17 11:07:59 2015 (r280168) +++ head/sys/netpfil/pf/pf_ioctl.c Tue Mar 17 12:19:28 2015 (r280169) @@ -3436,7 +3436,7 @@ pf_kill_srcnodes(struct pfioc_src_node_k &psnk->psnk_dst.addr.v.a.addr, &psnk->psnk_dst.addr.v.a.mask, &sn->raddr, sn->af)) { - pf_unlink_src_node_locked(sn); + pf_unlink_src_node(sn); LIST_INSERT_HEAD(&kill, sn, entry); sn->expire = 1; } @@ -3449,18 +3449,10 @@ pf_kill_srcnodes(struct pfioc_src_node_k PF_HASHROW_LOCK(ih); LIST_FOREACH(s, &ih->states, entry) { - if (s->src_node && s->src_node->expire == 1) { -#ifdef INVARIANTS - s->src_node->states--; -#endif + if (s->src_node && s->src_node->expire == 1) s->src_node = NULL; - } - if (s->nat_src_node && s->nat_src_node->expire == 1) { -#ifdef INVARIANTS - s->nat_src_node->states--; -#endif + if (s->nat_src_node && s->nat_src_node->expire == 1) s->nat_src_node = NULL; - } } PF_HASHROW_UNLOCK(ih); } From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 12:40:35 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 8DADF189; Tue, 17 Mar 2015 12:40:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F138970; Tue, 17 Mar 2015 12:40:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HCeZ4g072595; Tue, 17 Mar 2015 12:40:35 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HCeYXa072591; Tue, 17 Mar 2015 12:40:34 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201503171240.t2HCeYXa072591@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Tue, 17 Mar 2015 12:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280171 - head/bin/ps X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 12:40:35 -0000 Author: feld (ports committer) Date: Tue Mar 17 12:40:33 2015 New Revision: 280171 URL: https://svnweb.freebsd.org/changeset/base/280171 Log: Use 24h timestamps in the ps(1) STARTED column The previous 12h AM/PM format was perplexing as it didn't follow the locale of the user and was a minor annoyance to FreeBSD users coming from Linux. Additionally, the man page was incorrect about the strftime format. There are three time formats that may be displayed in the STARTED column depending on the age of the process. Below is an example. For a process started at 14:30 on Monday 16 March 2015, the following formats may be used: 14:30 for process < 24h old (24h Timestamp) Mon14 for process > 24h, < 1 week old (Weekday Hour) 16Mar15 for process > 1 week old (Day Month Year) Differential Revision: https://reviews.freebsd.org/D1620 Reviewed by: brd Approved by: trasz Modified: head/bin/ps/print.c head/bin/ps/ps.1 Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Tue Mar 17 12:40:26 2015 (r280170) +++ head/bin/ps/print.c Tue Mar 17 12:40:33 2015 (r280171) @@ -383,7 +383,6 @@ started(KINFO *k, VARENT *ve __unused) { time_t then; struct tm *tp; - static int use_ampm = -1; size_t buflen = 100; char *buf; @@ -394,16 +393,12 @@ started(KINFO *k, VARENT *ve __unused) if (buf == NULL) errx(1, "malloc failed"); - if (use_ampm < 0) - use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); then = k->ki_p->ki_start.tv_sec; tp = localtime(&then); if (now - k->ki_p->ki_start.tv_sec < 24 * 3600) { - (void)strftime(buf, buflen, - use_ampm ? "%l:%M%p" : "%k:%M ", tp); + (void)strftime(buf, buflen, "%H:%M ", tp); } else if (now - k->ki_p->ki_start.tv_sec < 7 * 86400) { - (void)strftime(buf, buflen, - use_ampm ? "%a%I%p" : "%a%H ", tp); + (void)strftime(buf, buflen, "%a%H ", tp); } else (void)strftime(buf, buflen, "%e%b%y", tp); return (buf); Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Tue Mar 17 12:40:26 2015 (r280170) +++ head/bin/ps/ps.1 Tue Mar 17 12:40:33 2015 (r280171) @@ -381,12 +381,12 @@ the real memory (resident set) size of t The time the command started. If the command started less than 24 hours ago, the start time is displayed using the -.Dq Li %l:ps.1p +.Dq Li %H:%M format described in .Xr strftime 3 . If the command started less than 7 days ago, the start time is displayed using the -.Dq Li %a6.15p +.Dq Li %a%H format. Otherwise, the start time is displayed using the .Dq Li %e%b%y From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 13:21: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 4A9697E2; Tue, 17 Mar 2015 13:21:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3593DD60; Tue, 17 Mar 2015 13:21:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HDLoWP093058; Tue, 17 Mar 2015 13:21:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HDLoO5093056; Tue, 17 Mar 2015 13:21:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503171321.t2HDLoO5093056@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 17 Mar 2015 13:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280172 - in head/sys/cam: ata scsi X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 13:21:51 -0000 Author: mav Date: Tue Mar 17 13:21:49 2015 New Revision: 280172 URL: https://svnweb.freebsd.org/changeset/base/280172 Log: Improve ATA and SCSI versions printing. There is no "SCSI-6" and "ATA-9", but there is "SPC-4" and "ACS-2". MFC after: 2 weeks Modified: head/sys/cam/ata/ata_all.c head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Tue Mar 17 12:40:33 2015 (r280171) +++ head/sys/cam/ata/ata_all.c Tue Mar 17 13:21:49 2015 (r280172) @@ -275,28 +275,38 @@ ata_res_sbuf(struct ccb_ataio *ataio, st void ata_print_ident(struct ata_params *ident_data) { - char product[48], revision[16]; + const char *proto; + char product[48], revision[16], ata[12], sata[12]; cam_strvis(product, ident_data->model, sizeof(ident_data->model), sizeof(product)); cam_strvis(revision, ident_data->revision, sizeof(ident_data->revision), sizeof(revision)); - printf("<%s %s> %s-%d", - product, revision, - (ident_data->config == ATA_PROTO_CFA) ? "CFA" : - (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA", - ata_version(ident_data->version_major)); + proto = (ident_data->config == ATA_PROTO_CFA) ? "CFA" : + (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA"; + if (ata_version(ident_data->version_major) == 0) { + snprintf(ata, sizeof(ata), "%s", proto); + } else if (ata_version(ident_data->version_major) <= 7) { + snprintf(ata, sizeof(ata), "%s-%d", proto, + ata_version(ident_data->version_major)); + } else if (ata_version(ident_data->version_major) == 8) { + snprintf(ata, sizeof(ata), "%s8-ACS", proto); + } else { + snprintf(ata, sizeof(ata), "ACS-%d %s", + ata_version(ident_data->version_major) - 7, proto); + } if (ident_data->satacapabilities && ident_data->satacapabilities != 0xffff) { if (ident_data->satacapabilities & ATA_SATA_GEN3) - printf(" SATA 3.x"); + snprintf(sata, sizeof(sata), " SATA 3.x"); else if (ident_data->satacapabilities & ATA_SATA_GEN2) - printf(" SATA 2.x"); + snprintf(sata, sizeof(sata), " SATA 2.x"); else if (ident_data->satacapabilities & ATA_SATA_GEN1) - printf(" SATA 1.x"); + snprintf(sata, sizeof(sata), " SATA 1.x"); else - printf(" SATA"); - } - printf(" device\n"); + snprintf(sata, sizeof(sata), " SATA"); + } else + sata[0] = 0; + printf("<%s %s> %s%s device\n", product, revision, ata, sata); } void Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Tue Mar 17 12:40:33 2015 (r280171) +++ head/sys/cam/scsi/scsi_all.c Tue Mar 17 13:21:49 2015 (r280172) @@ -5149,7 +5149,7 @@ scsi_print_inquiry(struct scsi_inquiry_d { u_int8_t type; char *dtype, *qtype; - char vendor[16], product[48], revision[16], rstr[4]; + char vendor[16], product[48], revision[16], rstr[12]; type = SID_TYPE(inq_data); @@ -5157,7 +5157,7 @@ scsi_print_inquiry(struct scsi_inquiry_d * Figure out basic device type and qualifier. */ if (SID_QUAL_IS_VENDOR_UNIQUE(inq_data)) { - qtype = "(vendor-unique qualifier)"; + qtype = " (vendor-unique qualifier)"; } else { switch (SID_QUAL(inq_data)) { case SID_QUAL_LU_CONNECTED: @@ -5165,15 +5165,15 @@ scsi_print_inquiry(struct scsi_inquiry_d break; case SID_QUAL_LU_OFFLINE: - qtype = "(offline)"; + qtype = " (offline)"; break; case SID_QUAL_RSVD: - qtype = "(reserved qualifier)"; + qtype = " (reserved qualifier)"; break; default: case SID_QUAL_BAD_LU: - qtype = "(LUN not supported)"; + qtype = " (LUN not supported)"; break; } } @@ -5242,11 +5242,16 @@ scsi_print_inquiry(struct scsi_inquiry_d cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), sizeof(revision)); - if (SID_ANSI_REV(inq_data) == SCSI_REV_CCS) - bcopy("CCS", rstr, 4); - else - snprintf(rstr, sizeof (rstr), "%d", SID_ANSI_REV(inq_data)); - printf("<%s %s %s> %s %s SCSI-%s device %s\n", + if (SID_ANSI_REV(inq_data) == SCSI_REV_0) + snprintf(rstr, sizeof(rstr), "SCSI"); + else if (SID_ANSI_REV(inq_data) <= SCSI_REV_SPC) { + snprintf(rstr, sizeof(rstr), "SCSI-%d", + SID_ANSI_REV(inq_data)); + } else { + snprintf(rstr, sizeof(rstr), "SPC-%d SCSI", + SID_ANSI_REV(inq_data) - 2); + } + printf("<%s %s %s> %s %s %s device%s\n", vendor, product, revision, SID_IS_REMOVABLE(inq_data) ? "Removable" : "Fixed", dtype, rstr, qtype); From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 14:16:51 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 DC37423D; Tue, 17 Mar 2015 14:16:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7E922D7; Tue, 17 Mar 2015 14:16:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HEGpLG017144; Tue, 17 Mar 2015 14:16:51 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HEGpLT017143; Tue, 17 Mar 2015 14:16:51 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503171416.t2HEGpLT017143@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 17 Mar 2015 14:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280173 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 14:16:52 -0000 Author: glebius Date: Tue Mar 17 14:16:50 2015 New Revision: 280173 URL: https://svnweb.freebsd.org/changeset/base/280173 Log: Reduce header pollution. Modified: head/sys/kern/uipc_mbufhash.c Modified: head/sys/kern/uipc_mbufhash.c ============================================================================== --- head/sys/kern/uipc_mbufhash.c Tue Mar 17 13:21:49 2015 (r280172) +++ head/sys/kern/uipc_mbufhash.c Tue Mar 17 14:16:50 2015 (r280173) @@ -24,13 +24,8 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include -#include #include #include -#include - -#include -#include #include @@ -46,8 +41,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#include - static const void * m_ether_tcpip_hash_gethdr(const struct mbuf *m, const u_int off, const u_int len, void *buf) From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 15:11: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 A591E276; Tue, 17 Mar 2015 15:11: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 90D55BAD; Tue, 17 Mar 2015 15:11: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 t2HFBkCa045057; Tue, 17 Mar 2015 15:11:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HFBkZx045056; Tue, 17 Mar 2015 15:11:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201503171511.t2HFBkZx045056@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 17 Mar 2015 15:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280177 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 15:11:46 -0000 Author: bdrewery Date: Tue Mar 17 15:11:45 2015 New Revision: 280177 URL: https://svnweb.freebsd.org/changeset/base/280177 Log: Remove unneeded handling of undefined NM. Pointed out by: imp Discussed at: https://reviews.freebsd.org/D2039 MFC after: 2 weeks Modified: head/share/mk/bsd.lib.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Mar 17 15:04:28 2015 (r280176) +++ head/share/mk/bsd.lib.mk Tue Mar 17 15:11:45 2015 (r280177) @@ -170,11 +170,7 @@ _LIBS= lib${LIB}.a lib${LIB}.a: ${OBJS} ${STATICOBJS} @${ECHO} building static ${LIB} library @rm -f ${.TARGET} -.if !defined(NM) - @${AR} ${ARFLAGS} ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} -.else @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} -.endif ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif @@ -188,11 +184,7 @@ NOPATH_FILES+= ${POBJS} lib${LIB}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @rm -f ${.TARGET} -.if !defined(NM) - @${AR} ${ARFLAGS} ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD} -.else @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD} -.endif ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif @@ -225,15 +217,9 @@ ${SHLIB_NAME_FULL}: ${SOBJS} .if defined(SHLIB_LINK) @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK} .endif -.if !defined(NM) - @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ - -o ${.TARGET} -Wl,-soname,${SONAME} \ - `lorder ${SOBJS} | tsort -q` ${LDADD} -.else @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} -.endif .if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} .endif From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 15:12:53 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 990913C5; Tue, 17 Mar 2015 15:12:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 840D3BBF; Tue, 17 Mar 2015 15:12:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HFCrb7045456; Tue, 17 Mar 2015 15:12:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HFCrYw045455; Tue, 17 Mar 2015 15:12:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201503171512.t2HFCrYw045455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 17 Mar 2015 15:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280178 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 15:12:53 -0000 Author: bdrewery Date: Tue Mar 17 15:12:52 2015 New Revision: 280178 URL: https://svnweb.freebsd.org/changeset/base/280178 Log: Unhide linker line for libraries. The compilation lines are not hidden and there is not much reason to hide the linker line. It is useful to see. Discussed at: https://reviews.freebsd.org/D2039 MFC after: 2 weeks Modified: head/share/mk/bsd.lib.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Mar 17 15:11:45 2015 (r280177) +++ head/share/mk/bsd.lib.mk Tue Mar 17 15:12:52 2015 (r280178) @@ -217,7 +217,7 @@ ${SHLIB_NAME_FULL}: ${SOBJS} .if defined(SHLIB_LINK) @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK} .endif - @${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ + ${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .if ${MK_CTF} != "no" From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 15:16:38 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 92755576; Tue, 17 Mar 2015 15:16:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 635F0BF8; Tue, 17 Mar 2015 15:16:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HFGcgi046021; Tue, 17 Mar 2015 15:16:38 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HFGbj9046017; Tue, 17 Mar 2015 15:16:37 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201503171516.t2HFGbj9046017@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 17 Mar 2015 15:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280179 - in head: . lib/atf/libatf-c++ share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 15:16:38 -0000 Author: bdrewery Date: Tue Mar 17 15:16:36 2015 New Revision: 280179 URL: https://svnweb.freebsd.org/changeset/base/280179 Log: Add LIB_CXX so that C++ libraries will use CXX to link. This fixes C++ libraries not implicitly linking in libc++. This is generally not an issue because the final linking with the compiled binary will involve CXX via PROG_CXX or other means. It is however inconsistent with libraries implicitly linking in libc and problematic for trying to build libraries with '-z defs' to ensure all direct dependencies are linked in. libatf-c++ is currently the only consumer of this new feature. Differential Revision: https://reviews.freebsd.org/D2039 Reviewed by: imp Discussed with: bapt MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 head/lib/atf/libatf-c++/Makefile head/share/mk/bsd.lib.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Mar 17 15:12:52 2015 (r280178) +++ head/Makefile.inc1 Tue Mar 17 15:16:36 2015 (r280179) @@ -1685,6 +1685,10 @@ gnu/lib/libstdc++__L: lib/msun__L gnu/lib/libsupc++__L: gnu/lib/libstdc++__L .endif +.if ${MK_LIBCPLUSPLUS} != "no" +_prebuild_libs+= lib/libc++ +.endif + lib/libgeom__L: lib/libexpat__L .if ${MK_LIBTHR} != "no" Modified: head/lib/atf/libatf-c++/Makefile ============================================================================== --- head/lib/atf/libatf-c++/Makefile Tue Mar 17 15:12:52 2015 (r280178) +++ head/lib/atf/libatf-c++/Makefile Tue Mar 17 15:16:36 2015 (r280179) @@ -28,7 +28,7 @@ .include .include -LIB= atf-c++ +LIB_CXX= atf-c++ PRIVATELIB= true SHLIB_MAJOR= 2 Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Mar 17 15:12:52 2015 (r280178) +++ head/share/mk/bsd.lib.mk Tue Mar 17 15:16:36 2015 (r280179) @@ -4,6 +4,13 @@ .include +.if defined(LIB_CXX) +LIB= ${LIB_CXX} +_LD= ${CXX} +.else +_LD= ${CC} +.endif + # Set up the variables controlling shared libraries. After this section, # SHLIB_NAME will be defined only if we are to create a shared library. # SHLIB_LINK will be defined only if we are to create a link to it. @@ -217,7 +224,7 @@ ${SHLIB_NAME_FULL}: ${SOBJS} .if defined(SHLIB_LINK) @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK} .endif - ${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ + ${_LD} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .if ${MK_CTF} != "no" From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 15:21:02 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 B1E76734; Tue, 17 Mar 2015 15:21:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C9DACCA; Tue, 17 Mar 2015 15:21:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HFL2DX047245; Tue, 17 Mar 2015 15:21:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HFL2Q1047244; Tue, 17 Mar 2015 15:21:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201503171521.t2HFL2Q1047244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 17 Mar 2015 15:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280180 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 15:21:02 -0000 Author: bdrewery Date: Tue Mar 17 15:21:01 2015 New Revision: 280180 URL: https://svnweb.freebsd.org/changeset/base/280180 Log: Document LIB and LIB_CXX. MFC after: 2 weeks X-MFC-With: r280179 Modified: head/share/mk/bsd.README Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Tue Mar 17 15:16:36 2015 (r280179) +++ head/share/mk/bsd.README Tue Mar 17 15:21:01 2015 (r280180) @@ -336,6 +336,13 @@ with the current needs of the BSD tree. It sets/uses the following variables: +LIB The name of the library to build. + +LIB_CXX The name of the library to build. It also causes + to link the library with the + standard C++ library. LIB_CXX overrides the value + of LIB if LIB is also set. + LIBDIR Target directory for libraries. LINTLIBDIR Target directory for lint libraries. From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 15:48:20 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 D37B9E96; Tue, 17 Mar 2015 15:48:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE2BEF88; Tue, 17 Mar 2015 15:48:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HFmKQA060405; Tue, 17 Mar 2015 15:48:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HFmKSg060404; Tue, 17 Mar 2015 15:48:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503171548.t2HFmKSg060404@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Mar 2015 15:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280181 - head/contrib/compiler-rt/lib/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 15:48:20 -0000 Author: emaste Date: Tue Mar 17 15:48:19 2015 New Revision: 280181 URL: https://svnweb.freebsd.org/changeset/base/280181 Log: Import compiler-rt r232125 by Joerg Sonnenberger We want single precision here. Modified: head/contrib/compiler-rt/lib/builtins/fixunssfti.c Modified: head/contrib/compiler-rt/lib/builtins/fixunssfti.c ============================================================================== --- head/contrib/compiler-rt/lib/builtins/fixunssfti.c Tue Mar 17 15:21:01 2015 (r280180) +++ head/contrib/compiler-rt/lib/builtins/fixunssfti.c Tue Mar 17 15:48:19 2015 (r280181) @@ -12,6 +12,9 @@ * ===----------------------------------------------------------------------=== */ +#define SINGLE_PRECISION +#include "fp_lib.h" + #if defined(CRT_HAS_128BIT) typedef tu_int fixuint_t; #include "fp_fixuint_impl.inc" From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 18:32: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 A23551A1; Tue, 17 Mar 2015 18:32: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 8B0DE6B2; Tue, 17 Mar 2015 18:32: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 t2HIWVia039121; Tue, 17 Mar 2015 18:32:31 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HIWTu6039113; Tue, 17 Mar 2015 18:32:29 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201503171832.t2HIWTu6039113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Tue, 17 Mar 2015 18:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280182 - in head/sys: amd64/conf conf dev/ixgbe modules/ix modules/ixgbe modules/ixv X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 18:32:31 -0000 Author: jfv Date: Tue Mar 17 18:32:28 2015 New Revision: 280182 URL: https://svnweb.freebsd.org/changeset/base/280182 Log: Update to the Intel ixgbe driver: - Split the driver into independent pf and vf loadables. This is in preparation for SRIOV support which will be following shortly. This also allows us to keep a seperate revision control over the two parts, making for easier sustaining. - Make the TX/RX code a shared/seperated file, in the old code base the ixv code would miss fixes that went into ixgbe, this model will eliminate that problem. - The driver loadables will now match the device names, something that has been requested for some time. - Rather than a modules/ixgbe there is now modules/ix and modules/ixv - It will also be possible to make your static kernel with only one or the other for streamlined installs, or both. Enjoy! Submitted by: jfv and erj Added: head/sys/dev/ixgbe/if_ix.c (contents, props changed) head/sys/dev/ixgbe/if_ixv.c (contents, props changed) head/sys/dev/ixgbe/ix_txrx.c (contents, props changed) head/sys/modules/ix/ head/sys/modules/ix/Makefile (contents, props changed) head/sys/modules/ixv/ head/sys/modules/ixv/Makefile (contents, props changed) Deleted: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixv.c head/sys/dev/ixgbe/ixv.h head/sys/modules/ixgbe/ Modified: head/sys/amd64/conf/GENERIC head/sys/conf/NOTES head/sys/conf/files head/sys/dev/ixgbe/LICENSE head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_82598.c head/sys/dev/ixgbe/ixgbe_82598.h head/sys/dev/ixgbe/ixgbe_82599.c head/sys/dev/ixgbe/ixgbe_82599.h head/sys/dev/ixgbe/ixgbe_api.c head/sys/dev/ixgbe/ixgbe_api.h head/sys/dev/ixgbe/ixgbe_common.c head/sys/dev/ixgbe/ixgbe_common.h head/sys/dev/ixgbe/ixgbe_dcb.c head/sys/dev/ixgbe/ixgbe_dcb.h head/sys/dev/ixgbe/ixgbe_dcb_82598.c head/sys/dev/ixgbe/ixgbe_dcb_82598.h head/sys/dev/ixgbe/ixgbe_dcb_82599.c head/sys/dev/ixgbe/ixgbe_dcb_82599.h head/sys/dev/ixgbe/ixgbe_mbx.c head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_phy.c head/sys/dev/ixgbe/ixgbe_phy.h head/sys/dev/ixgbe/ixgbe_type.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/dev/ixgbe/ixgbe_vf.h head/sys/dev/ixgbe/ixgbe_x540.c head/sys/dev/ixgbe/ixgbe_x540.h Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Tue Mar 17 15:48:19 2015 (r280181) +++ head/sys/amd64/conf/GENERIC Tue Mar 17 18:32:28 2015 (r280182) @@ -216,7 +216,8 @@ device bxe # Broadcom NetXtreme II BC device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family -device ixgbe # Intel PRO/10GbE PCIE Ethernet Family +device ix # Intel PRO/10GbE PCIE PF Ethernet +device ixv # Intel PRO/10GbE PCIE VF Ethernet device ixl # Intel XL710 40Gbe PCIE Ethernet device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Mar 17 15:48:19 2015 (r280181) +++ head/sys/conf/NOTES Tue Mar 17 18:32:28 2015 (r280182) @@ -2100,7 +2100,8 @@ device de # DEC/Intel DC21x4x (``Tulip device em # Intel Pro/1000 Gigabit Ethernet device igb # Intel Pro/1000 PCIE Gigabit Ethernet device ixgb # Intel Pro/10Gbe PCI-X Ethernet -device ixgbe # Intel Pro/10Gbe PCIE Ethernet +device ix # Intel Pro/10Gbe PCIE Ethernet +device ixv # Intel Pro/10Gbe PCIE Ethernet VF device le # AMD Am7900 LANCE and Am79C9xx PCnet device mxge # Myricom Myri-10G 10GbE NIC device nxge # Neterion Xframe 10GbE Server/Storage Adapter Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Mar 17 15:48:19 2015 (r280181) +++ head/sys/conf/files Tue Mar 17 18:32:28 2015 (r280182) @@ -1769,31 +1769,31 @@ iwn6050.fw optional iwn6050fw | iwnfw dev/ixgb/if_ixgb.c optional ixgb dev/ixgb/ixgb_ee.c optional ixgb dev/ixgb/ixgb_hw.c optional ixgb -dev/ixgbe/ixgbe.c optional ixgbe inet \ +dev/ixgbe/if_ix.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" -dev/ixgbe/ixv.c optional ixgbe inet \ - compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_phy.c optional ixgbe inet \ +dev/ixgbe/if_ixv.c optional ixv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" +dev/ixgbe/ixgbe_phy.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_api.c optional ixgbe inet \ +dev/ixgbe/ixgbe_api.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_common.c optional ixgbe inet \ +dev/ixgbe/ixgbe_common.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_mbx.c optional ixgbe inet \ +dev/ixgbe/ixgbe_mbx.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_vf.c optional ixgbe inet \ +dev/ixgbe/ixgbe_vf.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_82598.c optional ixgbe inet \ +dev/ixgbe/ixgbe_82598.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_82599.c optional ixgbe inet \ +dev/ixgbe/ixgbe_82599.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_x540.c optional ixgbe inet \ +dev/ixgbe/ixgbe_x540.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_dcb.c optional ixgbe inet \ +dev/ixgbe/ixgbe_dcb.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_dcb_82598.c optional ixgbe inet \ +dev/ixgbe/ixgbe_dcb_82598.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/ixgbe/ixgbe_dcb_82599.c optional ixgbe inet \ +dev/ixgbe/ixgbe_dcb_82599.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy Modified: head/sys/dev/ixgbe/LICENSE ============================================================================== --- head/sys/dev/ixgbe/LICENSE Tue Mar 17 15:48:19 2015 (r280181) +++ head/sys/dev/ixgbe/LICENSE Tue Mar 17 18:32:28 2015 (r280182) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2013, Intel Corporation + Copyright (c) 2001-2015, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without Added: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ixgbe/if_ix.c Tue Mar 17 18:32:28 2015 (r280182) @@ -0,0 +1,4163 @@ +/****************************************************************************** + + Copyright (c) 2001-2015, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ +/*$FreeBSD$*/ + + +#ifndef IXGBE_STANDALONE_BUILD +#include "opt_inet.h" +#include "opt_inet6.h" +#include "opt_rss.h" +#endif + +#include "ixgbe.h" + +#ifdef RSS +#include +#endif + +/********************************************************************* + * Set this to one to display debug statistics + *********************************************************************/ +int ixgbe_display_debug_stats = 0; + +/********************************************************************* + * Driver version + *********************************************************************/ +char ixgbe_driver_version[] = "2.7.4"; + +/********************************************************************* + * PCI Device ID Table + * + * Used by probe to select devices to load on + * Last field stores an index into ixgbe_strings + * Last entry must be all 0s + * + * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } + *********************************************************************/ + +static ixgbe_vendor_info_t ixgbe_vendor_info_array[] = +{ + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T, 0, 0, 0}, + /* required last entry */ + {0, 0, 0, 0, 0} +}; + +/********************************************************************* + * Table of branding strings + *********************************************************************/ + +static char *ixgbe_strings[] = { + "Intel(R) PRO/10GbE PCI-Express Network Driver" +}; + +/********************************************************************* + * Function prototypes + *********************************************************************/ +static int ixgbe_probe(device_t); +static int ixgbe_attach(device_t); +static int ixgbe_detach(device_t); +static int ixgbe_shutdown(device_t); +static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); +static void ixgbe_init(void *); +static void ixgbe_init_locked(struct adapter *); +static void ixgbe_stop(void *); +#if __FreeBSD_version >= 1100036 +static uint64_t ixgbe_get_counter(struct ifnet *, ift_counter); +#endif +static void ixgbe_add_media_types(struct adapter *); +static void ixgbe_media_status(struct ifnet *, struct ifmediareq *); +static int ixgbe_media_change(struct ifnet *); +static void ixgbe_identify_hardware(struct adapter *); +static int ixgbe_allocate_pci_resources(struct adapter *); +static void ixgbe_get_slot_info(struct ixgbe_hw *); +static int ixgbe_allocate_msix(struct adapter *); +static int ixgbe_allocate_legacy(struct adapter *); +static int ixgbe_setup_msix(struct adapter *); +static void ixgbe_free_pci_resources(struct adapter *); +static void ixgbe_local_timer(void *); +static int ixgbe_setup_interface(device_t, struct adapter *); +static void ixgbe_config_link(struct adapter *); +static void ixgbe_rearm_queues(struct adapter *, u64); + +static void ixgbe_initialize_transmit_units(struct adapter *); +static void ixgbe_initialize_receive_units(struct adapter *); +static void ixgbe_enable_rx_drop(struct adapter *); +static void ixgbe_disable_rx_drop(struct adapter *); + +static void ixgbe_enable_intr(struct adapter *); +static void ixgbe_disable_intr(struct adapter *); +static void ixgbe_update_stats_counters(struct adapter *); +static void ixgbe_set_promisc(struct adapter *); +static void ixgbe_set_multi(struct adapter *); +static void ixgbe_update_link_status(struct adapter *); +static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS); +static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS); +static int ixgbe_set_thermal_test(SYSCTL_HANDLER_ARGS); +static void ixgbe_set_ivar(struct adapter *, u8, u8, s8); +static void ixgbe_configure_ivars(struct adapter *); +static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *, u8 **, u32 *); + +static void ixgbe_setup_vlan_hw_support(struct adapter *); +static void ixgbe_register_vlan(void *, struct ifnet *, u16); +static void ixgbe_unregister_vlan(void *, struct ifnet *, u16); + +static void ixgbe_add_hw_stats(struct adapter *adapter); + +/* Support for pluggable optic modules */ +static bool ixgbe_sfp_probe(struct adapter *); +static void ixgbe_setup_optics(struct adapter *); + +/* Legacy (single vector interrupt handler */ +static void ixgbe_legacy_irq(void *); + +/* The MSI/X Interrupt handlers */ +static void ixgbe_msix_que(void *); +static void ixgbe_msix_link(void *); + +/* Deferred interrupt tasklets */ +static void ixgbe_handle_que(void *, int); +static void ixgbe_handle_link(void *, int); +static void ixgbe_handle_msf(void *, int); +static void ixgbe_handle_mod(void *, int); + +#ifdef IXGBE_FDIR +static void ixgbe_reinit_fdir(void *, int); +#endif + + +/* Missing shared code prototype */ +extern void ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw); + +/********************************************************************* + * FreeBSD Device Interface Entry Points + *********************************************************************/ + +static device_method_t ixgbe_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ixgbe_probe), + DEVMETHOD(device_attach, ixgbe_attach), + DEVMETHOD(device_detach, ixgbe_detach), + DEVMETHOD(device_shutdown, ixgbe_shutdown), + DEVMETHOD_END +}; + +static driver_t ixgbe_driver = { + "ix", ixgbe_methods, sizeof(struct adapter), +}; + +devclass_t ixgbe_devclass; +DRIVER_MODULE(ixgbe, pci, ixgbe_driver, ixgbe_devclass, 0, 0); + +MODULE_DEPEND(ixgbe, pci, 1, 1, 1); +MODULE_DEPEND(ixgbe, ether, 1, 1, 1); + +/* +** TUNEABLE PARAMETERS: +*/ + +static SYSCTL_NODE(_hw, OID_AUTO, ix, CTLFLAG_RD, 0, + "IXGBE driver parameters"); + +/* +** AIM: Adaptive Interrupt Moderation +** which means that the interrupt rate +** is varied over time based on the +** traffic for that interrupt vector +*/ +static int ixgbe_enable_aim = TRUE; +SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &ixgbe_enable_aim, 0, + "Enable adaptive interrupt moderation"); + +static int ixgbe_max_interrupt_rate = (4000000 / IXGBE_LOW_LATENCY); +SYSCTL_INT(_hw_ix, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, + &ixgbe_max_interrupt_rate, 0, "Maximum interrupts per second"); + +/* How many packets rxeof tries to clean at a time */ +static int ixgbe_rx_process_limit = 256; +TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit); +SYSCTL_INT(_hw_ix, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, + &ixgbe_rx_process_limit, 0, + "Maximum number of received packets to process at a time," + "-1 means unlimited"); + +/* How many packets txeof tries to clean at a time */ +static int ixgbe_tx_process_limit = 256; +TUNABLE_INT("hw.ixgbe.tx_process_limit", &ixgbe_tx_process_limit); +SYSCTL_INT(_hw_ix, OID_AUTO, tx_process_limit, CTLFLAG_RDTUN, + &ixgbe_tx_process_limit, 0, + "Maximum number of sent packets to process at a time," + "-1 means unlimited"); + +/* +** Smart speed setting, default to on +** this only works as a compile option +** right now as its during attach, set +** this to 'ixgbe_smart_speed_off' to +** disable. +*/ +static int ixgbe_smart_speed = ixgbe_smart_speed_on; + +/* + * MSIX should be the default for best performance, + * but this allows it to be forced off for testing. + */ +static int ixgbe_enable_msix = 1; +SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, 0, + "Enable MSI-X interrupts"); + +/* + * Number of Queues, can be set to 0, + * it then autoconfigures based on the + * number of cpus with a max of 8. This + * can be overriden manually here. + */ +static int ixgbe_num_queues = 0; +SYSCTL_INT(_hw_ix, OID_AUTO, num_queues, CTLFLAG_RDTUN, &ixgbe_num_queues, 0, + "Number of queues to configure, 0 indicates autoconfigure"); + +/* +** Number of TX descriptors per ring, +** setting higher than RX as this seems +** the better performing choice. +*/ +static int ixgbe_txd = PERFORM_TXD; +SYSCTL_INT(_hw_ix, OID_AUTO, txd, CTLFLAG_RDTUN, &ixgbe_txd, 0, + "Number of transmit descriptors per queue"); + +/* Number of RX descriptors per ring */ +static int ixgbe_rxd = PERFORM_RXD; +SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, &ixgbe_rxd, 0, + "Number of receive descriptors per queue"); + +/* +** Defining this on will allow the use +** of unsupported SFP+ modules, note that +** doing so you are on your own :) +*/ +static int allow_unsupported_sfp = FALSE; +TUNABLE_INT("hw.ix.unsupported_sfp", &allow_unsupported_sfp); + +/* Keep running tab on them for sanity check */ +static int ixgbe_total_ports; + +#ifdef IXGBE_FDIR +/* +** Flow Director actually 'steals' +** part of the packet buffer as its +** filter pool, this variable controls +** how much it uses: +** 0 = 64K, 1 = 128K, 2 = 256K +*/ +static int fdir_pballoc = 1; +#endif + +#ifdef DEV_NETMAP +/* + * The #ifdef DEV_NETMAP / #endif blocks in this file are meant to + * be a reference on how to implement netmap support in a driver. + * Additional comments are in ixgbe_netmap.h . + * + * contains functions for netmap support + * that extend the standard driver. + */ +#include +#endif /* DEV_NETMAP */ + +/********************************************************************* + * Device identification routine + * + * ixgbe_probe determines if the driver should be loaded on + * adapter based on PCI vendor/device id of the adapter. + * + * return BUS_PROBE_DEFAULT on success, positive on failure + *********************************************************************/ + +static int +ixgbe_probe(device_t dev) +{ + ixgbe_vendor_info_t *ent; + + u16 pci_vendor_id = 0; + u16 pci_device_id = 0; + u16 pci_subvendor_id = 0; + u16 pci_subdevice_id = 0; + char adapter_name[256]; + + INIT_DEBUGOUT("ixgbe_probe: begin"); + + pci_vendor_id = pci_get_vendor(dev); + if (pci_vendor_id != IXGBE_INTEL_VENDOR_ID) + return (ENXIO); + + pci_device_id = pci_get_device(dev); + pci_subvendor_id = pci_get_subvendor(dev); + pci_subdevice_id = pci_get_subdevice(dev); + + ent = ixgbe_vendor_info_array; + while (ent->vendor_id != 0) { + if ((pci_vendor_id == ent->vendor_id) && + (pci_device_id == ent->device_id) && + + ((pci_subvendor_id == ent->subvendor_id) || + (ent->subvendor_id == 0)) && + + ((pci_subdevice_id == ent->subdevice_id) || + (ent->subdevice_id == 0))) { + sprintf(adapter_name, "%s, Version - %s", + ixgbe_strings[ent->index], + ixgbe_driver_version); + device_set_desc_copy(dev, adapter_name); + ++ixgbe_total_ports; + return (BUS_PROBE_DEFAULT); + } + ent++; + } + return (ENXIO); +} + +/********************************************************************* + * Device initialization routine + * + * The attach entry point is called when the driver is being loaded. + * This routine identifies the type of hardware, allocates all resources + * and initializes the hardware. + * + * return 0 on success, positive on failure + *********************************************************************/ + +static int +ixgbe_attach(device_t dev) +{ + struct adapter *adapter; + struct ixgbe_hw *hw; + int error = 0; + u16 csum; + u32 ctrl_ext; + + INIT_DEBUGOUT("ixgbe_attach: begin"); + + /* Allocate, clear, and link in our adapter structure */ + adapter = device_get_softc(dev); + adapter->dev = adapter->osdep.dev = dev; + hw = &adapter->hw; + + /* Core Lock Init*/ + IXGBE_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); + + /* SYSCTL APIs */ + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_set_flowcntl, "I", IXGBE_SYSCTL_DESC_SET_FC); + + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "enable_aim", CTLFLAG_RW, + &ixgbe_enable_aim, 1, "Interrupt Moderation"); + + /* + ** Allow a kind of speed control by forcing the autoneg + ** advertised speed list to only a certain value, this + ** supports 1G on 82599 devices, and 100Mb on x540. + */ + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "advertise_speed", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_set_advertise, "I", IXGBE_SYSCTL_DESC_ADV_SPEED); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "ts", CTLTYPE_INT | CTLFLAG_RW, adapter, + 0, ixgbe_set_thermal_test, "I", "Thermal Test"); + + /* Set up the timer callout */ + callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0); + + /* Determine hardware revision */ + ixgbe_identify_hardware(adapter); + + /* Do base PCI setup - map BAR0 */ + if (ixgbe_allocate_pci_resources(adapter)) { + device_printf(dev, "Allocation of PCI resources failed\n"); + error = ENXIO; + goto err_out; + } + + /* Do descriptor calc and sanity checks */ + if (((ixgbe_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 || + ixgbe_txd < MIN_TXD || ixgbe_txd > MAX_TXD) { + device_printf(dev, "TXD config issue, using default!\n"); + adapter->num_tx_desc = DEFAULT_TXD; + } else + adapter->num_tx_desc = ixgbe_txd; + + /* + ** With many RX rings it is easy to exceed the + ** system mbuf allocation. Tuning nmbclusters + ** can alleviate this. + */ + if (nmbclusters > 0) { + int s; + s = (ixgbe_rxd * adapter->num_queues) * ixgbe_total_ports; + if (s > nmbclusters) { + device_printf(dev, "RX Descriptors exceed " + "system mbuf max, using default instead!\n"); + ixgbe_rxd = DEFAULT_RXD; + } + } + + if (((ixgbe_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 || + ixgbe_rxd < MIN_RXD || ixgbe_rxd > MAX_RXD) { + device_printf(dev, "RXD config issue, using default!\n"); + adapter->num_rx_desc = DEFAULT_RXD; + } else + adapter->num_rx_desc = ixgbe_rxd; + + /* Allocate our TX/RX Queues */ + if (ixgbe_allocate_queues(adapter)) { + error = ENOMEM; + goto err_out; + } + + /* Allocate multicast array memory. */ + adapter->mta = malloc(sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * + MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); + if (adapter->mta == NULL) { + device_printf(dev, "Can not allocate multicast setup array\n"); + error = ENOMEM; + goto err_late; + } + + /* Initialize the shared code */ + hw->allow_unsupported_sfp = allow_unsupported_sfp; + error = ixgbe_init_shared_code(hw); + if (error == IXGBE_ERR_SFP_NOT_PRESENT) { + /* + ** No optics in this port, set up + ** so the timer routine will probe + ** for later insertion. + */ + adapter->sfp_probe = TRUE; + error = 0; + } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) { + device_printf(dev,"Unsupported SFP+ module detected!\n"); + error = EIO; + goto err_late; + } else if (error) { + device_printf(dev,"Unable to initialize the shared code\n"); + error = EIO; + goto err_late; + } + + /* Make sure we have a good EEPROM before we read from it */ + if (ixgbe_validate_eeprom_checksum(&adapter->hw, &csum) < 0) { + device_printf(dev,"The EEPROM Checksum Is Not Valid\n"); + error = EIO; + goto err_late; + } + + error = ixgbe_init_hw(hw); + switch (error) { + case IXGBE_ERR_EEPROM_VERSION: + device_printf(dev, "This device is a pre-production adapter/" + "LOM. Please be aware there may be issues associated " + "with your hardware.\n If you are experiencing problems " + "please contact your Intel or hardware representative " + "who provided you with this hardware.\n"); + break; + case IXGBE_ERR_SFP_NOT_SUPPORTED: + device_printf(dev,"Unsupported SFP+ Module\n"); + error = EIO; + goto err_late; + case IXGBE_ERR_SFP_NOT_PRESENT: + device_printf(dev,"No SFP+ Module found\n"); + /* falls thru */ + default: + break; + } + + /* Detect and set physical type */ + ixgbe_setup_optics(adapter); + + if ((adapter->msix > 1) && (ixgbe_enable_msix)) + error = ixgbe_allocate_msix(adapter); + else + error = ixgbe_allocate_legacy(adapter); + if (error) + goto err_late; + + /* Setup OS specific network interface */ + if (ixgbe_setup_interface(dev, adapter) != 0) + goto err_late; + + /* Initialize statistics */ + ixgbe_update_stats_counters(adapter); + + /* Register for VLAN events */ + adapter->vlan_attach = EVENTHANDLER_REGISTER(vlan_config, + ixgbe_register_vlan, adapter, EVENTHANDLER_PRI_FIRST); + adapter->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, + ixgbe_unregister_vlan, adapter, EVENTHANDLER_PRI_FIRST); + + /* + ** Check PCIE slot type/speed/width + */ + ixgbe_get_slot_info(hw); + + + /* Set an initial default flow control value */ + adapter->fc = ixgbe_fc_full; + + /* let hardware know driver is loaded */ + ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); + ctrl_ext |= IXGBE_CTRL_EXT_DRV_LOAD; + IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); + + ixgbe_add_hw_stats(adapter); + +#ifdef DEV_NETMAP + ixgbe_netmap_attach(adapter); +#endif /* DEV_NETMAP */ + INIT_DEBUGOUT("ixgbe_attach: end"); + return (0); + +err_late: + ixgbe_free_transmit_structures(adapter); + ixgbe_free_receive_structures(adapter); +err_out: + if (adapter->ifp != NULL) + if_free(adapter->ifp); + ixgbe_free_pci_resources(adapter); + free(adapter->mta, M_DEVBUF); + return (error); +} + +/********************************************************************* + * Device removal routine + * + * The detach entry point is called when the driver is being removed. + * This routine stops the adapter and deallocates all the resources + * that were allocated for driver operation. + * + * return 0 on success, positive on failure + *********************************************************************/ + +static int +ixgbe_detach(device_t dev) +{ + struct adapter *adapter = device_get_softc(dev); + struct ix_queue *que = adapter->queues; + struct tx_ring *txr = adapter->tx_rings; + u32 ctrl_ext; + + INIT_DEBUGOUT("ixgbe_detach: begin"); + + /* Make sure VLANS are not using driver */ + if (adapter->ifp->if_vlantrunk != NULL) { + device_printf(dev,"Vlan in use, detach first\n"); + return (EBUSY); + } + + IXGBE_CORE_LOCK(adapter); + ixgbe_stop(adapter); + IXGBE_CORE_UNLOCK(adapter); + + for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { + if (que->tq) { +#ifndef IXGBE_LEGACY_TX + taskqueue_drain(que->tq, &txr->txq_task); +#endif + taskqueue_drain(que->tq, &que->que_task); + taskqueue_free(que->tq); + } + } + + /* Drain the Link queue */ + if (adapter->tq) { + taskqueue_drain(adapter->tq, &adapter->link_task); + taskqueue_drain(adapter->tq, &adapter->mod_task); + taskqueue_drain(adapter->tq, &adapter->msf_task); +#ifdef IXGBE_FDIR + taskqueue_drain(adapter->tq, &adapter->fdir_task); +#endif + taskqueue_free(adapter->tq); + } + + /* let hardware know driver is unloading */ + ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT); + ctrl_ext &= ~IXGBE_CTRL_EXT_DRV_LOAD; + IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT, ctrl_ext); + + /* Unregister VLAN events */ + if (adapter->vlan_attach != NULL) + EVENTHANDLER_DEREGISTER(vlan_config, adapter->vlan_attach); + if (adapter->vlan_detach != NULL) + EVENTHANDLER_DEREGISTER(vlan_unconfig, adapter->vlan_detach); + + ether_ifdetach(adapter->ifp); + callout_drain(&adapter->timer); +#ifdef DEV_NETMAP + netmap_detach(adapter->ifp); +#endif /* DEV_NETMAP */ + ixgbe_free_pci_resources(adapter); + bus_generic_detach(dev); + if_free(adapter->ifp); + + ixgbe_free_transmit_structures(adapter); + ixgbe_free_receive_structures(adapter); + free(adapter->mta, M_DEVBUF); + + IXGBE_CORE_LOCK_DESTROY(adapter); + return (0); +} + +/********************************************************************* + * + * Shutdown entry point + * + **********************************************************************/ + +static int +ixgbe_shutdown(device_t dev) +{ + struct adapter *adapter = device_get_softc(dev); + IXGBE_CORE_LOCK(adapter); + ixgbe_stop(adapter); + IXGBE_CORE_UNLOCK(adapter); + return (0); +} + + +/********************************************************************* + * Ioctl entry point + * + * ixgbe_ioctl is called when the user wants to configure the + * interface. + * + * return 0 on success, positive on failure + **********************************************************************/ + +static int +ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) +{ + struct adapter *adapter = ifp->if_softc; + struct ifreq *ifr = (struct ifreq *) data; +#if defined(INET) || defined(INET6) + struct ifaddr *ifa = (struct ifaddr *)data; + bool avoid_reset = FALSE; +#endif + int error = 0; + + switch (command) { + + case SIOCSIFADDR: +#ifdef INET + if (ifa->ifa_addr->sa_family == AF_INET) + avoid_reset = TRUE; +#endif +#ifdef INET6 + if (ifa->ifa_addr->sa_family == AF_INET6) + avoid_reset = TRUE; +#endif +#if defined(INET) || defined(INET6) + /* + ** Calling init results in link renegotiation, + ** so we avoid doing it when possible. + */ + if (avoid_reset) { + ifp->if_flags |= IFF_UP; + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) + ixgbe_init(adapter); + if (!(ifp->if_flags & IFF_NOARP)) + arp_ifinit(ifp, ifa); + } else + error = ether_ioctl(ifp, command, data); +#endif + break; + case SIOCSIFMTU: + IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)"); + if (ifr->ifr_mtu > IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) { + error = EINVAL; + } else { + IXGBE_CORE_LOCK(adapter); + ifp->if_mtu = ifr->ifr_mtu; + adapter->max_frame_size = + ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; + ixgbe_init_locked(adapter); + IXGBE_CORE_UNLOCK(adapter); + } + break; + case SIOCSIFFLAGS: + IOCTL_DEBUGOUT("ioctl: SIOCSIFFLAGS (Set Interface Flags)"); + IXGBE_CORE_LOCK(adapter); + if (ifp->if_flags & IFF_UP) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if ((ifp->if_flags ^ adapter->if_flags) & + (IFF_PROMISC | IFF_ALLMULTI)) { + ixgbe_set_promisc(adapter); + } + } else + ixgbe_init_locked(adapter); + } else + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + ixgbe_stop(adapter); + adapter->if_flags = ifp->if_flags; + IXGBE_CORE_UNLOCK(adapter); + break; + case SIOCADDMULTI: + case SIOCDELMULTI: + IOCTL_DEBUGOUT("ioctl: SIOC(ADD|DEL)MULTI"); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + IXGBE_CORE_LOCK(adapter); + ixgbe_disable_intr(adapter); + ixgbe_set_multi(adapter); + ixgbe_enable_intr(adapter); + IXGBE_CORE_UNLOCK(adapter); + } + break; + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + IOCTL_DEBUGOUT("ioctl: SIOCxIFMEDIA (Get/Set Interface Media)"); + error = ifmedia_ioctl(ifp, ifr, &adapter->media, command); + break; + case SIOCSIFCAP: + { + int mask = ifr->ifr_reqcap ^ ifp->if_capenable; + IOCTL_DEBUGOUT("ioctl: SIOCSIFCAP (Set Capabilities)"); + if (mask & IFCAP_HWCSUM) + ifp->if_capenable ^= IFCAP_HWCSUM; + if (mask & IFCAP_TSO4) + ifp->if_capenable ^= IFCAP_TSO4; + if (mask & IFCAP_TSO6) + ifp->if_capenable ^= IFCAP_TSO6; + if (mask & IFCAP_LRO) + ifp->if_capenable ^= IFCAP_LRO; + if (mask & IFCAP_VLAN_HWTAGGING) + ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + if (mask & IFCAP_VLAN_HWFILTER) + ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; + if (mask & IFCAP_VLAN_HWTSO) + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + IXGBE_CORE_LOCK(adapter); + ixgbe_init_locked(adapter); + IXGBE_CORE_UNLOCK(adapter); + } + VLAN_CAPABILITIES(ifp); + break; + } +#if __FreeBSD_version >= 1100036 + case SIOCGI2C: + { + struct ixgbe_hw *hw = &adapter->hw; + struct ifi2creq i2c; + int i; + IOCTL_DEBUGOUT("ioctl: SIOCGI2C (Get I2C Data)"); + error = copyin(ifr->ifr_data, &i2c, sizeof(i2c)); + if (error != 0) + break; + if (i2c.dev_addr != 0xA0 && i2c.dev_addr != 0xA2) { + error = EINVAL; + break; + } + if (i2c.len > sizeof(i2c.data)) { + error = EINVAL; + break; + } + + for (i = 0; i < i2c.len; i++) + hw->phy.ops.read_i2c_byte(hw, i2c.offset + i, + i2c.dev_addr, &i2c.data[i]); + error = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); + break; + } +#endif + default: + IOCTL_DEBUGOUT1("ioctl: UNKNOWN (0x%X)\n", (int)command); + error = ether_ioctl(ifp, command, data); + break; + } + + return (error); +} + +/********************************************************************* + * Init entry point + * + * This routine is used in two ways. It is used by the stack as + * init entry point in network interface structure. It is also used + * by the driver as a hw/sw initialization routine to get to a + * consistent state. + * + * return 0 on success, positive on failure + **********************************************************************/ +#define IXGBE_MHADD_MFS_SHIFT 16 + +static void +ixgbe_init_locked(struct adapter *adapter) +{ + struct ifnet *ifp = adapter->ifp; + device_t dev = adapter->dev; + struct ixgbe_hw *hw = &adapter->hw; + u32 k, txdctl, mhadd, gpie; + u32 rxdctl, rxctrl; + + mtx_assert(&adapter->core_mtx, MA_OWNED); + INIT_DEBUGOUT("ixgbe_init_locked: begin"); + hw->adapter_stopped = FALSE; + ixgbe_stop_adapter(hw); + callout_stop(&adapter->timer); + + /* reprogram the RAR[0] in case user changed it. */ + ixgbe_set_rar(hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV); + + /* Get the latest mac address, User can use a LAA */ + bcopy(IF_LLADDR(adapter->ifp), hw->mac.addr, + IXGBE_ETH_LENGTH_OF_ADDRESS); + ixgbe_set_rar(hw, 0, hw->mac.addr, 0, 1); + hw->addr_ctrl.rar_used_count = 1; + + /* Set the various hardware offload abilities */ + ifp->if_hwassist = 0; + if (ifp->if_capenable & IFCAP_TSO) + ifp->if_hwassist |= CSUM_TSO; + if (ifp->if_capenable & IFCAP_TXCSUM) { + ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); +#if __FreeBSD_version >= 800000 + if (hw->mac.type != ixgbe_mac_82598EB) + ifp->if_hwassist |= CSUM_SCTP; +#endif + } + + /* Prepare transmit descriptors and buffers */ + if (ixgbe_setup_transmit_structures(adapter)) { + device_printf(dev,"Could not setup transmit structures\n"); + ixgbe_stop(adapter); + return; + } + + ixgbe_init_hw(hw); + ixgbe_initialize_transmit_units(adapter); + + /* Setup Multicast table */ + ixgbe_set_multi(adapter); + + /* + ** Determine the correct mbuf pool + ** for doing jumbo frames + */ + if (adapter->max_frame_size <= 2048) + adapter->rx_mbuf_sz = MCLBYTES; + else if (adapter->max_frame_size <= 4096) + adapter->rx_mbuf_sz = MJUMPAGESIZE; + else if (adapter->max_frame_size <= 9216) + adapter->rx_mbuf_sz = MJUM9BYTES; + else + adapter->rx_mbuf_sz = MJUM16BYTES; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 18:50:35 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 8A2487C8; Tue, 17 Mar 2015 18:50:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7155B8AD; Tue, 17 Mar 2015 18:50:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HIoZwW045426; Tue, 17 Mar 2015 18:50:35 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HIoYJr045422; Tue, 17 Mar 2015 18:50:34 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201503171850.t2HIoYJr045422@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Tue, 17 Mar 2015 18:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280183 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/drm2/ttm modules modules/drm2 modules/drm2/drm2 modules/drm2/radeonkms X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 18:50:35 -0000 Author: dumbbell Date: Tue Mar 17 18:50:33 2015 New Revision: 280183 URL: https://svnweb.freebsd.org/changeset/base/280183 Log: drm: Update the device-independent code to match Linux 3.8.13 This update brings few features: o Support for the setmaster/dropmaster ioctls. For instance, they are used to run multiple X servers simultaneously. o Support for minor devices. The only user-visible change is a new entry in /dev/dri but it is useless at the moment. This is a first step to support render nodes [1]. The main benefit is to greatly reduce the diff with Linux (at the expense of an unreadable commit diff). Hopefully, next upgrades will be easier. No updates were made to the drivers, beside adapting them to API changes. [1] https://en.wikipedia.org/wiki/Direct_Rendering_Manager#Render_nodes Tested by: Many people MFC after: 1 month Relnotes: yes Added: head/sys/dev/drm2/drm_os_freebsd.c (contents, props changed) Deleted: head/sys/dev/drm2/drm_drawable.c head/sys/dev/drm2/drm_internal.h head/sys/dev/drm2/drm_sman.c head/sys/dev/drm2/drm_sman.h head/sys/dev/drm2/radeon/radeon_atpx_handler.c Modified: head/sys/dev/drm2/ati_pcigart.c head/sys/dev/drm2/drm.h head/sys/dev/drm2/drmP.h head/sys/dev/drm2/drm_agpsupport.c head/sys/dev/drm2/drm_atomic.h head/sys/dev/drm2/drm_auth.c head/sys/dev/drm2/drm_buffer.c head/sys/dev/drm2/drm_bufs.c head/sys/dev/drm2/drm_context.c head/sys/dev/drm2/drm_crtc.c head/sys/dev/drm2/drm_crtc.h head/sys/dev/drm2/drm_crtc_helper.c head/sys/dev/drm2/drm_crtc_helper.h head/sys/dev/drm2/drm_dma.c head/sys/dev/drm2/drm_dp_helper.c head/sys/dev/drm2/drm_dp_iic_helper.c head/sys/dev/drm2/drm_drv.c head/sys/dev/drm2/drm_edid.c head/sys/dev/drm2/drm_edid.h head/sys/dev/drm2/drm_edid_modes.h head/sys/dev/drm2/drm_fb_helper.c head/sys/dev/drm2/drm_fb_helper.h head/sys/dev/drm2/drm_fops.c head/sys/dev/drm2/drm_fourcc.h head/sys/dev/drm2/drm_gem.c head/sys/dev/drm2/drm_gem_names.c head/sys/dev/drm2/drm_global.c head/sys/dev/drm2/drm_hashtab.c head/sys/dev/drm2/drm_ioc32.c head/sys/dev/drm2/drm_ioctl.c head/sys/dev/drm2/drm_irq.c head/sys/dev/drm2/drm_lock.c head/sys/dev/drm2/drm_memory.c head/sys/dev/drm2/drm_mm.c head/sys/dev/drm2/drm_mm.h head/sys/dev/drm2/drm_mode.h head/sys/dev/drm2/drm_modes.c head/sys/dev/drm2/drm_os_freebsd.h head/sys/dev/drm2/drm_pci.c head/sys/dev/drm2/drm_pciids.h head/sys/dev/drm2/drm_sarea.h head/sys/dev/drm2/drm_scatter.c head/sys/dev/drm2/drm_stub.c head/sys/dev/drm2/drm_sysctl.c head/sys/dev/drm2/drm_vm.c head/sys/dev/drm2/i915/i915_debug.c head/sys/dev/drm2/i915/i915_dma.c head/sys/dev/drm2/i915/i915_drm.h head/sys/dev/drm2/i915/i915_drv.c head/sys/dev/drm2/i915/i915_drv.h head/sys/dev/drm2/i915/i915_gem.c head/sys/dev/drm2/i915/i915_gem_context.c head/sys/dev/drm2/i915/i915_gem_evict.c head/sys/dev/drm2/i915/i915_gem_execbuffer.c head/sys/dev/drm2/i915/i915_gem_gtt.c head/sys/dev/drm2/i915/i915_gem_tiling.c head/sys/dev/drm2/i915/i915_ioc32.c head/sys/dev/drm2/i915/i915_irq.c head/sys/dev/drm2/i915/i915_suspend.c head/sys/dev/drm2/i915/intel_crt.c head/sys/dev/drm2/i915/intel_display.c head/sys/dev/drm2/i915/intel_dp.c head/sys/dev/drm2/i915/intel_fb.c head/sys/dev/drm2/i915/intel_hdmi.c head/sys/dev/drm2/i915/intel_iic.c head/sys/dev/drm2/i915/intel_lvds.c head/sys/dev/drm2/i915/intel_modes.c head/sys/dev/drm2/i915/intel_opregion.c head/sys/dev/drm2/i915/intel_overlay.c head/sys/dev/drm2/i915/intel_panel.c head/sys/dev/drm2/i915/intel_ringbuffer.c head/sys/dev/drm2/i915/intel_sdvo.c head/sys/dev/drm2/i915/intel_tv.c head/sys/dev/drm2/radeon/atom.c head/sys/dev/drm2/radeon/atombios_crtc.c head/sys/dev/drm2/radeon/atombios_dp.c head/sys/dev/drm2/radeon/atombios_encoders.c head/sys/dev/drm2/radeon/atombios_i2c.c head/sys/dev/drm2/radeon/cayman_blit_shaders.c head/sys/dev/drm2/radeon/evergreen.c head/sys/dev/drm2/radeon/evergreen_blit_shaders.c head/sys/dev/drm2/radeon/evergreen_cs.c head/sys/dev/drm2/radeon/evergreen_reg.h head/sys/dev/drm2/radeon/ni.c head/sys/dev/drm2/radeon/nid.h head/sys/dev/drm2/radeon/r100.c head/sys/dev/drm2/radeon/r200.c head/sys/dev/drm2/radeon/r300.c head/sys/dev/drm2/radeon/r300_cmdbuf.c head/sys/dev/drm2/radeon/r420.c head/sys/dev/drm2/radeon/r500_reg.h head/sys/dev/drm2/radeon/r600.c head/sys/dev/drm2/radeon/r600_blit.c head/sys/dev/drm2/radeon/r600_blit_shaders.c head/sys/dev/drm2/radeon/r600_cp.c head/sys/dev/drm2/radeon/r600_cs.c head/sys/dev/drm2/radeon/r600_hdmi.c head/sys/dev/drm2/radeon/r600d.h head/sys/dev/drm2/radeon/radeon.h head/sys/dev/drm2/radeon/radeon_acpi.c head/sys/dev/drm2/radeon/radeon_agp.c head/sys/dev/drm2/radeon/radeon_atombios.c head/sys/dev/drm2/radeon/radeon_benchmark.c head/sys/dev/drm2/radeon/radeon_bios.c head/sys/dev/drm2/radeon/radeon_clocks.c head/sys/dev/drm2/radeon/radeon_combios.c head/sys/dev/drm2/radeon/radeon_connectors.c head/sys/dev/drm2/radeon/radeon_cp.c head/sys/dev/drm2/radeon/radeon_cs.c head/sys/dev/drm2/radeon/radeon_device.c head/sys/dev/drm2/radeon/radeon_display.c head/sys/dev/drm2/radeon/radeon_drm.h head/sys/dev/drm2/radeon/radeon_drv.c head/sys/dev/drm2/radeon/radeon_drv.h head/sys/dev/drm2/radeon/radeon_fb.c head/sys/dev/drm2/radeon/radeon_fence.c head/sys/dev/drm2/radeon/radeon_gart.c head/sys/dev/drm2/radeon/radeon_gem.c head/sys/dev/drm2/radeon/radeon_i2c.c head/sys/dev/drm2/radeon/radeon_ioc32.c head/sys/dev/drm2/radeon/radeon_irq_kms.c head/sys/dev/drm2/radeon/radeon_irq_kms.h head/sys/dev/drm2/radeon/radeon_kms.c head/sys/dev/drm2/radeon/radeon_legacy_crtc.c head/sys/dev/drm2/radeon/radeon_legacy_encoders.c head/sys/dev/drm2/radeon/radeon_legacy_tv.c head/sys/dev/drm2/radeon/radeon_mem.c head/sys/dev/drm2/radeon/radeon_object.c head/sys/dev/drm2/radeon/radeon_object.h head/sys/dev/drm2/radeon/radeon_pm.c head/sys/dev/drm2/radeon/radeon_ring.c head/sys/dev/drm2/radeon/radeon_sa.c head/sys/dev/drm2/radeon/radeon_semaphore.c head/sys/dev/drm2/radeon/radeon_state.c head/sys/dev/drm2/radeon/radeon_test.c head/sys/dev/drm2/radeon/radeon_ttm.c head/sys/dev/drm2/radeon/rs400.c head/sys/dev/drm2/radeon/rs600.c head/sys/dev/drm2/radeon/rs690.c head/sys/dev/drm2/radeon/rv515.c head/sys/dev/drm2/radeon/rv770.c head/sys/dev/drm2/radeon/si.c head/sys/dev/drm2/radeon/si_blit_shaders.c head/sys/dev/drm2/radeon/sid.h head/sys/dev/drm2/ttm/ttm_bo.c head/sys/dev/drm2/ttm/ttm_bo_util.c head/sys/dev/drm2/ttm/ttm_bo_vm.c head/sys/dev/drm2/ttm/ttm_lock.c head/sys/modules/Makefile head/sys/modules/drm2/Makefile head/sys/modules/drm2/drm2/Makefile head/sys/modules/drm2/radeonkms/Makefile Modified: head/sys/dev/drm2/ati_pcigart.c ============================================================================== --- head/sys/dev/drm2/ati_pcigart.c Tue Mar 17 18:32:28 2015 (r280182) +++ head/sys/dev/drm2/ati_pcigart.c Tue Mar 17 18:50:33 2015 (r280183) @@ -42,7 +42,7 @@ static int drm_ati_alloc_pcigart_table(s struct drm_ati_pcigart_info *gart_info) { gart_info->table_handle = drm_pci_alloc(dev, gart_info->table_size, - PAGE_SIZE, 0xFFFFFFFFUL); + PAGE_SIZE, BUS_SPACE_MAXADDR); if (gart_info->table_handle == NULL) return -ENOMEM; @@ -97,6 +97,7 @@ int drm_ati_pcigart_cleanup(struct drm_d return 1; } +EXPORT_SYMBOL(drm_ati_pcigart_cleanup); int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info) { @@ -197,7 +198,7 @@ int drm_ati_pcigart_init(struct drm_devi } ret = 1; -#if defined(__i386) || defined(__amd64) +#if defined(__i386__) || defined(__x86_64__) wbinvd(); #else mb(); @@ -208,3 +209,4 @@ int drm_ati_pcigart_init(struct drm_devi gart_info->bus_addr = bus_address; return ret; } +EXPORT_SYMBOL(drm_ati_pcigart_init); Modified: head/sys/dev/drm2/drm.h ============================================================================== --- head/sys/dev/drm2/drm.h Tue Mar 17 18:32:28 2015 (r280182) +++ head/sys/dev/drm2/drm.h Tue Mar 17 18:50:33 2015 (r280183) @@ -36,69 +36,31 @@ #include __FBSDID("$FreeBSD$"); -/** - * \mainpage - * - * The Direct Rendering Manager (DRM) is a device-independent kernel-level - * device driver that provides support for the XFree86 Direct Rendering - * Infrastructure (DRI). - * - * The DRM supports the Direct Rendering Infrastructure (DRI) in four major - * ways: - * -# The DRM provides synchronized access to the graphics hardware via - * the use of an optimized two-tiered lock. - * -# The DRM enforces the DRI security policy for access to the graphics - * hardware by only allowing authenticated X11 clients access to - * restricted regions of memory. - * -# The DRM provides a generic DMA engine, complete with multiple - * queues and the ability to detect the need for an OpenGL context - * switch. - * -# The DRM is extensible via the use of small device-specific modules - * that rely extensively on the API exported by the DRM module. - * - */ - #ifndef _DRM_H_ #define _DRM_H_ -#ifndef __user -#define __user -#endif -#ifndef __iomem -#define __iomem -#endif +#if defined(__linux__) -#ifdef __GNUC__ -# define DEPRECATED __attribute__ ((deprecated)) -#else -# define DEPRECATED -#endif +#include +#include +typedef unsigned int drm_handle_t; + +#else /* One of the BSDs */ -#if defined(__linux__) -#include /* For _IO* macros */ -#define DRM_IOCTL_NR(n) _IOC_NR(n) -#define DRM_IOC_VOID _IOC_NONE -#define DRM_IOC_READ _IOC_READ -#define DRM_IOC_WRITE _IOC_WRITE -#define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE -#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) #include -#define DRM_IOCTL_NR(n) ((n) & 0xff) -#define DRM_IOC_VOID IOC_VOID -#define DRM_IOC_READ IOC_OUT -#define DRM_IOC_WRITE IOC_IN -#define DRM_IOC_READWRITE IOC_INOUT -#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) -#endif +#include +typedef int8_t __s8; +typedef uint8_t __u8; +typedef int16_t __s16; +typedef uint16_t __u16; +typedef int32_t __s32; +typedef uint32_t __u32; +typedef int64_t __s64; +typedef uint64_t __u64; +typedef unsigned long drm_handle_t; -#ifdef __OpenBSD__ -#define DRM_MAJOR 81 +#include #endif -#if defined(__linux__) || defined(__NetBSD__) -#define DRM_MAJOR 226 -#endif -#define DRM_MAX_MINOR 15 #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ #define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ @@ -111,20 +73,14 @@ __FBSDID("$FreeBSD$"); #define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT) #define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT)) -#if defined(__linux__) -typedef unsigned int drm_handle_t; -#else -#include -typedef unsigned long drm_handle_t; /**< To mapped regions */ -#endif -typedef unsigned int drm_context_t; /**< GLXContext handle */ +typedef unsigned int drm_context_t; typedef unsigned int drm_drawable_t; -typedef unsigned int drm_magic_t; /**< Magic for authentication */ +typedef unsigned int drm_magic_t; /** * Cliprect. * - * \warning If you change this structure, make sure you change + * \warning: If you change this structure, make sure you change * XF86DRIClipRectRec in the server as well * * \note KW: Actually it's illegal to change either for @@ -138,6 +94,14 @@ struct drm_clip_rect { }; /** + * Drawable information. + */ +struct drm_drawable_info { + unsigned int num_rects; + struct drm_clip_rect *rects; +}; + +/** * Texture region, */ struct drm_tex_region { @@ -160,22 +124,6 @@ struct drm_hw_lock { char padding[60]; /**< Pad to cache line */ }; -/* This is beyond ugly, and only works on GCC. However, it allows me to use - * drm.h in places (i.e., in the X-server) where I can't use size_t. The real - * fix is to use uint32_t instead of size_t, but that fix will break existing - * LP64 (i.e., PowerPC64, SPARC64, Alpha, etc.) systems. That *will* - * eventually happen, though. I chose 'unsigned long' to be the fallback type - * because that works on all the platforms I know about. Hopefully, the - * real fix will happen before that bites us. - */ - -#ifdef __SIZE_TYPE__ -# define DRM_SIZE_T __SIZE_TYPE__ -#else -# warning "__SIZE_TYPE__ not defined. Assuming sizeof(size_t) == sizeof(unsigned long)!" -# define DRM_SIZE_T unsigned long -#endif - /** * DRM_IOCTL_VERSION ioctl argument type. * @@ -185,12 +133,12 @@ struct drm_version { int version_major; /**< Major version */ int version_minor; /**< Minor version */ int version_patchlevel; /**< Patch level */ - DRM_SIZE_T name_len; /**< Length of name buffer */ - char __user *name; /**< Name of driver */ - DRM_SIZE_T date_len; /**< Length of date buffer */ - char __user *date; /**< User-space buffer to hold date */ - DRM_SIZE_T desc_len; /**< Length of desc buffer */ - char __user *desc; /**< User-space buffer to hold desc */ + size_t name_len; /**< Length of name buffer */ + char __user *name; /**< Name of driver */ + size_t date_len; /**< Length of date buffer */ + char __user *date; /**< User-space buffer to hold date */ + size_t desc_len; /**< Length of desc buffer */ + char __user *desc; /**< User-space buffer to hold desc */ }; /** @@ -199,12 +147,10 @@ struct drm_version { * \sa drmGetBusid() and drmSetBusId(). */ struct drm_unique { - DRM_SIZE_T unique_len; /**< Length of unique */ - char __user *unique; /**< Unique name for driver instantiation */ + size_t unique_len; /**< Length of unique */ + char __user *unique; /**< Unique name for driver instantiation */ }; -#undef DRM_SIZE_T - struct drm_list { int count; /**< Length of user-space structures */ struct drm_version __user *version; @@ -239,7 +185,7 @@ enum drm_map_type { _DRM_AGP = 3, /**< AGP/GART */ _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ _DRM_CONSISTENT = 5, /**< Consistent memory for PCI DMA */ - _DRM_GEM = 6 /**< GEM */ + _DRM_GEM = 6, /**< GEM object */ }; /** @@ -388,8 +334,8 @@ struct drm_buf_desc { enum { _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */ _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */ - _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */ - _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */ + _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */ + _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */ _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */ } flags; unsigned long agp_start; /**< @@ -402,8 +348,8 @@ struct drm_buf_desc { * DRM_IOCTL_INFO_BUFS ioctl argument type. */ struct drm_buf_info { - int count; /**< Number of buffers described in list */ - struct drm_buf_desc __user *list; /**< List of buffer descriptions */ + int count; /**< Entries in list */ + struct drm_buf_desc __user *list; }; /** @@ -431,11 +377,7 @@ struct drm_buf_pub { */ struct drm_buf_map { int count; /**< Length of the buffer list */ -#if defined(__cplusplus) - void __user *c_virtual; -#else void __user *virtual; /**< Mmap'd area in user-virtual */ -#endif struct drm_buf_pub __user *list; /**< Buffer information */ }; @@ -454,7 +396,7 @@ struct drm_dma { enum drm_dma_flags flags; /**< Flags */ int request_count; /**< Number of buffers requested */ int request_size; /**< Desired size for buffers */ - int __user *request_indices; /**< Buffer information */ + int __user *request_indices; /**< Buffer information */ int __user *request_sizes; int granted_count; /**< Number of buffers granted */ }; @@ -525,12 +467,13 @@ struct drm_irq_busid { enum drm_vblank_seq_type { _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ + /* bits 1-6 are reserved for high crtcs */ _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ - _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ + _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ - _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */ + _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ }; #define _DRM_VBLANK_HIGH_CRTC_SHIFT 1 @@ -561,7 +504,6 @@ union drm_wait_vblank { struct drm_wait_vblank_reply reply; }; - #define _DRM_PRE_MODESET 1 #define _DRM_POST_MODESET 2 @@ -571,8 +513,8 @@ union drm_wait_vblank { * \sa drmModesetCtl(). */ struct drm_modeset_ctl { - uint32_t crtc; - uint32_t cmd; + __u32 crtc; + __u32 cmd; }; /** @@ -617,16 +559,14 @@ struct drm_agp_info { int agp_version_major; int agp_version_minor; unsigned long mode; - unsigned long aperture_base; /**< physical address */ - unsigned long aperture_size; /**< bytes */ - unsigned long memory_allowed; /**< bytes */ + unsigned long aperture_base; /* physical address */ + unsigned long aperture_size; /* bytes */ + unsigned long memory_allowed; /* bytes */ unsigned long memory_used; - /** \name PCI information */ - /*@{ */ + /* PCI information */ unsigned short id_vendor; unsigned short id_device; - /*@} */ }; /** @@ -647,386 +587,52 @@ struct drm_set_version { int drm_dd_minor; }; -#define DRM_FENCE_FLAG_EMIT 0x00000001 -#define DRM_FENCE_FLAG_SHAREABLE 0x00000002 -/** - * On hardware with no interrupt events for operation completion, - * indicates that the kernel should sleep while waiting for any blocking - * operation to complete rather than spinning. - * - * Has no effect otherwise. - */ -#define DRM_FENCE_FLAG_WAIT_LAZY 0x00000004 -#define DRM_FENCE_FLAG_NO_USER 0x00000010 - -/* Reserved for driver use */ -#define DRM_FENCE_MASK_DRIVER 0xFF000000 - -#define DRM_FENCE_TYPE_EXE 0x00000001 - -struct drm_fence_arg { - unsigned int handle; - unsigned int fence_class; - unsigned int type; - unsigned int flags; - unsigned int signaled; - unsigned int error; - unsigned int sequence; - unsigned int pad64; - uint64_t expand_pad[2]; /* Future expansion */ -}; - -/* Buffer permissions, referring to how the GPU uses the buffers. - * these translate to fence types used for the buffers. - * Typically a texture buffer is read, A destination buffer is write and - * a command (batch-) buffer is exe. Can be or-ed together. - */ - -#define DRM_BO_FLAG_READ (1ULL << 0) -#define DRM_BO_FLAG_WRITE (1ULL << 1) -#define DRM_BO_FLAG_EXE (1ULL << 2) - -/* - * All of the bits related to access mode - */ -#define DRM_BO_MASK_ACCESS (DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_EXE) -/* - * Status flags. Can be read to determine the actual state of a buffer. - * Can also be set in the buffer mask before validation. - */ - -/* - * Mask: Never evict this buffer. Not even with force. This type of buffer is only - * available to root and must be manually removed before buffer manager shutdown - * or lock. - * Flags: Acknowledge - */ -#define DRM_BO_FLAG_NO_EVICT (1ULL << 4) - -/* - * Mask: Require that the buffer is placed in mappable memory when validated. - * If not set the buffer may or may not be in mappable memory when validated. - * Flags: If set, the buffer is in mappable memory. - */ -#define DRM_BO_FLAG_MAPPABLE (1ULL << 5) - -/* Mask: The buffer should be shareable with other processes. - * Flags: The buffer is shareable with other processes. - */ -#define DRM_BO_FLAG_SHAREABLE (1ULL << 6) - -/* Mask: If set, place the buffer in cache-coherent memory if available. - * If clear, never place the buffer in cache coherent memory if validated. - * Flags: The buffer is currently in cache-coherent memory. - */ -#define DRM_BO_FLAG_CACHED (1ULL << 7) - -/* Mask: Make sure that every time this buffer is validated, - * it ends up on the same location provided that the memory mask is the same. - * The buffer will also not be evicted when claiming space for - * other buffers. Basically a pinned buffer but it may be thrown out as - * part of buffer manager shutdown or locking. - * Flags: Acknowledge. - */ -#define DRM_BO_FLAG_NO_MOVE (1ULL << 8) - -/* Mask: Make sure the buffer is in cached memory when mapped. In conjunction - * with DRM_BO_FLAG_CACHED it also allows the buffer to be bound into the GART - * with unsnooped PTEs instead of snooped, by using chipset-specific cache - * flushing at bind time. A better name might be DRM_BO_FLAG_TT_UNSNOOPED, - * as the eviction to local memory (TTM unbind) on map is just a side effect - * to prevent aggressive cache prefetch from the GPU disturbing the cache - * management that the DRM is doing. - * - * Flags: Acknowledge. - * Buffers allocated with this flag should not be used for suballocators - * This type may have issues on CPUs with over-aggressive caching - * http://marc.info/?l=linux-kernel&m=102376926732464&w=2 - */ -#define DRM_BO_FLAG_CACHED_MAPPED (1ULL << 19) - - -/* Mask: Force DRM_BO_FLAG_CACHED flag strictly also if it is set. - * Flags: Acknowledge. - */ -#define DRM_BO_FLAG_FORCE_CACHING (1ULL << 13) - -/* - * Mask: Force DRM_BO_FLAG_MAPPABLE flag strictly also if it is clear. - * Flags: Acknowledge. - */ -#define DRM_BO_FLAG_FORCE_MAPPABLE (1ULL << 14) -#define DRM_BO_FLAG_TILE (1ULL << 15) - -/* - * Memory type flags that can be or'ed together in the mask, but only - * one appears in flags. - */ - -/* System memory */ -#define DRM_BO_FLAG_MEM_LOCAL (1ULL << 24) -/* Translation table memory */ -#define DRM_BO_FLAG_MEM_TT (1ULL << 25) -/* Vram memory */ -#define DRM_BO_FLAG_MEM_VRAM (1ULL << 26) -/* Up to the driver to define. */ -#define DRM_BO_FLAG_MEM_PRIV0 (1ULL << 27) -#define DRM_BO_FLAG_MEM_PRIV1 (1ULL << 28) -#define DRM_BO_FLAG_MEM_PRIV2 (1ULL << 29) -#define DRM_BO_FLAG_MEM_PRIV3 (1ULL << 30) -#define DRM_BO_FLAG_MEM_PRIV4 (1ULL << 31) -/* We can add more of these now with a 64-bit flag type */ - -/* - * This is a mask covering all of the memory type flags; easier to just - * use a single constant than a bunch of | values. It covers - * DRM_BO_FLAG_MEM_LOCAL through DRM_BO_FLAG_MEM_PRIV4 - */ -#define DRM_BO_MASK_MEM 0x00000000FF000000ULL -/* - * This adds all of the CPU-mapping options in with the memory - * type to label all bits which change how the page gets mapped - */ -#define DRM_BO_MASK_MEMTYPE (DRM_BO_MASK_MEM | \ - DRM_BO_FLAG_CACHED_MAPPED | \ - DRM_BO_FLAG_CACHED | \ - DRM_BO_FLAG_MAPPABLE) - -/* Driver-private flags */ -#define DRM_BO_MASK_DRIVER 0xFFFF000000000000ULL - -/* - * Don't block on validate and map. Instead, return EBUSY. - */ -#define DRM_BO_HINT_DONT_BLOCK 0x00000002 -/* - * Don't place this buffer on the unfenced list. This means - * that the buffer will not end up having a fence associated - * with it as a result of this operation - */ -#define DRM_BO_HINT_DONT_FENCE 0x00000004 -/** - * On hardware with no interrupt events for operation completion, - * indicates that the kernel should sleep while waiting for any blocking - * operation to complete rather than spinning. - * - * Has no effect otherwise. - */ -#define DRM_BO_HINT_WAIT_LAZY 0x00000008 -/* - * The client has compute relocations refering to this buffer using the - * offset in the presumed_offset field. If that offset ends up matching - * where this buffer lands, the kernel is free to skip executing those - * relocations - */ -#define DRM_BO_HINT_PRESUMED_OFFSET 0x00000010 - -#define DRM_BO_INIT_MAGIC 0xfe769812 -#define DRM_BO_INIT_MAJOR 1 -#define DRM_BO_INIT_MINOR 0 -#define DRM_BO_INIT_PATCH 0 - - -struct drm_bo_info_req { - uint64_t mask; - uint64_t flags; - unsigned int handle; - unsigned int hint; - unsigned int fence_class; - unsigned int desired_tile_stride; - unsigned int tile_info; - unsigned int pad64; - uint64_t presumed_offset; -}; - -struct drm_bo_create_req { - uint64_t flags; - uint64_t size; - uint64_t buffer_start; - unsigned int hint; - unsigned int page_alignment; -}; - - -/* - * Reply flags - */ - -#define DRM_BO_REP_BUSY 0x00000001 - -struct drm_bo_info_rep { - uint64_t flags; - uint64_t proposed_flags; - uint64_t size; - uint64_t offset; - uint64_t arg_handle; - uint64_t buffer_start; - unsigned int handle; - unsigned int fence_flags; - unsigned int rep_flags; - unsigned int page_alignment; - unsigned int desired_tile_stride; - unsigned int hw_tile_stride; - unsigned int tile_info; - unsigned int pad64; - uint64_t expand_pad[4]; /*Future expansion */ -}; - -struct drm_bo_arg_rep { - struct drm_bo_info_rep bo_info; - int ret; - unsigned int pad64; -}; - -struct drm_bo_create_arg { - union { - struct drm_bo_create_req req; - struct drm_bo_info_rep rep; - } d; -}; - -struct drm_bo_handle_arg { - unsigned int handle; -}; - -struct drm_bo_reference_info_arg { - union { - struct drm_bo_handle_arg req; - struct drm_bo_info_rep rep; - } d; -}; - -struct drm_bo_map_wait_idle_arg { - union { - struct drm_bo_info_req req; - struct drm_bo_info_rep rep; - } d; -}; - -struct drm_bo_op_req { - enum { - drm_bo_validate, - drm_bo_fence, - drm_bo_ref_fence, - } op; - unsigned int arg_handle; - struct drm_bo_info_req bo_req; -}; - - -struct drm_bo_op_arg { - uint64_t next; - union { - struct drm_bo_op_req req; - struct drm_bo_arg_rep rep; - } d; - int handled; - unsigned int pad64; -}; - - -#define DRM_BO_MEM_LOCAL 0 -#define DRM_BO_MEM_TT 1 -#define DRM_BO_MEM_VRAM 2 -#define DRM_BO_MEM_PRIV0 3 -#define DRM_BO_MEM_PRIV1 4 -#define DRM_BO_MEM_PRIV2 5 -#define DRM_BO_MEM_PRIV3 6 -#define DRM_BO_MEM_PRIV4 7 - -#define DRM_BO_MEM_TYPES 8 /* For now. */ - -#define DRM_BO_LOCK_UNLOCK_BM (1 << 0) -#define DRM_BO_LOCK_IGNORE_NO_EVICT (1 << 1) - -struct drm_bo_version_arg { - uint32_t major; - uint32_t minor; - uint32_t patchlevel; -}; - -struct drm_mm_type_arg { - unsigned int mem_type; - unsigned int lock_flags; -}; - -struct drm_mm_init_arg { - unsigned int magic; - unsigned int major; - unsigned int minor; - unsigned int mem_type; - uint64_t p_offset; - uint64_t p_size; -}; - -struct drm_mm_info_arg { - unsigned int mem_type; - uint64_t p_size; -}; - +/** DRM_IOCTL_GEM_CLOSE ioctl argument type */ struct drm_gem_close { /** Handle of the object to be closed. */ - uint32_t handle; - uint32_t pad; + __u32 handle; + __u32 pad; }; +/** DRM_IOCTL_GEM_FLINK ioctl argument type */ struct drm_gem_flink { /** Handle for the object being named */ - uint32_t handle; + __u32 handle; /** Returned global name */ - uint32_t name; + __u32 name; }; +/** DRM_IOCTL_GEM_OPEN ioctl argument type */ struct drm_gem_open { /** Name of object being opened */ - uint32_t name; + __u32 name; /** Returned handle for the object */ - uint32_t handle; - + __u32 handle; + /** Returned size of the object */ - uint64_t size; + __u64 size; }; +/** DRM_IOCTL_GET_CAP ioctl argument type */ struct drm_get_cap { - uint64_t capability; - uint64_t value; + __u64 capability; + __u64 value; }; -struct drm_event { - uint32_t type; - uint32_t length; -}; +#define DRM_CLOEXEC O_CLOEXEC +struct drm_prime_handle { + __u32 handle; -#define DRM_EVENT_VBLANK 0x01 -#define DRM_EVENT_FLIP_COMPLETE 0x02 + /** Flags.. only applicable for handle->fd */ + __u32 flags; -struct drm_event_vblank { - struct drm_event base; - uint64_t user_data; - uint32_t tv_sec; - uint32_t tv_usec; - uint32_t sequence; - uint32_t reserved; + /** Returned dmabuf file descriptor */ + __s32 fd; }; -#define DRM_CAP_DUMB_BUFFER 0x1 -#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 -#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 -#define DRM_CAP_DUMB_PREFER_SHADOW 0x4 -#define DRM_CAP_PRIME 0x5 -#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 - -#define DRM_PRIME_CAP_IMPORT 0x1 -#define DRM_PRIME_CAP_EXPORT 0x2 - -#include "drm_mode.h" - -/** - * \name Ioctls Definitions - */ -/*@{*/ +#include #define DRM_IOCTL_BASE 'd' #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) @@ -1042,12 +648,10 @@ struct drm_event_vblank { #define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) #define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) #define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) -#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) - +#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) #define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close) #define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) #define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) - #define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) @@ -1065,7 +669,7 @@ struct drm_event_vblank { #define DRM_IOCTL_RM_MAP DRM_IOW( 0x1b, struct drm_map) #define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map) -#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map) +#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map) #define DRM_IOCTL_SET_MASTER DRM_IO(0x1e) #define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f) @@ -1084,7 +688,8 @@ struct drm_event_vblank { #define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) #define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) -#define DRM_IOCTL_GEM_PRIME_OPEN DRM_IOWR(0x2e, struct drm_gem_open) +#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) +#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) #define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) #define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) @@ -1100,7 +705,7 @@ struct drm_event_vblank { #define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) -#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) +#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) #define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) #define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc) @@ -1122,43 +727,16 @@ struct drm_event_vblank { #define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) #define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) -#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) -#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) -#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) +#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) +#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) +#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) #define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res) -#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) -#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) +#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) +#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) #define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2) #define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) #define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) -#define DRM_IOCTL_MM_INIT DRM_IOWR(0xc0, struct drm_mm_init_arg) -#define DRM_IOCTL_MM_TAKEDOWN DRM_IOWR(0xc1, struct drm_mm_type_arg) -#define DRM_IOCTL_MM_LOCK DRM_IOWR(0xc2, struct drm_mm_type_arg) -#define DRM_IOCTL_MM_UNLOCK DRM_IOWR(0xc3, struct drm_mm_type_arg) - -#define DRM_IOCTL_FENCE_CREATE DRM_IOWR(0xc4, struct drm_fence_arg) -#define DRM_IOCTL_FENCE_REFERENCE DRM_IOWR(0xc6, struct drm_fence_arg) -#define DRM_IOCTL_FENCE_UNREFERENCE DRM_IOWR(0xc7, struct drm_fence_arg) -#define DRM_IOCTL_FENCE_SIGNALED DRM_IOWR(0xc8, struct drm_fence_arg) -#define DRM_IOCTL_FENCE_FLUSH DRM_IOWR(0xc9, struct drm_fence_arg) -#define DRM_IOCTL_FENCE_WAIT DRM_IOWR(0xca, struct drm_fence_arg) -#define DRM_IOCTL_FENCE_EMIT DRM_IOWR(0xcb, struct drm_fence_arg) -#define DRM_IOCTL_FENCE_BUFFERS DRM_IOWR(0xcc, struct drm_fence_arg) - -#define DRM_IOCTL_BO_CREATE DRM_IOWR(0xcd, struct drm_bo_create_arg) -#define DRM_IOCTL_BO_MAP DRM_IOWR(0xcf, struct drm_bo_map_wait_idle_arg) -#define DRM_IOCTL_BO_UNMAP DRM_IOWR(0xd0, struct drm_bo_handle_arg) -#define DRM_IOCTL_BO_REFERENCE DRM_IOWR(0xd1, struct drm_bo_reference_info_arg) -#define DRM_IOCTL_BO_UNREFERENCE DRM_IOWR(0xd2, struct drm_bo_handle_arg) -#define DRM_IOCTL_BO_SETSTATUS DRM_IOWR(0xd3, struct drm_bo_map_wait_idle_arg) -#define DRM_IOCTL_BO_INFO DRM_IOWR(0xd4, struct drm_bo_reference_info_arg) -#define DRM_IOCTL_BO_WAIT_IDLE DRM_IOWR(0xd5, struct drm_bo_map_wait_idle_arg) -#define DRM_IOCTL_BO_VERSION DRM_IOR(0xd6, struct drm_bo_version_arg) -#define DRM_IOCTL_MM_INFO DRM_IOWR(0xd7, struct drm_mm_info_arg) - -/*@}*/ - /** * Device specific ioctls should only be in their respective headers * The device specific ioctl range is from 0x40 to 0x99. @@ -1168,11 +746,51 @@ struct drm_event_vblank { * drmCommandReadWrite(). */ #define DRM_COMMAND_BASE 0x40 -#define DRM_COMMAND_END 0xA0 +#define DRM_COMMAND_END 0xA0 + +/** + * Header for events written back to userspace on the drm fd. The + * type defines the type of event, the length specifies the total + * length of the event (including the header), and user_data is + * typically a 64 bit value passed with the ioctl that triggered the + * event. A read on the drm fd will always only return complete + * events, that is, if for example the read buffer is 100 bytes, and + * there are two 64 byte events pending, only one will be returned. + * + * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and + * up are chipset specific. + */ +struct drm_event { + __u32 type; + __u32 length; +}; + +#define DRM_EVENT_VBLANK 0x01 +#define DRM_EVENT_FLIP_COMPLETE 0x02 + +struct drm_event_vblank { + struct drm_event base; + __u64 user_data; + __u32 tv_sec; + __u32 tv_usec; + __u32 sequence; + __u32 reserved; +}; + +#define DRM_CAP_DUMB_BUFFER 0x1 +#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 +#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 +#define DRM_CAP_DUMB_PREFER_SHADOW 0x4 +#define DRM_CAP_PRIME 0x5 +#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 + +#define DRM_PRIME_CAP_IMPORT 0x1 +#define DRM_PRIME_CAP_EXPORT 0x2 /* typedef area */ #ifndef __KERNEL__ typedef struct drm_clip_rect drm_clip_rect_t; +typedef struct drm_drawable_info drm_drawable_info_t; typedef struct drm_tex_region drm_tex_region_t; typedef struct drm_hw_lock drm_hw_lock_t; typedef struct drm_version drm_version_t; @@ -1206,16 +824,12 @@ typedef struct drm_update_draw drm_updat typedef struct drm_auth drm_auth_t; typedef struct drm_irq_busid drm_irq_busid_t; typedef enum drm_vblank_seq_type drm_vblank_seq_type_t; + typedef struct drm_agp_buffer drm_agp_buffer_t; typedef struct drm_agp_binding drm_agp_binding_t; typedef struct drm_agp_info drm_agp_info_t; typedef struct drm_scatter_gather drm_scatter_gather_t; typedef struct drm_set_version drm_set_version_t; - -typedef struct drm_fence_arg drm_fence_arg_t; -typedef struct drm_mm_type_arg drm_mm_type_arg_t; -typedef struct drm_mm_init_arg drm_mm_init_arg_t; -typedef enum drm_bo_type drm_bo_type_t; #endif #endif Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Tue Mar 17 18:32:28 2015 (r280182) +++ head/sys/dev/drm2/drmP.h Tue Mar 17 18:50:33 2015 (r280183) @@ -100,14 +100,17 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include +#include + +#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) +#define __OS_HAS_MTRR (defined(CONFIG_MTRR)) + struct drm_file; struct drm_device; -#include #include #include @@ -146,244 +149,116 @@ struct drm_device; #define DRIVER_GEM 0x1000 #define DRIVER_MODESET 0x2000 #define DRIVER_PRIME 0x4000 -#define DRIVER_LOCKLESS_IRQ 0x8000 - - -#define DRM_HASH_SIZE 16 /* Size of key hash table */ -#define DRM_KERNEL_CONTEXT 0 /* Change drm_resctx if changed */ -#define DRM_RESERVED_CONTEXTS 1 /* Change drm_resctx if changed */ - -#define DRM_GEM_MAPPING_MASK (3ULL << 62) -#define DRM_GEM_MAPPING_KEY (2ULL << 62) /* Non-canonical address form */ -#define DRM_GEM_MAX_IDX 0x3fffff -#define DRM_GEM_MAPPING_IDX(o) (((o) >> 40) & DRM_GEM_MAX_IDX) -#define DRM_GEM_MAPPING_OFF(i) (((uint64_t)(i)) << 40) -#define DRM_GEM_MAPPING_MAPOFF(o) \ - ((o) & ~(DRM_GEM_MAPPING_OFF(DRM_GEM_MAX_IDX) | DRM_GEM_MAPPING_KEY)) - -MALLOC_DECLARE(DRM_MEM_DMA); -MALLOC_DECLARE(DRM_MEM_SAREA); -MALLOC_DECLARE(DRM_MEM_DRIVER); -MALLOC_DECLARE(DRM_MEM_MAGIC); -MALLOC_DECLARE(DRM_MEM_IOCTLS); -MALLOC_DECLARE(DRM_MEM_MAPS); -MALLOC_DECLARE(DRM_MEM_BUFS); -MALLOC_DECLARE(DRM_MEM_SEGS); -MALLOC_DECLARE(DRM_MEM_PAGES); -MALLOC_DECLARE(DRM_MEM_FILES); -MALLOC_DECLARE(DRM_MEM_QUEUES); -MALLOC_DECLARE(DRM_MEM_CMDS); -MALLOC_DECLARE(DRM_MEM_MAPPINGS); -MALLOC_DECLARE(DRM_MEM_BUFLISTS); -MALLOC_DECLARE(DRM_MEM_AGPLISTS); -MALLOC_DECLARE(DRM_MEM_CTXBITMAP); -MALLOC_DECLARE(DRM_MEM_SGLISTS); -MALLOC_DECLARE(DRM_MEM_DRAWABLE); -MALLOC_DECLARE(DRM_MEM_MM); -MALLOC_DECLARE(DRM_MEM_HASHTAB); -MALLOC_DECLARE(DRM_MEM_KMS); - -SYSCTL_DECL(_hw_drm); -#define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8) +#define DRIVER_BUS_PCI 0x1 +#define DRIVER_BUS_PLATFORM 0x2 +#define DRIVER_BUS_USB 0x3 /***********************************************************************/ -/** \name Internal types and structures */ +/** \name Begin the DRM... */ /*@{*/ -#define DRM_ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) -#define DRM_MIN(a,b) ((a)<(b)?(a):(b)) -#define DRM_MAX(a,b) ((a)>(b)?(a):(b)) - -#define DRM_IF_VERSION(maj, min) (maj << 16 | min) - -#define __OS_HAS_AGP 1 - -#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) -#define DRM_DEV_UID 0 -#define DRM_DEV_GID 0 - -#define wait_queue_head_t atomic_t -#define DRM_WAKEUP(w) wakeup((void *)w) -#define DRM_WAKEUP_INT(w) wakeup(w) -#define DRM_INIT_WAITQUEUE(queue) do {(void)(queue);} while (0) - -#define DRM_CURPROC curthread -#define DRM_STRUCTPROC struct thread -#define DRM_SPINTYPE struct mtx -#define DRM_SPININIT(l,name) mtx_init(l, name, NULL, MTX_DEF) -#define DRM_SPINUNINIT(l) mtx_destroy(l) -#define DRM_SPINLOCK(l) mtx_lock(l) -#define DRM_SPINUNLOCK(u) mtx_unlock(u) -#define DRM_SPINLOCK_IRQSAVE(l, irqflags) do { \ - mtx_lock(l); \ - (void)irqflags; \ -} while (0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 18:59:49 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 04168BD8; Tue, 17 Mar 2015 18:59:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2E669B8; Tue, 17 Mar 2015 18:59:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HIxmGo049649; Tue, 17 Mar 2015 18:59:48 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HIxlY7049642; Tue, 17 Mar 2015 18:59:47 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201503171859.t2HIxlY7049642@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 17 Mar 2015 18:59:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280184 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 18:59:49 -0000 Author: zbb Date: Tue Mar 17 18:59:47 2015 New Revision: 280184 URL: https://svnweb.freebsd.org/changeset/base/280184 Log: Introduce Annapurna Labs AHCI support Overview: * implemented quirk for forcing SATA interface enable * restore value to status register - this enables link autonegotiation Modifications: * devid:vendorid field * quirk for forcing PI setting (BIOS is doing that on PC-like systems) * write to capabilites field to enable phy link initialization Submitted by: Wojciech Macek Reviewed by: imp, mav Obtained from: Semihalf Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/ahci/ahci_pci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Tue Mar 17 18:50:33 2015 (r280183) +++ head/sys/dev/ahci/ahci.c Tue Mar 17 18:59:47 2015 (r280184) @@ -146,6 +146,18 @@ ahci_ctlr_reset(device_t dev) } /* Reenable AHCI mode */ ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE); + + if (ctlr->quirks & AHCI_Q_RESTORE_CAP) { + /* + * Restore capability field. + * This is write to a read-only register to restore its state. + * On fully standard-compliant hardware this is not needed and + * this operation shall not take place. See ahci_pci.c for + * platforms using this quirk. + */ + ATA_OUTL(ctlr->r_mem, AHCI_CAP, ctlr->caps); + } + return (0); } @@ -185,6 +197,22 @@ ahci_attach(device_t dev) ctlr->caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); if (ctlr->caps & AHCI_CAP_EMS) ctlr->capsem = ATA_INL(ctlr->r_mem, AHCI_EM_CTL); + + if (ctlr->quirks & AHCI_Q_FORCE_PI) { + /* + * Enable ports. + * The spec says that BIOS sets up bits corresponding to + * available ports. On platforms where this information + * is missing, the driver can define available ports on its own. + */ + int nports = (ctlr->caps & AHCI_CAP_NPMASK) + 1; + int nmask = (1 << nports) - 1; + + ATA_OUTL(ctlr->r_mem, AHCI_PI, nmask); + device_printf(dev, "Forcing PI to %d ports (mask = %x)\n", + nports, nmask); + } + ctlr->ichannels = ATA_INL(ctlr->r_mem, AHCI_PI); /* Identify and set separate quirks for HBA and RAID f/w Marvells. */ Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Tue Mar 17 18:50:33 2015 (r280183) +++ head/sys/dev/ahci/ahci.h Tue Mar 17 18:59:47 2015 (r280184) @@ -574,6 +574,8 @@ enum ahci_err_type { #define AHCI_Q_SATA1_UNIT0 0x00008000 /* need better method for this */ #define AHCI_Q_ABAR0 0x00010000 #define AHCI_Q_1MSI 0x00020000 +#define AHCI_Q_FORCE_PI 0x00040000 +#define AHCI_Q_RESTORE_CAP 0x00080000 #define AHCI_Q_BIT_STRING \ "\021" \ @@ -594,7 +596,9 @@ enum ahci_err_type { "\017MAXIO_64K" \ "\020SATA1_UNIT0" \ "\021ABAR0" \ - "\0221MSI" + "\0221MSI" \ + "\022FORCE_PI" \ + "\023RESTORE_CAP" int ahci_attach(device_t dev); int ahci_detach(device_t dev); Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Tue Mar 17 18:50:33 2015 (r280183) +++ head/sys/dev/ahci/ahci_pci.c Tue Mar 17 18:59:47 2015 (r280184) @@ -293,6 +293,7 @@ static const struct { {0x11851039, 0x00, "SiS 968", 0}, {0x01861039, 0x00, "SiS 968", 0}, {0xa01c177d, 0x00, "ThunderX", AHCI_Q_ABAR0|AHCI_Q_1MSI}, + {0x00311c36, 0x00, "Annapurna", AHCI_Q_FORCE_PI|AHCI_Q_RESTORE_CAP}, {0x00000000, 0x00, NULL, 0} }; From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 19:03: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 EE91AE61; Tue, 17 Mar 2015 19:03:45 +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 7751BA94; Tue, 17 Mar 2015 19:03:44 +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 t2HJ3e8j059000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 17 Mar 2015 22:03:40 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2HJ3eGd058999; Tue, 17 Mar 2015 22:03:40 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 17 Mar 2015 22:03:40 +0300 From: Gleb Smirnoff To: Jack F Vogel Subject: Re: svn commit: r280182 - in head/sys: amd64/conf conf dev/ixgbe modules/ix modules/ixgbe modules/ixv Message-ID: <20150317190340.GV17947@FreeBSD.org> References: <201503171832.t2HIWTu6039113@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503171832.t2HIWTu6039113@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 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: Tue, 17 Mar 2015 19:03:46 -0000 On Tue, Mar 17, 2015 at 06:32:29PM +0000, Jack F Vogel wrote: J> Author: jfv J> Date: Tue Mar 17 18:32:28 2015 J> New Revision: 280182 J> URL: https://svnweb.freebsd.org/changeset/base/280182 J> J> Log: J> Update to the Intel ixgbe driver: J> - Split the driver into independent pf and vf loadables. This is J> in preparation for SRIOV support which will be following shortly. J> This also allows us to keep a seperate revision control over the J> two parts, making for easier sustaining. J> - Make the TX/RX code a shared/seperated file, in the old code base J> the ixv code would miss fixes that went into ixgbe, this model J> will eliminate that problem. J> - The driver loadables will now match the device names, something that J> has been requested for some time. J> - Rather than a modules/ixgbe there is now modules/ix and modules/ixv J> - It will also be possible to make your static kernel with only one J> or the other for streamlined installs, or both. J> J> Enjoy! Build is broken: cd: /usr/src/head/sys/modules/ixgbe: No such file or directory -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 19:07:44 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 3919BDB; Tue, 17 Mar 2015 19:07:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23F2AACB; Tue, 17 Mar 2015 19:07:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HJ7hws054278; Tue, 17 Mar 2015 19:07:43 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HJ7hEv054277; Tue, 17 Mar 2015 19:07:43 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503171907.t2HJ7hEv054277@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 17 Mar 2015 19:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280185 - head/sys/modules X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 19:07:44 -0000 Author: glebius Date: Tue Mar 17 19:07:43 2015 New Revision: 280185 URL: https://svnweb.freebsd.org/changeset/base/280185 Log: Fix build after r280182. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Mar 17 18:59:47 2015 (r280184) +++ head/sys/modules/Makefile Tue Mar 17 19:07:43 2015 (r280185) @@ -175,7 +175,6 @@ SUBDIR= \ ${_iwn} \ ${_iwnfw} \ ${_ixgb} \ - ${_ixgbe} \ ${_ixl} \ ${_ixlv} \ jme \ @@ -583,7 +582,6 @@ _iwn= iwn _iwnfw= iwnfw .endif _ixgb= ixgb -_ixgbe= ixgbe .if ${MK_OFED} != "no" || defined(ALL_MODULES) _mlx4= mlx4 _mlx4ib= mlx4ib From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 19:13:12 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 DA2294A2; Tue, 17 Mar 2015 19:13:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5653BF8; Tue, 17 Mar 2015 19:13:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HJDCCC059266; Tue, 17 Mar 2015 19:13:12 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HJDCbi059265; Tue, 17 Mar 2015 19:13:12 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503171913.t2HJDCbi059265@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 17 Mar 2015 19:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280187 - head/sys/dev/drm2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 19:13:13 -0000 Author: glebius Date: Tue Mar 17 19:13:11 2015 New Revision: 280187 URL: https://svnweb.freebsd.org/changeset/base/280187 Log: Fix build. Reviewed by: dumbbell Modified: head/sys/dev/drm2/drm_edid.c Modified: head/sys/dev/drm2/drm_edid.c ============================================================================== --- head/sys/dev/drm2/drm_edid.c Tue Mar 17 19:10:51 2015 (r280186) +++ head/sys/dev/drm2/drm_edid.c Tue Mar 17 19:13:11 2015 (r280187) @@ -1536,11 +1536,11 @@ EXPORT_SYMBOL(drm_find_cea_extension); */ u8 drm_match_cea_mode(struct drm_display_mode *to_match) { - struct drm_display_mode *cea_mode; + const struct drm_display_mode *cea_mode; u8 mode; for (mode = 0; mode < drm_num_cea_modes; mode++) { - cea_mode = (struct drm_display_mode *)&edid_cea_modes[mode]; + cea_mode = (const struct drm_display_mode *)&edid_cea_modes[mode]; if (drm_mode_equal(to_match, cea_mode)) return mode + 1; From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 19:16:52 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 4C5DF937; Tue, 17 Mar 2015 19:16:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EC9CC45; Tue, 17 Mar 2015 19:16:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HJGpdx059950; Tue, 17 Mar 2015 19:16:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HJGpSJ059949; Tue, 17 Mar 2015 19:16:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503171916.t2HJGpSJ059949@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Mar 2015 19:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280188 - head/usr.bin/xlint/arch/aarch64 X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 19:16:52 -0000 Author: emaste Date: Tue Mar 17 19:16:51 2015 New Revision: 280188 URL: https://svnweb.freebsd.org/changeset/base/280188 Log: Add arm64 xlint support. Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Added: head/usr.bin/xlint/arch/aarch64/ head/usr.bin/xlint/arch/aarch64/targparam.h (contents, props changed) Added: head/usr.bin/xlint/arch/aarch64/targparam.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/xlint/arch/aarch64/targparam.h Tue Mar 17 19:16:51 2015 (r280188) @@ -0,0 +1,50 @@ +/* $NetBSD: targparam.h,v 1.1 2014/08/10 05:47:38 matt Exp $ */ + +/*- + * Copyright (c) 2014 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Machine-dependent target parameters for lint1. + */ +#include "lp64.h" + +/* + * Should be set to 1 if the difference of two pointers is of type long + * or the value of sizeof is of type unsigned long. Note this MUST be + * kept in sync with the compiler! + */ + +#define PTRDIFF_IS_LONG 1 +#define SIZEOF_IS_ULONG 1 + +#define FLOAT_SIZE (4 * CHAR_BIT) +#define DOUBLE_SIZE (8 * CHAR_BIT) +#define LDOUBLE_SIZE (16 * CHAR_BIT) + +#define ENUM_SIZE (4 * CHAR_BIT) From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 19:19:21 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 7569CADB; Tue, 17 Mar 2015 19:19:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 566D1C71; Tue, 17 Mar 2015 19:19:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HJJLEa060331; Tue, 17 Mar 2015 19:19:21 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HJJJN9060326; Tue, 17 Mar 2015 19:19:19 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503171919.t2HJJJN9060326@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 17 Mar 2015 19:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280189 - in head/sys: fs/nfsclient vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 19:19:21 -0000 Author: glebius Date: Tue Mar 17 19:19:19 2015 New Revision: 280189 URL: https://svnweb.freebsd.org/changeset/base/280189 Log: o Enhance vm_pager_free_nonreq() function: - Allow to call the function with vm object lock held. - Allow to specify reqpage that doesn't match any page in the region, meaning freeing all pages. o Utilize the new function in couple more places in vnode pager. Reviewed by: alc, kib Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/vm/vm_pager.c head/sys/vm/vm_pager.h head/sys/vm/vnode_pager.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Tue Mar 17 19:16:51 2015 (r280188) +++ head/sys/fs/nfsclient/nfs_clbio.c Tue Mar 17 19:19:19 2015 (r280189) @@ -140,7 +140,8 @@ ncl_getpages(struct vop_getpages_args *a * can only occur at the file EOF. */ if (pages[ap->a_reqpage]->valid != 0) { - vm_pager_free_nonreq(object, pages, ap->a_reqpage, npages); + vm_pager_free_nonreq(object, pages, ap->a_reqpage, npages, + FALSE); return (VM_PAGER_OK); } @@ -172,7 +173,8 @@ ncl_getpages(struct vop_getpages_args *a if (error && (uio.uio_resid == count)) { ncl_printf("nfs_getpages: error %d\n", error); - vm_pager_free_nonreq(object, pages, ap->a_reqpage, npages); + vm_pager_free_nonreq(object, pages, ap->a_reqpage, npages, + FALSE); return (VM_PAGER_ERROR); } Modified: head/sys/vm/vm_pager.c ============================================================================== --- head/sys/vm/vm_pager.c Tue Mar 17 19:16:51 2015 (r280188) +++ head/sys/vm/vm_pager.c Tue Mar 17 19:19:19 2015 (r280189) @@ -283,29 +283,35 @@ vm_pager_object_lookup(struct pagerlst * } /* - * Free the non-requested pages from the given array. + * Free the non-requested pages from the given array. To remove all pages, + * caller should provide out of range reqpage number. */ void vm_pager_free_nonreq(vm_object_t object, vm_page_t ma[], int reqpage, - int npages) + int npages, boolean_t object_locked) { + enum { UNLOCKED, CALLER_LOCKED, INTERNALLY_LOCKED } locked; int i; - boolean_t object_locked; - VM_OBJECT_ASSERT_UNLOCKED(object); - object_locked = FALSE; + if (object_locked) { + VM_OBJECT_ASSERT_WLOCKED(object); + locked = CALLER_LOCKED; + } else { + VM_OBJECT_ASSERT_UNLOCKED(object); + locked = UNLOCKED; + } for (i = 0; i < npages; ++i) { if (i != reqpage) { - if (!object_locked) { + if (locked == UNLOCKED) { VM_OBJECT_WLOCK(object); - object_locked = TRUE; + locked = INTERNALLY_LOCKED; } vm_page_lock(ma[i]); vm_page_free(ma[i]); vm_page_unlock(ma[i]); } } - if (object_locked) + if (locked == INTERNALLY_LOCKED) VM_OBJECT_WUNLOCK(object); } Modified: head/sys/vm/vm_pager.h ============================================================================== --- head/sys/vm/vm_pager.h Tue Mar 17 19:16:51 2015 (r280188) +++ head/sys/vm/vm_pager.h Tue Mar 17 19:19:19 2015 (r280189) @@ -113,7 +113,7 @@ static __inline boolean_t vm_pager_has_p void vm_pager_init(void); vm_object_t vm_pager_object_lookup(struct pagerlst *, void *); void vm_pager_free_nonreq(vm_object_t object, vm_page_t ma[], int reqpage, - int npages); + int npages, boolean_t object_locked); /* * vm_page_get_pages: Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Tue Mar 17 19:16:51 2015 (r280188) +++ head/sys/vm/vnode_pager.c Tue Mar 17 19:19:19 2015 (r280189) @@ -732,7 +732,7 @@ vnode_pager_local_getpages0(struct vnode */ if (mreq->valid != 0) { vm_pager_free_nonreq(mreq->object, m, reqpage, - round_page(bytecount) / PAGE_SIZE); + round_page(bytecount) / PAGE_SIZE, FALSE); if (iodone != NULL) iodone(arg, m, reqpage, 0); return (VM_PAGER_OK); @@ -806,7 +806,7 @@ vnode_pager_generic_getpages(struct vnod return (error); } else if (error != 0) { relpbuf(bp, freecnt); - vm_pager_free_nonreq(object, m, reqpage, count); + vm_pager_free_nonreq(object, m, reqpage, count, FALSE); return (VM_PAGER_ERROR); /* @@ -817,7 +817,7 @@ vnode_pager_generic_getpages(struct vnod } else if ((PAGE_SIZE / bsize) > 1 && (vp->v_mount->mnt_stat.f_type != nfs_mount_type)) { relpbuf(bp, freecnt); - vm_pager_free_nonreq(object, m, reqpage, count); + vm_pager_free_nonreq(object, m, reqpage, count, FALSE); PCPU_INC(cnt.v_vnodein); PCPU_INC(cnt.v_vnodepgsin); return vnode_pager_input_smlfs(object, m[reqpage]); @@ -836,7 +836,7 @@ vnode_pager_generic_getpages(struct vnod */ if (m[reqpage]->valid == VM_PAGE_BITS_ALL) { relpbuf(bp, freecnt); - vm_pager_free_nonreq(object, m, reqpage, count); + vm_pager_free_nonreq(object, m, reqpage, count, FALSE); return (VM_PAGER_OK); } else if (reqblock == -1) { relpbuf(bp, freecnt); @@ -845,12 +845,7 @@ vnode_pager_generic_getpages(struct vnod ("vnode_pager_generic_getpages: page %p is dirty", m)); VM_OBJECT_WLOCK(object); m[reqpage]->valid = VM_PAGE_BITS_ALL; - for (i = 0; i < count; i++) - if (i != reqpage) { - vm_page_lock(m[i]); - vm_page_free(m[i]); - vm_page_unlock(m[i]); - } + vm_pager_free_nonreq(object, m, reqpage, count, TRUE); VM_OBJECT_WUNLOCK(object); return (VM_PAGER_OK); } else if (m[reqpage]->valid != 0) { @@ -871,14 +866,9 @@ vnode_pager_generic_getpages(struct vnod if (vnode_pager_addr(vp, IDX_TO_OFF(m[i]->pindex), &firstaddr, &runpg) != 0) { relpbuf(bp, freecnt); - VM_OBJECT_WLOCK(object); - for (; i < count; i++) - if (i != reqpage) { - vm_page_lock(m[i]); - vm_page_free(m[i]); - vm_page_unlock(m[i]); - } - VM_OBJECT_WUNLOCK(object); + /* The requested page may be out of range. */ + vm_pager_free_nonreq(object, m + i, reqpage - i, + count - i, FALSE); return (VM_PAGER_ERROR); } if (firstaddr == -1) { From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 19:35:51 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 2AE4A888; Tue, 17 Mar 2015 19:35:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11FB7EDD; Tue, 17 Mar 2015 19:35:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HJZokf070400; Tue, 17 Mar 2015 19:35:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HJZoSQ070399; Tue, 17 Mar 2015 19:35:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503171935.t2HJZoSQ070399@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Mar 2015 19:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280190 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 19:35:51 -0000 Author: emaste Date: Tue Mar 17 19:35:50 2015 New Revision: 280190 URL: https://svnweb.freebsd.org/changeset/base/280190 Log: When cross-building with an external toolchain we still need a target strip It is used by at least crunchide(1). Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Mar 17 19:19:19 2015 (r280189) +++ head/Makefile.inc1 Tue Mar 17 19:35:50 2015 (r280190) @@ -1476,6 +1476,11 @@ _elftctools= lib/libelftc \ # cross-build on a FreeBSD 10 host: _elftctools+= usr.bin/addr2line .endif +.elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_TOOLS} != "no" +# If cross-building with an external binutils we still need to build strip for +# the target (for at least crunchide). +_elftctools= lib/libelftc \ + usr.bin/elfcopy .endif # If an full path to an external cross compiler is given, don't build From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 20:15:50 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 7E205313; Tue, 17 Mar 2015 20:15:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 691FF3D1; Tue, 17 Mar 2015 20:15:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HKFoK9089340; Tue, 17 Mar 2015 20:15:50 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HKFo4b089339; Tue, 17 Mar 2015 20:15:50 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201503172015.t2HKFo4b089339@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 17 Mar 2015 20:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280191 - head/sbin/reboot X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 20:15:50 -0000 Author: allanjude (doc committer) Date: Tue Mar 17 20:15:49 2015 New Revision: 280191 URL: https://svnweb.freebsd.org/changeset/base/280191 Log: Document that nextboot(8) doesn't work as expected with ZFS Differential Revision: https://reviews.freebsd.org/D2087 Submitted by: feld (request) Reviewed by: feld Approved by: bcr (mentor) Sponsored by: ScaleEngine Inc. Modified: head/sbin/reboot/nextboot.8 Modified: head/sbin/reboot/nextboot.8 ============================================================================== --- head/sbin/reboot/nextboot.8 Tue Mar 17 19:35:50 2015 (r280190) +++ head/sbin/reboot/nextboot.8 Tue Mar 17 20:15:49 2015 (r280191) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 31, 2012 +.Dd March 17, 2015 .Dt NEXTBOOT 8 .Os .Sh NAME @@ -130,3 +130,9 @@ It is also my first attempt to write in Finally, it does some evil things like writing to the file system before it has been checked. If it scrambles your file system, do not blame me. +.Pp +.Xr loader 8 +is only able to read ZFS, not write to it. +.Pa nextboot.conf +will NOT be reset in case of a kernel boot failure. + From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 20:29:59 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 943937E3; Tue, 17 Mar 2015 20:29:59 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 308A3767; Tue, 17 Mar 2015 20:29:59 +0000 (UTC) Received: by wgdm6 with SMTP id m6so18092036wgd.2; Tue, 17 Mar 2015 13:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=SRl40kAcDee5E74NACJVKVnlO/rCnei+Zck/kGEdi8c=; b=yptNycB5hCJbPCv2kJDToZNf/wRUNDWgXLHZvkCQiQ8EW9vyNCHm+RDeoq+/1PFWs1 vI/5LcLYuvXZZWd0GQxXxZ1Ib00HUcCA3HfOJMkfMEwR+kLicaO6vpr8kxp8NNZ8Ciq7 tm9YcOltF+lojbhbcLxDwQnGsI+o6pj5QGXmAHrk5VCRbp+Hw7XHCmQMrtIVWBMj7tzJ CKwHJqEwtx++yLcBPZ932oQEBDyYB+25eNJoY0OMuqxqnexVkPx/nd6wO/7VqsOfdEQz VnuWHrFyQOMtK5ScFEQcr+zwSubp+e3Kc7QFNdCz7qyVFYnolAId10Kv556dQb1Y+uPc c80A== X-Received: by 10.194.142.205 with SMTP id ry13mr139134402wjb.73.1426624197464; Tue, 17 Mar 2015 13:29:57 -0700 (PDT) Received: from brick.home (adba227.neoplus.adsl.tpnet.pl. [79.184.0.227]) by mx.google.com with ESMTPSA id lu13sm132350wic.10.2015.03.17.13.29.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2015 13:29:56 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 17 Mar 2015 21:29:54 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Jean-Sebastien Pedron Subject: Re: svn commit: r280183 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/drm2/ttm modules modules/drm2 modules/drm2/drm2 modules/drm2/radeonkms Message-ID: <20150317202954.GA8030@brick.home> Mail-Followup-To: Jean-Sebastien Pedron , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201503171850.t2HIoYJr045422@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503171850.t2HIoYJr045422@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 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: Tue, 17 Mar 2015 20:29:59 -0000 On 0317T1850, Jean-Sebastien Pedron wrote: > Author: dumbbell > Date: Tue Mar 17 18:50:33 2015 > New Revision: 280183 > URL: https://svnweb.freebsd.org/changeset/base/280183 > > Log: > drm: Update the device-independent code to match Linux 3.8.13 > > This update brings few features: > o Support for the setmaster/dropmaster ioctls. For instance, they > are used to run multiple X servers simultaneously. Does it fix fast user switching in Xorg/GNOME, by any chance? From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 20:38:52 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 21C7BA1C; Tue, 17 Mar 2015 20:38:52 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B544B874; Tue, 17 Mar 2015 20:38:51 +0000 (UTC) Received: by wixw10 with SMTP id w10so52904763wix.0; Tue, 17 Mar 2015 13:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=84wEWNDVb6VdqlJnipyPlOPW8pZU4erce5NbkRT2FtE=; b=WEuCHDXdBBmTexFDPsBVdEd4CTPOkElrWMN59WQTGlAtzcjYyOPYhUfMMCZbXkuP6B Wm/DLwI1OyIGaU/9k428pgwBdFeWOHDlnbbaJdr+e1TeML9vuRaR+BCPHztZxHxDRWX5 sPxMK6Atkquu+1bhdhfhM5sx6dI/CbGCtDD5589Pu0rQdwTE/j3+8Qpd6ST7e8fObZNE wCvXeXOXHWTbOO5+mFnFCs028wSMg1GCLMecn2get+1i6mzv11BTQgXCghFoU1Sm1Eai MTWE9dQlVPvXa+FNAi4hk1kWCMmaElJnNbR/O1Av6Zw60GDbIgNfj+Mh9uGl4S0kvewB 1i8g== MIME-Version: 1.0 X-Received: by 10.180.79.65 with SMTP id h1mr837238wix.59.1426624730056; Tue, 17 Mar 2015 13:38:50 -0700 (PDT) Received: by 10.194.162.103 with HTTP; Tue, 17 Mar 2015 13:38:49 -0700 (PDT) In-Reply-To: <20150317190340.GV17947@FreeBSD.org> References: <201503171832.t2HIWTu6039113@svn.freebsd.org> <20150317190340.GV17947@FreeBSD.org> Date: Tue, 17 Mar 2015 13:38:49 -0700 Message-ID: Subject: Re: svn commit: r280182 - in head/sys: amd64/conf conf dev/ixgbe modules/ix modules/ixgbe modules/ixv From: Jack Vogel To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Jack F Vogel , "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: Tue, 17 Mar 2015 20:38:52 -0000 Am on it.... fix coming. On Tue, Mar 17, 2015 at 12:03 PM, Gleb Smirnoff wrote: > On Tue, Mar 17, 2015 at 06:32:29PM +0000, Jack F Vogel wrote: > J> Author: jfv > J> Date: Tue Mar 17 18:32:28 2015 > J> New Revision: 280182 > J> URL: https://svnweb.freebsd.org/changeset/base/280182 > J> > J> Log: > J> Update to the Intel ixgbe driver: > J> - Split the driver into independent pf and vf loadables. This is > J> in preparation for SRIOV support which will be following shortly. > J> This also allows us to keep a seperate revision control over the > J> two parts, making for easier sustaining. > J> - Make the TX/RX code a shared/seperated file, in the old code base > J> the ixv code would miss fixes that went into ixgbe, this model > J> will eliminate that problem. > J> - The driver loadables will now match the device names, something > that > J> has been requested for some time. > J> - Rather than a modules/ixgbe there is now modules/ix and > modules/ixv > J> - It will also be possible to make your static kernel with only one > J> or the other for streamlined installs, or both. > J> > J> Enjoy! > > Build is broken: > > cd: /usr/src/head/sys/modules/ixgbe: No such file or directory > > -- > Totus tuus, Glebius. > From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 20:56:25 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 6B55AEA6; Tue, 17 Mar 2015 20:56:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56E46A78; Tue, 17 Mar 2015 20:56:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HKuPdM008417; Tue, 17 Mar 2015 20:56:25 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HKuPBq008415; Tue, 17 Mar 2015 20:56:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503172056.t2HKuPBq008415@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 17 Mar 2015 20:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280192 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 20:56:25 -0000 Author: ian Date: Tue Mar 17 20:56:24 2015 New Revision: 280192 URL: https://svnweb.freebsd.org/changeset/base/280192 Log: In sbuf_new_for_sysctl(), default the buffer size to 64 bytes if the passed-in pointer is NULL and the length is zero. Modified: head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Tue Mar 17 20:15:49 2015 (r280191) +++ head/sys/kern/kern_sysctl.c Tue Mar 17 20:56:24 2015 (r280192) @@ -1807,6 +1807,9 @@ sbuf_new_for_sysctl(struct sbuf *s, char struct sysctl_req *req) { + /* Supply a default buffer size if none given. */ + if (buf == NULL && length == 0) + length = 64; s = sbuf_new(s, buf, length, SBUF_FIXEDLEN | SBUF_INCLUDENUL); sbuf_set_drain(s, sbuf_sysctl_drain, req); return (s); From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 21:00: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 06EEE1D1; Tue, 17 Mar 2015 21:00: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 E672CAC2; Tue, 17 Mar 2015 21:00: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 t2HL0Vb5010155; Tue, 17 Mar 2015 21:00:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HL0VII010154; Tue, 17 Mar 2015 21:00:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503172100.t2HL0VII010154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 17 Mar 2015 21:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280193 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Tue, 17 Mar 2015 21:00:32 -0000 Author: ian Date: Tue Mar 17 21:00:31 2015 New Revision: 280193 URL: https://svnweb.freebsd.org/changeset/base/280193 Log: The minimum sbuf buffer size is 2 bytes (a byte plus a nulterm), assert that. Values smaller than two lead to strange asserts that have nothing to do with the actual problem (in the case of size=0), or to writing beyond the end of the allocated buffer in sbuf_finish() (in the case of size=1). Modified: head/sys/kern/subr_sbuf.c Modified: head/sys/kern/subr_sbuf.c ============================================================================== --- head/sys/kern/subr_sbuf.c Tue Mar 17 20:56:24 2015 (r280192) +++ head/sys/kern/subr_sbuf.c Tue Mar 17 21:00:31 2015 (r280193) @@ -78,6 +78,7 @@ static MALLOC_DEFINE(M_SBUF, "sbuf", "st #define SBUF_SETFLAG(s, f) do { (s)->s_flags |= (f); } while (0) #define SBUF_CLEARFLAG(s, f) do { (s)->s_flags &= ~(f); } while (0) +#define SBUF_MINSIZE 2 /* Min is 1 byte + nulterm. */ #define SBUF_MINEXTENDSIZE 16 /* Should be power of 2. */ #ifdef PAGE_SIZE @@ -192,8 +193,9 @@ sbuf_newbuf(struct sbuf *s, char *buf, i s->s_buf = buf; if ((s->s_flags & SBUF_AUTOEXTEND) == 0) { - KASSERT(s->s_size >= 0, - ("attempt to create a too small sbuf")); + KASSERT(s->s_size >= SBUF_MINSIZE, + ("attempt to create an sbuf smaller than %d bytes", + SBUF_MINSIZE)); } if (s->s_buf != NULL) From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 21:15: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 6116177E; Tue, 17 Mar 2015 21:15: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 32B1DD18; Tue, 17 Mar 2015 21:15: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 t2HLFQvo018205; Tue, 17 Mar 2015 21:15:26 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HLFPtU018203; Tue, 17 Mar 2015 21:15:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503172115.t2HLFPtU018203@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 17 Mar 2015 21:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280194 - in head/sys/boot/uboot: fdt lib X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 21:15:26 -0000 Author: ian Date: Tue Mar 17 21:15:24 2015 New Revision: 280194 URL: https://svnweb.freebsd.org/changeset/base/280194 Log: Fix fdt_platform_fixups() mem region handling. It turns out u-boot puts several types of data into the mem-info array (DRAM, SRAM, flash). We need to extract just the DRAM entries for translation into fdt memory properties. Also, increase the number of regions we can handle from 5 to 16. Submitted by: Michal Meloun Modified: head/sys/boot/uboot/fdt/uboot_fdt.c head/sys/boot/uboot/lib/glue.h Modified: head/sys/boot/uboot/fdt/uboot_fdt.c ============================================================================== --- head/sys/boot/uboot/fdt/uboot_fdt.c Tue Mar 17 21:00:31 2015 (r280193) +++ head/sys/boot/uboot/fdt/uboot_fdt.c Tue Mar 17 21:15:24 2015 (r280194) @@ -88,7 +88,7 @@ fdt_platform_load_dtb(void) void fdt_platform_fixups(void) { - struct fdt_mem_region regions[3]; + static struct fdt_mem_region regions[UB_MAX_MR]; const char *env, *str; char *end, *ethstr; int eth_no, i, len, n; @@ -165,17 +165,15 @@ fdt_platform_fixups(void) /* Modify cpu(s) and bus clock frequenties in /cpus node [Hz] */ fdt_fixup_cpubusfreqs(si->clk_cpu, si->clk_bus); - /* Copy the data into a useful form */ - for (i = 0; i < si->mr_no; i++) { - if (i > nitems(regions)) { - i = nitems(regions); - break; + /* Extract the DRAM regions into fdt_mem_region format. */ + for (i = 0, n = 0; i < si->mr_no && n < nitems(regions); i++) { + if (si->mr[i].flags == MR_ATTR_DRAM) { + regions[n].start = si->mr[i].start; + regions[n].size = si->mr[i].size; + n++; } - - regions[i].start = si->mr[i].start; - regions[i].size = si->mr[i].size; } /* Fixup memory regions */ - fdt_fixup_memory(regions, i); + fdt_fixup_memory(regions, n); } Modified: head/sys/boot/uboot/lib/glue.h ============================================================================== --- head/sys/boot/uboot/lib/glue.h Tue Mar 17 21:00:31 2015 (r280193) +++ head/sys/boot/uboot/lib/glue.h Tue Mar 17 21:15:24 2015 (r280194) @@ -40,7 +40,7 @@ void *syscall_ptr; int api_search_sig(struct api_signature **sig); -#define UB_MAX_MR 5 /* max mem regions number */ +#define UB_MAX_MR 16 /* max mem regions number */ #define UB_MAX_DEV 6 /* max devices number */ /* From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 21:55:34 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 E658FE3D; Tue, 17 Mar 2015 21:55:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D17A3142; Tue, 17 Mar 2015 21:55:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HLtYrE036719; Tue, 17 Mar 2015 21:55:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HLtYi3036718; Tue, 17 Mar 2015 21:55:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503172155.t2HLtYi3036718@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 17 Mar 2015 21:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280195 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 21:55:35 -0000 Author: kib Date: Tue Mar 17 21:55:33 2015 New Revision: 280195 URL: https://svnweb.freebsd.org/changeset/base/280195 Log: When inserting new entry into the address map, ensure that not only next entry does not intersect with the tail of the new entry, but also that previous entry is also before new entry start. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_gas.c Modified: head/sys/x86/iommu/intel_gas.c ============================================================================== --- head/sys/x86/iommu/intel_gas.c Tue Mar 17 21:15:24 2015 (r280194) +++ head/sys/x86/iommu/intel_gas.c Tue Mar 17 21:55:33 2015 (r280195) @@ -366,7 +366,8 @@ dmar_gas_match_insert(struct dmar_gas_ma next = RB_NEXT(dmar_gas_entries_tree, &a->ctx->rb_root, prev); KASSERT(next->start >= a->entry->end && - next->start - a->entry->start >= a->size, + next->start - a->entry->start >= a->size && + prev->end <= a->entry->end, ("dmar_gas_match_insert hole failed %p prev (%jx, %jx) " "free_after %jx next (%jx, %jx) entry (%jx, %jx)", a->ctx, (uintmax_t)prev->start, (uintmax_t)prev->end, From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 22:00:12 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 498B9179; Tue, 17 Mar 2015 22:00:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34C90182; Tue, 17 Mar 2015 22:00:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HM0C7H038530; Tue, 17 Mar 2015 22:00:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HM0CYu038513; Tue, 17 Mar 2015 22:00:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503172200.t2HM0CYu038513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 17 Mar 2015 22:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280196 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 22:00:12 -0000 Author: kib Date: Tue Mar 17 22:00:11 2015 New Revision: 280196 URL: https://svnweb.freebsd.org/changeset/base/280196 Log: When initial placement of the new entry crosses the boundary, allocator tries to move the entry up, after the boundary. The new location may still fail to satisfy boundary requirement, for instance, if the boundary is set to page size, and allocation is of multiple pages. Recheck that boundary is not crossed after the move. If it is crossed, give up on allocating the whole entry and split it. Reported by: Michael Fuckner , running nvme(4) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_gas.c Modified: head/sys/x86/iommu/intel_gas.c ============================================================================== --- head/sys/x86/iommu/intel_gas.c Tue Mar 17 21:55:33 2015 (r280195) +++ head/sys/x86/iommu/intel_gas.c Tue Mar 17 22:00:11 2015 (r280196) @@ -327,13 +327,15 @@ dmar_gas_match_one(struct dmar_gas_match start = roundup2(bs, a->common->alignment); /* DMAR_PAGE_SIZE to create gap after new entry. */ if (start + a->size + DMAR_PAGE_SIZE <= prev->end + prev->free_after && - start + a->size <= end) { + start + a->size <= end && dmar_test_boundary(start, a->size, + a->common->boundary)) { a->entry->start = start; return (true); } /* - * Not enough space to align at boundary, but allowed to split. + * Not enough space to align at the requested boundary, or + * boundary is smaller than the size, but allowed to split. * We already checked that start + size does not overlap end. * * XXXKIB. It is possible that bs is exactly at the start of From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 22:02:23 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 2B6E53E0; Tue, 17 Mar 2015 22:02:23 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (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 DEE6624E; Tue, 17 Mar 2015 22:02:22 +0000 (UTC) Received: from 2a02-8428-011b-e000-0290-f5ff-fe9d-b78c.rev.sfr.net ([2a02:8428:11b:e000:290:f5ff:fe9d:b78c] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YXzZ6-00067y-WC; Tue, 17 Mar 2015 23:02:21 +0100 Message-ID: <5508A468.9050802@FreeBSD.org> Date: Tue, 17 Mar 2015 23:02:16 +0100 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280183 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/drm2/ttm modules modules/drm2 modules/drm2/drm2 modules/drm2/radeonkms References: <201503171850.t2HIoYJr045422@svn.freebsd.org> <20150317202954.GA8030@brick.home> In-Reply-To: <20150317202954.GA8030@brick.home> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wW8MJOL9IWxCFaC6Lj7cHoGaPPlXR5j6M" 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: Tue, 17 Mar 2015 22:02:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wW8MJOL9IWxCFaC6Lj7cHoGaPPlXR5j6M Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 17.03.2015 21:29, Edward Tomasz Napiera=C5=82a wrote: >> o Support for the setmaster/dropmaster ioctls. For instance, th= ey >> are used to run multiple X servers simultaneously. >=20 > Does it fix fast user switching in Xorg/GNOME, by any chance? Maybe, I don't know how this works in GNOME. But as long as it relies on two X sessions running at the same time, then yes it surely helps. --=20 Jean-S=C3=A9bastien P=C3=A9dron --wW8MJOL9IWxCFaC6Lj7cHoGaPPlXR5j6M Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVCKRoXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMwoUP/iGr3jdXXvuzc3tPcOGhE4Qb E1Fp8SfLRrncAyjVwNsX3QWPkxat3RMXsUkzBbTUKFbkX8o7nwfIBq0xiRg9zb8U WBQLk5uRYsrr2v/ZtSLwQpoxUR0r0Kzq7R8rLhOaSrx4vqBEPENQIBM3lulELhJY uUa5Xojigo9vd0pbRIlqvAf+uIqaV8kp9V9MIWR6o0lIs3mxRe2OPX9KSinefU+5 42avRIOTpJKg/D824jV1HpZlNhTkdKCc/3+PtgnCfsG38OWDZ32/U7PyM3Ok5CWm ykHTmyVZwWj+ntpSoRQaDa8+Rf92bmzzpcdwzKVH/VucDUScjY1or54syY/WNoul sYw4TJAr0InLLE7E1NSqtCc9r3hAbcM2/dabWp+6N5gp/m/pMeiKr88gpFJQiFw4 82QX/dZVpWrh2DG+glVAo/PnMv+ZseNvxnUENNpjYtdofm0srmQlP59+JbqiPr9e 9mYpFbYB6lvmxmpyAyJpfEOBR65b+zr2CHaEgT2pjlRaeCpZrL/0Zu06tGQOip7v 9qOJ1YzDCD8JlQztdQjvjztK5n/7Bfcn4UY1VNDWltSMRlsYHLvzfRVmWK1WGr3Z lX4u5qAT3KCYUeuy9jORwS4Vroc5jRzJ87m6qeoF0KKt1j57GlR5U0uUOxvI04t7 jz/Gm/DJktnHXOGMuJAX =0ngS -----END PGP SIGNATURE----- --wW8MJOL9IWxCFaC6Lj7cHoGaPPlXR5j6M-- From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 22:40:52 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 9ED0DEEF; Tue, 17 Mar 2015 22:40:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FCB5A63; Tue, 17 Mar 2015 22:40:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2HMeqa9058993; Tue, 17 Mar 2015 22:40:52 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2HMepgD058989; Tue, 17 Mar 2015 22:40:51 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201503172240.t2HMepgD058989@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Tue, 17 Mar 2015 22:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280197 - in head/sys: dev/ixgbe modules X-SVN-Group: head MIME-Version: 1.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: Tue, 17 Mar 2015 22:40:52 -0000 Author: jfv Date: Tue Mar 17 22:40:50 2015 New Revision: 280197 URL: https://svnweb.freebsd.org/changeset/base/280197 Log: Resolve a few build issues, add module directories back into Makefile, then correct a NETMAP problem resulting from the split, and finally temporarily disable the X550 functionality. Modified: head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe_api.c head/sys/modules/Makefile Modified: head/sys/dev/ixgbe/if_ixv.c ============================================================================== --- head/sys/dev/ixgbe/if_ixv.c Tue Mar 17 22:00:11 2015 (r280196) +++ head/sys/dev/ixgbe/if_ixv.c Tue Mar 17 22:40:50 2015 (r280197) @@ -285,7 +285,7 @@ ixv_attach(device_t dev) SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "enable_aim", CTLTYPE_INT|CTLFLAG_RW, + OID_AUTO, "enable_aim", CTLFLAG_RW, &ixv_enable_aim, 1, "Interrupt Moderation"); /* Set up the timer callout */ Modified: head/sys/dev/ixgbe/ix_txrx.c ============================================================================== --- head/sys/dev/ixgbe/ix_txrx.c Tue Mar 17 22:00:11 2015 (r280196) +++ head/sys/dev/ixgbe/ix_txrx.c Tue Mar 17 22:40:50 2015 (r280197) @@ -45,6 +45,12 @@ #include #endif +#ifdef DEV_NETMAP +#include +#include +#include +#endif + /* ** HW RSC control: ** this feature only works with @@ -1233,6 +1239,7 @@ ixgbe_setup_hw_rsc(struct rx_ring *rxr) rdrxctl = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); rdrxctl &= ~IXGBE_RDRXCTL_RSCFRSTSIZE; #ifdef DEV_NETMAP /* crcstrip is optional in netmap */ + extern int ix_crcstrip; if (adapter->ifp->if_capenable & IFCAP_NETMAP && !ix_crcstrip) #endif /* DEV_NETMAP */ rdrxctl |= IXGBE_RDRXCTL_CRCSTRIP; Modified: head/sys/dev/ixgbe/ixgbe_api.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_api.c Tue Mar 17 22:00:11 2015 (r280196) +++ head/sys/dev/ixgbe/ixgbe_api.c Tue Mar 17 22:40:50 2015 (r280197) @@ -81,6 +81,7 @@ s32 ixgbe_init_shared_code(struct ixgbe_ case ixgbe_mac_X540: status = ixgbe_init_ops_X540(hw); break; +#if 0 //JFV temporary disable case ixgbe_mac_X550: status = ixgbe_init_ops_X550(hw); break; @@ -88,6 +89,7 @@ s32 ixgbe_init_shared_code(struct ixgbe_ case ixgbe_mac_X550EM_a: status = ixgbe_init_ops_X550EM(hw); break; +#endif case ixgbe_mac_82599_vf: case ixgbe_mac_X540_vf: case ixgbe_mac_X550_vf: Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Mar 17 22:00:11 2015 (r280196) +++ head/sys/modules/Makefile Tue Mar 17 22:40:50 2015 (r280197) @@ -175,6 +175,8 @@ SUBDIR= \ ${_iwn} \ ${_iwnfw} \ ${_ixgb} \ + ${_ix} \ + ${_ixv} \ ${_ixl} \ ${_ixlv} \ jme \ From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 04:40: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 D1539843; Wed, 18 Mar 2015 04:40:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD33E69B; Wed, 18 Mar 2015 04:40:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2I4ebhO027597; Wed, 18 Mar 2015 04:40:37 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2I4ebML027596; Wed, 18 Mar 2015 04:40:37 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503180440.t2I4ebML027596@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 18 Mar 2015 04:40:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280202 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Wed, 18 Mar 2015 04:40:37 -0000 Author: adrian Date: Wed Mar 18 04:40:36 2015 New Revision: 280202 URL: https://svnweb.freebsd.org/changeset/base/280202 Log: Correctly const-ify things. Found by: clang 3.6 Modified: head/sys/netinet/in_rss.c Modified: head/sys/netinet/in_rss.c ============================================================================== --- head/sys/netinet/in_rss.c Wed Mar 18 02:29:51 2015 (r280201) +++ head/sys/netinet/in_rss.c Wed Mar 18 04:40:36 2015 (r280202) @@ -283,7 +283,7 @@ rss_mbuf_software_hash_v4(const struct m printf("%s: short TCP frame?\n", __func__); return (-1); } - th = (struct tcphdr *)((caddr_t)ip + iphlen); + th = (const struct tcphdr *)((c_caddr_t)ip + iphlen); return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, th->th_sport, th->th_dport, @@ -293,7 +293,7 @@ rss_mbuf_software_hash_v4(const struct m } else if ((rss_gethashconfig() & RSS_HASHTYPE_RSS_UDP_IPV4) && (proto == IPPROTO_UDP) && (is_frag == 0)) { - uh = (struct udphdr *)((caddr_t)ip + iphlen); + uh = (const struct udphdr *)((c_caddr_t)ip + iphlen); if (m->m_len < iphlen + sizeof(struct udphdr)) { printf("%s: short UDP frame?\n", __func__); return (-1); From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 04:58:48 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 3B7ECAAE; Wed, 18 Mar 2015 04:58:48 +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 B81EB881; Wed, 18 Mar 2015 04:58:46 +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 t2I4wgai061825 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 18 Mar 2015 07:58:42 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2I4wg5H061824; Wed, 18 Mar 2015 07:58:42 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 18 Mar 2015 07:58:42 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r280202 - head/sys/netinet Message-ID: <20150318045842.GW17947@FreeBSD.org> References: <201503180440.t2I4ebML027596@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503180440.t2I4ebML027596@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 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: Wed, 18 Mar 2015 04:58:48 -0000 Adrian, On Wed, Mar 18, 2015 at 04:40:37AM +0000, Adrian Chadd wrote: A> Author: adrian A> Date: Wed Mar 18 04:40:36 2015 A> New Revision: 280202 A> URL: https://svnweb.freebsd.org/changeset/base/280202 A> A> Log: A> Correctly const-ify things. Why do you prefer caddr_t over 'char *'? A> Found by: clang 3.6 A> A> Modified: A> head/sys/netinet/in_rss.c A> A> Modified: head/sys/netinet/in_rss.c A> ============================================================================== A> --- head/sys/netinet/in_rss.c Wed Mar 18 02:29:51 2015 (r280201) A> +++ head/sys/netinet/in_rss.c Wed Mar 18 04:40:36 2015 (r280202) A> @@ -283,7 +283,7 @@ rss_mbuf_software_hash_v4(const struct m A> printf("%s: short TCP frame?\n", __func__); A> return (-1); A> } A> - th = (struct tcphdr *)((caddr_t)ip + iphlen); A> + th = (const struct tcphdr *)((c_caddr_t)ip + iphlen); A> return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, A> th->th_sport, A> th->th_dport, A> @@ -293,7 +293,7 @@ rss_mbuf_software_hash_v4(const struct m A> } else if ((rss_gethashconfig() & RSS_HASHTYPE_RSS_UDP_IPV4) && A> (proto == IPPROTO_UDP) && A> (is_frag == 0)) { A> - uh = (struct udphdr *)((caddr_t)ip + iphlen); A> + uh = (const struct udphdr *)((c_caddr_t)ip + iphlen); A> if (m->m_len < iphlen + sizeof(struct udphdr)) { A> printf("%s: short UDP frame?\n", __func__); A> return (-1); A> -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 05:03:08 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 970DDC3A; Wed, 18 Mar 2015 05:03: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 82821935; Wed, 18 Mar 2015 05:03: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 t2I538IQ037713; Wed, 18 Mar 2015 05:03:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2I538Iv037711; Wed, 18 Mar 2015 05:03:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503180503.t2I538Iv037711@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 18 Mar 2015 05:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280203 - 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: Wed, 18 Mar 2015 05:03:08 -0000 Author: adrian Date: Wed Mar 18 05:03:07 2015 New Revision: 280203 URL: https://svnweb.freebsd.org/changeset/base/280203 Log: Fix ixgbe(4) - add ix_txrx to compile in the kernel. Sponsored by: Norse Corp, Inc. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Mar 18 04:40:36 2015 (r280202) +++ head/sys/conf/files Wed Mar 18 05:03:07 2015 (r280203) @@ -1773,6 +1773,8 @@ dev/ixgbe/if_ix.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/if_ixv.c optional ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" +dev/ixgbe/ix_txrx.c optional ix ixv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/ixgbe_phy.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_api.c optional ix ixv inet \ From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 05:04:50 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 3DA1ED89; Wed, 18 Mar 2015 05:04:50 +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 BA715941; Wed, 18 Mar 2015 05:04:49 +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 t2I54lZM061879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 18 Mar 2015 08:04:47 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2I54lev061878; Wed, 18 Mar 2015 08:04:47 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 18 Mar 2015 08:04:47 +0300 From: Gleb Smirnoff To: Jack F Vogel Subject: Re: svn commit: r280197 - in head/sys: dev/ixgbe modules Message-ID: <20150318050447.GX17947@FreeBSD.org> References: <201503172240.t2HMepgD058989@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503172240.t2HMepgD058989@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 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: Wed, 18 Mar 2015 05:04:50 -0000 Jack, On Tue, Mar 17, 2015 at 10:40:51PM +0000, Jack F Vogel wrote: J> Author: jfv J> Date: Tue Mar 17 22:40:50 2015 J> New Revision: 280197 J> URL: https://svnweb.freebsd.org/changeset/base/280197 J> J> Log: J> Resolve a few build issues, add module directories back into Makefile, J> then correct a NETMAP problem resulting from the split, and finally J> temporarily disable the X550 functionality. ... J> Modified: head/sys/modules/Makefile J> ============================================================================== J> --- head/sys/modules/Makefile Tue Mar 17 22:00:11 2015 (r280196) J> +++ head/sys/modules/Makefile Tue Mar 17 22:40:50 2015 (r280197) J> @@ -175,6 +175,8 @@ SUBDIR= \ J> ${_iwn} \ J> ${_iwnfw} \ J> ${_ixgb} \ J> + ${_ix} \ J> + ${_ixv} \ J> ${_ixl} \ J> ${_ixlv} \ J> jme \ J> This doesn't enable build of modules, since you added empty variables. You also need to initialize these variables at line 586, assuming the drivers build on amd64 and i386. In case if they work on amd64 only, then at line 623. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 05:05:32 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 0B725EEC; Wed, 18 Mar 2015 05:05: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 EB13994E; Wed, 18 Mar 2015 05:05: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 t2I55V5E038039; Wed, 18 Mar 2015 05:05:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2I55VIi038033; Wed, 18 Mar 2015 05:05:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503180505.t2I55VIi038033@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 18 Mar 2015 05:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280204 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 05:05:32 -0000 Author: adrian Date: Wed Mar 18 05:05:30 2015 New Revision: 280204 URL: https://svnweb.freebsd.org/changeset/base/280204 Log: Fix ixgbe(4) to compile - with RSS; with ix+ixv in the kernel. * Fix the multiple same-named devclasses; the duplicate name trips up the linker. * Re-do the taskqueue stuff to use the new cpuset API, not the old pinned API. * Add includes for the new location of the RSS configuration routines. This allows ixgbe to compile as a module /and/ linked into the kernel, along with RSS working. Sponsored by: Norse Corp, Inc. Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Wed Mar 18 05:03:07 2015 (r280203) +++ head/sys/dev/ixgbe/if_ix.c Wed Mar 18 05:05:30 2015 (r280204) @@ -42,6 +42,7 @@ #include "ixgbe.h" #ifdef RSS +#include #include #endif @@ -191,7 +192,7 @@ extern void ixgbe_stop_mac_link_on_d3_82 * FreeBSD Device Interface Entry Points *********************************************************************/ -static device_method_t ixgbe_methods[] = { +static device_method_t ix_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ixgbe_probe), DEVMETHOD(device_attach, ixgbe_attach), @@ -200,15 +201,15 @@ static device_method_t ixgbe_methods[] = DEVMETHOD_END }; -static driver_t ixgbe_driver = { - "ix", ixgbe_methods, sizeof(struct adapter), +static driver_t ix_driver = { + "ix", ix_methods, sizeof(struct adapter), }; -devclass_t ixgbe_devclass; -DRIVER_MODULE(ixgbe, pci, ixgbe_driver, ixgbe_devclass, 0, 0); +devclass_t ix_devclass; +DRIVER_MODULE(ix, pci, ix_driver, ix_devclass, 0, 0); -MODULE_DEPEND(ixgbe, pci, 1, 1, 1); -MODULE_DEPEND(ixgbe, ether, 1, 1, 1); +MODULE_DEPEND(ix, pci, 1, 1, 1); +MODULE_DEPEND(ix, ether, 1, 1, 1); /* ** TUNEABLE PARAMETERS: @@ -2110,6 +2111,9 @@ ixgbe_allocate_msix(struct adapter *adap struct tx_ring *txr = adapter->tx_rings; int error, rid, vector = 0; int cpu_id = 0; +#ifdef RSS + cpuset_t cpu_mask; +#endif #ifdef RSS /* @@ -2199,8 +2203,9 @@ ixgbe_allocate_msix(struct adapter *adap que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); #ifdef RSS - taskqueue_start_threads_pinned(&que->tq, 1, PI_NET, - cpu_id, + CPU_SETOF(cpu_id, &cpu_mask); + taskqueue_start_threads_cpuset(&que->tq, 1, PI_NET, + &cpu_mask, "%s (bucket %d)", device_get_nameunit(adapter->dev), cpu_id); Modified: head/sys/dev/ixgbe/if_ixv.c ============================================================================== --- head/sys/dev/ixgbe/if_ixv.c Wed Mar 18 05:03:07 2015 (r280203) +++ head/sys/dev/ixgbe/if_ixv.c Wed Mar 18 05:05:30 2015 (r280204) @@ -142,10 +142,11 @@ static driver_t ixv_driver = { "ixv", ixv_methods, sizeof(struct adapter), }; -devclass_t ixgbe_devclass; -DRIVER_MODULE(ixv, pci, ixv_driver, ixgbe_devclass, 0, 0); +devclass_t ixv_devclass; +DRIVER_MODULE(ixv, pci, ixv_driver, ixv_devclass, 0, 0); MODULE_DEPEND(ixv, pci, 1, 1, 1); MODULE_DEPEND(ixv, ether, 1, 1, 1); +/* XXX depend on 'ix' ? */ /* ** TUNEABLE PARAMETERS: Modified: head/sys/dev/ixgbe/ix_txrx.c ============================================================================== --- head/sys/dev/ixgbe/ix_txrx.c Wed Mar 18 05:03:07 2015 (r280203) +++ head/sys/dev/ixgbe/ix_txrx.c Wed Mar 18 05:05:30 2015 (r280204) @@ -42,6 +42,7 @@ #include "ixgbe.h" #ifdef RSS +#include #include #endif From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 05:08:06 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 CC9CDDC; Wed, 18 Mar 2015 05:08:06 +0000 (UTC) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91C7C96D; Wed, 18 Mar 2015 05:08:06 +0000 (UTC) Received: by ignm3 with SMTP id m3so66554826ign.0; Tue, 17 Mar 2015 22:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ZjfpCWLu8O2WYRsMqLKxoFNmyfYuOVoVwmkNwcEtVVA=; b=EuvcWQMgGS0Ztd52fUnbbfJyb/ffYJAWN2mJHO2SR965n3SO2iHvtWrRAodk1Jvaov o6oCt+gWzV8OXNj5nfyWSyMu72sSCGvfG/gBaORriz+L+ZU1BzIFOd5+7REz5SGssll1 rIFNW1zvWvTEpM9TvO0vZ1+q0DbYEzTxdIlrcQAALr+FZkAxSWV3zj/UCNOl8lP7xYDU 4Y8XwaFU00bcJQCzw7bEURNcpd/IKBq7/V2dPIRMQ+koRP6tJ94LyYMBIVfqs1hGDALv 3I03An8ztkRYmoL96BtNVRnCOoTtfArimDs/IVH58Ybc3X81ayxmZ9ioTLEA/97g5Mgo WBIQ== MIME-Version: 1.0 X-Received: by 10.50.132.66 with SMTP id os2mr3626576igb.6.1426655285897; Tue, 17 Mar 2015 22:08:05 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Tue, 17 Mar 2015 22:08:05 -0700 (PDT) In-Reply-To: <20150318045842.GW17947@FreeBSD.org> References: <201503180440.t2I4ebML027596@svn.freebsd.org> <20150318045842.GW17947@FreeBSD.org> Date: Tue, 17 Mar 2015 22:08:05 -0700 X-Google-Sender-Auth: E9NokThWTCiQ-DXJtj_drN4d6Go Message-ID: Subject: Re: svn commit: r280202 - head/sys/netinet From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 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: Wed, 18 Mar 2015 05:08:06 -0000 I just abused what was there. :) -a From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 05:24:47 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 A24CE317; Wed, 18 Mar 2015 05:24:47 +0000 (UTC) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66987AEE; Wed, 18 Mar 2015 05:24:47 +0000 (UTC) Received: by iecvj10 with SMTP id vj10so30218923iec.0; Tue, 17 Mar 2015 22:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=3Z7ArsLRo6rx3f3FCsXi2q9mnTscvHJ081SDJzm4Lgc=; b=aKk1jNzcwCDOY2fc4KsgEYSkZdCjASZHDUlejb7E19RpZBMAxOWieHosNZbqmPwgNt v/Mu6VDdXSad/L44lhSu9xHDfyejuyFF3IZSS8NNMiwWRkCYVING4Xk346bdaySIhBn4 yt5HgklDU3bayVBbU193Pej65aFlwhhrNIiQR/M9QxCM/Lhvjn1g4A/D+7K5BlsIr0lp Okxb7I3QNX1GEHo+sSDz0rVZTbWaKlryAw29oUp1SINqoks0cEkVADeg+1DiwAsuSfvS c5oUCaPOgSyzxWnISdwye1nupCYdRiTVxDLWr2/B575ZrjNvfh0RAbDLpWlUXa2HSoND n4nw== MIME-Version: 1.0 X-Received: by 10.42.109.12 with SMTP id j12mr91441850icp.22.1426656286851; Tue, 17 Mar 2015 22:24:46 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Tue, 17 Mar 2015 22:24:46 -0700 (PDT) In-Reply-To: <20150318050447.GX17947@FreeBSD.org> References: <201503172240.t2HMepgD058989@svn.freebsd.org> <20150318050447.GX17947@FreeBSD.org> Date: Tue, 17 Mar 2015 22:24:46 -0700 X-Google-Sender-Auth: JhmXe5lgYxUKBhEkRxJho8AEmko Message-ID: Subject: Re: svn commit: r280197 - in head/sys: dev/ixgbe modules From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: Jack F Vogel , "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: Wed, 18 Mar 2015 05:24:47 -0000 Hi Jack/Gleb: How's this? It enables them only for amd64: Index: sys/modules/Makefile =================================================================== --- sys/modules/Makefile (revision 280197) +++ sys/modules/Makefile (working copy) @@ -620,6 +620,8 @@ .if ${MACHINE_CPUARCH} == "amd64" _ixl= ixl _ixlv= ixlv +_ix= ix +_ixv= ixv _ntb= ntb _qlxge= qlxge _qlxgb= qlxgb -adrian From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 05:45: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 A41706C8; Wed, 18 Mar 2015 05:45:58 +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 2B174CDA; Wed, 18 Mar 2015 05:45:57 +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 t2I5jtfH062158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 18 Mar 2015 08:45:55 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2I5jtjE062157; Wed, 18 Mar 2015 08:45:55 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 18 Mar 2015 08:45:55 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r280197 - in head/sys: dev/ixgbe modules Message-ID: <20150318054555.GZ17947@FreeBSD.org> References: <201503172240.t2HMepgD058989@svn.freebsd.org> <20150318050447.GX17947@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Jack F Vogel , "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: Wed, 18 Mar 2015 05:45:58 -0000 On Tue, Mar 17, 2015 at 10:24:46PM -0700, Adrian Chadd wrote: A> Hi Jack/Gleb: A> A> How's this? It enables them only for amd64: The ixgbe used to be built on amd64 and i386. A> Index: sys/modules/Makefile A> =================================================================== A> --- sys/modules/Makefile (revision 280197) A> +++ sys/modules/Makefile (working copy) A> @@ -620,6 +620,8 @@ A> .if ${MACHINE_CPUARCH} == "amd64" A> _ixl= ixl A> _ixlv= ixlv A> +_ix= ix A> +_ixv= ixv A> _ntb= ntb A> _qlxge= qlxge A> _qlxgb= qlxgb -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 05:48:08 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 2C771840; Wed, 18 Mar 2015 05:48: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 16EC6CF7; Wed, 18 Mar 2015 05:48: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 t2I5m7r6056448; Wed, 18 Mar 2015 05:48:07 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2I5m6ga056441; Wed, 18 Mar 2015 05:48:06 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201503180548.t2I5m6ga056441@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 18 Mar 2015 05:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280206 - head/bin/pax X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 05:48:08 -0000 Author: eadler Date: Wed Mar 18 05:48:05 2015 New Revision: 280206 URL: https://svnweb.freebsd.org/changeset/base/280206 Log: Implement pax -O option to permit limiting a PAX archive to a single volume. -O Force the archive to be one volume. If a volume ends prematurely, pax will not prompt for a new volume. PR: 198481 Submitted by: Sevan Janiyan Reviewed by: allanjude (doc) Modified: head/bin/pax/ar_io.c head/bin/pax/extern.h head/bin/pax/options.c head/bin/pax/pax.1 head/bin/pax/pax.c Modified: head/bin/pax/ar_io.c ============================================================================== --- head/bin/pax/ar_io.c Wed Mar 18 05:25:38 2015 (r280205) +++ head/bin/pax/ar_io.c Wed Mar 18 05:48:05 2015 (r280206) @@ -82,7 +82,7 @@ static int wr_trail = 1; /* trailer was static int can_unlnk = 0; /* do we unlink null archives? */ const char *arcname; /* printable name of archive */ const char *gzip_program; /* name of gzip program */ -static pid_t zpid = -1; /* pid of child process */ +static pid_t zpid = -1; /* pid of child process */ static int get_phys(void); static void ar_start_gzip(int, const char *, int); @@ -1123,7 +1123,7 @@ ar_next(void) if (sigprocmask(SIG_SETMASK, &o_mask, NULL) < 0) syswarn(0, errno, "Unable to restore signal mask"); - if (done || !wr_trail || strcmp(NM_TAR, argv0) == 0) + if (done || !wr_trail || Oflag || strcmp(NM_TAR, argv0) == 0) return(-1); tty_prnt("\nATTENTION! %s archive volume change required.\n", argv0); Modified: head/bin/pax/extern.h ============================================================================== --- head/bin/pax/extern.h Wed Mar 18 05:25:38 2015 (r280205) +++ head/bin/pax/extern.h Wed Mar 18 05:48:05 2015 (r280206) @@ -217,6 +217,7 @@ extern int vflag; extern int Dflag; extern int Hflag; extern int Lflag; +extern int Oflag; extern int Xflag; extern int Yflag; extern int Zflag; Modified: head/bin/pax/options.c ============================================================================== --- head/bin/pax/options.c Wed Mar 18 05:25:38 2015 (r280205) +++ head/bin/pax/options.c Wed Mar 18 05:48:05 2015 (r280206) @@ -194,7 +194,7 @@ pax_options(int argc, char **argv) /* * process option flags */ - while ((c=getopt(argc,argv,"ab:cdf:iklno:p:rs:tuvwx:zB:DE:G:HLPT:U:XYZ")) + while ((c=getopt(argc,argv,"ab:cdf:iklno:p:rs:tuvwx:zB:DE:G:HLOPT:U:XYZ")) != -1) { switch (c) { case 'a': @@ -447,6 +447,12 @@ pax_options(int argc, char **argv) Lflag = 1; flg |= CLF; break; + case 'O': + /* + * Force one volume. Non standard option. + */ + Oflag = 1; + break; case 'P': /* * do NOT follow symlinks (default) @@ -584,7 +590,7 @@ tar_options(int argc, char **argv) { int c; int fstdin = 0; - int Oflag = 0; + int tar_Oflag = 0; int nincfiles = 0; int incfiles_max = 0; struct incfile { @@ -664,7 +670,7 @@ tar_options(int argc, char **argv) if (opt_add("write_opt=nodir") < 0) tar_usage(); case 'O': - Oflag = 1; + tar_Oflag = 1; break; case 'p': /* @@ -820,8 +826,8 @@ tar_options(int argc, char **argv) * (unless -o specified) */ if (act == ARCHIVE || act == APPND) - frmt = &(fsub[Oflag ? F_OTAR : F_TAR]); - else if (Oflag) { + frmt = &(fsub[tar_Oflag ? F_OTAR : F_TAR]); + else if (tar_Oflag) { paxwarn(1, "The -O/-o options are only valid when writing an archive"); tar_usage(); /* only valid when writing */ } @@ -1526,25 +1532,25 @@ no_op(void) void pax_usage(void) { - (void)fputs("usage: pax [-cdnvz] [-E limit] [-f archive] ", stderr); + (void)fputs("usage: pax [-cdnOvz] [-E limit] [-f archive] ", stderr); (void)fputs("[-s replstr] ... [-U user] ...", stderr); (void)fputs("\n [-G group] ... ", stderr); (void)fputs("[-T [from_date][,to_date]] ... ", stderr); (void)fputs("[pattern ...]\n", stderr); - (void)fputs(" pax -r [-cdiknuvzDYZ] [-E limit] ", stderr); + (void)fputs(" pax -r [-cdiknOuvzDYZ] [-E limit] ", stderr); (void)fputs("[-f archive] [-o options] ... \n", stderr); (void)fputs(" [-p string] ... [-s replstr] ... ", stderr); (void)fputs("[-U user] ... [-G group] ...\n ", stderr); (void)fputs("[-T [from_date][,to_date]] ... ", stderr); (void)fputs(" [pattern ...]\n", stderr); - (void)fputs(" pax -w [-dituvzHLPX] [-b blocksize] ", stderr); + (void)fputs(" pax -w [-dituvzHLOPX] [-b blocksize] ", stderr); (void)fputs("[ [-a] [-f archive] ] [-x format] \n", stderr); (void)fputs(" [-B bytes] [-s replstr] ... ", stderr); (void)fputs("[-o options] ... [-U user] ...", stderr); (void)fputs("\n [-G group] ... ", stderr); (void)fputs("[-T [from_date][,to_date][/[c][m]]] ... ", stderr); (void)fputs("[file ...]\n", stderr); - (void)fputs(" pax -r -w [-diklntuvDHLPXYZ] ", stderr); + (void)fputs(" pax -r -w [-diklntuvDHLOPXYZ] ", stderr); (void)fputs("[-p string] ... [-s replstr] ...", stderr); (void)fputs("\n [-U user] ... [-G group] ... ", stderr); (void)fputs("[-T [from_date][,to_date][/[c][m]]] ... ", stderr); Modified: head/bin/pax/pax.1 ============================================================================== --- head/bin/pax/pax.1 Wed Mar 18 05:25:38 2015 (r280205) +++ head/bin/pax/pax.1 Wed Mar 18 05:48:05 2015 (r280206) @@ -33,7 +33,7 @@ .\" @(#)pax.1 8.4 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd December 21, 2013 +.Dd March 17, 2015 .Dt PAX 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Nd read and write file archives and copy directory hierarchies .Sh SYNOPSIS .Nm -.Op Fl cdnvz +.Op Fl cdnvzO .Bk -words .Op Fl f Ar archive .Ek @@ -68,7 +68,7 @@ .Op Ar pattern ...\& .Nm .Fl r -.Op Fl cdiknuvzDYZ +.Op Fl cdiknuvzDOYZ .Bk -words .Op Fl f Ar archive .Ek @@ -104,7 +104,7 @@ .Op Ar pattern ...\& .Nm .Fl w -.Op Fl dituvzHLPX +.Op Fl dituvzHLOPX .Bk -words .Op Fl b Ar blocksize .Ek @@ -147,7 +147,7 @@ .Nm .Fl r .Fl w -.Op Fl diklntuvDHLPXYZ +.Op Fl diklntuvDHLOPXYZ .Bk -words .Op Fl p Ar string .Ar ...\& @@ -853,6 +853,13 @@ Follow only command line symbolic links system traversal. .It Fl L Follow all symbolic links to perform a logical file system traversal. +.It Fl O +Force the archive to be one volume. +If a volume ends prematurely, +.Nm +will not prompt for a new volume. +This option can be useful for +automated tasks where error recovery cannot be performed by a human. .It Fl P Do not follow symbolic links, perform a physical file system traversal. This is the default mode. @@ -1176,6 +1183,7 @@ The options .Fl G , .Fl H , .Fl L , +.Fl O , .Fl P , .Fl T , .Fl U , Modified: head/bin/pax/pax.c ============================================================================== --- head/bin/pax/pax.c Wed Mar 18 05:25:38 2015 (r280205) +++ head/bin/pax/pax.c Wed Mar 18 05:48:05 2015 (r280206) @@ -85,6 +85,7 @@ int vflag; /* produce verbose output * int Dflag; /* same as uflag except inode change time */ int Hflag; /* follow command line symlinks (write only) */ int Lflag; /* follow symlinks when writing */ +int Oflag; /* limit to single volume */ int Xflag; /* archive files with same device id only */ int Yflag; /* same as Dflg except after name mode */ int Zflag; /* same as uflg except after name mode */ From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 08:46:10 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 0FFE56EC; Wed, 18 Mar 2015 08:46:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE08B1DF; Wed, 18 Mar 2015 08:46: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 t2I8k9Zm038928; Wed, 18 Mar 2015 08:46:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2I8k9pQ038927; Wed, 18 Mar 2015 08:46:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503180846.t2I8k9pQ038927@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 18 Mar 2015 08:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280208 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 08:46:10 -0000 Author: hselasky Date: Wed Mar 18 08:46:08 2015 New Revision: 280208 URL: https://svnweb.freebsd.org/changeset/base/280208 Log: Declare missing symbol and inline macro which is only used once. MFC after: 2 weeks Sponsored by: Mellanox Technologies Submitted by: glebius@ Modified: head/sys/ofed/include/linux/linux_compat.c Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Wed Mar 18 06:09:37 2015 (r280207) +++ head/sys/ofed/include/linux/linux_compat.c Wed Mar 18 08:46:08 2015 (r280208) @@ -56,6 +56,7 @@ #include #include #include +#include #include @@ -67,18 +68,13 @@ MALLOC_DEFINE(M_KMALLOC, "linux", "Linux #undef file #undef cdev #define RB_ROOT(head) (head)->rbh_root -#undef LIST_HEAD -/* From sys/queue.h */ -#define LIST_HEAD(name, type) \ -struct name { \ - struct type *lh_first; /* first element */ \ -} struct kobject class_root; struct device linux_rootdev; struct class miscclass; struct list_head pci_drivers; struct list_head pci_devices; +struct net init_net; spinlock_t pci_lock; int @@ -621,7 +617,9 @@ struct vmmap { unsigned long vm_size; }; -LIST_HEAD(vmmaphd, vmmap); +struct vmmaphd { + struct vmmap *lh_first; +}; #define VMMAP_HASH_SIZE 64 #define VMMAP_HASH_MASK (VMMAP_HASH_SIZE - 1) #define VM_HASH(addr) ((uintptr_t)(addr) >> PAGE_SHIFT) & VMMAP_HASH_MASK From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 10:49:19 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 0210D6AB; Wed, 18 Mar 2015 10:49:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7A492B6; Wed, 18 Mar 2015 10:49: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 t2IAnIOK096233; Wed, 18 Mar 2015 10:49:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IAnInG096231; Wed, 18 Mar 2015 10:49:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503181049.t2IAnInG096231@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 18 Mar 2015 10:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280210 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 10:49:19 -0000 Author: hselasky Date: Wed Mar 18 10:49:17 2015 New Revision: 280210 URL: https://svnweb.freebsd.org/changeset/base/280210 Log: Fix problems about 32-bit ticks wraparound and unsigned long conversion: - The linux compat API layer casts the ticks to unsigned long which might cause problems when the ticks value is negative. - Guard against already expired ticks values, by checking if the passed expiry tick is already elapsed. - While at it avoid referring the address of an inlined function. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/linux_compat.c head/sys/ofed/include/linux/timer.h Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Wed Mar 18 09:39:31 2015 (r280209) +++ head/sys/ofed/include/linux/linux_compat.c Wed Mar 18 10:49:17 2015 (r280210) @@ -57,6 +57,7 @@ #include #include #include +#include #include @@ -77,6 +78,8 @@ struct list_head pci_devices; struct net init_net; spinlock_t pci_lock; +unsigned long linux_timer_hz_mask; + int panic_cmp(struct rb_node *one, struct rb_node *two) { @@ -724,6 +727,60 @@ kasprintf(gfp_t gfp, const char *fmt, .. return p; } +static int +linux_timer_jiffies_until(unsigned long expires) +{ + int delta = expires - jiffies; + /* guard against already expired values */ + if (delta < 1) + delta = 1; + return (delta); +} + +static void +linux_timer_callback_wrapper(void *context) +{ + struct timer_list *timer; + + timer = context; + timer->function(timer->data); +} + +void +mod_timer(struct timer_list *timer, unsigned long expires) +{ + + timer->expires = expires; + callout_reset(&timer->timer_callout, + linux_timer_jiffies_until(expires), + &linux_timer_callback_wrapper, timer); +} + +void +add_timer(struct timer_list *timer) +{ + + callout_reset(&timer->timer_callout, + linux_timer_jiffies_until(timer->expires), + &linux_timer_callback_wrapper, timer); +} + +static void +linux_timer_init(void *arg) +{ + + /* + * Compute an internal HZ value which can divide 2**32 to + * avoid timer rounding problems when the tick value wraps + * around 2**32: + */ + linux_timer_hz_mask = 1; + while (linux_timer_hz_mask < (unsigned long)hz) + linux_timer_hz_mask *= 2; + linux_timer_hz_mask--; +} +SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL); + static void linux_compat_init(void) { Modified: head/sys/ofed/include/linux/timer.h ============================================================================== --- head/sys/ofed/include/linux/timer.h Wed Mar 18 09:39:31 2015 (r280209) +++ head/sys/ofed/include/linux/timer.h Wed Mar 18 10:49:17 2015 (r280210) @@ -27,7 +27,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LINUX_TIMER_H_ -#define _LINUX_TIMER_H_ +#define _LINUX_TIMER_H_ #include @@ -36,20 +36,13 @@ #include struct timer_list { - struct callout timer_callout; - void (*function)(unsigned long); - unsigned long data; - unsigned long expires; + struct callout timer_callout; + void (*function) (unsigned long); + unsigned long data; + unsigned long expires; }; -static inline void -_timer_fn(void *context) -{ - struct timer_list *timer; - - timer = context; - timer->function(timer->data); -} +extern unsigned long linux_timer_hz_mask; #define setup_timer(timer, func, dat) \ do { \ @@ -65,28 +58,15 @@ do { \ callout_init(&(timer)->timer_callout, CALLOUT_MPSAFE); \ } while (0) -#define mod_timer(timer, exp) \ -do { \ - (timer)->expires = (exp); \ - callout_reset(&(timer)->timer_callout, (exp) - jiffies, \ - _timer_fn, (timer)); \ -} while (0) - -#define add_timer(timer) \ - callout_reset(&(timer)->timer_callout, \ - (timer)->expires - jiffies, _timer_fn, (timer)) +extern void mod_timer(struct timer_list *, unsigned long); +extern void add_timer(struct timer_list *); #define del_timer(timer) callout_stop(&(timer)->timer_callout) #define del_timer_sync(timer) callout_drain(&(timer)->timer_callout) - #define timer_pending(timer) callout_pending(&(timer)->timer_callout) +#define round_jiffies(j) \ + ((unsigned long)(((j) + linux_timer_hz_mask) & ~linux_timer_hz_mask)) +#define round_jiffies_relative(j) \ + round_jiffies(j) -static inline unsigned long -round_jiffies(unsigned long j) -{ - return roundup(j, hz); -} - -#define round_jiffies_relative(j) round_jiffies(j) - -#endif /* _LINUX_TIMER_H_ */ +#endif /* _LINUX_TIMER_H_ */ From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 10:50:11 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 E5335800; Wed, 18 Mar 2015 10:50:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFE022D2; Wed, 18 Mar 2015 10:50:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2IAoBrC096448; Wed, 18 Mar 2015 10:50:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IAoBAV096447; Wed, 18 Mar 2015 10:50:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503181050.t2IAoBAV096447@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 18 Mar 2015 10:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280211 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 10:50:12 -0000 Author: hselasky Date: Wed Mar 18 10:50:10 2015 New Revision: 280211 URL: https://svnweb.freebsd.org/changeset/base/280211 Log: Add missing void pointer argument to SYSINIT() functions. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/linux_compat.c Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Wed Mar 18 10:49:17 2015 (r280210) +++ head/sys/ofed/include/linux/linux_compat.c Wed Mar 18 10:50:10 2015 (r280211) @@ -782,7 +782,7 @@ linux_timer_init(void *arg) SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL); static void -linux_compat_init(void) +linux_compat_init(void *arg) { struct sysctl_oid *rootoid; int i; @@ -811,7 +811,7 @@ linux_compat_init(void) SYSINIT(linux_compat, SI_SUB_DRIVERS, SI_ORDER_SECOND, linux_compat_init, NULL); static void -linux_compat_uninit(void) +linux_compat_uninit(void *arg) { kobject_kfree_name(&class_root); kobject_kfree_name(&linux_rootdev.kobj); From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 13:07:20 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 10E752BF; Wed, 18 Mar 2015 13:07:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0D9275B; Wed, 18 Mar 2015 13:07:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2ID7J4D062314; Wed, 18 Mar 2015 13:07:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2ID7JrY062313; Wed, 18 Mar 2015 13:07:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503181307.t2ID7JrY062313@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 18 Mar 2015 13:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280218 - head/usr.bin/xlint/lint1 X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 13:07:20 -0000 Author: emaste Date: Wed Mar 18 13:07:19 2015 New Revision: 280218 URL: https://svnweb.freebsd.org/changeset/base/280218 Log: xlint: add arm64 #define Submitted by: andrew@ Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/xlint/lint1/param.h Modified: head/usr.bin/xlint/lint1/param.h ============================================================================== --- head/usr.bin/xlint/lint1/param.h Wed Mar 18 13:01:09 2015 (r280217) +++ head/usr.bin/xlint/lint1/param.h Wed Mar 18 13:07:19 2015 (r280218) @@ -95,6 +95,9 @@ #elif __mips__ #define PTRDIFF_IS_LONG 0 #define SIZEOF_IS_ULONG 0 +#elif __aarch64__ +#define PTRDIFF_IS_LONG 1 +#define SIZEOF_IS_ULONG 1 #else #error unknown machine type #endif From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 13:54:54 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 46078585; Wed, 18 Mar 2015 13:54:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 321EDDD3; Wed, 18 Mar 2015 13:54:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2IDsscG085552; Wed, 18 Mar 2015 13:54:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IDssGG085551; Wed, 18 Mar 2015 13:54:54 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503181354.t2IDssGG085551@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 18 Mar 2015 13:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280219 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Wed, 18 Mar 2015 13:54:54 -0000 Author: andrew Date: Wed Mar 18 13:54:53 2015 New Revision: 280219 URL: https://svnweb.freebsd.org/changeset/base/280219 Log: We won't support a.out on arm64/aarch64. As such there will be no need to support it in nlist(3). Reviewed by: emaste Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/gen/nlist.c Modified: head/lib/libc/gen/nlist.c ============================================================================== --- head/lib/libc/gen/nlist.c Wed Mar 18 13:07:19 2015 (r280218) +++ head/lib/libc/gen/nlist.c Wed Mar 18 13:54:53 2015 (r280219) @@ -47,7 +47,10 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +/* There is no a.out support on arm64 */ +#ifndef __aarch64__ #define _NLIST_DO_AOUT +#endif #define _NLIST_DO_ELF #ifdef _NLIST_DO_ELF From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 13:59: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 935AC840; Wed, 18 Mar 2015 13:59: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 7F239E1E; Wed, 18 Mar 2015 13:59: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 t2IDx5W9086218; Wed, 18 Mar 2015 13:59:05 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IDx5MO086217; Wed, 18 Mar 2015 13:59:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503181359.t2IDx5MO086217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 18 Mar 2015 13:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280220 - head/usr.bin/ldd X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 13:59:05 -0000 Author: andrew Date: Wed Mar 18 13:59:04 2015 New Revision: 280220 URL: https://svnweb.freebsd.org/changeset/base/280220 Log: Allowus to exclude a.out support from ldd and use it with arm64 as it won't support the a.out format. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/ldd/ldd.c Modified: head/usr.bin/ldd/ldd.c ============================================================================== --- head/usr.bin/ldd/ldd.c Wed Mar 18 13:54:53 2015 (r280219) +++ head/usr.bin/ldd/ldd.c Wed Mar 18 13:59:04 2015 (r280220) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -49,6 +48,12 @@ __FBSDID("$FreeBSD$"); #include "extern.h" +/* We don't support a.out executables on arm64 */ +#ifndef __aarch64__ +#include +#define AOUT_SUPPORTED +#endif + /* * 32-bit ELF data structures can only be used if the system header[s] declare * them. There is no official macro for determining whether they are declared, @@ -274,7 +279,9 @@ static int is_executable(const char *fname, int fd, int *is_shlib, int *type) { union { +#ifdef AOUT_SUPPORTED struct exec aout; +#endif #if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED) Elf32_Ehdr elf32; #endif @@ -290,6 +297,7 @@ is_executable(const char *fname, int fd, return (0); } +#ifdef AOUT_SUPPORTED if ((size_t)n >= sizeof(hdr.aout) && !N_BADMAG(hdr.aout)) { /* a.out file */ if ((N_GETFLAG(hdr.aout) & EX_DPMASK) != EX_DYNAMIC @@ -303,6 +311,7 @@ is_executable(const char *fname, int fd, *type = TYPE_AOUT; return (1); } +#endif #if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED) if ((size_t)n >= sizeof(hdr.elf32) && IS_ELF(hdr.elf32) && From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 14:46:51 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 BDAAC42F; Wed, 18 Mar 2015 14:46:51 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 967675F8; Wed, 18 Mar 2015 14:46:51 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6803BB95B; Wed, 18 Mar 2015 10:46:50 -0400 (EDT) From: John Baldwin To: Andrew Turner Subject: Re: svn commit: r280219 - head/lib/libc/gen Date: Wed, 18 Mar 2015 10:32:33 -0400 Message-ID: <1938111.D25SRQMHbg@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201503181354.t2IDssGG085551@svn.freebsd.org> References: <201503181354.t2IDssGG085551@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 18 Mar 2015 10:46:50 -0400 (EDT) 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: Wed, 18 Mar 2015 14:46:51 -0000 On Wednesday, March 18, 2015 01:54:54 PM Andrew Turner wrote: > Author: andrew > Date: Wed Mar 18 13:54:53 2015 > New Revision: 280219 > URL: https://svnweb.freebsd.org/changeset/base/280219 > > Log: > We won't support a.out on arm64/aarch64. As such there will be no need to > support it in nlist(3). I wonder if this should be #ifdef __i386__ instead? We've only had a.out binaries and kernels for FreeBSD/i386 (3.0 was the first release to use ELF by default, and I don't think Alpha was supported until 4.0). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 14:46: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 90E1742D; Wed, 18 Mar 2015 14:46:51 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68A375F7; Wed, 18 Mar 2015 14:46:51 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B76BAB94E; Wed, 18 Mar 2015 10:46:49 -0400 (EDT) From: John Baldwin To: Andrew Turner Subject: Re: svn commit: r280220 - head/usr.bin/ldd Date: Wed, 18 Mar 2015 10:33:45 -0400 Message-ID: <2184487.KWP1t96Knu@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201503181359.t2IDx5MO086217@svn.freebsd.org> References: <201503181359.t2IDx5MO086217@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 18 Mar 2015 10:46:49 -0400 (EDT) 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: Wed, 18 Mar 2015 14:46:51 -0000 On Wednesday, March 18, 2015 01:59:05 PM Andrew Turner wrote: > Author: andrew > Date: Wed Mar 18 13:59:04 2015 > New Revision: 280220 > URL: https://svnweb.freebsd.org/changeset/base/280220 > > Log: > Allowus to exclude a.out support from ldd and use it with arm64 as it won't > support the a.out format. Similarly here. Perhaps it could also be enabled for amd64 to support running old FreeBSD/i386 binaries, but there's no need for it on other arm, mips, powerpc, sparc64, etc. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 14:49:17 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 90D958F3; Wed, 18 Mar 2015 14:49:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D0EE630; Wed, 18 Mar 2015 14:49:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2IEnGTm009765; Wed, 18 Mar 2015 14:49:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IEnGWv009764; Wed, 18 Mar 2015 14:49:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503181449.t2IEnGWv009764@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 18 Mar 2015 14:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280221 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Wed, 18 Mar 2015 14:49:17 -0000 Author: ian Date: Wed Mar 18 14:49:16 2015 New Revision: 280221 URL: https://svnweb.freebsd.org/changeset/base/280221 Log: Update ucom(4) with information about the new PPS capture abilities. Differential Revision: https://reviews.freebsd.org/D2049 Modified: head/share/man/man4/ucom.4 Modified: head/share/man/man4/ucom.4 ============================================================================== --- head/share/man/man4/ucom.4 Wed Mar 18 13:59:04 2015 (r280220) +++ head/share/man/man4/ucom.4 Wed Mar 18 14:49:16 2015 (r280221) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 3, 2014 +.Dd March 11, 2015 .Dt UCOM 4 .Os .Sh NAME @@ -63,11 +63,34 @@ This means that normal programs such as or .Xr ppp 8 can be used to access the device. +.Sh Pulse Per Second (PPS) Timing Interface +The +.Nm +driver can capture PPS timing information as defined in RFC 2783. +The API, accessed via +.Xr ioctl 8 , +is available on the tty device. +To use the PPS capture feature with +.Xr ntpd 8 , +symlink the tty device to +.Va /dev/pps0. .Pp The -.Va portno -locater can be used to decide which port to use for devices that have -multiple external ports. +.Va hw.usb.ucom.pps_mode +sysctl configures the PPS capture mode. +It can be set in +.Xr loader.conf 5 +or +.Xr sysctl.conf 5 . +The following capture modes are available: +.Bl -tag -compact -offset "mmmm" -width "mmmm" +.It 0 +Capture disabled (default). +.It 1 +Capture pulses on the CTS line. +.It 2 +Capture pulses on the DCD line. +.El .Sh FILES .Bl -tag -width ".Pa /dev/cuaU?" .It Pa /dev/cuaU? From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 14:51: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 A3542AB6; Wed, 18 Mar 2015 14:51: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 8FD236E8; Wed, 18 Mar 2015 14:51: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 t2IEp4IF010344; Wed, 18 Mar 2015 14:51:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IEp4Hr010343; Wed, 18 Mar 2015 14:51:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503181451.t2IEp4Hr010343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 18 Mar 2015 14:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280222 - 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: Wed, 18 Mar 2015 14:51:04 -0000 Author: jhb Date: Wed Mar 18 14:51:03 2015 New Revision: 280222 URL: https://svnweb.freebsd.org/changeset/base/280222 Log: Clear an mbuf's external storage flags in m_extaddref(). They are cleared in other places that set the external storage type (ext_type) such as m_cljset(), m_extadd(), mb_ctor_clust(), and vn_sendfile(). Differential Revision: https://reviews.freebsd.org/D2080 Reviewed by: np, glebius MFC after: 2 weeks Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Mar 18 14:49:16 2015 (r280221) +++ head/sys/sys/mbuf.h Wed Mar 18 14:51:03 2015 (r280222) @@ -578,6 +578,7 @@ m_extaddref(struct mbuf *m, caddr_t buf, m->m_ext.ext_arg1 = arg1; m->m_ext.ext_arg2 = arg2; m->m_ext.ext_type = EXT_EXTREF; + m->m_ext.ext_flags = 0; } static __inline uma_zone_t From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 15:01:39 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 D5EEBF01; Wed, 18 Mar 2015 15:01:39 +0000 (UTC) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 9F2E786C; Wed, 18 Mar 2015 15:01:39 +0000 (UTC) Received: from bender (c112.sec.cl.cam.ac.uk [128.232.18.112]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id BDB99D7A37; Wed, 18 Mar 2015 15:01:31 +0000 (UTC) Date: Wed, 18 Mar 2015 15:01:31 +0000 From: Andrew Turner To: John Baldwin Subject: Re: svn commit: r280219 - head/lib/libc/gen Message-ID: <20150318150131.5b81a8d1@bender> In-Reply-To: <1938111.D25SRQMHbg@ralph.baldwin.cx> References: <201503181354.t2IDssGG085551@svn.freebsd.org> <1938111.D25SRQMHbg@ralph.baldwin.cx> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Andrew Turner , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Wed, 18 Mar 2015 15:01:40 -0000 On Wed, 18 Mar 2015 10:32:33 -0400 John Baldwin wrote: > On Wednesday, March 18, 2015 01:54:54 PM Andrew Turner wrote: > > Author: andrew > > Date: Wed Mar 18 13:54:53 2015 > > New Revision: 280219 > > URL: https://svnweb.freebsd.org/changeset/base/280219 > > > > Log: > > We won't support a.out on arm64/aarch64. As such there will be no > > need to support it in nlist(3). > > I wonder if this should be #ifdef __i386__ instead? We've only had > a.out binaries and kernels for FreeBSD/i386 (3.0 was the first > release to use ELF by default, and I don't think Alpha was supported > until 4.0). I will leave this to someone who knows more about each architecture than I do to decide. I would have no problem removing the a.out support on 32-bit ARM, and I expect we can also do this on MIPS, PowerPC, and Sparc64. It may also pay to import the NetBSD version of this as they have split out the different executable file formats to separate source files. They also have a header to select which formats to support on each platform. Andrew From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 15:04:34 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 55343110; Wed, 18 Mar 2015 15:04:34 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2A3088D; Wed, 18 Mar 2015 15:04:33 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2IF4PWb048828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Mar 2015 17:04:25 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2IF4PWb048828 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2IF4PVT048827; Wed, 18 Mar 2015 17:04:25 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 18 Mar 2015 17:04:25 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r280220 - head/usr.bin/ldd Message-ID: <20150318150425.GV2379@kib.kiev.ua> References: <201503181359.t2IDx5MO086217@svn.freebsd.org> <2184487.KWP1t96Knu@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2184487.KWP1t96Knu@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: Andrew Turner , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Wed, 18 Mar 2015 15:04:34 -0000 On Wed, Mar 18, 2015 at 10:33:45AM -0400, John Baldwin wrote: > On Wednesday, March 18, 2015 01:59:05 PM Andrew Turner wrote: > > Author: andrew > > Date: Wed Mar 18 13:59:04 2015 > > New Revision: 280220 > > URL: https://svnweb.freebsd.org/changeset/base/280220 > > > > Log: > > Allowus to exclude a.out support from ldd and use it with arm64 as it won't > > support the a.out format. > > Similarly here. Perhaps it could also be enabled for amd64 to support running > old FreeBSD/i386 binaries, but there's no need for it on other arm, mips, > powerpc, sparc64, etc. > I do not think amd64 binary needs a.out support. Only kernel components and ldd32 need this, and for ldd32 build, the __i386__ preprocessor symbol should be defined. From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 15:20:48 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 786C0E5E; Wed, 18 Mar 2015 15:20:48 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (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 5C4B1AA8; Wed, 18 Mar 2015 15:20:48 +0000 (UTC) Received: from comporellon.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id t2IFKcOY010103 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 18 Mar 2015 08:20:39 -0700 Message-ID: <550997C6.1010209@freebsd.org> Date: Wed, 18 Mar 2015 08:20:38 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jack F Vogel , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280182 - in head/sys: amd64/conf conf dev/ixgbe modules/ix modules/ixgbe modules/ixv References: <201503171832.t2HIWTu6039113@svn.freebsd.org> In-Reply-To: <201503171832.t2HIWTu6039113@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbFmwiCl1g9LAvUrRXBHsJ/Uc2Fa5EGyKUgAf3Y5/ArWi9R4h38+lIphmG0qP2wz/myvPrJ/zXlSO9ZisU6Ol5O8c6eW1Z6+rY= X-Sonic-ID: C;NvkrVYLN5BG7A75YxQPdhw== M;JFR0VYLN5BG7A75YxQPdhw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd 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: Wed, 18 Mar 2015 15:20:48 -0000 On 03/17/15 11:32, Jack F Vogel wrote: > Author: jfv > Date: Tue Mar 17 18:32:28 2015 > New Revision: 280182 > URL: https://svnweb.freebsd.org/changeset/base/280182 > > Log: > Update to the Intel ixgbe driver: > - Split the driver into independent pf and vf loadables. This is > in preparation for SRIOV support which will be following shortly. > This also allows us to keep a seperate revision control over the > two parts, making for easier sustaining. > - Make the TX/RX code a shared/seperated file, in the old code base > the ixv code would miss fixes that went into ixgbe, this model > will eliminate that problem. > - The driver loadables will now match the device names, something that > has been requested for some time. > - Rather than a modules/ixgbe there is now modules/ix and modules/ixv > - It will also be possible to make your static kernel with only one > or the other for streamlined installs, or both. > > Enjoy! > > Submitted by: jfv and erj > > Added: > head/sys/dev/ixgbe/if_ix.c (contents, props changed) > head/sys/dev/ixgbe/if_ixv.c (contents, props changed) > head/sys/dev/ixgbe/ix_txrx.c (contents, props changed) > head/sys/modules/ix/ > head/sys/modules/ix/Makefile (contents, props changed) > head/sys/modules/ixv/ > head/sys/modules/ixv/Makefile (contents, props changed) > Deleted: > head/sys/dev/ixgbe/ixgbe.c > head/sys/dev/ixgbe/ixv.c > head/sys/dev/ixgbe/ixv.h > head/sys/modules/ixgbe/ > Modified: > head/sys/amd64/conf/GENERIC Note that the mips OCTEON1 and PowerPC GENERIC64 config files also need to be changed here and are currently unbuildable. -Nathan > head/sys/conf/NOTES > head/sys/conf/files > head/sys/dev/ixgbe/LICENSE > head/sys/dev/ixgbe/ixgbe.h > head/sys/dev/ixgbe/ixgbe_82598.c > head/sys/dev/ixgbe/ixgbe_82598.h > head/sys/dev/ixgbe/ixgbe_82599.c > head/sys/dev/ixgbe/ixgbe_82599.h > head/sys/dev/ixgbe/ixgbe_api.c > head/sys/dev/ixgbe/ixgbe_api.h > head/sys/dev/ixgbe/ixgbe_common.c > head/sys/dev/ixgbe/ixgbe_common.h > head/sys/dev/ixgbe/ixgbe_dcb.c > head/sys/dev/ixgbe/ixgbe_dcb.h > head/sys/dev/ixgbe/ixgbe_dcb_82598.c > head/sys/dev/ixgbe/ixgbe_dcb_82598.h > head/sys/dev/ixgbe/ixgbe_dcb_82599.c > head/sys/dev/ixgbe/ixgbe_dcb_82599.h > head/sys/dev/ixgbe/ixgbe_mbx.c > head/sys/dev/ixgbe/ixgbe_mbx.h > head/sys/dev/ixgbe/ixgbe_phy.c > head/sys/dev/ixgbe/ixgbe_phy.h > head/sys/dev/ixgbe/ixgbe_type.h > head/sys/dev/ixgbe/ixgbe_vf.c > head/sys/dev/ixgbe/ixgbe_vf.h > head/sys/dev/ixgbe/ixgbe_x540.c > head/sys/dev/ixgbe/ixgbe_x540.h > > Modified: head/sys/amd64/conf/GENERIC > ============================================================================== > --- head/sys/amd64/conf/GENERIC Tue Mar 17 15:48:19 2015 (r280181) > +++ head/sys/amd64/conf/GENERIC Tue Mar 17 18:32:28 2015 (r280182) > @@ -216,7 +216,8 @@ device bxe # Broadcom NetXtreme II BC > device de # DEC/Intel DC21x4x (``Tulip'') > device em # Intel PRO/1000 Gigabit Ethernet Family > device igb # Intel PRO/1000 PCIE Server Gigabit Family > -device ixgbe # Intel PRO/10GbE PCIE Ethernet Family > +device ix # Intel PRO/10GbE PCIE PF Ethernet > +device ixv # Intel PRO/10GbE PCIE VF Ethernet > device ixl # Intel XL710 40Gbe PCIE Ethernet > device ixlv # Intel XL710 40Gbe VF PCIE Ethernet > device le # AMD Am7900 LANCE and Am79C9xx PCnet > > Modified: head/sys/conf/NOTES > ============================================================================== > --- head/sys/conf/NOTES Tue Mar 17 15:48:19 2015 (r280181) > +++ head/sys/conf/NOTES Tue Mar 17 18:32:28 2015 (r280182) > @@ -2100,7 +2100,8 @@ device de # DEC/Intel DC21x4x (``Tulip > device em # Intel Pro/1000 Gigabit Ethernet > device igb # Intel Pro/1000 PCIE Gigabit Ethernet > device ixgb # Intel Pro/10Gbe PCI-X Ethernet > -device ixgbe # Intel Pro/10Gbe PCIE Ethernet > +device ix # Intel Pro/10Gbe PCIE Ethernet > +device ixv # Intel Pro/10Gbe PCIE Ethernet VF > device le # AMD Am7900 LANCE and Am79C9xx PCnet > device mxge # Myricom Myri-10G 10GbE NIC > device nxge # Neterion Xframe 10GbE Server/Storage Adapter > > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Tue Mar 17 15:48:19 2015 (r280181) > +++ head/sys/conf/files Tue Mar 17 18:32:28 2015 (r280182) > @@ -1769,31 +1769,31 @@ iwn6050.fw optional iwn6050fw | iwnfw > dev/ixgb/if_ixgb.c optional ixgb > dev/ixgb/ixgb_ee.c optional ixgb > dev/ixgb/ixgb_hw.c optional ixgb > -dev/ixgbe/ixgbe.c optional ixgbe inet \ > +dev/ixgbe/if_ix.c optional ix inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" > -dev/ixgbe/ixv.c optional ixgbe inet \ > - compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_phy.c optional ixgbe inet \ > +dev/ixgbe/if_ixv.c optional ixv inet \ > + compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" > +dev/ixgbe/ixgbe_phy.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_api.c optional ixgbe inet \ > +dev/ixgbe/ixgbe_api.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_common.c optional ixgbe inet \ > +dev/ixgbe/ixgbe_common.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_mbx.c optional ixgbe inet \ > +dev/ixgbe/ixgbe_mbx.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_vf.c optional ixgbe inet \ > +dev/ixgbe/ixgbe_vf.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_82598.c optional ixgbe inet \ > +dev/ixgbe/ixgbe_82598.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_82599.c optional ixgbe inet \ > +dev/ixgbe/ixgbe_82599.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_x540.c optional ixgbe inet \ > +dev/ixgbe/ixgbe_x540.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_dcb.c optional ixgbe inet \ > +dev/ixgbe/ixgbe_dcb.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_dcb_82598.c optional ixgbe inet \ > +dev/ixgbe/ixgbe_dcb_82598.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > -dev/ixgbe/ixgbe_dcb_82599.c optional ixgbe inet \ > +dev/ixgbe/ixgbe_dcb_82599.c optional ix ixv inet \ > compile-with "${NORMAL_C} -I$S/dev/ixgbe" > dev/jme/if_jme.c optional jme pci > dev/joy/joy.c optional joy > > Modified: head/sys/dev/ixgbe/LICENSE > ============================================================================== > --- head/sys/dev/ixgbe/LICENSE Tue Mar 17 15:48:19 2015 (r280181) > +++ head/sys/dev/ixgbe/LICENSE Tue Mar 17 18:32:28 2015 (r280182) > @@ -1,6 +1,6 @@ > /****************************************************************************** > > - Copyright (c) 2001-2013, Intel Corporation > + Copyright (c) 2001-2015, Intel Corporation > All rights reserved. > > Redistribution and use in source and binary forms, with or without > > Added: head/sys/dev/ixgbe/if_ix.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/ixgbe/if_ix.c Tue Mar 17 18:32:28 2015 (r280182) > @@ -0,0 +1,4163 @@ > +/****************************************************************************** > + > + Copyright (c) 2001-2015, Intel Corporation > + All rights reserved. > + > + Redistribution and use in source and binary forms, with or without > + modification, are permitted provided that the following conditions are met: > + > + 1. Redistributions of source code must retain the above copyright notice, > + this list of conditions and the following disclaimer. > + > + 2. Redistributions in binary form must reproduce the above copyright > + notice, this list of conditions and the following disclaimer in the > + documentation and/or other materials provided with the distribution. > + > + 3. Neither the name of the Intel Corporation nor the names of its > + contributors may be used to endorse or promote products derived from > + this software without specific prior written permission. > + > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" > + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE > + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > + POSSIBILITY OF SUCH DAMAGE. > + > +******************************************************************************/ > +/*$FreeBSD$*/ > + > + > +#ifndef IXGBE_STANDALONE_BUILD > +#include "opt_inet.h" > +#include "opt_inet6.h" > +#include "opt_rss.h" > +#endif > + > +#include "ixgbe.h" > + > +#ifdef RSS > +#include > +#endif > + > +/********************************************************************* > + * Set this to one to display debug statistics > + *********************************************************************/ > +int ixgbe_display_debug_stats = 0; > + > +/********************************************************************* > + * Driver version > + *********************************************************************/ > +char ixgbe_driver_version[] = "2.7.4"; > + > +/********************************************************************* > + * PCI Device ID Table > + * > + * Used by probe to select devices to load on > + * Last field stores an index into ixgbe_strings > + * Last entry must be all 0s > + * > + * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } > + *********************************************************************/ > + > +static ixgbe_vendor_info_t ixgbe_vendor_info_array[] = > +{ > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4, 0, 0, 0}, > + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T, 0, 0, 0}, > + /* required last entry */ > + {0, 0, 0, 0, 0} > +}; > + > +/********************************************************************* > + * Table of branding strings > + *********************************************************************/ > + > +static char *ixgbe_strings[] = { > + "Intel(R) PRO/10GbE PCI-Express Network Driver" > +}; > + > +/********************************************************************* > + * Function prototypes > + *********************************************************************/ > +static int ixgbe_probe(device_t); > +static int ixgbe_attach(device_t); > +static int ixgbe_detach(device_t); > +static int ixgbe_shutdown(device_t); > +static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); > +static void ixgbe_init(void *); > +static void ixgbe_init_locked(struct adapter *); > +static void ixgbe_stop(void *); > +#if __FreeBSD_version >= 1100036 > +static uint64_t ixgbe_get_counter(struct ifnet *, ift_counter); > +#endif > +static void ixgbe_add_media_types(struct adapter *); > +static void ixgbe_media_status(struct ifnet *, struct ifmediareq *); > +static int ixgbe_media_change(struct ifnet *); > +static void ixgbe_identify_hardware(struct adapter *); > +static int ixgbe_allocate_pci_resources(struct adapter *); > +static void ixgbe_get_slot_info(struct ixgbe_hw *); > +static int ixgbe_allocate_msix(struct adapter *); > +static int ixgbe_allocate_legacy(struct adapter *); > +static int ixgbe_setup_msix(struct adapter *); > +static void ixgbe_free_pci_resources(struct adapter *); > +static void ixgbe_local_timer(void *); > +static int ixgbe_setup_interface(device_t, struct adapter *); > +static void ixgbe_config_link(struct adapter *); > +static void ixgbe_rearm_queues(struct adapter *, u64); > + > +static void ixgbe_initialize_transmit_units(struct adapter *); > +static void ixgbe_initialize_receive_units(struct adapter *); > +static void ixgbe_enable_rx_drop(struct adapter *); > +static void ixgbe_disable_rx_drop(struct adapter *); > + > +static void ixgbe_enable_intr(struct adapter *); > +static void ixgbe_disable_intr(struct adapter *); > +static void ixgbe_update_stats_counters(struct adapter *); > +static void ixgbe_set_promisc(struct adapter *); > +static void ixgbe_set_multi(struct adapter *); > +static void ixgbe_update_link_status(struct adapter *); > +static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS); > +static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS); > +static int ixgbe_set_thermal_test(SYSCTL_HANDLER_ARGS); > +static void ixgbe_set_ivar(struct adapter *, u8, u8, s8); > +static void ixgbe_configure_ivars(struct adapter *); > +static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *, u8 **, u32 *); > + > +static void ixgbe_setup_vlan_hw_support(struct adapter *); > +static void ixgbe_register_vlan(void *, struct ifnet *, u16); > +static void ixgbe_unregister_vlan(void *, struct ifnet *, u16); > + > +static void ixgbe_add_hw_stats(struct adapter *adapter); > + > +/* Support for pluggable optic modules */ > +static bool ixgbe_sfp_probe(struct adapter *); > +static void ixgbe_setup_optics(struct adapter *); > + > +/* Legacy (single vector interrupt handler */ > +static void ixgbe_legacy_irq(void *); > + > +/* The MSI/X Interrupt handlers */ > +static void ixgbe_msix_que(void *); > +static void ixgbe_msix_link(void *); > + > +/* Deferred interrupt tasklets */ > +static void ixgbe_handle_que(void *, int); > +static void ixgbe_handle_link(void *, int); > +static void ixgbe_handle_msf(void *, int); > +static void ixgbe_handle_mod(void *, int); > + > +#ifdef IXGBE_FDIR > +static void ixgbe_reinit_fdir(void *, int); > +#endif > + > + > +/* Missing shared code prototype */ > +extern void ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw); > + > +/********************************************************************* > + * FreeBSD Device Interface Entry Points > + *********************************************************************/ > + > +static device_method_t ixgbe_methods[] = { > + /* Device interface */ > + DEVMETHOD(device_probe, ixgbe_probe), > + DEVMETHOD(device_attach, ixgbe_attach), > + DEVMETHOD(device_detach, ixgbe_detach), > + DEVMETHOD(device_shutdown, ixgbe_shutdown), > + DEVMETHOD_END > +}; > + > +static driver_t ixgbe_driver = { > + "ix", ixgbe_methods, sizeof(struct adapter), > +}; > + > +devclass_t ixgbe_devclass; > +DRIVER_MODULE(ixgbe, pci, ixgbe_driver, ixgbe_devclass, 0, 0); > + > +MODULE_DEPEND(ixgbe, pci, 1, 1, 1); > +MODULE_DEPEND(ixgbe, ether, 1, 1, 1); > + > +/* > +** TUNEABLE PARAMETERS: > +*/ > + > +static SYSCTL_NODE(_hw, OID_AUTO, ix, CTLFLAG_RD, 0, > + "IXGBE driver parameters"); > + > +/* > +** AIM: Adaptive Interrupt Moderation > +** which means that the interrupt rate > +** is varied over time based on the > +** traffic for that interrupt vector > +*/ > +static int ixgbe_enable_aim = TRUE; > +SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RWTUN, &ixgbe_enable_aim, 0, > + "Enable adaptive interrupt moderation"); > + > +static int ixgbe_max_interrupt_rate = (4000000 / IXGBE_LOW_LATENCY); > +SYSCTL_INT(_hw_ix, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, > + &ixgbe_max_interrupt_rate, 0, "Maximum interrupts per second"); > + > +/* How many packets rxeof tries to clean at a time */ > +static int ixgbe_rx_process_limit = 256; > +TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit); > +SYSCTL_INT(_hw_ix, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, > + &ixgbe_rx_process_limit, 0, > + "Maximum number of received packets to process at a time," > + "-1 means unlimited"); > + > +/* How many packets txeof tries to clean at a time */ > +static int ixgbe_tx_process_limit = 256; > +TUNABLE_INT("hw.ixgbe.tx_process_limit", &ixgbe_tx_process_limit); > +SYSCTL_INT(_hw_ix, OID_AUTO, tx_process_limit, CTLFLAG_RDTUN, > + &ixgbe_tx_process_limit, 0, > + "Maximum number of sent packets to process at a time," > + "-1 means unlimited"); > + > +/* > +** Smart speed setting, default to on > +** this only works as a compile option > +** right now as its during attach, set > +** this to 'ixgbe_smart_speed_off' to > +** disable. > +*/ > +static int ixgbe_smart_speed = ixgbe_smart_speed_on; > + > +/* > + * MSIX should be the default for best performance, > + * but this allows it to be forced off for testing. > + */ > +static int ixgbe_enable_msix = 1; > +SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, 0, > + "Enable MSI-X interrupts"); > + > +/* > + * Number of Queues, can be set to 0, > + * it then autoconfigures based on the > + * number of cpus with a max of 8. This > + * can be overriden manually here. > + */ > +static int ixgbe_num_queues = 0; > +SYSCTL_INT(_hw_ix, OID_AUTO, num_queues, CTLFLAG_RDTUN, &ixgbe_num_queues, 0, > + "Number of queues to configure, 0 indicates autoconfigure"); > + > +/* > +** Number of TX descriptors per ring, > +** setting higher than RX as this seems > +** the better performing choice. > +*/ > +static int ixgbe_txd = PERFORM_TXD; > +SYSCTL_INT(_hw_ix, OID_AUTO, txd, CTLFLAG_RDTUN, &ixgbe_txd, 0, > + "Number of transmit descriptors per queue"); > + > +/* Number of RX descriptors per ring */ > +static int ixgbe_rxd = PERFORM_RXD; > +SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, &ixgbe_rxd, 0, > + "Number of receive descriptors per queue"); > + > +/* > +** Defining this on will allow the use > +** of unsupported SFP+ modules, note that > +** doing so you are on your own :) > +*/ > +static int allow_unsupported_sfp = FALSE; > +TUNABLE_INT("hw.ix.unsupported_sfp", &allow_unsupported_sfp); > + > +/* Keep running tab on them for sanity check */ > +static int ixgbe_total_ports; > + > +#ifdef IXGBE_FDIR > +/* > +** Flow Director actually 'steals' > +** part of the packet buffer as its > +** filter pool, this variable controls > +** how much it uses: > +** 0 = 64K, 1 = 128K, 2 = 256K > +*/ > +static int fdir_pballoc = 1; > +#endif > + > +#ifdef DEV_NETMAP > +/* > + * The #ifdef DEV_NETMAP / #endif blocks in this file are meant to > + * be a reference on how to implement netmap support in a driver. > + * Additional comments are in ixgbe_netmap.h . > + * > + * contains functions for netmap support > + * that extend the standard driver. > + */ > +#include > +#endif /* DEV_NETMAP */ > + > +/********************************************************************* > + * Device identification routine > + * > + * ixgbe_probe determines if the driver should be loaded on > + * adapter based on PCI vendor/device id of the adapter. > + * > + * return BUS_PROBE_DEFAULT on success, positive on failure > + *********************************************************************/ > + > +static int > +ixgbe_probe(device_t dev) > +{ > + ixgbe_vendor_info_t *ent; > + > + u16 pci_vendor_id = 0; > + u16 pci_device_id = 0; > + u16 pci_subvendor_id = 0; > + u16 pci_subdevice_id = 0; > + char adapter_name[256]; > + > + INIT_DEBUGOUT("ixgbe_probe: begin"); > + > + pci_vendor_id = pci_get_vendor(dev); > + if (pci_vendor_id != IXGBE_INTEL_VENDOR_ID) > + return (ENXIO); > + > + pci_device_id = pci_get_device(dev); > + pci_subvendor_id = pci_get_subvendor(dev); > + pci_subdevice_id = pci_get_subdevice(dev); > + > + ent = ixgbe_vendor_info_array; > + while (ent->vendor_id != 0) { > + if ((pci_vendor_id == ent->vendor_id) && > + (pci_device_id == ent->device_id) && > + > + ((pci_subvendor_id == ent->subvendor_id) || > + (ent->subvendor_id == 0)) && > + > + ((pci_subdevice_id == ent->subdevice_id) || > + (ent->subdevice_id == 0))) { > + sprintf(adapter_name, "%s, Version - %s", > + ixgbe_strings[ent->index], > + ixgbe_driver_version); > + device_set_desc_copy(dev, adapter_name); > + ++ixgbe_total_ports; > + return (BUS_PROBE_DEFAULT); > + } > + ent++; > + } > + return (ENXIO); > +} > + > +/********************************************************************* > + * Device initialization routine > + * > + * The attach entry point is called when the driver is being loaded. > + * This routine identifies the type of hardware, allocates all resources > + * and initializes the hardware. > + * > + * return 0 on success, positive on failure > + *********************************************************************/ > + > +static int > +ixgbe_attach(device_t dev) > +{ > + struct adapter *adapter; > + struct ixgbe_hw *hw; > + int error = 0; > + u16 csum; > + u32 ctrl_ext; > + > + INIT_DEBUGOUT("ixgbe_attach: begin"); > + > + /* Allocate, clear, and link in our adapter structure */ > + adapter = device_get_softc(dev); > + adapter->dev = adapter->osdep.dev = dev; > + hw = &adapter->hw; > + > + /* Core Lock Init*/ > + IXGBE_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); > + > + /* SYSCTL APIs */ > + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > + OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW, > + adapter, 0, ixgbe_set_flowcntl, "I", IXGBE_SYSCTL_DESC_SET_FC); > + > + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), > + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > + OID_AUTO, "enable_aim", CTLFLAG_RW, > + &ixgbe_enable_aim, 1, "Interrupt Moderation"); > + > + /* > + ** Allow a kind of speed control by forcing the autoneg > + ** advertised speed list to only a certain value, this > + ** supports 1G on 82599 devices, and 100Mb on x540. > + */ > + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > + OID_AUTO, "advertise_speed", CTLTYPE_INT | CTLFLAG_RW, > + adapter, 0, ixgbe_set_advertise, "I", IXGBE_SYSCTL_DESC_ADV_SPEED); > + > + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), > + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), > + OID_AUTO, "ts", CTLTYPE_INT | CTLFLAG_RW, adapter, > + 0, ixgbe_set_thermal_test, "I", "Thermal Test"); > + > + /* Set up the timer callout */ > + callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0); > + > + /* Determine hardware revision */ > + ixgbe_identify_hardware(adapter); > + > + /* Do base PCI setup - map BAR0 */ > + if (ixgbe_allocate_pci_resources(adapter)) { > + device_printf(dev, "Allocation of PCI resources failed\n"); > + error = ENXIO; > + goto err_out; > + } > + > + /* Do descriptor calc and sanity checks */ > + if (((ixgbe_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 || > + ixgbe_txd < MIN_TXD || ixgbe_txd > MAX_TXD) { > + device_printf(dev, "TXD config issue, using default!\n"); > + adapter->num_tx_desc = DEFAULT_TXD; > + } else > + adapter->num_tx_desc = ixgbe_txd; > + > + /* > + ** With many RX rings it is easy to exceed the > + ** system mbuf allocation. Tuning nmbclusters > + ** can alleviate this. > + */ > + if (nmbclusters > 0) { > + int s; > + s = (ixgbe_rxd * adapter->num_queues) * ixgbe_total_ports; > + if (s > nmbclusters) { > + device_printf(dev, "RX Descriptors exceed " > + "system mbuf max, using default instead!\n"); > + ixgbe_rxd = DEFAULT_RXD; > + } > + } > + > + if (((ixgbe_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 || > + ixgbe_rxd < MIN_RXD || ixgbe_rxd > MAX_RXD) { > + device_printf(dev, "RXD config issue, using default!\n"); > + adapter->num_rx_desc = DEFAULT_RXD; > + } else > + adapter->num_rx_desc = ixgbe_rxd; > + > + /* Allocate our TX/RX Queues */ > + if (ixgbe_allocate_queues(adapter)) { > + error = ENOMEM; > + goto err_out; > + } > + > + /* Allocate multicast array memory. */ > + adapter->mta = malloc(sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * > + MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); > + if (adapter->mta == NULL) { > + device_printf(dev, "Can not allocate multicast setup array\n"); > + error = ENOMEM; > + goto err_late; > + } > + > + /* Initialize the shared code */ > + hw->allow_unsupported_sfp = allow_unsupported_sfp; > + error = ixgbe_init_shared_code(hw); > + if (error == IXGBE_ERR_SFP_NOT_PRESENT) { > + /* > + ** No optics in this port, set up > + ** so the timer routine will probe > + ** for later insertion. > + */ > + adapter->sfp_probe = TRUE; > + error = 0; > + } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) { > + device_printf(dev,"Unsupported SFP+ module detected!\n"); > + error = EIO; > + goto err_late; > + } else if (error) { > + device_printf(dev,"Unable to initialize the shared code\n"); > + error = EIO; > + goto err_late; > + } > + > + /* Make sure we have a good EEPROM before we read from it */ > + if (ixgbe_validate_eeprom_checksum(&adapter->hw, &csum) < 0) { > + device_printf(dev,"The EEPROM Checksum Is Not Valid\n"); > + error = EIO; > + goto err_late; > + } > + > + error = ixgbe_init_hw(hw); > + switch (error) { > + case IXGBE_ERR_EEPROM_VERSION: > + device_printf(dev, "This device is a pre-production adapter/" > + "LOM. Please be aware there may be issues associated " > + "with your hardware.\n If you are experiencing problems " > + "please contact your Intel or hardware representative " > + "who provided you with this hardware.\n"); > + break; > + case IXGBE_ERR_SFP_NOT_SUPPORTED: > + device_printf(dev,"Unsupported SFP+ Module\n"); > + error = EIO; > + goto err_late; > + case IXGBE_ERR_SFP_NOT_PRESENT: > + device_printf(dev,"No SFP+ Module found\n"); > + /* falls thru */ > + default: > + break; > + } > + > + /* Detect and set physical type */ > + ixgbe_setup_optics(adapter); > + > + if ((adapter->msix > 1) && (ixgbe_enable_msix)) > + error = ixgbe_allocate_msix(adapter); > + else > + error = ixgbe_allocate_legacy(adapter); > + if (error) > + goto err_late; > + > + /* Setup OS specific network interface */ > + if (ixgbe_setup_interface(dev, adapter) != 0) > + goto err_late; > + > + /* Initialize statistics */ > + ixgbe_update_stats_counters(adapter); > + > + /* Register for VLAN events */ > + adapter->vlan_attach = EVENTHANDLER_REGISTER(vlan_config, > + ixgbe_register_vlan, adapter, EVENTHANDLER_PRI_FIRST); > + adapter->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, > + ixgbe_unregister_vlan, adapter, EVENTHANDLER_PRI_FIRST); > + > + /* > + ** Check PCIE slot type/speed/width > + */ > + ixgbe_get_slot_info(hw); > + > + > + /* Set an initial default flow control value */ > + adapter->fc = ixgbe_fc_full; > + > + /* let hardware know driver is loaded */ > + ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); > + ctrl_ext |= IXGBE_CTRL_EXT_DRV_LOAD; > + IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); > + > + ixgbe_add_hw_stats(adapter); > + > +#ifdef DEV_NETMAP > + ixgbe_netmap_attach(adapter); > +#endif /* DEV_NETMAP */ > + INIT_DEBUGOUT("ixgbe_attach: end"); > + return (0); > + > +err_late: > + ixgbe_free_transmit_structures(adapter); > + ixgbe_free_receive_structures(adapter); > +err_out: > + if (adapter->ifp != NULL) > + if_free(adapter->ifp); > + ixgbe_free_pci_resources(adapter); > + free(adapter->mta, M_DEVBUF); > + return (error); > +} > + > +/********************************************************************* > + * Device removal routine > + * > + * The detach entry point is called when the driver is being removed. > + * This routine stops the adapter and deallocates all the resources > + * that were allocated for driver operation. > + * > + * return 0 on success, positive on failure > + *********************************************************************/ > + > +static int > +ixgbe_detach(device_t dev) > +{ > + struct adapter *adapter = device_get_softc(dev); > + struct ix_queue *que = adapter->queues; > + struct tx_ring *txr = adapter->tx_rings; > + u32 ctrl_ext; > + > + INIT_DEBUGOUT("ixgbe_detach: begin"); > + > + /* Make sure VLANS are not using driver */ > + if (adapter->ifp->if_vlantrunk != NULL) { > + device_printf(dev,"Vlan in use, detach first\n"); > + return (EBUSY); > + } > + > + IXGBE_CORE_LOCK(adapter); > + ixgbe_stop(adapter); > + IXGBE_CORE_UNLOCK(adapter); > + > + for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { > + if (que->tq) { > +#ifndef IXGBE_LEGACY_TX > + taskqueue_drain(que->tq, &txr->txq_task); > +#endif > + taskqueue_drain(que->tq, &que->que_task); > + taskqueue_free(que->tq); > + } > + } > + > + /* Drain the Link queue */ > + if (adapter->tq) { > + taskqueue_drain(adapter->tq, &adapter->link_task); > + taskqueue_drain(adapter->tq, &adapter->mod_task); > + taskqueue_drain(adapter->tq, &adapter->msf_task); > +#ifdef IXGBE_FDIR > + taskqueue_drain(adapter->tq, &adapter->fdir_task); > +#endif > + taskqueue_free(adapter->tq); > + } > + > + /* let hardware know driver is unloading */ > + ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT); > + ctrl_ext &= ~IXGBE_CTRL_EXT_DRV_LOAD; > + IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT, ctrl_ext); > + > + /* Unregister VLAN events */ > + if (adapter->vlan_attach != NULL) > + EVENTHANDLER_DEREGISTER(vlan_config, adapter->vlan_attach); > + if (adapter->vlan_detach != NULL) > + EVENTHANDLER_DEREGISTER(vlan_unconfig, adapter->vlan_detach); > + > + ether_ifdetach(adapter->ifp); > + callout_drain(&adapter->timer); > +#ifdef DEV_NETMAP > + netmap_detach(adapter->ifp); > +#endif /* DEV_NETMAP */ > + ixgbe_free_pci_resources(adapter); > + bus_generic_detach(dev); > + if_free(adapter->ifp); > + > + ixgbe_free_transmit_structures(adapter); > + ixgbe_free_receive_structures(adapter); > + free(adapter->mta, M_DEVBUF); > + > + IXGBE_CORE_LOCK_DESTROY(adapter); > + return (0); > +} > + > +/********************************************************************* > + * > + * Shutdown entry point > + * > + **********************************************************************/ > + > +static int > +ixgbe_shutdown(device_t dev) > +{ > + struct adapter *adapter = device_get_softc(dev); > + IXGBE_CORE_LOCK(adapter); > + ixgbe_stop(adapter); > + IXGBE_CORE_UNLOCK(adapter); > + return (0); > +} > + > + > +/********************************************************************* > + * Ioctl entry point > + * > + * ixgbe_ioctl is called when the user wants to configure the > + * interface. > + * > + * return 0 on success, positive on failure > + **********************************************************************/ > + > +static int > +ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) > +{ > + struct adapter *adapter = ifp->if_softc; > + struct ifreq *ifr = (struct ifreq *) data; > +#if defined(INET) || defined(INET6) > + struct ifaddr *ifa = (struct ifaddr *)data; > + bool avoid_reset = FALSE; > +#endif > + int error = 0; > + > + switch (command) { > + > + case SIOCSIFADDR: > +#ifdef INET > + if (ifa->ifa_addr->sa_family == AF_INET) > + avoid_reset = TRUE; > +#endif > +#ifdef INET6 > + if (ifa->ifa_addr->sa_family == AF_INET6) > + avoid_reset = TRUE; > +#endif > +#if defined(INET) || defined(INET6) > + /* > + ** Calling init results in link renegotiation, > + ** so we avoid doing it when possible. > + */ > + if (avoid_reset) { > + ifp->if_flags |= IFF_UP; > + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) > + ixgbe_init(adapter); > + if (!(ifp->if_flags & IFF_NOARP)) > + arp_ifinit(ifp, ifa); > + } else > + error = ether_ioctl(ifp, command, data); > +#endif > + break; > + case SIOCSIFMTU: > + IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)"); > + if (ifr->ifr_mtu > IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) { > + error = EINVAL; > + } else { > + IXGBE_CORE_LOCK(adapter); > + ifp->if_mtu = ifr->ifr_mtu; > + adapter->max_frame_size = > + ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; > + ixgbe_init_locked(adapter); > + IXGBE_CORE_UNLOCK(adapter); > + } > + break; > + case SIOCSIFFLAGS: > + IOCTL_DEBUGOUT("ioctl: SIOCSIFFLAGS (Set Interface Flags)"); > + IXGBE_CORE_LOCK(adapter); > + if (ifp->if_flags & IFF_UP) { > + if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { > + if ((ifp->if_flags ^ adapter->if_flags) & > + (IFF_PROMISC | IFF_ALLMULTI)) { > + ixgbe_set_promisc(adapter); > + } > + } else > + ixgbe_init_locked(adapter); > + } else > + if (ifp->if_drv_flags & IFF_DRV_RUNNING) > + ixgbe_stop(adapter); > + adapter->if_flags = ifp->if_flags; > + IXGBE_CORE_UNLOCK(adapter); > + break; > + case SIOCADDMULTI: > + case SIOCDELMULTI: > + IOCTL_DEBUGOUT("ioctl: SIOC(ADD|DEL)MULTI"); > + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { > + IXGBE_CORE_LOCK(adapter); > + ixgbe_disable_intr(adapter); > + ixgbe_set_multi(adapter); > + ixgbe_enable_intr(adapter); > + IXGBE_CORE_UNLOCK(adapter); > + } > + break; > + case SIOCSIFMEDIA: > + case SIOCGIFMEDIA: > + IOCTL_DEBUGOUT("ioctl: SIOCxIFMEDIA (Get/Set Interface Media)"); > + error = ifmedia_ioctl(ifp, ifr, &adapter->media, command); > + break; > + case SIOCSIFCAP: > + { > + int mask = ifr->ifr_reqcap ^ ifp->if_capenable; > + IOCTL_DEBUGOUT("ioctl: SIOCSIFCAP (Set Capabilities)"); > + if (mask & IFCAP_HWCSUM) > + ifp->if_capenable ^= IFCAP_HWCSUM; > + if (mask & IFCAP_TSO4) > + ifp->if_capenable ^= IFCAP_TSO4; > + if (mask & IFCAP_TSO6) > + ifp->if_capenable ^= IFCAP_TSO6; > + if (mask & IFCAP_LRO) > + ifp->if_capenable ^= IFCAP_LRO; > + if (mask & IFCAP_VLAN_HWTAGGING) > + ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; > + if (mask & IFCAP_VLAN_HWFILTER) > + ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; > + if (mask & IFCAP_VLAN_HWTSO) > + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; > + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { > + IXGBE_CORE_LOCK(adapter); > + ixgbe_init_locked(adapter); > + IXGBE_CORE_UNLOCK(adapter); > + } > + VLAN_CAPABILITIES(ifp); > + break; > + } > +#if __FreeBSD_version >= 1100036 > + case SIOCGI2C: > + { > + struct ixgbe_hw *hw = &adapter->hw; > + struct ifi2creq i2c; > + int i; > + IOCTL_DEBUGOUT("ioctl: SIOCGI2C (Get I2C Data)"); > + error = copyin(ifr->ifr_data, &i2c, sizeof(i2c)); > + if (error != 0) > + break; > + if (i2c.dev_addr != 0xA0 && i2c.dev_addr != 0xA2) { > + error = EINVAL; > + break; > + } > + if (i2c.len > sizeof(i2c.data)) { > + error = EINVAL; > + break; > + } > + > + for (i = 0; i < i2c.len; i++) > + hw->phy.ops.read_i2c_byte(hw, i2c.offset + i, > + i2c.dev_addr, &i2c.data[i]); > + error = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); > + break; > + } > +#endif > + default: > + IOCTL_DEBUGOUT1("ioctl: UNKNOWN (0x%X)\n", (int)command); > + error = ether_ioctl(ifp, command, data); > + break; > + } > + > + return (error); > +} > + > +/********************************************************************* > + * Init entry point > + * > + * This routine is used in two ways. It is used by the stack as > + * init entry point in network interface structure. It is also used > + * by the driver as a hw/sw initialization routine to get to a > + * consistent state. > + * > + * return 0 on success, positive on failure > + **********************************************************************/ > +#define IXGBE_MHADD_MFS_SHIFT 16 > + > +static void > +ixgbe_init_locked(struct adapter *adapter) > +{ > + struct ifnet *ifp = adapter->ifp; > + device_t dev = adapter->dev; > + struct ixgbe_hw *hw = &adapter->hw; > + u32 k, txdctl, mhadd, gpie; > + u32 rxdctl, rxctrl; > + > + mtx_assert(&adapter->core_mtx, MA_OWNED); > + INIT_DEBUGOUT("ixgbe_init_locked: begin"); > + hw->adapter_stopped = FALSE; > + ixgbe_stop_adapter(hw); > + callout_stop(&adapter->timer); > + > + /* reprogram the RAR[0] in case user changed it. */ > + ixgbe_set_rar(hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV); > + > + /* Get the latest mac address, User can use a LAA */ > + bcopy(IF_LLADDR(adapter->ifp), hw->mac.addr, > + IXGBE_ETH_LENGTH_OF_ADDRESS); > + ixgbe_set_rar(hw, 0, hw->mac.addr, 0, 1); > + hw->addr_ctrl.rar_used_count = 1; > + > + /* Set the various hardware offload abilities */ > + ifp->if_hwassist = 0; > + if (ifp->if_capenable & IFCAP_TSO) > + ifp->if_hwassist |= CSUM_TSO; > + if (ifp->if_capenable & IFCAP_TXCSUM) { > + ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); > +#if __FreeBSD_version >= 800000 > + if (hw->mac.type != ixgbe_mac_82598EB) > + ifp->if_hwassist |= CSUM_SCTP; > +#endif > + } > + > + /* Prepare transmit descriptors and buffers */ > + if (ixgbe_setup_transmit_structures(adapter)) { > + device_printf(dev,"Could not setup transmit structures\n"); > + ixgbe_stop(adapter); > + return; > + } > + > + ixgbe_init_hw(hw); > + ixgbe_initialize_transmit_units(adapter); > + > + /* Setup Multicast table */ > + ixgbe_set_multi(adapter); > + > + /* > + ** Determine the correct mbuf pool > + ** for doing jumbo frames > + */ > + if (adapter->max_frame_size <= 2048) > + adapter->rx_mbuf_sz = MCLBYTES; > + else if (adapter->max_frame_size <= 4096) > + adapter->rx_mbuf_sz = MJUMPAGESIZE; > + else if (adapter->max_frame_size <= 9216) > + adapter->rx_mbuf_sz = MJUM9BYTES; > + else > + adapter->rx_mbuf_sz = MJUM16BYTES; > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 15: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 8A1CFD4; Wed, 18 Mar 2015 15:25:18 +0000 (UTC) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2A8BAF2; Wed, 18 Mar 2015 15:25:17 +0000 (UTC) Received: by wggv3 with SMTP id v3so38341719wgg.1; Wed, 18 Mar 2015 08:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=f+fx5z731PGLMSCzY1TvPMgGhaSeATn+B+/8eYnAVug=; b=KNw5EP3YUdvIzCICVgZ6hgFbz+K80yzRM6x37C1TVO6yGgZ5+KX3WI8dkv6JwmmX2b yPfhm++j1QxO3tN0JpWortceUlG8rrRVfkLZUlH0N8jPj+o4pkZt2Qki9svNRftJwgmo v2+yyUQO6ko4ITfhmlTbkrBkPlwBu5CrlGy7Q3UBlAImUOU3Y6aLKNST4SMFQnVd+Z06 zF4Y8dJv3FF0Az7m/cy60+jMXfbWWRSS612J8SPboZWPFpJYyFPqXsgPi5Yq+UIvLSOb jlDfvaDEUaX5d82/Ya58ua+dmSDgR7b6F8/6l9Wuur99Yg2Dd5dGh2qnoAQDXcbqmkoB swMA== MIME-Version: 1.0 X-Received: by 10.194.85.233 with SMTP id k9mr76405624wjz.31.1426692315795; Wed, 18 Mar 2015 08:25:15 -0700 (PDT) Received: by 10.194.162.103 with HTTP; Wed, 18 Mar 2015 08:25:15 -0700 (PDT) In-Reply-To: <550997C6.1010209@freebsd.org> References: <201503171832.t2HIWTu6039113@svn.freebsd.org> <550997C6.1010209@freebsd.org> Date: Wed, 18 Mar 2015 08:25:15 -0700 Message-ID: Subject: Re: svn commit: r280182 - in head/sys: amd64/conf conf dev/ixgbe modules/ix modules/ixgbe modules/ixv From: Jack Vogel To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Jack F Vogel , "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: Wed, 18 Mar 2015 15:25:18 -0000 OK, thanks for pointing that out, I'll include them. On Wed, Mar 18, 2015 at 8:20 AM, Nathan Whitehorn wrote: > > > On 03/17/15 11:32, Jack F Vogel wrote: > >> Author: jfv >> Date: Tue Mar 17 18:32:28 2015 >> New Revision: 280182 >> URL: https://svnweb.freebsd.org/changeset/base/280182 >> >> Log: >> Update to the Intel ixgbe driver: >> - Split the driver into independent pf and vf loadables. This is >> in preparation for SRIOV support which will be following >> shortly. >> This also allows us to keep a seperate revision control over the >> two parts, making for easier sustaining. >> - Make the TX/RX code a shared/seperated file, in the old code >> base >> the ixv code would miss fixes that went into ixgbe, this model >> will eliminate that problem. >> - The driver loadables will now match the device names, something >> that >> has been requested for some time. >> - Rather than a modules/ixgbe there is now modules/ix and >> modules/ixv >> - It will also be possible to make your static kernel with only >> one >> or the other for streamlined installs, or both. >> Enjoy! >> Submitted by: jfv and erj >> >> Added: >> head/sys/dev/ixgbe/if_ix.c (contents, props changed) >> head/sys/dev/ixgbe/if_ixv.c (contents, props changed) >> head/sys/dev/ixgbe/ix_txrx.c (contents, props changed) >> head/sys/modules/ix/ >> head/sys/modules/ix/Makefile (contents, props changed) >> head/sys/modules/ixv/ >> head/sys/modules/ixv/Makefile (contents, props changed) >> Deleted: >> head/sys/dev/ixgbe/ixgbe.c >> head/sys/dev/ixgbe/ixv.c >> head/sys/dev/ixgbe/ixv.h >> head/sys/modules/ixgbe/ >> Modified: >> head/sys/amd64/conf/GENERIC >> > > Note that the mips OCTEON1 and PowerPC GENERIC64 config files also need to > be changed here and are currently unbuildable. > -Nathan > > > head/sys/conf/NOTES >> head/sys/conf/files >> head/sys/dev/ixgbe/LICENSE >> head/sys/dev/ixgbe/ixgbe.h >> head/sys/dev/ixgbe/ixgbe_82598.c >> head/sys/dev/ixgbe/ixgbe_82598.h >> head/sys/dev/ixgbe/ixgbe_82599.c >> head/sys/dev/ixgbe/ixgbe_82599.h >> head/sys/dev/ixgbe/ixgbe_api.c >> head/sys/dev/ixgbe/ixgbe_api.h >> head/sys/dev/ixgbe/ixgbe_common.c >> head/sys/dev/ixgbe/ixgbe_common.h >> head/sys/dev/ixgbe/ixgbe_dcb.c >> head/sys/dev/ixgbe/ixgbe_dcb.h >> head/sys/dev/ixgbe/ixgbe_dcb_82598.c >> head/sys/dev/ixgbe/ixgbe_dcb_82598.h >> head/sys/dev/ixgbe/ixgbe_dcb_82599.c >> head/sys/dev/ixgbe/ixgbe_dcb_82599.h >> head/sys/dev/ixgbe/ixgbe_mbx.c >> head/sys/dev/ixgbe/ixgbe_mbx.h >> head/sys/dev/ixgbe/ixgbe_phy.c >> head/sys/dev/ixgbe/ixgbe_phy.h >> head/sys/dev/ixgbe/ixgbe_type.h >> head/sys/dev/ixgbe/ixgbe_vf.c >> head/sys/dev/ixgbe/ixgbe_vf.h >> head/sys/dev/ixgbe/ixgbe_x540.c >> head/sys/dev/ixgbe/ixgbe_x540.h >> >> Modified: head/sys/amd64/conf/GENERIC >> ============================================================ >> ================== >> --- head/sys/amd64/conf/GENERIC Tue Mar 17 15:48:19 2015 (r280181) >> +++ head/sys/amd64/conf/GENERIC Tue Mar 17 18:32:28 2015 (r280182) >> @@ -216,7 +216,8 @@ device bxe # >> Broadcom NetXtreme II BC >> device de # DEC/Intel DC21x4x >> (``Tulip'') >> device em # Intel PRO/1000 Gigabit >> Ethernet Family >> device igb # Intel PRO/1000 PCIE >> Server Gigabit Family >> -device ixgbe # Intel PRO/10GbE PCIE Ethernet >> Family >> +device ix # Intel PRO/10GbE PCIE PF Ethernet >> +device ixv # Intel PRO/10GbE PCIE VF Ethernet >> device ixl # Intel XL710 40Gbe PCIE >> Ethernet >> device ixlv # Intel XL710 40Gbe VF >> PCIE Ethernet >> device le # AMD Am7900 LANCE and >> Am79C9xx PCnet >> >> Modified: head/sys/conf/NOTES >> ============================================================ >> ================== >> --- head/sys/conf/NOTES Tue Mar 17 15:48:19 2015 (r280181) >> +++ head/sys/conf/NOTES Tue Mar 17 18:32:28 2015 (r280182) >> @@ -2100,7 +2100,8 @@ device de # DEC/Intel >> DC21x4x (``Tulip >> device em # Intel Pro/1000 Gigabit Ethernet >> device igb # Intel Pro/1000 PCIE Gigabit >> Ethernet >> device ixgb # Intel Pro/10Gbe PCI-X Ethernet >> -device ixgbe # Intel Pro/10Gbe PCIE Ethernet >> +device ix # Intel Pro/10Gbe PCIE Ethernet >> +device ixv # Intel Pro/10Gbe PCIE Ethernet VF >> device le # AMD Am7900 LANCE and Am79C9xx >> PCnet >> device mxge # Myricom Myri-10G 10GbE NIC >> device nxge # Neterion Xframe 10GbE >> Server/Storage Adapter >> >> Modified: head/sys/conf/files >> ============================================================ >> ================== >> --- head/sys/conf/files Tue Mar 17 15:48:19 2015 (r280181) >> +++ head/sys/conf/files Tue Mar 17 18:32:28 2015 (r280182) >> @@ -1769,31 +1769,31 @@ iwn6050.fw optional >> iwn6050fw | iwnfw >> dev/ixgb/if_ixgb.c optional ixgb >> dev/ixgb/ixgb_ee.c optional ixgb >> dev/ixgb/ixgb_hw.c optional ixgb >> -dev/ixgbe/ixgbe.c optional ixgbe inet \ >> +dev/ixgbe/if_ix.c optional ix inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" >> -dev/ixgbe/ixv.c optional ixgbe inet \ >> - compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_phy.c optional ixgbe inet \ >> +dev/ixgbe/if_ixv.c optional ixv inet \ >> + compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" >> +dev/ixgbe/ixgbe_phy.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_api.c optional ixgbe inet \ >> +dev/ixgbe/ixgbe_api.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_common.c optional ixgbe inet \ >> +dev/ixgbe/ixgbe_common.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_mbx.c optional ixgbe inet \ >> +dev/ixgbe/ixgbe_mbx.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_vf.c optional ixgbe inet \ >> +dev/ixgbe/ixgbe_vf.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_82598.c optional ixgbe inet \ >> +dev/ixgbe/ixgbe_82598.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_82599.c optional ixgbe inet \ >> +dev/ixgbe/ixgbe_82599.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_x540.c optional ixgbe inet \ >> +dev/ixgbe/ixgbe_x540.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_dcb.c optional ixgbe inet \ >> +dev/ixgbe/ixgbe_dcb.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_dcb_82598.c optional ixgbe inet \ >> +dev/ixgbe/ixgbe_dcb_82598.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> -dev/ixgbe/ixgbe_dcb_82599.c optional ixgbe inet \ >> +dev/ixgbe/ixgbe_dcb_82599.c optional ix ixv inet \ >> compile-with "${NORMAL_C} -I$S/dev/ixgbe" >> dev/jme/if_jme.c optional jme pci >> dev/joy/joy.c optional joy >> >> Modified: head/sys/dev/ixgbe/LICENSE >> ============================================================ >> ================== >> --- head/sys/dev/ixgbe/LICENSE Tue Mar 17 15:48:19 2015 (r280181) >> +++ head/sys/dev/ixgbe/LICENSE Tue Mar 17 18:32:28 2015 (r280182) >> @@ -1,6 +1,6 @@ >> /*********************************************************** >> ******************* >> - Copyright (c) 2001-2013, Intel Corporation >> + Copyright (c) 2001-2015, Intel Corporation >> All rights reserved. >> Redistribution and use in source and binary forms, with or without >> >> Added: head/sys/dev/ixgbe/if_ix.c >> ============================================================ >> ================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sys/dev/ixgbe/if_ix.c Tue Mar 17 18:32:28 2015 (r280182) >> @@ -0,0 +1,4163 @@ >> +/********************************************************** >> ******************** >> + >> + Copyright (c) 2001-2015, Intel Corporation >> + All rights reserved. >> + >> + Redistribution and use in source and binary forms, with or without >> + modification, are permitted provided that the following conditions are >> met: >> + >> + 1. Redistributions of source code must retain the above copyright >> notice, >> + this list of conditions and the following disclaimer. >> + >> + 2. Redistributions in binary form must reproduce the above copyright >> + notice, this list of conditions and the following disclaimer in the >> + documentation and/or other materials provided with the >> distribution. >> + >> + 3. Neither the name of the Intel Corporation nor the names of its >> + contributors may be used to endorse or promote products derived >> from >> + this software without specific prior written permission. >> + >> + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >> "AS IS" >> + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >> THE >> + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >> PURPOSE >> + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS >> BE >> + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >> + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >> + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR >> BUSINESS >> + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >> + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >> + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >> THE >> + POSSIBILITY OF SUCH DAMAGE. >> + >> +*********************************************************** >> *******************/ >> +/*$FreeBSD$*/ >> + >> + >> +#ifndef IXGBE_STANDALONE_BUILD >> +#include "opt_inet.h" >> +#include "opt_inet6.h" >> +#include "opt_rss.h" >> +#endif >> + >> +#include "ixgbe.h" >> + >> +#ifdef RSS >> +#include >> +#endif >> + >> +/********************************************************************* >> + * Set this to one to display debug statistics >> + *********************************************************************/ >> +int ixgbe_display_debug_stats = 0; >> + >> +/********************************************************************* >> + * Driver version >> + *********************************************************************/ >> +char ixgbe_driver_version[] = "2.7.4"; >> + >> +/********************************************************************* >> + * PCI Device ID Table >> + * >> + * Used by probe to select devices to load on >> + * Last field stores an index into ixgbe_strings >> + * Last entry must be all 0s >> + * >> + * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, String Index } >> + *********************************************************************/ >> + >> +static ixgbe_vendor_info_t ixgbe_vendor_info_array[] = >> +{ >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, 0, 0, >> 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, 0, 0, >> 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, 0, 0, >> 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, 0, >> 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, >> 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, 0, 0, >> 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4, 0, 0, 0}, >> + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T, 0, 0, 0}, >> + /* required last entry */ >> + {0, 0, 0, 0, 0} >> +}; >> + >> +/********************************************************************* >> + * Table of branding strings >> + *********************************************************************/ >> + >> +static char *ixgbe_strings[] = { >> + "Intel(R) PRO/10GbE PCI-Express Network Driver" >> +}; >> + >> +/********************************************************************* >> + * Function prototypes >> + *********************************************************************/ >> +static int ixgbe_probe(device_t); >> +static int ixgbe_attach(device_t); >> +static int ixgbe_detach(device_t); >> +static int ixgbe_shutdown(device_t); >> +static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); >> +static void ixgbe_init(void *); >> +static void ixgbe_init_locked(struct adapter *); >> +static void ixgbe_stop(void *); >> +#if __FreeBSD_version >= 1100036 >> +static uint64_t ixgbe_get_counter(struct ifnet *, ift_counter); >> +#endif >> +static void ixgbe_add_media_types(struct adapter *); >> +static void ixgbe_media_status(struct ifnet *, struct ifmediareq *); >> +static int ixgbe_media_change(struct ifnet *); >> +static void ixgbe_identify_hardware(struct adapter *); >> +static int ixgbe_allocate_pci_resources(struct adapter *); >> +static void ixgbe_get_slot_info(struct ixgbe_hw *); >> +static int ixgbe_allocate_msix(struct adapter *); >> +static int ixgbe_allocate_legacy(struct adapter *); >> +static int ixgbe_setup_msix(struct adapter *); >> +static void ixgbe_free_pci_resources(struct adapter *); >> +static void ixgbe_local_timer(void *); >> +static int ixgbe_setup_interface(device_t, struct adapter *); >> +static void ixgbe_config_link(struct adapter *); >> +static void ixgbe_rearm_queues(struct adapter *, u64); >> + >> +static void ixgbe_initialize_transmit_units(struct adapter *); >> +static void ixgbe_initialize_receive_units(struct adapter *); >> +static void ixgbe_enable_rx_drop(struct adapter *); >> +static void ixgbe_disable_rx_drop(struct adapter *); >> + >> +static void ixgbe_enable_intr(struct adapter *); >> +static void ixgbe_disable_intr(struct adapter *); >> +static void ixgbe_update_stats_counters(struct adapter *); >> +static void ixgbe_set_promisc(struct adapter *); >> +static void ixgbe_set_multi(struct adapter *); >> +static void ixgbe_update_link_status(struct adapter *); >> +static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS); >> +static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS); >> +static int ixgbe_set_thermal_test(SYSCTL_HANDLER_ARGS); >> +static void ixgbe_set_ivar(struct adapter *, u8, u8, s8); >> +static void ixgbe_configure_ivars(struct adapter *); >> +static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *, u8 **, u32 *); >> + >> +static void ixgbe_setup_vlan_hw_support(struct adapter *); >> +static void ixgbe_register_vlan(void *, struct ifnet *, u16); >> +static void ixgbe_unregister_vlan(void *, struct ifnet *, u16); >> + >> +static void ixgbe_add_hw_stats(struct adapter *adapter); >> + >> +/* Support for pluggable optic modules */ >> +static bool ixgbe_sfp_probe(struct adapter *); >> +static void ixgbe_setup_optics(struct adapter *); >> + >> +/* Legacy (single vector interrupt handler */ >> +static void ixgbe_legacy_irq(void *); >> + >> +/* The MSI/X Interrupt handlers */ >> +static void ixgbe_msix_que(void *); >> +static void ixgbe_msix_link(void *); >> + >> +/* Deferred interrupt tasklets */ >> +static void ixgbe_handle_que(void *, int); >> +static void ixgbe_handle_link(void *, int); >> +static void ixgbe_handle_msf(void *, int); >> +static void ixgbe_handle_mod(void *, int); >> + >> +#ifdef IXGBE_FDIR >> +static void ixgbe_reinit_fdir(void *, int); >> +#endif >> + >> + >> +/* Missing shared code prototype */ >> +extern void ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw); >> + >> +/********************************************************************* >> + * FreeBSD Device Interface Entry Points >> + *********************************************************************/ >> + >> +static device_method_t ixgbe_methods[] = { >> + /* Device interface */ >> + DEVMETHOD(device_probe, ixgbe_probe), >> + DEVMETHOD(device_attach, ixgbe_attach), >> + DEVMETHOD(device_detach, ixgbe_detach), >> + DEVMETHOD(device_shutdown, ixgbe_shutdown), >> + DEVMETHOD_END >> +}; >> + >> +static driver_t ixgbe_driver = { >> + "ix", ixgbe_methods, sizeof(struct adapter), >> +}; >> + >> +devclass_t ixgbe_devclass; >> +DRIVER_MODULE(ixgbe, pci, ixgbe_driver, ixgbe_devclass, 0, 0); >> + >> +MODULE_DEPEND(ixgbe, pci, 1, 1, 1); >> +MODULE_DEPEND(ixgbe, ether, 1, 1, 1); >> + >> +/* >> +** TUNEABLE PARAMETERS: >> +*/ >> + >> +static SYSCTL_NODE(_hw, OID_AUTO, ix, CTLFLAG_RD, 0, >> + "IXGBE driver parameters"); >> + >> +/* >> +** AIM: Adaptive Interrupt Moderation >> +** which means that the interrupt rate >> +** is varied over time based on the >> +** traffic for that interrupt vector >> +*/ >> +static int ixgbe_enable_aim = TRUE; >> +SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RWTUN, >> &ixgbe_enable_aim, 0, >> + "Enable adaptive interrupt moderation"); >> + >> +static int ixgbe_max_interrupt_rate = (4000000 / IXGBE_LOW_LATENCY); >> +SYSCTL_INT(_hw_ix, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, >> + &ixgbe_max_interrupt_rate, 0, "Maximum interrupts per second"); >> + >> +/* How many packets rxeof tries to clean at a time */ >> +static int ixgbe_rx_process_limit = 256; >> +TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit); >> +SYSCTL_INT(_hw_ix, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, >> + &ixgbe_rx_process_limit, 0, >> + "Maximum number of received packets to process at a time," >> + "-1 means unlimited"); >> + >> +/* How many packets txeof tries to clean at a time */ >> +static int ixgbe_tx_process_limit = 256; >> +TUNABLE_INT("hw.ixgbe.tx_process_limit", &ixgbe_tx_process_limit); >> +SYSCTL_INT(_hw_ix, OID_AUTO, tx_process_limit, CTLFLAG_RDTUN, >> + &ixgbe_tx_process_limit, 0, >> + "Maximum number of sent packets to process at a time," >> + "-1 means unlimited"); >> + >> +/* >> +** Smart speed setting, default to on >> +** this only works as a compile option >> +** right now as its during attach, set >> +** this to 'ixgbe_smart_speed_off' to >> +** disable. >> +*/ >> +static int ixgbe_smart_speed = ixgbe_smart_speed_on; >> + >> +/* >> + * MSIX should be the default for best performance, >> + * but this allows it to be forced off for testing. >> + */ >> +static int ixgbe_enable_msix = 1; >> +SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, >> &ixgbe_enable_msix, 0, >> + "Enable MSI-X interrupts"); >> + >> +/* >> + * Number of Queues, can be set to 0, >> + * it then autoconfigures based on the >> + * number of cpus with a max of 8. This >> + * can be overriden manually here. >> + */ >> +static int ixgbe_num_queues = 0; >> +SYSCTL_INT(_hw_ix, OID_AUTO, num_queues, CTLFLAG_RDTUN, >> &ixgbe_num_queues, 0, >> + "Number of queues to configure, 0 indicates autoconfigure"); >> + >> +/* >> +** Number of TX descriptors per ring, >> +** setting higher than RX as this seems >> +** the better performing choice. >> +*/ >> +static int ixgbe_txd = PERFORM_TXD; >> +SYSCTL_INT(_hw_ix, OID_AUTO, txd, CTLFLAG_RDTUN, &ixgbe_txd, 0, >> + "Number of transmit descriptors per queue"); >> + >> +/* Number of RX descriptors per ring */ >> +static int ixgbe_rxd = PERFORM_RXD; >> +SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, &ixgbe_rxd, 0, >> + "Number of receive descriptors per queue"); >> + >> +/* >> +** Defining this on will allow the use >> +** of unsupported SFP+ modules, note that >> +** doing so you are on your own :) >> +*/ >> +static int allow_unsupported_sfp = FALSE; >> +TUNABLE_INT("hw.ix.unsupported_sfp", &allow_unsupported_sfp); >> + >> +/* Keep running tab on them for sanity check */ >> +static int ixgbe_total_ports; >> + >> +#ifdef IXGBE_FDIR >> +/* >> +** Flow Director actually 'steals' >> +** part of the packet buffer as its >> +** filter pool, this variable controls >> +** how much it uses: >> +** 0 = 64K, 1 = 128K, 2 = 256K >> +*/ >> +static int fdir_pballoc = 1; >> +#endif >> + >> +#ifdef DEV_NETMAP >> +/* >> + * The #ifdef DEV_NETMAP / #endif blocks in this file are meant to >> + * be a reference on how to implement netmap support in a driver. >> + * Additional comments are in ixgbe_netmap.h . >> + * >> + * contains functions for netmap support >> + * that extend the standard driver. >> + */ >> +#include >> +#endif /* DEV_NETMAP */ >> + >> +/********************************************************************* >> + * Device identification routine >> + * >> + * ixgbe_probe determines if the driver should be loaded on >> + * adapter based on PCI vendor/device id of the adapter. >> + * >> + * return BUS_PROBE_DEFAULT on success, positive on failure >> + *********************************************************************/ >> + >> +static int >> +ixgbe_probe(device_t dev) >> +{ >> + ixgbe_vendor_info_t *ent; >> + >> + u16 pci_vendor_id = 0; >> + u16 pci_device_id = 0; >> + u16 pci_subvendor_id = 0; >> + u16 pci_subdevice_id = 0; >> + char adapter_name[256]; >> + >> + INIT_DEBUGOUT("ixgbe_probe: begin"); >> + >> + pci_vendor_id = pci_get_vendor(dev); >> + if (pci_vendor_id != IXGBE_INTEL_VENDOR_ID) >> + return (ENXIO); >> + >> + pci_device_id = pci_get_device(dev); >> + pci_subvendor_id = pci_get_subvendor(dev); >> + pci_subdevice_id = pci_get_subdevice(dev); >> + >> + ent = ixgbe_vendor_info_array; >> + while (ent->vendor_id != 0) { >> + if ((pci_vendor_id == ent->vendor_id) && >> + (pci_device_id == ent->device_id) && >> + >> + ((pci_subvendor_id == ent->subvendor_id) || >> + (ent->subvendor_id == 0)) && >> + >> + ((pci_subdevice_id == ent->subdevice_id) || >> + (ent->subdevice_id == 0))) { >> + sprintf(adapter_name, "%s, Version - %s", >> + ixgbe_strings[ent->index], >> + ixgbe_driver_version); >> + device_set_desc_copy(dev, adapter_name); >> + ++ixgbe_total_ports; >> + return (BUS_PROBE_DEFAULT); >> + } >> + ent++; >> + } >> + return (ENXIO); >> +} >> + >> +/********************************************************************* >> + * Device initialization routine >> + * >> + * The attach entry point is called when the driver is being loaded. >> + * This routine identifies the type of hardware, allocates all resources >> + * and initializes the hardware. >> + * >> + * return 0 on success, positive on failure >> + *********************************************************************/ >> + >> +static int >> +ixgbe_attach(device_t dev) >> +{ >> + struct adapter *adapter; >> + struct ixgbe_hw *hw; >> + int error = 0; >> + u16 csum; >> + u32 ctrl_ext; >> + >> + INIT_DEBUGOUT("ixgbe_attach: begin"); >> + >> + /* Allocate, clear, and link in our adapter structure */ >> + adapter = device_get_softc(dev); >> + adapter->dev = adapter->osdep.dev = dev; >> + hw = &adapter->hw; >> + >> + /* Core Lock Init*/ >> + IXGBE_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); >> + >> + /* SYSCTL APIs */ >> + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), >> + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), >> + OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW, >> + adapter, 0, ixgbe_set_flowcntl, "I", >> IXGBE_SYSCTL_DESC_SET_FC); >> + >> + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), >> + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), >> + OID_AUTO, "enable_aim", CTLFLAG_RW, >> + &ixgbe_enable_aim, 1, "Interrupt Moderation"); >> + >> + /* >> + ** Allow a kind of speed control by forcing the autoneg >> + ** advertised speed list to only a certain value, this >> + ** supports 1G on 82599 devices, and 100Mb on x540. >> + */ >> + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), >> + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), >> + OID_AUTO, "advertise_speed", CTLTYPE_INT | >> CTLFLAG_RW, >> + adapter, 0, ixgbe_set_advertise, "I", >> IXGBE_SYSCTL_DESC_ADV_SPEED); >> + >> + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), >> + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), >> + OID_AUTO, "ts", CTLTYPE_INT | CTLFLAG_RW, adapter, >> + 0, ixgbe_set_thermal_test, "I", "Thermal Test"); >> + >> + /* Set up the timer callout */ >> + callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0); >> + >> + /* Determine hardware revision */ >> + ixgbe_identify_hardware(adapter); >> + >> + /* Do base PCI setup - map BAR0 */ >> + if (ixgbe_allocate_pci_resources(adapter)) { >> + device_printf(dev, "Allocation of PCI resources >> failed\n"); >> + error = ENXIO; >> + goto err_out; >> + } >> + >> + /* Do descriptor calc and sanity checks */ >> + if (((ixgbe_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) >> != 0 || >> + ixgbe_txd < MIN_TXD || ixgbe_txd > MAX_TXD) { >> + device_printf(dev, "TXD config issue, using default!\n"); >> + adapter->num_tx_desc = DEFAULT_TXD; >> + } else >> + adapter->num_tx_desc = ixgbe_txd; >> + >> + /* >> + ** With many RX rings it is easy to exceed the >> + ** system mbuf allocation. Tuning nmbclusters >> + ** can alleviate this. >> + */ >> + if (nmbclusters > 0) { >> + int s; >> + s = (ixgbe_rxd * adapter->num_queues) * ixgbe_total_ports; >> + if (s > nmbclusters) { >> + device_printf(dev, "RX Descriptors exceed " >> + "system mbuf max, using default instead!\n"); >> + ixgbe_rxd = DEFAULT_RXD; >> + } >> + } >> + >> + if (((ixgbe_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) >> != 0 || >> + ixgbe_rxd < MIN_RXD || ixgbe_rxd > MAX_RXD) { >> + device_printf(dev, "RXD config issue, using default!\n"); >> + adapter->num_rx_desc = DEFAULT_RXD; >> + } else >> + adapter->num_rx_desc = ixgbe_rxd; >> + >> + /* Allocate our TX/RX Queues */ >> + if (ixgbe_allocate_queues(adapter)) { >> + error = ENOMEM; >> + goto err_out; >> + } >> + >> + /* Allocate multicast array memory. */ >> + adapter->mta = malloc(sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * >> + MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); >> + if (adapter->mta == NULL) { >> + device_printf(dev, "Can not allocate multicast setup >> array\n"); >> + error = ENOMEM; >> + goto err_late; >> + } >> + >> + /* Initialize the shared code */ >> + hw->allow_unsupported_sfp = allow_unsupported_sfp; >> + error = ixgbe_init_shared_code(hw); >> + if (error == IXGBE_ERR_SFP_NOT_PRESENT) { >> + /* >> + ** No optics in this port, set up >> + ** so the timer routine will probe >> + ** for later insertion. >> + */ >> + adapter->sfp_probe = TRUE; >> + error = 0; >> + } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) { >> + device_printf(dev,"Unsupported SFP+ module detected!\n"); >> + error = EIO; >> + goto err_late; >> + } else if (error) { >> + device_printf(dev,"Unable to initialize the shared >> code\n"); >> + error = EIO; >> + goto err_late; >> + } >> + >> + /* Make sure we have a good EEPROM before we read from it */ >> + if (ixgbe_validate_eeprom_checksum(&adapter->hw, &csum) < 0) { >> + device_printf(dev,"The EEPROM Checksum Is Not Valid\n"); >> + error = EIO; >> + goto err_late; >> + } >> + >> + error = ixgbe_init_hw(hw); >> + switch (error) { >> + case IXGBE_ERR_EEPROM_VERSION: >> + device_printf(dev, "This device is a pre-production >> adapter/" >> + "LOM. Please be aware there may be issues associated >> " >> + "with your hardware.\n If you are experiencing >> problems " >> + "please contact your Intel or hardware representative >> " >> + "who provided you with this hardware.\n"); >> + break; >> + case IXGBE_ERR_SFP_NOT_SUPPORTED: >> + device_printf(dev,"Unsupported SFP+ Module\n"); >> + error = EIO; >> + goto err_late; >> + case IXGBE_ERR_SFP_NOT_PRESENT: >> + device_printf(dev,"No SFP+ Module found\n"); >> + /* falls thru */ >> + default: >> + break; >> + } >> + >> + /* Detect and set physical type */ >> + ixgbe_setup_optics(adapter); >> + >> + if ((adapter->msix > 1) && (ixgbe_enable_msix)) >> + error = ixgbe_allocate_msix(adapter); >> + else >> + error = ixgbe_allocate_legacy(adapter); >> + if (error) >> + goto err_late; >> + >> + /* Setup OS specific network interface */ >> + if (ixgbe_setup_interface(dev, adapter) != 0) >> + goto err_late; >> + >> + /* Initialize statistics */ >> + ixgbe_update_stats_counters(adapter); >> + >> + /* Register for VLAN events */ >> + adapter->vlan_attach = EVENTHANDLER_REGISTER(vlan_config, >> + ixgbe_register_vlan, adapter, EVENTHANDLER_PRI_FIRST); >> + adapter->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, >> + ixgbe_unregister_vlan, adapter, EVENTHANDLER_PRI_FIRST); >> + >> + /* >> + ** Check PCIE slot type/speed/width >> + */ >> + ixgbe_get_slot_info(hw); >> + >> + >> + /* Set an initial default flow control value */ >> + adapter->fc = ixgbe_fc_full; >> + >> + /* let hardware know driver is loaded */ >> + ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); >> + ctrl_ext |= IXGBE_CTRL_EXT_DRV_LOAD; >> + IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); >> + >> + ixgbe_add_hw_stats(adapter); >> + >> +#ifdef DEV_NETMAP >> + ixgbe_netmap_attach(adapter); >> +#endif /* DEV_NETMAP */ >> + INIT_DEBUGOUT("ixgbe_attach: end"); >> + return (0); >> + >> +err_late: >> + ixgbe_free_transmit_structures(adapter); >> + ixgbe_free_receive_structures(adapter); >> +err_out: >> + if (adapter->ifp != NULL) >> + if_free(adapter->ifp); >> + ixgbe_free_pci_resources(adapter); >> + free(adapter->mta, M_DEVBUF); >> + return (error); >> +} >> + >> +/********************************************************************* >> + * Device removal routine >> + * >> + * The detach entry point is called when the driver is being removed. >> + * This routine stops the adapter and deallocates all the resources >> + * that were allocated for driver operation. >> + * >> + * return 0 on success, positive on failure >> + *********************************************************************/ >> + >> +static int >> +ixgbe_detach(device_t dev) >> +{ >> + struct adapter *adapter = device_get_softc(dev); >> + struct ix_queue *que = adapter->queues; >> + struct tx_ring *txr = adapter->tx_rings; >> + u32 ctrl_ext; >> + >> + INIT_DEBUGOUT("ixgbe_detach: begin"); >> + >> + /* Make sure VLANS are not using driver */ >> + if (adapter->ifp->if_vlantrunk != NULL) { >> + device_printf(dev,"Vlan in use, detach first\n"); >> + return (EBUSY); >> + } >> + >> + IXGBE_CORE_LOCK(adapter); >> + ixgbe_stop(adapter); >> + IXGBE_CORE_UNLOCK(adapter); >> + >> + for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { >> + if (que->tq) { >> +#ifndef IXGBE_LEGACY_TX >> + taskqueue_drain(que->tq, &txr->txq_task); >> +#endif >> + taskqueue_drain(que->tq, &que->que_task); >> + taskqueue_free(que->tq); >> + } >> + } >> + >> + /* Drain the Link queue */ >> + if (adapter->tq) { >> + taskqueue_drain(adapter->tq, &adapter->link_task); >> + taskqueue_drain(adapter->tq, &adapter->mod_task); >> + taskqueue_drain(adapter->tq, &adapter->msf_task); >> +#ifdef IXGBE_FDIR >> + taskqueue_drain(adapter->tq, &adapter->fdir_task); >> +#endif >> + taskqueue_free(adapter->tq); >> + } >> + >> + /* let hardware know driver is unloading */ >> + ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT); >> + ctrl_ext &= ~IXGBE_CTRL_EXT_DRV_LOAD; >> + IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT, ctrl_ext); >> + >> + /* Unregister VLAN events */ >> + if (adapter->vlan_attach != NULL) >> + EVENTHANDLER_DEREGISTER(vlan_config, >> adapter->vlan_attach); >> + if (adapter->vlan_detach != NULL) >> + EVENTHANDLER_DEREGISTER(vlan_unconfig, >> adapter->vlan_detach); >> + >> + ether_ifdetach(adapter->ifp); >> + callout_drain(&adapter->timer); >> +#ifdef DEV_NETMAP >> + netmap_detach(adapter->ifp); >> +#endif /* DEV_NETMAP */ >> + ixgbe_free_pci_resources(adapter); >> + bus_generic_detach(dev); >> + if_free(adapter->ifp); >> + >> + ixgbe_free_transmit_structures(adapter); >> + ixgbe_free_receive_structures(adapter); >> + free(adapter->mta, M_DEVBUF); >> + >> + IXGBE_CORE_LOCK_DESTROY(adapter); >> + return (0); >> +} >> + >> +/********************************************************************* >> + * >> + * Shutdown entry point >> + * >> + **********************************************************************/ >> + >> +static int >> +ixgbe_shutdown(device_t dev) >> +{ >> + struct adapter *adapter = device_get_softc(dev); >> + IXGBE_CORE_LOCK(adapter); >> + ixgbe_stop(adapter); >> + IXGBE_CORE_UNLOCK(adapter); >> + return (0); >> +} >> + >> + >> +/********************************************************************* >> + * Ioctl entry point >> + * >> + * ixgbe_ioctl is called when the user wants to configure the >> + * interface. >> + * >> + * return 0 on success, positive on failure >> + **********************************************************************/ >> + >> +static int >> +ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) >> +{ >> + struct adapter *adapter = ifp->if_softc; >> + struct ifreq *ifr = (struct ifreq *) data; >> +#if defined(INET) || defined(INET6) >> + struct ifaddr *ifa = (struct ifaddr *)data; >> + bool avoid_reset = FALSE; >> +#endif >> + int error = 0; >> + >> + switch (command) { >> + >> + case SIOCSIFADDR: >> +#ifdef INET >> + if (ifa->ifa_addr->sa_family == AF_INET) >> + avoid_reset = TRUE; >> +#endif >> +#ifdef INET6 >> + if (ifa->ifa_addr->sa_family == AF_INET6) >> + avoid_reset = TRUE; >> +#endif >> +#if defined(INET) || defined(INET6) >> + /* >> + ** Calling init results in link renegotiation, >> + ** so we avoid doing it when possible. >> + */ >> + if (avoid_reset) { >> + ifp->if_flags |= IFF_UP; >> + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) >> + ixgbe_init(adapter); >> + if (!(ifp->if_flags & IFF_NOARP)) >> + arp_ifinit(ifp, ifa); >> + } else >> + error = ether_ioctl(ifp, command, data); >> +#endif >> + break; >> + case SIOCSIFMTU: >> + IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)"); >> + if (ifr->ifr_mtu > IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) { >> + error = EINVAL; >> + } else { >> + IXGBE_CORE_LOCK(adapter); >> + ifp->if_mtu = ifr->ifr_mtu; >> + adapter->max_frame_size = >> + ifp->if_mtu + ETHER_HDR_LEN + >> ETHER_CRC_LEN; >> + ixgbe_init_locked(adapter); >> + IXGBE_CORE_UNLOCK(adapter); >> + } >> + break; >> + case SIOCSIFFLAGS: >> + IOCTL_DEBUGOUT("ioctl: SIOCSIFFLAGS (Set Interface >> Flags)"); >> + IXGBE_CORE_LOCK(adapter); >> + if (ifp->if_flags & IFF_UP) { >> + if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { >> + if ((ifp->if_flags ^ adapter->if_flags) & >> + (IFF_PROMISC | IFF_ALLMULTI)) { >> + ixgbe_set_promisc(adapter); >> + } >> + } else >> + ixgbe_init_locked(adapter); >> + } else >> + if (ifp->if_drv_flags & IFF_DRV_RUNNING) >> + ixgbe_stop(adapter); >> + adapter->if_flags = ifp->if_flags; >> + IXGBE_CORE_UNLOCK(adapter); >> + break; >> + case SIOCADDMULTI: >> + case SIOCDELMULTI: >> + IOCTL_DEBUGOUT("ioctl: SIOC(ADD|DEL)MULTI"); >> + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { >> + IXGBE_CORE_LOCK(adapter); >> + ixgbe_disable_intr(adapter); >> + ixgbe_set_multi(adapter); >> + ixgbe_enable_intr(adapter); >> + IXGBE_CORE_UNLOCK(adapter); >> + } >> + break; >> + case SIOCSIFMEDIA: >> + case SIOCGIFMEDIA: >> + IOCTL_DEBUGOUT("ioctl: SIOCxIFMEDIA (Get/Set Interface >> Media)"); >> + error = ifmedia_ioctl(ifp, ifr, &adapter->media, command); >> + break; >> + case SIOCSIFCAP: >> + { >> + int mask = ifr->ifr_reqcap ^ ifp->if_capenable; >> + IOCTL_DEBUGOUT("ioctl: SIOCSIFCAP (Set Capabilities)"); >> + if (mask & IFCAP_HWCSUM) >> + ifp->if_capenable ^= IFCAP_HWCSUM; >> + if (mask & IFCAP_TSO4) >> + ifp->if_capenable ^= IFCAP_TSO4; >> + if (mask & IFCAP_TSO6) >> + ifp->if_capenable ^= IFCAP_TSO6; >> + if (mask & IFCAP_LRO) >> + ifp->if_capenable ^= IFCAP_LRO; >> + if (mask & IFCAP_VLAN_HWTAGGING) >> + ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; >> + if (mask & IFCAP_VLAN_HWFILTER) >> + ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; >> + if (mask & IFCAP_VLAN_HWTSO) >> + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; >> + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { >> + IXGBE_CORE_LOCK(adapter); >> + ixgbe_init_locked(adapter); >> + IXGBE_CORE_UNLOCK(adapter); >> + } >> + VLAN_CAPABILITIES(ifp); >> + break; >> + } >> +#if __FreeBSD_version >= 1100036 >> + case SIOCGI2C: >> + { >> + struct ixgbe_hw *hw = &adapter->hw; >> + struct ifi2creq i2c; >> + int i; >> + IOCTL_DEBUGOUT("ioctl: SIOCGI2C (Get I2C Data)"); >> + error = copyin(ifr->ifr_data, &i2c, sizeof(i2c)); >> + if (error != 0) >> + break; >> + if (i2c.dev_addr != 0xA0 && i2c.dev_addr != 0xA2) { >> + error = EINVAL; >> + break; >> + } >> + if (i2c.len > sizeof(i2c.data)) { >> + error = EINVAL; >> + break; >> + } >> + >> + for (i = 0; i < i2c.len; i++) >> + hw->phy.ops.read_i2c_byte(hw, i2c.offset + i, >> + i2c.dev_addr, &i2c.data[i]); >> + error = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); >> + break; >> + } >> +#endif >> + default: >> + IOCTL_DEBUGOUT1("ioctl: UNKNOWN (0x%X)\n", (int)command); >> + error = ether_ioctl(ifp, command, data); >> + break; >> + } >> + >> + return (error); >> +} >> + >> +/********************************************************************* >> + * Init entry point >> + * >> + * This routine is used in two ways. It is used by the stack as >> + * init entry point in network interface structure. It is also used >> + * by the driver as a hw/sw initialization routine to get to a >> + * consistent state. >> + * >> + * return 0 on success, positive on failure >> + **********************************************************************/ >> +#define IXGBE_MHADD_MFS_SHIFT 16 >> + >> +static void >> +ixgbe_init_locked(struct adapter *adapter) >> +{ >> + struct ifnet *ifp = adapter->ifp; >> + device_t dev = adapter->dev; >> + struct ixgbe_hw *hw = &adapter->hw; >> + u32 k, txdctl, mhadd, gpie; >> + u32 rxdctl, rxctrl; >> + >> + mtx_assert(&adapter->core_mtx, MA_OWNED); >> + INIT_DEBUGOUT("ixgbe_init_locked: begin"); >> + hw->adapter_stopped = FALSE; >> + ixgbe_stop_adapter(hw); >> + callout_stop(&adapter->timer); >> + >> + /* reprogram the RAR[0] in case user changed it. */ >> + ixgbe_set_rar(hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV); >> + >> + /* Get the latest mac address, User can use a LAA */ >> + bcopy(IF_LLADDR(adapter->ifp), hw->mac.addr, >> + IXGBE_ETH_LENGTH_OF_ADDRESS); >> + ixgbe_set_rar(hw, 0, hw->mac.addr, 0, 1); >> + hw->addr_ctrl.rar_used_count = 1; >> + >> + /* Set the various hardware offload abilities */ >> + ifp->if_hwassist = 0; >> + if (ifp->if_capenable & IFCAP_TSO) >> + ifp->if_hwassist |= CSUM_TSO; >> + if (ifp->if_capenable & IFCAP_TXCSUM) { >> + ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); >> +#if __FreeBSD_version >= 800000 >> + if (hw->mac.type != ixgbe_mac_82598EB) >> + ifp->if_hwassist |= CSUM_SCTP; >> +#endif >> + } >> + >> + /* Prepare transmit descriptors and buffers */ >> + if (ixgbe_setup_transmit_structures(adapter)) { >> + device_printf(dev,"Could not setup transmit >> structures\n"); >> + ixgbe_stop(adapter); >> + return; >> + } >> + >> + ixgbe_init_hw(hw); >> + ixgbe_initialize_transmit_units(adapter); >> + >> + /* Setup Multicast table */ >> + ixgbe_set_multi(adapter); >> + >> + /* >> + ** Determine the correct mbuf pool >> + ** for doing jumbo frames >> + */ >> + if (adapter->max_frame_size <= 2048) >> + adapter->rx_mbuf_sz = MCLBYTES; >> + else if (adapter->max_frame_size <= 4096) >> + adapter->rx_mbuf_sz = MJUMPAGESIZE; >> + else if (adapter->max_frame_size <= 9216) >> + adapter->rx_mbuf_sz = MJUM9BYTES; >> + else >> + adapter->rx_mbuf_sz = MJUM16BYTES; >> >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >> >> > From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 15:59:57 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 795BEDCB; Wed, 18 Mar 2015 15:59:57 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FB9FECF; Wed, 18 Mar 2015 15:59:57 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9F2F5B95B; Wed, 18 Mar 2015 11:59:55 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r280220 - head/usr.bin/ldd Date: Wed, 18 Mar 2015 11:24:05 -0400 Message-ID: <10082987.nfhPBgOc2O@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150318150425.GV2379@kib.kiev.ua> References: <201503181359.t2IDx5MO086217@svn.freebsd.org> <2184487.KWP1t96Knu@ralph.baldwin.cx> <20150318150425.GV2379@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 18 Mar 2015 11:59:55 -0400 (EDT) Cc: Andrew Turner , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Wed, 18 Mar 2015 15:59:57 -0000 On Wednesday, March 18, 2015 05:04:25 PM Konstantin Belousov wrote: > On Wed, Mar 18, 2015 at 10:33:45AM -0400, John Baldwin wrote: > > On Wednesday, March 18, 2015 01:59:05 PM Andrew Turner wrote: > > > Author: andrew > > > Date: Wed Mar 18 13:59:04 2015 > > > New Revision: 280220 > > > URL: https://svnweb.freebsd.org/changeset/base/280220 > > > > > > Log: > > > Allowus to exclude a.out support from ldd and use it with arm64 as it won't > > > support the a.out format. > > > > Similarly here. Perhaps it could also be enabled for amd64 to support running > > old FreeBSD/i386 binaries, but there's no need for it on other arm, mips, > > powerpc, sparc64, etc. > > > I do not think amd64 binary needs a.out support. Only kernel components > and ldd32 need this, and for ldd32 build, the __i386__ preprocessor > symbol should be defined. Even better then. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 16:54: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 A8F1DD58; Wed, 18 Mar 2015 16:54: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 79953847; Wed, 18 Mar 2015 16:54: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 t2IGs5rL072112; Wed, 18 Mar 2015 16:54:05 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IGs4Hr072106; Wed, 18 Mar 2015 16:54:04 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201503181654.t2IGs4Hr072106@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Wed, 18 Mar 2015 16:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280226 - in head/sys: mips/conf modules powerpc/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: Wed, 18 Mar 2015 16:54:05 -0000 Author: jfv Date: Wed Mar 18 16:54:03 2015 New Revision: 280226 URL: https://svnweb.freebsd.org/changeset/base/280226 Log: Correct the ixgbe entries in mips and powerpc, and add the module entries in i386/amd64 in the Makefile Modified: head/sys/mips/conf/OCTEON1 head/sys/modules/Makefile head/sys/powerpc/conf/GENERIC64 Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Wed Mar 18 16:06:04 2015 (r280225) +++ head/sys/mips/conf/OCTEON1 Wed Mar 18 16:54:03 2015 (r280226) @@ -196,7 +196,8 @@ device octm device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family -device ixgbe # Intel PRO/10GbE PCIE Ethernet Family +device ix # Intel PRO/10GbE PF PCIE Ethernet Family +device ixv # Intel PRO/10GbE VF PCIE Ethernet Family device le # AMD Am7900 LANCE and Am79C9xx PCnet device ti # Alteon Networks Tigon I/II gigabit Ethernet device txp # 3Com 3cR990 (``Typhoon'') Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Mar 18 16:06:04 2015 (r280225) +++ head/sys/modules/Makefile Wed Mar 18 16:54:03 2015 (r280226) @@ -511,6 +511,8 @@ _io= io .if ${MK_OFED} != "no" || defined(ALL_MODULES) _ipoib= ipoib .endif +_ix= ix +_ixv= ixv _linprocfs= linprocfs _linsysfs= linsysfs _linux= linux Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Wed Mar 18 16:06:04 2015 (r280225) +++ head/sys/powerpc/conf/GENERIC64 Wed Mar 18 16:54:03 2015 (r280226) @@ -136,7 +136,8 @@ device uart_z8530 # Ethernet hardware device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family -device ixgbe # Intel PRO/10GbE PCIE Ethernet Family +device ix # Intel PRO/10GbE PCIE PF Ethernet Family +device ixv # Intel PRO/10GbE PCIE VF Ethernet Family device glc # Sony Playstation 3 Ethernet device llan # IBM pSeries Virtual Ethernet From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 20:12:00 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 CB8F132B; Wed, 18 Mar 2015 20:12:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B53DE32D; Wed, 18 Mar 2015 20:12:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2IKC0KV065659; Wed, 18 Mar 2015 20:12:00 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IKC0FD065652; Wed, 18 Mar 2015 20:12:00 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201503182012.t2IKC0FD065652@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Wed, 18 Mar 2015 20:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280228 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 20:12:00 -0000 Author: jfv Date: Wed Mar 18 20:11:59 2015 New Revision: 280228 URL: https://svnweb.freebsd.org/changeset/base/280228 Log: Fix i386 LINT build issues, and remove unused variable. Modified: head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/if_ixv.c ============================================================================== --- head/sys/dev/ixgbe/if_ixv.c Wed Mar 18 18:33:44 2015 (r280227) +++ head/sys/dev/ixgbe/if_ixv.c Wed Mar 18 20:11:59 2015 (r280228) @@ -1979,13 +1979,13 @@ ixv_add_stats_sysctls(struct adapter *ad struct sysctl_oid_list *stat_list, *queue_list; /* Driver Statistics */ - SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "dropped", + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped", CTLFLAG_RD, &adapter->dropped_pkts, "Driver dropped packets"); - SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "mbuf_defrag_failed", + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "mbuf_defrag_failed", CTLFLAG_RD, &adapter->mbuf_defrag_failed, "m_defrag() failed"); - SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "watchdog_events", + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "watchdog_events", CTLFLAG_RD, &adapter->watchdog_events, "Watchdog timeouts"); Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Wed Mar 18 18:33:44 2015 (r280227) +++ head/sys/dev/ixgbe/ixgbe.h Wed Mar 18 20:11:59 2015 (r280228) @@ -323,9 +323,8 @@ struct tx_ring { u32 bytes; /* used for AIM */ u32 packets; /* Soft Stats */ - unsigned long tx_bytes; + u64 tx_bytes; unsigned long tso_tx; - unsigned long no_tx_map_avail; unsigned long no_tx_dma_setup; u64 no_desc_avail; u64 total_packets; From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 20:52:35 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 E3D36FAB; Wed, 18 Mar 2015 20:52:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3CC39CE; Wed, 18 Mar 2015 20:52:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2IKqZ1l084768; Wed, 18 Mar 2015 20:52:35 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IKqZC1084766; Wed, 18 Mar 2015 20:52:35 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201503182052.t2IKqZC1084766@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Wed, 18 Mar 2015 20:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280230 - in head: sys/cam/scsi usr.bin/mt X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 20:52:36 -0000 Author: ken Date: Wed Mar 18 20:52:34 2015 New Revision: 280230 URL: https://svnweb.freebsd.org/changeset/base/280230 Log: Fix a couple of problems in the sa(4) media type reports. The only drives I have discovered so far that support medium type reports are newer HP LTO (LTO-5 and LTO-6) drives. IBM drives only support the density reports. sys/cam/scsi/scsi_sa.h: The number of possible density codes in the medium type report is 9, not 8. This caused problems parsing all of the medium type report after this point in the structure. usr.bin/mt/mt.c: Run the density codes returned in the medium type report through denstostring(), just like the primary and secondary density codes in the density report. This will print the density code in hex, and give a text description if it is available. Thanks to Rudolf Cejka for doing extensive testing with HP LTO drives and Bacula and discovering these problems. Tested by: Rudolf Cejka Sponsored by: Spectra Logic MFC after: 4 days Modified: head/sys/cam/scsi/scsi_sa.h head/usr.bin/mt/mt.c Modified: head/sys/cam/scsi/scsi_sa.h ============================================================================== --- head/sys/cam/scsi/scsi_sa.h Wed Mar 18 20:40:42 2015 (r280229) +++ head/sys/cam/scsi/scsi_sa.h Wed Mar 18 20:52:34 2015 (r280230) @@ -477,7 +477,7 @@ struct scsi_medium_type_data { u_int8_t length[2]; #define SMTD_DEFAULT_LENGTH 52 u_int8_t num_density_codes; - u_int8_t primary_density_codes[8]; + u_int8_t primary_density_codes[9]; u_int8_t media_width[2]; u_int8_t medium_length[2]; u_int8_t reserved2[2]; Modified: head/usr.bin/mt/mt.c ============================================================================== --- head/usr.bin/mt/mt.c Wed Mar 18 20:40:42 2015 (r280229) +++ head/usr.bin/mt/mt.c Wed Mar 18 20:52:34 2015 (r280230) @@ -1406,9 +1406,9 @@ mt_print_density_entry(struct mt_status_ continue; } if ((strcmp(entry->entry_name, "primary_density_code") == 0) - || (strcmp(entry->entry_name, "secondary_density_code") == 0)){ + || (strcmp(entry->entry_name, "secondary_density_code") == 0) + || (strcmp(entry->entry_name, "density_code") == 0)) { - /* XXX KDM this should really be unsigned */ printf("%*s%s (%s): %s\n", indent, "", entry->desc ? entry->desc : "", entry->entry_name, denstostring(entry->value_unsigned)); From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 20:54:55 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 6ABED213; Wed, 18 Mar 2015 20:54:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54D199E5; Wed, 18 Mar 2015 20:54:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2IKstPc085148; Wed, 18 Mar 2015 20:54:55 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IKstmx085147; Wed, 18 Mar 2015 20:54:55 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201503182054.t2IKstmx085147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Wed, 18 Mar 2015 20:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280231 - head/usr.bin/mt X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 20:54:55 -0000 Author: ken Date: Wed Mar 18 20:54:54 2015 New Revision: 280231 URL: https://svnweb.freebsd.org/changeset/base/280231 Log: Improve the mt(1) rblim display. The granularity reported by READ BLOCK LIMITS is an exponent, not a byte value. So a granularity of 0 means 2^0, or 1 byte. A granularity of 1 means 2^1, or 2 bytes. Print out the individual block limits on separate lines to improve readability and avoid exceeding 80 columns. usr.bin/mt/mt.c: Fix and improve the 'mt rblim' output. Add a MT_PLURAL() macro so we can print "byte" or "bytes" as appropriate. Sponsored by: Spectra Logic MFC after: 4 days Modified: head/usr.bin/mt/mt.c Modified: head/usr.bin/mt/mt.c ============================================================================== --- head/usr.bin/mt/mt.c Wed Mar 18 20:52:34 2015 (r280230) +++ head/usr.bin/mt/mt.c Wed Mar 18 20:54:54 2015 (r280231) @@ -119,6 +119,7 @@ __FBSDID("$FreeBSD$"); #ifndef MAX #define MAX(a, b) (a > b) ? a : b #endif +#define MT_PLURAL(a) (a == 1) ? "" : "s" typedef enum { MT_CMD_NONE = MTLOAD + 1, @@ -384,10 +385,16 @@ main(int argc, char *argv[]) if (ioctl(mtfd, MTIOCRBLIM, (caddr_t)&rblim) < 0) err(2, "%s", tape); - (void)printf("%s: min blocksize %u bytes, " - "max blocksize %u bytes, granularity %u bytes\n", + (void)printf("%s:\n" + " min blocksize %u byte%s\n" + " max blocksize %u byte%s\n" + " granularity %u byte%s\n", tape, rblim.min_block_length, - rblim.max_block_length, rblim.granularity); + MT_PLURAL(rblim.min_block_length), + rblim.max_block_length, + MT_PLURAL(rblim.max_block_length), + (1 << rblim.granularity), + MT_PLURAL((1 << rblim.granularity))); exit(0); /* NOTREACHED */ } From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 22:05:16 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 7575E8F8; Wed, 18 Mar 2015 22:05:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4651122F; Wed, 18 Mar 2015 22:05:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2IM5GiY018488; Wed, 18 Mar 2015 22:05:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2IM5G5Q018487; Wed, 18 Mar 2015 22:05:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503182205.t2IM5G5Q018487@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 18 Mar 2015 22:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280232 - head/tools/regression/sysvshm X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 22:05:16 -0000 Author: kib Date: Wed Mar 18 22:05:15 2015 New Revision: 280232 URL: https://svnweb.freebsd.org/changeset/base/280232 Log: Cosmetics: - Move to ANSI definitions syntax, removing warnings about type promotions. - Remove __P(). - Staticise everything. - Remove warnings about unused args for signal handlers. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/tools/regression/sysvshm/shmtest.c Modified: head/tools/regression/sysvshm/shmtest.c ============================================================================== --- head/tools/regression/sysvshm/shmtest.c Wed Mar 18 20:54:54 2015 (r280231) +++ head/tools/regression/sysvshm/shmtest.c Wed Mar 18 22:05:15 2015 (r280232) @@ -49,27 +49,22 @@ #include #include -int main __P((int, char *[])); -void print_shmid_ds __P((struct shmid_ds *, mode_t)); -void sigsys_handler __P((int)); -void sigchld_handler __P((int)); -void cleanup __P((void)); -void receiver __P((void)); -void usage __P((void)); - -const char *m_str = "The quick brown fox jumped over the lazy dog."; - -int sender_shmid = -1; -pid_t child_pid; - -key_t shmkey; - -size_t pgsize; +static void print_shmid_ds(struct shmid_ds *, mode_t); +static void sigsys_handler(int); +static void sigchld_handler(int); +static void cleanup(void); +static void receiver(void); +static void usage(void); + +static const char *m_str = "The quick brown fox jumped over the lazy dog."; + +static int sender_shmid = -1; +static pid_t child_pid; +static key_t shmkey; +static size_t pgsize; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct sigaction sa; struct shmid_ds s_ds; @@ -172,17 +167,15 @@ main(argc, argv) errx(1, "sender: received unexpected signal"); } -void -sigsys_handler(signo) - int signo; +static void +sigsys_handler(int signo __unused) { errx(1, "System V Shared Memory support is not present in the kernel"); } -void -sigchld_handler(signo) - int signo; +static void +sigchld_handler(int signo __unused) { struct shmid_ds s_ds; int cstatus; @@ -214,8 +207,8 @@ sigchld_handler(signo) exit(0); } -void -cleanup() +static void +cleanup(void) { /* @@ -227,10 +220,8 @@ cleanup() } } -void -print_shmid_ds(sp, mode) - struct shmid_ds *sp; - mode_t mode; +static void +print_shmid_ds(struct shmid_ds *sp, mode_t mode) { uid_t uid = geteuid(); gid_t gid = getegid(); @@ -262,16 +253,16 @@ print_shmid_ds(sp, mode) errx(1, "mode mismatch"); } -void -usage() +static void +usage(void) { fprintf(stderr, "usage: %s keypath\n", getprogname()); exit(1); } -void -receiver() +static void +receiver(void) { int shmid; void *shm_buf; From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 23:24: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 338C2D1F; Wed, 18 Mar 2015 23:24: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 14D7FD01; Wed, 18 Mar 2015 23:24: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 t2INOQlH056267; Wed, 18 Mar 2015 23:24:26 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2INOQI2056264; Wed, 18 Mar 2015 23:24:26 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201503182324.t2INOQI2056264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 18 Mar 2015 23:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280233 - in head: share/man/man4 sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Wed, 18 Mar 2015 23:24:27 -0000 Author: hiren Date: Wed Mar 18 23:24:25 2015 New Revision: 280233 URL: https://svnweb.freebsd.org/changeset/base/280233 Log: Add connection flowid to siftr(4). Reviewed by: lstewart MFC after: 1 week Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D2089 Modified: head/share/man/man4/siftr.4 head/sys/netinet/siftr.c Modified: head/share/man/man4/siftr.4 ============================================================================== --- head/share/man/man4/siftr.4 Wed Mar 18 22:05:15 2015 (r280232) +++ head/share/man/man4/siftr.4 Wed Mar 18 23:24:25 2015 (r280233) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2010 +.Dd March 18, 2015 .Dt SIFTR 4 .Os .Sh NAME @@ -335,6 +335,13 @@ Bytes acknowledged via SACK are not excl .It Va 26 The current number of segments in the reassembly queue. .El +.Bl -tag -offset indent -width Va +.It Va 27 +Flowid for the connection. +A caveat: Zero '0' either represents a valid flowid or a default value when it's +not being set. There is no easy way to differentiate without looking at actual +network interface card and drivers being used. +.El .Pp The third type of log message is written to the file when the module is disabled and ceases collecting data from the running kernel. Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Wed Mar 18 22:05:15 2015 (r280232) +++ head/sys/netinet/siftr.c Wed Mar 18 23:24:25 2015 (r280233) @@ -227,6 +227,8 @@ struct pkt_node { u_int sent_inflight_bytes; /* Number of segments currently in the reassembly queue. */ int t_segqlen; + /* Flowid for the connection. */ + u_int flowid; /* Link to next pkt_node in the list. */ STAILQ_ENTRY(pkt_node) nodes; }; @@ -485,7 +487,8 @@ siftr_process_pkt(struct pkt_node * pkt_ pkt_node->rcv_buf_hiwater, pkt_node->rcv_buf_cc, pkt_node->sent_inflight_bytes, - pkt_node->t_segqlen); + pkt_node->t_segqlen, + pkt_node->flowid); } else { /* IPv4 packet */ pkt_node->ip_laddr[0] = FIRST_OCTET(pkt_node->ip_laddr[3]); pkt_node->ip_laddr[1] = SECOND_OCTET(pkt_node->ip_laddr[3]); @@ -501,7 +504,7 @@ siftr_process_pkt(struct pkt_node * pkt_ log_buf->ae_bytesused = snprintf(log_buf->ae_data, MAX_LOG_MSG_LEN, "%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld," - "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u\n", + "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u\n", direction[pkt_node->direction], pkt_node->hash, (intmax_t)pkt_node->tval.tv_sec, @@ -534,7 +537,8 @@ siftr_process_pkt(struct pkt_node * pkt_ pkt_node->rcv_buf_hiwater, pkt_node->rcv_buf_cc, pkt_node->sent_inflight_bytes, - pkt_node->t_segqlen); + pkt_node->t_segqlen, + pkt_node->flowid); #ifdef SIFTR_IPV6 } #endif @@ -787,6 +791,7 @@ siftr_siftdata(struct pkt_node *pn, stru pn->rcv_buf_cc = sbused(&inp->inp_socket->so_rcv); pn->sent_inflight_bytes = tp->snd_max - tp->snd_una; pn->t_segqlen = tp->t_segqlen; + pn->flowid = inp->inp_flowid; /* We've finished accessing the tcb so release the lock. */ if (inp_locally_locked) From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 23:24: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 44D41E57; Wed, 18 Mar 2015 23:24: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 2FC24D06; Wed, 18 Mar 2015 23:24: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 t2INOdgV056339; Wed, 18 Mar 2015 23:24:39 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2INOdVJ056338; Wed, 18 Mar 2015 23:24:39 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201503182324.t2INOdVJ056338@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 18 Mar 2015 23:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280234 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 23:24:39 -0000 Author: allanjude (doc committer) Date: Wed Mar 18 23:24:38 2015 New Revision: 280234 URL: https://svnweb.freebsd.org/changeset/base/280234 Log: Fix the handbook install option in bsdinstall bsdconfig's f_package_add doesn't seem to support using the pkg repo from /etc/pkg/FreeBSD.conf, it also tries to run the commands on the installer image, not in the destination chroot Instead, manually bootstrap pkg in the chroot, and then install the requested packages (in the chroot) Doesn't use pkg -c, because pkg is not installed on the installer image PR: 196250 Differential Revision: https://reviews.freebsd.org/D2026 Approved by: bapt Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/bsdinstall/scripts/docsinstall Modified: head/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- head/usr.sbin/bsdinstall/scripts/docsinstall Wed Mar 18 23:24:25 2015 (r280233) +++ head/usr.sbin/bsdinstall/scripts/docsinstall Wed Mar 18 23:24:38 2015 (r280234) @@ -151,13 +151,20 @@ f_dialog_menutag_fetch selected # Let pkg_add be able to use name servers f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ +if [ ! -x $BSDINSTALL_CHROOT ]; then + ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg bootstrap +fi + # # Install each of the selected packages # +docsets="" for lang in $selected; do - f_package_add $lang-freebsd-doc || return $FAILURE + docsets="$docsets $lang-freebsd-doc" done +ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install $docsets || return $FAILURE + ################################################################################ # END ################################################################################ From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 23:26:48 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 96AB67C; Wed, 18 Mar 2015 23:26:48 +0000 (UTC) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5983FD3C; Wed, 18 Mar 2015 23:26:48 +0000 (UTC) Received: by igbqf9 with SMTP id qf9so8039339igb.1; Wed, 18 Mar 2015 16:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=fcjHcPL64KjQjhnT2+2So0aou+xu+K1/oH1f+cimgwI=; b=XZrp8iuxCowN+D75fkgQlsp/0+Yf4tNM1hSvSoG7zcqDTCMAwF+GSIBSd+o/tDjPkp icIJkm27oy3dAfs2ErY465OXiDIk/YYq0p8SYdNJaJvj5pXkGkuy9W54KPGGWAWYmtSD jGvf++3tHrBGHqo74CvReO8xbmod9UqGZR4yuD/Yqvsd4iADNsOIqV+a3ifaI6bYCeO/ bv6Wmw9ntyj47IbioYh0XILJuoDEWg3cWuniwIQ036SrS3rUZEfx4BuWNy18mM4xjieQ eUA5BJ2sC3g8xU07EywFFyZQejOn6enhZgZNx/2lcfDWJKUBHvueU5Go7pNofnd+QQjn 8mHw== MIME-Version: 1.0 X-Received: by 10.107.5.211 with SMTP id 202mr97935629iof.88.1426721207867; Wed, 18 Mar 2015 16:26:47 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Wed, 18 Mar 2015 16:26:47 -0700 (PDT) In-Reply-To: <201503182324.t2INOQI2056264@svn.freebsd.org> References: <201503182324.t2INOQI2056264@svn.freebsd.org> Date: Wed, 18 Mar 2015 16:26:47 -0700 X-Google-Sender-Auth: _8lXDHAOd3eNJ62xad6bo6vEcgc Message-ID: Subject: Re: svn commit: r280233 - in head: share/man/man4 sys/netinet From: Adrian Chadd To: Hiren Panchasara Content-Type: text/plain; charset=UTF-8 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: Wed, 18 Mar 2015 23:26:48 -0000 Sorry I didn't add this earlier. There's a flowtype field, right? You should log that too. It'll tell you what the flowid field means. -a On 18 March 2015 at 16:24, Hiren Panchasara wrote: > Author: hiren > Date: Wed Mar 18 23:24:25 2015 > New Revision: 280233 > URL: https://svnweb.freebsd.org/changeset/base/280233 > > Log: > Add connection flowid to siftr(4). > > Reviewed by: lstewart > MFC after: 1 week > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D2089 > > Modified: > head/share/man/man4/siftr.4 > head/sys/netinet/siftr.c > > Modified: head/share/man/man4/siftr.4 > ============================================================================== > --- head/share/man/man4/siftr.4 Wed Mar 18 22:05:15 2015 (r280232) > +++ head/share/man/man4/siftr.4 Wed Mar 18 23:24:25 2015 (r280233) > @@ -30,7 +30,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd November 12, 2010 > +.Dd March 18, 2015 > .Dt SIFTR 4 > .Os > .Sh NAME > @@ -335,6 +335,13 @@ Bytes acknowledged via SACK are not excl > .It Va 26 > The current number of segments in the reassembly queue. > .El > +.Bl -tag -offset indent -width Va > +.It Va 27 > +Flowid for the connection. > +A caveat: Zero '0' either represents a valid flowid or a default value when it's > +not being set. There is no easy way to differentiate without looking at actual > +network interface card and drivers being used. > +.El > .Pp > The third type of log message is written to the file when the module is disabled > and ceases collecting data from the running kernel. > > Modified: head/sys/netinet/siftr.c > ============================================================================== > --- head/sys/netinet/siftr.c Wed Mar 18 22:05:15 2015 (r280232) > +++ head/sys/netinet/siftr.c Wed Mar 18 23:24:25 2015 (r280233) > @@ -227,6 +227,8 @@ struct pkt_node { > u_int sent_inflight_bytes; > /* Number of segments currently in the reassembly queue. */ > int t_segqlen; > + /* Flowid for the connection. */ > + u_int flowid; > /* Link to next pkt_node in the list. */ > STAILQ_ENTRY(pkt_node) nodes; > }; > @@ -485,7 +487,8 @@ siftr_process_pkt(struct pkt_node * pkt_ > pkt_node->rcv_buf_hiwater, > pkt_node->rcv_buf_cc, > pkt_node->sent_inflight_bytes, > - pkt_node->t_segqlen); > + pkt_node->t_segqlen, > + pkt_node->flowid); > } else { /* IPv4 packet */ > pkt_node->ip_laddr[0] = FIRST_OCTET(pkt_node->ip_laddr[3]); > pkt_node->ip_laddr[1] = SECOND_OCTET(pkt_node->ip_laddr[3]); > @@ -501,7 +504,7 @@ siftr_process_pkt(struct pkt_node * pkt_ > log_buf->ae_bytesused = snprintf(log_buf->ae_data, > MAX_LOG_MSG_LEN, > "%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld," > - "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u\n", > + "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u\n", > direction[pkt_node->direction], > pkt_node->hash, > (intmax_t)pkt_node->tval.tv_sec, > @@ -534,7 +537,8 @@ siftr_process_pkt(struct pkt_node * pkt_ > pkt_node->rcv_buf_hiwater, > pkt_node->rcv_buf_cc, > pkt_node->sent_inflight_bytes, > - pkt_node->t_segqlen); > + pkt_node->t_segqlen, > + pkt_node->flowid); > #ifdef SIFTR_IPV6 > } > #endif > @@ -787,6 +791,7 @@ siftr_siftdata(struct pkt_node *pn, stru > pn->rcv_buf_cc = sbused(&inp->inp_socket->so_rcv); > pn->sent_inflight_bytes = tp->snd_max - tp->snd_una; > pn->t_segqlen = tp->t_segqlen; > + pn->flowid = inp->inp_flowid; > > /* We've finished accessing the tcb so release the lock. */ > if (inp_locally_locked) > From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 23:36:07 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 587AF417; Wed, 18 Mar 2015 23:36:07 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (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 3EB54E36; Wed, 18 Mar 2015 23:36:06 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id F0D3D1051C5; Wed, 18 Mar 2015 16:36:05 -0700 (PDT) Date: Wed, 18 Mar 2015 16:36:05 -0700 From: Hiren Panchasara To: Adrian Chadd Subject: Re: svn commit: r280233 - in head: share/man/man4 sys/netinet Message-ID: <20150318233605.GF53237@strugglingcoder.info> References: <201503182324.t2INOQI2056264@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XIiC+We3v3zHqZ6Z" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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: Wed, 18 Mar 2015 23:36:07 -0000 --XIiC+We3v3zHqZ6Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 03/18/15 at 04:26P, Adrian Chadd wrote: > Sorry I didn't add this earlier. >=20 > There's a flowtype field, right? You should log that too. It'll tell > you what the flowid field means. Yeah, you are right. I should have added that in this commit. I'll do that now. Cheers, Hiren --XIiC+We3v3zHqZ6Z Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVCgvlXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lz4gH/3hrNM3+yeILCJkJNyvw3b75 IMzVtPBqdlXeiy9uXiG8VNnzO4hp8s/nti8+8S9qcYMX2eTaFNugcfI3zjKkSRnH RT1sBLnv9fA8Jq6IEivqoAUImSlGn8OEi5t4kWZrX4tclRZgz60tRRGRJmQd8pj7 dqeqX6uW/2DsJGcgOCrPSHdgAs3Zqfxuz9NjbaxcVakOBF2nlnqicPfjcxzWD66p vGj6weCUNgmvwZtKW4QNrkIxmb0Ti0/qIV+cSa6Sp7Yt3KfWJ7fzONd3XvJFvQ// 343j3cssai53vybOnYYf7Uxfs9UxYLmyeHB/IJ24ebF6SwnWFU8aGkHbyrkTLUU= =eSyv -----END PGP SIGNATURE----- --XIiC+We3v3zHqZ6Z-- From owner-svn-src-head@FreeBSD.ORG Wed Mar 18 23:47: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 A9BCD75E; Wed, 18 Mar 2015 23:47: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 947A9F39; Wed, 18 Mar 2015 23:47: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 t2INlVSE066044; Wed, 18 Mar 2015 23:47:31 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2INlVlf066043; Wed, 18 Mar 2015 23:47:31 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201503182347.t2INlVlf066043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 18 Mar 2015 23:47:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280235 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.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: Wed, 18 Mar 2015 23:47:31 -0000 Author: allanjude (doc committer) Date: Wed Mar 18 23:47:30 2015 New Revision: 280235 URL: https://svnweb.freebsd.org/changeset/base/280235 Log: Remove a non-required unsafe condition added in the previous commit Reviewed by: bapt Approved by: dteske Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/bsdinstall/scripts/docsinstall Modified: head/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- head/usr.sbin/bsdinstall/scripts/docsinstall Wed Mar 18 23:24:38 2015 (r280234) +++ head/usr.sbin/bsdinstall/scripts/docsinstall Wed Mar 18 23:47:30 2015 (r280235) @@ -151,10 +151,6 @@ f_dialog_menutag_fetch selected # Let pkg_add be able to use name servers f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ -if [ ! -x $BSDINSTALL_CHROOT ]; then - ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg bootstrap -fi - # # Install each of the selected packages # From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 00:04: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 4949ADC5; Thu, 19 Mar 2015 00:04: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 34F641A9; Thu, 19 Mar 2015 00:04: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 t2J04QE8075995; Thu, 19 Mar 2015 00:04:26 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2J04QhF075994; Thu, 19 Mar 2015 00:04:26 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503190004.t2J04QhF075994@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 19 Mar 2015 00:04:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280236 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Thu, 19 Mar 2015 00:04:27 -0000 Author: ae Date: Thu Mar 19 00:04:25 2015 New Revision: 280236 URL: https://svnweb.freebsd.org/changeset/base/280236 Log: To avoid a possible race, release the reference to ifa after return from nd6_dad_na_input(). Submitted by: Alexandre Martins MFC after: 1 week Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Wed Mar 18 23:47:30 2015 (r280235) +++ head/sys/netinet6/nd6_nbr.c Thu Mar 19 00:04:25 2015 (r280236) @@ -747,8 +747,8 @@ nd6_na_input(struct mbuf *m, int off, in */ if (ifa && (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_TENTATIVE)) { - ifa_free(ifa); nd6_dad_na_input(ifa); + ifa_free(ifa); goto freeit; } From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 00:23:17 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 CAAB5328; Thu, 19 Mar 2015 00:23:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABF2F3C8; Thu, 19 Mar 2015 00:23:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2J0NHYE085353; Thu, 19 Mar 2015 00:23:17 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2J0NHXe085350; Thu, 19 Mar 2015 00:23:17 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201503190023.t2J0NHXe085350@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Thu, 19 Mar 2015 00:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280237 - in head: share/man/man4 sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Thu, 19 Mar 2015 00:23:18 -0000 Author: hiren Date: Thu Mar 19 00:23:16 2015 New Revision: 280237 URL: https://svnweb.freebsd.org/changeset/base/280237 Log: Add connection flow type to siftr(4). Suggested by: adrian Sponsored by: Limelight Networks Modified: head/share/man/man4/siftr.4 head/sys/netinet/siftr.c Modified: head/share/man/man4/siftr.4 ============================================================================== --- head/share/man/man4/siftr.4 Thu Mar 19 00:04:25 2015 (r280236) +++ head/share/man/man4/siftr.4 Thu Mar 19 00:23:16 2015 (r280237) @@ -342,6 +342,15 @@ A caveat: Zero '0' either represents a v not being set. There is no easy way to differentiate without looking at actual network interface card and drivers being used. .El +.Bl -tag -offset indent -width Va +.It Va 28 +Flow type for the connection. +Flowtype defines which protocol fields are hashed to produce the flowid. +A complete listing is available in +.Pa sys/mbuf.h +under +.Dv M_HASHTYPE_* . +.El .Pp The third type of log message is written to the file when the module is disabled and ceases collecting data from the running kernel. Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Thu Mar 19 00:04:25 2015 (r280236) +++ head/sys/netinet/siftr.c Thu Mar 19 00:23:16 2015 (r280237) @@ -229,6 +229,8 @@ struct pkt_node { int t_segqlen; /* Flowid for the connection. */ u_int flowid; + /* Flow type for the connection. */ + u_int flowtype; /* Link to next pkt_node in the list. */ STAILQ_ENTRY(pkt_node) nodes; }; @@ -488,7 +490,8 @@ siftr_process_pkt(struct pkt_node * pkt_ pkt_node->rcv_buf_cc, pkt_node->sent_inflight_bytes, pkt_node->t_segqlen, - pkt_node->flowid); + pkt_node->flowid, + pkt_node->flowtype); } else { /* IPv4 packet */ pkt_node->ip_laddr[0] = FIRST_OCTET(pkt_node->ip_laddr[3]); pkt_node->ip_laddr[1] = SECOND_OCTET(pkt_node->ip_laddr[3]); @@ -504,7 +507,7 @@ siftr_process_pkt(struct pkt_node * pkt_ log_buf->ae_bytesused = snprintf(log_buf->ae_data, MAX_LOG_MSG_LEN, "%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld," - "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u\n", + "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u,%u\n", direction[pkt_node->direction], pkt_node->hash, (intmax_t)pkt_node->tval.tv_sec, @@ -538,7 +541,8 @@ siftr_process_pkt(struct pkt_node * pkt_ pkt_node->rcv_buf_cc, pkt_node->sent_inflight_bytes, pkt_node->t_segqlen, - pkt_node->flowid); + pkt_node->flowid, + pkt_node->flowtype); #ifdef SIFTR_IPV6 } #endif @@ -792,6 +796,7 @@ siftr_siftdata(struct pkt_node *pn, stru pn->sent_inflight_bytes = tp->snd_max - tp->snd_una; pn->t_segqlen = tp->t_segqlen; pn->flowid = inp->inp_flowid; + pn->flowtype = inp->inp_flowtype; /* We've finished accessing the tcb so release the lock. */ if (inp_locally_locked) From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 00:24: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 E5FB5491; Thu, 19 Mar 2015 00:24:37 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (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 CBC7D3E3; Thu, 19 Mar 2015 00:24:37 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 3FE17105537; Wed, 18 Mar 2015 17:24:37 -0700 (PDT) Date: Wed, 18 Mar 2015 17:24:37 -0700 From: Hiren Panchasara To: Adrian Chadd Subject: Re: svn commit: r280233 - in head: share/man/man4 sys/netinet Message-ID: <20150319002437.GG53237@strugglingcoder.info> References: <201503182324.t2INOQI2056264@svn.freebsd.org> <20150318233605.GF53237@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XRI2XbIfl/05pQwm" Content-Disposition: inline In-Reply-To: <20150318233605.GF53237@strugglingcoder.info> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Thu, 19 Mar 2015 00:24:38 -0000 --XRI2XbIfl/05pQwm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 03/18/15 at 04:36P, Hiren Panchasara wrote: > On 03/18/15 at 04:26P, Adrian Chadd wrote: > > Sorry I didn't add this earlier. > >=20 > > There's a flowtype field, right? You should log that too. It'll tell > > you what the flowid field means. >=20 > Yeah, you are right. I should have added that in this commit. I'll do > that now. Added in r280237. cheers, Hiren --XRI2XbIfl/05pQwm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVChdEXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lmMUH/iJnkijgEWaRyhWqz+pjp3k+ oyzMg21cWLu7wr3ywx+wGPHiYPK7Y2LTzojG8zkplrDJZ5YITs8rvh0jqvQtwmXX KoOR8xvE+5fQXywlGi90gsMj6uKOfJcUc0iujXvlSGZc759OEAsfqDWKmpvNdqQb 7mAUUx4zZUdVygRCpJaqYLeRV1Y7N+YL50UokQXthw//ZB3E/HY1lxfubzJ8auBE 1cGmDdOjnqPSbhtfnHLppDzu1cu+zvWzhyNDE30RGybK5owx6JrtzPwe/qDsDek7 yssKmdMutZzfkMUHy76A+fr63JFLoCF5ZzkPYL2gFIo3Mdy7vVljEhli9V50RGA= =9tgn -----END PGP SIGNATURE----- --XRI2XbIfl/05pQwm-- From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 01:40:44 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 94D003F1; Thu, 19 Mar 2015 01:40:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76491DFD; Thu, 19 Mar 2015 01:40:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2J1ei1Z021350; Thu, 19 Mar 2015 01:40:44 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2J1ei0s021349; Thu, 19 Mar 2015 01:40:44 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201503190140.t2J1ei0s021349@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 19 Mar 2015 01:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280238 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Thu, 19 Mar 2015 01:40:44 -0000 Author: alc Date: Thu Mar 19 01:40:43 2015 New Revision: 280238 URL: https://svnweb.freebsd.org/changeset/base/280238 Log: Fix the root cause of the "vm_reserv_populate: reserv
is already promoted" panics. The sequence of events that leads to a panic is rather long and circuitous. First, suppose that process P has a promoted superpage S within vm object O that it can write to. Then, suppose that P forks, which leads to S being write protected. Now, before P's child exits, suppose that P writes to another virtual page within O. Since the pages within O are copy on write, a shadow object for O is created to house the new physical copy of the faulted on virtual page. Then, before P can fault on S, P's child exists. Now, when P faults on S, it will follow the "optimized" path for copy-on-write faults in vm_fault(), wherein the underlying physical page is moved from O to its shadow object rather than allocating a new page and copying the new page's contents from the old page. Moreover, suppose that every 4 KB physical page making up S is moved to the shadow object in this way. However, the optimized path does not move the underlying superpage reservation, which is the root cause of the panics! Ultimately, P performs vm_object_collapse() on O's shadow object, which destroys O and in doing so breaks any reservations still belonging to O. This leaves the reservation underlying S in an inconsistent state: It's simultaneously not in use and promoted. Breaking a reservation does not demote it because I never intended for a promoted reservation to be broken. It makes little sense. Finally, this inconsistency leads to an assertion failure the next time that the reservation is used. The failing assertion does not (currently) exist in FreeBSD 10.x or earlier. There, we will quietly break the promoted reservation. While illogical and unintended, breaking the reservation is essentially harmless. PR: 198163 Reviewed by: kib Tested by: pho X-MFC after: r267213 Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Thu Mar 19 00:23:16 2015 (r280237) +++ head/sys/vm/vm_fault.c Thu Mar 19 01:40:43 2015 (r280238) @@ -101,6 +101,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define PFBAK 4 #define PFFOR 4 @@ -858,6 +859,14 @@ vnode_locked: unlock_and_deallocate(&fs); goto RetryFault; } +#if VM_NRESERVLEVEL > 0 + /* + * Rename the reservation. + */ + vm_reserv_rename(fs.m, fs.first_object, + fs.object, OFF_TO_IDX( + fs.first_object->backing_object_offset)); +#endif vm_page_xbusy(fs.m); fs.first_m = fs.m; fs.m = NULL; From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 03:58: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 138FC84D; Thu, 19 Mar 2015 03:58: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 F3218D8F; Thu, 19 Mar 2015 03:58: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 t2J3wQxf085789; Thu, 19 Mar 2015 03:58:26 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2J3wQFO085788; Thu, 19 Mar 2015 03:58:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503190358.t2J3wQFO085788@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 19 Mar 2015 03:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280239 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Thu, 19 Mar 2015 03:58:27 -0000 Author: adrian Date: Thu Mar 19 03:58:25 2015 New Revision: 280239 URL: https://svnweb.freebsd.org/changeset/base/280239 Log: Fix the label search routine in geom_map to not trip up on '\0' bytes. * Just do the buf check early and fail out * If the offset being searched is: 00110000 00 b5 7e 45 61 e2 76 d3 c1 78 dd 15 95 cd 1f f1 |..~Ea.v..x......| .. and the match string is '.!/bin/sh' .. then it'll set the match string[0] to '\0', do a strncmp() against the read buffer, find it's matching two zero-length strings, and think that's where to start. MFC after: 2 weeks Modified: head/sys/geom/geom_map.c Modified: head/sys/geom/geom_map.c ============================================================================== --- head/sys/geom/geom_map.c Thu Mar 19 01:40:43 2015 (r280238) +++ head/sys/geom/geom_map.c Thu Mar 19 03:58:25 2015 (r280239) @@ -171,6 +171,13 @@ find_marker(struct g_consumer *cp, const roundup(strlen(search_key), sectorsize), NULL); g_topology_lock(); + /* + * Don't bother doing the rest if buf==NULL; eg derefencing + * to assemble 'key'. + */ + if (buf == NULL) + continue; + /* Wildcard, replace '.' with byte from data */ /* TODO: add support wildcard escape '\.' */ @@ -183,7 +190,8 @@ find_marker(struct g_consumer *cp, const } } - if (buf != NULL && strncmp(buf + search_offset % sectorsize, + /* Assume buf != NULL here */ + if (memcmp(buf + search_offset % sectorsize, key, strlen(search_key)) == 0) { g_free(buf); /* Marker found, so return their offset */ From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 10:15:55 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 DD3BB215; Thu, 19 Mar 2015 10:15:54 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED38966; Thu, 19 Mar 2015 10:15:54 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2JAFm2Q064270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 19 Mar 2015 12:15:48 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2JAFm2Q064270 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2JAFmVv064269; Thu, 19 Mar 2015 12:15:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 19 Mar 2015 12:15:48 +0200 From: Konstantin Belousov To: Alan Cox Subject: Re: svn commit: r280238 - head/sys/vm Message-ID: <20150319101548.GA2379@kib.kiev.ua> References: <201503190140.t2J1ei0s021349@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503190140.t2J1ei0s021349@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Thu, 19 Mar 2015 10:15:55 -0000 On Thu, Mar 19, 2015 at 01:40:44AM +0000, Alan Cox wrote: > Author: alc > Date: Thu Mar 19 01:40:43 2015 > New Revision: 280238 > URL: https://svnweb.freebsd.org/changeset/base/280238 > > Log: > Fix the root cause of the "vm_reserv_populate: reserv
is already > promoted" panics. The sequence of events that leads to a panic is rather > long and circuitous. First, suppose that process P has a promoted > superpage S within vm object O that it can write to. Then, suppose that P > forks, which leads to S being write protected. Now, before P's child > exits, suppose that P writes to another virtual page within O. Since the > pages within O are copy on write, a shadow object for O is created to > house the new physical copy of the faulted on virtual page. Then, before > P can fault on S, P's child exists. Now, when P faults on S, it will > follow the "optimized" path for copy-on-write faults in vm_fault(), > wherein the underlying physical page is moved from O to its shadow object > rather than allocating a new page and copying the new page's contents from > the old page. Moreover, suppose that every 4 KB physical page making up S > is moved to the shadow object in this way. However, the optimized path > does not move the underlying superpage reservation, which is the root > cause of the panics! Ultimately, P performs vm_object_collapse() on O's > shadow object, which destroys O and in doing so breaks any reservations > still belonging to O. This leaves the reservation underlying S in an > inconsistent state: It's simultaneously not in use and promoted. Breaking > a reservation does not demote it because I never intended for a promoted > reservation to be broken. It makes little sense. Finally, this > inconsistency leads to an assertion failure the next time that the > reservation is used. > > The failing assertion does not (currently) exist in FreeBSD 10.x or > earlier. There, we will quietly break the promoted reservation. While > illogical and unintended, breaking the reservation is essentially > harmless. > > PR: 198163 > Reviewed by: kib > Tested by: pho > X-MFC after: r267213 > Sponsored by: EMC / Isilon Storage Division Note that r267213 is already in stable/10, see r269072. It was needed for the rewrite of the resident page count reporting for kern.proc.vmmap. From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 11:34:52 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 7A16420B; Thu, 19 Mar 2015 11:34:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64FBF1DF; Thu, 19 Mar 2015 11:34:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2JBYqfN096430; Thu, 19 Mar 2015 11:34:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2JBYqDT096429; Thu, 19 Mar 2015 11:34:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503191134.t2JBYqDT096429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 19 Mar 2015 11:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280248 - head/sys/contrib/vchiq/interface/vchiq_arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Thu, 19 Mar 2015 11:34:52 -0000 Author: andrew Date: Thu Mar 19 11:34:51 2015 New Revision: 280248 URL: https://svnweb.freebsd.org/changeset/base/280248 Log: Use the dsb macro to use the correct instruction when building for ARMv7. Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c Thu Mar 19 11:24:07 2015 (r280247) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c Thu Mar 19 11:34:51 2015 (r280248) @@ -112,7 +112,7 @@ remote_event_signal(REMOTE_EVENT_T *even has completed */ if (event->armed) { /* trigger vc interrupt */ - __asm __volatile ("mcr p15, 0, %0, c7, c10, 4" : : "r" (0) : "memory"); + dsb(); vchiq_write_4(0x48, 0); } } From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 12:22:59 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 2B9D2D6D; Thu, 19 Mar 2015 12:22:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E037974; Thu, 19 Mar 2015 12:22:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2JCMwEL019671; Thu, 19 Mar 2015 12:22:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2JCMwWl019669; Thu, 19 Mar 2015 12:22:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503191222.t2JCMwWl019669@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 19 Mar 2015 12:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280249 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.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: Thu, 19 Mar 2015 12:22:59 -0000 Author: mav Date: Thu Mar 19 12:22:57 2015 New Revision: 280249 URL: https://svnweb.freebsd.org/changeset/base/280249 Log: Add camcontrol subcommands to control APM and AAM levels. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Thu Mar 19 11:34:51 2015 (r280248) +++ head/sbin/camcontrol/camcontrol.8 Thu Mar 19 12:22:57 2015 (r280249) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 31, 2014 +.Dd March 19, 2015 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -239,6 +239,16 @@ .Op device id .Op generic args .Nm +.Ic apm +.Op device id +.Op generic args +.Op Fl l Ar level +.Nm +.Ic aam +.Op device id +.Op generic args +.Op Fl l Ar level +.Nm .Ic fwdownload .Op device id .Op generic args @@ -1291,6 +1301,19 @@ Value 0 disables timer. Put ATA device into SLEEP state. Note that the only way get device out of this state may be reset. +.It Ic apm +It optional parameter +.Pq Fl l +specified, enables and sets advanced power management level, where +1 -- minimum power, 127 -- maximum performance with standby, +128 -- minimum power without standby, 254 -- maximum performance. +If not specified -- APM is disabled. +.It Ic aam +It optional parameter +.Pq Fl l +specified, enables and sets automatic acoustic management level, where +1 -- minimum noise, 254 -- maximum performance. +If not specified -- AAM is disabled. .It Ic security Update or report security settings, using an ATA identify command (0xec). By default, Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Thu Mar 19 11:34:51 2015 (r280248) +++ head/sbin/camcontrol/camcontrol.c Thu Mar 19 12:22:57 2015 (r280249) @@ -96,7 +96,9 @@ typedef enum { CAM_CMD_SECURITY = 0x0000001d, CAM_CMD_HPA = 0x0000001e, CAM_CMD_SANITIZE = 0x0000001f, - CAM_CMD_PERSIST = 0x00000020 + CAM_CMD_PERSIST = 0x00000020, + CAM_CMD_APM = 0x00000021, + CAM_CMD_AAM = 0x00000022 } cam_cmdmask; typedef enum { @@ -216,6 +218,8 @@ static struct camcontrol_opts option_tab {"idle", CAM_CMD_IDLE, CAM_ARG_NONE, "t:"}, {"standby", CAM_CMD_STANDBY, CAM_ARG_NONE, "t:"}, {"sleep", CAM_CMD_SLEEP, CAM_ARG_NONE, ""}, + {"apm", CAM_CMD_APM, CAM_ARG_NONE, "l:"}, + {"aam", CAM_CMD_AAM, CAM_ARG_NONE, "l:"}, {"fwdownload", CAM_CMD_DOWNLOAD_FW, CAM_ARG_NONE, "f:ys"}, {"security", CAM_CMD_SECURITY, CAM_ARG_NONE, "d:e:fh:k:l:qs:T:U:y"}, {"hpa", CAM_CMD_HPA, CAM_ARG_NONE, "Pflp:qs:U:y"}, @@ -1406,7 +1410,7 @@ atacapprint(struct ata_params *parm) parm->enabled.command2 & ATA_SUPPORT_APM ? "yes" : "no"); if (parm->support.command2 & ATA_SUPPORT_APM) { printf(" %d/0x%02X\n", - parm->apm_value, parm->apm_value); + parm->apm_value & 0xff, parm->apm_value & 0xff); } else printf("\n"); printf("automatic acoustic management %s %s", @@ -7983,6 +7987,68 @@ atapm(struct cam_device *device, int arg return (retval); } +static int +ataaxm(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout) +{ + union ccb *ccb; + int retval = 0; + int l = -1; + int c; + u_char cmd, sc; + + ccb = cam_getccb(device); + + if (ccb == NULL) { + warnx("%s: error allocating ccb", __func__); + return (1); + } + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch (c) { + case 'l': + l = atoi(optarg); + break; + default: + break; + } + } + sc = 0; + if (strcmp(argv[1], "apm") == 0) { + if (l == -1) + cmd = 0x85; + else { + cmd = 0x05; + sc = l; + } + } else /* aam */ { + if (l == -1) + cmd = 0xC2; + else { + cmd = 0x42; + sc = l; + } + } + + retval = ata_do_28bit_cmd(device, + ccb, + /*retries*/retry_count, + /*flags*/CAM_DIR_NONE, + /*protocol*/AP_PROTO_NON_DATA, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/ATA_SETFEATURES, + /*features*/cmd, + /*lba*/0, + /*sector_count*/sc, + /*data_ptr*/NULL, + /*dxfer_len*/0, + /*timeout*/timeout ? timeout : 30 * 1000, + /*quiet*/1); + + cam_freeccb(ccb); + return (retval); +} + #endif /* MINIMALISTIC */ void @@ -8040,6 +8106,8 @@ usage(int printlong) " camcontrol idle [dev_id][generic args][-t time]\n" " camcontrol standby [dev_id][generic args][-t time]\n" " camcontrol sleep [dev_id][generic args]\n" +" camcontrol apm [dev_id][generic args][-l level]\n" +" camcontrol aam [dev_id][generic args][-l level]\n" " camcontrol fwdownload [dev_id][generic args] <-f fw_image> [-y][-s]\n" " camcontrol security [dev_id][generic args]\n" " <-d pwd | -e pwd | -f | -h pwd | -k pwd>\n" @@ -8560,6 +8628,11 @@ main(int argc, char **argv) error = atapm(cam_dev, argc, argv, combinedopt, retry_count, timeout); break; + case CAM_CMD_APM: + case CAM_CMD_AAM: + error = ataaxm(cam_dev, argc, argv, + combinedopt, retry_count, timeout); + break; case CAM_CMD_SECURITY: error = atasecurity(cam_dev, retry_count, timeout, argc, argv, combinedopt); From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 13:00: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 81FCF59E; Thu, 19 Mar 2015 13:00: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 6D315D25; Thu, 19 Mar 2015 13:00: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 t2JD037Y034913; Thu, 19 Mar 2015 13:00:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2JD03BW034912; Thu, 19 Mar 2015 13:00:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503191300.t2JD03BW034912@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 19 Mar 2015 13:00:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280252 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.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: Thu, 19 Mar 2015 13:00:03 -0000 Author: andrew Date: Thu Mar 19 13:00:02 2015 New Revision: 280252 URL: https://svnweb.freebsd.org/changeset/base/280252 Log: Fix building ixgbe with gcc, it doesn't like nested extern declarations. The fix is to move the extern declaration ix_crcstrip out of ixgbe_setup_hw_rsc. Modified: head/sys/dev/ixgbe/ix_txrx.c Modified: head/sys/dev/ixgbe/ix_txrx.c ============================================================================== --- head/sys/dev/ixgbe/ix_txrx.c Thu Mar 19 12:49:55 2015 (r280251) +++ head/sys/dev/ixgbe/ix_txrx.c Thu Mar 19 13:00:02 2015 (r280252) @@ -50,6 +50,8 @@ #include #include #include + +extern int ix_crcstrip; #endif /* @@ -1240,7 +1242,6 @@ ixgbe_setup_hw_rsc(struct rx_ring *rxr) rdrxctl = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); rdrxctl &= ~IXGBE_RDRXCTL_RSCFRSTSIZE; #ifdef DEV_NETMAP /* crcstrip is optional in netmap */ - extern int ix_crcstrip; if (adapter->ifp->if_capenable & IFCAP_NETMAP && !ix_crcstrip) #endif /* DEV_NETMAP */ rdrxctl |= IXGBE_RDRXCTL_CRCSTRIP; From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 13:03: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 AC305748; Thu, 19 Mar 2015 13:03:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9789ADDB; Thu, 19 Mar 2015 13:03:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2JD3xbU038782; Thu, 19 Mar 2015 13:03:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2JD3xpS038781; Thu, 19 Mar 2015 13:03:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503191303.t2JD3xpS038781@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Mar 2015 13:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280253 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.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: Thu, 19 Mar 2015 13:03:59 -0000 Author: kib Date: Thu Mar 19 13:03:58 2015 New Revision: 280253 URL: https://svnweb.freebsd.org/changeset/base/280253 Log: Fix syntax error. Review: https://reviews.freebsd.org/D1892 Found by: neel Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/x86/iommu/intel_reg.h Modified: head/sys/x86/iommu/intel_reg.h ============================================================================== --- head/sys/x86/iommu/intel_reg.h Thu Mar 19 13:00:02 2015 (r280252) +++ head/sys/x86/iommu/intel_reg.h Thu Mar 19 13:03:58 2015 (r280253) @@ -103,7 +103,7 @@ typedef struct dmar_irte { #define DMAR_IRTE1_IM_POSTED (1ULL << 15) /* Posted */ /* Delivery Mode */ #define DMAR_IRTE1_DLM_FM (0ULL << 5) -#define DMAR_IRTE1_DLM_LP (1ULL << 5 +#define DMAR_IRTE1_DLM_LP (1ULL << 5) #define DMAR_IRTE1_DLM_SMI (2ULL << 5) #define DMAR_IRTE1_DLM_NMI (4ULL << 5) #define DMAR_IRTE1_DLM_INIT (5ULL << 5) From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 13:05: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 8E57C8B1; Thu, 19 Mar 2015 13:05: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 79953DF1; Thu, 19 Mar 2015 13:05: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 t2JD5u9O039092; Thu, 19 Mar 2015 13:05:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2JD5ueC039091; Thu, 19 Mar 2015 13:05:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503191305.t2JD5ueC039091@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Mar 2015 13:05:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280254 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.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: Thu, 19 Mar 2015 13:05:56 -0000 Author: kib Date: Thu Mar 19 13:05:55 2015 New Revision: 280254 URL: https://svnweb.freebsd.org/changeset/base/280254 Log: Provide definitions for all descriptors types in the DMAR invalidation queue. They are for first-level translations and device TLB. Review: https://reviews.freebsd.org/D1892 Reviewed by: neel Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_reg.h Modified: head/sys/x86/iommu/intel_reg.h ============================================================================== --- head/sys/x86/iommu/intel_reg.h Thu Mar 19 13:03:58 2015 (r280253) +++ head/sys/x86/iommu/intel_reg.h Thu Mar 19 13:05:55 2015 (r280254) @@ -180,7 +180,7 @@ typedef struct dmar_irte { /* IOTLB Register Offset */ #define DMAR_ECAP_SC (1 << 7) /* Snoop Control */ #define DMAR_ECAP_PT (1 << 6) /* Pass Through */ -#define DMAR_ECAP_EIM (1 << 4) /* Extended Interrupt Mode */ +#define DMAR_ECAP_EIM (1 << 4) /* Extended Interrupt Mode (x2APIC) */ #define DMAR_ECAP_IR (1 << 3) /* Interrupt Remapping */ #define DMAR_ECAP_DI (1 << 2) /* Device IOTLB */ #define DMAR_ECAP_QI (1 << 1) /* Queued Invalidation */ @@ -320,8 +320,8 @@ typedef struct dmar_irte { #define DMAR_IQ_DESCR_SZ (1 << DMAR_IQ_DESCR_SZ_SHIFT) /* Descriptor size */ -#define DMAR_IQ_DESCR_CTX_INV 0x1 /* Context-cache Invalidate - Descriptor */ +/* Context-cache Invalidate Descriptor */ +#define DMAR_IQ_DESCR_CTX_INV 0x1 #define DMAR_IQ_DESCR_CTX_GLOB (0x1 << 4) /* Granularity: Global */ #define DMAR_IQ_DESCR_CTX_DOM (0x2 << 4) /* Granularity: Domain */ #define DMAR_IQ_DESCR_CTX_DEV (0x3 << 4) /* Granularity: Device */ @@ -329,7 +329,8 @@ typedef struct dmar_irte { #define DMAR_IQ_DESCR_CTX_SRC(x) (((uint64_t)(x)) << 32) /* Source Id */ #define DMAR_IQ_DESCR_CTX_FM(x) (((uint64_t)(x)) << 48) /* Function Mask */ -#define DMAR_IQ_DESCR_IOTLB_INV 0x2 /* IOTLB Invalidate Descriptor */ +/* IOTLB Invalidate Descriptor */ +#define DMAR_IQ_DESCR_IOTLB_INV 0x2 #define DMAR_IQ_DESCR_IOTLB_GLOB (0x1 << 4) /* Granularity: Global */ #define DMAR_IQ_DESCR_IOTLB_DOM (0x2 << 4) /* Granularity: Domain */ #define DMAR_IQ_DESCR_IOTLB_PAGE (0x3 << 4) /* Granularity: Page */ @@ -337,17 +338,31 @@ typedef struct dmar_irte { #define DMAR_IQ_DESCR_IOTLB_DR (1 << 7) /* Drain Reads */ #define DMAR_IQ_DESCR_IOTLB_DID(x) (((uint32_t)(x)) << 16) /* Domain Id */ -#define DMAR_IQ_DESCR_IEC_INV 0x4 /* Invalidate Interrupt Entry Cache */ +/* Device-TLB Invalidate Descriptor */ +#define DMAR_IQ_DESCR_DTLB_INV 0x3 + +/* Invalidate Interrupt Entry Cache */ +#define DMAR_IQ_DESCR_IEC_INV 0x4 #define DMAR_IQ_DESCR_IEC_IDX (1 << 4) /* Index-Selective Invalidation */ #define DMAR_IQ_DESCR_IEC_IIDX(x) (((uint64_t)x) << 32) /* Interrupt Index */ #define DMAR_IQ_DESCR_IEC_IM(x) ((x) << 27) /* Index Mask */ -#define DMAR_IQ_DESCR_WAIT_ID 0x5 /* Invalidation Wait Descriptor */ +/* Invalidation Wait Descriptor */ +#define DMAR_IQ_DESCR_WAIT_ID 0x5 #define DMAR_IQ_DESCR_WAIT_IF (1 << 4) /* Interrupt Flag */ #define DMAR_IQ_DESCR_WAIT_SW (1 << 5) /* Status Write */ #define DMAR_IQ_DESCR_WAIT_FN (1 << 6) /* Fence */ #define DMAR_IQ_DESCR_WAIT_SD(x) (((uint64_t)(x)) << 32) /* Status Data */ +/* Extended IOTLB Invalidate Descriptor */ +#define DMAR_IQ_DESCR_EIOTLB_INV 0x6 + +/* PASID-Cache Invalidate Descriptor */ +#define DMAR_IQ_DESCR_PASIDC_INV 0x7 + +/* Extended Device-TLB Invalidate Descriptor */ +#define DMAR_IQ_DESCR_EDTLB_INV 0x8 + /* Invalidation Queue Head register */ #define DMAR_IQH_REG 0x80 #define DMAR_IQH_MASK 0x7fff0 /* Next cmd index mask */ From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 13:53:53 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 C889461F; Thu, 19 Mar 2015 13:53:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1580332; Thu, 19 Mar 2015 13:53:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2JDrr3F062508; Thu, 19 Mar 2015 13:53:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2JDrmCh062483; Thu, 19 Mar 2015 13:53:48 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503191353.t2JDrmCh062483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 19 Mar 2015 13:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280259 - in head: . etc/etc.aarch64 lib/csu/aarch64 lib/libc/aarch64 lib/libthr/arch/aarch64 lib/msun/aarch64 share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Thu, 19 Mar 2015 13:53:53 -0000 Author: andrew Date: Thu Mar 19 13:53:47 2015 New Revision: 280259 URL: https://svnweb.freebsd.org/changeset/base/280259 Log: Start to import support for the AArch64 architecture from ARM. This change only adds support for kernel-toolchain, however it is expected further changes to add kernel and userland support will be committed as they are reviewed. As our copy of binutils is too old the devel/aarch64-binutils port needs to be installed to pull in a linker. To build either TARGET needs to be set to arm64, or TARGET_ARCH set to aarch64. The latter is set so uname -p will return aarch64 as existing third party software expects this. Differential Revision: https://reviews.freebsd.org/D2005 Relnotes: Yes Sponsored by: The FreeBSD Foundation Added: head/etc/etc.aarch64/ head/etc/etc.aarch64/ttys (contents, props changed) head/lib/csu/aarch64/ head/lib/csu/aarch64/Makefile (contents, props changed) head/lib/csu/aarch64/crt1.c (contents, props changed) head/lib/csu/aarch64/crti.S (contents, props changed) head/lib/csu/aarch64/crtn.S (contents, props changed) head/lib/libc/aarch64/ head/lib/libc/aarch64/Makefile.inc (contents, props changed) head/lib/libthr/arch/aarch64/ head/lib/libthr/arch/aarch64/Makefile.inc (contents, props changed) head/lib/msun/aarch64/ head/lib/msun/aarch64/Makefile.inc (contents, props changed) head/lib/msun/aarch64/fenv.h (contents, props changed) Modified: head/Makefile head/Makefile.inc1 head/share/mk/bsd.endian.mk head/share/mk/src.opts.mk Modified: head/Makefile ============================================================================== --- head/Makefile Thu Mar 19 13:37:36 2015 (r280258) +++ head/Makefile Thu Mar 19 13:53:47 2015 (r280259) @@ -165,10 +165,10 @@ _MAKE= PATH=${PATH} ${SUB_MAKE} -f Makef # Guess machine architecture from machine type, and vice versa. .if !defined(TARGET_ARCH) && defined(TARGET) -_TARGET_ARCH= ${TARGET:S/pc98/i386/} +_TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/} +_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/aarch64/arm64/} .endif .if defined(TARGET) && !defined(_TARGET) _TARGET=${TARGET} Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Mar 19 13:37:36 2015 (r280258) +++ head/Makefile.inc1 Thu Mar 19 13:53:47 2015 (r280259) @@ -149,7 +149,7 @@ SRCRELDATE!= awk '/^\#define[[:space:]]* VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} .endif -KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm armv6hf/arm i386 i386/pc98 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 +KNOWN_ARCHES?= aarch64/arm64 amd64 arm armeb/arm armv6/arm armv6hf/arm i386 i386/pc98 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 .if ${TARGET} == ${TARGET_ARCH} _t= ${TARGET} .else Added: head/etc/etc.aarch64/ttys ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/etc.aarch64/ttys Thu Mar 19 13:53:47 2015 (r280259) @@ -0,0 +1,49 @@ +# +# $FreeBSD$ +# @(#)ttys 5.1 (Berkeley) 4/17/89 +# +# This file specifies various information about terminals on the system. +# It is used by several different programs. Common entries for the +# various columns include: +# +# name The name of the terminal device. +# +# getty The program to start running on the terminal. Typically a +# getty program, as the name implies. Other common entries +# include none, when no getty is needed, and xdm, to start the +# X Window System. +# +# type The initial terminal type for this port. For hardwired +# terminal lines, this will contain the type of terminal used. +# For virtual consoles, the correct type is typically xterm. +# Other common values include dialup for incoming modem ports, and +# unknown when the terminal type cannot be predetermined. +# +# status Must be on or off. If on, init will run the getty program on +# the specified port. If the word "secure" appears, this tty +# allows root login. +# +# name getty type status comments +# +# If console is marked "insecure", then init will ask for the root password +# when going to single-user mode. +console none unknown off secure +# +ttyv0 "/usr/libexec/getty Pc" xterm off secure +# Virtual terminals +ttyv1 "/usr/libexec/getty Pc" xterm off secure +ttyv2 "/usr/libexec/getty Pc" xterm off secure +ttyv3 "/usr/libexec/getty Pc" xterm off secure +ttyv4 "/usr/libexec/getty Pc" xterm off secure +ttyv5 "/usr/libexec/getty Pc" xterm off secure +ttyv6 "/usr/libexec/getty Pc" xterm off secure +ttyv7 "/usr/libexec/getty Pc" xterm off secure +#ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure +# Serial terminals +# The 'dialup' keyword identifies dialin lines to login, fingerd etc. +ttyu0 "/usr/libexec/getty std.9600" vt100 on secure +ttyu1 "/usr/libexec/getty std.9600" dialup off secure +ttyu2 "/usr/libexec/getty std.9600" dialup off secure +ttyu3 "/usr/libexec/getty std.9600" dialup off secure +# Dumb console +dcons "/usr/libexec/getty std.9600" vt100 off secure Added: head/lib/csu/aarch64/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/csu/aarch64/Makefile Thu Mar 19 13:53:47 2015 (r280259) @@ -0,0 +1,44 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../common + +SRCS= crt1.c crti.S crtn.S +OBJS= ${SRCS:N*.h:R:S/$/.o/g} +OBJS+= Scrt1.o gcrt1.o +CFLAGS+= -I${.CURDIR}/../common \ + -I${.CURDIR}/../../libc/include + +all: ${OBJS} + +CLEANFILES= ${OBJS} +CLEANFILES+= crt1.s gcrt1.s Scrt1.s + +# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not +# directly compiled to .o files. + +crt1.s: crt1.c + ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c + sed ${SED_FIX_NOTE} ${.TARGET} + +crt1.o: crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s + +gcrt1.s: crt1.c + ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c + sed ${SED_FIX_NOTE} ${.TARGET} + +gcrt1.o: gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s + +Scrt1.s: crt1.c + ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c + sed ${SED_FIX_NOTE} ${.TARGET} + +Scrt1.o: Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s + +realinstall: + ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${OBJS} ${DESTDIR}${LIBDIR} + +.include Added: head/lib/csu/aarch64/crt1.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/csu/aarch64/crt1.c Thu Mar 19 13:53:47 2015 (r280259) @@ -0,0 +1,89 @@ +/* LINTLIBRARY */ +/*- + * Copyright 1996-1998 John D. Polstra. + * Copyright 2014 Andrew Turner. + * Copyright 2014-2015 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Andrew Turner + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifndef lint +#ifndef __GNUC__ +#error "GCC is needed to compile this file" +#endif +#endif /* lint */ + +#include + +#include "libc_private.h" +#include "crtbrand.c" +#include "ignore_init.c" + +#ifdef GCRT +extern void _mcleanup(void); +extern void monstartup(void *, void *); +extern int eprol; +extern int etext; +#endif + +void __start(int, char **, char **, void (*)(void)); + +/* The entry function. */ +__asm(" .text \n" +" .align 0 \n" +" .globl _start \n" +" _start: \n" +" mov x3, x2 \n" /* cleanup */ +" ldr x0, [sp] \n" /* Load argc */ +" add x1, sp, #8 \n" /* load argv */ +" add x2, x1, x0, lsl #3 \n" /* env is after argv */ +" add x2, x2, #8 \n" /* argv is null terminated */ +" b __start "); + + +/* The entry function. */ +void +__start(int argc, char *argv[], char *env[], void (*cleanup)(void)) +{ + + handle_argv(argc, argv, env); + + if (&_DYNAMIC != NULL) + atexit(cleanup); + else + _init_tls(); + +#ifdef GCRT + atexit(_mcleanup); + monstartup(&eprol, &etext); +__asm__("eprol:"); +#endif + + handle_static_init(argc, argv, env); + exit(main(argc, argv, env)); +} Added: head/lib/csu/aarch64/crti.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/csu/aarch64/crti.S Thu Mar 19 13:53:47 2015 (r280259) @@ -0,0 +1,48 @@ +/*- + * Copyright 2001 David E. O'Brien + * Copyright 2014 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Andrew Turner + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + + .section .init,"ax",@progbits + .align 4 + .globl _init + .type _init,@function +_init: + sub sp, sp, #16 + str lr, [sp] + + .section .fini,"ax",@progbits + .align 4 + .globl _fini + .type _fini,@function +_fini: + sub sp, sp, #16 + str lr, [sp] + Added: head/lib/csu/aarch64/crtn.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/csu/aarch64/crtn.S Thu Mar 19 13:53:47 2015 (r280259) @@ -0,0 +1,44 @@ +/*- + * Copyright 2001 David E. O'Brien + * Copyright 2014 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Andrew Turner + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + + .section .init,"ax",@progbits + ldr lr, [sp] + add sp, sp, #16 + ret + + + .section .fini,"ax",@progbits + ldr lr, [sp] + add sp, sp, #16 + ret + + .section .note.GNU-stack,"",%progbits Added: head/lib/libc/aarch64/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/Makefile.inc Thu Mar 19 13:53:47 2015 (r280259) @@ -0,0 +1,5 @@ +# $FreeBSD$ +# +# Machine dependent definitions for the arm 64-bit architecture. +# + Added: head/lib/libthr/arch/aarch64/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libthr/arch/aarch64/Makefile.inc Thu Mar 19 13:53:47 2015 (r280259) @@ -0,0 +1,2 @@ +# $FreeBSD$ + Added: head/lib/msun/aarch64/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/aarch64/Makefile.inc Thu Mar 19 13:53:47 2015 (r280259) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +LDBL_PREC = 113 + Added: head/lib/msun/aarch64/fenv.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/aarch64/fenv.h Thu Mar 19 13:53:47 2015 (r280259) @@ -0,0 +1,245 @@ +/*- + * Copyright (c) 2004-2005 David Schultz + * 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 _FENV_H_ +#define _FENV_H_ + +#include + +#ifndef __fenv_static +#define __fenv_static static +#endif + +typedef __uint64_t fenv_t; +typedef __uint64_t fexcept_t; + +/* Exception flags */ +#define FE_INVALID 0x00000001 +#define FE_DIVBYZERO 0x00000002 +#define FE_OVERFLOW 0x00000004 +#define FE_UNDERFLOW 0x00000008 +#define FE_INEXACT 0x00000010 +#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \ + FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW) + +/* + * Rounding modes + * + * We can't just use the hardware bit values here, because that would + * make FE_UPWARD and FE_DOWNWARD negative, which is not allowed. + */ +#define FE_TONEAREST 0x0 +#define FE_UPWARD 0x1 +#define FE_DOWNWARD 0x2 +#define FE_TOWARDZERO 0x3 +#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ + FE_UPWARD | FE_TOWARDZERO) +#define _ROUND_SHIFT 22 + +__BEGIN_DECLS + +/* Default floating-point environment */ +extern const fenv_t __fe_dfl_env; +#define FE_DFL_ENV (&__fe_dfl_env) + +/* We need to be able to map status flag positions to mask flag positions */ +#define _FPUSW_SHIFT 8 +#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT) + +#define __mrs_fpcr(__r) __asm __volatile("mrs %0, fpcr" : : "r" (__r)) +#define __msr_fpcr(__r) __asm __volatile("msr fpcr, %0" : "=r" (*(__r))) + +#define __mrs_fpsr(__r) __asm __volatile("mrs %0, fpsr" : : "r" (__r)) +#define __msr_fpsr(__r) __asm __volatile("msr fpsr, %0" : "=r" (*(__r))) + +__fenv_static __inline int +feclearexcept(int __excepts) +{ + fexcept_t __r; + + __mrs_fpsr(&__r); + __r &= ~__excepts; + __msr_fpsr(__r); + return (0); +} + +__fenv_static inline int +fegetexceptflag(fexcept_t *__flagp, int __excepts) +{ + fexcept_t __r; + + __mrs_fpsr(&__r); + *__flagp = __r & __excepts; + return (0); +} + +__fenv_static inline int +fesetexceptflag(const fexcept_t *__flagp, int __excepts) +{ + fexcept_t __r; + + __mrs_fpsr(&__r); + __r &= ~__excepts; + __r |= *__flagp & __excepts; + __msr_fpsr(__r); + return (0); +} + +__fenv_static inline int +feraiseexcept(int __excepts) +{ + fexcept_t __r; + + __mrs_fpsr(&__r); + __r |= __excepts; + __msr_fpsr(__r); + return (0); +} + +__fenv_static inline int +fetestexcept(int __excepts) +{ + fexcept_t __r; + + __mrs_fpsr(&__r); + return (__r & __excepts); +} + +__fenv_static inline int +fegetround(void) +{ + fenv_t __r; + + __mrs_fpcr(&__r); + return ((__r >> _ROUND_SHIFT) & _ROUND_MASK); +} + +__fenv_static inline int +fesetround(int __round) +{ + fenv_t __r; + + if (__round & ~_ROUND_MASK) + return (-1); + __mrs_fpcr(&__r); + __r &= ~(_ROUND_MASK << _ROUND_SHIFT); + __r |= __round << _ROUND_SHIFT; + __msr_fpcr(__r); + return (0); +} + +__fenv_static inline int +fegetenv(fenv_t *__envp) +{ + + __mrs_fpcr(&__r); + *__envp = __r & _ENABLE_MASK; + + __mrs_fpsr(&__r); + *__envp |= __r & (FE_ALL_EXCEPT | (_ROUND_MASK << _ROUND_SHIFT)); + + return (0); +} + +__fenv_static inline int +feholdexcept(fenv_t *__envp) +{ + fenv_t __r; + + __mrs_fpcr(&__r); + *__envp = __r & _ENABLE_MASK; + __r &= ~(_ENABLE_MASK); + __msr_fpcr(__r); + + __mrs_fpsr(&__r); + *__envp |= __r & (FE_ALL_EXCEPT | (_ROUND_MASK << _ROUND_SHIFT)); + r &= ~(_ENABLE_MASK); + __msr_fpsr(__r); + return (0); +} + +__fenv_static inline int +fesetenv(const fenv_t *__envp) +{ + + __msr_fpcr((*__envp) & _ENABLE_MASK); + __msr_fpsr((*__envp) & (FE_ALL_EXCEPT | (_ROUND_MASK << _ROUND_SHIFT)); + return (0); +} + +__fenv_static inline int +feupdateenv(const fenv_t *__envp) +{ + fexcept_t __r; + + __mrs_fpsr(&__r); + fesetenv(__envp); + feraiseexcept(__r & FE_ALL_EXCEPT); + return (0); +} + +#if __BSD_VISIBLE + +/* We currently provide no external definitions of the functions below. */ + +static inline int +feenableexcept(int __mask) +{ + fenv_t __old_r, __new_r; + + __mrs_fpcr(&__old_r); + __new_r = __old_r | ((__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT); + __msr_fpcr(__new_r); + return ((__old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); +} + +static inline int +fedisableexcept(int __mask) +{ + fenv_t __old_r, __new_r; + + __mrs_fpcr(&__old_r); + __new_r = __old_r & ~((__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT); + __msr_fpcr(__new_r); + return ((__old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); +} + +static inline int +fegetexcept(void) +{ + fenv_t __r; + + __mrs_fpcr(&__r); + return ((__r & _ENABLE_MASK) >> _FPUSW_SHIFT); +} + +#endif /* __BSD_VISIBLE */ + +__END_DECLS + +#endif /* !_FENV_H_ */ Modified: head/share/mk/bsd.endian.mk ============================================================================== --- head/share/mk/bsd.endian.mk Thu Mar 19 13:37:36 2015 (r280258) +++ head/share/mk/bsd.endian.mk Thu Mar 19 13:53:47 2015 (r280259) @@ -1,6 +1,7 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} == "amd64" || \ +.if ${MACHINE_ARCH} == "aarch64" || \ + ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386" || \ (${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} == "") || \ ${MACHINE_ARCH:Mmips*el} != "" Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Thu Mar 19 13:37:36 2015 (r280258) +++ head/share/mk/src.opts.mk Thu Mar 19 13:53:47 2015 (r280259) @@ -215,8 +215,8 @@ __TT=${MACHINE} # If the compiler is not C++11 capable, disable clang and use gcc instead. __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC -.elif ${__T} == "amd64" || ${__T} == "i386" -# On x86, clang is enabled, and will be installed as the default cc. +.elif ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" +# On x86 and arm64, clang is enabled, and will be installed as the default cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX .elif ${__TT} == "arm" && ${__T:Marm*eb*} == "" @@ -233,6 +233,9 @@ __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CL __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .endif +.if ${__T} == "aarch64" +BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GDB +.endif .include From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 13:57:53 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 981787AF; Thu, 19 Mar 2015 13:57:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8146E35C; Thu, 19 Mar 2015 13:57:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2JDvrkT063091; Thu, 19 Mar 2015 13:57:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2JDvl9A063067; Thu, 19 Mar 2015 13:57:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503191357.t2JDvl9A063067@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 19 Mar 2015 13:57:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280260 - in head/sys: amd64/include conf i386/include x86/include x86/iommu x86/x86 X-SVN-Group: head MIME-Version: 1.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: Thu, 19 Mar 2015 13:57:53 -0000 Author: kib Date: Thu Mar 19 13:57:47 2015 New Revision: 280260 URL: https://svnweb.freebsd.org/changeset/base/280260 Log: Use VT-d interrupt remapping block (IR) to perform FSB messages translation. In particular, despite IO-APICs only take 8bit apic id, IR translation structures accept 32bit APIC Id, which allows x2APIC mode to function properly. Extend msi_cpu of struct msi_intrsrc and io_cpu of ioapic_intsrc to full int from one byte. KPI of IR is isolated into the x86/iommu/iommu_intrmap.h, to avoid bringing all dmar headers into interrupt code. The non-PCI(e) devices which generate message interrupts on FSB require special handling. The HPET FSB interrupts are remapped, while DMAR interrupts are not. For each msi and ioapic interrupt source, the iommu cookie is added, which is in fact index of the IRE (interrupt remap entry) in the IR table. Cookie is made at the source allocation time, and then used at the map time to fill both IRE and device registers. The MSI address/data registers and IO-APIC redirection registers are programmed with the special values which are recognized by IR and used to restore the IRE index, to find proper delivery mode and target. Map all MSI interrupts in the block when msi_map() is called. Since an interrupt source setup and dismantle code are done in the non-sleepable context, flushing interrupt entries cache in the IR hardware, which is done async and ideally waits for the interrupt, requires busy-wait for queue to drain. The dmar_qi_wait_for_seq() is modified to take a boolean argument requesting busy-wait for the written sequence number instead of waiting for interrupt. Some interrupts are configured before IR is initialized, e.g. ACPI SCI. Add intr_reprogram() function to reprogram all already configured interrupts, and call it immediately before an IR unit is enabled. There is still a small window after the IO-APIC redirection entry is reprogrammed with cookie but before the unit is enabled, but to fix this properly, IR must be started much earlier. Add workarounds for 5500 and X58 northbridges, some revisions of which have severe flaws in handling IR. Use the same identification methods as employed by Linux. Review: https://reviews.freebsd.org/D1892 Reviewed by: neel Discussed with: jhb Tested by: glebius, pho (previous versions) Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Added: head/sys/x86/iommu/intel_intrmap.c (contents, props changed) head/sys/x86/iommu/iommu_intrmap.h (contents, props changed) Modified: head/sys/amd64/include/intr_machdep.h head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/i386/include/intr_machdep.h head/sys/x86/include/apicvar.h head/sys/x86/iommu/busdma_dmar.c head/sys/x86/iommu/intel_ctx.c head/sys/x86/iommu/intel_dmar.h head/sys/x86/iommu/intel_drv.c head/sys/x86/iommu/intel_fault.c head/sys/x86/iommu/intel_gas.c head/sys/x86/iommu/intel_idpgtbl.c head/sys/x86/iommu/intel_qi.c head/sys/x86/iommu/intel_quirks.c head/sys/x86/iommu/intel_utils.c head/sys/x86/x86/intr_machdep.c head/sys/x86/x86/io_apic.c head/sys/x86/x86/msi.c Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/amd64/include/intr_machdep.h Thu Mar 19 13:57:47 2015 (r280260) @@ -106,6 +106,7 @@ struct pic { int (*pic_config_intr)(struct intsrc *, enum intr_trigger, enum intr_polarity); int (*pic_assign_cpu)(struct intsrc *, u_int apic_id); + void (*pic_reprogram_pin)(struct intsrc *); TAILQ_ENTRY(pic) pics; }; @@ -172,6 +173,7 @@ int intr_register_source(struct intsrc * int intr_remove_handler(void *cookie); void intr_resume(bool suspend_cancelled); void intr_suspend(void); +void intr_reprogram(void); void intrcnt_add(const char *name, u_long **countp); void nexus_add_irq(u_long irq); int msi_alloc(device_t dev, int count, int maxcount, int *irqs); Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/conf/files.amd64 Thu Mar 19 13:57:47 2015 (r280260) @@ -542,6 +542,7 @@ x86/iommu/intel_drv.c optional acpi acp x86/iommu/intel_fault.c optional acpi acpi_dmar pci x86/iommu/intel_gas.c optional acpi acpi_dmar pci x86/iommu/intel_idpgtbl.c optional acpi acpi_dmar pci +x86/iommu/intel_intrmap.c optional acpi acpi_dmar pci x86/iommu/intel_qi.c optional acpi acpi_dmar pci x86/iommu/intel_quirks.c optional acpi acpi_dmar pci x86/iommu/intel_utils.c optional acpi acpi_dmar pci Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/conf/files.i386 Thu Mar 19 13:57:47 2015 (r280260) @@ -560,6 +560,7 @@ x86/iommu/intel_drv.c optional acpi acp x86/iommu/intel_fault.c optional acpi acpi_dmar pci x86/iommu/intel_gas.c optional acpi acpi_dmar pci x86/iommu/intel_idpgtbl.c optional acpi acpi_dmar pci +x86/iommu/intel_intrmap.c optional acpi acpi_dmar pci x86/iommu/intel_qi.c optional acpi acpi_dmar pci x86/iommu/intel_quirks.c optional acpi acpi_dmar pci x86/iommu/intel_utils.c optional acpi acpi_dmar pci Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/i386/include/intr_machdep.h Thu Mar 19 13:57:47 2015 (r280260) @@ -112,6 +112,7 @@ struct pic { int (*pic_config_intr)(struct intsrc *, enum intr_trigger, enum intr_polarity); int (*pic_assign_cpu)(struct intsrc *, u_int apic_id); + void (*pic_reprogram_pin)(struct intsrc *); TAILQ_ENTRY(pic) pics; }; @@ -168,6 +169,7 @@ int intr_register_source(struct intsrc * int intr_remove_handler(void *cookie); void intr_resume(bool suspend_cancelled); void intr_suspend(void); +void intr_reprogram(void); void intrcnt_add(const char *name, u_long **countp); void nexus_add_irq(u_long irq); int msi_alloc(device_t dev, int count, int maxcount, int *irqs); Modified: head/sys/x86/include/apicvar.h ============================================================================== --- head/sys/x86/include/apicvar.h Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/x86/include/apicvar.h Thu Mar 19 13:57:47 2015 (r280260) @@ -155,6 +155,11 @@ #define APIC_BUS_PCI 2 #define APIC_BUS_MAX APIC_BUS_PCI +#define IRQ_EXTINT (NUM_IO_INTS + 1) +#define IRQ_NMI (NUM_IO_INTS + 2) +#define IRQ_SMI (NUM_IO_INTS + 3) +#define IRQ_DISABLED (NUM_IO_INTS + 4) + /* * An APIC enumerator is a psuedo bus driver that enumerates APIC's including * CPU's and I/O APIC's. Modified: head/sys/x86/iommu/busdma_dmar.c ============================================================================== --- head/sys/x86/iommu/busdma_dmar.c Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/x86/iommu/busdma_dmar.c Thu Mar 19 13:57:47 2015 (r280260) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -92,7 +93,7 @@ dmar_bus_dma_is_dev_disabled(int domain, * domain, and must collectively be assigned to use either DMAR or * bounce mapping. */ -static device_t +device_t dmar_get_requester(device_t dev, uint16_t *rid) { devclass_t pci_class; @@ -255,6 +256,8 @@ dmar_get_dma_tag(device_t dev, device_t /* Not in scope of any DMAR ? */ if (dmar == NULL) return (NULL); + if (!dmar->dma_enabled) + return (NULL); dmar_quirks_pre_use(dmar); dmar_instantiate_rmrr_ctxs(dmar); @@ -852,6 +855,8 @@ int dmar_init_busdma(struct dmar_unit *unit) { + unit->dma_enabled = 1; + TUNABLE_INT_FETCH("hw.dmar.dma", &unit->dma_enabled); TAILQ_INIT(&unit->delayed_maps); TASK_INIT(&unit->dmamap_load_task, 0, dmar_bus_task_dmamap, unit); unit->delayed_taskqueue = taskqueue_create("dmar", M_WAITOK, Modified: head/sys/x86/iommu/intel_ctx.c ============================================================================== --- head/sys/x86/iommu/intel_ctx.c Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/x86/iommu/intel_ctx.c Thu Mar 19 13:57:47 2015 (r280260) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/x86/iommu/intel_dmar.h ============================================================================== --- head/sys/x86/iommu/intel_dmar.h Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/x86/iommu/intel_dmar.h Thu Mar 19 13:57:47 2015 (r280260) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2013-2015 The FreeBSD Foundation * All rights reserved. * * This software was developed by Konstantin Belousov @@ -185,6 +185,13 @@ struct dmar_unit { u_int inv_seq_waiters; /* count of waiters for seq */ u_int inv_queue_full; /* informational counter */ + /* IR */ + int ir_enabled; + vm_paddr_t irt_phys; + dmar_irte_t *irt; + u_int irte_cnt; + vmem_t *irtids; + /* Delayed freeing of map entries queue processing */ struct dmar_map_entries_tailq tlb_flush_entries; struct task qi_task; @@ -194,6 +201,8 @@ struct dmar_unit { struct task dmamap_load_task; TAILQ_HEAD(, bus_dmamap_dmar) delayed_maps; struct taskqueue *delayed_taskqueue; + + int dma_enabled; }; #define DMAR_LOCK(dmar) mtx_lock(&(dmar)->lock) @@ -206,12 +215,16 @@ struct dmar_unit { #define DMAR_IS_COHERENT(dmar) (((dmar)->hw_ecap & DMAR_ECAP_C) != 0) #define DMAR_HAS_QI(dmar) (((dmar)->hw_ecap & DMAR_ECAP_QI) != 0) +#define DMAR_X2APIC(dmar) \ + (x2apic_mode && ((dmar)->hw_ecap & DMAR_ECAP_EIM) != 0) /* Barrier ids */ #define DMAR_BARRIER_RMRR 0 #define DMAR_BARRIER_USEQ 1 struct dmar_unit *dmar_find(device_t dev); +struct dmar_unit *dmar_find_hpet(device_t dev, uint16_t *rid); +struct dmar_unit *dmar_find_ioapic(u_int apic_id, uint16_t *rid); u_int dmar_nd2mask(u_int nd); bool dmar_pglvl_supported(struct dmar_unit *unit, int pglvl); @@ -238,6 +251,9 @@ void dmar_flush_ctx_to_ram(struct dmar_u void dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst); int dmar_enable_translation(struct dmar_unit *unit); int dmar_disable_translation(struct dmar_unit *unit); +int dmar_load_irt_ptr(struct dmar_unit *unit); +int dmar_enable_ir(struct dmar_unit *unit); +int dmar_disable_ir(struct dmar_unit *unit); bool dmar_barrier_enter(struct dmar_unit *dmar, u_int barrier_id); void dmar_barrier_exit(struct dmar_unit *dmar, u_int barrier_id); @@ -256,6 +272,8 @@ void dmar_qi_invalidate_locked(struct dm dmar_gaddr_t size, struct dmar_qi_genseq *pseq); void dmar_qi_invalidate_ctx_glob_locked(struct dmar_unit *unit); void dmar_qi_invalidate_iotlb_glob_locked(struct dmar_unit *unit); +void dmar_qi_invalidate_iec_glob(struct dmar_unit *unit); +void dmar_qi_invalidate_iec(struct dmar_unit *unit, u_int start, u_int cnt); vm_object_t ctx_get_idmap_pgtbl(struct dmar_ctx *ctx, dmar_gaddr_t maxaddr); void put_idmap_pgtbl(vm_object_t obj); @@ -282,6 +300,7 @@ void dmar_ctx_free_entry(struct dmar_map int dmar_init_busdma(struct dmar_unit *unit); void dmar_fini_busdma(struct dmar_unit *unit); +device_t dmar_get_requester(device_t dev, uint16_t *rid); void dmar_gas_init_ctx(struct dmar_ctx *ctx); void dmar_gas_fini_ctx(struct dmar_ctx *ctx); @@ -304,6 +323,9 @@ int dmar_instantiate_rmrr_ctxs(struct dm void dmar_quirks_post_ident(struct dmar_unit *dmar); void dmar_quirks_pre_use(struct dmar_unit *dmar); +int dmar_init_irt(struct dmar_unit *unit); +void dmar_fini_irt(struct dmar_unit *unit); + #define DMAR_GM_CANWAIT 0x0001 #define DMAR_GM_CANSPLIT 0x0002 @@ -374,13 +396,16 @@ dmar_write8(const struct dmar_unit *unit * containing the P or R and W bits, is set only after the high word * is written. For clear, the P bit is cleared first, then the high * word is cleared. + * + * dmar_pte_update updates the pte. For amd64, the update is atomic. + * For i386, it first disables the entry by clearing the word + * containing the P bit, and then defer to dmar_pte_store. The locked + * cmpxchg8b is probably available on any machine having DMAR support, + * but interrupt translation table may be mapped uncached. */ static inline void -dmar_pte_store(volatile uint64_t *dst, uint64_t val) +dmar_pte_store1(volatile uint64_t *dst, uint64_t val) { - - KASSERT(*dst == 0, ("used pte %p oldval %jx newval %jx", - dst, (uintmax_t)*dst, (uintmax_t)val)); #ifdef __i386__ volatile uint32_t *p; uint32_t hi, lo; @@ -396,6 +421,28 @@ dmar_pte_store(volatile uint64_t *dst, u } static inline void +dmar_pte_store(volatile uint64_t *dst, uint64_t val) +{ + + KASSERT(*dst == 0, ("used pte %p oldval %jx newval %jx", + dst, (uintmax_t)*dst, (uintmax_t)val)); + dmar_pte_store1(dst, val); +} + +static inline void +dmar_pte_update(volatile uint64_t *dst, uint64_t val) +{ + +#ifdef __i386__ + volatile uint32_t *p; + + p = (volatile uint32_t *)dst; + *p = 0; +#endif + dmar_pte_store1(dst, val); +} + +static inline void dmar_pte_clear(volatile uint64_t *dst) { #ifdef __i386__ Modified: head/sys/x86/iommu/intel_drv.c ============================================================================== --- head/sys/x86/iommu/intel_drv.c Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/x86/iommu/intel_drv.c Thu Mar 19 13:57:47 2015 (r280260) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2013-2015 The FreeBSD Foundation * All rights reserved. * * This software was developed by Konstantin Belousov @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -65,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef DEV_APIC @@ -243,6 +245,7 @@ dmar_release_resources(device_t dev, str int i; dmar_fini_busdma(unit); + dmar_fini_irt(unit); dmar_fini_qi(unit); dmar_fini_fault_log(unit); for (i = 0; i < DMAR_INTR_TOTAL; i++) @@ -509,6 +512,11 @@ dmar_attach(device_t dev) dmar_release_resources(dev, unit); return (error); } + error = dmar_init_irt(unit); + if (error != 0) { + dmar_release_resources(dev, unit); + return (error); + } error = dmar_init_busdma(unit); if (error != 0) { dmar_release_resources(dev, unit); @@ -763,6 +771,76 @@ found: return (device_get_softc(dmar_dev)); } +static struct dmar_unit * +dmar_find_nonpci(u_int id, u_int entry_type, uint16_t *rid) +{ + device_t dmar_dev; + struct dmar_unit *unit; + ACPI_DMAR_HARDWARE_UNIT *dmarh; + ACPI_DMAR_DEVICE_SCOPE *devscope; + ACPI_DMAR_PCI_PATH *path; + char *ptr, *ptrend; + int i; + + for (i = 0; i < dmar_devcnt; i++) { + dmar_dev = dmar_devs[i]; + if (dmar_dev == NULL) + continue; + unit = (struct dmar_unit *)device_get_softc(dmar_dev); + dmarh = dmar_find_by_index(i); + if (dmarh == NULL) + continue; + ptr = (char *)dmarh + sizeof(*dmarh); + ptrend = (char *)dmarh + dmarh->Header.Length; + for (;;) { + if (ptr >= ptrend) + break; + devscope = (ACPI_DMAR_DEVICE_SCOPE *)ptr; + ptr += devscope->Length; + if (devscope->EntryType != entry_type) + continue; + if (devscope->EnumerationId != id) + continue; + if (devscope->Length - sizeof(ACPI_DMAR_DEVICE_SCOPE) + == 2) { + if (rid != NULL) { + path = (ACPI_DMAR_PCI_PATH *) + (devscope + 1); + *rid = PCI_RID(devscope->Bus, + path->Device, path->Function); + } + return (unit); + } else { + /* XXXKIB */ + printf( + "dmar_find_nonpci: id %d type %d path length != 2\n", + id, entry_type); + } + } + } + return (NULL); +} + + +struct dmar_unit * +dmar_find_hpet(device_t dev, uint16_t *rid) +{ + ACPI_HANDLE handle; + uint32_t hpet_id; + + handle = acpi_get_handle(dev); + if (ACPI_FAILURE(acpi_GetInteger(handle, "_UID", &hpet_id))) + return (NULL); + return (dmar_find_nonpci(hpet_id, ACPI_DMAR_SCOPE_TYPE_HPET, rid)); +} + +struct dmar_unit * +dmar_find_ioapic(u_int apic_id, uint16_t *rid) +{ + + return (dmar_find_nonpci(apic_id, ACPI_DMAR_SCOPE_TYPE_IOAPIC, rid)); +} + struct rmrr_iter_args { struct dmar_ctx *ctx; device_t dev; Modified: head/sys/x86/iommu/intel_fault.c ============================================================================== --- head/sys/x86/iommu/intel_fault.c Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/x86/iommu/intel_fault.c Thu Mar 19 13:57:47 2015 (r280260) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/x86/iommu/intel_gas.c ============================================================================== --- head/sys/x86/iommu/intel_gas.c Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/x86/iommu/intel_gas.c Thu Mar 19 13:57:47 2015 (r280260) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- head/sys/x86/iommu/intel_idpgtbl.c Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/x86/iommu/intel_idpgtbl.c Thu Mar 19 13:57:47 2015 (r280260) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Added: head/sys/x86/iommu/intel_intrmap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/x86/iommu/intel_intrmap.c Thu Mar 19 13:57:47 2015 (r280260) @@ -0,0 +1,380 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static struct dmar_unit *dmar_ir_find(device_t src, uint16_t *rid, + int *is_dmar); +static void dmar_ir_program_irte(struct dmar_unit *unit, u_int idx, + uint64_t low, uint16_t rid); +static int dmar_ir_free_irte(struct dmar_unit *unit, u_int cookie); + +int +iommu_alloc_msi_intr(device_t src, u_int *cookies, u_int count) +{ + struct dmar_unit *unit; + vmem_addr_t vmem_res; + u_int idx, i; + int error; + + unit = dmar_ir_find(src, NULL, NULL); + if (unit == NULL || !unit->ir_enabled) { + for (i = 0; i < count; i++) + cookies[i] = -1; + return (EOPNOTSUPP); + } + + error = vmem_alloc(unit->irtids, count, M_FIRSTFIT | M_NOWAIT, + &vmem_res); + if (error != 0) { + KASSERT(error != EOPNOTSUPP, + ("impossible EOPNOTSUPP from vmem")); + return (error); + } + idx = vmem_res; + for (i = 0; i < count; i++) + cookies[i] = idx + i; + return (0); +} + +int +iommu_map_msi_intr(device_t src, u_int cpu, u_int vector, u_int cookie, + uint64_t *addr, uint32_t *data) +{ + struct dmar_unit *unit; + uint64_t low; + uint16_t rid; + int is_dmar; + + unit = dmar_ir_find(src, &rid, &is_dmar); + if (is_dmar) { + KASSERT(unit == NULL, ("DMAR cannot translate itself")); + + /* + * See VT-d specification, 5.1.6 Remapping Hardware - + * Interrupt Programming. + */ + *data = vector; + *addr = MSI_INTEL_ADDR_BASE | ((cpu & 0xff) << 12); + if (x2apic_mode) + *addr |= ((uint64_t)cpu & 0xffffff00) << 32; + else + KASSERT(cpu <= 0xff, ("cpu id too big %d", cpu)); + return (0); + } + if (unit == NULL || !unit->ir_enabled || cookie == -1) + return (EOPNOTSUPP); + + low = (DMAR_X2APIC(unit) ? DMAR_IRTE1_DST_x2APIC(cpu) : + DMAR_IRTE1_DST_xAPIC(cpu)) | DMAR_IRTE1_V(vector) | + DMAR_IRTE1_DLM_FM | DMAR_IRTE1_TM_EDGE | DMAR_IRTE1_RH_DIRECT | + DMAR_IRTE1_DM_PHYSICAL | DMAR_IRTE1_P; + dmar_ir_program_irte(unit, cookie, low, rid); + + if (addr != NULL) { + /* + * See VT-d specification, 5.1.5.2 MSI and MSI-X + * Register Programming. + */ + *addr = MSI_INTEL_ADDR_BASE | ((cookie & 0x7fff) << 5) | + ((cookie & 0x8000) << 2) | 0x18; + *data = 0; + } + return (0); +} + +int +iommu_unmap_msi_intr(device_t src, u_int cookie) +{ + struct dmar_unit *unit; + + if (cookie == -1) + return (0); + unit = dmar_ir_find(src, NULL, NULL); + return (dmar_ir_free_irte(unit, cookie)); +} + +int +iommu_map_ioapic_intr(u_int ioapic_id, u_int cpu, u_int vector, bool edge, + bool activehi, int irq, u_int *cookie, uint32_t *hi, uint32_t *lo) +{ + struct dmar_unit *unit; + vmem_addr_t vmem_res; + uint64_t low, iorte; + u_int idx; + int error; + uint16_t rid; + + unit = dmar_find_ioapic(ioapic_id, &rid); + if (unit == NULL || !unit->ir_enabled) { + *cookie = -1; + return (EOPNOTSUPP); + } + + error = vmem_alloc(unit->irtids, 1, M_FIRSTFIT | M_NOWAIT, &vmem_res); + if (error != 0) { + KASSERT(error != EOPNOTSUPP, + ("impossible EOPNOTSUPP from vmem")); + return (error); + } + idx = vmem_res; + low = 0; + switch (irq) { + case IRQ_EXTINT: + low |= DMAR_IRTE1_DLM_ExtINT; + break; + case IRQ_NMI: + low |= DMAR_IRTE1_DLM_NMI; + break; + case IRQ_SMI: + low |= DMAR_IRTE1_DLM_SMI; + break; + default: + KASSERT(vector != 0, ("No vector for IRQ %u", irq)); + low |= DMAR_IRTE1_DLM_FM | DMAR_IRTE1_V(vector); + break; + } + low |= (DMAR_X2APIC(unit) ? DMAR_IRTE1_DST_x2APIC(cpu) : + DMAR_IRTE1_DST_xAPIC(cpu)) | + (edge ? DMAR_IRTE1_TM_EDGE : DMAR_IRTE1_TM_LEVEL) | + DMAR_IRTE1_RH_DIRECT | DMAR_IRTE1_DM_PHYSICAL | DMAR_IRTE1_P; + dmar_ir_program_irte(unit, idx, low, rid); + + if (hi != NULL) { + /* + * See VT-d specification, 5.1.5.1 I/OxAPIC + * Programming. + */ + iorte = (1ULL << 48) | ((uint64_t)(idx & 0x7fff) << 49) | + ((idx & 0x8000) != 0 ? (1 << 11) : 0) | + (edge ? IOART_TRGREDG : IOART_TRGRLVL) | + (activehi ? IOART_INTAHI : IOART_INTALO) | + IOART_DELFIXED | vector; + *hi = iorte >> 32; + *lo = iorte; + } + *cookie = idx; + return (0); +} + +int +iommu_unmap_ioapic_intr(u_int ioapic_id, u_int *cookie) +{ + struct dmar_unit *unit; + u_int idx; + + idx = *cookie; + if (idx == -1) + return (0); + *cookie = -1; + unit = dmar_find_ioapic(ioapic_id, NULL); + KASSERT(unit != NULL && unit->ir_enabled, + ("unmap: cookie %d unit %p", idx, unit)); + return (dmar_ir_free_irte(unit, idx)); +} + +static struct dmar_unit * +dmar_ir_find(device_t src, uint16_t *rid, int *is_dmar) +{ + devclass_t src_class; + struct dmar_unit *unit; + + /* + * We need to determine if the interrupt source generates FSB + * interrupts. If yes, it is either DMAR, in which case + * interrupts are not remapped. Or it is HPET, and interrupts + * are remapped. For HPET, source id is reported by HPET + * record in DMAR ACPI table. + */ + if (is_dmar != NULL) + *is_dmar = FALSE; + src_class = device_get_devclass(src); + if (src_class == devclass_find("dmar")) { + unit = NULL; + if (is_dmar != NULL) + *is_dmar = TRUE; + } else if (src_class == devclass_find("hpet")) { + unit = dmar_find_hpet(src, rid); + } else { + unit = dmar_find(src); + if (unit != NULL && rid != NULL) + dmar_get_requester(src, rid); + } + return (unit); +} + +static void +dmar_ir_program_irte(struct dmar_unit *unit, u_int idx, uint64_t low, + uint16_t rid) +{ + dmar_irte_t *irte; + uint64_t high; + + KASSERT(idx < unit->irte_cnt, + ("bad cookie %d %d", idx, unit->irte_cnt)); + irte = &(unit->irt[idx]); + high = DMAR_IRTE2_SVT_RID | DMAR_IRTE2_SQ_RID | + DMAR_IRTE2_SID_RID(rid); + device_printf(unit->dev, + "programming irte[%d] rid %#x high %#jx low %#jx\n", + idx, rid, (uintmax_t)high, (uintmax_t)low); + DMAR_LOCK(unit); + if ((irte->irte1 & DMAR_IRTE1_P) != 0) { + /* + * The rte is already valid. Assume that the request + * is to remap the interrupt for balancing. Only low + * word of rte needs to be changed. Assert that the + * high word contains expected value. + */ + KASSERT(irte->irte2 == high, + ("irte2 mismatch, %jx %jx", (uintmax_t)irte->irte2, + (uintmax_t)high)); + dmar_pte_update(&irte->irte1, low); + } else { + dmar_pte_store(&irte->irte2, high); + dmar_pte_store(&irte->irte1, low); + } + dmar_qi_invalidate_iec(unit, idx, 1); + DMAR_UNLOCK(unit); + +} + +static int +dmar_ir_free_irte(struct dmar_unit *unit, u_int cookie) +{ + dmar_irte_t *irte; + + KASSERT(unit != NULL && unit->ir_enabled, + ("unmap: cookie %d unit %p", cookie, unit)); + KASSERT(cookie < unit->irte_cnt, + ("bad cookie %u %u", cookie, unit->irte_cnt)); + irte = &(unit->irt[cookie]); + dmar_pte_clear(&irte->irte1); + dmar_pte_clear(&irte->irte2); + DMAR_LOCK(unit); + dmar_qi_invalidate_iec(unit, cookie, 1); + DMAR_UNLOCK(unit); + vmem_free(unit->irtids, cookie, 1); + return (0); +} + +static u_int +clp2(u_int v) +{ + + return (powerof2(v) ? v : 1 << fls(v)); +} + +int +dmar_init_irt(struct dmar_unit *unit) +{ + + if ((unit->hw_ecap & DMAR_ECAP_IR) == 0) + return (0); + unit->ir_enabled = 1; + TUNABLE_INT_FETCH("hw.dmar.ir", &unit->ir_enabled); + if (!unit->ir_enabled) + return (0); + if (!unit->qi_enabled) { + unit->ir_enabled = 0; + if (bootverbose) + device_printf(unit->dev, + "QI disabled, disabling interrupt remapping\n"); + return (0); + } + unit->irte_cnt = clp2(NUM_IO_INTS); + unit->irt = (dmar_irte_t *)(uintptr_t)kmem_alloc_contig(kernel_arena, + unit->irte_cnt * sizeof(dmar_irte_t), M_ZERO | M_WAITOK, 0, + dmar_high, PAGE_SIZE, 0, DMAR_IS_COHERENT(unit) ? + VM_MEMATTR_DEFAULT : VM_MEMATTR_UNCACHEABLE); + if (unit->irt == NULL) + return (ENOMEM); + unit->irt_phys = pmap_kextract((vm_offset_t)unit->irt); + unit->irtids = vmem_create("dmarirt", 0, unit->irte_cnt, 1, 0, + M_FIRSTFIT | M_NOWAIT); + DMAR_LOCK(unit); + dmar_load_irt_ptr(unit); + dmar_qi_invalidate_iec_glob(unit); + DMAR_UNLOCK(unit); + + /* + * Initialize mappings for already configured interrupt pins. + * Required, because otherwise the interrupts fault without + * irtes. + */ + intr_reprogram(); + + DMAR_LOCK(unit); + dmar_enable_ir(unit); + DMAR_UNLOCK(unit); + return (0); +} + +void +dmar_fini_irt(struct dmar_unit *unit) +{ + + unit->ir_enabled = 0; + if (unit->irt != NULL) { + dmar_disable_ir(unit); + dmar_qi_invalidate_iec_glob(unit); + vmem_destroy(unit->irtids); + kmem_free(kernel_arena, (vm_offset_t)unit->irt, + unit->irte_cnt * sizeof(dmar_irte_t)); + } +} Modified: head/sys/x86/iommu/intel_qi.c ============================================================================== --- head/sys/x86/iommu/intel_qi.c Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/x86/iommu/intel_qi.c Thu Mar 19 13:57:47 2015 (r280260) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -194,13 +195,14 @@ dmar_qi_emit_wait_seq(struct dmar_unit * } static void -dmar_qi_wait_for_seq(struct dmar_unit *unit, const struct dmar_qi_genseq *gseq) +dmar_qi_wait_for_seq(struct dmar_unit *unit, const struct dmar_qi_genseq *gseq, + bool nowait) { DMAR_ASSERT_LOCKED(unit); unit->inv_seq_waiters++; while (!dmar_qi_seq_processed(unit, gseq)) { - if (cold) { + if (cold || nowait) { cpu_spinwait(); } else { msleep(&unit->inv_seq_waiters, &unit->lock, 0, @@ -246,7 +248,7 @@ dmar_qi_invalidate_ctx_glob_locked(struc dmar_qi_emit(unit, DMAR_IQ_DESCR_CTX_INV | DMAR_IQ_DESCR_CTX_GLOB, 0); dmar_qi_emit_wait_seq(unit, &gseq); dmar_qi_advance_tail(unit); - dmar_qi_wait_for_seq(unit, &gseq); + dmar_qi_wait_for_seq(unit, &gseq, false); } void @@ -260,7 +262,60 @@ dmar_qi_invalidate_iotlb_glob_locked(str DMAR_IQ_DESCR_IOTLB_DW | DMAR_IQ_DESCR_IOTLB_DR, 0); dmar_qi_emit_wait_seq(unit, &gseq); dmar_qi_advance_tail(unit); - dmar_qi_wait_for_seq(unit, &gseq); + dmar_qi_wait_for_seq(unit, &gseq, false); +} + +void +dmar_qi_invalidate_iec_glob(struct dmar_unit *unit) +{ + struct dmar_qi_genseq gseq; + + DMAR_ASSERT_LOCKED(unit); + dmar_qi_ensure(unit, 2); + dmar_qi_emit(unit, DMAR_IQ_DESCR_IEC_INV, 0); + dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_advance_tail(unit); + dmar_qi_wait_for_seq(unit, &gseq, false); +} + +void +dmar_qi_invalidate_iec(struct dmar_unit *unit, u_int start, u_int cnt) +{ + struct dmar_qi_genseq gseq; + u_int c, l; + + DMAR_ASSERT_LOCKED(unit); + KASSERT(start < unit->irte_cnt && start < start + cnt && + start + cnt <= unit->irte_cnt, + ("inv iec overflow %d %d %d", unit->irte_cnt, start, cnt)); + for (; cnt > 0; cnt -= c, start += c) { + l = ffs(start | cnt) - 1; + c = 1 << l; + dmar_qi_ensure(unit, 1); + dmar_qi_emit(unit, DMAR_IQ_DESCR_IEC_INV | + DMAR_IQ_DESCR_IEC_IDX | DMAR_IQ_DESCR_IEC_IIDX(start) | + DMAR_IQ_DESCR_IEC_IM(l), 0); + } + dmar_qi_ensure(unit, 1); + dmar_qi_emit_wait_seq(unit, &gseq); + dmar_qi_advance_tail(unit); + + /* + * The caller of the function, in particular, + * dmar_ir_program_irte(), may be called from the context + * where the sleeping is forbidden (in fact, the + * intr_table_lock mutex may be held, locked from + * intr_shuffle_irqs()). Wait for the invalidation completion + * using the busy wait. + * + * The impact on the interrupt input setup code is small, the + * expected overhead is comparable with the chipset register + * read. It is more harmful for the parallel DMA operations, + * since we own the dmar unit lock until whole invalidation + * queue is processed, which includes requests possibly issued + * before our request. + */ + dmar_qi_wait_for_seq(unit, &gseq, true); } int @@ -377,7 +432,7 @@ dmar_fini_qi(struct dmar_unit *unit) dmar_qi_ensure(unit, 1); dmar_qi_emit_wait_seq(unit, &gseq); dmar_qi_advance_tail(unit); - dmar_qi_wait_for_seq(unit, &gseq); + dmar_qi_wait_for_seq(unit, &gseq, false); /* only after the quisce, disable queue */ dmar_disable_qi(unit); KASSERT(unit->inv_seq_waiters == 0, Modified: head/sys/x86/iommu/intel_quirks.c ============================================================================== --- head/sys/x86/iommu/intel_quirks.c Thu Mar 19 13:53:47 2015 (r280259) +++ head/sys/x86/iommu/intel_quirks.c Thu Mar 19 13:57:47 2015 (r280260) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2013, 2015 The FreeBSD Foundation * All rights reserved. * * This software was developed by Konstantin Belousov @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -59,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include -typedef void (*dmar_quirk_fun)(struct dmar_unit *); +typedef void (*dmar_quirk_cpu_fun)(struct dmar_unit *); struct intel_dmar_quirk_cpu { u_int ext_family; @@ -67,17 +68,21 @@ struct intel_dmar_quirk_cpu { u_int family_code; u_int model; u_int stepping; - dmar_quirk_fun quirk; + dmar_quirk_cpu_fun quirk; const char *descr; }; +typedef void (*dmar_quirk_nb_fun)(struct dmar_unit *, device_t nb); + struct intel_dmar_quirk_nb { u_int dev_id; u_int rev_no; - dmar_quirk_fun quirk; + dmar_quirk_nb_fun quirk; const char *descr; }; +#define QUIRK_NB_ALL_REV 0xffffffff + static void dmar_match_quirks(struct dmar_unit *dmar, const struct intel_dmar_quirk_nb *nb_quirks, int nb_quirks_len, @@ -99,13 +104,14 @@ dmar_match_quirks(struct dmar_unit *dmar for (i = 0; i < nb_quirks_len; i++) { nb_quirk = &nb_quirks[i]; if (nb_quirk->dev_id == dev_id && - nb_quirk->rev_no == rev_no) { + (nb_quirk->rev_no == rev_no || + nb_quirk->rev_no == QUIRK_NB_ALL_REV)) { if (bootverbose) { device_printf(dmar->dev, "NB IOMMU quirk %s\n", nb_quirk->descr); } - nb_quirk->quirk(dmar); + nb_quirk->quirk(dmar, nb); } } } else { @@ -139,12 +145,29 @@ dmar_match_quirks(struct dmar_unit *dmar } static void -nb_5400_no_low_high_prot_mem(struct dmar_unit *unit) +nb_5400_no_low_high_prot_mem(struct dmar_unit *unit, device_t nb __unused) { unit->hw_cap &= ~(DMAR_CAP_PHMR | DMAR_CAP_PLMR); } +static void +nb_no_ir(struct dmar_unit *unit, device_t nb __unused) +{ + + unit->hw_ecap &= ~(DMAR_ECAP_IR | DMAR_ECAP_EIM); +} + +static void +nb_5500_no_ir_rev13(struct dmar_unit *unit, device_t nb) +{ + u_int rev_no; + + rev_no = pci_get_revid(nb); + if (rev_no <= 0x13) + nb_no_ir(unit, nb); +} + static const struct intel_dmar_quirk_nb pre_use_nb[] = { { .dev_id = 0x4001, .rev_no = 0x20, @@ -156,6 +179,26 @@ static const struct intel_dmar_quirk_nb .quirk = nb_5400_no_low_high_prot_mem, .descr = "5400 E23" /* no low/high protected memory */ }, + { + .dev_id = 0x3403, .rev_no = QUIRK_NB_ALL_REV, + .quirk = nb_5500_no_ir_rev13, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 15:32:56 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 6CD3D701; Thu, 19 Mar 2015 15:32: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 5848D155; Thu, 19 Mar 2015 15:32: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 t2JFWuTI009391; Thu, 19 Mar 2015 15:32:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2JFWuUH009390; Thu, 19 Mar 2015 15:32:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503191532.t2JFWuUH009390@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 19 Mar 2015 15:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280262 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Thu, 19 Mar 2015 15:32:56 -0000 Author: hselasky Date: Thu Mar 19 15:32:55 2015 New Revision: 280262 URL: https://svnweb.freebsd.org/changeset/base/280262 Log: Add more known bugs to the USB audio manual page. MFC after: 1 week Modified: head/share/man/man4/snd_uaudio.4 Modified: head/share/man/man4/snd_uaudio.4 ============================================================================== --- head/share/man/man4/snd_uaudio.4 Thu Mar 19 14:09:27 2015 (r280261) +++ head/share/man/man4/snd_uaudio.4 Thu Mar 19 15:32:55 2015 (r280262) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2011 +.Dd March 19, 2015 .Dt SND_UAUDIO 4 .Os .Sh NAME @@ -91,12 +91,25 @@ by The .Tn PCM framework in -.Fx , -as of this writing, does not handle device un-registrations in a properly -abstracted manner, i.e., a detach request is refused by the -.Tn PCM -framework if the device is in use. -It is necessary to allow the device un-registration to complete -successfully, otherwise the +.Fx +only supports synchronous device detach. +That means all mixer and DSP character devices belonging to a given +USB audio device must be closed when receiving an error on a DSP read, +a DSP write or a DSP IOCTL request. +Else the USB audio driver will wait for this to happen, preventing +enumeration of new devices on the parenting USB controller. +.Pp +Some USB audio devices might refuse to work properly unless the sample +rate is configured the same for both recording and playback, even if +only simplex is used. See the +.Va dev.pcm.%d.[play|rec].vchanrate +sysctls. +.Pp +The .Tn PCM -layer will panic. +framework in +.Fx +currently doesn't support the full set of USB audio mixer +controls. Some mixer controls are only available as +.Va dev.pcm.%d.mixer +sysctls. From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 15:36: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 97B4388C; Thu, 19 Mar 2015 15:36:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83E01183; Thu, 19 Mar 2015 15:36:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2JFab23009923; Thu, 19 Mar 2015 15:36:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2JFabEH009922; Thu, 19 Mar 2015 15:36:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503191536.t2JFabEH009922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 19 Mar 2015 15:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280263 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Thu, 19 Mar 2015 15:36:37 -0000 Author: hselasky Date: Thu Mar 19 15:36:36 2015 New Revision: 280263 URL: https://svnweb.freebsd.org/changeset/base/280263 Log: Fix some style issues. MFC after: 1 week Modified: head/share/man/man4/snd_uaudio.4 Modified: head/share/man/man4/snd_uaudio.4 ============================================================================== --- head/share/man/man4/snd_uaudio.4 Thu Mar 19 15:32:55 2015 (r280262) +++ head/share/man/man4/snd_uaudio.4 Thu Mar 19 15:36:36 2015 (r280263) @@ -101,7 +101,8 @@ enumeration of new devices on the parent .Pp Some USB audio devices might refuse to work properly unless the sample rate is configured the same for both recording and playback, even if -only simplex is used. See the +only simplex is used. +See the .Va dev.pcm.%d.[play|rec].vchanrate sysctls. .Pp @@ -110,6 +111,7 @@ The framework in .Fx currently doesn't support the full set of USB audio mixer -controls. Some mixer controls are only available as +controls. +Some mixer controls are only available as .Va dev.pcm.%d.mixer sysctls. From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 15:55: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 7BBD11C0; Thu, 19 Mar 2015 15:55: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 664A7640; Thu, 19 Mar 2015 15:55: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 t2JFt4YB019319; Thu, 19 Mar 2015 15:55:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2JFt3fo019315; Thu, 19 Mar 2015 15:55:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503191555.t2JFt3fo019315@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 19 Mar 2015 15:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280264 - in head/contrib/ofed: libibverbs/examples/build librdmacm/examples/build X-SVN-Group: head MIME-Version: 1.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: Thu, 19 Mar 2015 15:55:04 -0000 Author: hselasky Date: Thu Mar 19 15:55:02 2015 New Revision: 280264 URL: https://svnweb.freebsd.org/changeset/base/280264 Log: Define BINDIR for some test utilities. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/contrib/ofed/libibverbs/examples/build/Makefile.inc head/contrib/ofed/librdmacm/examples/build/Makefile.inc Modified: head/contrib/ofed/libibverbs/examples/build/Makefile.inc ============================================================================== --- head/contrib/ofed/libibverbs/examples/build/Makefile.inc Thu Mar 19 15:36:36 2015 (r280263) +++ head/contrib/ofed/libibverbs/examples/build/Makefile.inc Thu Mar 19 15:55:02 2015 (r280264) @@ -1,3 +1,5 @@ +BINDIR?= /usr/bin + CFLAGS+= \ -I../../../../../../sys/ofed/include \ -I../../../../libibverbs/include \ Modified: head/contrib/ofed/librdmacm/examples/build/Makefile.inc ============================================================================== --- head/contrib/ofed/librdmacm/examples/build/Makefile.inc Thu Mar 19 15:36:36 2015 (r280263) +++ head/contrib/ofed/librdmacm/examples/build/Makefile.inc Thu Mar 19 15:55:02 2015 (r280264) @@ -1,3 +1,5 @@ +BINDIR?= /usr/bin + IBDIR=../../../.. CFLAGS+= \ From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 18:08:13 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 83314547; Thu, 19 Mar 2015 18:08:13 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (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 62827CA2; Thu, 19 Mar 2015 18:08:13 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id EF248106C34; Thu, 19 Mar 2015 11:08:12 -0700 (PDT) Date: Thu, 19 Mar 2015 11:08:12 -0700 From: hiren panchasara To: Gleb Smirnoff Subject: Re: svn commit: r278729 - head/sys/sys Message-ID: <20150319180812.GI53237@strugglingcoder.info> References: <201502132319.t1DNJZuP057045@svn.freebsd.org> <20150311213607.GN88380@strugglingcoder.info> <20150316123940.GA17947@FreeBSD.org> <20150317010654.GB53237@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Encpt1P6Mxii2VuT" Content-Disposition: inline In-Reply-To: <20150317010654.GB53237@strugglingcoder.info> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "Simon J. Gerraty" , 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: Thu, 19 Mar 2015 18:08:13 -0000 --Encpt1P6Mxii2VuT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 03/16/15 at 06:06P, hiren panchasara wrote: > On 03/16/15 at 03:39P, Gleb Smirnoff wrote: > > On Wed, Mar 11, 2015 at 02:36:07PM -0700, hiren panchasara wrote: > > h> On 02/13/15 at 11:19P, Simon J. Gerraty wrote: > > h> > Author: sjg > > h> > Date: Fri Feb 13 23:19:35 2015 > > h> > New Revision: 278729 > > h> > URL: https://svnweb.freebsd.org/changeset/base/278729 > > h> >=20 > > h> > Log: > > h> > sbspace: size of bleft, mleft must match sockbuf fields to avoid > > h> > overflow on amd64 > > h> > =20 > > h> > Submitted by: anshukla@juniper.net > > h> > Obtained from: Juniper Networks > > h>=20 > > h> Talking to sjg on -arch to MFC this. If he cannot get around doing t= hat, > > h> I'll do it tomorrow.=20 > > h>=20 > > h> Letting people know here to see if there are any objections. > >=20 > > Would that fix the bug we've been discussing? >=20 > Unsure as I am not sure what caused the issue I saw. >=20 > For those who do not know the details, we recently saw a userland > process stuck spinning at 100% around sbcut_internal(). Inside > sbflush_internal(), the sb_cc was grown to be about 4G. And before > passing it to sbcut_internal(), we cast it from uint to int which > would make that valud -ve. >=20 > Gleb pointed out to me that sbspace() is supposed to check/stop sb_cc > from growing that large. >=20 > Now, I am not sure if we'd ever run into this situation again but > current fix is a great catch anyways. >=20 > I still have 2 questions around what we saw. It'd be great if someone can > clarify them for my understanding: >=20 > 1) Even if we get into such a scenario that we were in, following would > help by not looping endlessly. >=20 > --- uipc_sockbuf.c.0 2015-03-11 15:49:52.000000000 -0700 > +++ uipc_sockbuf.c 2015-03-11 15:51:48.000000000 -0700 > @@ -877,6 +877,9 @@ > { > struct mbuf *m, *n, *next, *mfree; >=20 > + if (len < 0) > + panic("%s: len is %d and it is supposed to be +ve", > + __func__, len); > + > next =3D (m =3D sb->sb_mb) ? m->m_nextpkt : 0; > mfree =3D NULL >=20 > 2) We need 1) because we are casting a uint to int which _may_ rander a > value -ve. Is there a way we can avoid the casting? It'd be useful if someone with knowledge in this area can weigh in. cheers, Hiren --Encpt1P6Mxii2VuT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVCxCMXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lWiAH/jEdevL1GBqArvVu26hnMFr0 cC6i5qtCZhNN7aYCB7id/BeaVv8/Yw4OPOKq0q1CvUa5Yu3qexINzrKFVAAH7xPL rw7b/7YWitS+SRwpzEz3RRkmXY1okPXlyQIULW2o86lgMxJFEXLj5mzVCpbrnMTb VBAiDSgzhvnM+Lp+DRfnEEMUS/qOEeLrspl5fvl41qsvTcgymnGYZH2+rcB2BoMk nbvAhorqwmsFDBmWyyUZ2NfWQXgFtzYjZ+Ppg158A8Q1I2MKya3JQeEJUtzJTLq7 Qx1jzugoZj9f9geNbXbFsdQRKTfrVs3UThZkIql713YTGyz+tYLAQOgDQOdQmL8= =uv2r -----END PGP SIGNATURE----- --Encpt1P6Mxii2VuT-- From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 23:39:34 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 285F662C for ; Thu, 19 Mar 2015 23:39:34 +0000 (UTC) Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com [IPv6:2a00:1450:4010:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A00EDBAA for ; Thu, 19 Mar 2015 23:39:33 +0000 (UTC) Received: by lamx15 with SMTP id x15so75060851lam.3 for ; Thu, 19 Mar 2015 16:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=blQoAheTiGv7eJo0sa66gRmT/GVE3qlsd0lhxNyYhes=; b=CwtHEr702I1IQWSNY97X0LFm6z2GdQbelUGIDcLSvajyAvjXG5SnXJgnbmTAnVbsk9 fAnxGsANs2umnh4a6qz7bfjW6ebSFoKX/giRizoPKqR7sbPejoUQz3RpScEi6WPRJQtB n71D9vvNnD2NCaVojCgq9x+60kEMt3wCeepXj5ASqTwbCt/2CwtzaipFd3urgZ6i//gs mvQU2blEPK6hHIFPVSqxc1jBdFJgAdkN9yW54LwecAP7XBfUPClq/xG9JI6zUxwBfpAP 1/RSVDHtXqupb6Iuh3QgzoXdBh75s4KmTD/CAz2azjrf8wfrO2bhAA0SUYjP2w/m/sOk V5tw== MIME-Version: 1.0 X-Received: by 10.112.8.101 with SMTP id q5mr65301952lba.19.1426808371666; Thu, 19 Mar 2015 16:39:31 -0700 (PDT) Received: by 10.152.146.231 with HTTP; Thu, 19 Mar 2015 16:39:31 -0700 (PDT) Received: by 10.152.146.231 with HTTP; Thu, 19 Mar 2015 16:39:31 -0700 (PDT) Date: Thu, 19 Mar 2015 18:39:31 -0500 Message-ID: Subject: From: Justin Jesse To: svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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: Thu, 19 Mar 2015 23:39:34 -0000 Looking for my marbles From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 01:07:49 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 64836536; Fri, 20 Mar 2015 01:07:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FD27685; Fri, 20 Mar 2015 01:07:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2K17n1r090995; Fri, 20 Mar 2015 01:07:49 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2K17ne1090994; Fri, 20 Mar 2015 01:07:49 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503200107.t2K17ne1090994@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 20 Mar 2015 01:07:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280273 - 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: Fri, 20 Mar 2015 01:07:49 -0000 Author: pfg Date: Fri Mar 20 01:07:48 2015 New Revision: 280273 URL: https://svnweb.freebsd.org/changeset/base/280273 Log: Permit multiple arguments for the nonnull attribute. This is very useful for non-trivial functions and doesn't affect existing uses. MFC after: 5 days Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Thu Mar 19 23:13:19 2015 (r280272) +++ head/sys/sys/cdefs.h Fri Mar 20 01:07:48 2015 (r280273) @@ -356,9 +356,9 @@ #endif #if __GNUC_PREREQ__(3, 3) -#define __nonnull(x) __attribute__((__nonnull__(x))) +#define __nonnull(...) __attribute__((__nonnull__(__VA_ARGS__))) #else -#define __nonnull(x) +#define __nonnull(...) #endif #if __GNUC_PREREQ__(3, 4) From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 10:15:36 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 72670AEB; Fri, 20 Mar 2015 10:15: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 439DD63E; Fri, 20 Mar 2015 10:15: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 t2KAFac6048235; Fri, 20 Mar 2015 10:15:36 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KAFZmD048233; Fri, 20 Mar 2015 10:15:35 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201503201015.t2KAFZmD048233@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 20 Mar 2015 10:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280278 - in head/sys: arm/include 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: Fri, 20 Mar 2015 10:15:36 -0000 Author: zbb Date: Fri Mar 20 10:15:34 2015 New Revision: 280278 URL: https://svnweb.freebsd.org/changeset/base/280278 Log: Allow to override default kernel virtual address assignment on ARM Each plaform performs virtual memory split between kernel and user space and assigns kernel certain amount of memory space. However, is is sometimes reasonable to change the default values. Such situation may happen on systems where the demand for kernel buffers is high, many devices occupying memory etc. This of course comes with the cost of decreasing user space memory range so shall be used with care. Most embedded systems will not suffer from this limtation but rather take advantage of this potential since default behavior is left unchanged. Submitted by: Wojciech Macek Reviewed by: imp Obtained from: Semihalf Modified: head/sys/arm/include/vmparam.h head/sys/conf/options.arm Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Fri Mar 20 08:29:07 2015 (r280277) +++ head/sys/arm/include/vmparam.h Fri Mar 20 10:15:34 2015 (r280278) @@ -68,7 +68,9 @@ * The line between user space and kernel space * Mappings >= KERNEL_BASE are constant across all processes */ +#ifndef KERNBASE #define KERNBASE 0xc0000000 +#endif /* * max number of non-contig chunks of physical RAM you can have Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Fri Mar 20 08:29:07 2015 (r280277) +++ head/sys/conf/options.arm Fri Mar 20 10:15:34 2015 (r280278) @@ -28,6 +28,7 @@ IPI_IRQ_START opt_smp.h IPI_IRQ_END opt_smp.h FREEBSD_BOOT_LOADER opt_global.h IXP4XX_FLASH_SIZE opt_global.h +KERNBASE opt_global.h KERNPHYSADDR opt_global.h KERNVIRTADDR opt_global.h LINUX_BOOT_ABI opt_global.h From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 10:27:08 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 62D45DA2; Fri, 20 Mar 2015 10:27: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 4528678F; Fri, 20 Mar 2015 10:27: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 t2KAR8Aa053057; Fri, 20 Mar 2015 10:27:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KAR6Ze053047; Fri, 20 Mar 2015 10:27:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503201027.t2KAR6Ze053047@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 20 Mar 2015 10:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280279 - 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: Fri, 20 Mar 2015 10:27:08 -0000 Author: jhb Date: Fri Mar 20 10:27:06 2015 New Revision: 280279 URL: https://svnweb.freebsd.org/changeset/base/280279 Log: Expand the bitcount* API to support 64-bit integers, plain ints and longs and create a "hidden" API that can be used in other system headers without adding namespace pollution. - If the POPCNT instruction is enabled at compile time, use __builtin_popcount*() to implement __bitcount*(), otherwise fall back to software implementations. - Use the existing bitcount16() and bitcount32() from to implement the non-POPCNT __bitcount16() and __bitcount32() in . - For the non-POPCNT __bitcount64(), use a similar SWAR method on 64-bit systems. For 32-bit systems, use two __bitcount32() operations on the two halves. - Use __bitcount32() to provide a __bitcount() that operates on plain ints. - Use either __bitcount32() or __bitcount64() to provide a __bitcountl() that operates on longs. - Add public bitcount*() wrappers for __bitcount*() for use in the kernel in . - Use __builtinl() instead of __builtin_popcountl() in BIT_COUNT(). Discussed with: bde Modified: head/sys/sys/bitset.h head/sys/sys/libkern.h head/sys/sys/systm.h head/sys/sys/types.h Modified: head/sys/sys/bitset.h ============================================================================== --- head/sys/sys/bitset.h Fri Mar 20 10:15:34 2015 (r280278) +++ head/sys/sys/bitset.h Fri Mar 20 10:27:06 2015 (r280279) @@ -182,7 +182,7 @@ \ __count = 0; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ - __count += __builtin_popcountl((p)->__bits[__i]); \ + __count += __bitcountl((p)->__bits[__i]); \ __count; \ }) Modified: head/sys/sys/libkern.h ============================================================================== --- head/sys/sys/libkern.h Fri Mar 20 10:15:34 2015 (r280278) +++ head/sys/sys/libkern.h Fri Mar 20 10:27:06 2015 (r280279) @@ -98,6 +98,11 @@ int flsl(long); #ifndef HAVE_INLINE_FLSLL int flsll(long long); #endif +#define bitcount64(x) __bitcount64((uint64_t)(x)) +#define bitcount32(x) __bitcount32((uint32_t)(x)) +#define bitcount16(x) __bitcount16((uint16_t)(x)) +#define bitcountl(x) __bitcountl((u_long)(x)) +#define bitcount(x) __bitcount((u_int)(x)) int fnmatch(const char *, const char *, int); int locc(int, char *, u_int); Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Fri Mar 20 10:15:34 2015 (r280278) +++ head/sys/sys/systm.h Fri Mar 20 10:27:06 2015 (r280279) @@ -428,33 +428,6 @@ int alloc_unr_specific(struct unrhdr *uh int alloc_unrl(struct unrhdr *uh); void free_unr(struct unrhdr *uh, u_int item); -/* - * Population count algorithm using SWAR approach - * - "SIMD Within A Register". - */ -static __inline uint32_t -bitcount32(uint32_t x) -{ - - x = (x & 0x55555555) + ((x & 0xaaaaaaaa) >> 1); - x = (x & 0x33333333) + ((x & 0xcccccccc) >> 2); - x = (x + (x >> 4)) & 0x0f0f0f0f; - x = (x + (x >> 8)); - x = (x + (x >> 16)) & 0x000000ff; - return (x); -} - -static __inline uint16_t -bitcount16(uint32_t x) -{ - - x = (x & 0x5555) + ((x & 0xaaaa) >> 1); - x = (x & 0x3333) + ((x & 0xcccc) >> 2); - x = (x + (x >> 4)) & 0x0f0f; - x = (x + (x >> 8)) & 0x00ff; - return (x); -} - void intr_prof_stack_use(struct thread *td, struct trapframe *frame); #endif /* !_SYS_SYSTM_H_ */ Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Fri Mar 20 10:15:34 2015 (r280278) +++ head/sys/sys/types.h Fri Mar 20 10:27:06 2015 (r280279) @@ -294,6 +294,68 @@ typedef _Bool bool; #include +#ifdef __POPCNT__ +#define __bitcount64(x) __builtin_popcountll((__uint64_t)(x)) +#define __bitcount32(x) __builtin_popcount((__uint32_t)(x)) +#define __bitcount16(x) __builtin_popcount((__uint16_t)(x)) +#define __bitcountl(x) __builtin_popcountl((unsigned long)(x)) +#define __bitcount(x) __builtin_popcount((unsigned int)(x)) +#else +/* + * Population count algorithm using SWAR approach + * - "SIMD Within A Register". + */ +static __inline __uint16_t +__bitcount16(__uint16_t _x) +{ + + _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); + _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); + _x = (_x + (_x >> 4)) & 0x0f0f; + _x = (_x + (_x >> 8)) & 0x00ff; + return (_x); +} + +static __inline __uint32_t +__bitcount32(__uint32_t _x) +{ + + _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); + _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); + _x = (_x + (_x >> 4)) & 0x0f0f0f0f; + _x = (_x + (_x >> 8)); + _x = (_x + (_x >> 16)) & 0x000000ff; + return (_x); +} + +#ifdef __LP64__ +static __inline __uint64_t +__bitcount64(__uint64_t _x) +{ + + _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); + _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); + _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; + _x = (_x + (_x >> 8)); + _x = (_x + (_x >> 16)); + _x = (_x + (_x >> 32)) & 0x000000ff; + return (_x); +} + +#define __bitcountl(x) __bitcount64((unsigned long)(x)) +#else +static __inline __uint64_t +__bitcount64(__uint64_t _x) +{ + + return (__bitcount32(_x >> 32) + __bitcount32(_x)); +} + +#define __bitcountl(x) __bitcount32((unsigned long)(x)) +#endif +#define __bitcount(x) __bitcount32((unsigned int)(x)) +#endif + /* * minor() gives a cookie instead of an index since we don't want to * change the meanings of bits 0-15 or waste time and space shifting From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 13:02: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 04A98D7B; Fri, 20 Mar 2015 13:02:27 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82543982; Fri, 20 Mar 2015 13:02:26 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2KD2GmR012112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 Mar 2015 15:02:17 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2KD2GmR012112 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2KD2GsD012111; Fri, 20 Mar 2015 15:02:16 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 20 Mar 2015 15:02:16 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <20150320130216.GS2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503201027.t2KAR6Ze053047@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Fri, 20 Mar 2015 13:02:27 -0000 On Fri, Mar 20, 2015 at 10:27:06AM +0000, John Baldwin wrote: > Author: jhb > Date: Fri Mar 20 10:27:06 2015 > New Revision: 280279 > URL: https://svnweb.freebsd.org/changeset/base/280279 > > Log: > Expand the bitcount* API to support 64-bit integers, plain ints and longs > and create a "hidden" API that can be used in other system headers without > adding namespace pollution. > - If the POPCNT instruction is enabled at compile time, use > __builtin_popcount*() to implement __bitcount*(), otherwise fall back > to software implementations. Are you aware of the Haswell errata HSD146 ? I see the described behaviour on machines back to SandyBridge, but not on Nehalems. HSD146. POPCNT Instruction May Take Longer to Execute Than Expected Problem: POPCNT instruction execution with a 32 or 64 bit operand may be delayed until previous non-dependent instructions have executed. Jilles noted that gcc head and 4.9.2 already provides a workaround by xoring the dst register. I have some patch for amd64 pmap, see the end of the message. > - Use the existing bitcount16() and bitcount32() from to > implement the non-POPCNT __bitcount16() and __bitcount32() in > . Why is it in sys/types.h ? > - For the non-POPCNT __bitcount64(), use a similar SWAR method on 64-bit > systems. For 32-bit systems, use two __bitcount32() operations on the > two halves. > - Use __bitcount32() to provide a __bitcount() that operates on plain ints. > - Use either __bitcount32() or __bitcount64() to provide a > __bitcountl() that operates on longs. > - Add public bitcount*() wrappers for __bitcount*() for use in the kernel > in . > - Use __builtinl() instead of __builtin_popcountl() in BIT_COUNT(). > > Discussed with: bde diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 6a4077c..f6fbc33 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -413,6 +417,7 @@ static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); static int popcnt_pc_map_elem(uint64_t elem); +static int popcnt_pc_map_elem_pq(uint64_t elem); static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); static void reserve_pv_entries(pmap_t pmap, int needed, struct rwlock **lockp); @@ -2997,6 +3020,29 @@ popcnt_pc_map_elem(uint64_t elem) } /* + * The erratas for Intel processors state that "POPCNT Instruction May + * Take Longer to Execute Than Expected". It is believed that the + * issue is the spurious dependency on the destination register. + * Provide a hint to the register rename logic that the destination + * value is overwritten, by clearing it, as suggested in the + * optimization manual. It should be cheap for unaffected processors + * as well. + * + * Reference numbers for erratas are + * 4th Gen Core: HSD146 + * 5th Gen Core: BDM85 + */ +static int +popcnt_pc_map_elem_pq(uint64_t elem) +{ + u_long result; + + __asm __volatile("xorl %k0,%k0;popcntq %1,%0" + : "=&r" (result) : "rm" (elem)); + return (result); +} + +/* * Ensure that the number of spare PV entries in the specified pmap meets or * exceeds the given count, "needed". * @@ -3029,9 +3075,9 @@ retry: free += popcnt_pc_map_elem(pc->pc_map[1]); free += popcnt_pc_map_elem(pc->pc_map[2]); } else { - free = popcntq(pc->pc_map[0]); - free += popcntq(pc->pc_map[1]); - free += popcntq(pc->pc_map[2]); + free = popcnt_pc_map_elem_pq(pc->pc_map[0]); + free += popcnt_pc_map_elem_pq(pc->pc_map[1]); + free += popcnt_pc_map_elem_pq(pc->pc_map[2]); } if (free == 0) break; From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 14:05: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 C185CFE5; Fri, 20 Mar 2015 14:05: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 A294C8F; Fri, 20 Mar 2015 14:05: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 t2KE5I7D055567; Fri, 20 Mar 2015 14:05:18 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KE5I2w055566; Fri, 20 Mar 2015 14:05:18 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503201405.t2KE5I2w055566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 20 Mar 2015 14:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280280 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Fri, 20 Mar 2015 14:05:18 -0000 Author: glebius Date: Fri Mar 20 14:05:17 2015 New Revision: 280280 URL: https://svnweb.freebsd.org/changeset/base/280280 Log: Now, when r272244 introduced counter(9) based counters for all interfaces, revert the r271538, which did that for vlan(4) only. No objections: melifaro Sponsored by: Nginx, Inc. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Fri Mar 20 10:27:06 2015 (r280279) +++ head/sys/net/if_vlan.c Fri Mar 20 14:05:17 2015 (r280280) @@ -104,12 +104,6 @@ struct vlan_mc_entry { struct ifvlan { struct ifvlantrunk *ifv_trunk; struct ifnet *ifv_ifp; - counter_u64_t ifv_ipackets; - counter_u64_t ifv_ibytes; - counter_u64_t ifv_opackets; - counter_u64_t ifv_obytes; - counter_u64_t ifv_omcasts; - counter_u64_t ifv_oerrors; #define TRUNK(ifv) ((ifv)->ifv_trunk) #define PARENT(ifv) ((ifv)->ifv_trunk->parent) void *ifv_cookie; @@ -202,7 +196,6 @@ static void vlan_init(void *foo); static void vlan_input(struct ifnet *ifp, struct mbuf *m); static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr); static void vlan_qflush(struct ifnet *ifp); -static uint64_t vlan_get_counter(struct ifnet *ifp, ift_counter cnt); static int vlan_setflag(struct ifnet *ifp, int flag, int status, int (*func)(struct ifnet *, int)); static int vlan_setflags(struct ifnet *ifp, int status); @@ -955,14 +948,6 @@ vlan_clone_create(struct if_clone *ifc, return (ENOSPC); } SLIST_INIT(&ifv->vlan_mc_listhead); - /* Prepare pcpu counters */ - ifv->ifv_ipackets = counter_u64_alloc(M_WAITOK); - ifv->ifv_opackets = counter_u64_alloc(M_WAITOK); - ifv->ifv_ibytes = counter_u64_alloc(M_WAITOK); - ifv->ifv_obytes = counter_u64_alloc(M_WAITOK); - ifv->ifv_omcasts = counter_u64_alloc(M_WAITOK); - ifv->ifv_oerrors = counter_u64_alloc(M_WAITOK); - ifp->if_softc = ifv; /* * Set the name manually rather than using if_initname because @@ -981,7 +966,6 @@ vlan_clone_create(struct if_clone *ifc, ifp->if_qflush = vlan_qflush; ifp->if_ioctl = vlan_ioctl; ifp->if_flags = VLAN_IFFLAGS; - ifp->if_get_counter = vlan_get_counter; ether_ifattach(ifp, eaddr); /* Now undo some of the damage... */ ifp->if_baudrate = 0; @@ -1024,12 +1008,6 @@ vlan_clone_destroy(struct if_clone *ifc, ether_ifdetach(ifp); /* first, remove it from system-wide lists */ vlan_unconfig(ifp); /* now it can be unconfigured and freed */ if_free(ifp); - counter_u64_free(ifv->ifv_ipackets); - counter_u64_free(ifv->ifv_opackets); - counter_u64_free(ifv->ifv_ibytes); - counter_u64_free(ifv->ifv_obytes); - counter_u64_free(ifv->ifv_omcasts); - counter_u64_free(ifv->ifv_oerrors); free(ifv, M_VLAN); ifc_free_unit(ifc, unit); @@ -1067,7 +1045,7 @@ vlan_transmit(struct ifnet *ifp, struct */ if (!UP_AND_RUNNING(p)) { m_freem(m); - counter_u64_add(ifv->ifv_oerrors, 1); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENETDOWN); } @@ -1094,7 +1072,7 @@ vlan_transmit(struct ifnet *ifp, struct if (n > 0) { if_printf(ifp, "cannot pad short frame\n"); - counter_u64_add(ifv->ifv_oerrors, 1); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); m_freem(m); return (0); } @@ -1114,7 +1092,7 @@ vlan_transmit(struct ifnet *ifp, struct m = ether_vlanencap(m, ifv->ifv_vid); if (m == NULL) { if_printf(ifp, "unable to prepend VLAN header\n"); - counter_u64_add(ifv->ifv_oerrors, 1); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (0); } } @@ -1124,40 +1102,14 @@ vlan_transmit(struct ifnet *ifp, struct */ error = (p->if_transmit)(p, m); if (error == 0) { - counter_u64_add(ifv->ifv_opackets, 1); - counter_u64_add(ifv->ifv_obytes, len); - counter_u64_add(ifv->ifv_omcasts, mcast); + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_OBYTES, len); + if_inc_counter(ifp, IFCOUNTER_OMCASTS, mcast); } else - counter_u64_add(ifv->ifv_oerrors, 1); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (error); } -static uint64_t -vlan_get_counter(struct ifnet *ifp, ift_counter cnt) -{ - struct ifvlan *ifv; - - ifv = ifp->if_softc; - - switch (cnt) { - case IFCOUNTER_IPACKETS: - return (counter_u64_fetch(ifv->ifv_ipackets)); - case IFCOUNTER_OPACKETS: - return (counter_u64_fetch(ifv->ifv_opackets)); - case IFCOUNTER_IBYTES: - return (counter_u64_fetch(ifv->ifv_ibytes)); - case IFCOUNTER_OBYTES: - return (counter_u64_fetch(ifv->ifv_obytes)); - case IFCOUNTER_OMCASTS: - return (counter_u64_fetch(ifv->ifv_omcasts)); - case IFCOUNTER_OERRORS: - return (counter_u64_fetch(ifv->ifv_oerrors)); - default: - return (if_get_counter_default(ifp, cnt)); - } - /* NOTREACHED */ -} - /* * The ifp->if_qflush entry point for vlan(4) is a no-op. */ @@ -1232,8 +1184,8 @@ vlan_input(struct ifnet *ifp, struct mbu TRUNK_RUNLOCK(trunk); m->m_pkthdr.rcvif = ifv->ifv_ifp; - counter_u64_add(ifv->ifv_ipackets, 1); - counter_u64_add(ifv->ifv_ibytes, m->m_pkthdr.len); + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); /* Pass it back through the parent's input routine. */ (*ifp->if_input)(ifv->ifv_ifp, m); From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 14:16: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 62AFA4E1; Fri, 20 Mar 2015 14:16: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 4EA601BA; Fri, 20 Mar 2015 14:16: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 t2KEGRR4060559; Fri, 20 Mar 2015 14:16:27 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KEGRY6060558; Fri, 20 Mar 2015 14:16:27 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503201416.t2KEGRY6060558@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 20 Mar 2015 14:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280282 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Fri, 20 Mar 2015 14:16:27 -0000 Author: glebius Date: Fri Mar 20 14:16:26 2015 New Revision: 280282 URL: https://svnweb.freebsd.org/changeset/base/280282 Log: Tiny comment fix. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Fri Mar 20 14:12:04 2015 (r280281) +++ head/sys/net/if_vlan.c Fri Mar 20 14:16:26 2015 (r280282) @@ -157,7 +157,7 @@ static eventhandler_tag iflladdr_tag; * We have a global mutex, that is used to serialize configuration * changes and isn't used in normal packet delivery. * - * We also have a per-trunk rwlock, that is locked shared on packet + * We also have a per-trunk rmlock(9), that is locked shared on packet * processing and exclusive when configuration is changed. * * The VLAN_ARRAY substitutes the dynamic hash with a static array From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 14:16:41 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 E5C1361F; Fri, 20 Mar 2015 14:16: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 CF5D21C0; Fri, 20 Mar 2015 14:16: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 t2KEGeuN060632; Fri, 20 Mar 2015 14:16:40 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KEGdJX060624; Fri, 20 Mar 2015 14:16:39 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503201416.t2KEGdJX060624@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 20 Mar 2015 14:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280283 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.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: Fri, 20 Mar 2015 14:16:41 -0000 Author: andrew Date: Fri Mar 20 14:16:39 2015 New Revision: 280283 URL: https://svnweb.freebsd.org/changeset/base/280283 Log: Move the code to set the device power to the bcm2835 mailbox driver so it can be reused by other drivers. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Fri Mar 20 14:16:26 2015 (r280282) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Fri Mar 20 14:16:39 2015 (r280283) @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include "mbox_if.h" @@ -270,3 +272,86 @@ static driver_t bcm_mbox_driver = { static devclass_t bcm_mbox_devclass; DRIVER_MODULE(mbox, simplebus, bcm_mbox_driver, bcm_mbox_devclass, 0, 0); + +static void +bcm2835_mbox_dma_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) +{ + bus_addr_t *addr; + + if (err) + return; + addr = (bus_addr_t *)arg; + *addr = PHYS_TO_VCBUS(segs[0].ds_addr); +} + +int +bcm2835_mbox_set_power_state(device_t dev, uint32_t device_id, boolean_t on) +{ + struct msg_set_power_state *msg; + bus_dma_tag_t msg_tag; + bus_dmamap_t msg_map; + bus_addr_t msg_phys; + void *msg_buf; + uint32_t reg; + device_t mbox; + int err; + + /* get mbox device */ + mbox = devclass_get_device(devclass_find("mbox"), 0); + if (mbox == NULL) { + device_printf(dev, "can't find mbox\n"); + return (ENXIO); + } + + err = bus_dma_tag_create(bus_get_dma_tag(dev), 16, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + sizeof(struct msg_set_power_state), 1, + sizeof(struct msg_set_power_state), 0, + NULL, NULL, &msg_tag); + if (err != 0) { + device_printf(dev, "can't create DMA tag\n"); + return (ENXIO); + } + + err = bus_dmamem_alloc(msg_tag, (void **)&msg_buf, 0, &msg_map); + if (err != 0) { + bus_dma_tag_destroy(msg_tag); + device_printf(dev, "can't allocate dmamem\n"); + return (ENXIO); + } + + err = bus_dmamap_load(msg_tag, msg_map, msg_buf, + sizeof(struct msg_set_power_state), bcm2835_mbox_dma_cb, + &msg_phys, 0); + if (err != 0) { + bus_dmamem_free(msg_tag, msg_buf, msg_map); + bus_dma_tag_destroy(msg_tag); + device_printf(dev, "can't load DMA map\n"); + return (ENXIO); + } + + msg = msg_buf; + + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_POWER_STATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.device_id = device_id; + msg->body.req.state = (on ? BCM2835_MBOX_POWER_ON : 0) | + BCM2835_MBOX_POWER_WAIT; + msg->end_tag = 0; + + bus_dmamap_sync(msg_tag, msg_map, + BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); + + MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)msg_phys); + MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, ®); + + bus_dmamap_unload(msg_tag, msg_map); + bus_dmamem_free(msg_tag, msg_buf, msg_map); + bus_dma_tag_destroy(msg_tag); + + return (0); +} Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Fri Mar 20 14:16:26 2015 (r280282) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Fri Mar 20 14:16:39 2015 (r280283) @@ -99,6 +99,9 @@ struct msg_set_power_state { uint32_t end_tag; }; +/* Sets the power state for a given device */ +int bcm2835_mbox_set_power_state(device_t, uint32_t, boolean_t); + #define BCM2835_MBOX_CLOCK_ID_EMMC 0x00000001 #define BCM2835_MBOX_CLOCK_ID_UART 0x00000002 #define BCM2835_MBOX_CLOCK_ID_ARM 0x00000003 Modified: head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c Fri Mar 20 14:16:26 2015 (r280282) +++ head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c Fri Mar 20 14:16:39 2015 (r280283) @@ -77,85 +77,11 @@ bcm283x_dwc_otg_probe(device_t dev) return (BUS_PROBE_VENDOR); } -static void -bcm283x_dwc_otg_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) -{ - bus_addr_t *addr; - - if (err) - return; - addr = (bus_addr_t *)arg; - *addr = PHYS_TO_VCBUS(segs[0].ds_addr); -} - static int bcm283x_dwc_otg_attach(device_t dev) { - struct msg_set_power_state *msg; - bus_dma_tag_t msg_tag; - bus_dmamap_t msg_map; - bus_addr_t msg_phys; - void *msg_buf; - uint32_t reg; - device_t mbox; - int err; - - /* get mbox device */ - mbox = devclass_get_device(devclass_find("mbox"), 0); - if (mbox == NULL) { - device_printf(dev, "can't find mbox\n"); - return (ENXIO); - } - - err = bus_dma_tag_create(bus_get_dma_tag(dev), 16, 0, - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - sizeof(struct msg_set_power_state), 1, - sizeof(struct msg_set_power_state), 0, - NULL, NULL, &msg_tag); - if (err != 0) { - device_printf(dev, "can't create DMA tag\n"); - return (ENXIO); - } - - err = bus_dmamem_alloc(msg_tag, (void **)&msg_buf, 0, &msg_map); - if (err != 0) { - bus_dma_tag_destroy(msg_tag); - device_printf(dev, "can't allocate dmamem\n"); - return (ENXIO); - } - - err = bus_dmamap_load(msg_tag, msg_map, msg_buf, - sizeof(struct msg_set_power_state), bcm283x_dwc_otg_cb, - &msg_phys, 0); - if (err != 0) { - bus_dmamem_free(msg_tag, msg_buf, msg_map); - bus_dma_tag_destroy(msg_tag); - device_printf(dev, "can't load DMA map\n"); - return (ENXIO); - } - - msg = msg_buf; - - memset(msg, 0, sizeof(*msg)); - msg->hdr.buf_size = sizeof(*msg); - msg->hdr.code = BCM2835_MBOX_CODE_REQ; - msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_POWER_STATE; - msg->tag_hdr.val_buf_size = sizeof(msg->body); - msg->tag_hdr.val_len = sizeof(msg->body.req); - msg->body.req.device_id = BCM2835_MBOX_POWER_ID_USB_HCD; - msg->body.req.state = BCM2835_MBOX_POWER_ON | BCM2835_MBOX_POWER_WAIT; - msg->end_tag = 0; - - bus_dmamap_sync(msg_tag, msg_map, - BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); - - MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)msg_phys); - MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, ®); - - bus_dmamap_unload(msg_tag, msg_map); - bus_dmamem_free(msg_tag, msg_buf, msg_map); - bus_dma_tag_destroy(msg_tag); + bcm2835_mbox_set_power_state(dev, BCM2835_MBOX_POWER_ID_USB_HCD, TRUE); return (dwc_otg_attach(dev)); } From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 14:23:41 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 4D7ED810; Fri, 20 Mar 2015 14:23:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38C472BA; Fri, 20 Mar 2015 14:23:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KENeC1064971; Fri, 20 Mar 2015 14:23:40 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KENeNK064970; Fri, 20 Mar 2015 14:23:40 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503201423.t2KENeNK064970@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 20 Mar 2015 14:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280284 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.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: Fri, 20 Mar 2015 14:23:41 -0000 Author: andrew Date: Fri Mar 20 14:23:40 2015 New Revision: 280284 URL: https://svnweb.freebsd.org/changeset/base/280284 Log: Remove now unneeded headers from the Broadcom DWC driver Modified: head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c Modified: head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c Fri Mar 20 14:16:39 2015 (r280283) +++ head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c Fri Mar 20 14:23:40 2015 (r280284) @@ -49,15 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - -#include #include -#include - -#include "mbox_if.h" static device_probe_t bcm283x_dwc_otg_probe; static device_attach_t bcm283x_dwc_otg_attach; From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 14:25:53 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 8C255983; Fri, 20 Mar 2015 14:25:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B2BA2E1; Fri, 20 Mar 2015 14:25:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KEPrbJ065364; Fri, 20 Mar 2015 14:25:53 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KEPqKV065358; Fri, 20 Mar 2015 14:25:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503201425.t2KEPqKV065358@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 20 Mar 2015 14:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280285 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.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: Fri, 20 Mar 2015 14:25:53 -0000 Author: andrew Date: Fri Mar 20 14:25:51 2015 New Revision: 280285 URL: https://svnweb.freebsd.org/changeset/base/280285 Log: Split out the common bcm283x fixes from the bcm2835 specific files. Added: head/sys/arm/broadcom/bcm2835/files.bcm283x - copied, changed from r280125, head/sys/arm/broadcom/bcm2835/files.bcm2835 Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 head/sys/arm/broadcom/bcm2835/std.bcm2835 Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm2835 Fri Mar 20 14:23:40 2015 (r280284) +++ head/sys/arm/broadcom/bcm2835/files.bcm2835 Fri Mar 20 14:25:51 2015 (r280285) @@ -1,54 +1,5 @@ # $FreeBSD$ -arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc -arm/broadcom/bcm2835/bcm2835_common.c optional fdt -arm/broadcom/bcm2835/bcm2835_cpufreq.c standard -arm/broadcom/bcm2835/bcm2835_dma.c standard -arm/broadcom/bcm2835/bcm2835_fb.c optional sc -arm/broadcom/bcm2835/bcm2835_fbd.c optional vt -arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio -arm/broadcom/bcm2835/bcm2835_intr.c standard -arm/broadcom/bcm2835/bcm2835_machdep.c standard -arm/broadcom/bcm2835/bcm2835_mbox.c standard -arm/broadcom/bcm2835/bcm2835_sdhci.c optional sdhci -arm/broadcom/bcm2835/bcm2835_spi.c optional bcm2835_spi arm/broadcom/bcm2835/bcm2835_systimer.c standard -arm/broadcom/bcm2835/bcm2835_wdog.c standard -arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt - -arm/arm/bus_space_base.c standard -arm/arm/bus_space_generic.c standard -arm/arm/bus_space_asm_generic.S standard -arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_arm11x6.S standard -arm/arm/cpufunc_asm_armv5.S standard -arm/arm/cpufunc_asm_armv6.S standard - -kern/kern_clocksource.c standard - -dev/mbox/mbox_if.m standard -dev/ofw/ofw_cpu.c standard - -arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" - -# VideoCore driver -contrib/vchiq/interface/compat/vchi_bsd.c optional vchiq \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c optional vchiq \ - compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_arm.c optional vchiq \ - compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_connected.c optional vchiq \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_core.c optional vchiq \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_kern_lib.c optional vchiq \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c optional vchiq \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_shim.c optional vchiq \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_util.c optional vchiq \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" Copied and modified: head/sys/arm/broadcom/bcm2835/files.bcm283x (from r280125, head/sys/arm/broadcom/bcm2835/files.bcm2835) ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm2835 Sun Mar 15 21:57:44 2015 (r280125, copy source) +++ head/sys/arm/broadcom/bcm2835/files.bcm283x Fri Mar 20 14:25:51 2015 (r280285) @@ -12,16 +12,13 @@ arm/broadcom/bcm2835/bcm2835_machdep.c arm/broadcom/bcm2835/bcm2835_mbox.c standard arm/broadcom/bcm2835/bcm2835_sdhci.c optional sdhci arm/broadcom/bcm2835/bcm2835_spi.c optional bcm2835_spi -arm/broadcom/bcm2835/bcm2835_systimer.c standard arm/broadcom/bcm2835/bcm2835_wdog.c standard - arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_arm11.S standard -arm/arm/cpufunc_asm_arm11x6.S standard arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_armv6.S standard Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/std.bcm2835 Fri Mar 20 14:23:40 2015 (r280284) +++ head/sys/arm/broadcom/bcm2835/std.bcm2835 Fri Mar 20 14:25:51 2015 (r280285) @@ -5,4 +5,5 @@ cpu CPU_ARM1176 makeoptions CONF_CFLAGS="-mcpu=arm1176jzf-s" files "../broadcom/bcm2835/files.bcm2835" +files "../broadcom/bcm2835/files.bcm283x" From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 15:07:06 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 82604482; Fri, 20 Mar 2015 15:07:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E8A9956; Fri, 20 Mar 2015 15:07:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KF76AQ084858; Fri, 20 Mar 2015 15:07:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KF76gZ084857; Fri, 20 Mar 2015 15:07:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503201507.t2KF76gZ084857@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 20 Mar 2015 15:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280286 - head/usr.sbin/powerd X-SVN-Group: head MIME-Version: 1.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: Fri, 20 Mar 2015 15:07:06 -0000 Author: mav Date: Fri Mar 20 15:07:05 2015 New Revision: 280286 URL: https://svnweb.freebsd.org/changeset/base/280286 Log: Add comment explaining existing powerd behavior on SMP systems. MFC after: 1 week Modified: head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/powerd.c ============================================================================== --- head/usr.sbin/powerd/powerd.c Fri Mar 20 14:25:51 2015 (r280285) +++ head/usr.sbin/powerd/powerd.c Fri Mar 20 15:07:05 2015 (r280286) @@ -127,6 +127,12 @@ static int devd_pipe = -1; #define DEVD_RETRY_INTERVAL 60 /* seconds */ static struct timeval tried_devd; +/* + * This function returns summary load of all CPUs. It was made so + * intentionally to not reduce performance in scenarios when several + * threads are processing requests as a pipeline -- running one at + * a time on different CPUs and waiting for each other. + */ static int read_usage_times(int *load) { From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 16:05: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 DD100AC7; Fri, 20 Mar 2015 16:05:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C914EFF5; Fri, 20 Mar 2015 16:05:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KG5ExL013045; Fri, 20 Mar 2015 16:05:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KG5ErE013044; Fri, 20 Mar 2015 16:05:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503201605.t2KG5ErE013044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 20 Mar 2015 16:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280293 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Fri, 20 Mar 2015 16:05:15 -0000 Author: mav Date: Fri Mar 20 16:05:13 2015 New Revision: 280293 URL: https://svnweb.freebsd.org/changeset/base/280293 Log: Add missing variable initialization. Reported by: Coverity CID: 1288938 MFC after: 3 days Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Fri Mar 20 15:41:23 2015 (r280292) +++ head/usr.sbin/bhyve/pci_ahci.c Fri Mar 20 16:05:13 2015 (r280293) @@ -1759,7 +1759,7 @@ ata_ioreq_cb(struct blockif_req *br, int DPRINTF("%s %d\n", __func__, err); - ncq = 0; + ncq = dsm = 0; aior = br->br_param; p = aior->io_pr; cfis = aior->cfis; From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 16:54:23 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 5D2A4F4C; Fri, 20 Mar 2015 16:54:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4797C871; Fri, 20 Mar 2015 16:54:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KGsNcx037702; Fri, 20 Mar 2015 16:54:23 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KGsMNO037699; Fri, 20 Mar 2015 16:54:22 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503201654.t2KGsMNO037699@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 20 Mar 2015 16:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280294 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.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: Fri, 20 Mar 2015 16:54:23 -0000 Author: andrew Date: Fri Mar 20 16:54:21 2015 New Revision: 280294 URL: https://svnweb.freebsd.org/changeset/base/280294 Log: Add a helper function to read clock frequencies from videocore and use this to get the default frequency of the sdhci device. While here use a u_int to hold the frequency as it may be too large to fit in a 32-bit signed integer. This is the case when we have a 250MHz clock. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Fri Mar 20 16:05:13 2015 (r280293) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Fri Mar 20 16:54:21 2015 (r280294) @@ -284,53 +284,63 @@ bcm2835_mbox_dma_cb(void *arg, bus_dma_s *addr = PHYS_TO_VCBUS(segs[0].ds_addr); } -int -bcm2835_mbox_set_power_state(device_t dev, uint32_t device_id, boolean_t on) +static void * +bcm2835_mbox_init_dma(device_t dev, size_t len, bus_dma_tag_t *tag, + bus_dmamap_t *map, bus_addr_t *phys) { - struct msg_set_power_state *msg; - bus_dma_tag_t msg_tag; - bus_dmamap_t msg_map; - bus_addr_t msg_phys; - void *msg_buf; - uint32_t reg; - device_t mbox; + void *buf; int err; - /* get mbox device */ - mbox = devclass_get_device(devclass_find("mbox"), 0); - if (mbox == NULL) { - device_printf(dev, "can't find mbox\n"); - return (ENXIO); - } - err = bus_dma_tag_create(bus_get_dma_tag(dev), 16, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - sizeof(struct msg_set_power_state), 1, - sizeof(struct msg_set_power_state), 0, - NULL, NULL, &msg_tag); + len, 1, len, 0, NULL, NULL, tag); if (err != 0) { device_printf(dev, "can't create DMA tag\n"); - return (ENXIO); + return (NULL); } - err = bus_dmamem_alloc(msg_tag, (void **)&msg_buf, 0, &msg_map); + err = bus_dmamem_alloc(*tag, &buf, 0, map); if (err != 0) { - bus_dma_tag_destroy(msg_tag); + bus_dma_tag_destroy(*tag); device_printf(dev, "can't allocate dmamem\n"); - return (ENXIO); + return (NULL); } - err = bus_dmamap_load(msg_tag, msg_map, msg_buf, + err = bus_dmamap_load(*tag, *map, buf, sizeof(struct msg_set_power_state), bcm2835_mbox_dma_cb, - &msg_phys, 0); + phys, 0); if (err != 0) { - bus_dmamem_free(msg_tag, msg_buf, msg_map); - bus_dma_tag_destroy(msg_tag); + bus_dmamem_free(*tag, buf, *map); + bus_dma_tag_destroy(*tag); device_printf(dev, "can't load DMA map\n"); + return (NULL); + } + + return (buf); +} + +int +bcm2835_mbox_set_power_state(device_t dev, uint32_t device_id, boolean_t on) +{ + struct msg_set_power_state *msg; + bus_dma_tag_t msg_tag; + bus_dmamap_t msg_map; + bus_addr_t msg_phys; + uint32_t reg; + device_t mbox; + + /* get mbox device */ + mbox = devclass_get_device(devclass_find("mbox"), 0); + if (mbox == NULL) { + device_printf(dev, "can't find mbox\n"); return (ENXIO); } - msg = msg_buf; + /* Allocate memory for the message */ + msg = bcm2835_mbox_init_dma(dev, sizeof(*msg), &msg_tag, &msg_map, + &msg_phys); + if (msg == NULL) + return (ENOMEM); memset(msg, 0, sizeof(*msg)); msg->hdr.buf_size = sizeof(*msg); @@ -350,7 +360,56 @@ bcm2835_mbox_set_power_state(device_t de MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, ®); bus_dmamap_unload(msg_tag, msg_map); - bus_dmamem_free(msg_tag, msg_buf, msg_map); + bus_dmamem_free(msg_tag, msg, msg_map); + bus_dma_tag_destroy(msg_tag); + + return (0); +} + +int +bcm2835_mbox_get_clock_rate(device_t dev, uint32_t clock_id, uint32_t *hz) +{ + struct msg_get_clock_rate *msg; + bus_dma_tag_t msg_tag; + bus_dmamap_t msg_map; + bus_addr_t msg_phys; + uint32_t reg; + device_t mbox; + + /* get mbox device */ + mbox = devclass_get_device(devclass_find("mbox"), 0); + if (mbox == NULL) { + device_printf(dev, "can't find mbox\n"); + return (ENXIO); + } + + /* Allocate memory for the message */ + msg = bcm2835_mbox_init_dma(dev, sizeof(*msg), &msg_tag, &msg_map, + &msg_phys); + if (msg == NULL) + return (ENOMEM); + + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->end_tag = 0; + + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREWRITE); + MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)msg_phys); + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTWRITE); + + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREREAD); + MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, ®); + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTREAD); + + *hz = msg->body.resp.rate_hz; + + bus_dmamap_unload(msg_tag, msg_map); + bus_dmamem_free(msg_tag, msg, msg_map); bus_dma_tag_destroy(msg_tag); return (0); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Fri Mar 20 16:05:13 2015 (r280293) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Fri Mar 20 16:54:21 2015 (r280294) @@ -179,6 +179,8 @@ struct msg_get_min_clock_rate { uint32_t end_tag; }; +int bcm2835_mbox_get_clock_rate(device_t, uint32_t, uint32_t *); + #define BCM2835_MBOX_TURBO_ON 1 #define BCM2835_MBOX_TURBO_OFF 0 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Mar 20 16:05:13 2015 (r280293) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Mar 20 16:54:21 2015 (r280294) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include "sdhci_if.h" #include "bcm2835_dma.h" +#include #include "bcm2835_vcbus.h" #define BCM2835_DEFAULT_SDHCI_FREQ 50 @@ -154,18 +155,38 @@ bcm_sdhci_attach(device_t dev) int rid, err; phandle_t node; pcell_t cell; - int default_freq; + u_int default_freq; sc->sc_dev = dev; sc->sc_req = NULL; - err = 0; - default_freq = BCM2835_DEFAULT_SDHCI_FREQ; + err = bcm2835_mbox_set_power_state(dev, BCM2835_MBOX_POWER_ID_EMMC, + TRUE); + if (err != 0) { + if (bootverbose) + device_printf(dev, "Unable to enable the power\n"); + return (err); + } + + default_freq = 0; + err = bcm2835_mbox_get_clock_rate(dev, BCM2835_MBOX_CLOCK_ID_EMMC, + &default_freq); + if (err == 0) { + /* Convert to MHz */ + default_freq /= 1000000; + if (bootverbose) + device_printf(dev, "default frequency: %dMHz\n", + default_freq); + } + if (default_freq == 0) + default_freq = BCM2835_DEFAULT_SDHCI_FREQ; + node = ofw_bus_get_node(sc->sc_dev); if ((OF_getprop(node, "clock-frequency", &cell, sizeof(cell))) > 0) - default_freq = (int)fdt32_to_cpu(cell)/1000000; + default_freq = fdt32_to_cpu(cell)/1000000; - dprintf("SDHCI frequency: %dMHz\n", default_freq); + if (bootverbose) + device_printf(dev, "SDHCI frequency: %dMHz\n", default_freq); mtx_init(&sc->sc_mtx, "bcm sdhci", "sdhci", MTX_DEF); From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 19:16:22 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 EA9953BA; Fri, 20 Mar 2015 19:16:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0C71C64; Fri, 20 Mar 2015 19:16:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KJGMjc005907; Fri, 20 Mar 2015 19:16:22 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KJGKT3005899; Fri, 20 Mar 2015 19:16:20 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201503201916.t2KJGKT3005899@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 20 Mar 2015 19:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280297 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes crypto/openssl/crypto/asn1 crypto/openssl/crypto/bf crypto/openssl/crypto/bio crypt... X-SVN-Group: head MIME-Version: 1.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: Fri, 20 Mar 2015 19:16:23 -0000 Author: jkim Date: Fri Mar 20 19:16:18 2015 New Revision: 280297 URL: https://svnweb.freebsd.org/changeset/base/280297 Log: Merge OpenSSL 1.0.1m. Added: head/crypto/openssl/crypto/evp/evp_extra_test.c - copied unchanged from r280288, vendor-crypto/openssl/dist/crypto/evp/evp_extra_test.c head/crypto/openssl/doc/crypto/d2i_CMS_ContentInfo.pod - copied unchanged from r280288, vendor-crypto/openssl/dist/doc/crypto/d2i_CMS_ContentInfo.pod head/crypto/openssl/doc/crypto/d2i_ECPrivateKey.pod - copied unchanged from r280288, vendor-crypto/openssl/dist/doc/crypto/d2i_ECPrivateKey.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_read_ahead.pod - copied unchanged from r280288, vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set_read_ahead.pod head/crypto/openssl/util/indent.pro - copied unchanged from r280288, vendor-crypto/openssl/dist/util/indent.pro head/crypto/openssl/util/openssl-format-source - copied unchanged from r280288, vendor-crypto/openssl/dist/util/openssl-format-source head/crypto/openssl/util/su-filter.pl - copied unchanged from r280288, vendor-crypto/openssl/dist/util/su-filter.pl head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 (contents, props changed) head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 (contents, props changed) head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 (contents, props changed) Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/app_rand.c head/crypto/openssl/apps/apps.c head/crypto/openssl/apps/apps.h head/crypto/openssl/apps/asn1pars.c head/crypto/openssl/apps/ca.c head/crypto/openssl/apps/ciphers.c head/crypto/openssl/apps/cms.c head/crypto/openssl/apps/crl.c head/crypto/openssl/apps/crl2p7.c head/crypto/openssl/apps/dgst.c head/crypto/openssl/apps/dh.c head/crypto/openssl/apps/dhparam.c head/crypto/openssl/apps/dsa.c head/crypto/openssl/apps/dsaparam.c head/crypto/openssl/apps/ec.c head/crypto/openssl/apps/ecparam.c head/crypto/openssl/apps/enc.c head/crypto/openssl/apps/engine.c head/crypto/openssl/apps/errstr.c head/crypto/openssl/apps/gendh.c head/crypto/openssl/apps/gendsa.c head/crypto/openssl/apps/genpkey.c head/crypto/openssl/apps/genrsa.c head/crypto/openssl/apps/nseq.c head/crypto/openssl/apps/ocsp.c head/crypto/openssl/apps/openssl.c head/crypto/openssl/apps/passwd.c head/crypto/openssl/apps/pkcs12.c head/crypto/openssl/apps/pkcs7.c head/crypto/openssl/apps/pkcs8.c head/crypto/openssl/apps/pkey.c head/crypto/openssl/apps/pkeyparam.c head/crypto/openssl/apps/pkeyutl.c head/crypto/openssl/apps/prime.c head/crypto/openssl/apps/progs.h head/crypto/openssl/apps/rand.c head/crypto/openssl/apps/req.c head/crypto/openssl/apps/rsa.c head/crypto/openssl/apps/rsautl.c head/crypto/openssl/apps/s_apps.h head/crypto/openssl/apps/s_cb.c head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/s_server.c head/crypto/openssl/apps/s_socket.c head/crypto/openssl/apps/s_time.c head/crypto/openssl/apps/sess_id.c head/crypto/openssl/apps/smime.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/spkac.c head/crypto/openssl/apps/srp.c head/crypto/openssl/apps/testdsa.h head/crypto/openssl/apps/testrsa.h head/crypto/openssl/apps/timeouts.h head/crypto/openssl/apps/ts.c head/crypto/openssl/apps/verify.c head/crypto/openssl/apps/version.c head/crypto/openssl/apps/x509.c head/crypto/openssl/crypto/LPdir_unix.c head/crypto/openssl/crypto/aes/aes.h head/crypto/openssl/crypto/aes/aes_cbc.c head/crypto/openssl/crypto/aes/aes_cfb.c head/crypto/openssl/crypto/aes/aes_core.c head/crypto/openssl/crypto/aes/aes_ctr.c head/crypto/openssl/crypto/aes/aes_ecb.c head/crypto/openssl/crypto/aes/aes_ige.c head/crypto/openssl/crypto/aes/aes_locl.h head/crypto/openssl/crypto/aes/aes_misc.c head/crypto/openssl/crypto/aes/aes_ofb.c head/crypto/openssl/crypto/aes/aes_wrap.c head/crypto/openssl/crypto/aes/aes_x86core.c head/crypto/openssl/crypto/arm_arch.h head/crypto/openssl/crypto/armcap.c head/crypto/openssl/crypto/asn1/a_bitstr.c head/crypto/openssl/crypto/asn1/a_bool.c head/crypto/openssl/crypto/asn1/a_bytes.c head/crypto/openssl/crypto/asn1/a_d2i_fp.c head/crypto/openssl/crypto/asn1/a_digest.c head/crypto/openssl/crypto/asn1/a_dup.c head/crypto/openssl/crypto/asn1/a_enum.c head/crypto/openssl/crypto/asn1/a_gentm.c head/crypto/openssl/crypto/asn1/a_i2d_fp.c head/crypto/openssl/crypto/asn1/a_int.c head/crypto/openssl/crypto/asn1/a_mbstr.c head/crypto/openssl/crypto/asn1/a_object.c head/crypto/openssl/crypto/asn1/a_octet.c head/crypto/openssl/crypto/asn1/a_print.c head/crypto/openssl/crypto/asn1/a_set.c head/crypto/openssl/crypto/asn1/a_sign.c head/crypto/openssl/crypto/asn1/a_strex.c head/crypto/openssl/crypto/asn1/a_strnid.c head/crypto/openssl/crypto/asn1/a_time.c head/crypto/openssl/crypto/asn1/a_type.c head/crypto/openssl/crypto/asn1/a_utctm.c head/crypto/openssl/crypto/asn1/a_utf8.c head/crypto/openssl/crypto/asn1/a_verify.c head/crypto/openssl/crypto/asn1/ameth_lib.c head/crypto/openssl/crypto/asn1/asn1.h head/crypto/openssl/crypto/asn1/asn1_err.c head/crypto/openssl/crypto/asn1/asn1_gen.c head/crypto/openssl/crypto/asn1/asn1_lib.c head/crypto/openssl/crypto/asn1/asn1_locl.h head/crypto/openssl/crypto/asn1/asn1_mac.h head/crypto/openssl/crypto/asn1/asn1_par.c head/crypto/openssl/crypto/asn1/asn1t.h head/crypto/openssl/crypto/asn1/asn_mime.c head/crypto/openssl/crypto/asn1/asn_moid.c head/crypto/openssl/crypto/asn1/asn_pack.c head/crypto/openssl/crypto/asn1/bio_asn1.c head/crypto/openssl/crypto/asn1/bio_ndef.c head/crypto/openssl/crypto/asn1/charmap.h head/crypto/openssl/crypto/asn1/d2i_pr.c head/crypto/openssl/crypto/asn1/d2i_pu.c head/crypto/openssl/crypto/asn1/evp_asn1.c head/crypto/openssl/crypto/asn1/f_enum.c head/crypto/openssl/crypto/asn1/f_int.c head/crypto/openssl/crypto/asn1/f_string.c head/crypto/openssl/crypto/asn1/i2d_pr.c head/crypto/openssl/crypto/asn1/i2d_pu.c head/crypto/openssl/crypto/asn1/n_pkey.c head/crypto/openssl/crypto/asn1/nsseq.c head/crypto/openssl/crypto/asn1/p5_pbe.c head/crypto/openssl/crypto/asn1/p5_pbev2.c head/crypto/openssl/crypto/asn1/p8_pkey.c head/crypto/openssl/crypto/asn1/t_bitst.c head/crypto/openssl/crypto/asn1/t_crl.c head/crypto/openssl/crypto/asn1/t_pkey.c head/crypto/openssl/crypto/asn1/t_req.c head/crypto/openssl/crypto/asn1/t_spki.c head/crypto/openssl/crypto/asn1/t_x509.c head/crypto/openssl/crypto/asn1/t_x509a.c head/crypto/openssl/crypto/asn1/tasn_dec.c head/crypto/openssl/crypto/asn1/tasn_enc.c head/crypto/openssl/crypto/asn1/tasn_fre.c head/crypto/openssl/crypto/asn1/tasn_new.c head/crypto/openssl/crypto/asn1/tasn_prn.c head/crypto/openssl/crypto/asn1/tasn_typ.c head/crypto/openssl/crypto/asn1/tasn_utl.c head/crypto/openssl/crypto/asn1/x_algor.c head/crypto/openssl/crypto/asn1/x_attrib.c head/crypto/openssl/crypto/asn1/x_bignum.c head/crypto/openssl/crypto/asn1/x_crl.c head/crypto/openssl/crypto/asn1/x_exten.c head/crypto/openssl/crypto/asn1/x_info.c head/crypto/openssl/crypto/asn1/x_long.c head/crypto/openssl/crypto/asn1/x_name.c head/crypto/openssl/crypto/asn1/x_nx509.c head/crypto/openssl/crypto/asn1/x_pkey.c head/crypto/openssl/crypto/asn1/x_pubkey.c head/crypto/openssl/crypto/asn1/x_req.c head/crypto/openssl/crypto/asn1/x_sig.c head/crypto/openssl/crypto/asn1/x_spki.c head/crypto/openssl/crypto/asn1/x_val.c head/crypto/openssl/crypto/asn1/x_x509.c head/crypto/openssl/crypto/asn1/x_x509a.c head/crypto/openssl/crypto/bf/bf_cbc.c head/crypto/openssl/crypto/bf/bf_cfb64.c head/crypto/openssl/crypto/bf/bf_ecb.c head/crypto/openssl/crypto/bf/bf_enc.c head/crypto/openssl/crypto/bf/bf_locl.h head/crypto/openssl/crypto/bf/bf_ofb64.c head/crypto/openssl/crypto/bf/bf_opts.c head/crypto/openssl/crypto/bf/bf_pi.h head/crypto/openssl/crypto/bf/bf_skey.c head/crypto/openssl/crypto/bf/bfspeed.c head/crypto/openssl/crypto/bf/bftest.c head/crypto/openssl/crypto/bf/blowfish.h head/crypto/openssl/crypto/bio/b_dump.c head/crypto/openssl/crypto/bio/b_print.c head/crypto/openssl/crypto/bio/b_sock.c head/crypto/openssl/crypto/bio/bf_buff.c head/crypto/openssl/crypto/bio/bf_lbuf.c head/crypto/openssl/crypto/bio/bf_nbio.c head/crypto/openssl/crypto/bio/bf_null.c head/crypto/openssl/crypto/bio/bio.h head/crypto/openssl/crypto/bio/bio_cb.c head/crypto/openssl/crypto/bio/bio_err.c head/crypto/openssl/crypto/bio/bio_lcl.h head/crypto/openssl/crypto/bio/bio_lib.c head/crypto/openssl/crypto/bio/bss_acpt.c head/crypto/openssl/crypto/bio/bss_bio.c head/crypto/openssl/crypto/bio/bss_conn.c head/crypto/openssl/crypto/bio/bss_dgram.c head/crypto/openssl/crypto/bio/bss_fd.c head/crypto/openssl/crypto/bio/bss_file.c head/crypto/openssl/crypto/bio/bss_log.c head/crypto/openssl/crypto/bio/bss_mem.c head/crypto/openssl/crypto/bio/bss_null.c head/crypto/openssl/crypto/bio/bss_rtcp.c head/crypto/openssl/crypto/bio/bss_sock.c head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c head/crypto/openssl/crypto/bn/bn.h head/crypto/openssl/crypto/bn/bn_add.c head/crypto/openssl/crypto/bn/bn_asm.c head/crypto/openssl/crypto/bn/bn_blind.c head/crypto/openssl/crypto/bn/bn_const.c head/crypto/openssl/crypto/bn/bn_ctx.c head/crypto/openssl/crypto/bn/bn_depr.c head/crypto/openssl/crypto/bn/bn_div.c head/crypto/openssl/crypto/bn/bn_err.c head/crypto/openssl/crypto/bn/bn_exp.c head/crypto/openssl/crypto/bn/bn_exp2.c head/crypto/openssl/crypto/bn/bn_gcd.c head/crypto/openssl/crypto/bn/bn_gf2m.c head/crypto/openssl/crypto/bn/bn_kron.c head/crypto/openssl/crypto/bn/bn_lcl.h head/crypto/openssl/crypto/bn/bn_lib.c head/crypto/openssl/crypto/bn/bn_mod.c head/crypto/openssl/crypto/bn/bn_mont.c head/crypto/openssl/crypto/bn/bn_mpi.c head/crypto/openssl/crypto/bn/bn_mul.c head/crypto/openssl/crypto/bn/bn_nist.c head/crypto/openssl/crypto/bn/bn_prime.c head/crypto/openssl/crypto/bn/bn_prime.h head/crypto/openssl/crypto/bn/bn_print.c head/crypto/openssl/crypto/bn/bn_rand.c head/crypto/openssl/crypto/bn/bn_recp.c head/crypto/openssl/crypto/bn/bn_shift.c head/crypto/openssl/crypto/bn/bn_sqr.c head/crypto/openssl/crypto/bn/bn_sqrt.c head/crypto/openssl/crypto/bn/bn_word.c head/crypto/openssl/crypto/bn/bn_x931p.c head/crypto/openssl/crypto/bn/bnspeed.c head/crypto/openssl/crypto/bn/bntest.c head/crypto/openssl/crypto/bn/divtest.c head/crypto/openssl/crypto/bn/exp.c head/crypto/openssl/crypto/bn/expspeed.c head/crypto/openssl/crypto/bn/exptest.c head/crypto/openssl/crypto/buffer/buf_err.c head/crypto/openssl/crypto/buffer/buf_str.c head/crypto/openssl/crypto/buffer/buffer.c head/crypto/openssl/crypto/buffer/buffer.h head/crypto/openssl/crypto/camellia/camellia.c head/crypto/openssl/crypto/camellia/camellia.h head/crypto/openssl/crypto/camellia/cmll_cbc.c head/crypto/openssl/crypto/camellia/cmll_cfb.c head/crypto/openssl/crypto/camellia/cmll_ctr.c head/crypto/openssl/crypto/camellia/cmll_ecb.c head/crypto/openssl/crypto/camellia/cmll_locl.h head/crypto/openssl/crypto/camellia/cmll_misc.c head/crypto/openssl/crypto/camellia/cmll_ofb.c head/crypto/openssl/crypto/camellia/cmll_utl.c head/crypto/openssl/crypto/cast/c_cfb64.c head/crypto/openssl/crypto/cast/c_ecb.c head/crypto/openssl/crypto/cast/c_enc.c head/crypto/openssl/crypto/cast/c_ofb64.c head/crypto/openssl/crypto/cast/c_skey.c head/crypto/openssl/crypto/cast/cast.h head/crypto/openssl/crypto/cast/cast_lcl.h head/crypto/openssl/crypto/cast/cast_s.h head/crypto/openssl/crypto/cast/cast_spd.c head/crypto/openssl/crypto/cast/castopts.c head/crypto/openssl/crypto/cast/casttest.c head/crypto/openssl/crypto/cmac/cm_ameth.c head/crypto/openssl/crypto/cmac/cm_pmeth.c head/crypto/openssl/crypto/cmac/cmac.c head/crypto/openssl/crypto/cmac/cmac.h head/crypto/openssl/crypto/cms/cms.h head/crypto/openssl/crypto/cms/cms_asn1.c head/crypto/openssl/crypto/cms/cms_att.c head/crypto/openssl/crypto/cms/cms_cd.c head/crypto/openssl/crypto/cms/cms_dd.c head/crypto/openssl/crypto/cms/cms_enc.c head/crypto/openssl/crypto/cms/cms_env.c head/crypto/openssl/crypto/cms/cms_err.c head/crypto/openssl/crypto/cms/cms_ess.c head/crypto/openssl/crypto/cms/cms_io.c head/crypto/openssl/crypto/cms/cms_lcl.h head/crypto/openssl/crypto/cms/cms_lib.c head/crypto/openssl/crypto/cms/cms_pwri.c head/crypto/openssl/crypto/cms/cms_sd.c head/crypto/openssl/crypto/cms/cms_smime.c head/crypto/openssl/crypto/comp/c_rle.c head/crypto/openssl/crypto/comp/c_zlib.c head/crypto/openssl/crypto/comp/comp.h head/crypto/openssl/crypto/comp/comp_err.c head/crypto/openssl/crypto/comp/comp_lib.c head/crypto/openssl/crypto/conf/cnf_save.c head/crypto/openssl/crypto/conf/conf.h head/crypto/openssl/crypto/conf/conf_api.c head/crypto/openssl/crypto/conf/conf_api.h head/crypto/openssl/crypto/conf/conf_def.c head/crypto/openssl/crypto/conf/conf_def.h head/crypto/openssl/crypto/conf/conf_err.c head/crypto/openssl/crypto/conf/conf_lib.c head/crypto/openssl/crypto/conf/conf_mall.c head/crypto/openssl/crypto/conf/conf_mod.c head/crypto/openssl/crypto/conf/conf_sap.c head/crypto/openssl/crypto/conf/test.c head/crypto/openssl/crypto/constant_time_locl.h head/crypto/openssl/crypto/constant_time_test.c head/crypto/openssl/crypto/cpt_err.c head/crypto/openssl/crypto/cryptlib.c head/crypto/openssl/crypto/cryptlib.h head/crypto/openssl/crypto/crypto.h head/crypto/openssl/crypto/cversion.c head/crypto/openssl/crypto/des/cbc3_enc.c head/crypto/openssl/crypto/des/cbc_cksm.c head/crypto/openssl/crypto/des/cbc_enc.c head/crypto/openssl/crypto/des/cfb64ede.c head/crypto/openssl/crypto/des/cfb64enc.c head/crypto/openssl/crypto/des/cfb_enc.c head/crypto/openssl/crypto/des/des.c head/crypto/openssl/crypto/des/des.h head/crypto/openssl/crypto/des/des_enc.c head/crypto/openssl/crypto/des/des_locl.h head/crypto/openssl/crypto/des/des_old.c head/crypto/openssl/crypto/des/des_old.h head/crypto/openssl/crypto/des/des_old2.c head/crypto/openssl/crypto/des/des_opts.c head/crypto/openssl/crypto/des/des_ver.h head/crypto/openssl/crypto/des/destest.c head/crypto/openssl/crypto/des/ecb3_enc.c head/crypto/openssl/crypto/des/ecb_enc.c head/crypto/openssl/crypto/des/ede_cbcm_enc.c head/crypto/openssl/crypto/des/enc_read.c head/crypto/openssl/crypto/des/enc_writ.c head/crypto/openssl/crypto/des/fcrypt.c head/crypto/openssl/crypto/des/fcrypt_b.c head/crypto/openssl/crypto/des/ncbc_enc.c head/crypto/openssl/crypto/des/ofb64ede.c head/crypto/openssl/crypto/des/ofb64enc.c head/crypto/openssl/crypto/des/ofb_enc.c head/crypto/openssl/crypto/des/pcbc_enc.c head/crypto/openssl/crypto/des/qud_cksm.c head/crypto/openssl/crypto/des/rand_key.c head/crypto/openssl/crypto/des/read2pwd.c head/crypto/openssl/crypto/des/read_pwd.c head/crypto/openssl/crypto/des/rpc_des.h head/crypto/openssl/crypto/des/rpc_enc.c head/crypto/openssl/crypto/des/rpw.c head/crypto/openssl/crypto/des/set_key.c head/crypto/openssl/crypto/des/speed.c head/crypto/openssl/crypto/des/spr.h head/crypto/openssl/crypto/des/str2key.c head/crypto/openssl/crypto/des/xcbc_enc.c head/crypto/openssl/crypto/dh/dh.h head/crypto/openssl/crypto/dh/dh_ameth.c head/crypto/openssl/crypto/dh/dh_asn1.c head/crypto/openssl/crypto/dh/dh_check.c head/crypto/openssl/crypto/dh/dh_depr.c head/crypto/openssl/crypto/dh/dh_err.c head/crypto/openssl/crypto/dh/dh_gen.c head/crypto/openssl/crypto/dh/dh_key.c head/crypto/openssl/crypto/dh/dh_lib.c head/crypto/openssl/crypto/dh/dh_pmeth.c head/crypto/openssl/crypto/dh/dh_prn.c head/crypto/openssl/crypto/dh/dhtest.c head/crypto/openssl/crypto/dh/p1024.c head/crypto/openssl/crypto/dh/p192.c head/crypto/openssl/crypto/dh/p512.c head/crypto/openssl/crypto/dsa/dsa.h head/crypto/openssl/crypto/dsa/dsa_ameth.c head/crypto/openssl/crypto/dsa/dsa_asn1.c head/crypto/openssl/crypto/dsa/dsa_depr.c head/crypto/openssl/crypto/dsa/dsa_err.c head/crypto/openssl/crypto/dsa/dsa_gen.c head/crypto/openssl/crypto/dsa/dsa_key.c head/crypto/openssl/crypto/dsa/dsa_lib.c head/crypto/openssl/crypto/dsa/dsa_locl.h head/crypto/openssl/crypto/dsa/dsa_ossl.c head/crypto/openssl/crypto/dsa/dsa_pmeth.c head/crypto/openssl/crypto/dsa/dsa_prn.c head/crypto/openssl/crypto/dsa/dsa_sign.c head/crypto/openssl/crypto/dsa/dsa_vrf.c head/crypto/openssl/crypto/dsa/dsagen.c head/crypto/openssl/crypto/dsa/dsatest.c head/crypto/openssl/crypto/dso/dso.h head/crypto/openssl/crypto/dso/dso_beos.c head/crypto/openssl/crypto/dso/dso_dl.c head/crypto/openssl/crypto/dso/dso_dlfcn.c head/crypto/openssl/crypto/dso/dso_err.c head/crypto/openssl/crypto/dso/dso_lib.c head/crypto/openssl/crypto/dso/dso_null.c head/crypto/openssl/crypto/dso/dso_openssl.c head/crypto/openssl/crypto/ebcdic.c head/crypto/openssl/crypto/ebcdic.h head/crypto/openssl/crypto/ec/ec.h head/crypto/openssl/crypto/ec/ec2_mult.c head/crypto/openssl/crypto/ec/ec2_oct.c head/crypto/openssl/crypto/ec/ec2_smpl.c head/crypto/openssl/crypto/ec/ec_ameth.c head/crypto/openssl/crypto/ec/ec_asn1.c head/crypto/openssl/crypto/ec/ec_check.c head/crypto/openssl/crypto/ec/ec_curve.c head/crypto/openssl/crypto/ec/ec_cvt.c head/crypto/openssl/crypto/ec/ec_err.c head/crypto/openssl/crypto/ec/ec_key.c head/crypto/openssl/crypto/ec/ec_lcl.h head/crypto/openssl/crypto/ec/ec_lib.c head/crypto/openssl/crypto/ec/ec_mult.c head/crypto/openssl/crypto/ec/ec_oct.c head/crypto/openssl/crypto/ec/ec_pmeth.c head/crypto/openssl/crypto/ec/ec_print.c head/crypto/openssl/crypto/ec/eck_prn.c head/crypto/openssl/crypto/ec/ecp_mont.c head/crypto/openssl/crypto/ec/ecp_nist.c head/crypto/openssl/crypto/ec/ecp_nistp224.c head/crypto/openssl/crypto/ec/ecp_nistp256.c head/crypto/openssl/crypto/ec/ecp_nistp521.c head/crypto/openssl/crypto/ec/ecp_nistputil.c head/crypto/openssl/crypto/ec/ecp_oct.c head/crypto/openssl/crypto/ec/ecp_smpl.c head/crypto/openssl/crypto/ec/ectest.c head/crypto/openssl/crypto/ecdh/ecdh.h head/crypto/openssl/crypto/ecdh/ecdhtest.c head/crypto/openssl/crypto/ecdh/ech_err.c head/crypto/openssl/crypto/ecdh/ech_key.c head/crypto/openssl/crypto/ecdh/ech_lib.c head/crypto/openssl/crypto/ecdh/ech_locl.h head/crypto/openssl/crypto/ecdh/ech_ossl.c head/crypto/openssl/crypto/ecdsa/ecdsa.h head/crypto/openssl/crypto/ecdsa/ecdsatest.c head/crypto/openssl/crypto/ecdsa/ecs_asn1.c head/crypto/openssl/crypto/ecdsa/ecs_err.c head/crypto/openssl/crypto/ecdsa/ecs_lib.c head/crypto/openssl/crypto/ecdsa/ecs_locl.h head/crypto/openssl/crypto/ecdsa/ecs_ossl.c head/crypto/openssl/crypto/ecdsa/ecs_sign.c head/crypto/openssl/crypto/ecdsa/ecs_vrf.c head/crypto/openssl/crypto/engine/eng_all.c head/crypto/openssl/crypto/engine/eng_cnf.c head/crypto/openssl/crypto/engine/eng_cryptodev.c head/crypto/openssl/crypto/engine/eng_ctrl.c head/crypto/openssl/crypto/engine/eng_dyn.c head/crypto/openssl/crypto/engine/eng_err.c head/crypto/openssl/crypto/engine/eng_fat.c head/crypto/openssl/crypto/engine/eng_init.c head/crypto/openssl/crypto/engine/eng_int.h head/crypto/openssl/crypto/engine/eng_lib.c head/crypto/openssl/crypto/engine/eng_list.c head/crypto/openssl/crypto/engine/eng_openssl.c head/crypto/openssl/crypto/engine/eng_pkey.c head/crypto/openssl/crypto/engine/eng_rdrand.c head/crypto/openssl/crypto/engine/eng_rsax.c head/crypto/openssl/crypto/engine/eng_table.c head/crypto/openssl/crypto/engine/engine.h head/crypto/openssl/crypto/engine/enginetest.c head/crypto/openssl/crypto/engine/tb_asnmth.c head/crypto/openssl/crypto/engine/tb_cipher.c head/crypto/openssl/crypto/engine/tb_dh.c head/crypto/openssl/crypto/engine/tb_digest.c head/crypto/openssl/crypto/engine/tb_dsa.c head/crypto/openssl/crypto/engine/tb_ecdh.c head/crypto/openssl/crypto/engine/tb_ecdsa.c head/crypto/openssl/crypto/engine/tb_pkmeth.c head/crypto/openssl/crypto/engine/tb_rand.c head/crypto/openssl/crypto/engine/tb_rsa.c head/crypto/openssl/crypto/engine/tb_store.c head/crypto/openssl/crypto/err/err.c head/crypto/openssl/crypto/err/err.h head/crypto/openssl/crypto/err/err_all.c head/crypto/openssl/crypto/err/err_prn.c head/crypto/openssl/crypto/evp/Makefile head/crypto/openssl/crypto/evp/bio_b64.c head/crypto/openssl/crypto/evp/bio_enc.c head/crypto/openssl/crypto/evp/bio_md.c head/crypto/openssl/crypto/evp/bio_ok.c head/crypto/openssl/crypto/evp/c_all.c head/crypto/openssl/crypto/evp/c_allc.c head/crypto/openssl/crypto/evp/c_alld.c head/crypto/openssl/crypto/evp/digest.c head/crypto/openssl/crypto/evp/e_aes.c head/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c head/crypto/openssl/crypto/evp/e_bf.c head/crypto/openssl/crypto/evp/e_camellia.c head/crypto/openssl/crypto/evp/e_cast.c head/crypto/openssl/crypto/evp/e_des.c head/crypto/openssl/crypto/evp/e_des3.c head/crypto/openssl/crypto/evp/e_dsa.c head/crypto/openssl/crypto/evp/e_idea.c head/crypto/openssl/crypto/evp/e_null.c head/crypto/openssl/crypto/evp/e_old.c head/crypto/openssl/crypto/evp/e_rc2.c head/crypto/openssl/crypto/evp/e_rc4.c head/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c head/crypto/openssl/crypto/evp/e_rc5.c head/crypto/openssl/crypto/evp/e_seed.c head/crypto/openssl/crypto/evp/e_xcbc_d.c head/crypto/openssl/crypto/evp/encode.c head/crypto/openssl/crypto/evp/evp.h head/crypto/openssl/crypto/evp/evp_acnf.c head/crypto/openssl/crypto/evp/evp_cnf.c head/crypto/openssl/crypto/evp/evp_enc.c head/crypto/openssl/crypto/evp/evp_err.c head/crypto/openssl/crypto/evp/evp_fips.c head/crypto/openssl/crypto/evp/evp_key.c head/crypto/openssl/crypto/evp/evp_lib.c head/crypto/openssl/crypto/evp/evp_locl.h head/crypto/openssl/crypto/evp/evp_pbe.c head/crypto/openssl/crypto/evp/evp_pkey.c head/crypto/openssl/crypto/evp/evp_test.c head/crypto/openssl/crypto/evp/m_dss.c head/crypto/openssl/crypto/evp/m_dss1.c head/crypto/openssl/crypto/evp/m_ecdsa.c head/crypto/openssl/crypto/evp/m_md2.c head/crypto/openssl/crypto/evp/m_md4.c head/crypto/openssl/crypto/evp/m_md5.c head/crypto/openssl/crypto/evp/m_mdc2.c head/crypto/openssl/crypto/evp/m_null.c head/crypto/openssl/crypto/evp/m_ripemd.c head/crypto/openssl/crypto/evp/m_sha.c head/crypto/openssl/crypto/evp/m_sha1.c head/crypto/openssl/crypto/evp/m_sigver.c head/crypto/openssl/crypto/evp/m_wp.c head/crypto/openssl/crypto/evp/names.c head/crypto/openssl/crypto/evp/openbsd_hw.c head/crypto/openssl/crypto/evp/p5_crpt.c head/crypto/openssl/crypto/evp/p5_crpt2.c head/crypto/openssl/crypto/evp/p_dec.c head/crypto/openssl/crypto/evp/p_enc.c head/crypto/openssl/crypto/evp/p_lib.c head/crypto/openssl/crypto/evp/p_open.c head/crypto/openssl/crypto/evp/p_seal.c head/crypto/openssl/crypto/evp/p_sign.c head/crypto/openssl/crypto/evp/p_verify.c head/crypto/openssl/crypto/evp/pmeth_fn.c head/crypto/openssl/crypto/evp/pmeth_gn.c head/crypto/openssl/crypto/evp/pmeth_lib.c head/crypto/openssl/crypto/ex_data.c head/crypto/openssl/crypto/fips_err.h head/crypto/openssl/crypto/fips_ers.c head/crypto/openssl/crypto/hmac/hm_ameth.c head/crypto/openssl/crypto/hmac/hm_pmeth.c head/crypto/openssl/crypto/hmac/hmac.c head/crypto/openssl/crypto/hmac/hmac.h head/crypto/openssl/crypto/hmac/hmactest.c head/crypto/openssl/crypto/idea/i_cbc.c head/crypto/openssl/crypto/idea/i_cfb64.c head/crypto/openssl/crypto/idea/i_ecb.c head/crypto/openssl/crypto/idea/i_ofb64.c head/crypto/openssl/crypto/idea/i_skey.c head/crypto/openssl/crypto/idea/idea.h head/crypto/openssl/crypto/idea/idea_lcl.h head/crypto/openssl/crypto/idea/idea_spd.c head/crypto/openssl/crypto/idea/ideatest.c head/crypto/openssl/crypto/jpake/jpake.c head/crypto/openssl/crypto/jpake/jpake.h head/crypto/openssl/crypto/jpake/jpake_err.c head/crypto/openssl/crypto/jpake/jpaketest.c head/crypto/openssl/crypto/krb5/krb5_asn.c head/crypto/openssl/crypto/krb5/krb5_asn.h head/crypto/openssl/crypto/lhash/lh_stats.c head/crypto/openssl/crypto/lhash/lh_test.c head/crypto/openssl/crypto/lhash/lhash.c head/crypto/openssl/crypto/lhash/lhash.h head/crypto/openssl/crypto/md2/md2.c head/crypto/openssl/crypto/md2/md2.h head/crypto/openssl/crypto/md2/md2_dgst.c head/crypto/openssl/crypto/md2/md2_one.c head/crypto/openssl/crypto/md2/md2test.c head/crypto/openssl/crypto/md32_common.h head/crypto/openssl/crypto/md4/md4.c head/crypto/openssl/crypto/md4/md4.h head/crypto/openssl/crypto/md4/md4_dgst.c head/crypto/openssl/crypto/md4/md4_locl.h head/crypto/openssl/crypto/md4/md4_one.c head/crypto/openssl/crypto/md4/md4test.c head/crypto/openssl/crypto/md5/md5.c head/crypto/openssl/crypto/md5/md5.h head/crypto/openssl/crypto/md5/md5_dgst.c head/crypto/openssl/crypto/md5/md5_locl.h head/crypto/openssl/crypto/md5/md5_one.c head/crypto/openssl/crypto/md5/md5test.c head/crypto/openssl/crypto/mdc2/mdc2.h head/crypto/openssl/crypto/mdc2/mdc2_one.c head/crypto/openssl/crypto/mdc2/mdc2dgst.c head/crypto/openssl/crypto/mdc2/mdc2test.c head/crypto/openssl/crypto/mem.c head/crypto/openssl/crypto/mem_clr.c head/crypto/openssl/crypto/mem_dbg.c head/crypto/openssl/crypto/modes/cbc128.c head/crypto/openssl/crypto/modes/ccm128.c head/crypto/openssl/crypto/modes/cfb128.c head/crypto/openssl/crypto/modes/ctr128.c head/crypto/openssl/crypto/modes/cts128.c head/crypto/openssl/crypto/modes/gcm128.c head/crypto/openssl/crypto/modes/modes.h head/crypto/openssl/crypto/modes/modes_lcl.h head/crypto/openssl/crypto/modes/ofb128.c head/crypto/openssl/crypto/modes/xts128.c head/crypto/openssl/crypto/o_dir.c head/crypto/openssl/crypto/o_dir.h head/crypto/openssl/crypto/o_dir_test.c head/crypto/openssl/crypto/o_fips.c head/crypto/openssl/crypto/o_init.c head/crypto/openssl/crypto/o_str.c head/crypto/openssl/crypto/o_str.h head/crypto/openssl/crypto/o_time.c head/crypto/openssl/crypto/o_time.h head/crypto/openssl/crypto/objects/o_names.c head/crypto/openssl/crypto/objects/obj_dat.c head/crypto/openssl/crypto/objects/obj_err.c head/crypto/openssl/crypto/objects/obj_lib.c head/crypto/openssl/crypto/objects/obj_mac.h head/crypto/openssl/crypto/objects/obj_xref.c head/crypto/openssl/crypto/objects/obj_xref.h head/crypto/openssl/crypto/objects/objects.h head/crypto/openssl/crypto/objects/objects.pl head/crypto/openssl/crypto/objects/objxref.pl head/crypto/openssl/crypto/ocsp/ocsp.h head/crypto/openssl/crypto/ocsp/ocsp_asn.c head/crypto/openssl/crypto/ocsp/ocsp_cl.c head/crypto/openssl/crypto/ocsp/ocsp_err.c head/crypto/openssl/crypto/ocsp/ocsp_ext.c head/crypto/openssl/crypto/ocsp/ocsp_ht.c head/crypto/openssl/crypto/ocsp/ocsp_lib.c head/crypto/openssl/crypto/ocsp/ocsp_prn.c head/crypto/openssl/crypto/ocsp/ocsp_srv.c head/crypto/openssl/crypto/ocsp/ocsp_vfy.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/ossl_typ.h head/crypto/openssl/crypto/pem/pem.h head/crypto/openssl/crypto/pem/pem2.h head/crypto/openssl/crypto/pem/pem_all.c head/crypto/openssl/crypto/pem/pem_err.c head/crypto/openssl/crypto/pem/pem_info.c head/crypto/openssl/crypto/pem/pem_lib.c head/crypto/openssl/crypto/pem/pem_oth.c head/crypto/openssl/crypto/pem/pem_pk8.c head/crypto/openssl/crypto/pem/pem_pkey.c head/crypto/openssl/crypto/pem/pem_seal.c head/crypto/openssl/crypto/pem/pem_sign.c head/crypto/openssl/crypto/pem/pem_x509.c head/crypto/openssl/crypto/pem/pem_xaux.c head/crypto/openssl/crypto/pem/pvkfmt.c head/crypto/openssl/crypto/pkcs12/p12_add.c head/crypto/openssl/crypto/pkcs12/p12_asn.c head/crypto/openssl/crypto/pkcs12/p12_attr.c head/crypto/openssl/crypto/pkcs12/p12_crpt.c head/crypto/openssl/crypto/pkcs12/p12_crt.c head/crypto/openssl/crypto/pkcs12/p12_decr.c head/crypto/openssl/crypto/pkcs12/p12_init.c head/crypto/openssl/crypto/pkcs12/p12_key.c head/crypto/openssl/crypto/pkcs12/p12_kiss.c head/crypto/openssl/crypto/pkcs12/p12_mutl.c head/crypto/openssl/crypto/pkcs12/p12_npas.c head/crypto/openssl/crypto/pkcs12/p12_p8d.c head/crypto/openssl/crypto/pkcs12/p12_p8e.c head/crypto/openssl/crypto/pkcs12/p12_utl.c head/crypto/openssl/crypto/pkcs12/pk12err.c head/crypto/openssl/crypto/pkcs12/pkcs12.h head/crypto/openssl/crypto/pkcs7/bio_pk7.c head/crypto/openssl/crypto/pkcs7/pk7_asn1.c head/crypto/openssl/crypto/pkcs7/pk7_attr.c head/crypto/openssl/crypto/pkcs7/pk7_dgst.c head/crypto/openssl/crypto/pkcs7/pk7_doit.c head/crypto/openssl/crypto/pkcs7/pk7_enc.c head/crypto/openssl/crypto/pkcs7/pk7_lib.c head/crypto/openssl/crypto/pkcs7/pk7_mime.c head/crypto/openssl/crypto/pkcs7/pk7_smime.c head/crypto/openssl/crypto/pkcs7/pkcs7.h head/crypto/openssl/crypto/pkcs7/pkcs7err.c head/crypto/openssl/crypto/ppccap.c head/crypto/openssl/crypto/pqueue/pq_test.c head/crypto/openssl/crypto/pqueue/pqueue.c head/crypto/openssl/crypto/pqueue/pqueue.h head/crypto/openssl/crypto/rand/md_rand.c head/crypto/openssl/crypto/rand/rand.h head/crypto/openssl/crypto/rand/rand_egd.c head/crypto/openssl/crypto/rand/rand_err.c head/crypto/openssl/crypto/rand/rand_lcl.h head/crypto/openssl/crypto/rand/rand_lib.c head/crypto/openssl/crypto/rand/rand_unix.c head/crypto/openssl/crypto/rand/randfile.c head/crypto/openssl/crypto/rand/randtest.c head/crypto/openssl/crypto/rc2/rc2.h head/crypto/openssl/crypto/rc2/rc2_cbc.c head/crypto/openssl/crypto/rc2/rc2_ecb.c head/crypto/openssl/crypto/rc2/rc2_locl.h head/crypto/openssl/crypto/rc2/rc2_skey.c head/crypto/openssl/crypto/rc2/rc2cfb64.c head/crypto/openssl/crypto/rc2/rc2ofb64.c head/crypto/openssl/crypto/rc2/rc2speed.c head/crypto/openssl/crypto/rc2/rc2test.c head/crypto/openssl/crypto/rc2/tab.c head/crypto/openssl/crypto/rc4/rc4.c head/crypto/openssl/crypto/rc4/rc4.h head/crypto/openssl/crypto/rc4/rc4_enc.c head/crypto/openssl/crypto/rc4/rc4_locl.h head/crypto/openssl/crypto/rc4/rc4_skey.c head/crypto/openssl/crypto/rc4/rc4_utl.c head/crypto/openssl/crypto/rc4/rc4speed.c head/crypto/openssl/crypto/rc4/rc4test.c head/crypto/openssl/crypto/rc5/rc5.h head/crypto/openssl/crypto/rc5/rc5_ecb.c head/crypto/openssl/crypto/rc5/rc5_enc.c head/crypto/openssl/crypto/rc5/rc5_locl.h head/crypto/openssl/crypto/rc5/rc5_skey.c head/crypto/openssl/crypto/rc5/rc5cfb64.c head/crypto/openssl/crypto/rc5/rc5ofb64.c head/crypto/openssl/crypto/rc5/rc5speed.c head/crypto/openssl/crypto/rc5/rc5test.c head/crypto/openssl/crypto/ripemd/ripemd.h head/crypto/openssl/crypto/ripemd/rmd160.c head/crypto/openssl/crypto/ripemd/rmd_dgst.c head/crypto/openssl/crypto/ripemd/rmd_locl.h head/crypto/openssl/crypto/ripemd/rmd_one.c head/crypto/openssl/crypto/ripemd/rmdconst.h head/crypto/openssl/crypto/ripemd/rmdtest.c head/crypto/openssl/crypto/rsa/rsa.h head/crypto/openssl/crypto/rsa/rsa_ameth.c head/crypto/openssl/crypto/rsa/rsa_asn1.c head/crypto/openssl/crypto/rsa/rsa_chk.c head/crypto/openssl/crypto/rsa/rsa_crpt.c head/crypto/openssl/crypto/rsa/rsa_depr.c head/crypto/openssl/crypto/rsa/rsa_eay.c head/crypto/openssl/crypto/rsa/rsa_err.c head/crypto/openssl/crypto/rsa/rsa_gen.c head/crypto/openssl/crypto/rsa/rsa_lib.c head/crypto/openssl/crypto/rsa/rsa_locl.h head/crypto/openssl/crypto/rsa/rsa_none.c head/crypto/openssl/crypto/rsa/rsa_null.c head/crypto/openssl/crypto/rsa/rsa_oaep.c head/crypto/openssl/crypto/rsa/rsa_pk1.c head/crypto/openssl/crypto/rsa/rsa_pmeth.c head/crypto/openssl/crypto/rsa/rsa_prn.c head/crypto/openssl/crypto/rsa/rsa_pss.c head/crypto/openssl/crypto/rsa/rsa_saos.c head/crypto/openssl/crypto/rsa/rsa_sign.c head/crypto/openssl/crypto/rsa/rsa_ssl.c head/crypto/openssl/crypto/rsa/rsa_test.c head/crypto/openssl/crypto/rsa/rsa_x931.c head/crypto/openssl/crypto/s390xcap.c head/crypto/openssl/crypto/seed/seed.c head/crypto/openssl/crypto/seed/seed.h head/crypto/openssl/crypto/seed/seed_cbc.c head/crypto/openssl/crypto/seed/seed_cfb.c head/crypto/openssl/crypto/seed/seed_ecb.c head/crypto/openssl/crypto/seed/seed_locl.h head/crypto/openssl/crypto/seed/seed_ofb.c head/crypto/openssl/crypto/sha/sha.c head/crypto/openssl/crypto/sha/sha.h head/crypto/openssl/crypto/sha/sha1.c head/crypto/openssl/crypto/sha/sha1_one.c head/crypto/openssl/crypto/sha/sha1dgst.c head/crypto/openssl/crypto/sha/sha1test.c head/crypto/openssl/crypto/sha/sha256.c head/crypto/openssl/crypto/sha/sha256t.c head/crypto/openssl/crypto/sha/sha512.c head/crypto/openssl/crypto/sha/sha512t.c head/crypto/openssl/crypto/sha/sha_dgst.c head/crypto/openssl/crypto/sha/sha_locl.h head/crypto/openssl/crypto/sha/sha_one.c head/crypto/openssl/crypto/sha/shatest.c head/crypto/openssl/crypto/sparcv9cap.c head/crypto/openssl/crypto/srp/srp.h head/crypto/openssl/crypto/srp/srp_grps.h head/crypto/openssl/crypto/srp/srp_lcl.h head/crypto/openssl/crypto/srp/srp_lib.c head/crypto/openssl/crypto/srp/srp_vfy.c head/crypto/openssl/crypto/srp/srptest.c head/crypto/openssl/crypto/stack/safestack.h head/crypto/openssl/crypto/stack/stack.c head/crypto/openssl/crypto/stack/stack.h head/crypto/openssl/crypto/store/store.h head/crypto/openssl/crypto/store/str_err.c head/crypto/openssl/crypto/store/str_lib.c head/crypto/openssl/crypto/store/str_locl.h head/crypto/openssl/crypto/store/str_mem.c head/crypto/openssl/crypto/store/str_meth.c head/crypto/openssl/crypto/symhacks.h head/crypto/openssl/crypto/threads/mttest.c head/crypto/openssl/crypto/threads/th-lock.c head/crypto/openssl/crypto/ts/ts.h head/crypto/openssl/crypto/ts/ts_asn1.c head/crypto/openssl/crypto/ts/ts_conf.c head/crypto/openssl/crypto/ts/ts_err.c head/crypto/openssl/crypto/ts/ts_lib.c head/crypto/openssl/crypto/ts/ts_req_print.c head/crypto/openssl/crypto/ts/ts_req_utils.c head/crypto/openssl/crypto/ts/ts_rsp_print.c head/crypto/openssl/crypto/ts/ts_rsp_sign.c head/crypto/openssl/crypto/ts/ts_rsp_utils.c head/crypto/openssl/crypto/ts/ts_rsp_verify.c head/crypto/openssl/crypto/ts/ts_verify_ctx.c head/crypto/openssl/crypto/txt_db/txt_db.c head/crypto/openssl/crypto/txt_db/txt_db.h head/crypto/openssl/crypto/ui/ui.h head/crypto/openssl/crypto/ui/ui_compat.c head/crypto/openssl/crypto/ui/ui_compat.h head/crypto/openssl/crypto/ui/ui_err.c head/crypto/openssl/crypto/ui/ui_lib.c head/crypto/openssl/crypto/ui/ui_locl.h head/crypto/openssl/crypto/ui/ui_openssl.c head/crypto/openssl/crypto/ui/ui_util.c head/crypto/openssl/crypto/uid.c head/crypto/openssl/crypto/vms_rms.h head/crypto/openssl/crypto/whrlpool/whrlpool.h head/crypto/openssl/crypto/whrlpool/wp_block.c head/crypto/openssl/crypto/whrlpool/wp_dgst.c head/crypto/openssl/crypto/whrlpool/wp_locl.h head/crypto/openssl/crypto/whrlpool/wp_test.c head/crypto/openssl/crypto/x509/by_dir.c head/crypto/openssl/crypto/x509/by_file.c head/crypto/openssl/crypto/x509/x509.h head/crypto/openssl/crypto/x509/x509_att.c head/crypto/openssl/crypto/x509/x509_cmp.c head/crypto/openssl/crypto/x509/x509_d2.c head/crypto/openssl/crypto/x509/x509_def.c head/crypto/openssl/crypto/x509/x509_err.c head/crypto/openssl/crypto/x509/x509_ext.c head/crypto/openssl/crypto/x509/x509_lu.c head/crypto/openssl/crypto/x509/x509_obj.c head/crypto/openssl/crypto/x509/x509_r2x.c head/crypto/openssl/crypto/x509/x509_req.c head/crypto/openssl/crypto/x509/x509_set.c head/crypto/openssl/crypto/x509/x509_trs.c head/crypto/openssl/crypto/x509/x509_txt.c head/crypto/openssl/crypto/x509/x509_v3.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509/x509_vfy.h head/crypto/openssl/crypto/x509/x509_vpm.c head/crypto/openssl/crypto/x509/x509cset.c head/crypto/openssl/crypto/x509/x509name.c head/crypto/openssl/crypto/x509/x509rset.c head/crypto/openssl/crypto/x509/x509spki.c head/crypto/openssl/crypto/x509/x509type.c head/crypto/openssl/crypto/x509/x_all.c head/crypto/openssl/crypto/x509v3/ext_dat.h head/crypto/openssl/crypto/x509v3/pcy_cache.c head/crypto/openssl/crypto/x509v3/pcy_data.c head/crypto/openssl/crypto/x509v3/pcy_int.h head/crypto/openssl/crypto/x509v3/pcy_lib.c head/crypto/openssl/crypto/x509v3/pcy_map.c head/crypto/openssl/crypto/x509v3/pcy_node.c head/crypto/openssl/crypto/x509v3/pcy_tree.c head/crypto/openssl/crypto/x509v3/tabtest.c head/crypto/openssl/crypto/x509v3/v3_addr.c head/crypto/openssl/crypto/x509v3/v3_akey.c head/crypto/openssl/crypto/x509v3/v3_akeya.c head/crypto/openssl/crypto/x509v3/v3_alt.c head/crypto/openssl/crypto/x509v3/v3_asid.c head/crypto/openssl/crypto/x509v3/v3_bcons.c head/crypto/openssl/crypto/x509v3/v3_bitst.c head/crypto/openssl/crypto/x509v3/v3_conf.c head/crypto/openssl/crypto/x509v3/v3_cpols.c head/crypto/openssl/crypto/x509v3/v3_crld.c head/crypto/openssl/crypto/x509v3/v3_enum.c head/crypto/openssl/crypto/x509v3/v3_extku.c head/crypto/openssl/crypto/x509v3/v3_genn.c head/crypto/openssl/crypto/x509v3/v3_ia5.c head/crypto/openssl/crypto/x509v3/v3_info.c head/crypto/openssl/crypto/x509v3/v3_int.c head/crypto/openssl/crypto/x509v3/v3_lib.c head/crypto/openssl/crypto/x509v3/v3_ncons.c head/crypto/openssl/crypto/x509v3/v3_ocsp.c head/crypto/openssl/crypto/x509v3/v3_pci.c head/crypto/openssl/crypto/x509v3/v3_pcia.c head/crypto/openssl/crypto/x509v3/v3_pcons.c head/crypto/openssl/crypto/x509v3/v3_pku.c head/crypto/openssl/crypto/x509v3/v3_pmaps.c head/crypto/openssl/crypto/x509v3/v3_prn.c head/crypto/openssl/crypto/x509v3/v3_purp.c head/crypto/openssl/crypto/x509v3/v3_skey.c head/crypto/openssl/crypto/x509v3/v3_sxnet.c head/crypto/openssl/crypto/x509v3/v3_utl.c head/crypto/openssl/crypto/x509v3/v3conf.c head/crypto/openssl/crypto/x509v3/v3err.c head/crypto/openssl/crypto/x509v3/v3prin.c head/crypto/openssl/crypto/x509v3/x509v3.h head/crypto/openssl/doc/apps/ciphers.pod head/crypto/openssl/doc/apps/config.pod head/crypto/openssl/doc/apps/ocsp.pod head/crypto/openssl/doc/crypto/CMS_get0_type.pod head/crypto/openssl/doc/crypto/CONF_modules_load_file.pod head/crypto/openssl/doc/crypto/OPENSSL_config.pod head/crypto/openssl/doc/crypto/d2i_X509.pod head/crypto/openssl/doc/ssl/SSL_pending.pod head/crypto/openssl/doc/ssl/ssl.pod head/crypto/openssl/e_os.h head/crypto/openssl/e_os2.h head/crypto/openssl/engines/ccgost/e_gost_err.c head/crypto/openssl/engines/ccgost/e_gost_err.h head/crypto/openssl/engines/ccgost/gost2001.c head/crypto/openssl/engines/ccgost/gost2001_keyx.c head/crypto/openssl/engines/ccgost/gost2001_keyx.h head/crypto/openssl/engines/ccgost/gost89.c head/crypto/openssl/engines/ccgost/gost89.h head/crypto/openssl/engines/ccgost/gost94_keyx.c head/crypto/openssl/engines/ccgost/gost_ameth.c head/crypto/openssl/engines/ccgost/gost_asn1.c head/crypto/openssl/engines/ccgost/gost_crypt.c head/crypto/openssl/engines/ccgost/gost_ctl.c head/crypto/openssl/engines/ccgost/gost_eng.c head/crypto/openssl/engines/ccgost/gost_keywrap.c head/crypto/openssl/engines/ccgost/gost_keywrap.h head/crypto/openssl/engines/ccgost/gost_lcl.h head/crypto/openssl/engines/ccgost/gost_md.c head/crypto/openssl/engines/ccgost/gost_params.c head/crypto/openssl/engines/ccgost/gost_params.h head/crypto/openssl/engines/ccgost/gost_pmeth.c head/crypto/openssl/engines/ccgost/gost_sign.c head/crypto/openssl/engines/ccgost/gosthash.c head/crypto/openssl/engines/ccgost/gosthash.h head/crypto/openssl/engines/ccgost/gostsum.c head/crypto/openssl/engines/e_4758cca.c head/crypto/openssl/engines/e_4758cca_err.c head/crypto/openssl/engines/e_4758cca_err.h head/crypto/openssl/engines/e_aep.c head/crypto/openssl/engines/e_aep_err.c head/crypto/openssl/engines/e_aep_err.h head/crypto/openssl/engines/e_atalla.c head/crypto/openssl/engines/e_atalla_err.c head/crypto/openssl/engines/e_atalla_err.h head/crypto/openssl/engines/e_capi.c head/crypto/openssl/engines/e_capi_err.c head/crypto/openssl/engines/e_capi_err.h head/crypto/openssl/engines/e_chil.c head/crypto/openssl/engines/e_chil_err.c head/crypto/openssl/engines/e_chil_err.h head/crypto/openssl/engines/e_cswift.c head/crypto/openssl/engines/e_cswift_err.c head/crypto/openssl/engines/e_cswift_err.h head/crypto/openssl/engines/e_gmp.c head/crypto/openssl/engines/e_gmp_err.c head/crypto/openssl/engines/e_gmp_err.h head/crypto/openssl/engines/e_nuron.c head/crypto/openssl/engines/e_nuron_err.c head/crypto/openssl/engines/e_nuron_err.h head/crypto/openssl/engines/e_padlock.c head/crypto/openssl/engines/e_sureware.c head/crypto/openssl/engines/e_sureware_err.c head/crypto/openssl/engines/e_sureware_err.h head/crypto/openssl/engines/e_ubsec.c head/crypto/openssl/engines/e_ubsec_err.c head/crypto/openssl/engines/e_ubsec_err.h head/crypto/openssl/engines/vendor_defns/aep.h head/crypto/openssl/engines/vendor_defns/atalla.h head/crypto/openssl/engines/vendor_defns/cswift.h head/crypto/openssl/engines/vendor_defns/hw_4758_cca.h head/crypto/openssl/engines/vendor_defns/hw_ubsec.h head/crypto/openssl/engines/vendor_defns/hwcryptohook.h head/crypto/openssl/engines/vendor_defns/sureware.h head/crypto/openssl/ssl/bio_ssl.c head/crypto/openssl/ssl/d1_both.c head/crypto/openssl/ssl/d1_clnt.c head/crypto/openssl/ssl/d1_enc.c head/crypto/openssl/ssl/d1_lib.c head/crypto/openssl/ssl/d1_meth.c head/crypto/openssl/ssl/d1_pkt.c head/crypto/openssl/ssl/d1_srtp.c head/crypto/openssl/ssl/d1_srvr.c head/crypto/openssl/ssl/dtls1.h head/crypto/openssl/ssl/heartbeat_test.c head/crypto/openssl/ssl/kssl.c head/crypto/openssl/ssl/kssl.h head/crypto/openssl/ssl/kssl_lcl.h head/crypto/openssl/ssl/s23_clnt.c head/crypto/openssl/ssl/s23_lib.c head/crypto/openssl/ssl/s23_meth.c head/crypto/openssl/ssl/s23_pkt.c head/crypto/openssl/ssl/s23_srvr.c head/crypto/openssl/ssl/s2_clnt.c head/crypto/openssl/ssl/s2_enc.c head/crypto/openssl/ssl/s2_lib.c head/crypto/openssl/ssl/s2_meth.c head/crypto/openssl/ssl/s2_pkt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_both.c head/crypto/openssl/ssl/s3_cbc.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_enc.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/s3_meth.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/srtp.h head/crypto/openssl/ssl/ssl.h head/crypto/openssl/ssl/ssl2.h head/crypto/openssl/ssl/ssl23.h head/crypto/openssl/ssl/ssl3.h head/crypto/openssl/ssl/ssl_algs.c head/crypto/openssl/ssl/ssl_asn1.c head/crypto/openssl/ssl/ssl_cert.c head/crypto/openssl/ssl/ssl_ciph.c head/crypto/openssl/ssl/ssl_err.c head/crypto/openssl/ssl/ssl_err2.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_locl.h head/crypto/openssl/ssl/ssl_rsa.c head/crypto/openssl/ssl/ssl_sess.c head/crypto/openssl/ssl/ssl_stat.c head/crypto/openssl/ssl/ssl_task.c head/crypto/openssl/ssl/ssl_txt.c head/crypto/openssl/ssl/ssl_utst.c head/crypto/openssl/ssl/ssltest.c head/crypto/openssl/ssl/t1_clnt.c head/crypto/openssl/ssl/t1_enc.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/ssl/t1_meth.c head/crypto/openssl/ssl/t1_reneg.c head/crypto/openssl/ssl/t1_srvr.c head/crypto/openssl/ssl/tls1.h head/crypto/openssl/ssl/tls_srp.c head/crypto/openssl/util/ck_errf.pl head/crypto/openssl/util/libeay.num head/crypto/openssl/util/mkerr.pl head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/Makefile.man head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libcrypto/opensslconf-arm.h head/secure/lib/libcrypto/opensslconf-mips.h head/secure/lib/libcrypto/opensslconf-powerpc.h head/secure/lib/libcrypto/opensslconf-sparc64.h head/secure/lib/libcrypto/opensslconf-x86.h head/secure/lib/libssl/Makefile.man head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Fri Mar 20 18:39:07 2015 (r280296) +++ head/crypto/openssl/CHANGES Fri Mar 20 19:16:18 2015 (r280297) @@ -2,6 +2,83 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1l and 1.0.1m [19 Mar 2015] + + *) Segmentation fault in ASN1_TYPE_cmp fix + + The function ASN1_TYPE_cmp will crash with an invalid read if an attempt is + made to compare ASN.1 boolean types. Since ASN1_TYPE_cmp is used to check + certificate signature algorithm consistency this can be used to crash any + certificate verification operation and exploited in a DoS attack. Any + application which performs certificate verification is vulnerable including + OpenSSL clients and servers which enable client authentication. + (CVE-2015-0286) + [Stephen Henson] + + *) ASN.1 structure reuse memory corruption fix + + Reusing a structure in ASN.1 parsing may allow an attacker to cause + memory corruption via an invalid write. Such reuse is and has been + strongly discouraged and is believed to be rare. + + Applications that parse structures containing CHOICE or ANY DEFINED BY + components may be affected. Certificate parsing (d2i_X509 and related + functions) are however not affected. OpenSSL clients and servers are + not affected. + (CVE-2015-0287) + [Stephen Henson] + + *) PKCS7 NULL pointer dereferences fix + + The PKCS#7 parsing code does not handle missing outer ContentInfo + correctly. An attacker can craft malformed ASN.1-encoded PKCS#7 blobs with + missing content and trigger a NULL pointer dereference on parsing. + + Applications that verify PKCS#7 signatures, decrypt PKCS#7 data or + otherwise parse PKCS#7 structures from untrusted sources are + affected. OpenSSL clients and servers are not affected. + + This issue was reported to OpenSSL by Michal Zalewski (Google). + (CVE-2015-0289) + [Emilia Käsper] + + *) DoS via reachable assert in SSLv2 servers fix + + A malicious client can trigger an OPENSSL_assert (i.e., an abort) in + servers that both support SSLv2 and enable export cipher suites by sending + a specially crafted SSLv2 CLIENT-MASTER-KEY message. + + This issue was discovered by Sean Burford (Google) and Emilia Käsper + (OpenSSL development team). + (CVE-2015-0293) + [Emilia Käsper] + + *) Use After Free following d2i_ECPrivatekey error fix + + A malformed EC private key file consumed via the d2i_ECPrivateKey function + could cause a use after free condition. This, in turn, could cause a double + free in several private key parsing functions (such as d2i_PrivateKey + or EVP_PKCS82PKEY) and could lead to a DoS attack or memory corruption + for applications that receive EC private keys from untrusted + sources. This scenario is considered rare. + + This issue was discovered by the BoringSSL project and fixed in their + commit 517073cd4b. + (CVE-2015-0209) + [Matt Caswell] + + *) X509_to_X509_REQ NULL pointer deref fix + + The function X509_to_X509_REQ will crash with a NULL pointer dereference if + the certificate key is invalid. This function is rarely used in practice. + + This issue was discovered by Brian Carpenter. + (CVE-2015-0288) + [Stephen Henson] + + *) Removed the export ciphers from the DEFAULT ciphers + [Kurt Roeckx] + Changes between 1.0.1k and 1.0.1l [15 Jan 2015] *) Build fixes for the Windows and OpenVMS platforms @@ -771,63 +848,6 @@ Add command line options to s_client/s_server. [Steve Henson] - Changes between 1.0.0j and 1.0.0k [5 Feb 2013] - - *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. - - This addresses the flaw in CBC record processing discovered by - Nadhem Alfardan and Kenny Paterson. Details of this attack can be found - at: http://www.isg.rhul.ac.uk/tls/ - - Thanks go to Nadhem Alfardan and Kenny Paterson of the Information - Security Group at Royal Holloway, University of London - (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and - Emilia Käsper for the initial patch. - (CVE-2013-0169) - [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] - - *) Return an error when checking OCSP signatures when key is NULL. - This fixes a DoS attack. (CVE-2013-0166) - [Steve Henson] - - *) Call OCSP Stapling callback after ciphersuite has been chosen, so - the right response is stapled. Also change SSL_get_certificate() - so it returns the certificate actually sent. - See http://rt.openssl.org/Ticket/Display.html?id=2836. - (This is a backport) - [Rob Stradling ] - - *) Fix possible deadlock when decoding public keys. - [Steve Henson] - - Changes between 1.0.0i and 1.0.0j [10 May 2012] - - [NB: OpenSSL 1.0.0i and later 1.0.0 patch levels were released after - OpenSSL 1.0.1.] - - *) Sanity check record length before skipping explicit IV in DTLS - to fix DoS attack. - - Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic - fuzzing as a service testing platform. - (CVE-2012-2333) - [Steve Henson] - - *) Initialise tkeylen properly when encrypting CMS messages. - Thanks to Solar Designer of Openwall for reporting this issue. - [Steve Henson] - - Changes between 1.0.0h and 1.0.0i [19 Apr 2012] - - *) Check for potentially exploitable overflows in asn1_d2i_read_bio - BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer - in CRYPTO_realloc_clean. - - Thanks to Tavis Ormandy, Google Security Team, for discovering this - issue and to Adam Langley for fixing it. - (CVE-2012-2110) - [Adam Langley (Google), Tavis Ormandy, Google Security Team] - Changes between 1.0.0g and 1.0.0h [12 Mar 2012] *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness @@ -1818,228 +1838,6 @@ *) Change 'Configure' script to enable Camellia by default. [NTT] - Changes between 0.9.8x and 0.9.8y [5 Feb 2013] - - *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. - - This addresses the flaw in CBC record processing discovered by - Nadhem Alfardan and Kenny Paterson. Details of this attack can be found - at: http://www.isg.rhul.ac.uk/tls/ - - Thanks go to Nadhem Alfardan and Kenny Paterson of the Information - Security Group at Royal Holloway, University of London - (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and - Emilia Käsper for the initial patch. - (CVE-2013-0169) - [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] - - *) Return an error when checking OCSP signatures when key is NULL. - This fixes a DoS attack. (CVE-2013-0166) - [Steve Henson] - - *) Call OCSP Stapling callback after ciphersuite has been chosen, so - the right response is stapled. Also change SSL_get_certificate() - so it returns the certificate actually sent. - See http://rt.openssl.org/Ticket/Display.html?id=2836. - (This is a backport) - [Rob Stradling ] - - *) Fix possible deadlock when decoding public keys. - [Steve Henson] - - Changes between 0.9.8w and 0.9.8x [10 May 2012] - - *) Sanity check record length before skipping explicit IV in DTLS - to fix DoS attack. - - Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic - fuzzing as a service testing platform. - (CVE-2012-2333) - [Steve Henson] - - *) Initialise tkeylen properly when encrypting CMS messages. - Thanks to Solar Designer of Openwall for reporting this issue. - [Steve Henson] - - Changes between 0.9.8v and 0.9.8w [23 Apr 2012] - - *) The fix for CVE-2012-2110 did not take into account that the - 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an - int in OpenSSL 0.9.8, making it still vulnerable. Fix by - rejecting negative len parameter. (CVE-2012-2131) - [Tomas Hoger ] - - Changes between 0.9.8u and 0.9.8v [19 Apr 2012] - - *) Check for potentially exploitable overflows in asn1_d2i_read_bio - BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer - in CRYPTO_realloc_clean. - - Thanks to Tavis Ormandy, Google Security Team, for discovering this - issue and to Adam Langley for fixing it. - (CVE-2012-2110) - [Adam Langley (Google), Tavis Ormandy, Google Security Team] - - Changes between 0.9.8t and 0.9.8u [12 Mar 2012] - - *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness - in CMS and PKCS7 code. When RSA decryption fails use a random key for - content decryption and always return the same error. Note: this attack - needs on average 2^20 messages so it only affects automated senders. The - old behaviour can be reenabled in the CMS code by setting the - CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where - an MMA defence is not necessary. - Thanks to Ivan Nestlerode for discovering - this issue. (CVE-2012-0884) - [Steve Henson] - - *) Fix CVE-2011-4619: make sure we really are receiving a - client hello before rejecting multiple SGC restarts. Thanks to - Ivan Nestlerode for discovering this bug. - [Steve Henson] - - Changes between 0.9.8s and 0.9.8t [18 Jan 2012] - - *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. - Thanks to Antonio Martin, Enterprise Secure Access Research and - Development, Cisco Systems, Inc. for discovering this bug and - preparing a fix. (CVE-2012-0050) - [Antonio Martin] - - Changes between 0.9.8r and 0.9.8s [4 Jan 2012] - - *) Nadhem Alfardan and Kenny Paterson have discovered an extension - of the Vaudenay padding oracle attack on CBC mode encryption - which enables an efficient plaintext recovery attack against - the OpenSSL implementation of DTLS. Their attack exploits timing - differences arising during decryption processing. A research - paper describing this attack can be found at: - http://www.isg.rhul.ac.uk/~kp/dtls.pdf - Thanks go to Nadhem Alfardan and Kenny Paterson of the Information - Security Group at Royal Holloway, University of London - (www.isg.rhul.ac.uk) for discovering this flaw and to Robin Seggelmann - and Michael Tuexen - for preparing the fix. (CVE-2011-4108) - [Robin Seggelmann, Michael Tuexen] - - *) Stop policy check failure freeing same buffer twice. (CVE-2011-4109) - [Ben Laurie, Kasper ] - - *) Clear bytes used for block padding of SSL 3.0 records. - (CVE-2011-4576) - [Adam Langley (Google)] - - *) Only allow one SGC handshake restart for SSL/TLS. Thanks to George - Kadianakis for discovering this issue and - Adam Langley for preparing the fix. (CVE-2011-4619) - [Adam Langley (Google)] - - *) Prevent malformed RFC3779 data triggering an assertion failure. - Thanks to Andrew Chi, BBN Technologies, for discovering the flaw - and Rob Austein for fixing it. (CVE-2011-4577) - [Rob Austein ] - - *) Fix ssl_ciph.c set-up race. - [Adam Langley (Google)] - - *) Fix spurious failures in ecdsatest.c. - [Emilia Käsper (Google)] - - *) Fix the BIO_f_buffer() implementation (which was mixing different - interpretations of the '..._len' fields). - [Adam Langley (Google)] - - *) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than - BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent - threads won't reuse the same blinding coefficients. - - This also avoids the need to obtain the CRYPTO_LOCK_RSA_BLINDING - lock to call BN_BLINDING_invert_ex, and avoids one use of - BN_BLINDING_update for each BN_BLINDING structure (previously, - the last update always remained unused). - [Emilia Käsper (Google)] - - *) Fix SSL memory handling for (EC)DH ciphersuites, in particular - for multi-threaded use of ECDH. - [Adam Langley (Google)] - - *) Fix x509_name_ex_d2i memory leak on bad inputs. - [Bodo Moeller] - - *) Add protection against ECDSA timing attacks as mentioned in the paper - by Billy Bob Brumley and Nicola Tuveri, see: - - http://eprint.iacr.org/2011/232.pdf - - [Billy Bob Brumley and Nicola Tuveri] - - Changes between 0.9.8q and 0.9.8r [8 Feb 2011] - - *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 - [Neel Mehta, Adam Langley, Bodo Moeller (Google)] - - *) Fix bug in string printing code: if *any* escaping is enabled we must - escape the escape character (backslash) or the resulting string is - ambiguous. - [Steve Henson] - - Changes between 0.9.8p and 0.9.8q [2 Dec 2010] - - *) Disable code workaround for ancient and obsolete Netscape browsers - and servers: an attacker can use it in a ciphersuite downgrade attack. - Thanks to Martin Rex for discovering this bug. CVE-2010-4180 - [Steve Henson] - - *) Fixed J-PAKE implementation error, originally discovered by - Sebastien Martini, further info and confirmation from Stefan - Arentz and Feng Hao. Note that this fix is a security fix. CVE-2010-4252 - [Ben Laurie] - - Changes between 0.9.8o and 0.9.8p [16 Nov 2010] - - *) Fix extension code to avoid race conditions which can result in a buffer - overrun vulnerability: resumed sessions must not be modified as they can - be shared by multiple threads. CVE-2010-3864 - [Steve Henson] - - *) Fix for double free bug in ssl/s3_clnt.c CVE-2010-2939 - [Steve Henson] - - *) Don't reencode certificate when calculating signature: cache and use - the original encoding instead. This makes signature verification of - some broken encodings work correctly. - [Steve Henson] - - *) ec2_GF2m_simple_mul bugfix: compute correct result if the output EC_POINT - is also one of the inputs. - [Emilia Käsper (Google)] - - *) Don't repeatedly append PBE algorithms to table if they already exist. - Sort table on each new add. This effectively makes the table read only - after all algorithms are added and subsequent calls to PKCS12_pbe_add - etc are non-op. - [Steve Henson] - - Changes between 0.9.8n and 0.9.8o [01 Jun 2010] - - [NB: OpenSSL 0.9.8o and later 0.9.8 patch levels were released after - OpenSSL 1.0.0.] - - *) Correct a typo in the CMS ASN1 module which can result in invalid memory - access or freeing data twice (CVE-2010-0742) - [Steve Henson, Ronald Moesbergen ] - - *) Add SHA2 algorithms to SSL_library_init(). SHA2 is becoming far more - common in certificates and some applications which only call - SSL_library_init and not OpenSSL_add_all_algorithms() will fail. - [Steve Henson] - - *) VMS fixes: - Reduce copying into .apps and .test in makevms.com - Don't try to use blank CA certificate in CA.com - Allow use of C files from original directories in maketests.com - [Steven M. Schweda" ] - Changes between 0.9.8m and 0.9.8n [24 Mar 2010] *) When rejecting SSL/TLS records due to an incorrect version number, never Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Fri Mar 20 18:39:07 2015 (r280296) +++ head/crypto/openssl/Configure Fri Mar 20 19:16:18 2015 (r280297) @@ -185,18 +185,18 @@ my %table=( "debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-geoff32","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-geoff64","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", -"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", -"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o crypt586.o:aes_x86core.o aes_cbc.o aesni-x86.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o::ghash-x86.o::elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", +"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", +"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o crypt586.o:aes_x86core.o aes_cbc.o aesni-x86.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o::ghash-x86.o::elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "dist", "cc:-O::(unknown)::::::", # Basic configs that should work on any (32 and less bit) box @@ -256,16 +256,16 @@ my %table=( #### IRIX 5.x configs # -mips2 flag is added by ./config when appropriate. -"irix-gcc","gcc:-O3 -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${mips32_asm}:o32:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"irix-gcc","gcc:-O3 -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR:${mips32_asm}:o32:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"irix-cc", "cc:-O2 -use_readonly_const -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### IRIX 6.x configs # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke # './Configure irix-cc -o32' manually. -"irix-mips3-gcc","gcc:-mabi=n32 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips64_asm}:n32:dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32", -"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips64_asm}:n32:dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32", +"irix-mips3-gcc","gcc:-mabi=n32 -O3 -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips64_asm}:n32:dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32", +"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips64_asm}:n32:dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32", # N64 ABI builds. -"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips64_asm}:64:dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips64_asm}:64:dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -O3 -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips64_asm}:64:dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -G0 -rdata_shared -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips64_asm}:64:dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", #### Unified HP-UX ANSI C configs. # Special notes: @@ -345,23 +345,23 @@ my %table=( #### # *-generic* is endian-neutral target, but ./config is free to # throw in -D[BL]_ENDIAN, whichever appropriate... -"linux-generic32","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-generic32","gcc:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-ppc", "gcc:-DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # It's believed that majority of ARM toolchains predefine appropriate -march. # If you compiler does not, do complement config command line with one! -"linux-armv4", "gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-armv4", "gcc:-O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### IA-32 targets... -"linux-ia32-icc", "icc:-DL_ENDIAN -DTERMIO -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out", +"linux-ia32-icc", "icc:-DL_ENDIAN -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-elf", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-aout", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out", #### -"linux-generic64","gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ppc64", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -"linux64-s390x", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux-generic64","gcc:-O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-ppc64", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux-ia64", "gcc:-DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-ia64-ecc","ecc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", #### So called "highgprs" target for z/Architecture CPUs # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see # /proc/cpuinfo. The idea is to preserve most significant bits of @@ -375,16 +375,16 @@ my %table=( # ldconfig and run-time linker to autodiscover. Unfortunately it # doesn't work just yet, because of couple of bugs in glibc # sysdeps/s390/dl-procinfo.c affecting ldconfig and ld.so.1... -"linux32-s390x", "gcc:-m31 -Wa,-mzarch -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$s390x_asm;$asm=~s/bn\-s390x\.o/bn_asm.o/;$asm}.":31:dlfcn:linux-shared:-fPIC:-m31:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/highgprs", +"linux32-s390x", "gcc:-m31 -Wa,-mzarch -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$s390x_asm;$asm=~s/bn\-s390x\.o/bn_asm.o/;$asm}.":31:dlfcn:linux-shared:-fPIC:-m31:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/highgprs", #### SPARC Linux setups # Ray Miller has patiently # assisted with debugging of following two configs. -"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # it's a real mess with -mcpu=ultrasparc option under Linux, but # -Wa,-Av8plus should do the trick no matter what. -"linux-sparcv9","gcc:-m32 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-sparcv9","gcc:-m32 -mcpu=ultrasparc -DB_ENDIAN -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # GCC 3.1 is a requirement -"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", #### Alpha Linux with GNU C and Compaq C setups # Special notes: # - linux-alpha+bwx-gcc is ment to be used from ./config only. If you @@ -398,30 +398,30 @@ my %table=( # # # -"linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", -"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", +"linux-alpha-gcc","gcc:-O3 -DL_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", +"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", -# Android: linux-* but without -DTERMIO and pointers to headers and libs. +# Android: linux-* but without pointers to headers and libs. "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### *BSD [do see comment about ${BSDthreads} above!] -"BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-x86-elf", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-BSD-x86-elf", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall -g::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-sparcv8", "gcc:-DB_ENDIAN -DTERMIOS -O3 -mv8 -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${sparcv8_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"BSD-generic32","gcc:-O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"BSD-x86", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"BSD-x86-elf", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-BSD-x86-elf", "gcc:-DL_ENDIAN -O3 -Wall -g::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"BSD-sparcv8", "gcc:-DB_ENDIAN -O3 -mv8 -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${sparcv8_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-generic64","gcc:-DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"BSD-generic64","gcc:-O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it # simply *happens* to work around a compiler bug in gcc 3.3.3, # triggered by RIPEMD160 code. -"BSD-sparc64", "gcc:-DB_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:${sparcv9_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-ia64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-x86_64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"BSD-sparc64", "gcc:-DB_ENDIAN -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:${sparcv9_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"BSD-ia64", "gcc:-DL_ENDIAN -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"BSD-x86_64", "gcc:-DL_ENDIAN -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -433,8 +433,8 @@ my %table=( # QNX "qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:", -"QNX6", "gcc:-DTERMIOS::::-lsocket::${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"QNX6-i386", "gcc:-DL_ENDIAN -DTERMIOS -O2 -Wall::::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"QNX6", "gcc:::::-lsocket::${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"QNX6-i386", "gcc:-DL_ENDIAN -O2 -Wall::::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # BeOS "beos-x86-r5", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -mcpu=pentium -Wall::-D_REENTRANT:BEOS:-lbe -lnet:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:beos:beos-shared:-fPIC -DPIC:-shared:.so", @@ -507,7 +507,7 @@ my %table=( "SINIX-N","/usr/ucb/cc:-O2 -misaligned::(unknown)::-lucb:RC4_INDEX RC4_CHAR:::", # SIEMENS BS2000/OSD: an EBCDIC-based mainframe -"BS2000-OSD","c89:-O -XLLML -XLLMK -XL -DB_ENDIAN -DTERMIOS -DCHARSET_EBCDIC::(unknown)::-lsocket -lnsl:THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR:::", +"BS2000-OSD","c89:-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC::(unknown)::-lsocket -lnsl:THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR:::", # OS/390 Unix an EBCDIC-based Unix system on IBM mainframe # You need to compile using the c89.sh wrapper in the tools directory, because the @@ -567,7 +567,7 @@ my %table=( "netware-libc-bsdsock-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -DNETWARE_BSDSOCK -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall:::::BN_LLONG ${x86_gcc_opts}::", # DJGPP -"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:", +"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:", # Ultrix from Bernhard Simon "ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::", @@ -593,7 +593,7 @@ my %table=( "newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::", ##### GNU Hurd -"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC", +"hurd-x86", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC", ##### OS/2 EMX "OS2-EMX", "gcc::::::::", Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Fri Mar 20 18:39:07 2015 (r280296) +++ head/crypto/openssl/Makefile Fri Mar 20 19:16:18 2015 (r280297) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1l +VERSION=1.0.1m MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Fri Mar 20 18:39:07 2015 (r280296) +++ head/crypto/openssl/NEWS Fri Mar 20 19:16:18 2015 (r280297) @@ -5,6 +5,16 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1l and OpenSSL 1.0.1m [19 Mar 2015] + + o Segmentation fault in ASN1_TYPE_cmp fix (CVE-2015-0286) + o ASN.1 structure reuse memory corruption fix (CVE-2015-0287) + o PKCS7 NULL pointer dereferences fix (CVE-2015-0289) + o DoS via reachable assert in SSLv2 servers fix (CVE-2015-0293) + o Use After Free following d2i_ECPrivatekey error fix (CVE-2015-0209) + o X509_to_X509_REQ NULL pointer deref fix (CVE-2015-0288) + o Removed the export ciphers from the DEFAULT ciphers + Major changes between OpenSSL 1.0.1k and OpenSSL 1.0.1l [15 Jan 2015] o Build fixes for the Windows and OpenVMS platforms @@ -103,19 +113,6 @@ o Preliminary FIPS capability for unvalidated 2.0 FIPS module. o SRP support. - Major changes between OpenSSL 1.0.0j and OpenSSL 1.0.0k [5 Feb 2013]: - - o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 - o Fix OCSP bad key DoS attack CVE-2013-0166 - - Major changes between OpenSSL 1.0.0i and OpenSSL 1.0.0j [10 May 2012]: - - o Fix DTLS record length checking bug CVE-2012-2333 - - Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.0i [19 Apr 2012]: - - o Fix for ASN1 overflow bug CVE-2012-2110 - Major changes between OpenSSL 1.0.0g and OpenSSL 1.0.0h [12 Mar 2012]: o Fix for CMS/PKCS#7 MMA CVE-2012-0884 @@ -188,62 +185,6 @@ o Opaque PRF Input TLS extension support. o Updated time routines to avoid OS limitations. - Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y [5 Feb 2013]: - - o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 - o Fix OCSP bad key DoS attack CVE-2013-0166 - - Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x [10 May 2012]: - - o Fix DTLS record length checking bug CVE-2012-2333 - - Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w [23 Apr 2012]: - - o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) - - Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v [19 Apr 2012]: - - o Fix for ASN1 overflow bug CVE-2012-2110 - - Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u [12 Mar 2012]: - - o Fix for CMS/PKCS#7 MMA CVE-2012-0884 - o Corrected fix for CVE-2011-4619 - o Various DTLS fixes. - - Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t [18 Jan 2012]: - - o Fix for DTLS DoS issue CVE-2012-0050 - - Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s [4 Jan 2012]: - - o Fix for DTLS plaintext recovery attack CVE-2011-4108 - o Fix policy check double free error CVE-2011-4109 - o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 - o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 - o Check for malformed RFC3779 data CVE-2011-4577 - - Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r [8 Feb 2011]: - - o Fix for security issue CVE-2011-0014 - - Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q [2 Dec 2010]: - - o Fix for security issue CVE-2010-4180 - o Fix for CVE-2010-4252 - - Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p [16 Nov 2010]: - - o Fix for security issue CVE-2010-3864. - - Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o [1 Jun 2010]: - - o Fix for security issue CVE-2010-0742. - o Various DTLS fixes. - o Recognise SHA2 certificates if only SSL algorithms added. - o Fix for no-rc4 compilation. - o Chil ENGINE unload workaround. - Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n [24 Mar 2010]: o CFB cipher definition fixes. Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Fri Mar 20 18:39:07 2015 (r280296) +++ head/crypto/openssl/README Fri Mar 20 19:16:18 2015 (r280297) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1l 15 Jan 2015 + OpenSSL 1.0.1m 19 Mar 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/app_rand.c ============================================================================== --- head/crypto/openssl/apps/app_rand.c Fri Mar 20 18:39:07 2015 (r280296) +++ head/crypto/openssl/apps/app_rand.c Fri Mar 20 19:16:18 2015 (r280297) @@ -5,21 +5,21 @@ * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. - * + * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * + * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,10 +34,10 @@ * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from + * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * + * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -49,7 +49,7 @@ * 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. - * + * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence @@ -63,7 +63,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 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 @@ -115,104 +115,106 @@ #include #include - static int seeded = 0; static int egdsocket = 0; int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn) - { - int consider_randfile = (file == NULL); - char buffer[200]; - +{ + int consider_randfile = (file == NULL); + char buffer[200]; + #ifdef OPENSSL_SYS_WINDOWS - BIO_printf(bio_e,"Loading 'screen' into random state -"); - BIO_flush(bio_e); - RAND_screen(); - BIO_printf(bio_e," done\n"); + BIO_printf(bio_e, "Loading 'screen' into random state -"); + BIO_flush(bio_e); + RAND_screen(); + BIO_printf(bio_e, " done\n"); #endif - if (file == NULL) - file = RAND_file_name(buffer, sizeof buffer); - else if (RAND_egd(file) > 0) - { - /* we try if the given filename is an EGD socket. - if it is, we don't write anything back to the file. */ - egdsocket = 1; - return 1; - } - if (file == NULL || !RAND_load_file(file, -1)) - { - if (RAND_status() == 0) - { - if (!dont_warn) - { - BIO_printf(bio_e,"unable to load 'random state'\n"); - BIO_printf(bio_e,"This means that the random number generator has not been seeded\n"); - BIO_printf(bio_e,"with much random data.\n"); - if (consider_randfile) /* explanation does not apply when a file is explicitly named */ - { - BIO_printf(bio_e,"Consider setting the RANDFILE environment variable to point at a file that\n"); - BIO_printf(bio_e,"'random' data can be kept in (the file will be overwritten).\n"); - } - } - return 0; - } - } - seeded = 1; - return 1; - } + if (file == NULL) + file = RAND_file_name(buffer, sizeof buffer); + else if (RAND_egd(file) > 0) { + /* + * we try if the given filename is an EGD socket. if it is, we don't + * write anything back to the file. + */ + egdsocket = 1; + return 1; + } + if (file == NULL || !RAND_load_file(file, -1)) { + if (RAND_status() == 0) { + if (!dont_warn) { + BIO_printf(bio_e, "unable to load 'random state'\n"); + BIO_printf(bio_e, + "This means that the random number generator has not been seeded\n"); + BIO_printf(bio_e, "with much random data.\n"); + if (consider_randfile) { /* explanation does not apply when a + * file is explicitly named */ + BIO_printf(bio_e, + "Consider setting the RANDFILE environment variable to point at a file that\n"); + BIO_printf(bio_e, + "'random' data can be kept in (the file will be overwritten).\n"); + } + } + return 0; + } + } + seeded = 1; + return 1; +} long app_RAND_load_files(char *name) - { - char *p,*n; - int last; - long tot=0; - int egd; - - for (;;) - { - last=0; - for (p=name; ((*p != '\0') && (*p != LIST_SEPARATOR_CHAR)); p++); - if (*p == '\0') last=1; - *p='\0'; - n=name; - name=p+1; - if (*n == '\0') break; - - egd=RAND_egd(n); - if (egd > 0) - tot+=egd; - else - tot+=RAND_load_file(n,-1); - if (last) break; - } - if (tot > 512) - app_RAND_allow_write_file(); - return(tot); - } +{ + char *p, *n; + int last; + long tot = 0; + int egd; + + for (;;) { + last = 0; + for (p = name; ((*p != '\0') && (*p != LIST_SEPARATOR_CHAR)); p++) ; + if (*p == '\0') + last = 1; + *p = '\0'; + n = name; + name = p + 1; + if (*n == '\0') + break; + + egd = RAND_egd(n); + if (egd > 0) + tot += egd; + else + tot += RAND_load_file(n, -1); + if (last) + break; + } + if (tot > 512) + app_RAND_allow_write_file(); + return (tot); +} int app_RAND_write_file(const char *file, BIO *bio_e) - { - char buffer[200]; - - if (egdsocket || !seeded) - /* If we did not manage to read the seed file, - * we should not write a low-entropy seed file back -- - * it would suppress a crucial warning the next time - * we want to use it. */ - return 0; - - if (file == NULL) - file = RAND_file_name(buffer, sizeof buffer); - if (file == NULL || !RAND_write_file(file)) - { - BIO_printf(bio_e,"unable to write 'random state'\n"); - return 0; - } - return 1; - } +{ + char buffer[200]; + + if (egdsocket || !seeded) + /* + * If we did not manage to read the seed file, we should not write a + * low-entropy seed file back -- it would suppress a crucial warning + * the next time we want to use it. + */ + return 0; + + if (file == NULL) + file = RAND_file_name(buffer, sizeof buffer); + if (file == NULL || !RAND_write_file(file)) { + BIO_printf(bio_e, "unable to write 'random state'\n"); + return 0; + } + return 1; +} void app_RAND_allow_write_file(void) - { - seeded = 1; - } +{ + seeded = 1; +} Modified: head/crypto/openssl/apps/apps.c ============================================================================== --- head/crypto/openssl/apps/apps.c Fri Mar 20 18:39:07 2015 (r280296) +++ head/crypto/openssl/apps/apps.c Fri Mar 20 19:16:18 2015 (r280297) @@ -5,21 +5,21 @@ * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. - * + * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * + * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,10 +34,10 @@ * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from + * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * + * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -49,7 +49,7 @@ * 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. - * + * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence @@ -63,7 +63,7 @@ * are met: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 19:30:00 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 5DDF982A; Fri, 20 Mar 2015 19:30:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 497E0E00; Fri, 20 Mar 2015 19:30:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KJU0vI011172; Fri, 20 Mar 2015 19:30:00 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KJU0ki011171; Fri, 20 Mar 2015 19:30:00 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201503201930.t2KJU0ki011171@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 20 Mar 2015 19:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280298 - head/lib/libgpio X-SVN-Group: head MIME-Version: 1.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: Fri, 20 Mar 2015 19:30:00 -0000 Author: loos Date: Fri Mar 20 19:29:59 2015 New Revision: 280298 URL: https://svnweb.freebsd.org/changeset/base/280298 Log: Add the missing manual page link to the recently added function. Modified: head/lib/libgpio/Makefile Modified: head/lib/libgpio/Makefile ============================================================================== --- head/lib/libgpio/Makefile Fri Mar 20 19:16:18 2015 (r280297) +++ head/lib/libgpio/Makefile Fri Mar 20 19:29:59 2015 (r280298) @@ -15,6 +15,7 @@ MLINKS= gpio.3 gpio_open.3 \ gpio.3 gpio_pin_list.3 \ gpio.3 gpio_pin_config.3 \ gpio.3 gpio_pin_set_flags.3 \ + gpio.3 gpio_pin_set_name.3 \ gpio.3 gpio_pin_get.3 \ gpio.3 gpio_pin_set.3 \ gpio.3 gpio_pin_low.3 \ From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 19:40:21 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 C4888A9A; Fri, 20 Mar 2015 19:40:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96FA2F09; Fri, 20 Mar 2015 19:40:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KJeLDI015916; Fri, 20 Mar 2015 19:40:21 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KJeKxH015914; Fri, 20 Mar 2015 19:40:20 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201503201940.t2KJeKxH015914@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 20 Mar 2015 19:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280299 - in head/release: scripts tools X-SVN-Group: head MIME-Version: 1.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: Fri, 20 Mar 2015 19:40:21 -0000 Author: cperciva Date: Fri Mar 20 19:40:19 2015 New Revision: 280299 URL: https://svnweb.freebsd.org/changeset/base/280299 Log: When creating VM images, copy the contents of the created filesystem into a new filesystem before packaging it into a disk image. This prevents "remnants" of deleted files from showing up in the VM images, and reduces their compressed size (by about 10% for the cloudware images) as a result. Looks good to: gjb Modified: head/release/scripts/mk-vmimage.sh head/release/tools/vmimage.subr Modified: head/release/scripts/mk-vmimage.sh ============================================================================== --- head/release/scripts/mk-vmimage.sh Fri Mar 20 19:29:59 2015 (r280298) +++ head/release/scripts/mk-vmimage.sh Fri Mar 20 19:40:19 2015 (r280299) @@ -102,6 +102,7 @@ main() { vm_extra_pre_umount vm_extra_pkg_rmcache cleanup + vm_copy_base vm_create_disk || return 0 vm_extra_create_disk Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Fri Mar 20 19:29:59 2015 (r280298) +++ head/release/tools/vmimage.subr Fri Mar 20 19:40:19 2015 (r280299) @@ -67,6 +67,35 @@ vm_create_base() { return 0 } +vm_copy_base() { + # Creates a new UFS root filesystem and copies the contents of the + # current root filesystem into it. This produces a "clean" disk + # image without any remnants of files which were created temporarily + # during image-creation and have since been deleted (e.g., downloaded + # package archives). + + mkdir -p ${DESTDIR}/old + mdold=$(mdconfig -f ${VMBASE}) + mount /dev/${mdold} ${DESTDIR}/old + + truncate -s ${VMSIZE} ${VMBASE}.tmp + mkdir -p ${DESTDIR}/new + mdnew=$(mdconfig -f ${VMBASE}.tmp) + newfs -j /dev/${mdnew} + mount /dev/${mdnew} ${DESTDIR}/new + + tar -cf- -C ${DESTDIR}/old . | tar -xf- -C ${DESTDIR}/new + + umount /dev/${mdold} + rmdir ${DESTDIR}/old + mdconfig -d -u ${mdold} + + umount /dev/${mdnew} + rmdir ${DESTDIR}/new + mdconfig -d -u ${mdnew} + mv ${VMBASE}.tmp ${VMBASE} +} + vm_install_base() { # Installs the FreeBSD userland/kernel to the virtual machine disk. From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 19:51: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 17747CDE; Fri, 20 Mar 2015 19:51: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 0095F69; Fri, 20 Mar 2015 19:51: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 t2KJpQTY021783; Fri, 20 Mar 2015 19:51:26 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KJpPbU021774; Fri, 20 Mar 2015 19:51:25 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201503201951.t2KJpPbU021774@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 20 Mar 2015 19:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280300 - in head: share/man/man4 sys/conf sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.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: Fri, 20 Mar 2015 19:51:27 -0000 Author: loos Date: Fri Mar 20 19:51:24 2015 New Revision: 280300 URL: https://svnweb.freebsd.org/changeset/base/280300 Log: Add a driver for the Dallas/Maxim DS1307, another common i2c RTC. Many thanks to ian who gently provided me the DS1307 breakout board. Tested on: Raspberry pi Differential Revision: https://reviews.freebsd.org/D2022 Reviewed by: rpaulo Added: head/share/man/man4/ds1307.4 (contents, props changed) head/sys/dev/iicbus/ds1307.c (contents, props changed) head/sys/dev/iicbus/ds1307reg.h (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/conf/files Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Mar 20 19:40:19 2015 (r280299) +++ head/share/man/man4/Makefile Fri Mar 20 19:51:24 2015 (r280300) @@ -119,6 +119,7 @@ MAN= aac.4 \ divert.4 \ ${_dpms.4} \ dpt.4 \ + ds1307.4 \ ds3231.4 \ dummynet.4 \ ed.4 \ Added: head/share/man/man4/ds1307.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ds1307.4 Fri Mar 20 19:51:24 2015 (r280300) @@ -0,0 +1,131 @@ +.\" +.\" Copyright (c) 2015 Luiz Otavio O Souza +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 7, 2015 +.Dt DS1307 4 +.Os +.Sh NAME +.Nm ds1307 +.Nd 64 x 8, serial, i2c real-time clock +.Sh SYNOPSIS +.Cd "device iic" +.Cd "device iicbus" +.Cd "device ds1307" +.Sh DESCRIPTION +The +.Nm +serial real-time clock (RTC) is a low-power, full binary-coded decimal (BCD) +clock/calendar plus 56 bytes of NV SRAM. +.Pp +The +.Nm +has a built-in power-sense circuit that detects power failures and +automatically switches to the backup supply. +Timekeeping operation continues while the part operates from the backup supply. +.Pp +Access to +.Nm +settings is made with the +.Xr sysctl 8 +interface: +.Bd -literal +dev.ds1307.0.%desc: Maxim DS1307 RTC +dev.ds1307.0.%driver: ds1307 +dev.ds1307.0.%location: addr=0xd0 +dev.ds1307.0.%pnpinfo: name=rtc compat=maxim,ds1307 +dev.ds1307.0.%parent: iicbus1 +dev.ds1307.0.sqwe: 1 +dev.ds1307.0.sqw_freq: 32768 +dev.ds1307.0.sqw_out: 0 +.Ed +.Bl -tag -width ".Va dev.ds1307.%d.sqw_freq" +.It Va dev.ds1307.%d.sqwe +If set to 1, the SQW pin drives a square-wave of +.Va dev.ds1307.%d.sqw_freq +frequency. +If set to 0, the output level of SQW pin is controlled by +.Va dev.ds1307.%d.sqw_out . +.It Va dev.ds1307.%d.sqw_freq +Select the frequency of the SQW pin when the square-wave output is enabled on +.Va dev.ds1307.%d.sqwe . +It can be set to 1, 4096, 8192 and 32768. +.It Va dev.ds1307.%d.sqw_out +Set the output level of the SQW pin when +.Va dev.ds1307.%d.sqwe +is set to 0. +.El +.Pp +Please check the +.Nm +datasheet for more details. +.Pp +On a +.Xr device.hints 5 +based system, such as +.Li MIPS , +these values are configurable for +.Nm : +.Bl -tag -width ".Va hint.ds1307.%d.addr" +.It Va hint.ds1307.%d.at +The +.Xr iicbus 4 +that the +.Nm +is connected to. +.It Va hint.ds1307.%d.addr +The i2c address of +.Nm . +.El +.Pp +On a +.Xr FDT 4 +based system the following properties must be set: +.Bl -tag -width ".Va compatible" +.It Va compatible +Must always be set to "dallas,ds1307" or "maxim,ds1307". +.It Va reg +The i2c address of +.Nm . +The default address for +.Nm +is 0xd0. +.El +.Sh SEE ALSO +.Xr fdt 4 , +.Xr iic 4 , +.Xr iicbus 4 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver and this manual page were written by +.An Luiz Otavio O Souza Aq Mt loos@FreeBSD.org . Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Mar 20 19:40:19 2015 (r280299) +++ head/sys/conf/files Fri Mar 20 19:51:24 2015 (r280300) @@ -1449,6 +1449,7 @@ dev/ida/ida_pci.c optional ida pci dev/ie/if_ie.c optional ie isa nowerror dev/ie/if_ie_isa.c optional ie isa dev/iicbus/ad7418.c optional ad7418 +dev/iicbus/ds1307.c optional ds1307 dev/iicbus/ds133x.c optional ds133x dev/iicbus/ds1374.c optional ds1374 dev/iicbus/ds1672.c optional ds1672 Added: head/sys/dev/iicbus/ds1307.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iicbus/ds1307.c Fri Mar 20 19:51:24 2015 (r280300) @@ -0,0 +1,411 @@ +/*- + * Copyright (c) 2015 Luiz Otavio O Souza + * 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$"); + +/* + * Driver for Maxim DS1307 I2C real-time clock/calendar. + */ + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#ifdef FDT +#include +#include +#include +#endif + +#include + +#include "clock_if.h" +#include "iicbus_if.h" + +struct ds1307_softc { + device_t sc_dev; + int sc_year0; + struct intr_config_hook enum_hook; + uint16_t sc_addr; /* DS1307 slave address. */ + uint8_t sc_ctrl; +}; + +static void ds1307_start(void *); + +static int +ds1307_read(device_t dev, uint16_t addr, uint8_t reg, uint8_t *data, size_t len) +{ + struct iic_msg msg[2] = { + { addr, IIC_M_WR | IIC_M_NOSTOP, 1, ® }, + { addr, IIC_M_RD, len, data }, + }; + + return (iicbus_transfer(dev, msg, nitems(msg))); +} + +static int +ds1307_write(device_t dev, uint16_t addr, uint8_t *data, size_t len) +{ + struct iic_msg msg[1] = { + { addr, IIC_M_WR, len, data }, + }; + + return (iicbus_transfer(dev, msg, nitems(msg))); +} + +static int +ds1307_ctrl_read(struct ds1307_softc *sc) +{ + int error; + + sc->sc_ctrl = 0; + error = ds1307_read(sc->sc_dev, sc->sc_addr, DS1307_CONTROL, + &sc->sc_ctrl, sizeof(sc->sc_ctrl)); + if (error) { + device_printf(sc->sc_dev, "cannot read from RTC.\n"); + return (error); + } + + return (0); +} + +static int +ds1307_ctrl_write(struct ds1307_softc *sc) +{ + int error; + uint8_t data[2]; + + data[0] = DS1307_CONTROL; + data[1] = sc->sc_ctrl & DS1307_CTRL_MASK; + error = ds1307_write(sc->sc_dev, sc->sc_addr, data, sizeof(data)); + if (error != 0) + device_printf(sc->sc_dev, "cannot write to RTC.\n"); + + return (error); +} + +static int +ds1307_osc_enable(struct ds1307_softc *sc) +{ + int error; + uint8_t data[2], secs; + + secs = 0; + error = ds1307_read(sc->sc_dev, sc->sc_addr, DS1307_SECS, + &secs, sizeof(secs)); + if (error) { + device_printf(sc->sc_dev, "cannot read from RTC.\n"); + return (error); + } + /* Check if the oscillator is disabled. */ + if ((secs & DS1307_SECS_CH) == 0) + return (0); + device_printf(sc->sc_dev, "clock was halted, check the battery.\n"); + data[0] = DS1307_SECS; + data[1] = secs & DS1307_SECS_MASK; + error = ds1307_write(sc->sc_dev, sc->sc_addr, data, sizeof(data)); + if (error != 0) + device_printf(sc->sc_dev, "cannot write to RTC.\n"); + + return (error); +} + +static int +ds1307_set_24hrs_mode(struct ds1307_softc *sc) +{ + int error; + uint8_t data[2], hour; + + hour = 0; + error = ds1307_read(sc->sc_dev, sc->sc_addr, DS1307_HOUR, + &hour, sizeof(hour)); + if (error) { + device_printf(sc->sc_dev, "cannot read from RTC.\n"); + return (error); + } + data[0] = DS1307_HOUR; + data[1] = hour & DS1307_HOUR_MASK; + error = ds1307_write(sc->sc_dev, sc->sc_addr, data, sizeof(data)); + if (error != 0) + device_printf(sc->sc_dev, "cannot write to RTC.\n"); + + return (error); +} + +static int +ds1307_sqwe_sysctl(SYSCTL_HANDLER_ARGS) +{ + int sqwe, error, newv; + struct ds1307_softc *sc; + + sc = (struct ds1307_softc *)arg1; + error = ds1307_ctrl_read(sc); + if (error != 0) + return (error); + sqwe = newv = (sc->sc_ctrl & DS1307_CTRL_SQWE) ? 1 : 0; + error = sysctl_handle_int(oidp, &newv, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (sqwe != newv) { + sc->sc_ctrl &= ~DS1307_CTRL_SQWE; + if (newv) + sc->sc_ctrl |= DS1307_CTRL_SQWE; + error = ds1307_ctrl_write(sc); + if (error != 0) + return (error); + } + + return (error); +} + +static int +ds1307_sqw_freq_sysctl(SYSCTL_HANDLER_ARGS) +{ + int ds1307_sqw_freq[] = { 1, 4096, 8192, 32768 }; + int error, freq, i, newf, tmp; + struct ds1307_softc *sc; + + sc = (struct ds1307_softc *)arg1; + error = ds1307_ctrl_read(sc); + if (error != 0) + return (error); + tmp = (sc->sc_ctrl & DS1307_CTRL_RS_MASK); + if (tmp >= nitems(ds1307_sqw_freq)) + tmp = nitems(ds1307_sqw_freq) - 1; + freq = ds1307_sqw_freq[tmp]; + error = sysctl_handle_int(oidp, &freq, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (freq != ds1307_sqw_freq[tmp]) { + newf = 0; + for (i = 0; i < nitems(ds1307_sqw_freq); i++) + if (freq >= ds1307_sqw_freq[i]) + newf = i; + sc->sc_ctrl &= ~DS1307_CTRL_RS_MASK; + sc->sc_ctrl |= newf; + error = ds1307_ctrl_write(sc); + if (error != 0) + return (error); + } + + return (error); +} + +static int +ds1307_sqw_out_sysctl(SYSCTL_HANDLER_ARGS) +{ + int sqwe, error, newv; + struct ds1307_softc *sc; + + sc = (struct ds1307_softc *)arg1; + error = ds1307_ctrl_read(sc); + if (error != 0) + return (error); + sqwe = newv = (sc->sc_ctrl & DS1307_CTRL_OUT) ? 1 : 0; + error = sysctl_handle_int(oidp, &newv, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (sqwe != newv) { + sc->sc_ctrl &= ~DS1307_CTRL_OUT; + if (newv) + sc->sc_ctrl |= DS1307_CTRL_OUT; + error = ds1307_ctrl_write(sc); + if (error != 0) + return (error); + } + + return (error); +} + +static int +ds1307_probe(device_t dev) +{ + +#ifdef FDT + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "dallas,ds1307") && + !ofw_bus_is_compatible(dev, "maxim,ds1307")) + return (ENXIO); +#endif + device_set_desc(dev, "Maxim DS1307 RTC"); + + return (BUS_PROBE_DEFAULT); +} + +static int +ds1307_attach(device_t dev) +{ + struct ds1307_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + sc->sc_addr = iicbus_get_addr(dev); + sc->sc_year0 = 1900; + sc->enum_hook.ich_func = ds1307_start; + sc->enum_hook.ich_arg = dev; + + /* + * We have to wait until interrupts are enabled. Usually I2C read + * and write only works when the interrupts are available. + */ + if (config_intrhook_establish(&sc->enum_hook) != 0) + return (ENOMEM); + + return (0); +} + +static void +ds1307_start(void *xdev) +{ + device_t dev; + struct ds1307_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree_node; + struct sysctl_oid_list *tree; + + dev = (device_t)xdev; + sc = device_get_softc(dev); + ctx = device_get_sysctl_ctx(dev); + tree_node = device_get_sysctl_tree(dev); + tree = SYSCTL_CHILDREN(tree_node); + + config_intrhook_disestablish(&sc->enum_hook); + /* Set the 24 hours mode. */ + if (ds1307_set_24hrs_mode(sc) != 0) + return; + /* Enable the oscillator if halted. */ + if (ds1307_osc_enable(sc) != 0) + return; + + /* Configuration parameters. */ + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "sqwe", + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, + ds1307_sqwe_sysctl, "IU", "DS1307 square-wave enable"); + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "sqw_freq", + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, + ds1307_sqw_freq_sysctl, "IU", + "DS1307 square-wave output frequency"); + SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "sqw_out", + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, + ds1307_sqw_out_sysctl, "IU", "DS1307 square-wave output state"); + + /* 1 second resolution. */ + clock_register(dev, 1000000); +} + +static int +ds1307_gettime(device_t dev, struct timespec *ts) +{ + int error; + struct clocktime ct; + struct ds1307_softc *sc; + uint8_t data[7]; + + sc = device_get_softc(dev); + memset(data, 0, sizeof(data)); + error = ds1307_read(sc->sc_dev, sc->sc_addr, DS1307_SECS, + data, sizeof(data)); + if (error != 0) { + device_printf(dev, "cannot read from RTC.\n"); + return (error); + } + ct.nsec = 0; + ct.sec = FROMBCD(data[DS1307_SECS] & DS1307_SECS_MASK); + ct.min = FROMBCD(data[DS1307_MINS] & DS1307_MINS_MASK); + ct.hour = FROMBCD(data[DS1307_HOUR] & DS1307_HOUR_MASK); + ct.day = FROMBCD(data[DS1307_DATE] & DS1307_DATE_MASK); + ct.dow = data[DS1307_WEEKDAY] & DS1307_WEEKDAY_MASK; + ct.mon = FROMBCD(data[DS1307_MONTH] & DS1307_MONTH_MASK); + ct.year = FROMBCD(data[DS1307_YEAR] & DS1307_YEAR_MASK); + ct.year += sc->sc_year0; + if (ct.year < POSIX_BASE_YEAR) + ct.year += 100; /* assume [1970, 2069] */ + + return (clock_ct_to_ts(&ct, ts)); +} + +static int +ds1307_settime(device_t dev, struct timespec *ts) +{ + int error; + struct clocktime ct; + struct ds1307_softc *sc; + uint8_t data[8]; + + sc = device_get_softc(dev); + /* Accuracy is only one second. */ + if (ts->tv_nsec >= 500000000) + ts->tv_sec++; + ts->tv_nsec = 0; + clock_ts_to_ct(ts, &ct); + memset(data, 0, sizeof(data)); + data[0] = DS1307_SECS; + data[DS1307_SECS + 1] = TOBCD(ct.sec); + data[DS1307_MINS + 1] = TOBCD(ct.min); + data[DS1307_HOUR + 1] = TOBCD(ct.hour); + data[DS1307_DATE + 1] = TOBCD(ct.day); + data[DS1307_WEEKDAY + 1] = ct.dow; + data[DS1307_MONTH + 1] = TOBCD(ct.mon); + data[DS1307_YEAR + 1] = TOBCD(ct.year % 100); + /* Write the time back to RTC. */ + error = ds1307_write(dev, sc->sc_addr, data, sizeof(data)); + if (error != 0) + device_printf(dev, "cannot write to RTC.\n"); + + return (error); +} + +static device_method_t ds1307_methods[] = { + DEVMETHOD(device_probe, ds1307_probe), + DEVMETHOD(device_attach, ds1307_attach), + + DEVMETHOD(clock_gettime, ds1307_gettime), + DEVMETHOD(clock_settime, ds1307_settime), + + DEVMETHOD_END +}; + +static driver_t ds1307_driver = { + "ds1307", + ds1307_methods, + sizeof(struct ds1307_softc), +}; + +static devclass_t ds1307_devclass; + +DRIVER_MODULE(ds1307, iicbus, ds1307_driver, ds1307_devclass, NULL, NULL); +MODULE_VERSION(ds1307, 1); +MODULE_DEPEND(ds1307, iicbus, 1, 1, 1); Added: head/sys/dev/iicbus/ds1307reg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iicbus/ds1307reg.h Fri Mar 20 19:51:24 2015 (r280300) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 2015 Luiz Otavio O Souza + * 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$ + */ + +/* + * Maxim DS1307 RTC registers. + */ + +#ifndef _DS1307REG_H_ +#define _DS1307REG_H_ + +#define DS1307_SECS 0x00 +#define DS1307_SECS_MASK 0x7f +#define DS1307_SECS_CH 0x80 +#define DS1307_MINS 0x01 +#define DS1307_MINS_MASK 0x7f +#define DS1307_HOUR 0x02 +#define DS1307_HOUR_MASK 0x3f +#define DS1307_WEEKDAY 0x03 +#define DS1307_WEEKDAY_MASK 0x07 +#define DS1307_DATE 0x04 +#define DS1307_DATE_MASK 0x3f +#define DS1307_MONTH 0x05 +#define DS1307_MONTH_MASK 0x1f +#define DS1307_YEAR 0x06 +#define DS1307_YEAR_MASK 0xff +#define DS1307_CONTROL 0x07 +#define DS1307_CTRL_OUT (1 << 7) +#define DS1307_CTRL_SQWE (1 << 4) +#define DS1307_CTRL_RS1 (1 << 1) +#define DS1307_CTRL_RS0 (1 << 0) +#define DS1307_CTRL_RS_MASK (DS1307_CTRL_RS1 | DS1307_CTRL_RS0) +#define DS1307_CTRL_MASK 0x93 + +#endif /* _DS1307REG_H_ */ From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 20:08:38 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 24273422; Fri, 20 Mar 2015 20:08:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F46F2CC; Fri, 20 Mar 2015 20:08:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KK8bON030186; Fri, 20 Mar 2015 20:08:37 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KK8bOw030185; Fri, 20 Mar 2015 20:08:37 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201503202008.t2KK8bOw030185@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 20 Mar 2015 20:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280301 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Fri, 20 Mar 2015 20:08:38 -0000 Author: allanjude (doc committer) Date: Fri Mar 20 20:08:36 2015 New Revision: 280301 URL: https://svnweb.freebsd.org/changeset/base/280301 Log: Fix grammar in epair(4) man page PR: 196839 Differential Revision: https://reviews.freebsd.org/D2090 Submitted by: Jason Unovitch (original) Approved by: wblock (mentor) Sponsored by: ScaleEngine Inc. Modified: head/share/man/man4/epair.4 Modified: head/share/man/man4/epair.4 ============================================================================== --- head/share/man/man4/epair.4 Fri Mar 20 19:51:24 2015 (r280300) +++ head/share/man/man4/epair.4 Fri Mar 20 20:08:36 2015 (r280301) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 26, 2009 +.Dd March 18, 2015 .Dt EPAIR 4 .Os .Sh NAME @@ -89,14 +89,16 @@ that is only guaranteed to be unique wit To change the default addresses one may use the SIOCSIFADDR ioctl(2) or ifconfig(8) utility. .Pp -The basic intend is to provide connectivity between two virtual +The basic intent is to provide connectivity between two virtual network stack instances. -When connected to a -.Xr if_bridge 4 +When connected to an +.Xr if_bridge 4 , one end of the interface pair can also be part of another (virtual) LAN. -As with any other Ethernet interface one can configure +As with any other Ethernet interface, +.Nm epair +can have a .Xr vlan 4 -support on top of it. +configured on top of it. .Sh SEE ALSO .Xr ioctl 2 , .Xr altq 4 , From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 20:42: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 4D5B92CE; Fri, 20 Mar 2015 20:42:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38E8C968; Fri, 20 Mar 2015 20:42:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KKgx89048423; Fri, 20 Mar 2015 20:42:59 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KKgx75048422; Fri, 20 Mar 2015 20:42:59 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503202042.t2KKgx75048422@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 20 Mar 2015 20:42:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280302 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Fri, 20 Mar 2015 20:42:59 -0000 Author: glebius Date: Fri Mar 20 20:42:58 2015 New Revision: 280302 URL: https://svnweb.freebsd.org/changeset/base/280302 Log: In vlan_clone_match_ethervid(): - Use ifunit() instead of going through the interface list ourselves. - Remove unused parameter. - Move the most important comment above the function. Sponsored by: Nginx, Inc. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Fri Mar 20 20:08:36 2015 (r280301) +++ head/sys/net/if_vlan.c Fri Mar 20 20:42:58 2015 (r280302) @@ -208,8 +208,7 @@ static void vlan_link_state(struct ifnet static void vlan_capabilities(struct ifvlan *ifv); static void vlan_trunk_capabilities(struct ifnet *ifp); -static struct ifnet *vlan_clone_match_ethervid(struct if_clone *, - const char *, int *); +static struct ifnet *vlan_clone_match_ethervid(const char *, int *); static int vlan_clone_match(struct if_clone *, const char *); static int vlan_clone_create(struct if_clone *, char *, size_t, caddr_t); static int vlan_clone_destroy(struct if_clone *, struct ifnet *); @@ -801,40 +800,41 @@ VNET_SYSUNINIT(vnet_vlan_uninit, SI_SUB_ vnet_vlan_uninit, NULL); #endif +/* + * Check for . style interface names. + */ static struct ifnet * -vlan_clone_match_ethervid(struct if_clone *ifc, const char *name, int *vidp) +vlan_clone_match_ethervid(const char *name, int *vidp) { - const char *cp; + char ifname[IFNAMSIZ]; + char *cp; struct ifnet *ifp; int vid; - /* Check for . style interface names. */ - IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(ifp, &V_ifnet, if_link) { - /* - * We can handle non-ethernet hardware types as long as - * they handle the tagging and headers themselves. - */ - if (ifp->if_type != IFT_ETHER && - (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) - continue; - if (strncmp(ifp->if_xname, name, strlen(ifp->if_xname)) != 0) - continue; - cp = name + strlen(ifp->if_xname); - if (*cp++ != '.') - continue; - if (*cp == '\0') - continue; - vid = 0; - for(; *cp >= '0' && *cp <= '9'; cp++) - vid = (vid * 10) + (*cp - '0'); - if (*cp != '\0') - continue; - if (vidp != NULL) - *vidp = vid; - break; - } - IFNET_RUNLOCK_NOSLEEP(); + strlcpy(ifname, name, IFNAMSIZ); + if ((cp = strchr(ifname, '.')) == NULL) + return (NULL); + *cp = '\0'; + if ((ifp = ifunit(ifname)) == NULL) + return (NULL); + /* + * We can handle non-ethernet hardware types as long as + * they handle the tagging and headers themselves. + */ + if (ifp->if_type != IFT_ETHER && + (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) + return (NULL); + + /* Parse VID. */ + if (*++cp == '\0') + return (NULL); + vid = 0; + for(; *cp >= '0' && *cp <= '9'; cp++) + vid = (vid * 10) + (*cp - '0'); + if (*cp != '\0') + return (NULL); + if (vidp != NULL) + *vidp = vid; return (ifp); } @@ -844,7 +844,7 @@ vlan_clone_match(struct if_clone *ifc, c { const char *cp; - if (vlan_clone_match_ethervid(ifc, name, NULL) != NULL) + if (vlan_clone_match_ethervid(name, NULL) != NULL) return (1); if (strncmp(vlanname, name, strlen(vlanname)) != 0) @@ -906,7 +906,7 @@ vlan_clone_create(struct if_clone *ifc, ethertag = 1; vid = vlr.vlr_tag; wildcard = (unit < 0); - } else if ((p = vlan_clone_match_ethervid(ifc, name, &vid)) != NULL) { + } else if ((p = vlan_clone_match_ethervid(name, &vid)) != NULL) { ethertag = 1; unit = -1; wildcard = 0; From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 21:09: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 32654CD0; Fri, 20 Mar 2015 21:09: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 03BA1C23; Fri, 20 Mar 2015 21:09: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 t2KL94Lf058613; Fri, 20 Mar 2015 21:09:04 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KL941E058612; Fri, 20 Mar 2015 21:09:04 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503202109.t2KL941E058612@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 20 Mar 2015 21:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280303 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Fri, 20 Mar 2015 21:09:05 -0000 Author: glebius Date: Fri Mar 20 21:09:03 2015 New Revision: 280303 URL: https://svnweb.freebsd.org/changeset/base/280303 Log: Make vlan_config() the signle point of validity checks. Sponsored by: Nginx, Inc. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Fri Mar 20 20:42:58 2015 (r280302) +++ head/sys/net/if_vlan.c Fri Mar 20 21:09:03 2015 (r280303) @@ -817,14 +817,6 @@ vlan_clone_match_ethervid(const char *na *cp = '\0'; if ((ifp = ifunit(ifname)) == NULL) return (NULL); - /* - * We can handle non-ethernet hardware types as long as - * they handle the tagging and headers themselves. - */ - if (ifp->if_type != IFT_ETHER && - (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) - return (NULL); - /* Parse VID. */ if (*++cp == '\0') return (NULL); @@ -892,13 +884,7 @@ vlan_clone_create(struct if_clone *ifc, return error; p = ifunit(vlr.vlr_parent); if (p == NULL) - return ENXIO; - /* - * Don't let the caller set up a VLAN VID with - * anything except VLID bits. - */ - if (vlr.vlr_tag & ~EVL_VLID_MASK) - return (EINVAL); + return (ENXIO); error = ifc_name2unit(name, &unit); if (error != 0) return (error); @@ -910,13 +896,6 @@ vlan_clone_create(struct if_clone *ifc, ethertag = 1; unit = -1; wildcard = 0; - - /* - * Don't let the caller set up a VLAN VID with - * anything except VLID bits. - */ - if (vid & ~EVL_VLID_MASK) - return (EINVAL); } else { ethertag = 0; @@ -1198,14 +1177,22 @@ vlan_config(struct ifvlan *ifv, struct i struct ifnet *ifp; int error = 0; - /* VID numbers 0x0 and 0xFFF are reserved */ - if (vid == 0 || vid == 0xFFF) - return (EINVAL); + /* + * We can handle non-ethernet hardware types as long as + * they handle the tagging and headers themselves. + */ if (p->if_type != IFT_ETHER && (p->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) return (EPROTONOSUPPORT); if ((p->if_flags & VLAN_IFFLAGS) != VLAN_IFFLAGS) return (EPROTONOSUPPORT); + /* + * Don't let the caller set up a VLAN VID with + * anything except VLID bits. + * VID numbers 0x0 and 0xFFF are reserved. + */ + if (vid == 0 || vid == 0xFFF || (vid & ~EVL_VLID_MASK)) + return (EINVAL); if (ifv->ifv_trunk) return (EBUSY); @@ -1670,14 +1657,6 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd error = ENOENT; break; } - /* - * Don't let the caller set up a VLAN VID with - * anything except VLID bits. - */ - if (vlr.vlr_tag & ~EVL_VLID_MASK) { - error = EINVAL; - break; - } error = vlan_config(ifv, p, vlr.vlr_tag); if (error) break; From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 22:43:14 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 E601427C; Fri, 20 Mar 2015 22:43:14 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id A6E6D896; Fri, 20 Mar 2015 22:43:14 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id BEB32784085; Sat, 21 Mar 2015 09:42:51 +1100 (AEDT) Date: Sat, 21 Mar 2015 09:42:51 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r280279 - head/sys/sys In-Reply-To: <20150320130216.GS2379@kib.kiev.ua> Message-ID: <20150321085923.U1046@besplex.bde.org> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150320130216.GS2379@kib.kiev.ua> 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=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=ORg6-SmGG5svwvipwukA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Fri, 20 Mar 2015 22:43:15 -0000 On Fri, 20 Mar 2015, Konstantin Belousov wrote: > On Fri, Mar 20, 2015 at 10:27:06AM +0000, John Baldwin wrote: >> Author: jhb >> Date: Fri Mar 20 10:27:06 2015 >> New Revision: 280279 >> URL: https://svnweb.freebsd.org/changeset/base/280279 >> >> Log: >> Expand the bitcount* API to support 64-bit integers, plain ints and longs >> and create a "hidden" API that can be used in other system headers without >> adding namespace pollution. >> - If the POPCNT instruction is enabled at compile time, use >> __builtin_popcount*() to implement __bitcount*(), otherwise fall back >> to software implementations. > Are you aware of the Haswell errata HSD146 ? I see the described behaviour I wasn't. > on machines back to SandyBridge, but not on Nehalems. > HSD146. POPCNT Instruction May Take Longer to Execute Than Expected > Problem: POPCNT instruction execution with a 32 or 64 bit operand may be > delayed until previous non-dependent instructions have executed. If it only affects performance, then it is up to the compiler to fix it. > Jilles noted that gcc head and 4.9.2 already provides a workaround by > xoring the dst register. I have some patch for amd64 pmap, see the end > of the message. IIRC, then patch never never uses asm, but intentionally uses the popcount builtin to avoid complications. >> - Use the existing bitcount16() and bitcount32() from to >> implement the non-POPCNT __bitcount16() and __bitcount32() in >> . > Why is it in sys/types.h ? To make it easier to use, while minimizing namespace pollution and inefficiencies. Like the functions used to implement ntohl(), except the implementation is MI so it doesn't need to be in . (The functions used to implement ntohl() are in machine/endian.h. sys/types.h always includes that, so it makes little difference to pollution and inefficiency that the implementation is not more directly in machine/_types.h.) bitcount is simpler and not burdened by compatibility, so it doesn't need a separate header.) Bruce From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 23:48:15 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 526D7E95; Fri, 20 Mar 2015 23:48:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C844E68; Fri, 20 Mar 2015 23:48:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2KNmFw2033412; Fri, 20 Mar 2015 23:48:15 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2KNmCM0033402; Fri, 20 Mar 2015 23:48:12 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201503202348.t2KNmCM0033402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 20 Mar 2015 23:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280306 - in head: secure/lib/libcrypto secure/lib/libssl 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: Fri, 20 Mar 2015 23:48:15 -0000 Author: jkim Date: Fri Mar 20 23:48:11 2015 New Revision: 280306 URL: https://svnweb.freebsd.org/changeset/base/280306 Log: Disable insecure SSLv2 support from the base OpenSSL. Differential Revision: https://reviews.freebsd.org/D1304 Modified: head/secure/lib/libcrypto/opensslconf-arm.h head/secure/lib/libcrypto/opensslconf-mips.h head/secure/lib/libcrypto/opensslconf-powerpc.h head/secure/lib/libcrypto/opensslconf-sparc64.h head/secure/lib/libcrypto/opensslconf-x86.h head/secure/lib/libssl/Makefile head/sys/sys/param.h Modified: head/secure/lib/libcrypto/opensslconf-arm.h ============================================================================== --- head/secure/lib/libcrypto/opensslconf-arm.h Fri Mar 20 21:56:48 2015 (r280305) +++ head/secure/lib/libcrypto/opensslconf-arm.h Fri Mar 20 23:48:11 2015 (r280306) @@ -27,6 +27,9 @@ extern "C" { #ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP #endif +#ifndef OPENSSL_NO_SSL2 +# define OPENSSL_NO_SSL2 +#endif #ifndef OPENSSL_NO_STORE # define OPENSSL_NO_STORE #endif @@ -69,6 +72,9 @@ extern "C" { # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) # define NO_SCTP # endif +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) +# define NO_SSL2 +# endif # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) # define NO_STORE # endif Modified: head/secure/lib/libcrypto/opensslconf-mips.h ============================================================================== --- head/secure/lib/libcrypto/opensslconf-mips.h Fri Mar 20 21:56:48 2015 (r280305) +++ head/secure/lib/libcrypto/opensslconf-mips.h Fri Mar 20 23:48:11 2015 (r280306) @@ -27,6 +27,9 @@ extern "C" { #ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP #endif +#ifndef OPENSSL_NO_SSL2 +# define OPENSSL_NO_SSL2 +#endif #ifndef OPENSSL_NO_STORE # define OPENSSL_NO_STORE #endif @@ -69,6 +72,9 @@ extern "C" { # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) # define NO_SCTP # endif +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) +# define NO_SSL2 +# endif # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) # define NO_STORE # endif Modified: head/secure/lib/libcrypto/opensslconf-powerpc.h ============================================================================== --- head/secure/lib/libcrypto/opensslconf-powerpc.h Fri Mar 20 21:56:48 2015 (r280305) +++ head/secure/lib/libcrypto/opensslconf-powerpc.h Fri Mar 20 23:48:11 2015 (r280306) @@ -27,6 +27,9 @@ extern "C" { #ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP #endif +#ifndef OPENSSL_NO_SSL2 +# define OPENSSL_NO_SSL2 +#endif #ifndef OPENSSL_NO_STORE # define OPENSSL_NO_STORE #endif @@ -69,6 +72,9 @@ extern "C" { # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) # define NO_SCTP # endif +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) +# define NO_SSL2 +# endif # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) # define NO_STORE # endif Modified: head/secure/lib/libcrypto/opensslconf-sparc64.h ============================================================================== --- head/secure/lib/libcrypto/opensslconf-sparc64.h Fri Mar 20 21:56:48 2015 (r280305) +++ head/secure/lib/libcrypto/opensslconf-sparc64.h Fri Mar 20 23:48:11 2015 (r280306) @@ -27,6 +27,9 @@ extern "C" { #ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP #endif +#ifndef OPENSSL_NO_SSL2 +# define OPENSSL_NO_SSL2 +#endif #ifndef OPENSSL_NO_STORE # define OPENSSL_NO_STORE #endif @@ -69,6 +72,9 @@ extern "C" { # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) # define NO_SCTP # endif +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) +# define NO_SSL2 +# endif # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) # define NO_STORE # endif Modified: head/secure/lib/libcrypto/opensslconf-x86.h ============================================================================== --- head/secure/lib/libcrypto/opensslconf-x86.h Fri Mar 20 21:56:48 2015 (r280305) +++ head/secure/lib/libcrypto/opensslconf-x86.h Fri Mar 20 23:48:11 2015 (r280306) @@ -27,6 +27,9 @@ extern "C" { #ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP #endif +#ifndef OPENSSL_NO_SSL2 +# define OPENSSL_NO_SSL2 +#endif #ifndef OPENSSL_NO_STORE # define OPENSSL_NO_STORE #endif @@ -66,6 +69,9 @@ extern "C" { # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) # define NO_SCTP # endif +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) +# define NO_SSL2 +# endif # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) # define NO_STORE # endif Modified: head/secure/lib/libssl/Makefile ============================================================================== --- head/secure/lib/libssl/Makefile Fri Mar 20 21:56:48 2015 (r280305) +++ head/secure/lib/libssl/Makefile Fri Mar 20 23:48:11 2015 (r280306) @@ -12,11 +12,11 @@ NO_LINT= SRCS= bio_ssl.c d1_both.c d1_clnt.c d1_enc.c d1_lib.c d1_meth.c d1_pkt.c \ d1_srtp.c d1_srvr.c s23_clnt.c s23_lib.c s23_meth.c s23_pkt.c \ - s23_srvr.c s2_clnt.c s2_enc.c s2_lib.c s2_meth.c s2_pkt.c s2_srvr.c \ - s3_both.c s3_cbc.c s3_clnt.c s3_enc.c s3_lib.c s3_meth.c s3_pkt.c \ - s3_srvr.c ssl_algs.c ssl_asn1.c ssl_cert.c ssl_ciph.c ssl_err.c \ - ssl_err2.c ssl_lib.c ssl_rsa.c ssl_sess.c ssl_stat.c ssl_txt.c \ - t1_clnt.c t1_enc.c t1_lib.c t1_meth.c t1_reneg.c t1_srvr.c tls_srp.c + s23_srvr.c s3_both.c s3_cbc.c s3_clnt.c s3_enc.c s3_lib.c s3_meth.c \ + s3_pkt.c s3_srvr.c ssl_algs.c ssl_asn1.c ssl_cert.c ssl_ciph.c \ + ssl_err.c ssl_err2.c ssl_lib.c ssl_rsa.c ssl_sess.c ssl_stat.c \ + ssl_txt.c t1_clnt.c t1_enc.c t1_lib.c t1_meth.c t1_reneg.c t1_srvr.c \ + tls_srp.c INCS= dtls1.h kssl.h srtp.h ssl.h ssl2.h ssl23.h ssl3.h tls1.h INCSDIR=${INCLUDEDIR}/openssl Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Mar 20 21:56:48 2015 (r280305) +++ head/sys/sys/param.h Fri Mar 20 23:48:11 2015 (r280306) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100065 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100066 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 00:21: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 6FA24986; Sat, 21 Mar 2015 00:21: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 5B0D41E9; Sat, 21 Mar 2015 00:21: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 t2L0LU4b052132; Sat, 21 Mar 2015 00:21:30 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L0LU91052131; Sat, 21 Mar 2015 00:21:30 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503210021.t2L0LU91052131@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 21 Mar 2015 00:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280307 - head/usr.bin/grep X-SVN-Group: head MIME-Version: 1.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: Sat, 21 Mar 2015 00:21:31 -0000 Author: pfg Date: Sat Mar 21 00:21:30 2015 New Revision: 280307 URL: https://svnweb.freebsd.org/changeset/base/280307 Log: bsdgrep: fix regression in the -f option since r268799 Caused by an incomplete merge from NetBSD. PR: 198725 MFC after: 3 days Modified: head/usr.bin/grep/grep.c Modified: head/usr.bin/grep/grep.c ============================================================================== --- head/usr.bin/grep/grep.c Fri Mar 20 23:48:11 2015 (r280306) +++ head/usr.bin/grep/grep.c Sat Mar 21 00:21:30 2015 (r280307) @@ -316,7 +316,7 @@ read_patterns(const char *fn) len = 0; line = NULL; while ((rlen = getline(&line, &len, f)) != -1) - add_pattern(line, line[0] == '\n' ? 0 : len); + add_pattern(line, line[0] == '\n' ? 0 : (size_t)rlen); free(line); if (ferror(f)) err(2, "%s", fn); From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 00:55: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 534FC1B1; Sat, 21 Mar 2015 00:55:03 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E66E180C; Sat, 21 Mar 2015 00:55:02 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2L0suuA008302 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 21 Mar 2015 02:54:56 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2L0suuA008302 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2L0su79008301; Sat, 21 Mar 2015 02:54:56 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Mar 2015 02:54:56 +0200 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <20150321005456.GC2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150320130216.GS2379@kib.kiev.ua> <20150321085923.U1046@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150321085923.U1046@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 00:55:03 -0000 On Sat, Mar 21, 2015 at 09:42:51AM +1100, Bruce Evans wrote: > On Fri, 20 Mar 2015, Konstantin Belousov wrote: > > > On Fri, Mar 20, 2015 at 10:27:06AM +0000, John Baldwin wrote: > >> Author: jhb > >> Date: Fri Mar 20 10:27:06 2015 > >> New Revision: 280279 > >> URL: https://svnweb.freebsd.org/changeset/base/280279 > >> > >> Log: > >> Expand the bitcount* API to support 64-bit integers, plain ints and longs > >> and create a "hidden" API that can be used in other system headers without > >> adding namespace pollution. > >> - If the POPCNT instruction is enabled at compile time, use > >> __builtin_popcount*() to implement __bitcount*(), otherwise fall back > >> to software implementations. > > > Are you aware of the Haswell errata HSD146 ? I see the described behaviour > > I wasn't. > > > on machines back to SandyBridge, but not on Nehalems. > > HSD146. POPCNT Instruction May Take Longer to Execute Than Expected > > Problem: POPCNT instruction execution with a 32 or 64 bit operand may be > > delayed until previous non-dependent instructions have executed. > > If it only affects performance, then it is up to the compiler to fix it. It affects performance on some cpu models. It is too wrong for compiler to issue cpuid before popcnt. Always issuing xorl before popcnt, as it is currently done by recent gcc, but not clang, is better, but still I think it is up to the code author to decide. > > > Jilles noted that gcc head and 4.9.2 already provides a workaround by > > xoring the dst register. I have some patch for amd64 pmap, see the end > > of the message. > > IIRC, then patch never never uses asm, but intentionally uses the popcount > builtin to avoid complications. > > >> - Use the existing bitcount16() and bitcount32() from to > >> implement the non-POPCNT __bitcount16() and __bitcount32() in > >> . > > Why is it in sys/types.h ? > > To make it easier to use, while minimizing namespace pollution and > inefficiencies. Like the functions used to implement ntohl(), except > the implementation is MI so it doesn't need to be in . > (The functions used to implement ntohl() are in machine/endian.h. > sys/types.h always includes that, so it makes little difference to > pollution and inefficiency that the implementation is not more directly > in machine/_types.h.) bitcount is simpler and not burdened by > compatibility, so it doesn't need a separate header.) Still, it is weird to provide functions from the sys/types.h namespace, and even more weird to provide such special-purpose function. From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 01:14:13 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 EB89F9AB; Sat, 21 Mar 2015 01:14:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC9519E9; Sat, 21 Mar 2015 01:14:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2L1ECkl075559; Sat, 21 Mar 2015 01:14:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L1ECcB075556; Sat, 21 Mar 2015 01:14:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201503210114.t2L1ECcB075556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 21 Mar 2015 01:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280308 - head/sys/fs/devfs X-SVN-Group: head MIME-Version: 1.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: Sat, 21 Mar 2015 01:14:13 -0000 Author: delphij Date: Sat Mar 21 01:14:11 2015 New Revision: 280308 URL: https://svnweb.freebsd.org/changeset/base/280308 Log: Disable timestamping on devfs read/write operations by default. Currently we update timestamps unconditionally when doing read or write operations. This may slow things down on hardware where reading timestamps is expensive (e.g. HPET, because of the default vfs.timestamp_precision setting is nanosecond now) with limited benefit. A new sysctl variable, vfs.devfs.dotimes is added, which can be set to non-zero value when the old behavior is desirable. Differential Revision: https://reviews.freebsd.org/D2104 Reported by: Mike Tancsa Reviewed by: kib Relnotes: yes Sponsored by: iXsystems, Inc. MFC after: 2 weeks Modified: head/sys/fs/devfs/devfs_devs.c head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Sat Mar 21 00:21:30 2015 (r280307) +++ head/sys/fs/devfs/devfs_devs.c Sat Mar 21 01:14:11 2015 (r280308) @@ -61,7 +61,7 @@ static MALLOC_DEFINE(M_DEVFS2, "DEVFS2", static MALLOC_DEFINE(M_DEVFS3, "DEVFS3", "DEVFS data 3"); static MALLOC_DEFINE(M_CDEVP, "DEVFS1", "DEVFS cdev_priv storage"); -static SYSCTL_NODE(_vfs, OID_AUTO, devfs, CTLFLAG_RW, 0, "DEVFS filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, devfs, CTLFLAG_RW, 0, "DEVFS filesystem"); static unsigned devfs_generation; SYSCTL_UINT(_vfs_devfs, OID_AUTO, generation, CTLFLAG_RD, Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 00:21:30 2015 (r280307) +++ head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 01:14:11 2015 (r280308) @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -79,6 +80,12 @@ SX_SYSINIT(clone_drain_lock, &clone_drai struct mtx cdevpriv_mtx; MTX_SYSINIT(cdevpriv_mtx, &cdevpriv_mtx, "cdevpriv lock", MTX_DEF); +SYSCTL_DECL(_vfs_devfs); + +static int devfs_dotimes; +SYSCTL_INT(_vfs_devfs, OID_AUTO, dotimes, CTLFLAG_RW, + &devfs_dotimes, 0, "Update timestamps on DEVFS"); + static int devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp, int *ref) @@ -1221,7 +1228,8 @@ devfs_read_f(struct file *fp, struct uio foffset_lock_uio(fp, uio, flags | FOF_NOLOCK); error = dsw->d_read(dev, uio, ioflag); - if (uio->uio_resid != resid || (error == 0 && resid != 0)) + if (devfs_dotimes && + (uio->uio_resid != resid || (error == 0 && resid != 0))) vfs_timestamp(&dev->si_atime); td->td_fpop = fpop; dev_relthread(dev, ref); @@ -1700,7 +1708,8 @@ devfs_write_f(struct file *fp, struct ui resid = uio->uio_resid; error = dsw->d_write(dev, uio, ioflag); - if (uio->uio_resid != resid || (error == 0 && resid != 0)) { + if (devfs_dotimes && + (uio->uio_resid != resid || (error == 0 && resid != 0))) { vfs_timestamp(&dev->si_ctime); dev->si_mtime = dev->si_ctime; } From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 03:52:44 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 83735FE0; Sat, 21 Mar 2015 03:52:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F026BE6; Sat, 21 Mar 2015 03:52:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2L3qiUT049457; Sat, 21 Mar 2015 03:52:44 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L3qixB049456; Sat, 21 Mar 2015 03:52:44 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503210352.t2L3qixB049456@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sat, 21 Mar 2015 03:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280310 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.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: Sat, 21 Mar 2015 03:52:44 -0000 Author: dteske Date: Sat Mar 21 03:52:43 2015 New Revision: 280310 URL: https://svnweb.freebsd.org/changeset/base/280310 Log: Whitespace cleanup(s). MFC after: 3 days X-MFC-to: stable/10 Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Sat Mar 21 01:39:44 2015 (r280309) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Sat Mar 21 03:52:43 2015 (r280310) @@ -320,31 +320,34 @@ dialog_menu_main() [ "$ZFSBOOT_SWAP_MIRROR" ] && swapmirror="$msg_yes" local disks n disks_grammar f_count n $ZFSBOOT_DISKS - { [ $n -eq 1 ] && disks_grammar=$msg_disk_singular; } || + { [ $n -eq 1 ] && disks_grammar=$msg_disk_singular; } || disks_grammar=$msg_disk_plural # grammar local menu_list=" - '>>> $msg_install' '$msg_install_desc' - '$msg_install_help' - 'T $msg_pool_type_disks' '$ZFSBOOT_VDEV_TYPE: $n $disks_grammar' - '$msg_pool_type_disks_help' - '- $msg_rescan_devices' '*' - '$msg_rescan_devices_help' - '- $msg_disk_info' '*' - '$msg_disk_info_help' - 'N $msg_pool_name' '$ZFSBOOT_POOL_NAME' - '$msg_pool_name_help' - '4 $msg_force_4k_sectors' '$force4k' - '$msg_force_4k_sectors_help' - 'E $msg_encrypt_disks' '$usegeli' - '$msg_encrypt_disks_help' - 'P $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME' - '$msg_partition_scheme_help' - 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' - '$msg_swap_size_help' - 'M $msg_swap_mirror' '$swapmirror' - '$msg_swap_mirror_help' - 'W $msg_swap_encrypt' '$swapgeli' - '$msg_swap_encrypt_help' + '>>> $msg_install' '$msg_install_desc' + '$msg_install_help' + 'T $msg_pool_type_disks' + '$ZFSBOOT_VDEV_TYPE: $n $disks_grammar' + '$msg_pool_type_disks_help' + '- $msg_rescan_devices' '*' + '$msg_rescan_devices_help' + '- $msg_disk_info' '*' + '$msg_disk_info_help' + 'N $msg_pool_name' '$ZFSBOOT_POOL_NAME' + '$msg_pool_name_help' + '4 $msg_force_4k_sectors' + '$force4k' + '$msg_force_4k_sectors_help' + 'E $msg_encrypt_disks' '$usegeli' + '$msg_encrypt_disks_help' + 'P $msg_partition_scheme' + '$ZFSBOOT_PARTITION_SCHEME' + '$msg_partition_scheme_help' + 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' + '$msg_swap_size_help' + 'M $msg_swap_mirror' '$swapmirror' + '$msg_swap_mirror_help' + 'W $msg_swap_encrypt' '$swapgeli' + '$msg_swap_encrypt_help' " # END-QUOTE local defaultitem= # Calculated below local hline="$hline_alnum_arrows_punc_tab_enter" @@ -937,12 +940,12 @@ zfs_create_diskpart() # 5. Add freebsd-zfs partition for zroot # f_eval_catch $funcname gpart "$GPART_ADD_INDEX" \ - $mbrindex freebsd-zfs ${disk}s1 || return $FAILURE + $mbrindex freebsd-zfs ${disk}s1 || return $FAILURE f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ - /dev/$disk$targetpart # Pedantic + /dev/$disk$targetpart # Pedantic f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ - /boot/zfsboot /dev/${disk}s1 count=1 || - return $FAILURE + /boot/zfsboot /dev/${disk}s1 count=1 || + return $FAILURE ;; esac # $ZFSBOOT_PARTITION_SCHEME @@ -1123,7 +1126,7 @@ zfs_create_boot() if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then # Generate an encryption key using random(4) f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ - /dev/random "$bootpool/$zroot_key" \ + /dev/random "$bootpool/$zroot_key" \ "bs=4096 count=1" || return $FAILURE else # Clean up @@ -1177,6 +1180,7 @@ zfs_create_boot() return $FAILURE f_eval_catch -d $funcname umount "$UMOUNT" /mnt # tmpfs fi + # # Create the gmirror(8) GEOMS for swap # @@ -1257,7 +1261,7 @@ zfs_create_boot() # MBR boot loader touch-up if [ "$ZFSBOOT_PARTITION_SCHEME" = "MBR" ]; then f_dprintf "$funcname: Updating MBR boot loader on disks..." - # Stick the ZFS boot loader in the "convienient hole" after + # Stick the ZFS boot loader in the "convienient hole" after # the ZFS internal metadata for disk in $disks; do f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ @@ -1299,8 +1303,10 @@ zfs_create_boot() $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE if [ "$ZFSBOOT_SWAP_MIRROR" ]; then - f_eval_catch $funcname echo "$ECHO_APPEND" 'geom_mirror_load=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.gmirror || return $FAILURE + f_eval_catch $funcname echo "$ECHO_APPEND" \ + 'geom_mirror_load=\"YES\"' \ + $BSDINSTALL_TMPBOOT/loader.conf.gmirror || + return $FAILURE fi # We're all done unless we should go on for boot pool @@ -1323,8 +1329,8 @@ zfs_create_boot() return $FAILURE done f_eval_catch $funcname printf "$PRINTF_CONF" vfs.root.mountfrom \ - "\"zfs:$zroot_name/$zroot_bootfs\"" \ - $BSDINSTALL_TMPBOOT/loader.conf.root || return $FAILURE + "\"zfs:$zroot_name/$zroot_bootfs\"" \ + $BSDINSTALL_TMPBOOT/loader.conf.root || return $FAILURE # We're all done unless we should go on to do encryption [ "$ZFSBOOT_GELI_ENCRYPTION" ] || return $SUCCESS @@ -1334,9 +1340,9 @@ zfs_create_boot() # f_dprintf "$funcname: Configuring disk encryption..." f_eval_catch $funcname echo "$ECHO_APPEND" 'aesni_load=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.aesni || return $FAILURE + $BSDINSTALL_TMPBOOT/loader.conf.aesni || return $FAILURE f_eval_catch $funcname echo "$ECHO_APPEND" 'geom_eli_load=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE + $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE for disk in $disks; do f_eval_catch $funcname printf "$PRINTF_CONF" \ geli_%s_keyfile0_load "$disk$targetpart YES" \ @@ -1407,14 +1413,14 @@ f_dprintf "FSTAB_FMT=[%s]" "$FSTAB_FMT" # ZFS with UEFI yet # if f_interactive; then - bootmethod=$(sysctl -n machdep.bootmethod) - f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" - if [ "$bootmethod" != "BIOS" ]; then - dialog_uefi_prompt - retval=$? - f_dprintf "uefi_prompt=[%s]" "$retval" - [ $retval -eq $DIALOG_OK ] || f_die - fi + bootmethod=$( sysctl -n machdep.bootmethod ) + f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" + if [ "$bootmethod" != "BIOS" ]; then + dialog_uefi_prompt + retval=$? + f_dprintf "uefi_prompt=[%s]" "$retval" + [ $retval -eq $DIALOG_OK ] || f_die + fi fi # From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 03:54:12 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 6102C1CC; Sat, 21 Mar 2015 03:54:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C8FDBF6; Sat, 21 Mar 2015 03:54:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2L3sCvS049674; Sat, 21 Mar 2015 03:54:12 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L3sCJg049673; Sat, 21 Mar 2015 03:54:12 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503210354.t2L3sCJg049673@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sat, 21 Mar 2015 03:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280311 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.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: Sat, 21 Mar 2015 03:54:12 -0000 Author: dteske Date: Sat Mar 21 03:54:11 2015 New Revision: 280311 URL: https://svnweb.freebsd.org/changeset/base/280311 Log: Update copyright(s) MFC after: 3 days X-MFC-to: stable/10 Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Sat Mar 21 03:52:43 2015 (r280310) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Sat Mar 21 03:54:11 2015 (r280311) @@ -1,7 +1,7 @@ #!/bin/sh #- -# Copyright (c) 2013 Allan Jude -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2014 Allan Jude +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 04:39:35 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 13C35867; Sat, 21 Mar 2015 04:39:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB3C09A; Sat, 21 Mar 2015 04:39:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2L4dYTd069023; Sat, 21 Mar 2015 04:39:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L4dYfl069022; Sat, 21 Mar 2015 04:39:34 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201503210439.t2L4dYfl069022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 21 Mar 2015 04:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280312 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 04:39:35 -0000 Author: mjg Date: Sat Mar 21 04:39:33 2015 New Revision: 280312 URL: https://svnweb.freebsd.org/changeset/base/280312 Log: coredump: protect corefilename access with a lock Previously format string traversal could happen while the string itself was being modified. Use allproc_lock as coredumping is a rare operation and as such we don't have to create a dedicated lock. Submitted by: Tiwei Bie Reviewed by: kib X-Additional: JuniorJobs project Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sat Mar 21 03:54:11 2015 (r280311) +++ head/sys/kern/kern_sig.c Sat Mar 21 04:39:33 2015 (r280312) @@ -3089,9 +3089,28 @@ SYSCTL_INT(_kern, OID_AUTO, compress_use static int compress_user_cores = 0; #endif +/* + * Protect the access to corefilename[] by allproc_lock. + */ +#define corefilename_lock allproc_lock + static char corefilename[MAXPATHLEN] = {"%N.core"}; -SYSCTL_STRING(_kern, OID_AUTO, corefile, CTLFLAG_RWTUN, corefilename, - sizeof(corefilename), "Process corefile name format string"); + +static int +sysctl_kern_corefile(SYSCTL_HANDLER_ARGS) +{ + int error; + + sx_xlock(&corefilename_lock); + error = sysctl_handle_string(oidp, corefilename, sizeof(corefilename), + req); + sx_xunlock(&corefilename_lock); + + return (error); +} +SYSCTL_PROC(_kern, OID_AUTO, corefile, CTLTYPE_STRING | CTLFLAG_RWTUN | + CTLFLAG_MPSAFE, 0, 0, sysctl_kern_corefile, "A", + "Process corefile name format string"); /* * corefile_open(comm, uid, pid, td, compress, vpp, namep) @@ -3120,6 +3139,7 @@ corefile_open(const char *comm, uid_t ui name = malloc(MAXPATHLEN, M_TEMP, M_WAITOK | M_ZERO); indexpos = -1; (void)sbuf_new(&sb, name, MAXPATHLEN, SBUF_FIXEDLEN); + sx_slock(&corefilename_lock); for (i = 0; format[i] != '\0'; i++) { switch (format[i]) { case '%': /* Format character */ @@ -3162,6 +3182,7 @@ corefile_open(const char *comm, uid_t ui break; } } + sx_sunlock(&corefilename_lock); free(hostname, M_TEMP); if (compress) sbuf_printf(&sb, GZ_SUFFIX); From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 06:00:47 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 6785C1B6; Sat, 21 Mar 2015 06:00:47 +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 5328E9D5; Sat, 21 Mar 2015 06:00:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2L60lNQ008046; Sat, 21 Mar 2015 06:00:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L60lsI008045; Sat, 21 Mar 2015 06:00:47 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503210600.t2L60lsI008045@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Mar 2015 06:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280314 - 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: Sat, 21 Mar 2015 06:00:47 -0000 Author: adrian Date: Sat Mar 21 06:00:46 2015 New Revision: 280314 URL: https://svnweb.freebsd.org/changeset/base/280314 Log: add QCA955x PCIe configuration registers. These are /not/ absolute addresses, as the QCA955x SoC has 2 PCIe RC's (and 1 PCIe EP.) Modified: head/sys/mips/atheros/qca955xreg.h Modified: head/sys/mips/atheros/qca955xreg.h ============================================================================== --- head/sys/mips/atheros/qca955xreg.h Sat Mar 21 05:59:45 2015 (r280313) +++ head/sys/mips/atheros/qca955xreg.h Sat Mar 21 06:00:46 2015 (r280314) @@ -205,4 +205,14 @@ #define QCA955X_DDR_REG_FLUSH_PCIE (AR71XX_APB_BASE + 0xa8) #define QCA955X_DDR_REG_FLUSH_WMAC (AR71XX_APB_BASE + 0xac) +/* PCIe control block - relative to PCI_CTRL_BASE0/PCI_CTRL_BASE1 */ + +#define QCA955X_PCI_APP 0x0 +#define QCA955X_PCI_APP_LTSSM_ENABLE (1 << 0) +#define QCA955X_PCI_RESET 0x18 +#define QCA955X_PCI_RESET_LINK_UP (1 << 0) +#define QCA955X_PCI_INTR_STATUS 0x4c +#define QCA955X_PCI_INTR_MASK 0x50 +#define QCA955X_PCI_INTR_DEV0 (1 << 14) + #endif /* __QCA955XREG_H__ */ From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 05:59:47 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 31616D6; Sat, 21 Mar 2015 05:59:47 +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 1CB52948; Sat, 21 Mar 2015 05:59:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2L5xkR2004957; Sat, 21 Mar 2015 05:59:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L5xkc8004956; Sat, 21 Mar 2015 05:59:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503210559.t2L5xkc8004956@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Mar 2015 05:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280313 - 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: Sat, 21 Mar 2015 05:59:47 -0000 Author: adrian Date: Sat Mar 21 05:59:45 2015 New Revision: 280313 URL: https://svnweb.freebsd.org/changeset/base/280313 Log: Note that the AR724x PCIe registers are actually from the PCI_CTRL register range. Modified: head/sys/mips/atheros/ar724xreg.h Modified: head/sys/mips/atheros/ar724xreg.h ============================================================================== --- head/sys/mips/atheros/ar724xreg.h Sat Mar 21 04:39:33 2015 (r280312) +++ head/sys/mips/atheros/ar724xreg.h Sat Mar 21 05:59:45 2015 (r280313) @@ -78,7 +78,7 @@ #define AR724X_PCI_CTRL_BASE (AR71XX_APB_BASE + 0x000F0000) #define AR724X_PCI_CTRL_SIZE 0x100 -/* PCI config registers */ +/* PCI config registers - AR724X_PCI_CTRL_BASE */ #define AR724X_PCI_APP 0x180f0000 #define AR724X_PCI_APP_LTSSM_ENABLE (1 << 0) #define AR724X_PCI_RESET 0x180f0018 From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 06:08:36 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 DA4BB3BD; Sat, 21 Mar 2015 06:08: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 C4F20A0B; Sat, 21 Mar 2015 06:08: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 t2L68ahS009549; Sat, 21 Mar 2015 06:08:36 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L68aQQ009548; Sat, 21 Mar 2015 06:08:36 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503210608.t2L68aQQ009548@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Mar 2015 06:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280315 - 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: Sat, 21 Mar 2015 06:08:37 -0000 Author: adrian Date: Sat Mar 21 06:08:35 2015 New Revision: 280315 URL: https://svnweb.freebsd.org/changeset/base/280315 Log: Add GPIO function mux configuration for AR934x SoCs. The AR934x (and maybe others in this family) have a more complicated GPIO mux. The AR71xx just has a single function register for a handful of "GPIO or X" options, however the AR934x allows for one of roughly 100 behaviours for each GPIO pin. So, this adds a quick hints based mechanism to configure the output functions, which is required for some of the more interesting board configurations. Specifically, some use external LNAs to improve RX, and without the MUX/output configured right, the 2GHz RX side will be plain terrible. It doesn't yet configure the "input" side yet; I'll add that if it's required. Tested: * TP-Link TL-WDR3600, testing 2GHz STA/AP modes, checking some basic RX sensitivity things (ie, "can I see the AP on the other side of the apartment that intentionally has poor signal reception from where I am right now.") Whilst here, fix a silly bug in the maxpin routine; I was missing a break. Modified: head/sys/mips/atheros/ar71xx_gpio.c Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Sat Mar 21 06:00:46 2015 (r280314) +++ head/sys/mips/atheros/ar71xx_gpio.c Sat Mar 21 06:08:35 2015 (r280315) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -92,6 +93,12 @@ static int ar71xx_gpio_pin_set(device_t static int ar71xx_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val); static int ar71xx_gpio_pin_toggle(device_t dev, uint32_t pin); +/* + * Enable/disable the GPIO function control space. + * + * This is primarily for the AR71xx, which has SPI CS1/CS2, UART, SLIC, I2S + * as GPIO pin options. + */ static void ar71xx_gpio_function_enable(struct ar71xx_gpio_softc *sc, uint32_t mask) { @@ -174,6 +181,7 @@ ar71xx_gpio_pin_max(device_t dev, int *m case AR71XX_SOC_AR9342: case AR71XX_SOC_AR9344: *maxpin = AR934X_GPIO_COUNT - 1; + break; case AR71XX_SOC_QCA9556: case AR71XX_SOC_QCA9558: *maxpin = QCA955X_GPIO_COUNT - 1; @@ -445,6 +453,7 @@ ar71xx_gpio_attach(device_t dev) sc->gpio_pins[i].gp_flags = GPIO_PIN_INPUT; i++; } + /* Turn on the hinted pins. */ for (i = 0; i < sc->gpio_npins; i++) { j = sc->gpio_pins[i].gp_pin; @@ -453,6 +462,56 @@ ar71xx_gpio_attach(device_t dev) ar71xx_gpio_pin_set(dev, j, 1); } } + + /* + * Search through the function hints, in case there's some + * overrides such as LNA control. + * + * hint.gpio.X.func..gpiofunc= + * hint.gpio.X.func..gpiomode=1 (for output, default low) + */ + for (i = 0; i <= maxpin; i++) { + char buf[32]; + int gpiofunc, gpiomode; + + snprintf(buf, 32, "func.%d.gpiofunc", i); + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), + buf, + &gpiofunc) != 0) + continue; + /* Get the mode too */ + snprintf(buf, 32, "func.%d.gpiomode", i); + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), + buf, + &gpiomode) != 0) + continue; + + /* We only handle mode=1 for now */ + if (gpiomode != 1) + continue; + + device_printf(dev, "%s: GPIO %d: func=%d, mode=%d\n", + __func__, + i, + gpiofunc, + gpiomode); + + /* Set output (bit == 0) */ + oe = GPIO_READ(sc, AR71XX_GPIO_OE); + oe &= ~ (1 << i); + GPIO_WRITE(sc, AR71XX_GPIO_OE, oe); + + /* Set pin value = 0, so it stays low by default */ + oe = GPIO_READ(sc, AR71XX_GPIO_OUT); + oe &= ~ (1 << i); + GPIO_WRITE(sc, AR71XX_GPIO_OUT, oe); + + /* Finally: Set the output config */ + ar71xx_gpio_ouput_configure(i, gpiofunc); + } + sc->busdev = gpiobus_attach_bus(dev); if (sc->busdev == NULL) { ar71xx_gpio_detach(dev); From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 06:12:47 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 94A4F515; Sat, 21 Mar 2015 06:12:47 +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 7E566AAE; Sat, 21 Mar 2015 06:12:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2L6ClpP013484; Sat, 21 Mar 2015 06:12:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L6Cl7H013483; Sat, 21 Mar 2015 06:12:47 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503210612.t2L6Cl7H013483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Mar 2015 06:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280316 - head/sys/mips/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: Sat, 21 Mar 2015 06:12:47 -0000 Author: adrian Date: Sat Mar 21 06:12:46 2015 New Revision: 280316 URL: https://svnweb.freebsd.org/changeset/base/280316 Log: Now that the switch PHY fully works, don't limit arge0 to only being up if the WAN port is up. This way I can use it for arbitrary ports/vlans. Modified: head/sys/mips/conf/AP135.hints Modified: head/sys/mips/conf/AP135.hints ============================================================================== --- head/sys/mips/conf/AP135.hints Sat Mar 21 06:08:35 2015 (r280315) +++ head/sys/mips/conf/AP135.hints Sat Mar 21 06:12:46 2015 (r280316) @@ -87,7 +87,7 @@ hint.arswitch.0.port.6.rxpause=1 # so, lock both sides of this connect up to 1000/full; # if_arge thus wont change the PLL configuration # upon a link status change. -hint.arge.0.phymask=0x10 +hint.arge.0.phymask=0x0 hint.arge.0.miimode=3 # RGMII hint.arge.0.media=1000 hint.arge.0.fduplex=1 From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 06:13: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 7DA36655; Sat, 21 Mar 2015 06:13: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 693CBAB6; Sat, 21 Mar 2015 06:13: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 t2L6DV49013609; Sat, 21 Mar 2015 06:13:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L6DVAC013608; Sat, 21 Mar 2015 06:13:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503210613.t2L6DVAC013608@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Mar 2015 06:13:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280317 - head/sys/mips/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: Sat, 21 Mar 2015 06:13:31 -0000 Author: adrian Date: Sat Mar 21 06:13:30 2015 New Revision: 280317 URL: https://svnweb.freebsd.org/changeset/base/280317 Log: Re-enable the modules for now; I'm using them in some other test builds. Modified: head/sys/mips/conf/AR934X_BASE Modified: head/sys/mips/conf/AR934X_BASE ============================================================================== --- head/sys/mips/conf/AR934X_BASE Sat Mar 21 06:12:46 2015 (r280316) +++ head/sys/mips/conf/AR934X_BASE Sat Mar 21 06:13:30 2015 (r280317) @@ -20,8 +20,8 @@ files "../atheros/files.ar71xx" hints "AR934X_BASE.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -# makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" -makeoptions MODULES_OVERRIDE="" +makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" +# makeoptions MODULES_OVERRIDE="" options DDB options KDB From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 06:16:24 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 736B583F; Sat, 21 Mar 2015 06:16: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 53E40ACE; Sat, 21 Mar 2015 06:16: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 t2L6GO9m014045; Sat, 21 Mar 2015 06:16:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L6GN5G014043; Sat, 21 Mar 2015 06:16:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503210616.t2L6GN5G014043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Mar 2015 06:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280318 - head/sys/mips/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: Sat, 21 Mar 2015 06:16:24 -0000 Author: adrian Date: Sat Mar 21 06:16:23 2015 New Revision: 280318 URL: https://svnweb.freebsd.org/changeset/base/280318 Log: Add support for the TP-Link TL-WDR4300 and TL-WDR3600. These are actually almost the same units; except one is 3x3 5GHz, and one is 2x2 5GHz. Tested: * TP-Link TL-WDR3600 TODO: * The ath0/ath1 MAC addresses are ye garbage (00:02:03:04:05:06); fixing that will take a little more time. It works fine with the ath0/ath1 MAC addresses set manually. * Go through and yank the AR9344 on-board switch config (arswitch1); it's not required here for this AP. Added: head/sys/mips/conf/TL-WDR4300 (contents, props changed) head/sys/mips/conf/TL-WDR4300.hints (contents, props changed) Added: head/sys/mips/conf/TL-WDR4300 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/TL-WDR4300 Sat Mar 21 06:16:23 2015 (r280318) @@ -0,0 +1,52 @@ +# +# TPLink TL-WDR4300 - AR9344 based dual-band 2x2 wifi +# +# $FreeBSD$ +# + +# Include the default AR934x parameters +include "AR934X_BASE" + +ident TL-WDR4300 + +# Override hints with board values +hints "TL-WDR4300.hints" + +# Force the board memory - the base DB120 has 128MB RAM +options AR71XX_REALMEM=(128*1024*1024) + +# i2c GPIO bus +#device gpioiic +#device iicbb +#device iicbus +#device iic + +# Options required for miiproxy and mdiobus +options ARGE_MDIO # Export an MDIO bus separate from arge +device miiproxy # MDIO bus <-> MII PHY rendezvous + +device etherswitch +device arswitch + +# read MSDOS formatted disks - USB +options MSDOSFS + +# Enable the uboot environment stuff rather then the +# redboot stuff. +options AR71XX_ENV_UBOOT + +# uzip - to boot natively from flash +device geom_uncompress +options GEOM_UNCOMPRESS + +# Used for the static uboot partition map +device geom_map + +# yes, this board has a PCI connected atheros device +device ath_pci +options AR71XX_ATH_EEPROM +device firmware # Used by the above +options ATH_EEPROM_FIRMWARE + +# Boot off of the rootfs, as defined in the geom_map setup. +options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\" Added: head/sys/mips/conf/TL-WDR4300.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/TL-WDR4300.hints Sat Mar 21 06:16:23 2015 (r280318) @@ -0,0 +1,206 @@ +# $FreeBSD$ + +# MAC/ART ? - they're 00:02:03:04:05:06 :( + +# ath0 chain0 EXTERNAL_LNA0: 18 +# ath0 chain1 EXTERNAL_LNA1: 19 +# These are configured as GPIO output, init low, then +# set the GPIO 'type' AR934X_GPIO_OUT_EXT_LNA0/AR934X_GPIO_OUT_EXT_LNA1. + +# XXX There's no arge1 on this! + +# XXX RFKILL? + +# mdiobus0 on arge0 +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x19000000 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +# DB120 GMAC configuration +# + AR934X_ETH_CFG_RGMII_GMAC0 (1 << 0) +hint.ar934x_gmac.0.gmac_cfg=0x1 + +# GMAC0 here - connected to an AR8327 +hint.arswitch.0.at="mdio0" +hint.arswitch.0.is_7240=0 +hint.arswitch.0.is_9340=0 # not the internal switch! +hint.arswitch.0.numphys=5 +hint.arswitch.0.phy4cpu=0 +hint.arswitch.0.is_rgmii=0 +hint.arswitch.0.is_gmii=0 + +# Other AR8327 configuration parameters + +# AR8327_PAD_MAC_RGMII +hint.arswitch.0.pad.0.mode=6 +hint.arswitch.0.pad.0.txclk_delay_en=1 +hint.arswitch.0.pad.0.rxclk_delay_en=1 +# AR8327_CLK_DELAY_SEL1 +hint.arswitch.0.pad.0.txclk_delay_sel=1 +# AR8327_CLK_DELAY_SEL2 +hint.arswitch.0.pad.0.rxclk_delay_sel=2 + +# XXX there's no LED management just yet! +hint.arswitch.0.led.ctrl0=0x00000000 +hint.arswitch.0.led.ctrl1=0xc737c737 +hint.arswitch.0.led.ctrl2=0x00000000 +hint.arswitch.0.led.ctrl3=0x00c30c00 +hint.arswitch.0.led.open_drain=0 + +# force_link=1 is required for the rest of the parameters +# to be configured. +hint.arswitch.0.port.0.force_link=1 +hint.arswitch.0.port.0.speed=1000 +hint.arswitch.0.port.0.duplex=1 +hint.arswitch.0.port.0.txpause=1 +hint.arswitch.0.port.0.rxpause=1 + +# XXX OpenWRT DB120 BSP doesn't have media/duplex set? +hint.arge.0.phymask=0x0 +hint.arge.0.media=1000 +hint.arge.0.fduplex=1 +hint.arge.0.miimode=3 # RGMII +hint.arge.0.pll_1000=0x06000000 + +# MAC for arge0 is the first 6 bytes of the ART +hint.arge.0.eeprommac=0x1f01fc00 + +# mdiobus1 on arge1 +hint.argemdio.1.at="nexus0" +hint.argemdio.1.maddr=0x1a000000 +hint.argemdio.1.msize=0x1000 +hint.argemdio.1.order=0 + +# Embedded switch on the AR9344 +# mdio1 is actually created as the AR8327 internal bus; so +# this pops up as mdio2. +# +# XXX TODO: there's no need for AR9344 internal switch; it isn't exposed +hint.arswitch.1.at="mdio2" +hint.arswitch.1.is_7240=0 +hint.arswitch.1.is_9340=1 +hint.arswitch.1.numphys=5 +hint.arswitch.1.phy4cpu=0 # phy 4 is not a "CPU port" PHY here +hint.arswitch.1.is_rgmii=0 +hint.arswitch.1.is_gmii=1 # arge1 <-> switch PHY is GMII + +# arge1 - lock up to 1000/full +hint.arge.1.phymask=0x0 # Nothing attached here (XXX?) +hint.arge.1.media=1000 +hint.arge.1.fduplex=1 +hint.arge.1.miimode=1 # GMII + +# MAC for arge1 is the second 6 bytes of the ART +# hint.arge.1.eeprommac=0x1f7f0006 + +# ath0: Where the ART is - last 64k in the flash +hint.ath.0.eepromaddr=0x1fff0000 +hint.ath.0.eepromsize=16384 + +# ath1: it's different; it's a PCIe attached device, so +# we instead need to teach the PCIe bridge code about it +# (ie, the 'early pci fixup' stuff that programs the PCIe +# host registers on the NIC) and then we teach ath where +# to find it. + +# ath1 hint - pcie slot 0 +hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1fff4000 +hint.pcib.0.bus.0.0.0.ath_fixup_size=16384 + +# ath0 - eeprom comes from here +hint.ath.1.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware" + +# flash layout: +# +# bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART) + +# 128KiB uboot +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x00020000 # 128k u-boot +hint.map.0.name="u-boot" +hint.map.0.readonly=1 + +# kernel +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00020000 +hint.map.2.end="search:0x00020000:0x10000:.!/bin/sh" +hint.map.2.name="kernel" +hint.map.2.readonly=1 + +# 1344KiB uImage +hint.map.3.at="flash/spi0" +hint.map.3.start="search:0x00020000:0x10000:.!/bin/sh" +hint.map.3.end=0x007d0000 +hint.map.3.name="rootfs" +hint.map.3.readonly=1 + +# 64KiB cfg +hint.map.4.at="flash/spi0" +hint.map.4.start=0x007d0000 +hint.map.4.end=0x007e0000 +hint.map.4.name="cfg" +hint.map.4.readonly=0 + +# 64KiB mib0 +hint.map.5.at="flash/spi0" +hint.map.5.start=0x007e0000 +hint.map.5.end=0x007f0000 # 64k mib0 +hint.map.5.name="mib0" +hint.map.5.readonly=1 + +# 64KiB ART +hint.map.6.at="flash/spi0" +hint.map.6.start=0x007f0000 +hint.map.6.end=0x00800000 # 64k ART +hint.map.6.name="ART" +hint.map.6.readonly=1 + +# GPIO configuration +# GPIO21 and GPIO22 - USB1 and USB2 power +# ath0 chain0 EXTERNAL_LNA0: 18, output +# ath0 chain1 EXTERNAL_LNA1: 19, output + +# These are the GPIO LEDs and buttons which can be software controlled. +hint.gpio.0.pinmask=0x0063f800 + +# Enable GPIO21, GPIO22 output and high - for USB power +hint.gpio.0.pinon=0x00600000 + +hint.gpio.0.func.18.gpiofunc=46 +hint.gpio.0.func.18.gpiomode=1 # output, default low + +hint.gpio.0.func.19.gpiofunc=47 +hint.gpio.0.func.19.gpiomode=1 # output, default low + +# LED QSS - 15 +# LED SYSTEM - 14 +# LED USB1 - 11 +# LED USB2 - 12 +# LED WLAN2G - 13 + +# SWITCH WPS - 16 +# SWITCH RFKILL - 17 + +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="USB1" +hint.gpioled.0.pins=0x0800 + +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.name="USB2" +hint.gpioled.1.pins=0x1000 + +hint.gpioled.2.at="gpiobus0" +hint.gpioled.2.name="WLAN2G" +hint.gpioled.2.pins=0x2000 + +hint.gpioled.3.at="gpiobus0" +hint.gpioled.3.name="SYSTEM" +hint.gpioled.3.pins=0x4000 + +hint.gpioled.4.at="gpiobus0" +hint.gpioled.4.name="QSS" +hint.gpioled.4.pins=0x8000 + +# XXX TODO: WPS/RFKILL switch From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 06:18: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 82FEB99A; Sat, 21 Mar 2015 06:18: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 6DB28AE0; Sat, 21 Mar 2015 06:18: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 t2L6IRlu014311; Sat, 21 Mar 2015 06:18:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L6IQXM014306; Sat, 21 Mar 2015 06:18:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503210618.t2L6IQXM014306@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Mar 2015 06:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280319 - head/sys/mips/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: Sat, 21 Mar 2015 06:18:27 -0000 Author: adrian Date: Sat Mar 21 06:18:25 2015 New Revision: 280319 URL: https://svnweb.freebsd.org/changeset/base/280319 Log: Migrate these configs to use the geom map search function. Now that the search function reliably works, this allows for smaller images. Modified: head/sys/mips/conf/CARAMBOLA2.hints head/sys/mips/conf/DIR-825B1.hints head/sys/mips/conf/DIR-825C1.hints Modified: head/sys/mips/conf/CARAMBOLA2.hints ============================================================================== --- head/sys/mips/conf/CARAMBOLA2.hints Sat Mar 21 06:16:23 2015 (r280318) +++ head/sys/mips/conf/CARAMBOLA2.hints Sat Mar 21 06:18:25 2015 (r280319) @@ -61,12 +61,12 @@ hint.map.1.readonly=0 hint.map.2.at="flash/spi0" hint.map.2.start=0x00050000 -hint.map.2.end=0x00250000 +hint.map.2.end="search:0x00050000:0x10000:.!/bin/sh" hint.map.2.name="kernel" hint.map.2.readonly=0 hint.map.3.at="flash/spi0" -hint.map.3.start=0x00250000 +hint.map.3.start="search:0x00050000:0x10000:.!/bin/sh" hint.map.3.end=0x00fe0000 hint.map.3.name="rootfs" hint.map.3.readonly=0 Modified: head/sys/mips/conf/DIR-825B1.hints ============================================================================== --- head/sys/mips/conf/DIR-825B1.hints Sat Mar 21 06:16:23 2015 (r280318) +++ head/sys/mips/conf/DIR-825B1.hints Sat Mar 21 06:18:25 2015 (r280319) @@ -52,12 +52,12 @@ hint.map.1.readonly=0 hint.map.2.at="flash/spi0" hint.map.2.start=0x0050000 -hint.map.2.end=0x00150000 +hint.map.2.end="search:0x00050000:0x10000:.!/bin/sh" hint.map.2.name="kernel" hint.map.2.readonly=1 hint.map.3.at="flash/spi0" -hint.map.3.start=0x00150000 +hint.map.3.start="search:0x00050000:0x10000:.!/bin/sh" hint.map.3.end=0x00660000 hint.map.3.name="rootfs" hint.map.3.readonly=0 Modified: head/sys/mips/conf/DIR-825C1.hints ============================================================================== --- head/sys/mips/conf/DIR-825C1.hints Sat Mar 21 06:16:23 2015 (r280318) +++ head/sys/mips/conf/DIR-825C1.hints Sat Mar 21 06:18:25 2015 (r280319) @@ -83,27 +83,27 @@ hint.ath.1.eeprom_firmware="pcib.0.bus.0 # 64KiB u-boot hint.map.0.at="flash/spi0" hint.map.0.start=0x00000000 -hint.map.0.end= 0x00010000 +hint.map.0.end=0x00010000 hint.map.0.name="u-boot" hint.map.0.readonly=1 # 64KiB u-boot-env hint.map.1.at="flash/spi0" hint.map.1.start=0x00010000 -hint.map.1.end= 0x00020000 +hint.map.1.end=0x00020000 hint.map.1.name="u-boot-env" hint.map.1.readonly=1 # 1344KiB kernel hint.map.2.at="flash/spi0" hint.map.2.start=0x00020000 -hint.map.2.end="search:0x00100000:0x10000:.!/bin/sh" +hint.map.2.end="search:0x00020000:0x10000:.!/bin/sh" hint.map.2.name="kernel" hint.map.2.readonly=1 # 14592KiB rootfs hint.map.3.at="flash/spi0" -hint.map.3.start="search:0x00100000:0x10000:.!/bin/sh" +hint.map.3.start="search:0x00020000:0x10000:.!/bin/sh" hint.map.3.end=0x00fb0000 hint.map.3.name="rootfs" hint.map.3.readonly=1 @@ -111,20 +111,20 @@ hint.map.3.readonly=1 # 192KiB lang -- remapped to cfg hint.map.4.at="flash/spi0" hint.map.4.start=0x00fb0000 -hint.map.4.end= 0x00fe0000 +hint.map.4.end=0x00fe0000 hint.map.4.name="cfg" hint.map.4.readonly=0 # 64KiB mac hint.map.5.at="flash/spi0" hint.map.5.start=0x00fe0000 -hint.map.5.end= 0x00ff0000 +hint.map.5.end=0x00ff0000 hint.map.5.name="mac" hint.map.5.readonly=1 # 64KiB art hint.map.6.at="flash/spi0" hint.map.6.start=0x00ff0000 -hint.map.6.end= 0x01000000 +hint.map.6.end=0x01000000 hint.map.6.name="art" hint.map.6.readonly=1 From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 06:44:42 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 C9CA0FAE; Sat, 21 Mar 2015 06:44: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 B443ED60; Sat, 21 Mar 2015 06:44: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 t2L6ig0x027136; Sat, 21 Mar 2015 06:44:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L6igM4027135; Sat, 21 Mar 2015 06:44:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503210644.t2L6igM4027135@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Mar 2015 06:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280320 - head/sys/mips/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: Sat, 21 Mar 2015 06:44:42 -0000 Author: adrian Date: Sat Mar 21 06:44:41 2015 New Revision: 280320 URL: https://svnweb.freebsd.org/changeset/base/280320 Log: Fix the LED configuration so the switch PHY LEDs work fine. Tested: * TP-Link TL-WDR3600; yes, by testing all five ethernet ports. Obtained from: Linux OpenWRT Modified: head/sys/mips/conf/TL-WDR4300.hints Modified: head/sys/mips/conf/TL-WDR4300.hints ============================================================================== --- head/sys/mips/conf/TL-WDR4300.hints Sat Mar 21 06:18:25 2015 (r280319) +++ head/sys/mips/conf/TL-WDR4300.hints Sat Mar 21 06:44:41 2015 (r280320) @@ -42,10 +42,10 @@ hint.arswitch.0.pad.0.txclk_delay_sel=1 hint.arswitch.0.pad.0.rxclk_delay_sel=2 # XXX there's no LED management just yet! -hint.arswitch.0.led.ctrl0=0x00000000 -hint.arswitch.0.led.ctrl1=0xc737c737 +hint.arswitch.0.led.ctrl0=0xc737c737 +hint.arswitch.0.led.ctrl1=0x00000000 hint.arswitch.0.led.ctrl2=0x00000000 -hint.arswitch.0.led.ctrl3=0x00c30c00 +hint.arswitch.0.led.ctrl3=0x0030c300 hint.arswitch.0.led.open_drain=0 # force_link=1 is required for the rest of the parameters From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 09:42: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 66AE753E; Sat, 21 Mar 2015 09:42: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 5248BF07; Sat, 21 Mar 2015 09:42: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 t2L9gcgi007812; Sat, 21 Mar 2015 09:42:38 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L9gcLO007811; Sat, 21 Mar 2015 09:42:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503210942.t2L9gcLO007811@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 21 Mar 2015 09:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280321 - head/etc/autofs X-SVN-Group: head MIME-Version: 1.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: Sat, 21 Mar 2015 09:42:39 -0000 Author: trasz Date: Sat Mar 21 09:42:37 2015 New Revision: 280321 URL: https://svnweb.freebsd.org/changeset/base/280321 Log: Make the autofs LDAP script cope with server returning entries with ENTRY_ATTRIBUTE (eg cn) after the VALUE_ATTRIBUTE (eg automountInformation), instead of before. PR: 198557 MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/etc/autofs/include_ldap Modified: head/etc/autofs/include_ldap ============================================================================== --- head/etc/autofs/include_ldap Sat Mar 21 06:44:41 2015 (r280320) +++ head/etc/autofs/include_ldap Sat Mar 21 09:42:37 2015 (r280321) @@ -15,24 +15,41 @@ $1 == "'$ENTRY_ATTRIBUTE':" { key = $2 } -$1 == "'$VALUE_ATTRIBUTE':" && key { - printf "%s%s", key, OFS - key = "" - for (i=2; i 0 { printf "%s%s", key, OFS - key = "" - for (i=2; i 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 E42BE693; Sat, 21 Mar 2015 09:45:47 +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 CE16AF16; Sat, 21 Mar 2015 09:45:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2L9jleY008262; Sat, 21 Mar 2015 09:45:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2L9jkYI008259; Sat, 21 Mar 2015 09:45:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503210945.t2L9jkYI008259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 21 Mar 2015 09:45:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280322 - head/sys/dev/sound/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 09:45:48 -0000 Author: hselasky Date: Sat Mar 21 09:45:45 2015 New Revision: 280322 URL: https://svnweb.freebsd.org/changeset/base/280322 Log: The synchronisation value returned by the so-called feedback endpoint appears to be too inaccurate that it can be used to synchronize the playback data stream. If there is a recording endpoint associated with the playback endpoint, use that instead. That means if the isochronous OUT endpoint is asynchronus the USB audio driver will automatically start recording, if possible, to get exact information about the needed sample rate adjustments. In no recording endpoint is present, no rate adaption will be done. While at it fix an issue where the hardware buffer pointers don't get reset at the first device PCM trigger. Make some variables 32-bit to avoid problems with multithreading. MFC after: 3 days PR: 198444 Modified: head/sys/dev/sound/usb/uaudio.c head/sys/dev/sound/usb/uaudio.h head/sys/dev/sound/usb/uaudio_pcm.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Sat Mar 21 09:42:37 2015 (r280321) +++ head/sys/dev/sound/usb/uaudio.c Sat Mar 21 09:45:45 2015 (r280322) @@ -212,26 +212,25 @@ struct uaudio_chan { uint32_t sample_rem; uint32_t sample_curr; uint32_t max_buf; + int32_t jitter_rem; + int32_t jitter_curr; + + int feedback_rate; uint32_t pcm_format[2]; uint16_t bytes_per_frame[2]; - uint8_t num_alt; - uint8_t cur_alt; - uint8_t set_alt; - uint8_t operation; + uint32_t intr_counter; + uint32_t running; + uint32_t num_alt; + uint32_t cur_alt; + uint32_t set_alt; + uint32_t operation; #define CHAN_OP_NONE 0 #define CHAN_OP_START 1 #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - - /* USB audio feedback endpoint state */ - struct { - uint16_t time; /* I/O interrupt count */ - int16_t constant; /* sample rate adjustment in Hz */ - int16_t remainder; /* current remainder */ - } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1090,6 +1089,11 @@ uaudio_attach_sub(device_t dev, kobj_cla uaudio_mixer_register_sysctl(sc, dev); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "feedback_rate", CTLFLAG_RD, &sc->sc_play_chan.feedback_rate, + 0, "Feedback sample rate in Hz"); + return (0); /* success */ detach: @@ -1288,7 +1292,6 @@ uaudio_configure_msg_sub(struct uaudio_s chan->frames_per_second = fps; chan->sample_rem = chan_alt->sample_rate % fps; chan->sample_curr = 0; - chan->frames_per_second = fps; /* compute required buffer size */ buf_size = (chan->bytes_per_frame[1] * frames); @@ -1968,7 +1971,7 @@ uaudio_chan_play_sync_callback(struct us { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint64_t sample_rate = ch->usb_alt[ch->cur_alt].sample_rate; + uint64_t sample_rate; uint8_t buf[4]; uint64_t temp; int len; @@ -2011,6 +2014,8 @@ uaudio_chan_play_sync_callback(struct us temp *= 125ULL; + sample_rate = ch->usb_alt[ch->cur_alt].sample_rate; + /* auto adjust */ while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; @@ -2018,35 +2023,10 @@ uaudio_chan_play_sync_callback(struct us while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* - * Some USB audio devices only report a sample rate - * different from the nominal one when they want one - * more or less sample. Make sure we catch this case - * by pulling the sample rate offset slowly towards - * zero if the reported value is equal to the sample - * rate. - */ - if (temp > sample_rate) - ch->feedback.constant += 1; - else if (temp < sample_rate) - ch->feedback.constant -= 1; - else if (ch->feedback.constant > 0) - ch->feedback.constant--; - else if (ch->feedback.constant < 0) - ch->feedback.constant++; - - DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", - (int)temp, (int)sample_rate, (int)ch->feedback.constant); + DPRINTF("Comparing %d Hz :: %d Hz\n", + (int)temp, (int)sample_rate); - /* - * Range check sync constant. We cannot change the - * number of samples per second by more than the value - * defined by "UAUDIO_IRQS": - */ - if (ch->feedback.constant > UAUDIO_IRQS) - ch->feedback.constant = UAUDIO_IRQS; - else if (ch->feedback.constant < -UAUDIO_IRQS) - ch->feedback.constant = -UAUDIO_IRQS; + ch->feedback_rate = temp; break; case USB_ST_SETUP: @@ -2060,43 +2040,98 @@ uaudio_chan_play_sync_callback(struct us } } +static int +uaudio_chan_is_async(struct uaudio_chan *ch, uint8_t alt) +{ + uint8_t attr = ch->usb_alt[alt].p_ed1->bmAttributes; + return (UE_GET_ISO_TYPE(attr) == UE_ISO_ASYNC); +} + static void uaudio_chan_play_callback(struct usb_xfer *xfer, usb_error_t error) { struct uaudio_chan *ch = usbd_xfer_softc(xfer); + struct uaudio_chan *ch_rec; struct usb_page_cache *pc; - uint32_t sample_size = ch->usb_alt[ch->cur_alt].sample_size; uint32_t mfl; uint32_t total; uint32_t blockcount; uint32_t n; uint32_t offset; + int sample_size; int actlen; int sumlen; - usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); - - if (ch->end == ch->start) { - DPRINTF("no buffer!\n"); + if (ch->running == 0 || ch->start == ch->end) { + DPRINTF("not running or no buffer!\n"); return; } + /* check if there is a record channel */ + if (ch->priv_sc->sc_rec_chan.num_alt > 0) + ch_rec = &ch->priv_sc->sc_rec_chan; + else + ch_rec = NULL; + + usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); + switch (USB_GET_STATE(xfer)) { + case USB_ST_SETUP: +tr_setup: + if (ch_rec != NULL) { + /* reset receive jitter counters */ + mtx_lock(ch_rec->pcm_mtx); + ch_rec->jitter_curr = 0; + ch_rec->jitter_rem = 0; + mtx_unlock(ch_rec->pcm_mtx); + } + + /* reset transmit jitter counters */ + ch->jitter_curr = 0; + ch->jitter_rem = 0; + + /* FALLTHROUGH */ case USB_ST_TRANSFERRED: -tr_transferred: if (actlen < sumlen) { DPRINTF("short transfer, " "%d of %d bytes\n", actlen, sumlen); } chn_intr(ch->pcm_ch); + /* + * Check for asynchronous playback endpoint and that + * the playback endpoint is properly configured: + */ + if (ch_rec != NULL && + uaudio_chan_is_async(ch, ch->cur_alt) != 0) { + mtx_lock(ch_rec->pcm_mtx); + if (ch_rec->cur_alt < ch_rec->num_alt) { + int64_t tx_jitter; + int64_t rx_rate; + + /* translate receive jitter into transmit jitter */ + tx_jitter = ch->usb_alt[ch->cur_alt].sample_rate; + tx_jitter = (tx_jitter * ch_rec->jitter_curr) + + ch->jitter_rem; + + /* reset receive jitter counters */ + ch_rec->jitter_curr = 0; + ch_rec->jitter_rem = 0; + + /* compute exact number of transmit jitter samples */ + rx_rate = ch_rec->usb_alt[ch_rec->cur_alt].sample_rate; + ch->jitter_curr += tx_jitter / rx_rate; + ch->jitter_rem = tx_jitter % rx_rate; + } + mtx_unlock(ch_rec->pcm_mtx); + } + /* start the SYNC transfer one time per second, if any */ - if (++(ch->feedback.time) >= UAUDIO_IRQS) { - ch->feedback.time = 0; + if (++(ch->intr_counter) >= UAUDIO_IRQS) { + ch->intr_counter = 0; usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } - case USB_ST_SETUP: mfl = usbd_xfer_max_framelen(xfer); if (ch->bytes_per_frame[1] > mfl) { @@ -2112,6 +2147,9 @@ tr_transferred: /* setup number of frames */ usbd_xfer_set_frames(xfer, blockcount); + /* get sample size */ + sample_size = ch->usb_alt[ch->cur_alt].sample_size; + /* reset total length */ total = 0; @@ -2127,31 +2165,23 @@ tr_transferred: frame_len = ch->bytes_per_frame[0]; } - if (n == (blockcount - 1)) { - /* - * Update sync remainder and check if - * we should transmit more or less - * data: - */ - ch->feedback.remainder += ch->feedback.constant; - if (ch->feedback.remainder >= UAUDIO_IRQS) { - ch->feedback.remainder -= UAUDIO_IRQS; - DPRINTFN(6, "sending one sample more\n"); - if ((frame_len + sample_size) <= mfl) - frame_len += sample_size; - } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { - ch->feedback.remainder += UAUDIO_IRQS; - DPRINTFN(6, "sending one sample less\n"); - if (frame_len >= sample_size) - frame_len -= sample_size; - } + /* handle free running clock case */ + if (ch->jitter_curr > 0 && + (frame_len + sample_size) <= mfl) { + DPRINTFN(6, "sending one sample more\n"); + ch->jitter_curr--; + frame_len += sample_size; + } else if (ch->jitter_curr < 0 && + frame_len >= sample_size) { + DPRINTFN(6, "sending one sample less\n"); + ch->jitter_curr++; + frame_len -= sample_size; } - usbd_xfer_set_frame_len(xfer, n, frame_len); total += frame_len; } - DPRINTFN(6, "transfer %d bytes\n", total); + DPRINTFN(6, "transferring %d bytes\n", total); offset = 0; @@ -2159,28 +2189,25 @@ tr_transferred: while (total > 0) { n = (ch->end - ch->cur); - if (n > total) { + if (n > total) n = total; - } + usbd_copy_in(pc, offset, ch->cur, n); total -= n; ch->cur += n; offset += n; - if (ch->cur >= ch->end) { + if (ch->cur >= ch->end) ch->cur = ch->start; - } } - usbd_transfer_submit(xfer); break; default: /* Error */ - if (error == USB_ERR_CANCELLED) { - break; - } - goto tr_transferred; + if (error != USB_ERR_CANCELLED) + goto tr_setup; + break; } } @@ -2196,36 +2223,59 @@ uaudio_chan_record_callback(struct usb_x struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; uint32_t offset0; - uint32_t offset1; uint32_t mfl; int m; int n; int len; int actlen; int nframes; - int blockcount; + int expected_bytes; + int sample_size; - usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); - mfl = usbd_xfer_max_framelen(xfer); - - if (ch->end == ch->start) { + if (ch->start == ch->end) { DPRINTF("no buffer!\n"); return; } + usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); + mfl = usbd_xfer_max_framelen(xfer); + switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - DPRINTFN(6, "transferred %d bytes\n", actlen); - offset0 = 0; pc = usbd_xfer_get_frame(xfer, 0); + /* try to compute the number of expected bytes */ + ch->sample_curr += (ch->sample_rem * ch->intr_frames); + + /* compute number of expected bytes */ + expected_bytes = (ch->intr_frames * ch->bytes_per_frame[0]) + + ((ch->sample_curr / ch->frames_per_second) * + (ch->bytes_per_frame[1] - ch->bytes_per_frame[0])); + + /* keep remainder */ + ch->sample_curr %= ch->frames_per_second; + + /* get current sample size */ + sample_size = ch->usb_alt[ch->cur_alt].sample_size; + for (n = 0; n != nframes; n++) { + uint32_t offset1 = offset0; - offset1 = offset0; len = usbd_xfer_frame_len(xfer, n); + /* make sure we only receive complete samples */ + len = len - (len % sample_size); + + /* subtract bytes received from expected payload */ + expected_bytes -= len; + + /* don't receive data when not ready */ + if (ch->running == 0 || ch->cur_alt != ch->set_alt) + continue; + + /* fill ring buffer with samples, if any */ while (len > 0) { m = (ch->end - ch->cur); @@ -2239,33 +2289,46 @@ uaudio_chan_record_callback(struct usb_x offset1 += m; ch->cur += m; - if (ch->cur >= ch->end) { + if (ch->cur >= ch->end) ch->cur = ch->start; - } } offset0 += mfl; } - chn_intr(ch->pcm_ch); + /* update current jitter */ + ch->jitter_curr -= (expected_bytes / sample_size); + + /* don't allow a huge amount of jitter to accumulate */ + nframes = 2 * ch->intr_frames; + + /* range check current jitter */ + if (ch->jitter_curr < -nframes) + ch->jitter_curr = -nframes; + else if (ch->jitter_curr > nframes) + ch->jitter_curr = nframes; + + DPRINTFN(6, "transferred %d bytes, jitter %d samples\n", + actlen, ch->jitter_curr); + + if (ch->running != 0) + chn_intr(ch->pcm_ch); case USB_ST_SETUP: tr_setup: - blockcount = ch->intr_frames; + nframes = ch->intr_frames; - usbd_xfer_set_frames(xfer, blockcount); - for (n = 0; n < blockcount; n++) { + usbd_xfer_set_frames(xfer, nframes); + for (n = 0; n != nframes; n++) usbd_xfer_set_frame_len(xfer, n, mfl); - } usbd_transfer_submit(xfer); break; default: /* Error */ - if (error == USB_ERR_CANCELLED) { - break; - } - goto tr_setup; + if (error != USB_ERR_CANCELLED) + goto tr_setup; + break; } } @@ -2338,13 +2401,7 @@ int uaudio_chan_set_param_blocksize(struct uaudio_chan *ch, uint32_t blocksize) { uint32_t temp = 2 * uaudio_get_buffer_size(ch, ch->set_alt); - sndbuf_setup(ch->pcm_buf, ch->buf, temp); - - ch->start = ch->buf; - ch->end = ch->buf + temp; - ch->cur = ch->buf; - return (temp / 2); } @@ -2358,8 +2415,11 @@ uaudio_chan_set_param_fragments(struct u int uaudio_chan_set_param_speed(struct uaudio_chan *ch, uint32_t speed) { + struct uaudio_softc *sc; uint8_t x; + sc = ch->priv_sc; + for (x = 0; x < ch->num_alt; x++) { if (ch->usb_alt[x].sample_rate < speed) { /* sample rate is too low */ @@ -2370,7 +2430,9 @@ uaudio_chan_set_param_speed(struct uaudi if (x != 0) x--; + usb_proc_explore_lock(sc->sc_udev); ch->set_alt = x; + usb_proc_explore_unlock(sc->sc_udev); DPRINTF("Selecting alt %d\n", (int)x); @@ -2441,16 +2503,16 @@ uaudio_chan_set_param_format(struct uaud return (0); } -int -uaudio_chan_start(struct uaudio_chan *ch) +static void +uaudio_chan_start_sub(struct uaudio_chan *ch) { struct uaudio_softc *sc = ch->priv_sc; int do_start = 0; - usb_proc_explore_lock(sc->sc_udev); if (ch->operation != CHAN_OP_DRAIN) { if (ch->cur_alt == ch->set_alt && - ch->operation == CHAN_OP_NONE) { + ch->operation == CHAN_OP_NONE && + mtx_owned(ch->pcm_mtx) != 0) { /* save doing the explore task */ do_start = 1; } else { @@ -2459,28 +2521,81 @@ uaudio_chan_start(struct uaudio_chan *ch &sc->sc_config_msg[0], &sc->sc_config_msg[1]); } } - usb_proc_explore_unlock(sc->sc_udev); - - /* reset feedback endpoint state */ - memset(&ch->feedback, 0, sizeof(ch->feedback)); - if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); } - return (0); } -int -uaudio_chan_stop(struct uaudio_chan *ch) +static int +uaudio_chan_need_both(struct uaudio_softc *sc) +{ + return (sc->sc_play_chan.num_alt > 0 && + sc->sc_play_chan.running != 0 && + uaudio_chan_is_async(&sc->sc_play_chan, + sc->sc_play_chan.set_alt) != 0 && + sc->sc_rec_chan.num_alt > 0 && + sc->sc_rec_chan.running == 0); +} + +static int +uaudio_chan_need_none(struct uaudio_softc *sc) +{ + return (sc->sc_play_chan.num_alt > 0 && + sc->sc_play_chan.running == 0 && + sc->sc_rec_chan.num_alt > 0 && + sc->sc_rec_chan.running == 0); +} + +void +uaudio_chan_start(struct uaudio_chan *ch) { struct uaudio_softc *sc = ch->priv_sc; - int do_stop = 0; + /* make operation atomic */ usb_proc_explore_lock(sc->sc_udev); + + /* check if not running */ + if (ch->running == 0) { + uint32_t temp; + + /* get current buffer size */ + temp = 2 * uaudio_get_buffer_size(ch, ch->set_alt); + + /* set running flag */ + ch->running = 1; + + /* ensure the hardware buffer is reset */ + ch->start = ch->buf; + ch->end = ch->buf + temp; + ch->cur = ch->buf; + + if (uaudio_chan_need_both(sc)) { + /* + * Start both endpoints because of need for + * jitter information: + */ + uaudio_chan_start_sub(&sc->sc_rec_chan); + uaudio_chan_start_sub(&sc->sc_play_chan); + } else { + uaudio_chan_start_sub(ch); + } + } + + /* exit atomic operation */ + usb_proc_explore_unlock(sc->sc_udev); +} + +static void +uaudio_chan_stop_sub(struct uaudio_chan *ch) +{ + struct uaudio_softc *sc = ch->priv_sc; + int do_stop = 0; + if (ch->operation != CHAN_OP_DRAIN) { if (ch->cur_alt == ch->set_alt && - ch->operation == CHAN_OP_NONE) { + ch->operation == CHAN_OP_NONE && + mtx_owned(ch->pcm_mtx) != 0) { /* save doing the explore task */ do_stop = 1; } else { @@ -2489,13 +2604,44 @@ uaudio_chan_stop(struct uaudio_chan *ch) &sc->sc_config_msg[0], &sc->sc_config_msg[1]); } } - usb_proc_explore_unlock(sc->sc_udev); - if (do_stop) { usbd_transfer_stop(ch->xfer[0]); usbd_transfer_stop(ch->xfer[1]); } - return (0); +} + +void +uaudio_chan_stop(struct uaudio_chan *ch) +{ + struct uaudio_softc *sc = ch->priv_sc; + + /* make operation atomic */ + usb_proc_explore_lock(sc->sc_udev); + + /* check if running */ + if (ch->running != 0) { + /* clear running flag */ + ch->running = 0; + + if (uaudio_chan_need_both(sc)) { + /* + * Leave the endpoints running because we need + * information about jitter! + */ + } else if (uaudio_chan_need_none(sc)) { + /* + * Stop both endpoints in case the one was used for + * jitter information: + */ + uaudio_chan_stop_sub(&sc->sc_rec_chan); + uaudio_chan_stop_sub(&sc->sc_play_chan); + } else { + uaudio_chan_stop_sub(ch); + } + } + + /* exit atomic operation */ + usb_proc_explore_unlock(sc->sc_udev); } /*========================================================================* Modified: head/sys/dev/sound/usb/uaudio.h ============================================================================== --- head/sys/dev/sound/usb/uaudio.h Sat Mar 21 09:42:37 2015 (r280321) +++ head/sys/dev/sound/usb/uaudio.h Sat Mar 21 09:45:45 2015 (r280322) @@ -54,8 +54,8 @@ extern struct pcmchan_matrix *uaudio_cha uint32_t format); extern int uaudio_chan_set_param_format(struct uaudio_chan *ch, uint32_t format); -extern int uaudio_chan_start(struct uaudio_chan *ch); -extern int uaudio_chan_stop(struct uaudio_chan *ch); +extern void uaudio_chan_start(struct uaudio_chan *ch); +extern void uaudio_chan_stop(struct uaudio_chan *ch); extern int uaudio_mixer_init_sub(struct uaudio_softc *sc, struct snd_mixer *m); extern int uaudio_mixer_uninit_sub(struct uaudio_softc *sc); Modified: head/sys/dev/sound/usb/uaudio_pcm.c ============================================================================== --- head/sys/dev/sound/usb/uaudio_pcm.c Sat Mar 21 09:42:37 2015 (r280321) +++ head/sys/dev/sound/usb/uaudio_pcm.c Sat Mar 21 09:45:45 2015 (r280322) @@ -81,14 +81,14 @@ ua_chan_setfragments(kobj_t obj, void *d static int ua_chan_trigger(kobj_t obj, void *data, int go) { - if (!PCMTRIG_COMMON(go)) { - return (0); - } - if (go == PCMTRIG_START) { - return (uaudio_chan_start(data)); - } else { - return (uaudio_chan_stop(data)); + if (PCMTRIG_COMMON(go)) { + if (go == PCMTRIG_START) { + uaudio_chan_start(data); + } else { + uaudio_chan_stop(data); + } } + return (0); } static uint32_t From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 10:14: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 523E99F8; Sat, 21 Mar 2015 10:14:18 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 139A11CF; Sat, 21 Mar 2015 10:14:17 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 2B677104093D; Sat, 21 Mar 2015 20:49:01 +1100 (AEDT) Date: Sat, 21 Mar 2015 20:49:00 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Xin LI Subject: Re: svn commit: r280308 - head/sys/fs/devfs In-Reply-To: <201503210114.t2L1ECcB075556@svn.freebsd.org> Message-ID: <20150321200221.K1846@besplex.bde.org> References: <201503210114.t2L1ECcB075556@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=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=AUD30uXixocujIzroAsA:9 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: Sat, 21 Mar 2015 10:14:18 -0000 On Sat, 21 Mar 2015, Xin LI wrote: > Log: > Disable timestamping on devfs read/write operations by default. > > Currently we update timestamps unconditionally when doing read or > write operations. This may slow things down on hardware where > reading timestamps is expensive (e.g. HPET, because of the default > vfs.timestamp_precision setting is nanosecond now) with limited > benefit. > > A new sysctl variable, vfs.devfs.dotimes is added, which can be > set to non-zero value when the old behavior is desirable. I don't like this. It defaults to non-POSIX-conformant behaviour... The slowness is mostly from no delayed update of times in devfs. Switching vfs.timestamp_precision to a hardware timecounter would have been even more expensive for regular files if file systems didn't have delayed updates. The assumption that vfs_timestamp() doesn't use a slow timecounter was so often satisfied that no one missed devfs also not supporting mounting with -noatime. Delayed updates are even easier to implement for devfs than for disk file systems the times never need to be written to disk. A slow update is still wasteful for atimes, but not as bad as for disk file systems since it doesn't trigger a slower sync to disk. > ... > Modified: head/sys/fs/devfs/devfs_vnops.c > ============================================================================== > --- head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 00:21:30 2015 (r280307) > +++ head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 01:14:11 2015 (r280308) > ... > @@ -1700,7 +1708,8 @@ devfs_write_f(struct file *fp, struct ui > resid = uio->uio_resid; > > error = dsw->d_write(dev, uio, ioflag); > - if (uio->uio_resid != resid || (error == 0 && resid != 0)) { > + if (devfs_dotimes && > + (uio->uio_resid != resid || (error == 0 && resid != 0))) { > vfs_timestamp(&dev->si_ctime); > dev->si_mtime = dev->si_ctime; > } An old bug is evident in the diff. Writing shouldn't change the ctime. Bruce From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 11:04:23 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 9DDE2F2C; Sat, 21 Mar 2015 11:04:23 +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 49D58850; Sat, 21 Mar 2015 11:04:22 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id B6047D68B62; Sat, 21 Mar 2015 21:33:22 +1100 (AEDT) Date: Sat, 21 Mar 2015 21:33:22 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r280279 - head/sys/sys In-Reply-To: <20150321005456.GC2379@kib.kiev.ua> Message-ID: <20150321205449.H1846@besplex.bde.org> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150320130216.GS2379@kib.kiev.ua> <20150321085923.U1046@besplex.bde.org> <20150321005456.GC2379@kib.kiev.ua> 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=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=3ZGx8h1vufiJ_GrstXAA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin , 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: Sat, 21 Mar 2015 11:04:23 -0000 On Sat, 21 Mar 2015, Konstantin Belousov wrote: > On Sat, Mar 21, 2015 at 09:42:51AM +1100, Bruce Evans wrote: >> On Fri, 20 Mar 2015, Konstantin Belousov wrote: >> >>> On Fri, Mar 20, 2015 at 10:27:06AM +0000, John Baldwin wrote: >>>> Author: jhb >>>> Date: Fri Mar 20 10:27:06 2015 >>>> New Revision: 280279 >>>> URL: https://svnweb.freebsd.org/changeset/base/280279 >>>> >>>> Log: >>>> Expand the bitcount* API to support 64-bit integers, plain ints and longs >>>> and create a "hidden" API that can be used in other system headers without >>>> adding namespace pollution. >>>> - If the POPCNT instruction is enabled at compile time, use >>>> __builtin_popcount*() to implement __bitcount*(), otherwise fall back >>>> to software implementations. >> >>> Are you aware of the Haswell errata HSD146 ? I see the described behaviour >> >> I wasn't. >> >>> on machines back to SandyBridge, but not on Nehalems. >>> HSD146. POPCNT Instruction May Take Longer to Execute Than Expected >>> Problem: POPCNT instruction execution with a 32 or 64 bit operand may be >>> delayed until previous non-dependent instructions have executed. >> >> If it only affects performance, then it is up to the compiler to fix it. > It affects performance on some cpu models. It is too wrong for compiler > to issue cpuid before popcnt. Always issuing xorl before popcnt, as > it is currently done by recent gcc, but not clang, is better, but still > I think it is up to the code author to decide. How does the unconditional use of popcntq (in inline asm that is called from amd64 pmap) even work? jhb's cleanups apparently missed this inline asm, while previous work should not have added it. This inline asm should never have existed, since compilers can generate the same code with less-incorrect configuration. Correct configuration would be messy. jhb's cleanups depend on a compiler predefine (__POPCNT__) to determine if the instruction can be used. But this definition is static and is usually wrong, since compilers default to plain amd64 which doesn't have the instruction. Dynamic configuration would have to use cpuid just to determine if the instruction exists. >>> Jilles noted that gcc head and 4.9.2 already provides a workaround by >>> xoring the dst register. I have some patch for amd64 pmap, see the end >>> of the message. I thought that that couldn't work since it uses the instruction unconditionally. But the old code already does that. >> IIRC, then patch never never uses asm, but intentionally uses the popcount >> builtin to avoid complications. popcntq() in amd64/include/cpufunc.h does use asm, but is missing the complications needed for when it the instruction is not available. All callers (just 3 in pmap) seem to be broken, since they are also missing the complications. There is also a naming problem. The asm API is named popcntq like the builtins, but the APIs in the cleanup are named *bitcount*. We couldn't decide whether the cleanup should rename them to match the builtins. >>>> - Use the existing bitcount16() and bitcount32() from to >>>> implement the non-POPCNT __bitcount16() and __bitcount32() in >>>> . >>> Why is it in sys/types.h ? >> >> To make it easier to use, while minimizing namespace pollution and >> inefficiencies. Like the functions used to implement ntohl(), except >> the implementation is MI so it doesn't need to be in . >> (The functions used to implement ntohl() are in machine/endian.h. >> sys/types.h always includes that, so it makes little difference to >> pollution and inefficiency that the implementation is not more directly >> in machine/_types.h.) bitcount is simpler and not burdened by >> compatibility, so it doesn't need a separate header.) > > Still, it is weird to provide functions from the sys/types.h namespace, > and even more weird to provide such special-purpose function. Not in the sys/types.h, but in the implementation namespace :-). Since no one should depend on the implementation details, we can move the details to a better place when one is known. Better places would be something like libkern for userland to hold a large collection of functions, and a Standard place for single functions. I expect the Standard place will be broken as designed for compatibility. Probably strings.h alongside ffs(). The special (inline/asm) functions are in sys/types.h on amd64 are currently limited to just 3 bswap functions and some new popcnt functions. Bruce From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 12:00:24 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 29E7BDE6; Sat, 21 Mar 2015 12:00:24 +0000 (UTC) Received: from mail-pd0-x229.google.com (mail-pd0-x229.google.com [IPv6:2607:f8b0:400e:c02::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E6B42D3C; Sat, 21 Mar 2015 12:00:23 +0000 (UTC) Received: by pdbcz9 with SMTP id cz9so134666177pdb.3; Sat, 21 Mar 2015 05:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=PQ4daqP7uSJqMmDG8Z0+WGwlUpAhLKGyF6ONdDzGqAQ=; b=Siyq0qn9XC8GzHn8Uh7qVoJK7iaK0wlLrqTIP3l5Oo2JxOLKvCNcy/wnhZb6kHtzXT bS4nDMAKthtzReE2M/mbMd3nzp9JmU1ShZXKeypPYujxwk/NnAxbespMSp/F/5hyUVvA f/ikXtuGxSsuTi0/iEgQSki92YTQyYOwREm6s7rZqiuM1s/x1zocGMaFcLlWO8QrNJhi wqcePiPfjHjeF6b+7wkZUBMn7un2QPAtzGGdirt956GPATawz/o9n0KFPZLayUk9zE9X 7mlk0OugBrspao1Jmej6GUPm6kWFJ1x5nnKsLAw2eitQfgh6w4zO4nhwF602gCvi5OLT yOSw== X-Received: by 10.66.253.101 with SMTP id zz5mr167161702pac.143.1426939223414; Sat, 21 Mar 2015 05:00:23 -0700 (PDT) Received: from [192.168.1.104] (ppp59-167-128-11.static.internode.on.net. [59.167.128.11]) by mx.google.com with ESMTPSA id rk5sm11450606pab.37.2015.03.21.05.00.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Mar 2015 05:00:22 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r280308 - head/sys/fs/devfs references: <201503210114.t2L1ECcB075556@svn.freebsd.org> To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org x-enigmail-draft-status: N1110 From: Kubilay Kocak message-id: <550D5D49.6020503@FreeBSD.org> Date: Sat, 21 Mar 2015 23:00:09 +1100 user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Thunderbird/37.0 mime-version: 1.0 in-reply-to: <201503210114.t2L1ECcB075556@svn.freebsd.org> 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: Sat, 21 Mar 2015 12:00:24 -0000 On 21/03/2015 12:14 PM, Xin LI wrote: > Author: delphij > Date: Sat Mar 21 01:14:11 2015 > New Revision: 280308 > URL: https://svnweb.freebsd.org/changeset/base/280308 > > Log: > Disable timestamping on devfs read/write operations by default. > > Currently we update timestamps unconditionally when doing read or > write operations. This may slow things down on hardware where > reading timestamps is expensive (e.g. HPET, because of the default > vfs.timestamp_precision setting is nanosecond now) with limited > benefit. > > A new sysctl variable, vfs.devfs.dotimes is added, which can be > set to non-zero value when the old behavior is desirable. Perhaps *devfs_timestamp_update* is a better name. thoughts? If something shorter is desired: devfs_ts_update might be ok, though I prefer the former. Let's not forget these are user visible system control knobs, not just code variables, though I do understand the desire to shorten them, and that we do have descriptions for them ... mostly :) koobs From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 14:23:28 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 BFE5495D; Sat, 21 Mar 2015 14:23:28 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60AC1C8B; Sat, 21 Mar 2015 14:23:28 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2LENI7T000238 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 21 Mar 2015 16:23:18 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2LENI7T000238 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2LENIci000237; Sat, 21 Mar 2015 16:23:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Mar 2015 16:23:18 +0200 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <20150321142318.GI2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150320130216.GS2379@kib.kiev.ua> <20150321085923.U1046@besplex.bde.org> <20150321005456.GC2379@kib.kiev.ua> <20150321205449.H1846@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150321205449.H1846@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 14:23:29 -0000 On Sat, Mar 21, 2015 at 09:33:22PM +1100, Bruce Evans wrote: > On Sat, 21 Mar 2015, Konstantin Belousov wrote: > How does the unconditional use of popcntq (in inline asm that is called > from amd64 pmap) even work? It is not unconditional. The pmap code does the following: if ((cpu_feature2 & CPUID2_POPCNT) == 0) { free = popcnt_pc_map_elem(pc->pc_map[0]); ... } else { free = popcntq(pc->pc_map[0]); ... } > > jhb's cleanups apparently missed this inline asm, while previous work > should not have added it. This inline asm should never have existed, > since compilers can generate the same code with less-incorrect > configuration. Correct configuration would be messy. jhb's cleanups > depend on a compiler predefine (__POPCNT__) to determine if the > instruction can be used. But this definition is static and is usually > wrong, since compilers default to plain amd64 which doesn't have the > instruction. Dynamic configuration would have to use cpuid just to > determine if the instruction exists. Exactly, this is what supposed to be done, and is done in the pmap. It is fine for somebody targeting specific machine to change -march, but it cannot be used to optimize the generic kernel which is shipped. > > >>> Jilles noted that gcc head and 4.9.2 already provides a workaround by > >>> xoring the dst register. I have some patch for amd64 pmap, see the end > >>> of the message. > > I thought that that couldn't work since it uses the instruction > unconditionally. But the old code already does that. > > >> IIRC, then patch never never uses asm, but intentionally uses the popcount > >> builtin to avoid complications. > > popcntq() in amd64/include/cpufunc.h does use asm, but is missing the > complications needed for when it the instruction is not available. > All callers (just 3 in pmap) seem to be broken, since they are also > missing the complications. See above. > > Still, it is weird to provide functions from the sys/types.h namespace, > > and even more weird to provide such special-purpose function. > > Not in the sys/types.h, but in the implementation namespace :-). Since > no one should depend on the implementation details, we can move the > details to a better place when one is known. Better places would be > something like libkern for userland to hold a large collection of > functions, and a Standard place for single functions. I expect the > Standard place will be broken as designed for compatibility. Probably > strings.h alongside ffs(). strings.h sounds less surprising than sys/types.h > > The special (inline/asm) functions are in sys/types.h on amd64 are > currently limited to just 3 bswap functions and some new popcnt functions. From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 14:27:43 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 C9A50AB4; Sat, 21 Mar 2015 14:27:43 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38231CA3; Sat, 21 Mar 2015 14:27:43 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2LERcQU001456 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 21 Mar 2015 16:27:38 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2LERcQU001456 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2LERcF8001455; Sat, 21 Mar 2015 16:27:38 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Mar 2015 16:27:38 +0200 From: Konstantin Belousov To: Kubilay Kocak Subject: Re: svn commit: r280308 - head/sys/fs/devfs Message-ID: <20150321142737.GJ2379@kib.kiev.ua> References: <201503210114.t2L1ECcB075556@svn.freebsd.org> <550D5D49.6020503@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <550D5D49.6020503@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI 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: Sat, 21 Mar 2015 14:27:43 -0000 On Sat, Mar 21, 2015 at 11:00:09PM +1100, Kubilay Kocak wrote: > On 21/03/2015 12:14 PM, Xin LI wrote: > > Author: delphij > > Date: Sat Mar 21 01:14:11 2015 > > New Revision: 280308 > > URL: https://svnweb.freebsd.org/changeset/base/280308 > > > > Log: > > Disable timestamping on devfs read/write operations by default. > > > > Currently we update timestamps unconditionally when doing read or > > write operations. This may slow things down on hardware where > > reading timestamps is expensive (e.g. HPET, because of the default > > vfs.timestamp_precision setting is nanosecond now) with limited > > benefit. > > > > A new sysctl variable, vfs.devfs.dotimes is added, which can be > > set to non-zero value when the old behavior is desirable. > > Perhaps *devfs_timestamp_update* is a better name. thoughts? > > If something shorter is desired: devfs_ts_update might be ok, though I > prefer the former. > > Let's not forget these are user visible system control knobs, not just > code variables, though I do understand the desire to shorten them, and > that we do have descriptions for them ... mostly :) should it be vfs.devfs.devfs_ts_devfs_ts_devfs_update_devfs so that user is _absolutely_ sure that it is devfs related, if 'devfs' used only one time in the MIB prevents him from realizing this ? From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 15:01:20 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 A366B231; Sat, 21 Mar 2015 15:01:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E658FE0; Sat, 21 Mar 2015 15:01:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2LF1Kl6052543; Sat, 21 Mar 2015 15:01:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LF1Kj8052521; Sat, 21 Mar 2015 15:01:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503211501.t2LF1Kj8052521@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 21 Mar 2015 15:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280323 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 15:01:20 -0000 Author: kib Date: Sat Mar 21 15:01:19 2015 New Revision: 280323 URL: https://svnweb.freebsd.org/changeset/base/280323 Log: Somewhat modernize the SysV shm code: - Use real locking, replace Giant with global sx protecting the subsystem. Since the subsystem' lock is no longer dropped during the sleepsk, remove not needed SHMSEG_WANTED segment flag, and revert r278963. - To do proper code simplification possible after the change of the lock, restructure several functions into _locked body and originally-named wrapper which calls into _locked variant. This allows to eliminate the 'goto done2' spread over the code. - Merge shm_find_segment_by_shmid() and shm_find_segment_by_shmidx(). - Consistently change all function prototypes to ANSI C. Reviewed by: mjg (who has earlier version of the similar patch to introduce real locking) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Sat Mar 21 09:45:45 2015 (r280322) +++ head/sys/kern/sysv_shm.c Sat Mar 21 15:01:19 2015 (r280323) @@ -109,7 +109,6 @@ static int shmget_existing(struct thread #define SHMSEG_FREE 0x0200 #define SHMSEG_REMOVED 0x0400 #define SHMSEG_ALLOCATED 0x0800 -#define SHMSEG_WANTED 0x1000 static int shm_last_free, shm_nused, shmalloced; vm_size_t shm_committed; @@ -122,8 +121,7 @@ struct shmmap_state { static void shm_deallocate_segment(struct shmid_kernel *); static int shm_find_segment_by_key(key_t); -static struct shmid_kernel *shm_find_segment_by_shmid(int); -static struct shmid_kernel *shm_find_segment_by_shmidx(int); +static struct shmid_kernel *shm_find_segment(int, bool); static int shm_delete_mapping(struct vmspace *vm, struct shmmap_state *); static void shmrealloc(void); static int shminit(void); @@ -181,13 +179,17 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, shm_use_ SYSCTL_INT(_kern_ipc, OID_AUTO, shm_allow_removed, CTLFLAG_RWTUN, &shm_allow_removed, 0, "Enable/Disable attachment to attached segments marked for removal"); -SYSCTL_PROC(_kern_ipc, OID_AUTO, shmsegs, CTLTYPE_OPAQUE | CTLFLAG_RD, - NULL, 0, sysctl_shmsegs, "", +SYSCTL_PROC(_kern_ipc, OID_AUTO, shmsegs, CTLTYPE_OPAQUE | CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, 0, sysctl_shmsegs, "", "Current number of shared memory segments allocated"); +static struct sx sysvshmsx; +#define SYSVSHM_LOCK() sx_xlock(&sysvshmsx) +#define SYSVSHM_UNLOCK() sx_xunlock(&sysvshmsx) +#define SYSVSHM_ASSERT_LOCKED() sx_assert(&sysvshmsx, SA_XLOCKED) + static int -shm_find_segment_by_key(key) - key_t key; +shm_find_segment_by_key(key_t key) { int i; @@ -198,46 +200,34 @@ shm_find_segment_by_key(key) return (-1); } +/* + * Finds segment either by shmid if is_shmid is true, or by segnum if + * is_shmid is false. + */ static struct shmid_kernel * -shm_find_segment_by_shmid(int shmid) +shm_find_segment(int arg, bool is_shmid) { - int segnum; struct shmid_kernel *shmseg; + int segnum; - segnum = IPCID_TO_IX(shmid); + segnum = is_shmid ? IPCID_TO_IX(arg) : arg; if (segnum < 0 || segnum >= shmalloced) return (NULL); shmseg = &shmsegs[segnum]; if ((shmseg->u.shm_perm.mode & SHMSEG_ALLOCATED) == 0 || (!shm_allow_removed && (shmseg->u.shm_perm.mode & SHMSEG_REMOVED) != 0) || - shmseg->u.shm_perm.seq != IPCID_TO_SEQ(shmid)) - return (NULL); - return (shmseg); -} - -static struct shmid_kernel * -shm_find_segment_by_shmidx(int segnum) -{ - struct shmid_kernel *shmseg; - - if (segnum < 0 || segnum >= shmalloced) - return (NULL); - shmseg = &shmsegs[segnum]; - if ((shmseg->u.shm_perm.mode & SHMSEG_ALLOCATED) == 0 || - (!shm_allow_removed && - (shmseg->u.shm_perm.mode & SHMSEG_REMOVED) != 0)) + (is_shmid && shmseg->u.shm_perm.seq != IPCID_TO_SEQ(arg))) return (NULL); return (shmseg); } static void -shm_deallocate_segment(shmseg) - struct shmid_kernel *shmseg; +shm_deallocate_segment(struct shmid_kernel *shmseg) { vm_size_t size; - GIANT_REQUIRED; + SYSVSHM_ASSERT_LOCKED(); vm_object_deallocate(shmseg->object); shmseg->object = NULL; @@ -261,9 +251,11 @@ shm_delete_mapping(struct vmspace *vm, s int segnum, result; vm_size_t size; - GIANT_REQUIRED; - + SYSVSHM_ASSERT_LOCKED(); segnum = IPCID_TO_IX(shmmap_s->shmid); + KASSERT(segnum >= 0 && segnum < shmalloced, + ("segnum %d shmalloced %d", segnum, shmalloced)); + shmseg = &shmsegs[segnum]; size = round_page(shmseg->u.shm_segsz); result = vm_map_remove(&vm->vm_map, shmmap_s->va, shmmap_s->va + size); @@ -279,138 +271,110 @@ shm_delete_mapping(struct vmspace *vm, s return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct shmdt_args { - const void *shmaddr; -}; -#endif -int -sys_shmdt(td, uap) - struct thread *td; - struct shmdt_args *uap; +static int +kern_shmdt_locked(struct thread *td, const void *shmaddr) { struct proc *p = td->td_proc; struct shmmap_state *shmmap_s; #ifdef MAC struct shmid_kernel *shmsegptr; #endif - int i; - int error = 0; + int error, i; + SYSVSHM_ASSERT_LOCKED(); if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - mtx_lock(&Giant); shmmap_s = p->p_vmspace->vm_shm; - if (shmmap_s == NULL) { - error = EINVAL; - goto done2; - } + if (shmmap_s == NULL) + return (EINVAL); for (i = 0; i < shminfo.shmseg; i++, shmmap_s++) { if (shmmap_s->shmid != -1 && - shmmap_s->va == (vm_offset_t)uap->shmaddr) { + shmmap_s->va == (vm_offset_t)shmaddr) { break; } } - if (i == shminfo.shmseg) { - error = EINVAL; - goto done2; - } + if (i == shminfo.shmseg) + return (EINVAL); #ifdef MAC shmsegptr = &shmsegs[IPCID_TO_IX(shmmap_s->shmid)]; error = mac_sysvshm_check_shmdt(td->td_ucred, shmsegptr); if (error != 0) - goto done2; + return (error); #endif error = shm_delete_mapping(p->p_vmspace, shmmap_s); -done2: - mtx_unlock(&Giant); return (error); } #ifndef _SYS_SYSPROTO_H_ -struct shmat_args { - int shmid; +struct shmdt_args { const void *shmaddr; - int shmflg; }; #endif int -kern_shmat(td, shmid, shmaddr, shmflg) - struct thread *td; - int shmid; - const void *shmaddr; - int shmflg; +sys_shmdt(struct thread *td, struct shmdt_args *uap) +{ + int error; + + SYSVSHM_LOCK(); + error = kern_shmdt_locked(td, uap->shmaddr); + SYSVSHM_UNLOCK(); + return (error); +} + +static int +kern_shmat_locked(struct thread *td, int shmid, const void *shmaddr, + int shmflg) { struct proc *p = td->td_proc; - int i; struct shmid_kernel *shmseg; struct shmmap_state *shmmap_s = NULL; vm_offset_t attach_va; vm_prot_t prot; vm_size_t size; - int rv; - int error = 0; + int error, i, rv; + SYSVSHM_ASSERT_LOCKED(); if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - mtx_lock(&Giant); shmmap_s = p->p_vmspace->vm_shm; if (shmmap_s == NULL) { shmmap_s = malloc(shminfo.shmseg * sizeof(struct shmmap_state), M_SHM, M_WAITOK); - - /* - * If malloc() above sleeps, the Giant lock is - * temporarily dropped, which allows another thread to - * allocate shmmap_state and set vm_shm. Recheck - * vm_shm and free the new shmmap_state if another one - * is already allocated. - */ - if (p->p_vmspace->vm_shm != NULL) { - free(shmmap_s, M_SHM); - shmmap_s = p->p_vmspace->vm_shm; - } else { - for (i = 0; i < shminfo.shmseg; i++) - shmmap_s[i].shmid = -1; - p->p_vmspace->vm_shm = shmmap_s; - } - } - shmseg = shm_find_segment_by_shmid(shmid); - if (shmseg == NULL) { - error = EINVAL; - goto done2; + for (i = 0; i < shminfo.shmseg; i++) + shmmap_s[i].shmid = -1; + KASSERT(p->p_vmspace->vm_shm == NULL, ("raced")); + p->p_vmspace->vm_shm = shmmap_s; } + shmseg = shm_find_segment(shmid, true); + if (shmseg == NULL) + return (EINVAL); error = ipcperm(td, &shmseg->u.shm_perm, (shmflg & SHM_RDONLY) ? IPC_R : IPC_R|IPC_W); - if (error) - goto done2; + if (error != 0) + return (error); #ifdef MAC error = mac_sysvshm_check_shmat(td->td_ucred, shmseg, shmflg); if (error != 0) - goto done2; + return (error); #endif for (i = 0; i < shminfo.shmseg; i++) { if (shmmap_s->shmid == -1) break; shmmap_s++; } - if (i >= shminfo.shmseg) { - error = EMFILE; - goto done2; - } + if (i >= shminfo.shmseg) + return (EMFILE); size = round_page(shmseg->u.shm_segsz); prot = VM_PROT_READ; if ((shmflg & SHM_RDONLY) == 0) prot |= VM_PROT_WRITE; - if (shmaddr) { - if (shmflg & SHM_RND) { + if (shmaddr != NULL) { + if ((shmflg & SHM_RND) != 0) attach_va = (vm_offset_t)shmaddr & ~(SHMLBA-1); - } else if (((vm_offset_t)shmaddr & (SHMLBA-1)) == 0) { + else if (((vm_offset_t)shmaddr & (SHMLBA-1)) == 0) attach_va = (vm_offset_t)shmaddr; - } else { - error = EINVAL; - goto done2; - } + else + return (EINVAL); } else { /* * This is just a hint to vm_map_find() about where to @@ -428,8 +392,7 @@ kern_shmat(td, shmid, shmaddr, shmflg) prot, prot, MAP_INHERIT_SHARE | MAP_PREFAULT_PARTIAL); if (rv != KERN_SUCCESS) { vm_object_deallocate(shmseg->object); - error = ENOMEM; - goto done2; + return (ENOMEM); } shmmap_s->va = attach_va; @@ -438,34 +401,49 @@ kern_shmat(td, shmid, shmaddr, shmflg) shmseg->u.shm_atime = time_second; shmseg->u.shm_nattch++; td->td_retval[0] = attach_va; -done2: - mtx_unlock(&Giant); return (error); } int -sys_shmat(td, uap) - struct thread *td; - struct shmat_args *uap; +kern_shmat(struct thread *td, int shmid, const void *shmaddr, int shmflg) { - return kern_shmat(td, uap->shmid, uap->shmaddr, uap->shmflg); + int error; + + SYSVSHM_LOCK(); + error = kern_shmat_locked(td, shmid, shmaddr, shmflg); + SYSVSHM_UNLOCK(); + return (error); } -int -kern_shmctl(td, shmid, cmd, buf, bufsz) - struct thread *td; +#ifndef _SYS_SYSPROTO_H_ +struct shmat_args { int shmid; - int cmd; - void *buf; - size_t *bufsz; + const void *shmaddr; + int shmflg; +}; +#endif +int +sys_shmat(struct thread *td, struct shmat_args *uap) +{ + + return (kern_shmat(td, uap->shmid, uap->shmaddr, uap->shmflg)); +} + +static int +kern_shmctl_locked(struct thread *td, int shmid, int cmd, void *buf, + size_t *bufsz) { - int error = 0; struct shmid_kernel *shmseg; + struct shmid_ds *shmidp; + struct shm_info shm_info; + int error; + + SYSVSHM_ASSERT_LOCKED(); if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - mtx_lock(&Giant); + error = 0; switch (cmd) { /* * It is possible that kern_shmctl is being called from the Linux ABI @@ -481,9 +459,8 @@ kern_shmctl(td, shmid, cmd, buf, bufsz) if (bufsz) *bufsz = sizeof(shminfo); td->td_retval[0] = shmalloced; - goto done2; + return (0); case SHM_INFO: { - struct shm_info shm_info; shm_info.used_ids = shm_nused; shm_info.shm_rss = 0; /*XXX where to get from ? */ shm_info.shm_tot = 0; /*XXX where to get from ? */ @@ -491,56 +468,50 @@ kern_shmctl(td, shmid, cmd, buf, bufsz) shm_info.swap_attempts = 0; /*XXX where to get from ? */ shm_info.swap_successes = 0; /*XXX where to get from ? */ memcpy(buf, &shm_info, sizeof(shm_info)); - if (bufsz) + if (bufsz != NULL) *bufsz = sizeof(shm_info); td->td_retval[0] = shmalloced; - goto done2; - } + return (0); } - if (cmd == SHM_STAT) - shmseg = shm_find_segment_by_shmidx(shmid); - else - shmseg = shm_find_segment_by_shmid(shmid); - if (shmseg == NULL) { - error = EINVAL; - goto done2; } + shmseg = shm_find_segment(shmid, cmd != SHM_STAT); + if (shmseg == NULL) + return (EINVAL); #ifdef MAC error = mac_sysvshm_check_shmctl(td->td_ucred, shmseg, cmd); if (error != 0) - goto done2; + return (error); #endif switch (cmd) { case SHM_STAT: case IPC_STAT: error = ipcperm(td, &shmseg->u.shm_perm, IPC_R); - if (error) - goto done2; + if (error != 0) + return (error); memcpy(buf, &shmseg->u, sizeof(struct shmid_ds)); - if (bufsz) + if (bufsz != NULL) *bufsz = sizeof(struct shmid_ds); - if (cmd == SHM_STAT) - td->td_retval[0] = IXSEQ_TO_IPCID(shmid, shmseg->u.shm_perm); + if (cmd == SHM_STAT) { + td->td_retval[0] = IXSEQ_TO_IPCID(shmid, + shmseg->u.shm_perm); + } break; - case IPC_SET: { - struct shmid_ds *shmid; - - shmid = (struct shmid_ds *)buf; + case IPC_SET: + shmidp = (struct shmid_ds *)buf; error = ipcperm(td, &shmseg->u.shm_perm, IPC_M); - if (error) - goto done2; - shmseg->u.shm_perm.uid = shmid->shm_perm.uid; - shmseg->u.shm_perm.gid = shmid->shm_perm.gid; + if (error != 0) + return (error); + shmseg->u.shm_perm.uid = shmidp->shm_perm.uid; + shmseg->u.shm_perm.gid = shmidp->shm_perm.gid; shmseg->u.shm_perm.mode = (shmseg->u.shm_perm.mode & ~ACCESSPERMS) | - (shmid->shm_perm.mode & ACCESSPERMS); + (shmidp->shm_perm.mode & ACCESSPERMS); shmseg->u.shm_ctime = time_second; break; - } case IPC_RMID: error = ipcperm(td, &shmseg->u.shm_perm, IPC_M); - if (error) - goto done2; + if (error != 0) + return (error); shmseg->u.shm_perm.key = IPC_PRIVATE; shmseg->u.shm_perm.mode |= SHMSEG_REMOVED; if (shmseg->u.shm_nattch <= 0) { @@ -556,11 +527,21 @@ kern_shmctl(td, shmid, cmd, buf, bufsz) error = EINVAL; break; } -done2: - mtx_unlock(&Giant); return (error); } +int +kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, size_t *bufsz) +{ + int error; + + SYSVSHM_LOCK(); + error = kern_shmctl_locked(td, shmid, cmd, buf, bufsz); + SYSVSHM_UNLOCK(); + return (error); +} + + #ifndef _SYS_SYSPROTO_H_ struct shmctl_args { int shmid; @@ -569,9 +550,7 @@ struct shmctl_args { }; #endif int -sys_shmctl(td, uap) - struct thread *td; - struct shmctl_args *uap; +sys_shmctl(struct thread *td, struct shmctl_args *uap) { int error = 0; struct shmid_ds buf; @@ -613,28 +592,16 @@ done: static int -shmget_existing(td, uap, mode, segnum) - struct thread *td; - struct shmget_args *uap; - int mode; - int segnum; +shmget_existing(struct thread *td, struct shmget_args *uap, int mode, + int segnum) { struct shmid_kernel *shmseg; int error; + SYSVSHM_ASSERT_LOCKED(); + KASSERT(segnum >= 0 && segnum < shmalloced, + ("segnum %d shmalloced %d", segnum, shmalloced)); shmseg = &shmsegs[segnum]; - if (shmseg->u.shm_perm.mode & SHMSEG_REMOVED) { - /* - * This segment is in the process of being allocated. Wait - * until it's done, and look the key up again (in case the - * allocation failed or it was freed). - */ - shmseg->u.shm_perm.mode |= SHMSEG_WANTED; - error = tsleep(shmseg, PLOCK | PCATCH, "shmget", 0); - if (error) - return (error); - return (EAGAIN); - } if ((uap->shmflg & (IPC_CREAT | IPC_EXCL)) == (IPC_CREAT | IPC_EXCL)) return (EEXIST); #ifdef MAC @@ -649,18 +616,15 @@ shmget_existing(td, uap, mode, segnum) } static int -shmget_allocate_segment(td, uap, mode) - struct thread *td; - struct shmget_args *uap; - int mode; +shmget_allocate_segment(struct thread *td, struct shmget_args *uap, int mode) { - int i, segnum, shmid; - size_t size; struct ucred *cred = td->td_ucred; struct shmid_kernel *shmseg; vm_object_t shm_object; + int i, segnum; + size_t size; - GIANT_REQUIRED; + SYSVSHM_ASSERT_LOCKED(); if (uap->size < shminfo.shmmin || uap->size > shminfo.shmmax) return (EINVAL); @@ -681,6 +645,8 @@ shmget_allocate_segment(td, uap, mode) segnum = shm_last_free; shm_last_free = -1; } + KASSERT(segnum >= 0 && segnum < shmalloced, + ("segnum %d shmalloced %d", segnum, shmalloced)); shmseg = &shmsegs[segnum]; #ifdef RACCT PROC_LOCK(td->td_proc); @@ -695,15 +661,7 @@ shmget_allocate_segment(td, uap, mode) } PROC_UNLOCK(td->td_proc); #endif - /* - * In case we sleep in malloc(), mark the segment present but deleted - * so that noone else tries to create the same key. - */ - shmseg->u.shm_perm.mode = SHMSEG_ALLOCATED | SHMSEG_REMOVED; - shmseg->u.shm_perm.key = uap->key; - shmseg->u.shm_perm.seq = (shmseg->u.shm_perm.seq + 1) & 0x7fff; - shmid = IXSEQ_TO_IPCID(segnum, shmseg->u.shm_perm); - + /* * We make sure that we have allocated a pager before we need * to. @@ -728,8 +686,9 @@ shmget_allocate_segment(td, uap, mode) shmseg->object = shm_object; shmseg->u.shm_perm.cuid = shmseg->u.shm_perm.uid = cred->cr_uid; shmseg->u.shm_perm.cgid = shmseg->u.shm_perm.gid = cred->cr_gid; - shmseg->u.shm_perm.mode = (shmseg->u.shm_perm.mode & SHMSEG_WANTED) | - (mode & ACCESSPERMS) | SHMSEG_ALLOCATED; + shmseg->u.shm_perm.mode = (mode & ACCESSPERMS) | SHMSEG_ALLOCATED; + shmseg->u.shm_perm.key = uap->key; + shmseg->u.shm_perm.seq = (shmseg->u.shm_perm.seq + 1) & 0x7fff; shmseg->cred = crhold(cred); shmseg->u.shm_segsz = uap->size; shmseg->u.shm_cpid = td->td_proc->p_pid; @@ -741,15 +700,8 @@ shmget_allocate_segment(td, uap, mode) shmseg->u.shm_ctime = time_second; shm_committed += btoc(size); shm_nused++; - if (shmseg->u.shm_perm.mode & SHMSEG_WANTED) { - /* - * Somebody else wanted this key while we were asleep. Wake - * them up now. - */ - shmseg->u.shm_perm.mode &= ~SHMSEG_WANTED; - wakeup(shmseg); - } - td->td_retval[0] = shmid; + td->td_retval[0] = IXSEQ_TO_IPCID(segnum, shmseg->u.shm_perm); + return (0); } @@ -761,54 +713,52 @@ struct shmget_args { }; #endif int -sys_shmget(td, uap) - struct thread *td; - struct shmget_args *uap; +sys_shmget(struct thread *td, struct shmget_args *uap) { int segnum, mode; int error; if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - mtx_lock(&Giant); mode = uap->shmflg & ACCESSPERMS; - if (uap->key != IPC_PRIVATE) { - again: + SYSVSHM_LOCK(); + if (uap->key == IPC_PRIVATE) { + error = shmget_allocate_segment(td, uap, mode); + } else { segnum = shm_find_segment_by_key(uap->key); - if (segnum >= 0) { + if (segnum >= 0) error = shmget_existing(td, uap, mode, segnum); - if (error == EAGAIN) - goto again; - goto done2; - } - if ((uap->shmflg & IPC_CREAT) == 0) { + else if ((uap->shmflg & IPC_CREAT) == 0) error = ENOENT; - goto done2; - } + else + error = shmget_allocate_segment(td, uap, mode); } - error = shmget_allocate_segment(td, uap, mode); -done2: - mtx_unlock(&Giant); + SYSVSHM_UNLOCK(); return (error); } static void -shmfork_myhook(p1, p2) - struct proc *p1, *p2; +shmfork_myhook(struct proc *p1, struct proc *p2) { struct shmmap_state *shmmap_s; size_t size; int i; - mtx_lock(&Giant); + SYSVSHM_LOCK(); size = shminfo.shmseg * sizeof(struct shmmap_state); shmmap_s = malloc(size, M_SHM, M_WAITOK); bcopy(p1->p_vmspace->vm_shm, shmmap_s, size); p2->p_vmspace->vm_shm = shmmap_s; - for (i = 0; i < shminfo.shmseg; i++, shmmap_s++) - if (shmmap_s->shmid != -1) + for (i = 0; i < shminfo.shmseg; i++, shmmap_s++) { + if (shmmap_s->shmid != -1) { + KASSERT(IPCID_TO_IX(shmmap_s->shmid) >= 0 && + IPCID_TO_IX(shmmap_s->shmid) < shmalloced, + ("segnum %d shmalloced %d", + IPCID_TO_IX(shmmap_s->shmid), shmalloced)); shmsegs[IPCID_TO_IX(shmmap_s->shmid)].u.shm_nattch++; - mtx_unlock(&Giant); + } + } + SYSVSHM_UNLOCK(); } static void @@ -817,14 +767,15 @@ shmexit_myhook(struct vmspace *vm) struct shmmap_state *base, *shm; int i; - if ((base = vm->vm_shm) != NULL) { + base = vm->vm_shm; + if (base != NULL) { vm->vm_shm = NULL; - mtx_lock(&Giant); + SYSVSHM_LOCK(); for (i = 0, shm = base; i < shminfo.shmseg; i++, shm++) { if (shm->shmid != -1) shm_delete_mapping(vm, shm); } - mtx_unlock(&Giant); + SYSVSHM_UNLOCK(); free(base, M_SHM); } } @@ -832,8 +783,10 @@ shmexit_myhook(struct vmspace *vm) static void shmrealloc(void) { - int i; struct shmid_kernel *newsegs; + int i; + + SYSVSHM_ASSERT_LOCKED(); if (shmalloced >= shminfo.shmmni) return; @@ -891,7 +844,7 @@ static struct syscall_helper_data shm32_ #endif static int -shminit() +shminit(void) { int i, error; @@ -919,6 +872,7 @@ shminit() shm_last_free = 0; shm_nused = 0; shm_committed = 0; + sx_init(&sysvshmsx, "sysvshmsx"); shmexit_hook = &shmexit_myhook; shmfork_hook = &shmfork_myhook; @@ -934,7 +888,7 @@ shminit() } static int -shmunload() +shmunload(void) { int i; @@ -961,14 +915,19 @@ shmunload() free(shmsegs, M_SHM); shmexit_hook = NULL; shmfork_hook = NULL; + sx_destroy(&sysvshmsx); return (0); } static int sysctl_shmsegs(SYSCTL_HANDLER_ARGS) { + int error; - return (SYSCTL_OUT(req, shmsegs, shmalloced * sizeof(shmsegs[0]))); + SYSVSHM_LOCK(); + error = SYSCTL_OUT(req, shmsegs, shmalloced * sizeof(shmsegs[0])); + SYSVSHM_UNLOCK(); + return (error); } #if defined(__i386__) && (defined(COMPAT_FREEBSD4) || defined(COMPAT_43)) @@ -1000,21 +959,22 @@ oshmctl(struct thread *td, struct oshmct if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - mtx_lock(&Giant); - shmseg = shm_find_segment_by_shmid(uap->shmid); + SYSVSHM_LOCK(); + shmseg = shm_find_segment(uap->shmid, true); if (shmseg == NULL) { - error = EINVAL; - goto done2; + SYSVSHM_UNLOCK(); + return (error); } switch (uap->cmd) { case IPC_STAT: error = ipcperm(td, &shmseg->u.shm_perm, IPC_R); - if (error) - goto done2; + if (error != 0) + break; #ifdef MAC - error = mac_sysvshm_check_shmctl(td->td_ucred, shmseg, uap->cmd); + error = mac_sysvshm_check_shmctl(td->td_ucred, shmseg, + uap->cmd); if (error != 0) - goto done2; + break; #endif ipcperm_new2old(&shmseg->u.shm_perm, &outbuf.shm_perm); outbuf.shm_segsz = shmseg->u.shm_segsz; @@ -1026,15 +986,12 @@ oshmctl(struct thread *td, struct oshmct outbuf.shm_ctime = shmseg->u.shm_ctime; outbuf.shm_handle = shmseg->object; error = copyout(&outbuf, uap->ubuf, sizeof(outbuf)); - if (error) - goto done2; break; default: error = freebsd7_shmctl(td, (struct freebsd7_shmctl_args *)uap); break; } -done2: - mtx_unlock(&Giant); + SYSVSHM_UNLOCK(); return (error); #else return (EINVAL); @@ -1048,27 +1005,27 @@ static sy_call_t *shmcalls[] = { (sy_call_t *)freebsd7_shmctl }; +#ifndef _SYS_SYSPROTO_H_ +/* XXX actually varargs. */ +struct shmsys_args { + int which; + int a2; + int a3; + int a4; +}; +#endif int -sys_shmsys(td, uap) - struct thread *td; - /* XXX actually varargs. */ - struct shmsys_args /* { - int which; - int a2; - int a3; - int a4; - } */ *uap; +sys_shmsys(struct thread *td, struct shmsys_args *uap) { int error; if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); - if (uap->which < 0 || - uap->which >= sizeof(shmcalls)/sizeof(shmcalls[0])) + if (uap->which < 0 || uap->which >= nitems(shmcalls)) return (EINVAL); - mtx_lock(&Giant); + SYSVSHM_LOCK(); error = (*shmcalls[uap->which])(td, &uap->a2); - mtx_unlock(&Giant); + SYSVSHM_UNLOCK(); return (error); } @@ -1309,9 +1266,7 @@ struct freebsd7_shmctl_args { }; #endif int -freebsd7_shmctl(td, uap) - struct thread *td; - struct freebsd7_shmctl_args *uap; +freebsd7_shmctl(struct thread *td, struct freebsd7_shmctl_args *uap) { int error = 0; struct shmid_ds_old old; From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 15:33:01 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 4FF37DBF; Sat, 21 Mar 2015 15:33:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3271F305; Sat, 21 Mar 2015 15:33:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2LFX096069040; Sat, 21 Mar 2015 15:33:00 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LFX0ZD069036; Sat, 21 Mar 2015 15:33:00 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201503211533.t2LFX0ZD069036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sat, 21 Mar 2015 15:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280324 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 15:33:01 -0000 Author: cognet Date: Sat Mar 21 15:32:59 2015 New Revision: 280324 URL: https://svnweb.freebsd.org/changeset/base/280324 Log: When waiting on PTE allocation, another thread could free the l2_dtable while we're not looking at it. Fix this by increasing l2->l2_occupancy before we try to alloc (and decrease it if the allocation failed, or if another thread did a similar allocation). Submitted by: Kohji Okuno MFC after: 1 week Modified: head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat Mar 21 15:01:19 2015 (r280323) +++ head/sys/arm/arm/pmap-v6.c Sat Mar 21 15:32:59 2015 (r280324) @@ -758,6 +758,7 @@ pmap_alloc_l2_bucket(pmap_t pmap, vm_off * No L2 page table has been allocated. Chances are, this * is because we just allocated the l2_dtable, above. */ + l2->l2_occupancy++; PMAP_UNLOCK(pmap); rw_wunlock(&pvh_global_lock); ptep = uma_zalloc(l2zone, M_NOWAIT); @@ -765,6 +766,7 @@ pmap_alloc_l2_bucket(pmap_t pmap, vm_off PMAP_LOCK(pmap); if (l2b->l2b_kva != 0) { /* We lost the race. */ + l2->l2_occupancy--; uma_zfree(l2zone, ptep); return (l2b); } @@ -775,6 +777,7 @@ pmap_alloc_l2_bucket(pmap_t pmap, vm_off * time. We may need to deallocate the l2_dtable * if we allocated a new one above. */ + l2->l2_occupancy--; if (l2->l2_occupancy == 0) { pmap->pm_l2[L2_IDX(l1idx)] = NULL; uma_zfree(l2table_zone, l2); @@ -782,7 +785,6 @@ pmap_alloc_l2_bucket(pmap_t pmap, vm_off return (NULL); } - l2->l2_occupancy++; l2b->l2b_kva = ptep; l2b->l2b_l1idx = l1idx; } Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Sat Mar 21 15:01:19 2015 (r280323) +++ head/sys/arm/arm/pmap.c Sat Mar 21 15:32:59 2015 (r280324) @@ -878,6 +878,7 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse * No L2 page table has been allocated. Chances are, this * is because we just allocated the l2_dtable, above. */ + l2->l2_occupancy++; PMAP_UNLOCK(pm); rw_wunlock(&pvh_global_lock); ptep = uma_zalloc(l2zone, M_NOWAIT); @@ -885,6 +886,7 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse PMAP_LOCK(pm); if (l2b->l2b_kva != 0) { /* We lost the race. */ + l2->l2_occupancy--; uma_zfree(l2zone, ptep); return (l2b); } @@ -895,6 +897,7 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse * time. We may need to deallocate the l2_dtable * if we allocated a new one above. */ + l2->l2_occupancy--; if (l2->l2_occupancy == 0) { pm->pm_l2[L2_IDX(l1idx)] = NULL; uma_zfree(l2table_zone, l2); @@ -902,7 +905,6 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse return (NULL); } - l2->l2_occupancy++; l2b->l2b_kva = ptep; l2b->l2b_l1idx = l1idx; } From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 16:04:40 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 67FF179A; Sat, 21 Mar 2015 16:04:40 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F8FA813; Sat, 21 Mar 2015 16:04:40 +0000 (UTC) Received: from John-Baldwins-MacBook-Pro.local (d-69-161-105-82.cpe.metrocast.net [69.161.105.82]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 38547B946; Sat, 21 Mar 2015 12:04:39 -0400 (EDT) Message-ID: <550D9699.7070703@FreeBSD.org> Date: Sat, 21 Mar 2015 12:04:41 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r280279 - head/sys/sys References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150320130216.GS2379@kib.kiev.ua> In-Reply-To: <20150320130216.GS2379@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 21 Mar 2015 12:04:39 -0400 (EDT) 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: Sat, 21 Mar 2015 16:04:40 -0000 On 3/20/15 9:02 AM, Konstantin Belousov wrote: > On Fri, Mar 20, 2015 at 10:27:06AM +0000, John Baldwin wrote: >> Author: jhb >> Date: Fri Mar 20 10:27:06 2015 >> New Revision: 280279 >> URL: https://svnweb.freebsd.org/changeset/base/280279 >> >> Log: >> Expand the bitcount* API to support 64-bit integers, plain ints and longs >> and create a "hidden" API that can be used in other system headers without >> adding namespace pollution. >> - If the POPCNT instruction is enabled at compile time, use >> __builtin_popcount*() to implement __bitcount*(), otherwise fall back >> to software implementations. > Are you aware of the Haswell errata HSD146 ? I see the described behaviour > on machines back to SandyBridge, but not on Nehalems. > HSD146. POPCNT Instruction May Take Longer to Execute Than Expected > Problem: POPCNT instruction execution with a 32 or 64 bit operand may be > delayed until previous non-dependent instructions have executed. > > Jilles noted that gcc head and 4.9.2 already provides a workaround by > xoring the dst register. I have some patch for amd64 pmap, see the end > of the message. No, I was not aware, but I think it's hard to fix this anywhere but the compiler. I set CPUTYPE in src.conf on my Ivy Bridge desktop and clang uses POPCOUNT for this function from ACPI-CA: static UINT8 AcpiRsCountSetBits ( UINT16 BitField) { UINT8 BitsSet; ACPI_FUNCTION_ENTRY (); for (BitsSet = 0; BitField; BitsSet++) { /* Zero the least significant bit that is set */ BitField &= (UINT16) (BitField - 1); } return (BitsSet); } (I ran into this accidentally because a kernel built on my system failed to boot in older qemu because the kernel paniced with an illegal instruction fault in this function.) There's no way we can preemptively locate every bit of C that clang might decide to replace with popcount and fix them to employ a workaround. I think the only viable solution is to use "-mno-popcount" on all compilers that aren't known to be fixed. In regards to whether or not this should be a dynamic test instead, it seems a bit much to require a dynamic check for code that has to work in both userland and the kernel, and I'm not sure if something like CPU_COUNT() would actually benefit from that versus just always using the software solution instead. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 16:16:19 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 44C2B94F; Sat, 21 Mar 2015 16:16:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 309268E9; Sat, 21 Mar 2015 16:16:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2LGGINQ087790; Sat, 21 Mar 2015 16:16:18 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LGGIU2087789; Sat, 21 Mar 2015 16:16:18 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201503211616.t2LGGIU2087789@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sat, 21 Mar 2015 16:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280325 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 16:16:19 -0000 Author: cognet Date: Sat Mar 21 16:16:17 2015 New Revision: 280325 URL: https://svnweb.freebsd.org/changeset/base/280325 Log: error is only used if MAC is defined, so make its declaration conditional as well. Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Sat Mar 21 15:32:59 2015 (r280324) +++ head/sys/kern/sysv_shm.c Sat Mar 21 16:16:17 2015 (r280325) @@ -596,7 +596,9 @@ shmget_existing(struct thread *td, struc int segnum) { struct shmid_kernel *shmseg; +#ifdef MAC int error; +#endif SYSVSHM_ASSERT_LOCKED(); KASSERT(segnum >= 0 && segnum < shmalloced, From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 16:35: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 A70851A0; Sat, 21 Mar 2015 16:35:43 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E006AC4; Sat, 21 Mar 2015 16:35:43 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2LGZaag054873 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 21 Mar 2015 18:35:36 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2LGZaag054873 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2LGZaRb054872; Sat, 21 Mar 2015 18:35:36 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Mar 2015 18:35:36 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <20150321163536.GK2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150320130216.GS2379@kib.kiev.ua> <550D9699.7070703@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <550D9699.7070703@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 16:35:43 -0000 On Sat, Mar 21, 2015 at 12:04:41PM -0400, John Baldwin wrote: > On 3/20/15 9:02 AM, Konstantin Belousov wrote: > > On Fri, Mar 20, 2015 at 10:27:06AM +0000, John Baldwin wrote: > >> Author: jhb > >> Date: Fri Mar 20 10:27:06 2015 > >> New Revision: 280279 > >> URL: https://svnweb.freebsd.org/changeset/base/280279 > >> > >> Log: > >> Expand the bitcount* API to support 64-bit integers, plain ints and longs > >> and create a "hidden" API that can be used in other system headers without > >> adding namespace pollution. > >> - If the POPCNT instruction is enabled at compile time, use > >> __builtin_popcount*() to implement __bitcount*(), otherwise fall back > >> to software implementations. > > Are you aware of the Haswell errata HSD146 ? I see the described behaviour > > on machines back to SandyBridge, but not on Nehalems. > > HSD146. POPCNT Instruction May Take Longer to Execute Than Expected > > Problem: POPCNT instruction execution with a 32 or 64 bit operand may be > > delayed until previous non-dependent instructions have executed. > > > > Jilles noted that gcc head and 4.9.2 already provides a workaround by > > xoring the dst register. I have some patch for amd64 pmap, see the end > > of the message. > > No, I was not aware, but I think it's hard to fix this anywhere but the > compiler. I set CPUTYPE in src.conf on my Ivy Bridge desktop and clang > uses POPCOUNT for this function from ACPI-CA: > > static UINT8 > AcpiRsCountSetBits ( > UINT16 BitField) > { > UINT8 BitsSet; > > > ACPI_FUNCTION_ENTRY (); > > > for (BitsSet = 0; BitField; BitsSet++) > { > /* Zero the least significant bit that is set */ > > BitField &= (UINT16) (BitField - 1); > } > > return (BitsSet); > } > > (I ran into this accidentally because a kernel built on my system failed > to boot in older qemu because the kernel paniced with an illegal instruction > fault in this function.) > > There's no way we can preemptively locate every bit of C that clang might > decide to replace with popcount and fix them to employ a workaround. I think > the only viable solution is to use "-mno-popcount" on all compilers that aren't > known to be fixed. Both you and Bruce and Jilles state this, but I am unable to understand the argument about the compiler. Can somebody explain this to me, please ? Compiler cannot generate popcntq instructions unless it is directed to generate code not for amd64, but for some specific microacrchitecture. Any use of bitcount in generic kernel or userspace is going to be a SWAR. In other words, #ifdef __POPCNT__ is for non-default settings of the FreeBSD compilation environment. And even then, compiler must issue cpuid to fetch the feature mask, which arguably compiler cannot do due to the serialization instruction cost. Compiler could generate the call to instruction in the init code, but this is impossible for freestanding environment, since compiler does not know where to put init code. Only explicit uses of popcnt in the asm, with the CPU feature check around, going to end actually use the instruction in the generic code. And there, we may apply the workaround like I did for pmap. > > In regards to whether or not this should be a dynamic test instead, it seems a > bit much to require a dynamic check for code that has to work in both userland > and the kernel, and I'm not sure if something like CPU_COUNT() would actually > benefit from that versus just always using the software solution instead. I agree. From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 16:54:02 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 45C095A7; Sat, 21 Mar 2015 16:54:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31EF7CB7; Sat, 21 Mar 2015 16:54:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2LGs2a5006125; Sat, 21 Mar 2015 16:54:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LGs2Xa006123; Sat, 21 Mar 2015 16:54:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201503211654.t2LGs2Xa006123@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 21 Mar 2015 16:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280326 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 16:54:02 -0000 Author: imp Date: Sat Mar 21 16:54:01 2015 New Revision: 280326 URL: https://svnweb.freebsd.org/changeset/base/280326 Log: Make TARGET_ARCH=powerpc64 work without TARGET=powerpc. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sat Mar 21 16:16:17 2015 (r280325) +++ head/Makefile Sat Mar 21 16:54:01 2015 (r280326) @@ -168,7 +168,7 @@ _MAKE= PATH=${PATH} ${SUB_MAKE} -f Makef _TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/aarch64/arm64/} +_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/} .endif .if defined(TARGET) && !defined(_TARGET) _TARGET=${TARGET} From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 17:11:52 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 6732AC9F; Sat, 21 Mar 2015 17:11:52 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23592EB8; Sat, 21 Mar 2015 17:11:52 +0000 (UTC) Received: from John-Baldwins-MacBook-Pro.local (d-69-161-105-82.cpe.metrocast.net [69.161.105.82]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8D2D0B915; Sat, 21 Mar 2015 13:11:50 -0400 (EDT) Message-ID: <550DA656.5060004@FreeBSD.org> Date: Sat, 21 Mar 2015 13:11:50 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r280279 - head/sys/sys References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150320130216.GS2379@kib.kiev.ua> <550D9699.7070703@FreeBSD.org> <20150321163536.GK2379@kib.kiev.ua> In-Reply-To: <20150321163536.GK2379@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 21 Mar 2015 13:11:50 -0400 (EDT) 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: Sat, 21 Mar 2015 17:11:52 -0000 On 3/21/15 12:35 PM, Konstantin Belousov wrote: > On Sat, Mar 21, 2015 at 12:04:41PM -0400, John Baldwin wrote: >> On 3/20/15 9:02 AM, Konstantin Belousov wrote: >>> On Fri, Mar 20, 2015 at 10:27:06AM +0000, John Baldwin wrote: >>>> Author: jhb >>>> Date: Fri Mar 20 10:27:06 2015 >>>> New Revision: 280279 >>>> URL: https://svnweb.freebsd.org/changeset/base/280279 >>>> >>>> Log: >>>> Expand the bitcount* API to support 64-bit integers, plain ints and longs >>>> and create a "hidden" API that can be used in other system headers without >>>> adding namespace pollution. >>>> - If the POPCNT instruction is enabled at compile time, use >>>> __builtin_popcount*() to implement __bitcount*(), otherwise fall back >>>> to software implementations. >>> Are you aware of the Haswell errata HSD146 ? I see the described behaviour >>> on machines back to SandyBridge, but not on Nehalems. >>> HSD146. POPCNT Instruction May Take Longer to Execute Than Expected >>> Problem: POPCNT instruction execution with a 32 or 64 bit operand may be >>> delayed until previous non-dependent instructions have executed. >>> >>> Jilles noted that gcc head and 4.9.2 already provides a workaround by >>> xoring the dst register. I have some patch for amd64 pmap, see the end >>> of the message. >> >> No, I was not aware, but I think it's hard to fix this anywhere but the >> compiler. I set CPUTYPE in src.conf on my Ivy Bridge desktop and clang >> uses POPCOUNT for this function from ACPI-CA: >> >> static UINT8 >> AcpiRsCountSetBits ( >> UINT16 BitField) >> { >> UINT8 BitsSet; >> >> >> ACPI_FUNCTION_ENTRY (); >> >> >> for (BitsSet = 0; BitField; BitsSet++) >> { >> /* Zero the least significant bit that is set */ >> >> BitField &= (UINT16) (BitField - 1); >> } >> >> return (BitsSet); >> } >> >> (I ran into this accidentally because a kernel built on my system failed >> to boot in older qemu because the kernel paniced with an illegal instruction >> fault in this function.) >> >> There's no way we can preemptively locate every bit of C that clang might >> decide to replace with popcount and fix them to employ a workaround. I think >> the only viable solution is to use "-mno-popcount" on all compilers that aren't >> known to be fixed. > Both you and Bruce and Jilles state this, but I am unable to understand the > argument about the compiler. Can somebody explain this to me, please ? If you compile with -mpopcount (or a march that includes it like -march=corei7) then the compiler will assume that popcount is available and will use it without doing any runtime checks. In the case of my sandybridge desktop, I have CPUTYPE set to "corei7-avx" in /etc/make.conf which adds "-march=corei7-avx" to CFLAGS, so the compiler assumes it can use POPCOUNT (as well as newer SSE and AVX). In this case the compiler recognized the pattern in the C function above as doing a population count and replaced the entire function with a POPCOUNT instruction even though the C code doesn't explicitly try to use it. However, if we know that a compiler doesn't employ the workaround for this errata, we can employ -mno-popcount so that using a custom CPUTYPE does not result in use of POPCOUNT except for known-ok compilers. Either that or we use a more elaborate set of #if checks in that only uses __builtin_popcount() for known-ok compilers (and possibly uses the clear-destination workaround for other compilers if -mpopcount is enabled). > Compiler cannot generate popcntq instructions unless it is directed to > generate code not for amd64, but for some specific microacrchitecture. > Any use of bitcount in generic kernel or userspace is going to be a > SWAR. In other words, #ifdef __POPCNT__ is for non-default settings of > the FreeBSD compilation environment. Correct. > And even then, compiler must issue cpuid to fetch the feature mask, which > arguably compiler cannot do due to the serialization instruction cost. > Compiler could generate the call to instruction in the init code, but > this is impossible for freestanding environment, since compiler does not > know where to put init code. No, the compiler does not have to check cpuid. If you've told it to compile for a given CPU type, it has tables to hardcode the features known to be present on those CPUs and just uses them. If you use the wrong CPU type you get illegal instruction faults. :) (As I did in my qemu test case.) >> In regards to whether or not this should be a dynamic test instead, it seems a >> bit much to require a dynamic check for code that has to work in both userland >> and the kernel, and I'm not sure if something like CPU_COUNT() would actually >> benefit from that versus just always using the software solution instead. > > I agree. Hence why I opted to only use POPCOUNT if someone explicitly enables it via -mpopcount or -march flags. If you've told the compiler it's ok to use it without any checks, then it will use POPCOUNT, otherwise it will use the SWAR method. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 17:32:49 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 1EA4AD26; Sat, 21 Mar 2015 17:32:49 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EE2E126; Sat, 21 Mar 2015 17:32:48 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2LHWh3T068146 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 21 Mar 2015 19:32:43 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2LHWh3T068146 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2LHWhro068145; Sat, 21 Mar 2015 19:32:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Mar 2015 19:32:43 +0200 From: Konstantin Belousov To: Olivier Houchard Subject: Re: svn commit: r280325 - head/sys/kern Message-ID: <20150321173243.GN2379@kib.kiev.ua> References: <201503211616.t2LGGIU2087789@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503211616.t2LGGIU2087789@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 17:32:49 -0000 On Sat, Mar 21, 2015 at 04:16:18PM +0000, Olivier Houchard wrote: > Author: cognet > Date: Sat Mar 21 16:16:17 2015 > New Revision: 280325 > URL: https://svnweb.freebsd.org/changeset/base/280325 > > Log: > error is only used if MAC is defined, so make its declaration conditional > as well. Thank you, I just compile-tested the fix. From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 17:56: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 1D70E18C; Sat, 21 Mar 2015 17:56: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 F28C5312; Sat, 21 Mar 2015 17:56:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2LHuv9l035240; Sat, 21 Mar 2015 17:56:57 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LHuumt035234; Sat, 21 Mar 2015 17:56:56 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201503211756.t2LHuumt035234@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 21 Mar 2015 17:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280327 - in head/sys: kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 17:56:58 -0000 Author: alc Date: Sat Mar 21 17:56:55 2015 New Revision: 280327 URL: https://svnweb.freebsd.org/changeset/base/280327 Log: Introduce vm_object_color() and use it in mmap(2) to set the color of named objects to zero before the virtual address is selected. Previously, the color setting was delayed until after the virtual address was selected. In rtld, this delay effectively prevented the mapping of a shared library's code section using superpages. Now, for example, we see the first 1 MB of libc's code on armv6 mapped by a superpage after we've gotten through the initial cold misses that bring the first 1 MB of code into memory. (With the page clustering that we perform on read faults, this happens quickly.) Differential Revision: https://reviews.freebsd.org/D2013 Reviewed by: jhb, kib Tested by: Svatopluk Kraus (armv6) MFC after: 6 weeks Modified: head/sys/kern/kern_exec.c head/sys/vm/vm_fault.c head/sys/vm/vm_mmap.c head/sys/vm/vm_object.h head/sys/vm/vnode_pager.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sat Mar 21 16:54:01 2015 (r280326) +++ head/sys/kern/kern_exec.c Sat Mar 21 17:56:55 2015 (r280327) @@ -933,10 +933,7 @@ exec_map_first_page(imgp) return (EACCES); VM_OBJECT_WLOCK(object); #if VM_NRESERVLEVEL > 0 - if ((object->flags & OBJ_COLORED) == 0) { - object->flags |= OBJ_COLORED; - object->pg_color = 0; - } + vm_object_color(object, 0); #endif ma[0] = vm_page_grab(object, 0, VM_ALLOC_NORMAL); if (ma[0]->valid != VM_PAGE_BITS_ALL) { Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat Mar 21 16:54:01 2015 (r280326) +++ head/sys/vm/vm_fault.c Sat Mar 21 17:56:55 2015 (r280327) @@ -522,11 +522,8 @@ fast_failed: fs.m = NULL; if (!vm_page_count_severe() || P_KILLED(curproc)) { #if VM_NRESERVLEVEL > 0 - if ((fs.object->flags & OBJ_COLORED) == 0) { - fs.object->flags |= OBJ_COLORED; - fs.object->pg_color = atop(vaddr) - - fs.pindex; - } + vm_object_color(fs.object, atop(vaddr) - + fs.pindex); #endif alloc_req = P_KILLED(curproc) ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL; Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Mar 21 16:54:01 2015 (r280326) +++ head/sys/vm/vm_mmap.c Sat Mar 21 17:56:55 2015 (r280327) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_hwpmc_hooks.h" +#include "opt_vm.h" #include #include @@ -1387,17 +1388,22 @@ vm_mmap_vnode(struct thread *td, vm_size objsize = round_page(va.va_size); if (va.va_nlink == 0) flags |= MAP_NOSYNC; - if (obj->type == OBJT_VNODE) + if (obj->type == OBJT_VNODE) { obj = vm_pager_allocate(OBJT_VNODE, vp, objsize, prot, foff, cred); - else { + if (obj == NULL) { + error = ENOMEM; + goto done; + } + } else { KASSERT(obj->type == OBJT_DEFAULT || obj->type == OBJT_SWAP, ("wrong object type")); - vm_object_reference(obj); - } - if (obj == NULL) { - error = ENOMEM; - goto done; + VM_OBJECT_WLOCK(obj); + vm_object_reference_locked(obj); +#if VM_NRESERVLEVEL > 0 + vm_object_color(obj, 0); +#endif + VM_OBJECT_WUNLOCK(obj); } *objp = obj; *flagsp = flags; Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Sat Mar 21 16:54:01 2015 (r280326) +++ head/sys/vm/vm_object.h Sat Mar 21 17:56:55 2015 (r280327) @@ -257,6 +257,30 @@ vm_object_set_flag(vm_object_t object, u object->flags |= bits; } +/* + * Conditionally set the object's color, which (1) enables the allocation + * of physical memory reservations for anonymous objects and larger-than- + * superpage-sized named objects and (2) determines the first page offset + * within the object at which a reservation may be allocated. In other + * words, the color determines the alignment of the object with respect + * to the largest superpage boundary. When mapping named objects, like + * files or POSIX shared memory objects, the color should be set to zero + * before a virtual address is selected for the mapping. In contrast, + * for anonymous objects, the color may be set after the virtual address + * is selected. + * + * The object must be locked. + */ +static __inline void +vm_object_color(vm_object_t object, u_short color) +{ + + if ((object->flags & OBJ_COLORED) == 0) { + object->pg_color = color; + object->flags |= OBJ_COLORED; + } +} + void vm_object_clear_flag(vm_object_t object, u_short bits); void vm_object_pip_add(vm_object_t object, short i); void vm_object_pip_subtract(vm_object_t object, short i); Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Sat Mar 21 16:54:01 2015 (r280326) +++ head/sys/vm/vnode_pager.c Sat Mar 21 17:56:55 2015 (r280327) @@ -53,6 +53,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_vm.h" + #include #include #include @@ -242,6 +244,9 @@ retry: VI_UNLOCK(vp); } else { object->ref_count++; +#if VM_NRESERVLEVEL > 0 + vm_object_color(object, 0); +#endif VM_OBJECT_WUNLOCK(object); } vref(vp); From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 19:13: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 142AA4B7; Sat, 21 Mar 2015 19:13:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00751CE0; Sat, 21 Mar 2015 19:13:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2LJDEG6072628; Sat, 21 Mar 2015 19:13:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LJDEJL072627; Sat, 21 Mar 2015 19:13:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503211913.t2LJDEJL072627@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 21 Mar 2015 19:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280328 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 19:13:15 -0000 Author: dim Date: Sat Mar 21 19:13:13 2015 New Revision: 280328 URL: https://svnweb.freebsd.org/changeset/base/280328 Log: Correctly pass the -mllvm -enable-gvn=false flag in CLANG_OPT_SMALL (this has to be passed as a combination of two flags). Should fix the case where the clang version is before 3.5.0. Submitted by: Pedro Arthur X-MFC-With: r279018, r279378 Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sat Mar 21 17:56:55 2015 (r280327) +++ head/share/mk/bsd.sys.mk Sat Mar 21 19:13:13 2015 (r280328) @@ -128,9 +128,9 @@ CWARNFLAGS+= -Wno-unknown-pragmas CLANG_NO_IAS= -no-integrated-as .endif CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ - -mllvm -simplifycfg-dup-ret -mllvm + -mllvm -simplifycfg-dup-ret .if ${COMPILER_VERSION} >= 30500 -CLANG_OPT_SMALL+= -enable-gvn=false +CLANG_OPT_SMALL+= -mllvm -enable-gvn=false .endif CFLAGS.clang+= -Qunused-arguments .if ${MACHINE_CPUARCH} == "sparc64" From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 20:24:04 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 9FA7C6D5; Sat, 21 Mar 2015 20:24: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 71D6374C; Sat, 21 Mar 2015 20:24: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 t2LKO4uN011280; Sat, 21 Mar 2015 20:24:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LKO4ZC011279; Sat, 21 Mar 2015 20:24:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201503212024.t2LKO4ZC011279@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 21 Mar 2015 20:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280330 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 20:24:04 -0000 Author: mjg Date: Sat Mar 21 20:24:03 2015 New Revision: 280330 URL: https://svnweb.freebsd.org/changeset/base/280330 Log: fork: assign refed credentials earlier Prior to this change the kernel would take p1's credentials and assign them tempororarily to p2. But p1 could change credentials at that time and in effect give us a use-after-free. No objections from: kib Modified: head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sat Mar 21 19:20:15 2015 (r280329) +++ head/sys/kern/kern_fork.c Sat Mar 21 20:24:03 2015 (r280330) @@ -410,9 +410,6 @@ do_fork(struct thread *td, int flags, st bzero(&p2->p_startzero, __rangeof(struct proc, p_startzero, p_endzero)); - crhold(td->td_ucred); - proc_set_cred(p2, td->td_ucred); - /* Tell the prison that we exist. */ prison_proc_hold(p2->p_ucred->cr_prison); @@ -832,7 +829,7 @@ fork1(struct thread *td, int flags, int td2 = thread_alloc(pages); if (td2 == NULL) { error = ENOMEM; - goto fail1; + goto fail2; } proc_linkup(newproc, td2); } else { @@ -841,7 +838,7 @@ fork1(struct thread *td, int flags, int vm_thread_dispose(td2); if (!thread_alloc_stack(td2, pages)) { error = ENOMEM; - goto fail1; + goto fail2; } } } @@ -850,7 +847,7 @@ fork1(struct thread *td, int flags, int vm2 = vmspace_fork(p1->p_vmspace, &mem_charged); if (vm2 == NULL) { error = ENOMEM; - goto fail1; + goto fail2; } if (!swap_reserve(mem_charged)) { /* @@ -861,7 +858,7 @@ fork1(struct thread *td, int flags, int */ swap_reserve_force(mem_charged); error = ENOMEM; - goto fail1; + goto fail2; } } else vm2 = NULL; @@ -870,7 +867,7 @@ fork1(struct thread *td, int flags, int * XXX: This is ugly; when we copy resource usage, we need to bump * per-cred resource counters. */ - proc_set_cred(newproc, p1->p_ucred); + proc_set_cred(newproc, crhold(td->td_ucred)); /* * Initialize resource accounting for the child process. @@ -946,6 +943,8 @@ fail: #endif racct_proc_exit(newproc); fail1: + crfree(proc_set_cred(newproc, NULL)); +fail2: if (vm2 != NULL) vmspace_free(vm2); uma_zfree(proc_zone, newproc); From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 20:24:56 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 9C95483E; Sat, 21 Mar 2015 20:24: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 88547767; Sat, 21 Mar 2015 20:24: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 t2LKOudI011419; Sat, 21 Mar 2015 20:24:56 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LKOtkl011413; Sat, 21 Mar 2015 20:24:55 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201503212024.t2LKOtkl011413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 21 Mar 2015 20:24:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280331 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 20:24:56 -0000 Author: mjg Date: Sat Mar 21 20:24:54 2015 New Revision: 280331 URL: https://svnweb.freebsd.org/changeset/base/280331 Log: cred: add proc_set_cred_init helper proc_set_cred_init can be used to set first credentials of a new process. Update proc_set_cred assertions so that it only expects already used processes. This fixes panics where p_ucred of a new process happens to be non-NULL. Reviewed by: kib Modified: head/sys/kern/init_main.c head/sys/kern/kern_fork.c head/sys/kern/kern_prot.c head/sys/sys/ucred.h Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sat Mar 21 20:24:03 2015 (r280330) +++ head/sys/kern/init_main.c Sat Mar 21 20:24:54 2015 (r280331) @@ -515,7 +515,7 @@ proc0_init(void *dummy __unused) newcred->cr_ruidinfo = uifind(0); newcred->cr_prison = &prison0; newcred->cr_loginclass = loginclass_find("default"); - proc_set_cred(p, newcred); + proc_set_cred_init(p, newcred); #ifdef AUDIT audit_cred_kproc0(newcred); #endif Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sat Mar 21 20:24:03 2015 (r280330) +++ head/sys/kern/kern_fork.c Sat Mar 21 20:24:54 2015 (r280331) @@ -867,7 +867,7 @@ fork1(struct thread *td, int flags, int * XXX: This is ugly; when we copy resource usage, we need to bump * per-cred resource counters. */ - proc_set_cred(newproc, crhold(td->td_ucred)); + proc_set_cred_init(newproc, crhold(td->td_ucred)); /* * Initialize resource accounting for the child process. Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Sat Mar 21 20:24:03 2015 (r280330) +++ head/sys/kern/kern_prot.c Sat Mar 21 20:24:54 2015 (r280331) @@ -1954,8 +1954,19 @@ cred_update_thread(struct thread *td) } /* + * Set initial process credentials. + * Callers are responsible for providing the reference for provided credentials. + */ +void +proc_set_cred_init(struct proc *p, struct ucred *newcred) +{ + + p->p_ucred = newcred; +} + +/* * Change process credentials. - * Callers are responsible for providing the reference for current credentials + * Callers are responsible for providing the reference for passed credentials * and for freeing old ones. * * Process has to be locked except when it does not have credentials (as it @@ -1968,9 +1979,10 @@ proc_set_cred(struct proc *p, struct ucr { struct ucred *oldcred; + MPASS(p->p_ucred != NULL); if (newcred == NULL) MPASS(p->p_state == PRS_ZOMBIE); - else if (p->p_ucred != NULL) + else PROC_LOCK_ASSERT(p, MA_OWNED); oldcred = p->p_ucred; Modified: head/sys/sys/ucred.h ============================================================================== --- head/sys/sys/ucred.h Sat Mar 21 20:24:03 2015 (r280330) +++ head/sys/sys/ucred.h Sat Mar 21 20:24:54 2015 (r280331) @@ -106,6 +106,7 @@ void crcopy(struct ucred *dest, struct u struct ucred *crcopysafe(struct proc *p, struct ucred *cr); struct ucred *crdup(struct ucred *cr); void cred_update_thread(struct thread *td); +void proc_set_cred_init(struct proc *p, struct ucred *cr); struct ucred *proc_set_cred(struct proc *p, struct ucred *cr); void crfree(struct ucred *cr); struct ucred *crget(void); From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 20:25:35 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 E0AAE99B; Sat, 21 Mar 2015 20:25:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCDA977D; Sat, 21 Mar 2015 20:25:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2LKPZN6011586; Sat, 21 Mar 2015 20:25:35 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LKPZCC011585; Sat, 21 Mar 2015 20:25:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201503212025.t2LKPZCC011585@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 21 Mar 2015 20:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280332 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 20:25:36 -0000 Author: mjg Date: Sat Mar 21 20:25:34 2015 New Revision: 280332 URL: https://svnweb.freebsd.org/changeset/base/280332 Log: proc: use MTX_NEW flag in proc_init This allows us to get rid of bzero which was added specifically to make mtx_init on p_mtx reliable. This also fixes a potential problem where mtx_init on other mutexes could trip over on unitialized memory and fire an assertion. Reviewed by: kib Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sat Mar 21 20:24:54 2015 (r280331) +++ head/sys/kern/kern_proc.c Sat Mar 21 20:25:34 2015 (r280332) @@ -225,12 +225,11 @@ proc_init(void *mem, int size, int flags p = (struct proc *)mem; SDT_PROBE(proc, kernel, init, entry, p, size, flags, 0, 0); p->p_sched = (struct p_sched *)&p[1]; - bzero(&p->p_mtx, sizeof(struct mtx)); - mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK); - mtx_init(&p->p_slock, "process slock", NULL, MTX_SPIN); - mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN); - mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN); - mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN); + mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK | MTX_NEW); + mtx_init(&p->p_slock, "process slock", NULL, MTX_SPIN | MTX_NEW); + mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN | MTX_NEW); + mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); + mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); cv_init(&p->p_pwait, "ppwait"); cv_init(&p->p_dbgwait, "dbgwait"); TAILQ_INIT(&p->p_threads); /* all threads in proc */ From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 21:03:45 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 783844F5; Sat, 21 Mar 2015 21:03:45 +0000 (UTC) Received: from mail.soaustin.net (pancho.soaustin.net [76.74.250.40]) by mx1.freebsd.org (Postfix) with ESMTP id 5A432B71; Sat, 21 Mar 2015 21:03:44 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id ECA1156082; Sat, 21 Mar 2015 16:03:41 -0500 (CDT) Date: Sat, 21 Mar 2015 16:03:41 -0500 From: Mark Linimon To: Konstantin Belousov Subject: Re: svn commit: r280323 - head/sys/kern Message-ID: <20150321210341.GC15857@lonesome.com> References: <201503211501.t2LF1Kj8052521@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503211501.t2LF1Kj8052521@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 21:03:45 -0000 On Sat, Mar 21, 2015 at 03:01:20PM +0000, Konstantin Belousov wrote: > Somewhat modernize the SysV shm code: Interesting. Is my understanding correct that postgres still uses shm? If so, has someone benchmarked the speedup? mcl From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 21:08:20 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 C8D0F678; Sat, 21 Mar 2015 21:08:20 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 536F8BA0; Sat, 21 Mar 2015 21:08:20 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2LL8A9J025425 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 21 Mar 2015 23:08:10 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2LL8A9J025425 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2LL8Ajn025424; Sat, 21 Mar 2015 23:08:10 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Mar 2015 23:08:10 +0200 From: Konstantin Belousov To: Mark Linimon Subject: Re: svn commit: r280323 - head/sys/kern Message-ID: <20150321210810.GT2379@kib.kiev.ua> References: <201503211501.t2LF1Kj8052521@svn.freebsd.org> <20150321210341.GC15857@lonesome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150321210341.GC15857@lonesome.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 21:08:20 -0000 On Sat, Mar 21, 2015 at 04:03:41PM -0500, Mark Linimon wrote: > On Sat, Mar 21, 2015 at 03:01:20PM +0000, Konstantin Belousov wrote: > > Somewhat modernize the SysV shm code: > > Interesting. > > Is my understanding correct that postgres still uses shm? If so, > has someone benchmarked the speedup? Yes, some versions of Postgres still use SysV shm. But note that the code changed only works during shared segment creation and teardown. Page faults are handled by the same VM code as it was before. In other words, I expect that nothing changes WRT benchmarks. From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 21:22:45 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 DA772832; Sat, 21 Mar 2015 21:22:45 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54A53D0B; Sat, 21 Mar 2015 21:22:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t2LLGMeW065924; Sun, 22 Mar 2015 00:16:22 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Sun, 22 Mar 2015 00:16:22 +0300 (MSK) From: Dmitry Morozovsky To: Konstantin Belousov Subject: Re: svn commit: r280323 - head/sys/kern In-Reply-To: <20150321210810.GT2379@kib.kiev.ua> Message-ID: References: <201503211501.t2LF1Kj8052521@svn.freebsd.org> <20150321210341.GC15857@lonesome.com> <20150321210810.GT2379@kib.kiev.ua> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Sun, 22 Mar 2015 00:17:30 +0300 (MSK) Cc: svn-src-head@freebsd.org, Mark Linimon , 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: Sat, 21 Mar 2015 21:22:46 -0000 On Sat, 21 Mar 2015, Konstantin Belousov wrote: > > > Somewhat modernize the SysV shm code: > > > > Interesting. > > > > Is my understanding correct that postgres still uses shm? If so, > > has someone benchmarked the speedup? > > Yes, some versions of Postgres still use SysV shm. To be clarified: IIUC, *all* contemporary versions of PostgreSQL do use SHM for shatrd buffers (as PgSQL use process-per-connection model) > But note that the code changed only works during shared segment creation and > teardown. Page faults are handled by the same VM code as it was before. > > In other words, I expect that nothing changes WRT benchmarks. On the other hand, I also do not see anything that could change benchmarks significally -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 21:24:25 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 D27CB972; Sat, 21 Mar 2015 21:24:25 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58990D13; Sat, 21 Mar 2015 21:24:25 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2LLOGfN028887 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 21 Mar 2015 23:24:16 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2LLOGfN028887 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2LLOG6u028886; Sat, 21 Mar 2015 23:24:16 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Mar 2015 23:24:16 +0200 From: Konstantin Belousov To: Dmitry Morozovsky Subject: Re: svn commit: r280323 - head/sys/kern Message-ID: <20150321212416.GU2379@kib.kiev.ua> References: <201503211501.t2LF1Kj8052521@svn.freebsd.org> <20150321210341.GC15857@lonesome.com> <20150321210810.GT2379@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, Mark Linimon , 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: Sat, 21 Mar 2015 21:24:25 -0000 On Sun, Mar 22, 2015 at 12:16:22AM +0300, Dmitry Morozovsky wrote: > On Sat, 21 Mar 2015, Konstantin Belousov wrote: > > > > > Somewhat modernize the SysV shm code: > > > > > > Interesting. > > > > > > Is my understanding correct that postgres still uses shm? If so, > > > has someone benchmarked the speedup? > > > > Yes, some versions of Postgres still use SysV shm. > > To be clarified: IIUC, *all* contemporary versions of PostgreSQL do > use SHM for shatrd buffers (as PgSQL use process-per-connection model) > No. Recent versions use mmaped shared region for buffers. From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 21:49: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 7A3B3117; Sat, 21 Mar 2015 21: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 65DABEF1; Sat, 21 Mar 2015 21: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 t2LLnQH2049153; Sat, 21 Mar 2015 21:49:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LLnQft049152; Sat, 21 Mar 2015 21:49:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503212149.t2LLnQft049152@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 21 Mar 2015 21:49:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280333 - head/contrib/compiler-rt/lib/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.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: Sat, 21 Mar 2015 21:49:26 -0000 Author: dim Date: Sat Mar 21 21:49:25 2015 New Revision: 280333 URL: https://svnweb.freebsd.org/changeset/base/280333 Log: Pull in r231972 from upstream compiler-rt trunk (by Jörg Sonnenberger): Always include stddef.h to make sure size_t exists. From Alexander Esilevich. Requested by: andrew Modified: head/contrib/compiler-rt/lib/builtins/clear_cache.c Modified: head/contrib/compiler-rt/lib/builtins/clear_cache.c ============================================================================== --- head/contrib/compiler-rt/lib/builtins/clear_cache.c Sat Mar 21 20:25:34 2015 (r280332) +++ head/contrib/compiler-rt/lib/builtins/clear_cache.c Sat Mar 21 21:49:25 2015 (r280333) @@ -9,6 +9,7 @@ */ #include "int_lib.h" +#include #if __APPLE__ #include From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 22:41:58 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 65EC36E8; Sat, 21 Mar 2015 22:41:58 +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 236F2623; Sat, 21 Mar 2015 22:41:57 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id D86DAD63902; Sun, 22 Mar 2015 09:41:54 +1100 (AEDT) Date: Sun, 22 Mar 2015 09:41:53 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin Subject: Re: svn commit: r280279 - head/sys/sys In-Reply-To: <550DA656.5060004@FreeBSD.org> Message-ID: <20150322080015.O955@besplex.bde.org> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150320130216.GS2379@kib.kiev.ua> <550D9699.7070703@FreeBSD.org> <20150321163536.GK2379@kib.kiev.ua> <550DA656.5060004@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=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=iYcXlKWrX-eQiaYAUuUA:9 a=ELe-XamKqRYop3AV:21 a=Z8dEGnTtH6TBpt3B:21 a=CjuIK1q_8ugA:10 Cc: Konstantin Belousov , 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: Sat, 21 Mar 2015 22:41:58 -0000 On Sat, 21 Mar 2015, John Baldwin wrote: > On 3/21/15 12:35 PM, Konstantin Belousov wrote: >> On Sat, Mar 21, 2015 at 12:04:41PM -0400, John Baldwin wrote: >>> On 3/20/15 9:02 AM, Konstantin Belousov wrote: >>>> On Fri, Mar 20, 2015 at 10:27:06AM +0000, John Baldwin wrote: >>>>> Author: jhb >>>>> Date: Fri Mar 20 10:27:06 2015 >>>>> New Revision: 280279 >>>>> URL: https://svnweb.freebsd.org/changeset/base/280279 >>>>> >>>>> Log: >>>>> Expand the bitcount* API to support 64-bit integers, plain ints and longs >>>>> and create a "hidden" API that can be used in other system headers without >>>>> adding namespace pollution. >>>>> - If the POPCNT instruction is enabled at compile time, use >>>>> __builtin_popcount*() to implement __bitcount*(), otherwise fall back >>>>> to software implementations. >>>> Are you aware of the Haswell errata HSD146 ? I see the described behaviour >>>> on machines back to SandyBridge, but not on Nehalems. >>>> HSD146. POPCNT Instruction May Take Longer to Execute Than Expected >>>> Problem: POPCNT instruction execution with a 32 or 64 bit operand may be >>>> delayed until previous non-dependent instructions have executed. >>>> >>>> Jilles noted that gcc head and 4.9.2 already provides a workaround by >>>> xoring the dst register. I have some patch for amd64 pmap, see the end >>>> of the message. >>> >>> No, I was not aware, but I think it's hard to fix this anywhere but the >>> compiler. I set CPUTYPE in src.conf on my Ivy Bridge desktop and clang >>> uses POPCOUNT for this function from ACPI-CA: >>> >>> static UINT8 >>> AcpiRsCountSetBits ( >>> UINT16 BitField) >>> { >>> UINT8 BitsSet; >>> >>> >>> ACPI_FUNCTION_ENTRY (); >>> >>> >>> for (BitsSet = 0; BitField; BitsSet++) >>> { >>> /* Zero the least significant bit that is set */ >>> >>> BitField &= (UINT16) (BitField - 1); >>> } >>> >>> return (BitsSet); >>> } >>> >>> (I ran into this accidentally because a kernel built on my system failed >>> to boot in older qemu because the kernel paniced with an illegal instruction >>> fault in this function.) Does it do the same for the similar home made popcount in pmap?: X /* X * Returns the number of one bits within the given PV chunk map element. X */ X static int X popcnt_pc_map_elem(uint64_t elem) X { X int count; X X /* X * This simple method of counting the one bits performs well because X * the given element typically contains more zero bits than one bits. X */ X count = 0; X for (; elem != 0; elem &= elem - 1) X count++; X return (count); X } This is actually the same method as in ACPI. It is just missing mounds of style bugs (mostly Windows spellings; also a bogus cast to UINT16; the cast has no effect). Perhaps this appeared to perform well not for the reason stated in its comment, but because it was tested with excessive CFLAGS, and the compiler actually reduced it to popcntq, and the test machine didn't have the bug. In a game program that I wrote, efficiency of popcount() was actually important since it was used in inner loops. I used lookup tables for popcount() and a couple of application-specific functions and even for fls(). This seemed to be better than the the existing bsf instruction, so it can't be bad for popcount(). The lookup was limited to bitsets of length 13 in the low bits of an int, so the table sizes were only 2**13 = 4096. bitsets of length 64 would need multiple steps. However, if the above performs well without compiler optimizations, then it must be because usually only the lowest few bits are set. Then it would perform even better with even smaller (8-bit) tables combined with an early exit: count = 0; for (; elem != 0; elem >>= 8) count += lookup[elem &0xff]; return (count); Many variations on this are possible. E.g., use fls() to decide where to start; or avoid all branches, and add up the results in parallel. For bitcount32, the latter is: bitcount64(x) := bitcount32(x & 0xffffffff) + bitcount32(x >> 32); bitcount32(x) := bitcount16(x & 0xffff) + bitcount16(x >> 16); bitcount16(x) := bitcount8(x & 0xff) + bitcount8(x >> 8); bitcount8(x) := lookup[x]; Compilers won't be able to optimize the lookup methods. They might be able to convert the current bitcount*() to popcnt*. Last time I looked, clang but not gcc converted very complicated expressions for bswap*() to bswap* instructions. >>> There's no way we can preemptively locate every bit of C that clang might >>> decide to replace with popcount and fix them to employ a workaround. I think >>> the only viable solution is to use "-mno-popcount" on all compilers that aren't >>> known to be fixed. Why bother? It is only a short-lived and small(?) efficiency bug. >> Both you and Bruce and Jilles state this, but I am unable to understand the >> argument about the compiler. Can somebody explain this to me, please ? It is also to avoid complications for short-lived optimizations. The 3 uses of popcntq() in amd64 pmap cost: - 9 lines of inline asm. - 19 lines for the C version - 9 lines instead of 3 for the 3 uses When popcntq is not available, the result is a pessimization since the optimizations are not complicated enough to be useful in that case. They give the runtime overhead of a branch to call the C version that is presumably worse than using the existing bitcount32() (possibly twice) or the compiler builtin. (jhb's cleanups didn't bother to optimize to use the builtin in all cases, since it is hard to tell if the builtin is any good if it is in software. If you remove the 19 lines for popcnt_pc_map_elem() and and replace calls to it by __builtin_popcountl(), then the results would be: - compile-time failure for old unsupported compilers that don't have this builtin - usually, a link-time failure for gcc-4.2 through gcc-4.8. gcc generates a call to __popcountdi2 unless CFLAGS enables the hardware instruction. __popcountdi2 is in libgcc but not in libkern. - usually, 3 inline copies of the same code that would be produced if FreeBSD's bitcount64() were used for clang. clang unrolls things excessively, giving enormous code. Unrolling allows it to load the large constants in __bitcount64() only once, but large code is still needed to use these constants. - runtime failures in misconfigured cases where CFLAGS doesn't match the hardware. Both gcc-4.8 and clang produce popcntq. The runtime check doesn't help since the compilers produce popcntq for the C case. Using __builtin_popcountl() asks for this directly. Using __bitcount64() asks for it indirectly, and gets it for clang. Using popcnt_pc_map_elem() may avoid getting it for clang, but apparentely still gets it.) When popcntq is available, the test to decide whether to use it is a small pessimization. It might take longer than a branch-free software method. This is unlikely since there are 3 popcounts per test. > If you compile with -mpopcount (or a march that includes it like -march=corei7) > then the compiler will assume that popcount is available and will use it without > doing any runtime checks. In the case of my sandybridge desktop, I have > CPUTYPE set to "corei7-avx" in /etc/make.conf which adds "-march=corei7-avx" > to CFLAGS, so the compiler assumes it can use POPCOUNT (as well as newer > SSE and AVX). In this case the compiler recognized the pattern in the C > function above as doing a population count and replaced the entire function with > a POPCOUNT instruction even though the C code doesn't explicitly try to use it. The runtime error for the unsupported instruction is probably not important, since using misconfigured CFLAGS asks for problems. In general, any new instruction may trap, and the mismatch must be small for only popcntq to trap. > However, if we know that a compiler doesn't employ the workaround for this > errata, we can employ -mno-popcount so that using a custom CPUTYPE does not > result in use of POPCOUNT except for known-ok compilers. Either that or > we use a more elaborate set of #if checks in that only uses > __builtin_popcount() for known-ok compilers (and possibly uses the > clear-destination workaround for other compilers if -mpopcount is enabled). I think the runtime slowness from a buggy instruction is also unimportant. >> Compiler cannot generate popcntq instructions unless it is directed to >> generate code not for amd64, but for some specific microacrchitecture. >> Any use of bitcount in generic kernel or userspace is going to be a >> SWAR. In other words, #ifdef __POPCNT__ is for non-default settings of >> the FreeBSD compilation environment. > > Correct. > >> And even then, compiler must issue cpuid to fetch the feature mask, which >> arguably compiler cannot do due to the serialization instruction cost. >> Compiler could generate the call to instruction in the init code, but >> this is impossible for freestanding environment, since compiler does not >> know where to put init code. > > No, the compiler does not have to check cpuid. If you've told it to compile > for a given CPU type, it has tables to hardcode the features known to be > present on those CPUs and just uses them. If you use the wrong CPU type > you get illegal instruction faults. :) (As I did in my qemu test case.) > >>> In regards to whether or not this should be a dynamic test instead, it seems a >>> bit much to require a dynamic check for code that has to work in both userland >>> and the kernel, and I'm not sure if something like CPU_COUNT() would actually >>> benefit from that versus just always using the software solution instead. >> >> I agree. > > Hence why I opted to only use POPCOUNT if someone explicitly enables it via > -mpopcount or -march flags. If you've told the compiler it's ok to use it > without any checks, then it will use POPCOUNT, otherwise it will use the > SWAR method. Always using new API would lose the micro-optimizations given by the runtime decision for default CFLAGS (used by distributions for portability). To keep them, it seems best to keep the inline asm but replace popcnt_pc_map_elem(elem) by __bitcount64(elem). -mno-popcount can then be used to work around slowness in the software (that is actually hardware) case. Bruce From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 23:12:47 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 17858D16; Sat, 21 Mar 2015 23:12:47 +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 DC7DA91E; Sat, 21 Mar 2015 23:12: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 t2LNCkcs098445; Sat, 21 Mar 2015 23:12:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LNCkMM098444; Sat, 21 Mar 2015 23:12:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503212312.t2LNCkMM098444@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Mar 2015 23:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280334 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.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: Sat, 21 Mar 2015 23:12:47 -0000 Author: adrian Date: Sat Mar 21 23:12:46 2015 New Revision: 280334 URL: https://svnweb.freebsd.org/changeset/base/280334 Log: Quieten some of the log spam from AR9300 sysctl tree walk and chip setup/reset path. * For now there's no exposed control over classic / LNA antenna diversity, so just stub them out. Adding this will take quite a bit of time. * Add a function to fetch the CTS timeout. PR: kern/198558 Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sat Mar 21 21:49:25 2015 (r280333) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sat Mar 21 23:12:46 2015 (r280334) @@ -69,6 +69,34 @@ ar9300_get_next_tbtt(struct ath_hal *ah) return (OS_REG_READ(ah, AR_NEXT_TBTT_TIMER)); } + +/* + * TODO: implement the antenna diversity control for AR9485 and + * other LNA mixing based NICs. + * + * For now we'll just go with the HAL default and make these no-ops. + */ +static HAL_ANT_SETTING +ar9300_freebsd_get_antenna_switch(struct ath_hal *ah) +{ + + return (HAL_ANT_VARIABLE); +} + +static HAL_BOOL +ar9300_freebsd_set_antenna_switch(struct ath_hal *ah, HAL_ANT_SETTING setting) +{ + + return (AH_TRUE); +} + +static u_int +ar9300_freebsd_get_cts_timeout(struct ath_hal *ah) +{ + u_int clks = MS(OS_REG_READ(ah, AR_TIME_OUT), AR_TIME_OUT_CTS); + return ath_hal_mac_usec(ah, clks); /* convert from system clocks */ +} + void ar9300_attach_freebsd_ops(struct ath_hal *ah) { @@ -159,8 +187,8 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_getRfGain = ar9300_get_rfgain; ah->ah_getDefAntenna = ar9300_get_def_antenna; ah->ah_setDefAntenna = ar9300_set_def_antenna; - // ah->ah_getAntennaSwitch = ar9300_get_antenna_switch; - // ah->ah_setAntennaSwitch = ar9300_set_antenna_switch; + ah->ah_getAntennaSwitch = ar9300_freebsd_get_antenna_switch; + ah->ah_setAntennaSwitch = ar9300_freebsd_set_antenna_switch; // ah->ah_setSifsTime = ar9300_set_sifs_time; // ah->ah_getSifsTime = ar9300_get_sifs_time; ah->ah_setSlotTime = ar9300_set_slot_time; @@ -169,6 +197,7 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_setAckTimeout = ar9300_set_ack_timeout; // XXX ack/ctsrate // XXX CTS timeout + ah->ah_getCTSTimeout = ar9300_freebsd_get_cts_timeout; // XXX decompmask // coverageclass ah->ah_setQuiet = ar9300_set_quiet; From owner-svn-src-head@FreeBSD.ORG Sat Mar 21 23:39:35 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 62001296; Sat, 21 Mar 2015 23:39:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D8C5AE4; Sat, 21 Mar 2015 23:39:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2LNdZoO008941; Sat, 21 Mar 2015 23:39:35 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2LNdZ1Y008940; Sat, 21 Mar 2015 23:39:35 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503212339.t2LNdZ1Y008940@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 21 Mar 2015 23:39:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280335 - head/sys/mips/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: Sat, 21 Mar 2015 23:39:35 -0000 Author: adrian Date: Sat Mar 21 23:39:34 2015 New Revision: 280335 URL: https://svnweb.freebsd.org/changeset/base/280335 Log: re-enable building modules for the AR933x * add ipfw * delete ath / ath_ahb for now, until I can have Warner beat me with the clue stick about putting in conditional build things into the ath Makefile so the module builds can just have the HAL bits that are relevant for a particular target. Modified: head/sys/mips/conf/AR933X_BASE Modified: head/sys/mips/conf/AR933X_BASE ============================================================================== --- head/sys/mips/conf/AR933X_BASE Sat Mar 21 23:12:46 2015 (r280334) +++ head/sys/mips/conf/AR933X_BASE Sat Mar 21 23:39:34 2015 (r280335) @@ -20,7 +20,7 @@ files "../atheros/files.ar71xx" hints "AR933X_BASE.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -# makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" +makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr hwpmc ipfw" makeoptions MODULES_OVERRIDE="" options DDB @@ -64,6 +64,8 @@ options FFS #Berkel #options UFS_DIRHASH #Improve performance on big directories options NO_FFS_SNAPSHOT # We don't require snapshot support +options IPFIREWALL_DEFAULT_TO_ACCEPT + # Wireless NIC cards options IEEE80211_DEBUG options IEEE80211_SUPPORT_MESH