From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 00:02:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14D0F889; Sun, 29 Dec 2013 00:02:45 +0000 (UTC) Received: from smtpauth4.wiscmail.wisc.edu (wmauth4.doit.wisc.edu [144.92.197.145]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D695915A8; Sun, 29 Dec 2013 00:02:44 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from avs-daemon.smtpauth4.wiscmail.wisc.edu by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) id <0MYJ00C00JXLCG00@smtpauth4.wiscmail.wisc.edu>; Sat, 28 Dec 2013 18:02:36 -0600 (CST) X-Spam-PmxInfo: Server=avs-4, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.12.28.235115, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from wanderer.tachypleus.net (unknown [70.42.157.34]) by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0MYJ00F76K49PW30@smtpauth4.wiscmail.wisc.edu>; Sat, 28 Dec 2013 18:02:36 -0600 (CST) Message-id: <52BF6699.1040006@freebsd.org> Date: Sat, 28 Dec 2013 19:02:33 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 To: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r259908 - head/sys/vm References: <201312260546.rBQ5kAoJ009798@svn.freebsd.org> In-reply-to: <201312260546.rBQ5kAoJ009798@svn.freebsd.org> X-Enigmail-Version: 1.5.2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 00:02:45 -0000 On 12/26/13 00:46, Marcel Moolenaar wrote: > Author: marcel > Date: Thu Dec 26 05:46:10 2013 > New Revision: 259908 > URL: http://svnweb.freebsd.org/changeset/base/259908 > > Log: > For ia64, use pmap_remove_pages() and not pmap_remove(). The problem is > that we don't have a good way (yet) to iterate over the mapped pages by > virtual address and simply try each page within the range. Given that we > call pmap_remove() over the entire 2^63 bytes of address space, it takes > a while for pmap_remove to have tried all 2^50 pages. > By using pmap_remove_pages() we use the PV list to find all mappings. > > Change derived from a patch by: alc > Why make this ia64-specific? It seems like a potentially useful general optimization and certainly shouldn't be harmful on other architectures. -Nathan From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 00:04:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FF189D8 for ; Sun, 29 Dec 2013 00:04:35 +0000 (UTC) Received: from mail-pb0-x229.google.com (mail-pb0-x229.google.com [IPv6:2607:f8b0:400e:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6018815B2 for ; Sun, 29 Dec 2013 00:04:35 +0000 (UTC) Received: by mail-pb0-f41.google.com with SMTP id jt11so10442858pbb.0 for ; Sat, 28 Dec 2013 16:04:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LlaE0ZF7ZPoRJAWLYta87ZoxlyHwmYkcxBb13rjJlwE=; b=AnkxuoQX6sLSK5AXE4t+ijOisLvKEq8GNq0tXysv4k462p/B2AXcC/oqMyhszimmZc wd4WwKmJINtZOogt2Ttwl5v/y3X3OcM8mIAjK8KN5etISSF2vrO7X5lAgpV4ih5J1Rt4 GPyVQjrRfQTg5Bbwi/Lve8hrwU7pVYoGA+XiQ= 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=LlaE0ZF7ZPoRJAWLYta87ZoxlyHwmYkcxBb13rjJlwE=; b=kR3EpRdCU704yUb/YMu9wlzIvaU9IOjKLduN6GPk0IAygs5yf03eAE/sy44LoACsDp UAsMBkb1tb8QxxrapIxkR7i61OmP42wB2k4CAhaqefWFwqassIhVI2l9/rzabQxNdPYK FfGyp6yjgL19ATUrG8553HjxC0MxLbFgU9mvAPGS8n6M7+nmR2DlZh44fap/8G74NE3X xrO+r67rH0NIee9kL6L6lDf3uMlZYt2g0nbgDeQ0LFJv3Lma7jOt7AYxLsw9QSSX2uzh rkh9dJA66cdr9jprkOyZM6j8VhjPeYOSeQsAPkC/ObBDDbum9gDbKba8firQVqYbdtmk ZNkg== X-Gm-Message-State: ALoCoQnHrIf2Qww9mdQ/BiDM8aa4bNA9z9DranawscWdbylQfbmChj9cM6AqD38SS6StUaIrAg4o MIME-Version: 1.0 X-Received: by 10.66.25.36 with SMTP id z4mr60094964paf.101.1388275475029; Sat, 28 Dec 2013 16:04:35 -0800 (PST) Received: by 10.66.162.3 with HTTP; Sat, 28 Dec 2013 16:04:34 -0800 (PST) In-Reply-To: <201312282301.rBSN1wWP002326@svn.freebsd.org> References: <201312282301.rBSN1wWP002326@svn.freebsd.org> Date: Sat, 28 Dec 2013 16:04:34 -0800 Message-ID: Subject: Re: svn commit: r260022 - head/lib/libkvm From: Peter Wemm To: Marcel Moolenaar Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , svn-src-all , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 00:04:35 -0000 On Sat, Dec 28, 2013 at 3:01 PM, Marcel Moolenaar wrote: > Author: marcel > Date: Sat Dec 28 23:01:57 2013 > New Revision: 260022 > URL: http://svnweb.freebsd.org/changeset/base/260022 > > Log: > Allow building a cross libkvm by setting TARGET_ARCH. The library so > produced will be called libkvm-${ARCH} instead of libkvm. This allows > installing it alongside the native version. > For symbol lookups, use ps_pglobal_lookup() instead of __fdnlist() > when building a cross libkvm. It is assumed that the cross tool that > uses the cross libkvm also provides an implementation for this > proc_services function. > > Note that this commit does not change any of the architecture-specific > code for cross-compilation. Are you sure about this? I just got a brand new buildworld failure on an amd64 machine. The lib32 build code was trying to use 64 bit pmap definitions and failed miserably. I'm really sorry, I accidentally blew away the failure log. I'll have another in a few minutes. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV Yes, I know, gmail sucks now. If you see this then I forgot. Habits are hard to break. From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 00:40:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DBD2EC for ; Sun, 29 Dec 2013 00:40:33 +0000 (UTC) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C6AC17C4 for ; Sun, 29 Dec 2013 00:40:33 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id r10so10243273pdi.10 for ; Sat, 28 Dec 2013 16:40:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2LrDuxz4Qy5swbfvslnDXc7wTjiovmHtF9+3qmU4dKY=; b=lGGMVKYeFQJu60i+2Ftdz3sRpf/SNVpA09kUy95EHm766a6dNKliGua3WnEI0j3uLv IEHiLjFxbKSLkuHd5F0y/YbwpDtMdS8fCanmYpBww8oNHHU7/2sXN0cQW+uWUfZTMK6Y DUpucI4DgQXA+2AHUqkaj57k0p3A8Z+IsOpC0= 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=2LrDuxz4Qy5swbfvslnDXc7wTjiovmHtF9+3qmU4dKY=; b=U0tMKzozaF11iAj8Hxt4Wg6iH39C67WPS+DsuEtYfwpgAYlNj7qyUZPL95IXUVVEXw PU1Imf/k7MT4uI1mUn07cGPvDfk/T6HXEUmoXkcs8rcbOxR66hA7xhWv4xY8CinZ8ai+ xqv5r6zdH3jbVjQKHAhNCHpfwMLvQ8gBC8HgNaj/oNaNYce8FEvcrtm9gnGnqhljf8QO 34Y8qTuuwdp8xxObUte1FkSRppll0HzF5aJDPqDK1SspOannfcelTNQKDhhn44ZS+wNG m78CniyhNEl0MtK/Sq63Bs/AAsFi7i3l0e25JbkFh9WUyVWP0vZTEWmoes7BPWiLdM9t TI+w== X-Gm-Message-State: ALoCoQlV9TE+q7ExSUOT4Fkwzv8lywo96biCaPSozSSCLKZef7rF9hx8pZwQETVhQe7QVuijin6d MIME-Version: 1.0 X-Received: by 10.66.137.109 with SMTP id qh13mr42969038pab.140.1388277632890; Sat, 28 Dec 2013 16:40:32 -0800 (PST) Received: by 10.66.162.3 with HTTP; Sat, 28 Dec 2013 16:40:32 -0800 (PST) In-Reply-To: References: <201312282301.rBSN1wWP002326@svn.freebsd.org> Date: Sat, 28 Dec 2013 16:40:32 -0800 Message-ID: Subject: Re: svn commit: r260022 - head/lib/libkvm From: Peter Wemm To: Marcel Moolenaar Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , svn-src-all , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 00:40:33 -0000 On Sat, Dec 28, 2013 at 4:04 PM, Peter Wemm wrote: > On Sat, Dec 28, 2013 at 3:01 PM, Marcel Moolenaar wrote: >> Author: marcel >> Date: Sat Dec 28 23:01:57 2013 >> New Revision: 260022 >> URL: http://svnweb.freebsd.org/changeset/base/260022 >> >> Log: >> Allow building a cross libkvm by setting TARGET_ARCH. The library so >> produced will be called libkvm-${ARCH} instead of libkvm. This allows >> installing it alongside the native version. >> For symbol lookups, use ps_pglobal_lookup() instead of __fdnlist() >> when building a cross libkvm. It is assumed that the cross tool that >> uses the cross libkvm also provides an implementation for this >> proc_services function. >> >> Note that this commit does not change any of the architecture-specific >> code for cross-compilation. > > Are you sure about this? I just got a brand new buildworld failure on > an amd64 machine. The lib32 build code was trying to use 64 bit pmap > definitions and failed miserably. > > I'm really sorry, I accidentally blew away the failure log. I'll have > another in a few minutes. This is from stage5.1, the lib32 build: /usr/src/lib/libkvm/kvm_amd64.c:78:2: error: unknown type name 'pml4_entry_t' pml4_entry_t *PML4; ^ /usr/src/lib/libkvm/kvm_amd64.c:153:2: error: use of undeclared identifier 'pml4_entry_t' pml4_entry_t *PML4; ^ /usr/src/lib/libkvm/kvm_amd64.c:153:16: error: use of undeclared identifier 'PML4' pml4_entry_t *PML4; ^ /usr/src/lib/libkvm/kvm_amd64.c:200:2: error: use of undeclared identifier 'PML4' PML4 = _kvm_malloc(kd, PAGE_SIZE); ^ /usr/src/lib/libkvm/kvm_amd64.c:201:23: error: use of undeclared identifier 'PML4' if (kvm_read(kd, pa, PML4, PAGE_SIZE) != PAGE_SIZE) { ^ /usr/src/lib/libkvm/kvm_amd64.c:205:19: error: use of undeclared identifier 'PML4' kd->vmst->PML4 = PML4; ^ /usr/src/lib/libkvm/kvm_amd64.c:217:2: error: use of undeclared identifier 'pml4_entry_t' pml4_entry_t pml4e; ^ /usr/src/lib/libkvm/kvm_amd64.c:218:2: error: unknown type name 'pdp_entry_t'; did you mean 'pd_entry_t'? pdp_entry_t pdpe; ^~~~~~~~~~~ pd_entry_t /usr/obj/usr/src/lib32/usr/include/machine/pmap.h:175:18: note: 'pd_entry_t' declared here typedef uint32_t pd_entry_t; ^ /usr/src/lib/libkvm/kvm_amd64.c:246:22: error: use of undeclared identifier 'PML4SHIFT' pml4eindex = (va >> PML4SHIFT) & (NPML4EPG - 1); ^ /usr/src/lib/libkvm/kvm_amd64.c:246:36: error: use of undeclared identifier 'NPML4EPG' pml4eindex = (va >> PML4SHIFT) & (NPML4EPG - 1); ^ /usr/src/lib/libkvm/kvm_amd64.c:247:2: error: use of undeclared identifier 'pml4e' pml4e = vm->PML4[pml4eindex]; ^ /usr/src/lib/libkvm/kvm_amd64.c:248:15: error: use of undeclared identifier 'pml4e' if (((u_long)pml4e & PG_V) == 0) { ^ /usr/src/lib/libkvm/kvm_amd64.c:253:21: error: use of undeclared identifier 'PDPSHIFT' pdpeindex = (va >> PDPSHIFT) & (NPDPEPG-1); ^ /usr/src/lib/libkvm/kvm_amd64.c:253:34: error: use of undeclared identifier 'NPDPEPG' pdpeindex = (va >> PDPSHIFT) & (NPDPEPG-1); ^ /usr/src/lib/libkvm/kvm_amd64.c:254:21: error: use of undeclared identifier 'pml4e' pdpe_pa = ((u_long)pml4e & PG_FRAME) + ^ /usr/src/lib/libkvm/kvm_amd64.c:255:26: error: use of undeclared identifier 'pdp_entry_t'; did you mean 'pd_entry_t'? (pdpeindex * sizeof(pdp_entry_t)); ^ 16 errors generated. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV Yes, I know, gmail sucks now. If you see this then I forgot. Habits are hard to break. From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 01:08:50 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BAD843E; Sun, 29 Dec 2013 01:08:50 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 75E491902; Sun, 29 Dec 2013 01:08:50 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rBT18nwo025778 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Dec 2013 17:08:49 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rBT18niq025777; Sat, 28 Dec 2013 17:08:49 -0800 (PST) (envelope-from jmg) Date: Sat, 28 Dec 2013 17:08:48 -0800 From: John-Mark Gurney To: Marcel Moolenaar Subject: Re: svn commit: r260022 - head/lib/libkvm Message-ID: <20131229010848.GV99167@funkthat.com> References: <201312282301.rBSN1wWP002326@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201312282301.rBSN1wWP002326@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sat, 28 Dec 2013 17:08:49 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 01:08:50 -0000 Marcel Moolenaar wrote this message on Sat, Dec 28, 2013 at 23:01 +0000: > Author: marcel > Date: Sat Dec 28 23:01:57 2013 > New Revision: 260022 > URL: http://svnweb.freebsd.org/changeset/base/260022 > > Log: > Allow building a cross libkvm by setting TARGET_ARCH. The library so > produced will be called libkvm-${ARCH} instead of libkvm. This allows > installing it alongside the native version. > For symbol lookups, use ps_pglobal_lookup() instead of __fdnlist() > when building a cross libkvm. It is assumed that the cross tool that > uses the cross libkvm also provides an implementation for this > proc_services function. > > Note that this commit does not change any of the architecture-specific > code for cross-compilation. Shouldn't we be putting cross compiled libaries in another location than /lib? Kind of like the compat32 libs? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 01:39:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EC836E1; Sun, 29 Dec 2013 01:39:02 +0000 (UTC) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E1A5A1A6A; Sun, 29 Dec 2013 01:39:01 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id rBT0m7iO025641; Sat, 28 Dec 2013 18:49:27 -0600 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp1.rice.edu with ESMTP id 1gu5d43pbe-1; Sat, 28 Dec 2013 18:49:27 -0600 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 521804C01BA; Sat, 28 Dec 2013 18:49:25 -0600 (CST) Message-ID: <52BF7195.2070606@rice.edu> Date: Sat, 28 Dec 2013 18:49:25 -0600 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Nathan Whitehorn , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r259908 - head/sys/vm References: <201312260546.rBQ5kAoJ009798@svn.freebsd.org> <52BF6699.1040006@freebsd.org> In-Reply-To: <52BF6699.1040006@freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.608968239819442 urlsuspect_oldscore=0.00896823981944168 suspectscore=4 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=1 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 rbsscore=0.608968239819442 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1305240000 definitions=main-1312280206 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 01:39:02 -0000 On 12/28/2013 18:02, Nathan Whitehorn wrote: > On 12/26/13 00:46, Marcel Moolenaar wrote: >> Author: marcel >> Date: Thu Dec 26 05:46:10 2013 >> New Revision: 259908 >> URL: http://svnweb.freebsd.org/changeset/base/259908 >> >> Log: >> For ia64, use pmap_remove_pages() and not pmap_remove(). The problem is >> that we don't have a good way (yet) to iterate over the mapped pages by >> virtual address and simply try each page within the range. Given that we >> call pmap_remove() over the entire 2^63 bytes of address space, it takes >> a while for pmap_remove to have tried all 2^50 pages. >> By using pmap_remove_pages() we use the PV list to find all mappings. >> >> Change derived from a patch by: alc >> > Why make this ia64-specific? It seems like a potentially useful general > optimization and certainly shouldn't be harmful on other architectures. Some of the other implementations of pmap_remove_pages() have limitations that don't permit them to be used for this purpose, e.g., if (pmap != PCPU_GET(curpmap)) { printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } Alan From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 02:31:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51B30126; Sun, 29 Dec 2013 02:31:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C4D31EDE; Sun, 29 Dec 2013 02:31:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBT2VffL003334; Sun, 29 Dec 2013 02:31:41 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBT2VfZm003333; Sun, 29 Dec 2013 02:31:41 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201312290231.rBT2VfZm003333@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 29 Dec 2013 02:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260028 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 02:31:41 -0000 Author: marcel Date: Sun Dec 29 02:31:40 2013 New Revision: 260028 URL: http://svnweb.freebsd.org/changeset/base/260028 Log: Add support for virtual cores (aka minidumps). To that end, refactor this file as follows: 1. Common ia64-specific support functions have the ia64_ prefix. 2. Functions that work on physical cores have the phys_ prefix. 3. Functions that work on virtual cores have the virt_ prefix. With that: 1. _kvm_kvatop() has been renamed to phys_kvatop() as it handles physical cores only. 2. The new _kvm_kvatop() is nothing but a wrapper that calls either phys_kvatop() or virt_kvatop() by virtue of the kvatop function pointer in the vmstate structure. 3. virt_kvatop() is nothing but a wrapper around virt_addr2off(). 4. virt_addr2off() iterates over the Phdrs to find the segment in which the address falls and return the file offset for it. Now it's up to the kernel to populate the core file appropriately. Modified: head/lib/libkvm/kvm_ia64.c Modified: head/lib/libkvm/kvm_ia64.c ============================================================================== --- head/lib/libkvm/kvm_ia64.c Sat Dec 28 23:31:22 2013 (r260027) +++ head/lib/libkvm/kvm_ia64.c Sun Dec 29 02:31:40 2013 (r260028) @@ -35,15 +35,18 @@ #ifndef CROSS_LIBKVM #include #include +#include #include #else #include "../../sys/ia64/include/atomic.h" #include "../../sys/ia64/include/bootinfo.h" +#include "../../sys/ia64/include/elf.h" #include "../../sys/ia64/include/pte.h" #endif #include #include +#include #include #include @@ -61,6 +64,8 @@ #define PBVM_BASE 0x9ffc000000000000UL #define PBVM_PGSZ (64 * 1024) +typedef size_t (a2p_f)(kvm_t *, uint64_t, off_t *); + struct vmstate { void *mmapbase; size_t mmapsize; @@ -68,6 +73,7 @@ struct vmstate { u_long kptdir; u_long *pbvm_pgtbl; u_int pbvm_pgtblsz; + a2p_f *kvatop; }; /* @@ -76,7 +82,7 @@ struct vmstate { * set of headers. */ static int -_kvm_maphdrs(kvm_t *kd, size_t sz) +ia64_maphdrs(kvm_t *kd, size_t sz) { struct vmstate *vm = kd->vmst; @@ -97,18 +103,22 @@ _kvm_maphdrs(kvm_t *kd, size_t sz) } /* - * Translate a physical memory address to a file-offset in the crash-dump. + * Physical core support. */ + static size_t -_kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs, size_t pgsz) +phys_addr2off(kvm_t *kd, uint64_t pa, off_t *ofs, size_t pgsz) { - Elf64_Ehdr *e = kd->vmst->mmapbase; - Elf64_Phdr *p = (Elf64_Phdr*)((char*)e + e->e_phoff); - int n = e->e_phnum; + Elf64_Ehdr *e; + Elf64_Phdr *p; + int n; if (pa != REGION_ADDR(pa)) goto fail; + e = (Elf64_Ehdr *)(kd->vmst->mmapbase); + n = e->e_phnum; + p = (Elf64_Phdr *)(void *)((uintptr_t)(void *)e + e->e_phoff); while (n && (pa < p->p_paddr || pa >= p->p_paddr + p->p_memsz)) p++, n--; if (n == 0) @@ -120,18 +130,76 @@ _kvm_pa2off(kvm_t *kd, uint64_t pa, off_ return (pgsz - ((size_t)pa & (pgsz - 1))); fail: - _kvm_err(kd, kd->program, "invalid physical address %#llx", - (unsigned long long)pa); + _kvm_err(kd, kd->program, "invalid physical address %#jx", + (uintmax_t)pa); + return (0); +} + +static size_t +phys_kvatop(kvm_t *kd, uint64_t va, off_t *ofs) +{ + struct ia64_lpte pte; + uint64_t pa, pgaddr, pt0addr, pt1addr; + size_t pgno, pgsz, pt0no, pt1no; + + if (va >= REGION_BASE(6)) { + /* Regions 6 and 7: direct mapped. */ + pa = REGION_ADDR(va); + return (phys_addr2off(kd, pa, ofs, 0)); + } else if (va >= REGION_BASE(5)) { + /* Region 5: Kernel Virtual Memory. */ + va = REGION_ADDR(va); + pgsz = kd->vmst->pagesize; + pt0no = KPTE_DIR0_INDEX(va, pgsz); + pt1no = KPTE_DIR1_INDEX(va, pgsz); + pgno = KPTE_PTE_INDEX(va, pgsz); + if (pt0no >= NKPTEDIR(pgsz)) + goto fail; + pt0addr = kd->vmst->kptdir + (pt0no << 3); + if (kvm_read(kd, pt0addr, &pt1addr, 8) != 8) + goto fail; + if (pt1addr == 0) + goto fail; + pt1addr += pt1no << 3; + if (kvm_read(kd, pt1addr, &pgaddr, 8) != 8) + goto fail; + if (pgaddr == 0) + goto fail; + pgaddr += pgno * sizeof(pte); + if (kvm_read(kd, pgaddr, &pte, sizeof(pte)) != sizeof(pte)) + goto fail; + if (!(pte.pte & PTE_PRESENT)) + goto fail; + pa = (pte.pte & PTE_PPN_MASK) + (va & (pgsz - 1)); + return (phys_addr2off(kd, pa, ofs, pgsz)); + } else if (va >= PBVM_BASE) { + /* Region 4: Pre-Boot Virtual Memory (PBVM). */ + va -= PBVM_BASE; + pgsz = PBVM_PGSZ; + pt0no = va / pgsz; + if (pt0no >= (kd->vmst->pbvm_pgtblsz >> 3)) + goto fail; + pt0addr = kd->vmst->pbvm_pgtbl[pt0no]; + if (!(pt0addr & PTE_PRESENT)) + goto fail; + pa = (pt0addr & PTE_PPN_MASK) + va % pgsz; + return (phys_addr2off(kd, pa, ofs, pgsz)); + } + + fail: + _kvm_err(kd, kd->program, "invalid kernel virtual address %#jx", + (uintmax_t)va); + *ofs = -1; return (0); } static ssize_t -_kvm_read_phys(kvm_t *kd, uint64_t pa, void *buf, size_t bufsz) +phys_read(kvm_t *kd, uint64_t pa, void *buf, size_t bufsz) { off_t ofs; size_t sz; - sz = _kvm_pa2off(kd, pa, &ofs, 0); + sz = phys_addr2off(kd, pa, &ofs, 0); if (sz < bufsz) return ((ssize_t)sz); @@ -140,6 +208,50 @@ _kvm_read_phys(kvm_t *kd, uint64_t pa, v return (read(kd->pmfd, buf, bufsz)); } +/* + * Virtual core support (aka minidump). + */ + +static size_t +virt_addr2off(kvm_t *kd, uint64_t va, off_t *ofs, size_t pgsz) +{ + Elf64_Ehdr *e; + Elf64_Phdr *p; + int n; + + if (va < REGION_BASE(4)) + goto fail; + + e = (Elf64_Ehdr *)(kd->vmst->mmapbase); + n = e->e_phnum; + p = (Elf64_Phdr *)(void *)((uintptr_t)(void *)e + e->e_phoff); + while (n && (va < p->p_vaddr || va >= p->p_vaddr + p->p_memsz)) + p++, n--; + if (n == 0) + goto fail; + + *ofs = (va - p->p_vaddr) + p->p_offset; + if (pgsz == 0) + return (p->p_memsz - (va - p->p_vaddr)); + return (pgsz - ((size_t)va & (pgsz - 1))); + + fail: + _kvm_err(kd, kd->program, "invalid virtual address %#jx", + (uintmax_t)va); + return (0); +} + +static size_t +virt_kvatop(kvm_t *kd, uint64_t va, off_t *ofs) +{ + + return (virt_addr2off(kd, va, ofs, kd->vmst->pagesize)); +} + +/* + * KVM architecture support functions. + */ + void _kvm_freevtop(kvm_t *kd) { @@ -175,25 +287,31 @@ _kvm_initvtop(kvm_t *kd) kd->vmst->pagesize = 8192; #endif - if (_kvm_maphdrs(kd, sizeof(Elf64_Ehdr)) == -1) + if (ia64_maphdrs(kd, sizeof(Elf64_Ehdr)) == -1) return (-1); ehdr = kd->vmst->mmapbase; hdrsz = ehdr->e_phoff + ehdr->e_phentsize * ehdr->e_phnum; - if (_kvm_maphdrs(kd, hdrsz) == -1) + if (ia64_maphdrs(kd, hdrsz) == -1) return (-1); + kd->vmst->kvatop = (ehdr->e_flags & EF_IA_64_ABSOLUTE) ? + phys_kvatop : virt_kvatop; + /* * Load the PBVM page table. We need this to resolve PBVM addresses. * The PBVM page table is obtained from the bootinfo structure, of - * which the physical address is given to us in e_entry. If e_entry - * is 0, then this is assumed to be a pre-PBVM kernel. + * which the address is given to us in e_entry. If e_entry is 0, then + * this is assumed to be a pre-PBVM kernel. + * Note that the address of the bootinfo structure is either physical + * or virtual, depending on whether the core is physical or virtual. */ - if (ehdr->e_entry != 0) { - sz = _kvm_read_phys(kd, ehdr->e_entry, &bi, sizeof(bi)); + if (ehdr->e_entry != 0 && (ehdr->e_flags & EF_IA_64_ABSOLUTE) != 0) { + sz = phys_read(kd, ehdr->e_entry, &bi, sizeof(bi)); if (sz != sizeof(bi)) { _kvm_err(kd, kd->program, - "cannot read bootinfo from PA %#lx", ehdr->e_entry); + "cannot read bootinfo at physical address %#jx", + (uintmax_t)ehdr->e_entry); return (-1); } if (bi.bi_magic != BOOTINFO_MAGIC) { @@ -206,12 +324,12 @@ _kvm_initvtop(kvm_t *kd) return (-1); } kd->vmst->pbvm_pgtblsz = bi.bi_pbvm_pgtblsz; - sz = _kvm_read_phys(kd, bi.bi_pbvm_pgtbl, kd->vmst->pbvm_pgtbl, + sz = phys_read(kd, bi.bi_pbvm_pgtbl, kd->vmst->pbvm_pgtbl, bi.bi_pbvm_pgtblsz); if (sz != bi.bi_pbvm_pgtblsz) { _kvm_err(kd, kd->program, - "cannot read page table from PA %#lx", - bi.bi_pbvm_pgtbl); + "cannot read page table at physical address %#jx", + (uintmax_t)bi.bi_pbvm_pgtbl); return (-1); } } else { @@ -250,57 +368,8 @@ _kvm_initvtop(kvm_t *kd) int _kvm_kvatop(kvm_t *kd, u_long va, off_t *ofs) { - struct ia64_lpte pte; - uint64_t pa, pgaddr, pt0addr, pt1addr; - size_t pgno, pgsz, pt0no, pt1no; - - if (va >= REGION_BASE(6)) { - /* Regions 6 and 7: direct mapped. */ - pa = REGION_ADDR(va); - return (_kvm_pa2off(kd, pa, ofs, 0)); - } else if (va >= REGION_BASE(5)) { - /* Region 5: Kernel Virtual Memory. */ - va = REGION_ADDR(va); - pgsz = kd->vmst->pagesize; - pt0no = KPTE_DIR0_INDEX(va, pgsz); - pt1no = KPTE_DIR1_INDEX(va, pgsz); - pgno = KPTE_PTE_INDEX(va, pgsz); - if (pt0no >= NKPTEDIR(pgsz)) - goto fail; - pt0addr = kd->vmst->kptdir + (pt0no << 3); - if (kvm_read(kd, pt0addr, &pt1addr, 8) != 8) - goto fail; - if (pt1addr == 0) - goto fail; - pt1addr += pt1no << 3; - if (kvm_read(kd, pt1addr, &pgaddr, 8) != 8) - goto fail; - if (pgaddr == 0) - goto fail; - pgaddr += pgno * sizeof(pte); - if (kvm_read(kd, pgaddr, &pte, sizeof(pte)) != sizeof(pte)) - goto fail; - if (!(pte.pte & PTE_PRESENT)) - goto fail; - pa = (pte.pte & PTE_PPN_MASK) + (va & (pgsz - 1)); - return (_kvm_pa2off(kd, pa, ofs, pgsz)); - } else if (va >= PBVM_BASE) { - /* Region 4: Pre-Boot Virtual Memory (PBVM). */ - va -= PBVM_BASE; - pgsz = PBVM_PGSZ; - pt0no = va / pgsz; - if (pt0no >= (kd->vmst->pbvm_pgtblsz >> 3)) - goto fail; - pt0addr = kd->vmst->pbvm_pgtbl[pt0no]; - if (!(pt0addr & PTE_PRESENT)) - goto fail; - pa = (pt0addr & PTE_PPN_MASK) + va % pgsz; - return (_kvm_pa2off(kd, pa, ofs, pgsz)); - } + size_t sz; - fail: - _kvm_err(kd, kd->program, "invalid kernel virtual address %#llx", - (unsigned long long)va); - *ofs = ~0UL; - return (0); + sz = kd->vmst->kvatop(kd, va, ofs); + return (sz); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 02:38:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2962317; Sun, 29 Dec 2013 02:38:53 +0000 (UTC) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A1E111F16; Sun, 29 Dec 2013 02:38:53 +0000 (UTC) Received: from [192.168.2.84] (50-0-150-213.dsl.static.sonic.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.14.7/8.14.7) with ESMTP id rBT2cjDT009783 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 28 Dec 2013 18:38:46 -0800 (PST) (envelope-from marcel@xcllnt.net) Content-Type: multipart/signed; boundary="Apple-Mail=_97001C89-360F-484C-8ABD-E3955D2DC681"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r260022 - head/lib/libkvm From: Marcel Moolenaar In-Reply-To: Date: Sat, 28 Dec 2013 18:39:07 -0800 Message-Id: <28D86FF3-F13C-4EB1-AEED-4051F2944E27@xcllnt.net> References: <201312282301.rBSN1wWP002326@svn.freebsd.org> To: Peter Wemm X-Mailer: Apple Mail (2.1827) Cc: "svn-src-head@freebsd.org" , svn-src-all , Marcel Moolenaar , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 02:38:54 -0000 --Apple-Mail=_97001C89-360F-484C-8ABD-E3955D2DC681 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On Dec 28, 2013, at 4:40 PM, Peter Wemm wrote: > On Sat, Dec 28, 2013 at 4:04 PM, Peter Wemm wrote: >> On Sat, Dec 28, 2013 at 3:01 PM, Marcel Moolenaar = wrote: >>> Author: marcel >>> Date: Sat Dec 28 23:01:57 2013 >>> New Revision: 260022 >>> URL: http://svnweb.freebsd.org/changeset/base/260022 >>>=20 >>> Log: >>> Allow building a cross libkvm by setting TARGET_ARCH. The library = so >>> produced will be called libkvm-${ARCH} instead of libkvm. This = allows >>> installing it alongside the native version. >>> For symbol lookups, use ps_pglobal_lookup() instead of __fdnlist() >>> when building a cross libkvm. It is assumed that the cross tool = that >>> uses the cross libkvm also provides an implementation for this >>> proc_services function. >>>=20 >>> Note that this commit does not change any of the = architecture-specific >>> code for cross-compilation. >>=20 >> Are you sure about this? I just got a brand new buildworld failure on >> an amd64 machine. The lib32 build code was trying to use 64 bit pmap >> definitions and failed miserably. >>=20 >> I'm really sorry, I accidentally blew away the failure log. I'll = have >> another in a few minutes. >=20 >=20 > This is from stage5.1, the lib32 build: >=20 > /usr/src/lib/libkvm/kvm_amd64.c:78:2: error: unknown type name = 'pml4_entry_t' > pml4_entry_t *PML4; > ^ Ugh. I'll probably revert... --=20 Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_97001C89-360F-484C-8ABD-E3955D2DC681 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlK/i0sACgkQpgWlLWHuifbbaQCePPMca7t+AePCEMPey5nbJhZ8 1OEAmgLfdb2HVHmK8EqAvhSQYKeQjqnX =NDxM -----END PGP SIGNATURE----- --Apple-Mail=_97001C89-360F-484C-8ABD-E3955D2DC681-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 02:41:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E9FF477; Sun, 29 Dec 2013 02:41:34 +0000 (UTC) Received: from smtpauth2.wiscmail.wisc.edu (wmauth2.doit.wisc.edu [144.92.197.222]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC3041F74; Sun, 29 Dec 2013 02:41:33 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) id <0MYJ00600QJACC00@smtpauth2.wiscmail.wisc.edu>; Sat, 28 Dec 2013 20:41:25 -0600 (CST) X-Spam-PmxInfo: Server=avs-2, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.12.29.23314, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from wanderer.tachypleus.net (unknown [70.42.157.34]) by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0MYJ00MVXRFZ8C00@smtpauth2.wiscmail.wisc.edu>; Sat, 28 Dec 2013 20:41:25 -0600 (CST) Message-id: <52BF8BAD.40503@freebsd.org> Date: Sat, 28 Dec 2013 21:40:45 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 To: Alan Cox , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r259908 - head/sys/vm References: <201312260546.rBQ5kAoJ009798@svn.freebsd.org> <52BF6699.1040006@freebsd.org> <52BF7195.2070606@rice.edu> In-reply-to: <52BF7195.2070606@rice.edu> X-Enigmail-Version: 1.5.2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 02:41:34 -0000 On 12/28/13 19:49, Alan Cox wrote: > On 12/28/2013 18:02, Nathan Whitehorn wrote: >> On 12/26/13 00:46, Marcel Moolenaar wrote: >>> Author: marcel >>> Date: Thu Dec 26 05:46:10 2013 >>> New Revision: 259908 >>> URL: http://svnweb.freebsd.org/changeset/base/259908 >>> >>> Log: >>> For ia64, use pmap_remove_pages() and not pmap_remove(). The problem is >>> that we don't have a good way (yet) to iterate over the mapped pages by >>> virtual address and simply try each page within the range. Given that we >>> call pmap_remove() over the entire 2^63 bytes of address space, it takes >>> a while for pmap_remove to have tried all 2^50 pages. >>> By using pmap_remove_pages() we use the PV list to find all mappings. >>> >>> Change derived from a patch by: alc >>> >> Why make this ia64-specific? It seems like a potentially useful general >> optimization and certainly shouldn't be harmful on other architectures. > Some of the other implementations of pmap_remove_pages() have > limitations that don't permit them to be used for this purpose, e.g., > > if (pmap != PCPU_GET(curpmap)) { > printf("warning: pmap_remove_pages called with > non-current pmap\n"); > return; > } > > Alan > Fair enough. Thanks for the explanation. -Nathan From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 02:44:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B23F55FE; Sun, 29 Dec 2013 02:44:51 +0000 (UTC) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6854F1F98; Sun, 29 Dec 2013 02:44:51 +0000 (UTC) Received: from [192.168.2.84] (50-0-150-213.dsl.static.sonic.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.14.7/8.14.7) with ESMTP id rBT2inAM009816 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 28 Dec 2013 18:44:50 -0800 (PST) (envelope-from marcel@xcllnt.net) Content-Type: multipart/signed; boundary="Apple-Mail=_74A7F0B3-FBE7-45BE-9813-536FAE1F82CC"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r259908 - head/sys/vm From: Marcel Moolenaar In-Reply-To: <52BF6699.1040006@freebsd.org> Date: Sat, 28 Dec 2013 18:45:11 -0800 Message-Id: <14556BDB-35C3-49CE-896A-DEA8B1EB5B9C@xcllnt.net> References: <201312260546.rBQ5kAoJ009798@svn.freebsd.org> <52BF6699.1040006@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1827) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 02:44:51 -0000 --Apple-Mail=_74A7F0B3-FBE7-45BE-9813-536FAE1F82CC Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Dec 28, 2013, at 4:02 PM, Nathan Whitehorn wrote: > On 12/26/13 00:46, Marcel Moolenaar wrote: >> Author: marcel >> Date: Thu Dec 26 05:46:10 2013 >> New Revision: 259908 >> URL: http://svnweb.freebsd.org/changeset/base/259908 >> >> Log: >> For ia64, use pmap_remove_pages() and not pmap_remove(). The problem is >> that we don't have a good way (yet) to iterate over the mapped pages by >> virtual address and simply try each page within the range. Given that we >> call pmap_remove() over the entire 2^63 bytes of address space, it takes >> a while for pmap_remove to have tried all 2^50 pages. >> By using pmap_remove_pages() we use the PV list to find all mappings. >> >> Change derived from a patch by: alc >> > > Why make this ia64-specific? It seems like a potentially useful general > optimization and certainly shouldn't be harmful on other architectures. What alc@ said. Making it generic requires a bit more work and it's not clear to me whether it's a good change. Basically, ia64 fails to handle the pmap_remove() interface. So, for now I see it as a quick fix. What happens next is open. We're thinking of using the new trie code to track PTEs per PMAP. This helps to support pmap_remove() efficiently and may have other advantages. -- Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_74A7F0B3-FBE7-45BE-9813-536FAE1F82CC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlK/jLcACgkQpgWlLWHuifZwCACeKGw0BUH3uRFlN1ovJyHIwQdX MK0AmwZsBLfjxyaAaxKxRU75Jrmf6LCc =qidu -----END PGP SIGNATURE----- --Apple-Mail=_74A7F0B3-FBE7-45BE-9813-536FAE1F82CC-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 02:48:47 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FD6A76D; Sun, 29 Dec 2013 02:48:47 +0000 (UTC) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 25F301FAF; Sun, 29 Dec 2013 02:48:46 +0000 (UTC) Received: from [192.168.2.84] (50-0-150-213.dsl.static.sonic.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.14.7/8.14.7) with ESMTP id rBT2mjAk009829 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 28 Dec 2013 18:48:46 -0800 (PST) (envelope-from marcel@xcllnt.net) Content-Type: multipart/signed; boundary="Apple-Mail=_C64CA47F-5CF7-47E2-86C6-D8F3CB1A29DC"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r260022 - head/lib/libkvm From: Marcel Moolenaar In-Reply-To: <20131229010848.GV99167@funkthat.com> Date: Sat, 28 Dec 2013 18:49:07 -0800 Message-Id: <7F0C4872-DB2A-4E6B-A8B8-E366989312C5@xcllnt.net> References: <201312282301.rBSN1wWP002326@svn.freebsd.org> <20131229010848.GV99167@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1827) Cc: "svn-src-head@freebsd.org" , svn-src-all , Marcel Moolenaar , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 02:48:47 -0000 --Apple-Mail=_C64CA47F-5CF7-47E2-86C6-D8F3CB1A29DC Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Dec 28, 2013, at 5:08 PM, John-Mark Gurney wrote: > Marcel Moolenaar wrote this message on Sat, Dec 28, 2013 at 23:01 +0000: >> Author: marcel >> Date: Sat Dec 28 23:01:57 2013 >> New Revision: 260022 >> URL: http://svnweb.freebsd.org/changeset/base/260022 >> >> Log: >> Allow building a cross libkvm by setting TARGET_ARCH. The library so >> produced will be called libkvm-${ARCH} instead of libkvm. This allows >> installing it alongside the native version. >> For symbol lookups, use ps_pglobal_lookup() instead of __fdnlist() >> when building a cross libkvm. It is assumed that the cross tool that >> uses the cross libkvm also provides an implementation for this >> proc_services function. >> >> Note that this commit does not change any of the architecture-specific >> code for cross-compilation. > > Shouldn't we be putting cross compiled libaries in another location > than /lib? Kind of like the compat32 libs? I don't think we're there yet. libkvm is not ready for generic cross building and we don't really have the infrastructure for it either. For one, we really need to install CPU-specific headers on the host. We can manually cross-build a few things, like binutils and gdb and I see value to extend that to kgdb, but that's about it. -- Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_C64CA47F-5CF7-47E2-86C6-D8F3CB1A29DC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlK/jaMACgkQpgWlLWHuifZdDgCeLxsYJ1HhI7Ot18t2JRXq06fj jCQAn32Bqm2sKc75cQ7OPFqHKnO5Ltg3 =+Wnk -----END PGP SIGNATURE----- --Apple-Mail=_C64CA47F-5CF7-47E2-86C6-D8F3CB1A29DC-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 02:57:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05072A00; Sun, 29 Dec 2013 02:57:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E03391064; Sun, 29 Dec 2013 02:57:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBT2vCqv009857; Sun, 29 Dec 2013 02:57:12 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBT2vAHA009846; Sun, 29 Dec 2013 02:57:10 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312290257.rBT2vAHA009846@svn.freebsd.org> From: Julio Merino Date: Sun, 29 Dec 2013 02:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260029 - in stable/10: contrib/atf contrib/atf/admin contrib/atf/atf-c contrib/atf/atf-c++ contrib/atf/atf-c++/detail contrib/atf/atf-c/detail contrib/atf/atf-config contrib/atf/atf-re... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 02:57:13 -0000 Author: jmmv Date: Sun Dec 29 02:57:10 2013 New Revision: 260029 URL: http://svnweb.freebsd.org/changeset/base/260029 Log: Update atf to 0.18 and remove the code of the deprecated tools. This is a MFC into stable/10 of: - r258286 Update notes for imports of atf. - r258289 MFV: Import atf-0.18. - r258290 Drop all ATF tools code. This is "make tinderbox" clean as run on ref10-amd64 with the default WITHOUT_TESTS option. A "make buildworld" with WITH_TESTS set now works as well. Added: stable/10/contrib/atf/atf-c++/detail/auto_array.hpp - copied unchanged from r258289, head/contrib/atf/atf-c++/detail/auto_array.hpp stable/10/contrib/atf/atf-c++/detail/auto_array_test.cpp - copied unchanged from r258289, head/contrib/atf/atf-c++/detail/auto_array_test.cpp stable/10/contrib/atf/atf-c++/noncopyable.hpp - copied unchanged from r258289, head/contrib/atf/atf-c++/noncopyable.hpp stable/10/contrib/atf/atf-c++/utils.cpp - copied unchanged from r258289, head/contrib/atf/atf-c++/utils.cpp Deleted: stable/10/contrib/atf/Atffile stable/10/contrib/atf/Makefile.am stable/10/contrib/atf/Makefile.in stable/10/contrib/atf/admin/ stable/10/contrib/atf/atf-c++/Atffile stable/10/contrib/atf/atf-c++/Makefile.am.inc stable/10/contrib/atf/atf-c++/detail/Atffile stable/10/contrib/atf/atf-c++/detail/Makefile.am.inc stable/10/contrib/atf/atf-c/Atffile stable/10/contrib/atf/atf-c/Makefile.am.inc stable/10/contrib/atf/atf-c/detail/Atffile stable/10/contrib/atf/atf-c/detail/Makefile.am.inc stable/10/contrib/atf/atf-c/detail/test_helpers_test.c stable/10/contrib/atf/atf-config/ stable/10/contrib/atf/atf-report/ stable/10/contrib/atf/atf-run/ stable/10/contrib/atf/atf-sh/Atffile stable/10/contrib/atf/atf-sh/Makefile.am.inc stable/10/contrib/atf/atf-version/ stable/10/contrib/atf/bconfig.h.in stable/10/contrib/atf/configure stable/10/contrib/atf/configure.ac stable/10/contrib/atf/doc/Makefile.am.inc stable/10/contrib/atf/doc/atf-formats.5 stable/10/contrib/atf/doc/atf.7.in stable/10/contrib/atf/test-programs/Atffile stable/10/contrib/atf/test-programs/Makefile.am.inc stable/10/contrib/atf/test-programs/fork_test.sh Modified: stable/10/contrib/atf/FREEBSD-Xlist stable/10/contrib/atf/FREEBSD-upgrade stable/10/contrib/atf/NEWS stable/10/contrib/atf/atf-c++.hpp stable/10/contrib/atf/atf-c++/atf-c++-api.3 stable/10/contrib/atf/atf-c++/check.hpp stable/10/contrib/atf/atf-c++/check_test.cpp stable/10/contrib/atf/atf-c++/detail/Kyuafile stable/10/contrib/atf/atf-c++/detail/parser.hpp stable/10/contrib/atf/atf-c++/detail/process.cpp stable/10/contrib/atf/atf-c++/detail/process.hpp stable/10/contrib/atf/atf-c++/detail/test_helpers.cpp stable/10/contrib/atf/atf-c++/detail/test_helpers.hpp stable/10/contrib/atf/atf-c++/macros_test.cpp stable/10/contrib/atf/atf-c++/pkg_config_test.sh stable/10/contrib/atf/atf-c++/tests.cpp stable/10/contrib/atf/atf-c++/tests.hpp stable/10/contrib/atf/atf-c++/utils.hpp stable/10/contrib/atf/atf-c++/utils_test.cpp stable/10/contrib/atf/atf-c.h stable/10/contrib/atf/atf-c/atf-c-api.3 stable/10/contrib/atf/atf-c/check_test.c stable/10/contrib/atf/atf-c/detail/Kyuafile stable/10/contrib/atf/atf-c/detail/process_test.c stable/10/contrib/atf/atf-c/detail/sanity_test.c stable/10/contrib/atf/atf-c/detail/test_helpers.c stable/10/contrib/atf/atf-c/detail/test_helpers.h stable/10/contrib/atf/atf-c/macros.h stable/10/contrib/atf/atf-c/macros_test.c stable/10/contrib/atf/atf-c/pkg_config_test.sh stable/10/contrib/atf/atf-c/utils.c stable/10/contrib/atf/atf-c/utils.h stable/10/contrib/atf/atf-c/utils_test.c stable/10/contrib/atf/atf-sh/atf-check.cpp stable/10/contrib/atf/atf-sh/atf-check_test.sh stable/10/contrib/atf/atf-sh/atf-sh-api.3 stable/10/contrib/atf/atf-sh/atf-sh.1 stable/10/contrib/atf/atf-sh/atf_check_test.sh stable/10/contrib/atf/atf-sh/misc_helpers.sh stable/10/contrib/atf/bconfig.h stable/10/contrib/atf/test-programs/Kyuafile stable/10/contrib/atf/test-programs/c_helpers.c stable/10/contrib/atf/test-programs/cpp_helpers.cpp stable/10/contrib/atf/test-programs/sh_helpers.sh stable/10/lib/atf/libatf-c++/Makefile stable/10/lib/atf/libatf-c/tests/Makefile stable/10/lib/atf/tests/test-programs/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/atf/FREEBSD-Xlist ============================================================================== --- stable/10/contrib/atf/FREEBSD-Xlist Sun Dec 29 02:31:40 2013 (r260028) +++ stable/10/contrib/atf/FREEBSD-Xlist Sun Dec 29 02:57:10 2013 (r260029) @@ -1,8 +1,21 @@ +*/*/Atffile +*/*/Makefile* +*/Atffile +*/Makefile* +Atffile +INSTALL +Makefile* +aclocal.m4 +admin/ +atf-*/atf-*.m4 +atf-*/atf-*.pc.in +atf-config/ +atf-report/ +atf-run/ +atf-version/ +bconfig.h.in bootstrap/ -config.log -config.status -libtool -Makefile -stamp-h1 -*/*/.deps/ -*/.deps/ +configure* +doc/atf-formats.5 +doc/atf.7.in +m4/ Modified: stable/10/contrib/atf/FREEBSD-upgrade ============================================================================== --- stable/10/contrib/atf/FREEBSD-upgrade Sun Dec 29 02:31:40 2013 (r260028) +++ stable/10/contrib/atf/FREEBSD-upgrade Sun Dec 29 02:57:10 2013 (r260029) @@ -1,28 +1,48 @@ $FreeBSD$ -atf +This document contains a collection of notes specific to the import +of atf into head. These notes are built on the instructions in +the FreeBSD Subversion Primer that detail how to deal with vendor +branches and you are supposed to follow those: -The source code is hosted on GoogleCode as a subcomponent of the Kyua project: + http://www.freebsd.org/doc/en/articles/committers-guide/subversion-primer.html - http://code.google.com/p/kyua/downloads/list - -For the contrib directory, the sources were initially prepared like so: - - ./configure --prefix=/ --exec-prefix=/usr --datarootdir=/usr/share +The ATF source code is hosted on Google Code as a subcomponent of the +Kyua project: -For the contrib directory, files and directories were pruned by: - -sh -c 'for F in `cat FREEBSD-Xlist`; do rm -rf ./$F ; done' + http://code.google.com/p/kyua/downloads/list -You may check if there are any new files that we don't need. +and is imported into the atf vendor branch (see base/vendor/atf/). -The instructions for importing new release and merging to HEAD can be found -at FreeBSD wiki: +To merge the vendor branch into head do something like this: - http://wiki.freebsd.org/SubversionPrimer/VendorImports + cd .../base/head/contrib/atf + svn merge --accept=postpone \ + svn+ssh://svn.freebsd.org/base/vendor/atf/dist . + svn remove --force $(cat FREEBSD-Xlist) + +and resolve any conflicts that may arise at this point. + +Once this is done, you must regenerate bconfig.h. The recommended way +of doing so is by using the release files already imported into the +vendor branch (which is a good justification for importing the verbatim +sources in the first place so that this step is reproducible). You can +use a set of commands similar to the following: + + mkdir /tmp/atf + cd /tmp/atf + .../vendor/atf/dist/configure \ + --prefix=/ \ + --exec-prefix=/usr \ + --datarootdir=/usr/share + cp bconfig.h .../base/head/contrib/atf/ + +Please do NOT run './configure' straight from the 'dist' directory of +the vendor branch as you easily risk committing build products into the +tree. -To make local changes to atf, simply patch and commit to the trunk -branch (aka HEAD). Never make local changes on the vendor branch. +Lastly, with the list of old and new files in this import, make sure +to udpate the reachover Makefiles accordingly. -gcooper@FreeBSD.org -5-August-2012 +Test the build (keeping in mind the WITH_TESTS/WITHOUT_TESTS knobs) and, +if all looks good, you are ready to commit all the changes in one go. Modified: stable/10/contrib/atf/NEWS ============================================================================== --- stable/10/contrib/atf/NEWS Sun Dec 29 02:31:40 2013 (r260028) +++ stable/10/contrib/atf/NEWS Sun Dec 29 02:57:10 2013 (r260029) @@ -2,6 +2,58 @@ Major changes between releases =========================================================================== +Changes in version 0.18 +*********************** + +Experimental version released on November 16th, 2013. + +* Issue 45: Added require.memory support in atf-run for FreeBSD. + +* Fixed an issue with the handling of cin with libc++. + +* Issue 64: Fixed various mandoc formatting warnings. + +* NetBSD PR bin/48284: Made atf-check flush its progress message to + stdout so that an interrupted test case always shows the last message + being executed. + +* NetBSD PR bin/48285: Fixed atf_check examples in atf-sh-api(3). + + +Changes in version 0.17 +*********************** + +Experimental version released on February 14th, 2013. + +* Added the atf_utils_cat_file, atf_utils_compare_file, + atf_utils_copy_file, atf_utils_create_file, atf_utils_file_exists, + atf_utils_fork, atf_utils_grep_file, atf_utils_grep_string, + atf_utils_readline, atf_utils_redirect and atf_utils_wait utility + functions to atf-c-api. Documented the already-public + atf_utils_free_charpp function. + +* Added the cat_file, compare_file, copy_file, create_file, file_exists, + fork, grep_collection, grep_file, grep_string, redirect and wait + functions to the atf::utils namespace of atf-c++-api. These are + wrappers around the same functions added to the atf-c-api library. + +* Added the ATF_CHECK_MATCH, ATF_CHECK_MATCH_MSG, ATF_REQUIRE_MATCH and + ATF_REQUIRE_MATCH_MSG macros to atf-c to simplify the validation of a + string against a regular expression. + +* Miscellaneous fixes for manpage typos and compilation problems with + clang. + +* Added caching of the results of those configure tests that rely on + executing a test program. This should help crossbuild systems by + providing a mechanism to pre-specify what the results should be. + +* PR bin/45690: Make atf-report convert any non-printable characters to + a plain-text representation (matching their corresponding hexadecimal + entities) in XML output files. This is to prevent the output of test + cases from breaking xsltproc later. + + Changes in version 0.16 *********************** Modified: stable/10/contrib/atf/atf-c++.hpp ============================================================================== --- stable/10/contrib/atf/atf-c++.hpp Sun Dec 29 02:31:40 2013 (r260028) +++ stable/10/contrib/atf/atf-c++.hpp Sun Dec 29 02:57:10 2013 (r260029) @@ -31,5 +31,6 @@ #define _ATF_CXX_HPP_ #include +#include #endif // !defined(_ATF_CXX_HPP_) Modified: stable/10/contrib/atf/atf-c++/atf-c++-api.3 ============================================================================== --- stable/10/contrib/atf/atf-c++/atf-c++-api.3 Sun Dec 29 02:31:40 2013 (r260028) +++ stable/10/contrib/atf/atf-c++/atf-c++-api.3 Sun Dec 29 02:57:10 2013 (r260029) @@ -26,10 +26,11 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 21, 2012 +.Dd November 15, 2013 .Dt ATF-C++-API 3 .Os .Sh NAME +.Nm atf-c++-api , .Nm ATF_ADD_TEST_CASE , .Nm ATF_CHECK_ERRNO , .Nm ATF_FAIL , @@ -52,6 +53,17 @@ .Nm ATF_TEST_CASE_USE , .Nm ATF_TEST_CASE_WITH_CLEANUP , .Nm ATF_TEST_CASE_WITHOUT_HEAD , +.Nm atf::utils::cat_file , +.Nm atf::utils::compare_file , +.Nm atf::utils::copy_file , +.Nm atf::utils::create_file , +.Nm atf::utils::file_exists , +.Nm atf::utils::fork , +.Nm atf::utils::grep_collection , +.Nm atf::utils::grep_file , +.Nm atf::utils::grep_string , +.Nm atf::utils::redirect , +.Nm atf::utils::wait .Nd C++ API to write ATF-based test programs .Sh SYNOPSIS .In atf-c++.hpp @@ -77,18 +89,64 @@ .Fn ATF_TEST_CASE_USE "name" .Fn ATF_TEST_CASE_WITH_CLEANUP "name" .Fn ATF_TEST_CASE_WITHOUT_HEAD "name" +.Ft void +.Fo atf::utils::cat_file +.Fa "const std::string& path" +.Fa "const std::string& prefix" +.Fc +.Ft bool +.Fo atf::utils::compare_file +.Fa "const std::string& path" +.Fa "const std::string& contents" +.Fc +.Ft void +.Fo atf::utils::copy_file +.Fa "const std::string& source" +.Fa "const std::string& destination" +.Fc +.Ft void +.Fo atf::utils::create_file +.Fa "const std::string& path" +.Fa "const std::string& contents" +.Fc +.Ft void +.Fo atf::utils::file_exists +.Fa "const std::string& path" +.Fc +.Ft pid_t +.Fo atf::utils::fork +.Fa "void" +.Fc +.Ft bool +.Fo atf::utils::grep_collection +.Fa "const std::string& regexp" +.Fa "const Collection& collection" +.Fc +.Ft bool +.Fo atf::utils::grep_file +.Fa "const std::string& regexp" +.Fa "const std::string& path" +.Fc +.Ft bool +.Fo atf::utils::grep_string +.Fa "const std::string& regexp" +.Fa "const std::string& path" +.Fc +.Ft void +.Fo atf::utils::redirect +.Fa "const int fd" +.Fa "const std::string& path" +.Fc +.Ft void +.Fo atf::utils::wait +.Fa "const pid_t pid" +.Fa "const int expected_exit_status" +.Fa "const std::string& expected_stdout" +.Fa "const std::string& expected_stderr" +.Fc .Sh DESCRIPTION -ATF provides a mostly-macro-based programming interface to implement test -programs in C or C++. -This interface is backed by a C++ implementation, but this fact is -hidden from the developer as much as possible through the use of -macros to simplify programming. -However, the use of C++ is not hidden everywhere and while you can -implement test cases without knowing anything at all about the object model -underneath the provided calls, you might need some minimum notions of the -language in very specific circumstances. -.Pp -C++-based test programs always follow this template: +ATF provides a C++ programming interface to implement test programs. +C++-based test programs follow this template: .Bd -literal -offset indent extern "C" { .Ns ... C-specific includes go here ... @@ -205,7 +263,7 @@ The first parameter of this macro matche former call. .Ss Header definitions The test case's header can define the meta-data by using the -.Fn set +.Fn set_md_var method, which takes two parameters: the first one specifies the meta-data variable to be set and the second one specifies its value. Both of them are strings. @@ -348,7 +406,7 @@ in the collection. .Fn ATF_REQUIRE_THROW takes the name of an exception and a statement and raises a failure if the statement does not throw the specified exception. -.Fn ATF_REQUIRE_THROW_EQ +.Fn ATF_REQUIRE_THROW_RE takes the name of an exception, a regular expresion and a statement and raises a failure if the statement does not throw the specified exception and if the message of the exception does not match the regular expression. @@ -362,6 +420,163 @@ variable and, second, a boolean expressi means that a call failed and .Va errno has to be checked against the first value. +.Ss Utility functions +The following functions are provided as part of the +.Nm +API to simplify the creation of a variety of tests. +In particular, these are useful to write tests for command-line interfaces. +.Pp +.Ft void +.Fo atf::utils::cat_file +.Fa "const std::string& path" +.Fa "const std::string& prefix" +.Fc +.Bd -ragged -offset indent +Prints the contents of +.Fa path +to the standard output, prefixing every line with the string in +.Fa prefix . +.Ed +.Pp +.Ft bool +.Fo atf::utils::compare_file +.Fa "const std::string& path" +.Fa "const std::string& contents" +.Fc +.Bd -ragged -offset indent +Returns true if the given +.Fa path +matches exactly the expected inlined +.Fa contents . +.Ed +.Pp +.Ft void +.Fo atf::utils::copy_file +.Fa "const std::string& source" +.Fa "const std::string& destination" +.Fc +.Bd -ragged -offset indent +Copies the file +.Fa source +to +.Fa destination . +The permissions of the file are preserved during the code. +.Ed +.Pp +.Ft void +.Fo atf::utils::create_file +.Fa "const std::string& path" +.Fa "const std::string& contents" +.Fc +.Bd -ragged -offset indent +Creates +.Fa file +with the text given in +.Fa contents . +.Ed +.Pp +.Ft void +.Fo atf::utils::file_exists +.Fa "const std::string& path" +.Fc +.Bd -ragged -offset indent +Checks if +.Fa path +exists. +.Ed +.Pp +.Ft pid_t +.Fo atf::utils::fork +.Fa "void" +.Fc +.Bd -ragged -offset indent +Forks a process and redirects the standard output and standard error of the +child to files for later validation with +.Fn atf::utils::wait . +Fails the test case if the fork fails, so this does not return an error. +.Ed +.Pp +.Ft bool +.Fo atf::utils::grep_collection +.Fa "const std::string& regexp" +.Fa "const Collection& collection" +.Fc +.Bd -ragged -offset indent +Searches for the regular expression +.Fa regexp +in any of the strings contained in the +.Fa collection . +This is a template that accepts any one-dimensional container of strings. +.Ed +.Pp +.Ft bool +.Fo atf::utils::grep_file +.Fa "const std::string& regexp" +.Fa "const std::string& path" +.Fc +.Bd -ragged -offset indent +Searches for the regular expression +.Fa regexp +in the file +.Fa path . +The variable arguments are used to construct the regular expression. +.Ed +.Pp +.Ft bool +.Fo atf::utils::grep_string +.Fa "const std::string& regexp" +.Fa "const std::string& str" +.Fc +.Bd -ragged -offset indent +Searches for the regular expression +.Fa regexp +in the string +.Fa str . +.Ed +.Ft void +.Fo atf::utils::redirect +.Fa "const int fd" +.Fa "const std::string& path" +.Fc +.Bd -ragged -offset indent +Redirects the given file descriptor +.Fa fd +to the file +.Fa path . +This function exits the process in case of an error and does not properly mark +the test case as failed. +As a result, it should only be used in subprocesses of the test case; specially +those spawned by +.Fn atf::utils::fork . +.Ed +.Pp +.Ft void +.Fo atf::utils::wait +.Fa "const pid_t pid" +.Fa "const int expected_exit_status" +.Fa "const std::string& expected_stdout" +.Fa "const std::string& expected_stderr" +.Fc +.Bd -ragged -offset indent +Waits and validates the result of a subprocess spawned with +.Fn atf::utils::wait . +The validation involves checking that the subprocess exited cleanly and returned +the code specified in +.Fa expected_exit_status +and that its standard output and standard error match the strings given in +.Fa expected_stdout +and +.Fa expected_stderr . +.Pp +If any of the +.Fa expected_stdout +or +.Fa expected_stderr +strings are prefixed with +.Sq save: , +then they specify the name of the file into which to store the stdout or stderr +of the subprocess, and no comparison is performed. +.Ed .Sh EXAMPLES The following shows a complete test program with a single test case that validates the addition operator: @@ -371,7 +586,7 @@ validates the addition operator: ATF_TEST_CASE(addition); ATF_TEST_CASE_HEAD(addition) { - set("descr", "Sample tests for the addition operator"); + set_md_var("descr", "Sample tests for the addition operator"); } ATF_TEST_CASE_BODY(addition) { @@ -387,7 +602,7 @@ ATF_TEST_CASE_BODY(addition) ATF_TEST_CASE(open_failure); ATF_TEST_CASE_HEAD(open_failure) { - set("descr", "Sample tests for the open function"); + set_md_var("descr", "Sample tests for the open function"); } ATF_TEST_CASE_BODY(open_failure) { @@ -397,7 +612,7 @@ ATF_TEST_CASE_BODY(open_failure) ATF_TEST_CASE(known_bug); ATF_TEST_CASE_HEAD(known_bug) { - set("descr", "Reproduces a known bug"); + set_md_var("descr", "Reproduces a known bug"); } ATF_TEST_CASE_BODY(known_bug) { Modified: stable/10/contrib/atf/atf-c++/check.hpp ============================================================================== --- stable/10/contrib/atf/atf-c++/check.hpp Sun Dec 29 02:31:40 2013 (r260028) +++ stable/10/contrib/atf/atf-c++/check.hpp Sun Dec 29 02:57:10 2013 (r260029) @@ -39,7 +39,7 @@ extern "C" { #include #include -#include +#include namespace atf { @@ -60,7 +60,7 @@ namespace check { //! of executing arbitrary command and manages files containing //! its output. //! -class check_result : utils::noncopyable { +class check_result : noncopyable { //! //! \brief Internal representation of a result. //! Modified: stable/10/contrib/atf/atf-c++/check_test.cpp ============================================================================== --- stable/10/contrib/atf/atf-c++/check_test.cpp Sun Dec 29 02:31:40 2013 (r260028) +++ stable/10/contrib/atf/atf-c++/check_test.cpp Sun Dec 29 02:57:10 2013 (r260029) @@ -193,15 +193,15 @@ ATF_TEST_CASE_BODY(build_c_o) { ATF_TEST_CASE_USE(h_build_c_o_ok); run_h_tc< ATF_TEST_CASE_NAME(h_build_c_o_ok) >(); - ATF_REQUIRE(grep_file("stdout", "-o test.o")); - ATF_REQUIRE(grep_file("stdout", "-c test.c")); + ATF_REQUIRE(atf::utils::grep_file("-o test.o", "stdout")); + ATF_REQUIRE(atf::utils::grep_file("-c test.c", "stdout")); ATF_TEST_CASE_USE(h_build_c_o_fail); run_h_tc< ATF_TEST_CASE_NAME(h_build_c_o_fail) >(); - ATF_REQUIRE(grep_file("stdout", "-o test.o")); - ATF_REQUIRE(grep_file("stdout", "-c test.c")); - ATF_REQUIRE(grep_file("stderr", "test.c")); - ATF_REQUIRE(grep_file("stderr", "UNDEFINED_SYMBOL")); + ATF_REQUIRE(atf::utils::grep_file("-o test.o", "stdout")); + ATF_REQUIRE(atf::utils::grep_file("-c test.c", "stdout")); + ATF_REQUIRE(atf::utils::grep_file("test.c", "stderr")); + ATF_REQUIRE(atf::utils::grep_file("UNDEFINED_SYMBOL", "stderr")); } ATF_TEST_CASE(build_cpp); @@ -213,16 +213,16 @@ ATF_TEST_CASE_BODY(build_cpp) { ATF_TEST_CASE_USE(h_build_cpp_ok); run_h_tc< ATF_TEST_CASE_NAME(h_build_cpp_ok) >(); - ATF_REQUIRE(grep_file("stdout", "-o.*test.p")); - ATF_REQUIRE(grep_file("stdout", "test.c")); - ATF_REQUIRE(grep_file("test.p", "foo bar")); + ATF_REQUIRE(atf::utils::grep_file("-o.*test.p", "stdout")); + ATF_REQUIRE(atf::utils::grep_file("test.c", "stdout")); + ATF_REQUIRE(atf::utils::grep_file("foo bar", "test.p")); ATF_TEST_CASE_USE(h_build_cpp_fail); run_h_tc< ATF_TEST_CASE_NAME(h_build_cpp_fail) >(); - ATF_REQUIRE(grep_file("stdout", "-o test.p")); - ATF_REQUIRE(grep_file("stdout", "test.c")); - ATF_REQUIRE(grep_file("stderr", "test.c")); - ATF_REQUIRE(grep_file("stderr", "non-existent.h")); + ATF_REQUIRE(atf::utils::grep_file("-o test.p", "stdout")); + ATF_REQUIRE(atf::utils::grep_file("test.c", "stdout")); + ATF_REQUIRE(atf::utils::grep_file("test.c", "stderr")); + ATF_REQUIRE(atf::utils::grep_file("non-existent.h", "stderr")); } ATF_TEST_CASE(build_cxx_o); @@ -234,15 +234,15 @@ ATF_TEST_CASE_BODY(build_cxx_o) { ATF_TEST_CASE_USE(h_build_cxx_o_ok); run_h_tc< ATF_TEST_CASE_NAME(h_build_cxx_o_ok) >(); - ATF_REQUIRE(grep_file("stdout", "-o test.o")); - ATF_REQUIRE(grep_file("stdout", "-c test.cpp")); + ATF_REQUIRE(atf::utils::grep_file("-o test.o", "stdout")); + ATF_REQUIRE(atf::utils::grep_file("-c test.cpp", "stdout")); ATF_TEST_CASE_USE(h_build_cxx_o_fail); run_h_tc< ATF_TEST_CASE_NAME(h_build_cxx_o_fail) >(); - ATF_REQUIRE(grep_file("stdout", "-o test.o")); - ATF_REQUIRE(grep_file("stdout", "-c test.cpp")); - ATF_REQUIRE(grep_file("stderr", "test.cpp")); - ATF_REQUIRE(grep_file("stderr", "UNDEFINED_SYMBOL")); + ATF_REQUIRE(atf::utils::grep_file("-o test.o", "stdout")); + ATF_REQUIRE(atf::utils::grep_file("-c test.cpp", "stdout")); + ATF_REQUIRE(atf::utils::grep_file("test.cpp", "stderr")); + ATF_REQUIRE(atf::utils::grep_file("UNDEFINED_SYMBOL", "stderr")); } ATF_TEST_CASE(exec_cleanup); Modified: stable/10/contrib/atf/atf-c++/detail/Kyuafile ============================================================================== --- stable/10/contrib/atf/atf-c++/detail/Kyuafile Sun Dec 29 02:31:40 2013 (r260028) +++ stable/10/contrib/atf/atf-c++/detail/Kyuafile Sun Dec 29 02:57:10 2013 (r260029) @@ -3,6 +3,7 @@ syntax("kyuafile", 1) test_suite("atf") atf_test_program{name="application_test"} +atf_test_program{name="auto_array_test"} atf_test_program{name="env_test"} atf_test_program{name="exceptions_test"} atf_test_program{name="expand_test"} Copied: stable/10/contrib/atf/atf-c++/detail/auto_array.hpp (from r258289, head/contrib/atf/atf-c++/detail/auto_array.hpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/atf/atf-c++/detail/auto_array.hpp Sun Dec 29 02:57:10 2013 (r260029, copy of r258289, head/contrib/atf/atf-c++/detail/auto_array.hpp) @@ -0,0 +1,179 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 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. +// + +#if !defined(_ATF_CXX_AUTO_ARRAY_HPP_) +#define _ATF_CXX_AUTO_ARRAY_HPP_ + +#include + +namespace atf { + +// ------------------------------------------------------------------------ +// The "auto_array" class. +// ------------------------------------------------------------------------ + +template< class T > +struct auto_array_ref { + T* m_ptr; + + explicit auto_array_ref(T*); +}; + +template< class T > +auto_array_ref< T >::auto_array_ref(T* ptr) : + m_ptr(ptr) +{ +} + +template< class T > +class auto_array { + T* m_ptr; + +public: + auto_array(T* = NULL) throw(); + auto_array(auto_array< T >&) throw(); + auto_array(auto_array_ref< T >) throw(); + ~auto_array(void) throw(); + + T* get(void) throw(); + const T* get(void) const throw(); + T* release(void) throw(); + void reset(T* = NULL) throw(); + + auto_array< T >& operator=(auto_array< T >&) throw(); + auto_array< T >& operator=(auto_array_ref< T >) throw(); + + T& operator[](int) throw(); + operator auto_array_ref< T >(void) throw(); +}; + +template< class T > +auto_array< T >::auto_array(T* ptr) + throw() : + m_ptr(ptr) +{ +} + +template< class T > +auto_array< T >::auto_array(auto_array< T >& ptr) + throw() : + m_ptr(ptr.release()) +{ +} + +template< class T > +auto_array< T >::auto_array(auto_array_ref< T > ref) + throw() : + m_ptr(ref.m_ptr) +{ +} + +template< class T > +auto_array< T >::~auto_array(void) + throw() +{ + if (m_ptr != NULL) + delete [] m_ptr; +} + +template< class T > +T* +auto_array< T >::get(void) + throw() +{ + return m_ptr; +} + +template< class T > +const T* +auto_array< T >::get(void) + const throw() +{ + return m_ptr; +} + +template< class T > +T* +auto_array< T >::release(void) + throw() +{ + T* ptr = m_ptr; + m_ptr = NULL; + return ptr; +} + +template< class T > +void +auto_array< T >::reset(T* ptr) + throw() +{ + if (m_ptr != NULL) + delete [] m_ptr; + m_ptr = ptr; +} + +template< class T > +auto_array< T >& +auto_array< T >::operator=(auto_array< T >& ptr) + throw() +{ + reset(ptr.release()); + return *this; +} + +template< class T > +auto_array< T >& +auto_array< T >::operator=(auto_array_ref< T > ref) + throw() +{ + if (m_ptr != ref.m_ptr) { + delete [] m_ptr; + m_ptr = ref.m_ptr; + } + return *this; +} + +template< class T > +T& +auto_array< T >::operator[](int pos) + throw() +{ + return m_ptr[pos]; +} + +template< class T > +auto_array< T >::operator auto_array_ref< T >(void) + throw() +{ + return auto_array_ref< T >(release()); +} + +} // namespace atf + +#endif // !defined(_ATF_CXX_AUTO_ARRAY_HPP_) Copied: stable/10/contrib/atf/atf-c++/detail/auto_array_test.cpp (from r258289, head/contrib/atf/atf-c++/detail/auto_array_test.cpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/atf/atf-c++/detail/auto_array_test.cpp Sun Dec 29 02:57:10 2013 (r260029, copy of r258289, head/contrib/atf/atf-c++/detail/auto_array_test.cpp) @@ -0,0 +1,304 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 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. +// + +extern "C" { +#include +} + +#include + +#include "atf-c/defs.h" + +#include "../macros.hpp" + +#include "auto_array.hpp" + +// ------------------------------------------------------------------------ +// Tests for the "auto_array" class. +// ------------------------------------------------------------------------ + +class test_array { +public: + int m_value; + + static ssize_t m_nblocks; + + static + atf::auto_array< test_array > + do_copy(atf::auto_array< test_array >& ta) + { + return atf::auto_array< test_array >(ta); + } + + void* operator new(size_t size ATF_DEFS_ATTRIBUTE_UNUSED) + { + ATF_FAIL("New called but should have been new[]"); + return new int(5); + } + + void* operator new[](size_t size) + { + m_nblocks++; + void* mem = ::operator new(size); + std::cout << "Allocated 'test_array' object " << mem << "\n"; + return mem; + } + + void operator delete(void* mem ATF_DEFS_ATTRIBUTE_UNUSED) + { + ATF_FAIL("Delete called but should have been delete[]"); + } + + void operator delete[](void* mem) + { + std::cout << "Releasing 'test_array' object " << mem << "\n"; + if (m_nblocks == 0) + ATF_FAIL("Unbalanced delete[]"); + m_nblocks--; + ::operator delete(mem); + } +}; + +ssize_t test_array::m_nblocks = 0; + +ATF_TEST_CASE(auto_array_scope); +ATF_TEST_CASE_HEAD(auto_array_scope) +{ + set_md_var("descr", "Tests the automatic scope handling in the " + "auto_array smart pointer class"); +} +ATF_TEST_CASE_BODY(auto_array_scope) +{ + using atf::auto_array; + + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + { + auto_array< test_array > t(new test_array[10]); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); +} + +ATF_TEST_CASE(auto_array_copy); +ATF_TEST_CASE_HEAD(auto_array_copy) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' copy " + "constructor"); +} +ATF_TEST_CASE_BODY(auto_array_copy) +{ + using atf::auto_array; + + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + { + auto_array< test_array > t1(new test_array[10]); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + + { + auto_array< test_array > t2(t1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); +} + +ATF_TEST_CASE(auto_array_copy_ref); +ATF_TEST_CASE_HEAD(auto_array_copy_ref) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' copy " + "constructor through the auxiliary auto_array_ref object"); +} +ATF_TEST_CASE_BODY(auto_array_copy_ref) +{ + using atf::auto_array; + + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + { + auto_array< test_array > t1(new test_array[10]); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + + { + auto_array< test_array > t2 = test_array::do_copy(t1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); +} + +ATF_TEST_CASE(auto_array_get); +ATF_TEST_CASE_HEAD(auto_array_get) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' get " + "method"); +} +ATF_TEST_CASE_BODY(auto_array_get) +{ + using atf::auto_array; + + test_array* ta = new test_array[10]; + auto_array< test_array > t(ta); + ATF_REQUIRE_EQ(t.get(), ta); +} + +ATF_TEST_CASE(auto_array_release); +ATF_TEST_CASE_HEAD(auto_array_release) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' release " + "method"); +} +ATF_TEST_CASE_BODY(auto_array_release) +{ + using atf::auto_array; + + test_array* ta1 = new test_array[10]; + { + auto_array< test_array > t(ta1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + test_array* ta2 = t.release(); + ATF_REQUIRE_EQ(ta2, ta1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + delete [] ta1; +} + +ATF_TEST_CASE(auto_array_reset); +ATF_TEST_CASE_HEAD(auto_array_reset) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' reset " + "method"); +} +ATF_TEST_CASE_BODY(auto_array_reset) +{ + using atf::auto_array; + + test_array* ta1 = new test_array[10]; + test_array* ta2 = new test_array[10]; + ATF_REQUIRE_EQ(test_array::m_nblocks, 2); + + { + auto_array< test_array > t(ta1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 2); + t.reset(ta2); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + t.reset(); + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); +} + +ATF_TEST_CASE(auto_array_assign); +ATF_TEST_CASE_HEAD(auto_array_assign) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' " + "assignment operator"); +} +ATF_TEST_CASE_BODY(auto_array_assign) +{ + using atf::auto_array; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 03:15:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECA89E8F; Sun, 29 Dec 2013 03:15:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D9816121D; Sun, 29 Dec 2013 03:15:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBT3FFTR017381; Sun, 29 Dec 2013 03:15:15 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBT3FFlx017380; Sun, 29 Dec 2013 03:15:15 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201312290315.rBT3FFlx017380@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 29 Dec 2013 03:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260030 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 03:15:16 -0000 Author: marcel Date: Sun Dec 29 03:15:15 2013 New Revision: 260030 URL: http://svnweb.freebsd.org/changeset/base/260030 Log: Revert part of r260022: LIB32 builds were broken by it. Modified: head/lib/libkvm/Makefile Modified: head/lib/libkvm/Makefile ============================================================================== --- head/lib/libkvm/Makefile Sun Dec 29 02:57:10 2013 (r260029) +++ head/lib/libkvm/Makefile Sun Dec 29 03:15:15 2013 (r260030) @@ -1,35 +1,23 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ -.if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} -.else -TARGET_ARCH=${MACHINE_ARCH} -TARGET_CPUARCH=${MACHINE_CPUARCH} -.endif - -.if ${TARGET_ARCH} != ${MACHINE_ARCH} -LIB= kvm-${TARGET_ARCH} -CFLAGS+=-DCROSS_LIBKVM -.else LIB= kvm -.endif - SHLIBDIR?= /lib SHLIB_MAJOR= 6 CFLAGS+=-DLIBC_SCCS -I${.CURDIR} -.if exists(${.CURDIR}/kvm_${TARGET_ARCH}.c) -KVM_ARCH=${TARGET_ARCH} +.if exists(${.CURDIR}/kvm_${MACHINE_ARCH}.c) +KVM_ARCH=${MACHINE_ARCH} .else -KVM_ARCH=${TARGET_CPUARCH} +KVM_ARCH=${MACHINE_CPUARCH} .endif WARNS?= 3 SRCS= kvm.c kvm_${KVM_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \ kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c -.if exists(${.CURDIR}/kvm_minidump_${KVM_ARCH}.c) +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips" SRCS+= kvm_minidump_${KVM_ARCH}.c .endif INCS= kvm.h From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 03:32:47 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3234C117; Sun, 29 Dec 2013 03:32:47 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E20E812FD; Sun, 29 Dec 2013 03:32:46 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rBT3WjfB027631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Dec 2013 19:32:46 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rBT3WjbT027630; Sat, 28 Dec 2013 19:32:45 -0800 (PST) (envelope-from jmg) Date: Sat, 28 Dec 2013 19:32:45 -0800 From: John-Mark Gurney To: Marcel Moolenaar Subject: Re: svn commit: r260022 - head/lib/libkvm Message-ID: <20131229033245.GY99167@funkthat.com> References: <201312282301.rBSN1wWP002326@svn.freebsd.org> <20131229010848.GV99167@funkthat.com> <7F0C4872-DB2A-4E6B-A8B8-E366989312C5@xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7F0C4872-DB2A-4E6B-A8B8-E366989312C5@xcllnt.net> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sat, 28 Dec 2013 19:32:46 -0800 (PST) Cc: "svn-src-head@freebsd.org" , svn-src-all , Marcel Moolenaar , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 03:32:47 -0000 Marcel Moolenaar wrote this message on Sat, Dec 28, 2013 at 18:49 -0800: > > On Dec 28, 2013, at 5:08 PM, John-Mark Gurney wrote: > > > Marcel Moolenaar wrote this message on Sat, Dec 28, 2013 at 23:01 +0000: > >> Author: marcel > >> Date: Sat Dec 28 23:01:57 2013 > >> New Revision: 260022 > >> URL: http://svnweb.freebsd.org/changeset/base/260022 > >> > >> Log: > >> Allow building a cross libkvm by setting TARGET_ARCH. The library so > >> produced will be called libkvm-${ARCH} instead of libkvm. This allows > >> installing it alongside the native version. > >> For symbol lookups, use ps_pglobal_lookup() instead of __fdnlist() > >> when building a cross libkvm. It is assumed that the cross tool that > >> uses the cross libkvm also provides an implementation for this > >> proc_services function. > >> > >> Note that this commit does not change any of the architecture-specific > >> code for cross-compilation. > > > > Shouldn't we be putting cross compiled libaries in another location > > than /lib? Kind of like the compat32 libs? > > I don't think we're there yet. libkvm is not ready for generic > cross building and we don't really have the infrastructure for > it either. For one, we really need to install CPU-specific > headers on the host. > > We can manually cross-build a few things, like binutils and gdb > and I see value to extend that to kgdb, but that's about it. Then what was the goal of this commit? Was it to have an i386 compatible libkvm that links w/ amd64 binaries? or? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 03:43:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E916240F; Sun, 29 Dec 2013 03:43:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D487C136E; Sun, 29 Dec 2013 03:43:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBT3hP1m026238; Sun, 29 Dec 2013 03:43:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBT3hPmZ026237; Sun, 29 Dec 2013 03:43:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312290343.rBT3hPmZ026237@svn.freebsd.org> From: Alexander Motin Date: Sun, 29 Dec 2013 03:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260031 - head/sys/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 03:43:26 -0000 Author: mav Date: Sun Dec 29 03:43:25 2013 New Revision: 260031 URL: http://svnweb.freebsd.org/changeset/base/260031 Log: In addition to r259632 completely block receive upcalls if we have more data than we need. This reduces lock pressure from xprt_active() side. Modified: head/sys/rpc/svc_vc.c Modified: head/sys/rpc/svc_vc.c ============================================================================== --- head/sys/rpc/svc_vc.c Sun Dec 29 03:15:15 2013 (r260030) +++ head/sys/rpc/svc_vc.c Sun Dec 29 03:43:25 2013 (r260031) @@ -619,7 +619,15 @@ svc_vc_process_pending(SVCXPRT *xprt) } } - so->so_rcv.sb_lowat = imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2)); + /* + * Block receive upcalls if we have more data pending, + * otherwise report our need. + */ + if (cd->mpending) + so->so_rcv.sb_lowat = INT_MAX; + else + so->so_rcv.sb_lowat = + imax(1, imin(cd->resid, so->so_rcv.sb_hiwat / 2)); return (TRUE); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 03:53:05 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F196D807; Sun, 29 Dec 2013 03:53:04 +0000 (UTC) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE6B61439; Sun, 29 Dec 2013 03:53:04 +0000 (UTC) Received: from [192.168.2.84] (50-0-150-213.dsl.static.sonic.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.14.7/8.14.7) with ESMTP id rBT3r2Af010254 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 28 Dec 2013 19:53:03 -0800 (PST) (envelope-from marcel@xcllnt.net) Content-Type: multipart/signed; boundary="Apple-Mail=_134EE2E7-477A-4012-85C1-097B83F89B11"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r260022 - head/lib/libkvm From: Marcel Moolenaar In-Reply-To: <20131229033245.GY99167@funkthat.com> Date: Sat, 28 Dec 2013 19:53:24 -0800 Message-Id: <5C67568C-389D-4023-9076-DC2E1608D187@xcllnt.net> References: <201312282301.rBSN1wWP002326@svn.freebsd.org> <20131229010848.GV99167@funkthat.com> <7F0C4872-DB2A-4E6B-A8B8-E366989312C5@xcllnt.net> <20131229033245.GY99167@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1827) Cc: "svn-src-head@freebsd.org" , svn-src-all , Marcel Moolenaar , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 03:53:05 -0000 --Apple-Mail=_134EE2E7-477A-4012-85C1-097B83F89B11 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Dec 28, 2013, at 7:32 PM, John-Mark Gurney wrote: > Marcel Moolenaar wrote this message on Sat, Dec 28, 2013 at 18:49 -0800: >> >> On Dec 28, 2013, at 5:08 PM, John-Mark Gurney wrote: >> >>> Marcel Moolenaar wrote this message on Sat, Dec 28, 2013 at 23:01 +0000: >>>> Author: marcel >>>> Date: Sat Dec 28 23:01:57 2013 >>>> New Revision: 260022 >>>> URL: http://svnweb.freebsd.org/changeset/base/260022 >>>> >>>> Log: >>>> Allow building a cross libkvm by setting TARGET_ARCH. The library so >>>> produced will be called libkvm-${ARCH} instead of libkvm. This allows >>>> installing it alongside the native version. >>>> For symbol lookups, use ps_pglobal_lookup() instead of __fdnlist() >>>> when building a cross libkvm. It is assumed that the cross tool that >>>> uses the cross libkvm also provides an implementation for this >>>> proc_services function. >>>> >>>> Note that this commit does not change any of the architecture-specific >>>> code for cross-compilation. >>> >>> Shouldn't we be putting cross compiled libaries in another location >>> than /lib? Kind of like the compat32 libs? >> >> I don't think we're there yet. libkvm is not ready for generic >> cross building and we don't really have the infrastructure for >> it either. For one, we really need to install CPU-specific >> headers on the host. >> >> We can manually cross-build a few things, like binutils and gdb >> and I see value to extend that to kgdb, but that's about it. > > Then what was the goal of this commit? Was it to have an i386 > compatible libkvm that links w/ amd64 binaries? or? The goal was to get a step closer to having useful cross-tools, including those that need libkvm. In this case it allowed me to make an ia64 cross-kgdb, useful for core analysis and/or remote debugging. -- Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_134EE2E7-477A-4012-85C1-097B83F89B11 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlK/nLQACgkQpgWlLWHuifZx7gCbBnY6wJFFR2GGJr78OY1MPZAK MlYAn3bQQ+q/HU4ZALegoluqaZiEMYGW =FkZa -----END PGP SIGNATURE----- --Apple-Mail=_134EE2E7-477A-4012-85C1-097B83F89B11-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 04:54:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5EFDFA0; Sun, 29 Dec 2013 04:54:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8ACA21778; Sun, 29 Dec 2013 04:54:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBT4sqSp049643; Sun, 29 Dec 2013 04:54:52 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBT4sq1U049642; Sun, 29 Dec 2013 04:54:52 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201312290454.rBT4sq1U049642@svn.freebsd.org> From: Alan Cox Date: Sun, 29 Dec 2013 04:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260032 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 04:54:52 -0000 Author: alc Date: Sun Dec 29 04:54:52 2013 New Revision: 260032 URL: http://svnweb.freebsd.org/changeset/base/260032 Log: Add "popmap" assertions: The page being freed isn't already free, and the page being allocated isn't already allocated. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Sun Dec 29 03:43:25 2013 (r260031) +++ head/sys/vm/vm_reserv.c Sun Dec 29 04:54:52 2013 (r260032) @@ -241,6 +241,9 @@ vm_reserv_depopulate(vm_reserv_t rv, int mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); KASSERT(rv->object != NULL, ("vm_reserv_depopulate: reserv %p is free", rv)); + KASSERT(isset(rv->popmap, index), + ("vm_reserv_depopulate: reserv %p's popmap[%d] is clear", rv, + index)); KASSERT(rv->popcnt > 0, ("vm_reserv_depopulate: reserv %p's popcnt is corrupted", rv)); if (rv->inpartpopq) { @@ -294,6 +297,9 @@ vm_reserv_populate(vm_reserv_t rv, int i mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); KASSERT(rv->object != NULL, ("vm_reserv_populate: reserv %p is free", rv)); + KASSERT(isclr(rv->popmap, index), + ("vm_reserv_populate: reserv %p's popmap[%d] is set", rv, + index)); KASSERT(rv->popcnt < VM_LEVEL_0_NPAGES, ("vm_reserv_populate: reserv %p is already full", rv)); if (rv->inpartpopq) { From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 07:26:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92C16E5A; Sun, 29 Dec 2013 07:26:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 63D161F93; Sun, 29 Dec 2013 07:26:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBT7QnaI003622; Sun, 29 Dec 2013 07:26:49 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBT7QnIc003621; Sun, 29 Dec 2013 07:26:49 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201312290726.rBT7QnIc003621@svn.freebsd.org> From: Kirk McKusick Date: Sun, 29 Dec 2013 07:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260033 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 07:26:49 -0000 Author: mckusick Date: Sun Dec 29 07:26:48 2013 New Revision: 260033 URL: http://svnweb.freebsd.org/changeset/base/260033 Log: MFC of 258789: We needlessly panic when trying to flush MKDIR_PARENT dependencies. We had previously tried to flush all MKDIR_PARENT dependencies (and all the NEWBLOCK pagedeps) by calling ffs_update(). However this will only resolve these dependencies in direct blocks. So very large directories with MKDIR_PARENT dependencies in indirect blocks had not yet gotten flushed. As the directory is in the midst of doing a complete sync, we simply defer the checking of the MKDIR_PARENT dependencies until the indirect blocks have been sync'ed. Reported by: Shawn Wallbridge of imaginaryforces.com Tested by: John-Mark Gurney PR: 183424 Modified: stable/10/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Sun Dec 29 04:54:52 2013 (r260032) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Sun Dec 29 07:26:48 2013 (r260033) @@ -12616,7 +12616,9 @@ flush_pagedep_deps(pvp, mp, diraddhdp) int error = 0; struct buf *bp; ino_t inum; + struct diraddhd unfinished; + LIST_INIT(&unfinished); ump = VFSTOUFS(mp); restart: while ((dap = LIST_FIRST(diraddhdp)) != NULL) { @@ -12634,8 +12636,20 @@ restart: */ if (dap != LIST_FIRST(diraddhdp)) continue; - if (dap->da_state & MKDIR_PARENT) - panic("flush_pagedep_deps: MKDIR_PARENT"); + /* + * All MKDIR_PARENT dependencies and all the + * NEWBLOCK pagedeps that are contained in direct + * blocks were resolved by doing above ffs_update. + * Pagedeps contained in indirect blocks may + * require a complete sync'ing of the directory. + * We are in the midst of doing a complete sync, + * so if they are not resolved in this pass we + * defer them for now as they will be sync'ed by + * our caller shortly. + */ + LIST_REMOVE(dap, da_pdlist); + LIST_INSERT_HEAD(&unfinished, dap, da_pdlist); + continue; } /* * A newly allocated directory must have its "." and @@ -12744,6 +12758,10 @@ retry: } if (error) ACQUIRE_LOCK(&lk); + while ((dap = LIST_FIRST(&unfinished)) != NULL) { + LIST_REMOVE(dap, da_pdlist); + LIST_INSERT_HEAD(diraddhdp, dap, da_pdlist); + } return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 07:29:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBEB6FCB; Sun, 29 Dec 2013 07:29:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D5891FB4; Sun, 29 Dec 2013 07:29:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBT7TjqH003934; Sun, 29 Dec 2013 07:29:45 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBT7TjaL003933; Sun, 29 Dec 2013 07:29:45 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201312290729.rBT7TjaL003933@svn.freebsd.org> From: Kirk McKusick Date: Sun, 29 Dec 2013 07:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260034 - stable/9/sys/ufs/ffs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 07:29:45 -0000 Author: mckusick Date: Sun Dec 29 07:29:45 2013 New Revision: 260034 URL: http://svnweb.freebsd.org/changeset/base/260034 Log: MFC of 258789: We needlessly panic when trying to flush MKDIR_PARENT dependencies. We had previously tried to flush all MKDIR_PARENT dependencies (and all the NEWBLOCK pagedeps) by calling ffs_update(). However this will only resolve these dependencies in direct blocks. So very large directories with MKDIR_PARENT dependencies in indirect blocks had not yet gotten flushed. As the directory is in the midst of doing a complete sync, we simply defer the checking of the MKDIR_PARENT dependencies until the indirect blocks have been sync'ed. Reported by: Shawn Wallbridge of imaginaryforces.com Tested by: John-Mark Gurney PR: 183424 Modified: stable/9/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_softdep.c Sun Dec 29 07:26:48 2013 (r260033) +++ stable/9/sys/ufs/ffs/ffs_softdep.c Sun Dec 29 07:29:45 2013 (r260034) @@ -12618,7 +12618,9 @@ flush_pagedep_deps(pvp, mp, diraddhdp) int error = 0; struct buf *bp; ino_t inum; + struct diraddhd unfinished; + LIST_INIT(&unfinished); ump = VFSTOUFS(mp); restart: while ((dap = LIST_FIRST(diraddhdp)) != NULL) { @@ -12636,8 +12638,20 @@ restart: */ if (dap != LIST_FIRST(diraddhdp)) continue; - if (dap->da_state & MKDIR_PARENT) - panic("flush_pagedep_deps: MKDIR_PARENT"); + /* + * All MKDIR_PARENT dependencies and all the + * NEWBLOCK pagedeps that are contained in direct + * blocks were resolved by doing above ffs_update. + * Pagedeps contained in indirect blocks may + * require a complete sync'ing of the directory. + * We are in the midst of doing a complete sync, + * so if they are not resolved in this pass we + * defer them for now as they will be sync'ed by + * our caller shortly. + */ + LIST_REMOVE(dap, da_pdlist); + LIST_INSERT_HEAD(&unfinished, dap, da_pdlist); + continue; } /* * A newly allocated directory must have its "." and @@ -12745,6 +12759,10 @@ retry: } if (error) ACQUIRE_LOCK(&lk); + while ((dap = LIST_FIRST(&unfinished)) != NULL) { + LIST_REMOVE(dap, da_pdlist); + LIST_INSERT_HEAD(diraddhdp, dap, da_pdlist); + } return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 09:01:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 524A8BA1; Sun, 29 Dec 2013 09:01:05 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E55F814B0; Sun, 29 Dec 2013 09:01:04 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rBT90sMY073910; Sun, 29 Dec 2013 11:00:54 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rBT90sMY073910 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rBT90rL8073909; Sun, 29 Dec 2013 11:00:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 29 Dec 2013 11:00:53 +0200 From: Konstantin Belousov To: Alan Cox Subject: Re: svn commit: r259908 - head/sys/vm Message-ID: <20131229090053.GU59496@kib.kiev.ua> References: <201312260546.rBQ5kAoJ009798@svn.freebsd.org> <52BF6699.1040006@freebsd.org> <52BF7195.2070606@rice.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HrQ/+whymLRZ6Agu" Content-Disposition: inline In-Reply-To: <52BF7195.2070606@rice.edu> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org, Nathan Whitehorn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 09:01:05 -0000 --HrQ/+whymLRZ6Agu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 28, 2013 at 06:49:25PM -0600, Alan Cox wrote: > On 12/28/2013 18:02, Nathan Whitehorn wrote: > > On 12/26/13 00:46, Marcel Moolenaar wrote: > >> Author: marcel > >> Date: Thu Dec 26 05:46:10 2013 > >> New Revision: 259908 > >> URL: http://svnweb.freebsd.org/changeset/base/259908 > >> > >> Log: > >> For ia64, use pmap_remove_pages() and not pmap_remove(). The problem= is > >> that we don't have a good way (yet) to iterate over the mapped pages= by > >> virtual address and simply try each page within the range. Given tha= t we > >> call pmap_remove() over the entire 2^63 bytes of address space, it t= akes > >> a while for pmap_remove to have tried all 2^50 pages. > >> By using pmap_remove_pages() we use the PV list to find all mappings. > >> =20 > >> Change derived from a patch by: alc > >> > > Why make this ia64-specific? It seems like a potentially useful general > > optimization and certainly shouldn't be harmful on other architectures. >=20 > Some of the other implementations of pmap_remove_pages() have > limitations that don't permit them to be used for this purpose, e.g., >=20 > if (pmap !=3D PCPU_GET(curpmap)) { > printf("warning: pmap_remove_pages called with > non-current pmap\n"); > return; > } BTW, I do not easily see why the current amd64 implementation needs the pmap being current. I do not see accesses to recursive page table mappings in the code. --HrQ/+whymLRZ6Agu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSv+TFAAoJEJDCuSvBvK1BjDMP/R260PGrKF685fgY8O/3T/TX iSFJor7IsJ7p+dZn3HN/RRIhezOrSI6YstklcvU+XYfGAjRLpdkY7xAB8ugzddmv CRnGRtPrzizL3uMsPWWAvM47/hjV4w3nrE/AKuOJnLM2pPGx7VnRXTPrO66r6kS5 JigLu/PBHoQQ64EOn6V8w/+h0AI4HmFTIKNv3VD66Yfxlcyu55G5Kjxr2V+mqU6f EYLLinCUF5qbVVFTGOpHTClE563DIpTH/dM6B36ZiaEjPswWRbwUAJafkiWB7WYt AV9vO9/hb3lpPDHo44uXS2hAuVQ9HGxgYrwdbzR2HBFUZ9eS/lJDXhzHqeyUC/LY ZjB+qBy5cuYNWXGqks8Wbe21FCRkTy3lQv7aYyTLw52i/wixq5eKC5XrYmgP2/G4 RDBj9wavXoGP7lDAVWXX1KUMtEdzt47nSL/cAce3q7CVSA8+O/5QgXSj0XswPk5v 5je4Sdpv/X89oa3jn9dOxOzsTBhx3DYhuVGhKskbX7SoJPqvYO5Ke2P/2X+Somw9 GSBKfjqUhV5i9yJd4MJbSDaxy+PrKGrfTKeJfU4Y2dSLT3IKRvNP4TJEIOSBlWSo e9ciQ+W1gwIhB1Uc/+1PkeHAfgy5lCtKGZM+Sh+SN1yBo+DP7beebpImdHKth2pL zHBtXzbrFL3XY1YgR5bD =rj+C -----END PGP SIGNATURE----- --HrQ/+whymLRZ6Agu-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 09:03:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DD8ED22; Sun, 29 Dec 2013 09:03:45 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2CB1D1512; Sun, 29 Dec 2013 09:03:45 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rBT93edP073998; Sun, 29 Dec 2013 11:03:40 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rBT93edP073998 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rBT93ceo073997; Sun, 29 Dec 2013 11:03:38 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 29 Dec 2013 11:03:38 +0200 From: Konstantin Belousov To: Marcel Moolenaar Subject: Re: svn commit: r260022 - head/lib/libkvm Message-ID: <20131229090338.GV59496@kib.kiev.ua> References: <201312282301.rBSN1wWP002326@svn.freebsd.org> <28D86FF3-F13C-4EB1-AEED-4051F2944E27@xcllnt.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YREkK/99wwX4Ls8o" Content-Disposition: inline In-Reply-To: <28D86FF3-F13C-4EB1-AEED-4051F2944E27@xcllnt.net> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: "svn-src-head@freebsd.org" , svn-src-all , Marcel Moolenaar , "src-committers@freebsd.org" , Peter Wemm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 09:03:45 -0000 --YREkK/99wwX4Ls8o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 28, 2013 at 06:39:07PM -0800, Marcel Moolenaar wrote: >=20 > On Dec 28, 2013, at 4:40 PM, Peter Wemm wrote: >=20 > > On Sat, Dec 28, 2013 at 4:04 PM, Peter Wemm wrote: > >> On Sat, Dec 28, 2013 at 3:01 PM, Marcel Moolenaar = wrote: > >>> Author: marcel > >>> Date: Sat Dec 28 23:01:57 2013 > >>> New Revision: 260022 > >>> URL: http://svnweb.freebsd.org/changeset/base/260022 > >>>=20 > >>> Log: > >>> Allow building a cross libkvm by setting TARGET_ARCH. The library so > >>> produced will be called libkvm-${ARCH} instead of libkvm. This allows > >>> installing it alongside the native version. > >>> For symbol lookups, use ps_pglobal_lookup() instead of __fdnlist() > >>> when building a cross libkvm. It is assumed that the cross tool that > >>> uses the cross libkvm also provides an implementation for this > >>> proc_services function. > >>>=20 > >>> Note that this commit does not change any of the architecture-specif= ic > >>> code for cross-compilation. > >>=20 > >> Are you sure about this? I just got a brand new buildworld failure on > >> an amd64 machine. The lib32 build code was trying to use 64 bit pmap > >> definitions and failed miserably. > >>=20 > >> I'm really sorry, I accidentally blew away the failure log. I'll have > >> another in a few minutes. > >=20 > >=20 > > This is from stage5.1, the lib32 build: > >=20 > > /usr/src/lib/libkvm/kvm_amd64.c:78:2: error: unknown type name 'pml4_en= try_t' > > pml4_entry_t *PML4; > > ^ >=20 > Ugh. I'll probably revert... Might be, it makes more sense to disable libkvm compat32 build ? The library does not have any chance of functioning on host anyway. The only compelling argument to keep it is to satisfy the linkage for binaries which do not use the library. --YREkK/99wwX4Ls8o Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSv+VpAAoJEJDCuSvBvK1B1+gQAKmbAEkjE8NMJRAVP5vDR1lW yYwOnSuGRJ+IjxXdwJ51nyIGQ1+A6fUnBWwld//w6qskAHiTRrC+Y49K2ydd0Ksr G8SYJJVSPusJwqwCkZ0jHBIHCbpYcE32oxYqdB/A022Yrn33T0/Ywvr126J0bPdh eoYRt0qEyn5U618tB99jQOF9tucbOFoVBjw+ApUHSR7A2vPkUtPvK7mavhI+D4Sb 0sfC0qwRFoc0cBErjW1dZZqLvEC0pCusgye+TvdBbblNR195LKpXCL7Q53AfkiLq 4SCk4ULxiE1JXksYBxzuebhawG0w7QAqJcmdWJi9rE9/TV8jEnToro+mfJFzhbFZ uzaf0BRPFwNrXJkQwW+aLCkJmZyv2r5VQBL0dzjVZaQehslua0BNCajK2zAUDBkR av7TG5/kjMmGFsbhMAn1ZTNWOSre3UvPmAFStYOjIaa1LPdDIVHOD7jP52Q82yqP 3Pii0bD3DD8Ghtyr8Jl2f6AZ2VupoByLVBbnfWB8Iv0W/iZumhNBJNC+6XRXZaAH by0xSIbdYbXZ1ZG9v6MjAnh8ShkHoMy7MP91vBVJLqNdUHPnxkTkoaPe2QpHZ758 I3tp4v/XKdMixVYiMgoU2ZfmDjSNPT3bdmheQHhXq9QQsezxEr9PbUYg1/A5dV9C flko9Hfpxd1zaetifOYw =ORDw -----END PGP SIGNATURE----- --YREkK/99wwX4Ls8o-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 09:17:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E5D9FE0; Sun, 29 Dec 2013 09:17:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7968815B3; Sun, 29 Dec 2013 09:17:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBT9Hi3I044815; Sun, 29 Dec 2013 09:17:44 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBT9Hiei044814; Sun, 29 Dec 2013 09:17:44 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201312290917.rBT9Hiei044814@svn.freebsd.org> From: Sergey Kandaurov Date: Sun, 29 Dec 2013 09:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260035 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 09:17:44 -0000 Author: pluknet Date: Sun Dec 29 09:17:43 2013 New Revision: 260035 URL: http://svnweb.freebsd.org/changeset/base/260035 Log: MFC r259922: Fix an apparent typo. Modified: stable/10/lib/libc/sys/aio_mlock.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/aio_mlock.2 ============================================================================== --- stable/10/lib/libc/sys/aio_mlock.2 Sun Dec 29 07:29:45 2013 (r260034) +++ stable/10/lib/libc/sys/aio_mlock.2 Sun Dec 29 09:17:43 2013 (r260035) @@ -87,7 +87,7 @@ request has completed, are not allowed. .Rv -std aio_mlock .Sh ERRORS The -.Fn aio_read +.Fn aio_mlock system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 11:19:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5DEE33F; Sun, 29 Dec 2013 11:19:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C20B31CEE; Sun, 29 Dec 2013 11:19:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTBJA0I093149; Sun, 29 Dec 2013 11:19:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTBJ9wA093144; Sun, 29 Dec 2013 11:19:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312291119.rBTBJ9wA093144@svn.freebsd.org> From: Alexander Motin Date: Sun, 29 Dec 2013 11:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260036 - head/sys/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 11:19:10 -0000 Author: mav Date: Sun Dec 29 11:19:09 2013 New Revision: 260036 URL: http://svnweb.freebsd.org/changeset/base/260036 Log: Introduce xprt_inactive_self() -- variant for use when sure that port is assigned to thread. For example, withing receive handlers. In that case the function reduces to single assignment and can avoid locking. Modified: head/sys/rpc/svc.c head/sys/rpc/svc.h head/sys/rpc/svc_dg.c head/sys/rpc/svc_vc.c Modified: head/sys/rpc/svc.c ============================================================================== --- head/sys/rpc/svc.c Sun Dec 29 09:17:43 2013 (r260035) +++ head/sys/rpc/svc.c Sun Dec 29 11:19:09 2013 (r260036) @@ -406,6 +406,19 @@ xprt_inactive(SVCXPRT *xprt) } /* + * Variant of xprt_inactive() for use only when sure that port is + * assigned to thread. For example, withing receive handlers. + */ +void +xprt_inactive_self(SVCXPRT *xprt) +{ + + KASSERT(xprt->xp_thread != NULL, + ("xprt_inactive_self(%p) with NULL xp_thread", xprt)); + xprt->xp_active = FALSE; +} + +/* * Add a service program to the callout list. * The dispatch routine will be called when a rpc request for this * program number comes in. Modified: head/sys/rpc/svc.h ============================================================================== --- head/sys/rpc/svc.h Sun Dec 29 09:17:43 2013 (r260035) +++ head/sys/rpc/svc.h Sun Dec 29 11:19:09 2013 (r260036) @@ -523,6 +523,7 @@ __BEGIN_DECLS extern void xprt_active(SVCXPRT *); extern void xprt_inactive(SVCXPRT *); extern void xprt_inactive_locked(SVCXPRT *); +extern void xprt_inactive_self(SVCXPRT *); __END_DECLS #endif Modified: head/sys/rpc/svc_dg.c ============================================================================== --- head/sys/rpc/svc_dg.c Sun Dec 29 09:17:43 2013 (r260035) +++ head/sys/rpc/svc_dg.c Sun Dec 29 11:19:09 2013 (r260036) @@ -196,10 +196,10 @@ svc_dg_recv(SVCXPRT *xprt, struct rpc_ms * from racing the upcall after our soreadable() call * returns false. */ - mtx_lock(&xprt->xp_pool->sp_lock); + SOCKBUF_LOCK(&xprt->xp_socket->so_rcv); if (!soreadable(xprt->xp_socket)) - xprt_inactive_locked(xprt); - mtx_unlock(&xprt->xp_pool->sp_lock); + xprt_inactive_self(xprt); + SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); sx_xunlock(&xprt->xp_lock); return (FALSE); } @@ -208,7 +208,7 @@ svc_dg_recv(SVCXPRT *xprt, struct rpc_ms SOCKBUF_LOCK(&xprt->xp_socket->so_rcv); soupcall_clear(xprt->xp_socket, SO_RCV); SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); - xprt_inactive(xprt); + xprt_inactive_self(xprt); sx_xunlock(&xprt->xp_lock); return (FALSE); } Modified: head/sys/rpc/svc_vc.c ============================================================================== --- head/sys/rpc/svc_vc.c Sun Dec 29 09:17:43 2013 (r260035) +++ head/sys/rpc/svc_vc.c Sun Dec 29 11:19:09 2013 (r260036) @@ -385,7 +385,7 @@ svc_vc_rendezvous_recv(SVCXPRT *xprt, st */ ACCEPT_LOCK(); if (TAILQ_EMPTY(&xprt->xp_socket->so_comp)) - xprt_inactive(xprt); + xprt_inactive_self(xprt); ACCEPT_UNLOCK(); sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -398,7 +398,7 @@ svc_vc_rendezvous_recv(SVCXPRT *xprt, st soupcall_clear(xprt->xp_socket, SO_RCV); } SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); - xprt_inactive(xprt); + xprt_inactive_self(xprt); sx_xunlock(&xprt->xp_lock); return (FALSE); } @@ -667,7 +667,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms if (cd->mreq == NULL || cd->resid != 0) { SOCKBUF_LOCK(&so->so_rcv); if (!soreadable(so)) - xprt_inactive(xprt); + xprt_inactive_self(xprt); SOCKBUF_UNLOCK(&so->so_rcv); } @@ -709,7 +709,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms */ SOCKBUF_LOCK(&so->so_rcv); if (!soreadable(so)) - xprt_inactive(xprt); + xprt_inactive_self(xprt); SOCKBUF_UNLOCK(&so->so_rcv); sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -722,7 +722,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms soupcall_clear(so, SO_RCV); } SOCKBUF_UNLOCK(&so->so_rcv); - xprt_inactive(xprt); + xprt_inactive_self(xprt); cd->strm_stat = XPRT_DIED; sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -732,7 +732,7 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms /* * EOF - the other end has closed the socket. */ - xprt_inactive(xprt); + xprt_inactive_self(xprt); cd->strm_stat = XPRT_DIED; sx_xunlock(&xprt->xp_lock); return (FALSE); @@ -763,7 +763,7 @@ svc_vc_backchannel_recv(SVCXPRT *xprt, s mtx_lock(&ct->ct_lock); m = cd->mreq; if (m == NULL) { - xprt_inactive(xprt); + xprt_inactive_self(xprt); mtx_unlock(&ct->ct_lock); sx_xunlock(&xprt->xp_lock); return (FALSE); From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 12:30:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90031B1E; Sun, 29 Dec 2013 12:30:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 79A8C1136; Sun, 29 Dec 2013 12:30:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTCU7sg022185; Sun, 29 Dec 2013 12:30:07 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTCU6jR022180; Sun, 29 Dec 2013 12:30:06 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312291230.rBTCU6jR022180@svn.freebsd.org> From: Julio Merino Date: Sun, 29 Dec 2013 12:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260037 - in stable/10: etc/mtree share share/examples share/examples/tests share/examples/tests/tests/plain share/mk share/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 12:30:07 -0000 Author: jmmv Date: Sun Dec 29 12:30:06 2013 New Revision: 260037 URL: http://svnweb.freebsd.org/changeset/base/260037 Log: Add sample test programs. This is a MFC of the following into stable/10: - r258299 Add some sample test programs. - r258552 Generate plain sh test programs from a source file. As usual, "make tinderbox" clean on ref10-amd64. Added: stable/10/share/examples/tests/ - copied from r258299, head/share/examples/tests/ stable/10/share/examples/tests/tests/plain/cp_test.sh - copied unchanged from r258552, head/share/examples/tests/tests/plain/cp_test.sh stable/10/share/tests/ - copied from r258299, head/share/tests/ Deleted: stable/10/share/examples/tests/tests/plain/cp_test Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/share/Makefile stable/10/share/examples/Makefile stable/10/share/mk/plain.test.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sun Dec 29 11:19:09 2013 (r260036) +++ stable/10/etc/mtree/BSD.tests.dist Sun Dec 29 12:30:06 2013 (r260037) @@ -38,6 +38,16 @@ .. .. .. + share + examples + tests + atf + .. + plain + .. + .. + .. + .. usr.bin atf atf-sh Modified: stable/10/share/Makefile ============================================================================== --- stable/10/share/Makefile Sun Dec 29 11:19:09 2013 (r260036) +++ stable/10/share/Makefile Sun Dec 29 12:30:06 2013 (r260037) @@ -26,6 +26,7 @@ SUBDIR= ${_colldef} \ ${_syscons} \ tabset \ termcap \ + ${_tests} \ ${_timedef} \ ${_zoneinfo} @@ -80,6 +81,10 @@ _doc= doc _syscons= syscons .endif +.if ${MK_TESTS} != "no" +_tests= tests +.endif + .if ${MK_ZONEINFO} != "no" _zoneinfo= zoneinfo .endif Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Sun Dec 29 11:19:09 2013 (r260036) +++ stable/10/share/examples/Makefile Sun Dec 29 12:30:06 2013 (r260037) @@ -249,4 +249,8 @@ SUBDIR+=pf .endif .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include Copied: stable/10/share/examples/tests/tests/plain/cp_test.sh (from r258552, head/share/examples/tests/tests/plain/cp_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/examples/tests/tests/plain/cp_test.sh Sun Dec 29 12:30:06 2013 (r260037, copy of r258552, head/share/examples/tests/tests/plain/cp_test.sh) @@ -0,0 +1,84 @@ +# $FreeBSD$ +# +# Copyright 2013 Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Google Inc. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# +# INTRODUCTION +# +# This plain test program mimics the structure and contents of its +# ATF-based counterpart. It attempts to represent various test cases +# in different separate functions and just calls them all from main. +# +# In reality, plain test programs can be much simpler. All they have +# to do is return 0 on success and non-0 otherwise. +# + +set -e + +# Prints an error message and exits. +err() { + echo "${@}" 1>&2 + exit 1 +} + +# Auxiliary function to compare two files for equality. +verify_copy() { + if ! cmp -s "${1}" "${2}"; then + diff -u "${1}" "${2}" + err "${1} and ${2} differ, but they should be equal" + fi +} + +simple_test() { + echo 'File 1' >file1 + cp file1 file2 || err "cp failed" + verify_copy file1 file2 +} + +force_test() { + echo 'File 1' >file1 + echo 'File 2' >file2 + chmod 400 file2 + cp -f file1 file2 || err "cp failed" + verify_copy file1 file2 +} + +# If you have read the cp_test.sh counterpart in the atf/ directory, you +# may think that the sequencing of tests below and the exposed behavior +# to the user is very similar. But you'd be wrong. +# +# There are two major differences with this and the ATF version. The +# first is that the code below has no provisions to detect failures in +# one test and continue running the other tests: the first failure +# causes the whole test program to exit. The second is that this +# particular "main" has no arguments: without ATF, all test programs may +# expose a different command-line interface, and this is an issue for +# consistency purposes. +simple_test +force_test Modified: stable/10/share/mk/plain.test.mk ============================================================================== --- stable/10/share/mk/plain.test.mk Sun Dec 29 11:19:09 2013 (r260036) +++ stable/10/share/mk/plain.test.mk Sun Dec 29 12:30:06 2013 (r260037) @@ -46,6 +46,16 @@ _TESTS+= ${PLAIN_TESTS_SH} .for _T in ${PLAIN_TESTS_SH} SCRIPTSDIR_${_T}= ${TESTSDIR} TEST_INTERFACE.${_T}= plain +CLEANFILES+= ${_T} ${_T}.tmp +# TODO(jmmv): It seems to me that this SED and SRC functionality should +# exist in bsd.prog.mk along the support for SCRIPTS. Move it there if +# this proves to be useful within the tests. +PLAIN_TESTS_SH_SED_${_T}?= # empty +PLAIN_TESTS_SH_SRC_${_T}?= ${_T}.sh +${_T}: ${PLAIN_TESTS_SH_SRC_${_T}} + cat ${.ALLSRC} | sed ${PLAIN_TESTS_SH_SED_${_T}} >${.TARGET}.tmp + chmod +x ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} .endfor .endif From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 14:19:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE20D546; Sun, 29 Dec 2013 14:19:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CA0CE173B; Sun, 29 Dec 2013 14:19:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTEJF4X061902; Sun, 29 Dec 2013 14:19:15 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTEJF1n061901; Sun, 29 Dec 2013 14:19:15 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312291419.rBTEJF1n061901@svn.freebsd.org> From: Dimitry Andric Date: Sun, 29 Dec 2013 14:19:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260038 - head/sys/dev/en X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 14:19:15 -0000 Author: dim Date: Sun Dec 29 14:19:15 2013 New Revision: 260038 URL: http://svnweb.freebsd.org/changeset/base/260038 Log: In sys/dev/en/midway.c, #if 0 an unused static function. MFC after: 3 days Modified: head/sys/dev/en/midway.c Modified: head/sys/dev/en/midway.c ============================================================================== --- head/sys/dev/en/midway.c Sun Dec 29 12:30:06 2013 (r260037) +++ head/sys/dev/en/midway.c Sun Dec 29 14:19:15 2013 (r260038) @@ -344,6 +344,7 @@ en_k2sz(int k) } #define en_log2(X) en_k2sz(X) +#if 0 /* * en_b2sz: convert a DMA burst code to its byte size */ @@ -365,6 +366,7 @@ en_b2sz(int b) } return (0); } +#endif /* * en_sz2b: convert a burst size (bytes) to DMA burst code From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 14:21:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D70C8774; Sun, 29 Dec 2013 14:21:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B87DD1795; Sun, 29 Dec 2013 14:21:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTELtuN064787; Sun, 29 Dec 2013 14:21:55 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTELtWe064785; Sun, 29 Dec 2013 14:21:55 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312291421.rBTELtWe064785@svn.freebsd.org> From: Dimitry Andric Date: Sun, 29 Dec 2013 14:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260039 - in head/sys: conf modules/ipfilter X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 14:21:55 -0000 Author: dim Date: Sun Dec 29 14:21:55 2013 New Revision: 260039 URL: http://svnweb.freebsd.org/changeset/base/260039 Log: Turn off warnings about unused variables for a bunch of files under contrib/ipfilter. MFC after: 3 days Modified: head/sys/conf/files head/sys/modules/ipfilter/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Dec 29 14:19:15 2013 (r260038) +++ head/sys/conf/files Sun Dec 29 14:21:55 2013 (r260039) @@ -456,39 +456,39 @@ contrib/dev/acpica/components/utilities/ contrib/dev/acpica/components/utilities/utxfinit.c optional acpi #contrib/dev/acpica/components/utilities/utxfmutex.c optional acpi contrib/ipfilter/netinet/fil.c optional ipfilter inet \ - compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_fil_freebsd.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_frag.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_log.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_nat.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_proxy.c optional ipfilter inet \ - compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ - compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-error -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_sync.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/mlfk_ipl.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_nat6.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_rules.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_scan.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_dstlist.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/radix_ipf.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/libfdt/fdt.c optional fdt Modified: head/sys/modules/ipfilter/Makefile ============================================================================== --- head/sys/modules/ipfilter/Makefile Sun Dec 29 14:19:15 2013 (r260038) +++ head/sys/modules/ipfilter/Makefile Sun Dec 29 14:21:55 2013 (r260039) @@ -28,7 +28,18 @@ CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DI .include -CWARNFLAGS.fil.c= ${NO_WSELF_ASSIGN} -CWARNFLAGS.ip_proxy.c= ${NO_WSELF_ASSIGN} -CWARNFLAGS.ip_lookup.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.fil.c= ${NO_WSELF_ASSIGN} -Wno-unused +CWARNFLAGS.ip_auth.c= -Wno-unused +CWARNFLAGS.ip_fil_freebsd.c= -Wno-unused +CWARNFLAGS.ip_frag.c= -Wno-unused +CWARNFLAGS.ip_htable.c= -Wno-unused +CWARNFLAGS.ip_dstlist.c= -Wno-unused +CWARNFLAGS.ip_lookup.c= ${NO_WSELF_ASSIGN} -Wno-unused +CWARNFLAGS.ip_nat.c= -Wno-unused +CWARNFLAGS.ip_nat6.c= -Wno-unused +CWARNFLAGS.ip_pool.c= -Wno-unused +CWARNFLAGS.ip_proxy.c= ${NO_WSELF_ASSIGN} -Wno-unused +CWARNFLAGS.ip_scan.c= -Wno-unused +CWARNFLAGS.ip_state.c= -Wno-unused +CWARNFLAGS.ip_sync.c= -Wno-unused CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 16:28:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 415EC68B; Sun, 29 Dec 2013 16:28:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D1CB1057; Sun, 29 Dec 2013 16:28:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTGSc32012662; Sun, 29 Dec 2013 16:28:38 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTGScou012661; Sun, 29 Dec 2013 16:28:38 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312291628.rBTGScou012661@svn.freebsd.org> From: Dimitry Andric Date: Sun, 29 Dec 2013 16:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260040 - head/sys/dev/mcd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 16:28:38 -0000 Author: dim Date: Sun Dec 29 16:28:37 2013 New Revision: 260040 URL: http://svnweb.freebsd.org/changeset/base/260040 Log: In sys/dev/mcd/mcd.c, mark the static const COPYRIGHT string as __used, so it ends up in the object file, and no warnings are emitted about it being actually unused. MFC after: 3 days Modified: head/sys/dev/mcd/mcd.c Modified: head/sys/dev/mcd/mcd.c ============================================================================== --- head/sys/dev/mcd/mcd.c Sun Dec 29 14:21:55 2013 (r260039) +++ head/sys/dev/mcd/mcd.c Sun Dec 29 16:28:37 2013 (r260040) @@ -44,7 +44,7 @@ #include __FBSDID("$FreeBSD$"); -static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; +static const char __used COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; #include #include From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 16:43:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F347B47; Sun, 29 Dec 2013 16:43: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2224A115C; Sun, 29 Dec 2013 16:43:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTGhZAa019627; Sun, 29 Dec 2013 16:43:35 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTGhZdZ019625; Sun, 29 Dec 2013 16:43:35 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312291643.rBTGhZdZ019625@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Dec 2013 16:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260041 - head/usr.sbin/makefs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 16:43:36 -0000 Author: marius Date: Sun Dec 29 16:43:35 2013 New Revision: 260041 URL: http://svnweb.freebsd.org/changeset/base/260041 Log: Record the IEEE P1282 Rock Ridge version 1.12 POSIX File Serial Number, i. e. the POSIX:5.6.1 st_ino field, which can be used to detect hard links in the file system. This is also the default in mkisofs(8) and according to its man page, no system only being able to cope with Rock Ridge version 1.10 is known to exist. PR: 185138 Submitted by: Kurt Lidl MFC after: 1 week Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c head/usr.sbin/makefs/cd9660/iso9660_rrip.h Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c ============================================================================== --- head/usr.sbin/makefs/cd9660/iso9660_rrip.c Sun Dec 29 16:28:37 2013 (r260040) +++ head/usr.sbin/makefs/cd9660/iso9660_rrip.c Sun Dec 29 16:43:35 2013 (r260041) @@ -634,7 +634,7 @@ cd9660_createSL(cd9660node *node) int cd9660node_rrip_px(struct ISO_SUSP_ATTRIBUTES *v, fsnode *pxinfo) { - v->attr.rr_entry.PX.h.length[0] = 36; + v->attr.rr_entry.PX.h.length[0] = 44; v->attr.rr_entry.PX.h.version[0] = 1; cd9660_bothendian_dword(pxinfo->inode->st.st_mode, v->attr.rr_entry.PX.mode); @@ -644,8 +644,9 @@ cd9660node_rrip_px(struct ISO_SUSP_ATTRI v->attr.rr_entry.PX.uid); cd9660_bothendian_dword(pxinfo->inode->st.st_gid, v->attr.rr_entry.PX.gid); + cd9660_bothendian_dword(pxinfo->inode->st.st_ino, + v->attr.rr_entry.PX.serial); - /* Ignoring the serial number for now */ return 1; } Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.h ============================================================================== --- head/usr.sbin/makefs/cd9660/iso9660_rrip.h Sun Dec 29 16:28:37 2013 (r260040) +++ head/usr.sbin/makefs/cd9660/iso9660_rrip.h Sun Dec 29 16:43:35 2013 (r260041) @@ -103,7 +103,7 @@ typedef struct { u_char links [ISODCL(13,20)]; u_char uid [ISODCL(21,28)]; u_char gid [ISODCL(29,36)]; - u_char serial [ISODCL(37,44)];/* Not used */ + u_char serial [ISODCL(37,44)]; } ISO_RRIP_PX; typedef struct { From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 17:03:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D8C1EDC; Sun, 29 Dec 2013 17:03: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 09ADB128B; Sun, 29 Dec 2013 17:03:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTH3j4Y027121; Sun, 29 Dec 2013 17:03:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTH3jdR027120; Sun, 29 Dec 2013 17:03:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312291703.rBTH3jdR027120@svn.freebsd.org> From: Dimitry Andric Date: Sun, 29 Dec 2013 17:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260042 - head/sys/dev/my X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 17:03:46 -0000 Author: dim Date: Sun Dec 29 17:03:45 2013 New Revision: 260042 URL: http://svnweb.freebsd.org/changeset/base/260042 Log: Remove superfluous old-style rcsid[] from if_my.c. There is already an __FBSDID() at the top of the file. MFC after: 3 days Modified: head/sys/dev/my/if_my.c Modified: head/sys/dev/my/if_my.c ============================================================================== --- head/sys/dev/my/if_my.c Sun Dec 29 16:43:35 2013 (r260041) +++ head/sys/dev/my/if_my.c Sun Dec 29 17:03:45 2013 (r260042) @@ -81,11 +81,6 @@ static int MY_USEIOSPACE = 1; #include -#ifndef lint -static const char rcsid[] = -"$Id: if_my.c,v 1.16 2003/04/15 06:37:25 mdodd Exp $"; -#endif - /* * Various supported device vendors/types and their names. */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 17:08:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A29FE3; Sun, 29 Dec 2013 17:08:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA1EE1299; Sun, 29 Dec 2013 17:08:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTH8Ujx028084; Sun, 29 Dec 2013 17:08:30 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTH8UUx028083; Sun, 29 Dec 2013 17:08:30 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312291708.rBTH8UUx028083@svn.freebsd.org> From: Mark Johnston Date: Sun, 29 Dec 2013 17:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260043 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 17:08:31 -0000 Author: markj Date: Sun Dec 29 17:08:30 2013 New Revision: 260043 URL: http://svnweb.freebsd.org/changeset/base/260043 Log: The arguments to sched:::off-cpu are the thread and associated process of the thread selected to run, not the currently running thread. This fix has already been made for ULE in r252070. PR: 177706 MFC after: 1 week Modified: head/sys/kern/sched_4bsd.c Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Sun Dec 29 17:03:45 2013 (r260042) +++ head/sys/kern/sched_4bsd.c Sun Dec 29 17:08:30 2013 (r260043) @@ -1032,7 +1032,7 @@ sched_switch(struct thread *td, struct t PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); #endif - SDT_PROBE2(sched, , , off__cpu, td, td->td_proc); + SDT_PROBE2(sched, , , off__cpu, newtd, newtd->td_proc); /* I feel sleepy */ lock_profile_release_lock(&sched_lock.lock_object); From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 17:16:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F0A55F7; Sun, 29 Dec 2013 17:16:35 +0000 (UTC) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E1C11333; Sun, 29 Dec 2013 17:16:35 +0000 (UTC) Received: from [192.168.2.84] (50-0-150-213.dsl.static.sonic.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.14.7/8.14.7) with ESMTP id rBTHGWYE012847 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 29 Dec 2013 09:16:33 -0800 (PST) (envelope-from marcel@xcllnt.net) Content-Type: multipart/signed; boundary="Apple-Mail=_5D11B954-878F-403B-9B49-184339F30D08"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r260022 - head/lib/libkvm From: Marcel Moolenaar In-Reply-To: <20131229090338.GV59496@kib.kiev.ua> Date: Sun, 29 Dec 2013 09:17:00 -0800 Message-Id: <4A5D5324-6F51-4328-BC52-851F5BB4B33D@xcllnt.net> References: <201312282301.rBSN1wWP002326@svn.freebsd.org> <28D86FF3-F13C-4EB1-AEED-4051F2944E27@xcllnt.net> <20131229090338.GV59496@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1827) Cc: "svn-src-head@freebsd.org" , svn-src-all , Marcel Moolenaar , "src-committers@freebsd.org" , Peter Wemm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 17:16:35 -0000 --Apple-Mail=_5D11B954-878F-403B-9B49-184339F30D08 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Dec 29, 2013, at 1:03 AM, Konstantin Belousov = wrote: > On Sat, Dec 28, 2013 at 06:39:07PM -0800, Marcel Moolenaar wrote: >>=20 >> On Dec 28, 2013, at 4:40 PM, Peter Wemm wrote: >>=20 >>> On Sat, Dec 28, 2013 at 4:04 PM, Peter Wemm wrote: >>>> On Sat, Dec 28, 2013 at 3:01 PM, Marcel Moolenaar = wrote: >>>>> Author: marcel >>>>> Date: Sat Dec 28 23:01:57 2013 >>>>> New Revision: 260022 >>>>> URL: http://svnweb.freebsd.org/changeset/base/260022 >>>>>=20 >>>>> Log: >>>>> Allow building a cross libkvm by setting TARGET_ARCH. The library = so >>>>> produced will be called libkvm-${ARCH} instead of libkvm. This = allows >>>>> installing it alongside the native version. >>>>> For symbol lookups, use ps_pglobal_lookup() instead of __fdnlist() >>>>> when building a cross libkvm. It is assumed that the cross tool = that >>>>> uses the cross libkvm also provides an implementation for this >>>>> proc_services function. >>>>>=20 >>>>> Note that this commit does not change any of the = architecture-specific >>>>> code for cross-compilation. >>>>=20 >>>> Are you sure about this? I just got a brand new buildworld failure = on >>>> an amd64 machine. The lib32 build code was trying to use 64 bit = pmap >>>> definitions and failed miserably. >>>>=20 >>>> I'm really sorry, I accidentally blew away the failure log. I'll = have >>>> another in a few minutes. >>>=20 >>>=20 >>> This is from stage5.1, the lib32 build: >>>=20 >>> /usr/src/lib/libkvm/kvm_amd64.c:78:2: error: unknown type name = 'pml4_entry_t' >>> pml4_entry_t *PML4; >>> ^ >>=20 >> Ugh. I'll probably revert... >=20 > Might be, it makes more sense to disable libkvm compat32 build ? Possibly. I would not do it because of the changes I made. While we don't have a lot of libraries with cross-utility, I also don't think libkvm is the only one. So, it's better to fix the Makefile and keep it included in build32 as it's sets an example. Independently of the above: if we agree that the use case of building 32-bit libs changed over the years from providing 32-bit compat to apps that can't be recompiled to providing an ILP32 runtime environment on a 64-bit host and that we have ports for the compat case, then we can indeed ask the question whether or not to build libkvm. I think it's perfectly fair to declare certain libs or utilities as inherently "native" and as such not provide 32-bit variants for them. That said: cross-development has different requirements and for libkvm it can be seen that the need for a non-native variant is tied to the need for a non-native kgdb (for example). And as a developer, I do like our tools to be inherently "cross". This would argue for keeping libkvm in build32 for the purpose of building a cross-libkvm. --=20 Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_5D11B954-878F-403B-9B49-184339F30D08 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlLAWQwACgkQpgWlLWHuifYpWQCfczY+FVK++35YPDSRLGqbyatZ OUIAnieVysPV7dOy7i810j6bYzfpUO7v =mtWG -----END PGP SIGNATURE----- --Apple-Mail=_5D11B954-878F-403B-9B49-184339F30D08-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 17:37:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E023B7F; Sun, 29 Dec 2013 17:37:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 89A6414F7; Sun, 29 Dec 2013 17:37:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTHbX6Y039132; Sun, 29 Dec 2013 17:37:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTHbXg3039131; Sun, 29 Dec 2013 17:37:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312291737.rBTHbXg3039131@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Dec 2013 17:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260044 - head/sys/dev/aac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 17:37:33 -0000 Author: marius Date: Sun Dec 29 17:37:32 2013 New Revision: 260044 URL: http://svnweb.freebsd.org/changeset/base/260044 Log: Free the MSI again on detach if allocated. Arguably, this code would be better off living in aac_pci.c, but it doesn't seem worth creating a aac_pci_detach() and it's also not the first PCI-specific bit in aac.c MFC after: 3 days Modified: head/sys/dev/aac/aac.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Sun Dec 29 17:08:30 2013 (r260043) +++ head/sys/dev/aac/aac.c Sun Dec 29 17:37:32 2013 (r260044) @@ -631,9 +631,11 @@ aac_free(struct aac_softc *sc) /* disconnect the interrupt handler */ if (sc->aac_intr) bus_teardown_intr(sc->aac_dev, sc->aac_irq, sc->aac_intr); - if (sc->aac_irq != NULL) + if (sc->aac_irq != NULL) { bus_release_resource(sc->aac_dev, SYS_RES_IRQ, rman_get_rid(sc->aac_irq), sc->aac_irq); + pci_release_msi(sc->aac_dev); + } /* destroy data-transfer DMA tag */ if (sc->aac_buffer_dmat) From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 17:43:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5854D6C; Sun, 29 Dec 2013 17:43:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A939159B; Sun, 29 Dec 2013 17:43:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTHhcrq042519; Sun, 29 Dec 2013 17:43:38 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTHhcvi042518; Sun, 29 Dec 2013 17:43:38 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312291743.rBTHhcvi042518@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Dec 2013 17:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260045 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 17:43:38 -0000 Author: marius Date: Sun Dec 29 17:43:37 2013 New Revision: 260045 URL: http://svnweb.freebsd.org/changeset/base/260045 Log: - Simplify MSI allocation and release. For a single one, we don't need to fiddle with the MSI count and pci_release_msi(9) is smart enough to just do nothing in case of INTx. - Don't allocate MSI as RF_SHAREABLE. MFC after: 1 week Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sun Dec 29 17:37:32 2013 (r260044) +++ head/sys/dev/bge/if_bge.c Sun Dec 29 17:43:37 2013 (r260045) @@ -3302,7 +3302,7 @@ bge_attach(device_t dev) struct bge_softc *sc; uint32_t hwcfg = 0, misccfg, pcistate; u_char eaddr[ETHER_ADDR_LEN]; - int capmask, error, msicount, reg, rid, trys; + int capmask, error, reg, rid, trys; sc = device_get_softc(dev); sc->bge_dev = dev; @@ -3311,11 +3311,11 @@ bge_attach(device_t dev) TASK_INIT(&sc->bge_intr_task, 0, bge_intr_task, sc); callout_init_mtx(&sc->bge_stat_ch, &sc->bge_mtx, 0); - /* - * Map control/status registers. - */ pci_enable_busmaster(dev); + /* + * Allocate control/status registers. + */ rid = PCIR_BAR(0); sc->bge_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -3625,13 +3625,8 @@ bge_attach(device_t dev) rid = 0; if (pci_find_cap(sc->bge_dev, PCIY_MSI, ®) == 0) { sc->bge_msicap = reg; - if (bge_can_use_msi(sc)) { - msicount = pci_msi_count(dev); - if (msicount > 1) - msicount = 1; - } else - msicount = 0; - if (msicount == 1 && pci_alloc_msi(dev, &msicount) == 0) { + reg = 1; + if (bge_can_use_msi(sc) && pci_alloc_msi(dev, ®) == 0) { rid = 1; sc->bge_flags |= BGE_FLAG_MSI; } @@ -3648,7 +3643,7 @@ bge_attach(device_t dev) #endif sc->bge_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_SHAREABLE | RF_ACTIVE); + RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->bge_irq == NULL) { device_printf(sc->bge_dev, "couldn't map interrupt\n"); @@ -3991,20 +3986,19 @@ bge_release_resources(struct bge_softc * if (sc->bge_intrhand != NULL) bus_teardown_intr(dev, sc->bge_irq, sc->bge_intrhand); - if (sc->bge_irq != NULL) + if (sc->bge_irq != NULL) { bus_release_resource(dev, SYS_RES_IRQ, - sc->bge_flags & BGE_FLAG_MSI ? 1 : 0, sc->bge_irq); - - if (sc->bge_flags & BGE_FLAG_MSI) + rman_get_rid(sc->bge_irq), sc->bge_irq); pci_release_msi(dev); + } if (sc->bge_res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(0), sc->bge_res); + rman_get_rid(sc->bge_res), sc->bge_res); if (sc->bge_res2 != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(2), sc->bge_res2); + rman_get_rid(sc->bge_res2), sc->bge_res2); if (sc->bge_ifp != NULL) if_free(sc->bge_ifp); From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 18:34:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B413483D; Sun, 29 Dec 2013 18:34:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A04C8188F; Sun, 29 Dec 2013 18:34:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTIYTdo061166; Sun, 29 Dec 2013 18:34:29 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTIYTpo061165; Sun, 29 Dec 2013 18:34:29 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201312291834.rBTIYTpo061165@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 29 Dec 2013 18:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260046 - head/sys/netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 18:34:29 -0000 Author: glebius Date: Sun Dec 29 18:34:29 2013 New Revision: 260046 URL: http://svnweb.freebsd.org/changeset/base/260046 Log: Fix the parse type for NGM_LISTTYPES. Actually, text versions of generic commands are not used, since ngctl(8) uses binary messages for them. And to request a text command one needs a working ngctl(8). That's why the bug was never discovered. I'm pondering on removing the text support for generic commands. Found by: dim with clang 3.4 Modified: head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Sun Dec 29 17:43:37 2013 (r260045) +++ head/sys/netgraph/ng_base.c Sun Dec 29 18:34:29 2013 (r260046) @@ -473,7 +473,7 @@ static const struct ng_parse_type ng_gen &ng_generic_linkinfo_array_type_info }; -DEFINE_PARSE_STRUCT_TYPE(typelist, TYPELIST, (&ng_generic_nodeinfoarray_type)); +DEFINE_PARSE_STRUCT_TYPE(typelist, TYPELIST, (&ng_generic_typeinfoarray_type)); DEFINE_PARSE_STRUCT_TYPE(hooklist, HOOKLIST, (&ng_generic_nodeinfo_type, &ng_generic_linkinfo_array_type)); DEFINE_PARSE_STRUCT_TYPE(listnodes, LISTNODES, @@ -549,7 +549,7 @@ static const struct ng_cmdlist ng_generi NGM_LISTTYPES, "listtypes", NULL, - &ng_generic_typeinfo_type + &ng_generic_typelist_type }, { NGM_GENERIC_COOKIE, From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 18:44:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B45999C4; Sun, 29 Dec 2013 18:44:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8691C1906; Sun, 29 Dec 2013 18:44:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTIiDAh064742; Sun, 29 Dec 2013 18:44:13 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTIiDRZ064740; Sun, 29 Dec 2013 18:44:13 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201312291844.rBTIiDRZ064740@svn.freebsd.org> From: Ed Maste Date: Sun, 29 Dec 2013 18:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260047 - head/sys/dev/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 18:44:13 -0000 Author: emaste Date: Sun Dec 29 18:44:12 2013 New Revision: 260047 URL: http://svnweb.freebsd.org/changeset/base/260047 Log: Clean up license text - Renumber Regents clauses - Remove clause 3 and 4 from TNF license, following upstream change Modified: head/sys/dev/fb/boot_font.c head/sys/dev/fb/gallant12x22.c Modified: head/sys/dev/fb/boot_font.c ============================================================================== --- head/sys/dev/fb/boot_font.c Sun Dec 29 18:34:29 2013 (r260046) +++ head/sys/dev/fb/boot_font.c Sun Dec 29 18:44:12 2013 (r260047) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: head/sys/dev/fb/gallant12x22.c ============================================================================== --- head/sys/dev/fb/gallant12x22.c Sun Dec 29 18:34:29 2013 (r260046) +++ head/sys/dev/fb/gallant12x22.c Sun Dec 29 18:44:12 2013 (r260047) @@ -17,7 +17,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 18:53:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FD26B2D; Sun, 29 Dec 2013 18:53: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 32202105B; Sun, 29 Dec 2013 18:53:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTIrk6t068246; Sun, 29 Dec 2013 18:53:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTIrjcJ068243; Sun, 29 Dec 2013 18:53:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312291853.rBTIrjcJ068243@svn.freebsd.org> From: Dimitry Andric Date: Sun, 29 Dec 2013 18:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260048 - head/sys/netgraph/netflow X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 18:53:46 -0000 Author: dim Date: Sun Dec 29 18:53:45 2013 New Revision: 260048 URL: http://svnweb.freebsd.org/changeset/base/260048 Log: In sys/netgraph/netflow, use __FBSDID() instead of old-style rcs_id[]. MFC after: 3 days Modified: head/sys/netgraph/netflow/netflow.c head/sys/netgraph/netflow/netflow_v9.c head/sys/netgraph/netflow/ng_netflow.c Modified: head/sys/netgraph/netflow/netflow.c ============================================================================== --- head/sys/netgraph/netflow/netflow.c Sun Dec 29 18:44:12 2013 (r260047) +++ head/sys/netgraph/netflow/netflow.c Sun Dec 29 18:53:45 2013 (r260048) @@ -28,8 +28,8 @@ * $SourceForge: netflow.c,v 1.41 2004/09/05 11:41:10 glebius Exp $ */ -static const char rcs_id[] = - "@(#) $FreeBSD$"; +#include +__FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_route.h" Modified: head/sys/netgraph/netflow/netflow_v9.c ============================================================================== --- head/sys/netgraph/netflow/netflow_v9.c Sun Dec 29 18:44:12 2013 (r260047) +++ head/sys/netgraph/netflow/netflow_v9.c Sun Dec 29 18:53:45 2013 (r260048) @@ -26,8 +26,8 @@ * $FreeBSD$ */ -static const char rcs_id[] = - "@(#) $FreeBSD$"; +#include +__FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_route.h" Modified: head/sys/netgraph/netflow/ng_netflow.c ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.c Sun Dec 29 18:44:12 2013 (r260047) +++ head/sys/netgraph/netflow/ng_netflow.c Sun Dec 29 18:53:45 2013 (r260048) @@ -28,8 +28,8 @@ * $SourceForge: ng_netflow.c,v 1.30 2004/09/05 11:37:43 glebius Exp $ */ -static const char rcs_id[] = - "@(#) $FreeBSD$"; +#include +__FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_route.h" From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 19:02:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01586DCF; Sun, 29 Dec 2013 19:02:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D56DA112A; Sun, 29 Dec 2013 19:02:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTJ2YsO072119; Sun, 29 Dec 2013 19:02:34 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTJ2YtS072116; Sun, 29 Dec 2013 19:02:34 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312291902.rBTJ2YtS072116@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 29 Dec 2013 19:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260049 - head/usr.sbin/bsnmpd/modules/snmp_hast X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 19:02:35 -0000 Author: trociny Date: Sun Dec 29 19:02:33 2013 New Revision: 260049 URL: http://svnweb.freebsd.org/changeset/base/260049 Log: Add mibs for hastd(1) queue stats. MFC after: 1 week Modified: head/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt head/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c head/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Modified: head/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt Sun Dec 29 18:53:45 2013 (r260048) +++ head/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt Sun Dec 29 19:02:33 2013 (r260049) @@ -60,6 +60,11 @@ begemotHast MODULE-IDENTITY REVISION "201307010000Z" DESCRIPTION "Added hastResourceWorkerPid." + REVISION "201312290000Z" + DESCRIPTION + "Added hastResourceLocalQueue, hastResourceSendQueue, + hastResourceRecvQueue, hastResourceDoneQueue, + hastResourceIdleQueue." ::= { begemot 220 } begemotHastObjects OBJECT IDENTIFIER ::= { begemotHast 1 } @@ -120,7 +125,12 @@ HastResourceEntry ::= SEQUENCE { hastResourceWriteErrors Counter64, hastResourceDeleteErrors Counter64, hastResourceFlushErrors Counter64, - hastResourceWorkerPid INTEGER + hastResourceWorkerPid INTEGER, + hastResourceLocalQueue UNSIGNED32, + hastResourceSendQueue UNSIGNED32, + hastResourceRecvQueue UNSIGNED32, + hastResourceDoneQueue UNSIGNED32, + hastResourceIdleQueue UNSIGNED32 } hastResourceIndex OBJECT-TYPE @@ -307,4 +317,46 @@ hastResourceWorkerPid OBJECT-TYPE "Worker process ID." ::= { hastResourceEntry 22 } +hastResourceLocalQueue OBJECT-TYPE + SYNTAX UNSIGNED32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of outstanding I/O requests to the local component." + ::= { hastResourceEntry 23 } + +hastResourceSendQueue OBJECT-TYPE + SYNTAX UNSIGNED32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of outstanding I/O requests to send to the remote + component." + ::= { hastResourceEntry 24 } + +hastResourceRecvQueue OBJECT-TYPE + SYNTAX UNSIGNED32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of outstanding I/O requests waiting for response + from the remote component." + ::= { hastResourceEntry 25 } + +hastResourceDoneQueue OBJECT-TYPE + SYNTAX UNSIGNED32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of processed I/O requests to return to the kernel." + ::= { hastResourceEntry 26 } + +hastResourceIdleQueue OBJECT-TYPE + SYNTAX UNSIGNED32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of request objects in the free bucket." + ::= { hastResourceEntry 27 } + END Modified: head/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c Sun Dec 29 18:53:45 2013 (r260048) +++ head/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c Sun Dec 29 19:02:33 2013 (r260049) @@ -79,6 +79,11 @@ struct hast_snmp_resource { uint64_t delete_errors; uint64_t flush_errors; pid_t workerpid; + uint32_t local_queue; + uint32_t send_queue; + uint32_t recv_queue; + uint32_t done_queue; + uint32_t idle_queue; }; static TAILQ_HEAD(, hast_snmp_resource) resources = @@ -345,6 +350,16 @@ update_resources(void) res->flush_errors = nv_get_uint64(nvout, "stat_flush_error%u", i); res->workerpid = nv_get_int32(nvout, "workerpid%u", i); + res->local_queue = + nv_get_uint64(nvout, "local_queue_size%u", i); + res->send_queue = + nv_get_uint64(nvout, "send_queue_size%u", i); + res->recv_queue = + nv_get_uint64(nvout, "recv_queue_size%u", i); + res->done_queue = + nv_get_uint64(nvout, "done_queue_size%u", i); + res->idle_queue = + nv_get_uint64(nvout, "idle_queue_size%u", i); TAILQ_INSERT_TAIL(&resources, res, link); } nv_free(nvout); @@ -503,6 +518,21 @@ op_hastResourceTable(struct snmp_context case LEAF_hastResourceWorkerPid: value->v.integer = res->workerpid; break; + case LEAF_hastResourceLocalQueue: + value->v.uint32 = res->local_queue; + break; + case LEAF_hastResourceSendQueue: + value->v.uint32 = res->send_queue; + break; + case LEAF_hastResourceRecvQueue: + value->v.uint32 = res->recv_queue; + break; + case LEAF_hastResourceDoneQueue: + value->v.uint32 = res->done_queue; + break; + case LEAF_hastResourceIdleQueue: + value->v.uint32 = res->idle_queue; + break; default: ret = SNMP_ERR_RES_UNAVAIL; break; Modified: head/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Sun Dec 29 18:53:45 2013 (r260048) +++ head/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def Sun Dec 29 19:02:33 2013 (r260049) @@ -60,6 +60,11 @@ (20 hastResourceDeleteErrors COUNTER64 GET) (21 hastResourceFlushErrors COUNTER64 GET) (22 hastResourceWorkerPid INTEGER GET) + (23 hastResourceLocalQueue UNSIGNED32 GET) + (24 hastResourceSendQueue UNSIGNED32 GET) + (25 hastResourceRecvQueue UNSIGNED32 GET) + (26 hastResourceDoneQueue UNSIGNED32 GET) + (27 hastResourceIdleQueue UNSIGNED32 GET) ) ) ) From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 19:22:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DFFE463; Sun, 29 Dec 2013 19:22:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EDDF91238; Sun, 29 Dec 2013 19:22:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTJM0We077669; Sun, 29 Dec 2013 19:22:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTJLxEL077611; Sun, 29 Dec 2013 19:21:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312291921.rBTJLxEL077611@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Dec 2013 19:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260050 - head/sys/dev/ed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 19:22:01 -0000 Author: marius Date: Sun Dec 29 19:21:59 2013 New Revision: 260050 URL: http://svnweb.freebsd.org/changeset/base/260050 Log: - Switch to using the common MII bitbang'ing code instead of duplicating it. - Based on lessons learnt with dc(4) (see r185750), add bus space barriers to the MII bitbang read and write functions as well as to instances of page switching. - Add missing locking to ed_ifmedia_{upd,sts}(). - Canonicalize some messages. - Based on actual functionality, ED_TC5299J_MII_DIROUT should be rather named ED_TC5299J_MII_DIRIN. - Remove unused headers. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. MFC after: 1 week Modified: head/sys/dev/ed/if_ed.c head/sys/dev/ed/if_ed_3c503.c head/sys/dev/ed/if_ed_pccard.c head/sys/dev/ed/if_ed_rtl80x9.c head/sys/dev/ed/if_edreg.h head/sys/dev/ed/if_edvar.h head/sys/dev/ed/tc5299jreg.h Modified: head/sys/dev/ed/if_ed.c ============================================================================== --- head/sys/dev/ed/if_ed.c Sun Dec 29 19:02:33 2013 (r260049) +++ head/sys/dev/ed/if_ed.c Sun Dec 29 19:21:59 2013 (r260050) @@ -591,7 +591,11 @@ ed_init_locked(struct ed_softc *sc) /* * Program Command Register for page 1 */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * Copy out our station address @@ -801,7 +805,11 @@ ed_rint(struct ed_softc *sc) /* * Set NIC to page 1 registers to get 'current' pointer */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * 'sc->next_packet' is the logical beginning of the ring-buffer - @@ -912,7 +920,11 @@ ed_rint(struct ed_softc *sc) * Set NIC to page 1 registers before looping to top (prepare * to get 'CURR' current pointer) */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STA); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } } @@ -1556,7 +1568,11 @@ ed_setrcr(struct ed_softc *sc) reg1 = 0x00; /* set page 1 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_1 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); if (ifp->if_flags & IFF_PROMISC) { Modified: head/sys/dev/ed/if_ed_3c503.c ============================================================================== --- head/sys/dev/ed/if_ed_3c503.c Sun Dec 29 19:02:33 2013 (r260049) +++ head/sys/dev/ed/if_ed_3c503.c Sun Dec 29 19:21:59 2013 (r260050) @@ -217,7 +217,11 @@ ed_probe_3Com(device_t dev, int port_rid /* * select page 0 registers */ - ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + ed_nic_outb(sc, ED_P0_CR, ED_CR_PAGE_0 | ED_CR_RD2 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * Attempt to clear WTS bit. If it doesn't clear, then this is a 16bit @@ -228,7 +232,11 @@ ed_probe_3Com(device_t dev, int port_rid /* * select page 2 registers */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_PAGE_2 | ED_CR_RD2 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); /* * The 3c503 forces the WTS bit to a one if this is a 16bit board Modified: head/sys/dev/ed/if_ed_pccard.c ============================================================================== --- head/sys/dev/ed/if_ed_pccard.c Sun Dec 29 19:02:33 2013 (r260049) +++ head/sys/dev/ed/if_ed_pccard.c Sun Dec 29 19:21:59 2013 (r260050) @@ -75,9 +75,6 @@ #include #include #include -#include -#include - #include #include #include @@ -247,6 +244,54 @@ static const struct ed_product { }; /* + * MII bit-bang glue + */ +static uint32_t ed_pccard_dl100xx_mii_bitbang_read(device_t dev); +static void ed_pccard_dl100xx_mii_bitbang_write(device_t dev, uint32_t val); + +static const struct mii_bitbang_ops ed_pccard_dl100xx_mii_bitbang_ops = { + ed_pccard_dl100xx_mii_bitbang_read, + ed_pccard_dl100xx_mii_bitbang_write, + { + ED_DL100XX_MII_DATAOUT, /* MII_BIT_MDO */ + ED_DL100XX_MII_DATAIN, /* MII_BIT_MDI */ + ED_DL100XX_MII_CLK, /* MII_BIT_MDC */ + ED_DL100XX_MII_DIROUT, /* MII_BIT_DIR_HOST_PHY */ + 0 /* MII_BIT_DIR_PHY_HOST */ + } +}; + +static uint32_t ed_pccard_ax88x90_mii_bitbang_read(device_t dev); +static void ed_pccard_ax88x90_mii_bitbang_write(device_t dev, uint32_t val); + +static const struct mii_bitbang_ops ed_pccard_ax88x90_mii_bitbang_ops = { + ed_pccard_ax88x90_mii_bitbang_read, + ed_pccard_ax88x90_mii_bitbang_write, + { + ED_AX88X90_MII_DATAOUT, /* MII_BIT_MDO */ + ED_AX88X90_MII_DATAIN, /* MII_BIT_MDI */ + ED_AX88X90_MII_CLK, /* MII_BIT_MDC */ + 0, /* MII_BIT_DIR_HOST_PHY */ + ED_AX88X90_MII_DIRIN /* MII_BIT_DIR_PHY_HOST */ + } +}; + +static uint32_t ed_pccard_tc5299j_mii_bitbang_read(device_t dev); +static void ed_pccard_tc5299j_mii_bitbang_write(device_t dev, uint32_t val); + +static const struct mii_bitbang_ops ed_pccard_tc5299j_mii_bitbang_ops = { + ed_pccard_tc5299j_mii_bitbang_read, + ed_pccard_tc5299j_mii_bitbang_write, + { + ED_TC5299J_MII_DATAOUT, /* MII_BIT_MDO */ + ED_TC5299J_MII_DATAIN, /* MII_BIT_MDI */ + ED_TC5299J_MII_CLK, /* MII_BIT_MDC */ + 0, /* MII_BIT_DIR_HOST_PHY */ + ED_AX88X90_MII_DIRIN /* MII_BIT_DIR_PHY_HOST */ + } +}; + +/* * PC Card (PCMCIA) specific code. */ static int ed_pccard_probe(device_t); @@ -255,23 +300,14 @@ static void ed_pccard_tick(struct ed_sof static int ed_pccard_dl100xx(device_t dev, const struct ed_product *); static void ed_pccard_dl100xx_mii_reset(struct ed_softc *sc); -static u_int ed_pccard_dl100xx_mii_readbits(struct ed_softc *sc, int nbits); -static void ed_pccard_dl100xx_mii_writebits(struct ed_softc *sc, u_int val, - int nbits); static int ed_pccard_ax88x90(device_t dev, const struct ed_product *); -static u_int ed_pccard_ax88x90_mii_readbits(struct ed_softc *sc, int nbits); -static void ed_pccard_ax88x90_mii_writebits(struct ed_softc *sc, u_int val, - int nbits); static int ed_miibus_readreg(device_t dev, int phy, int reg); static int ed_ifmedia_upd(struct ifnet *); static void ed_ifmedia_sts(struct ifnet *, struct ifmediareq *); static int ed_pccard_tc5299j(device_t dev, const struct ed_product *); -static u_int ed_pccard_tc5299j_mii_readbits(struct ed_softc *sc, int nbits); -static void ed_pccard_tc5299j_mii_writebits(struct ed_softc *sc, u_int val, - int nbits); static void ed_pccard_print_entry(const struct ed_product *pp) @@ -502,7 +538,7 @@ ed_pccard_attach(device_t dev) error = ed_pccard_tc5299j(dev, pp); if (error != 0) { error = ed_probe_Novell_generic(dev, flags); - printf("Novell probe generic %d\n", error); + printf("Novell generic probe failed: %d\n", error); } if (error != 0 && (pp->flags & NE2000DVF_TOSHIBA)) { flags |= ED_FLAGS_TOSH_ETHER; @@ -627,7 +663,7 @@ ed_pccard_dl100xx(device_t dev, const st if (!(pp->flags & NE2000DVF_DL100XX)) return (ENXIO); if (bootverbose) - device_printf(dev, "Trying DL100xx probing\n"); + device_printf(dev, "Trying DL100xx\n"); error = ed_probe_Novell_generic(dev, device_get_flags(dev)); if (bootverbose && error) device_printf(dev, "Novell generic probe failed: %d\n", error); @@ -678,16 +714,11 @@ ed_pccard_dl100xx(device_t dev, const st sc->chip_type = (id & 0x90) == 0x90 ? ED_CHIP_TYPE_DL10022 : ED_CHIP_TYPE_DL10019; sc->type_str = ((id & 0x90) == 0x90) ? "DL10022" : "DL10019"; - sc->mii_readbits = ed_pccard_dl100xx_mii_readbits; - sc->mii_writebits = ed_pccard_dl100xx_mii_writebits; + sc->mii_bitbang_ops = &ed_pccard_dl100xx_mii_bitbang_ops; return (0); } /* MII bit-twiddling routines for cards using Dlink chipset */ -#define DL100XX_MIISET(sc, x) ed_asic_outb(sc, ED_DL100XX_MIIBUS, \ - ed_asic_inb(sc, ED_DL100XX_MIIBUS) | (x)) -#define DL100XX_MIICLR(sc, x) ed_asic_outb(sc, ED_DL100XX_MIIBUS, \ - ed_asic_inb(sc, ED_DL100XX_MIIBUS) & ~(x)) static void ed_pccard_dl100xx_mii_reset(struct ed_softc *sc) @@ -709,36 +740,29 @@ ed_pccard_dl100xx_mii_reset(struct ed_so } static void -ed_pccard_dl100xx_mii_writebits(struct ed_softc *sc, u_int val, int nbits) +ed_pccard_dl100xx_mii_bitbang_write(device_t dev, uint32_t val) { - int i; + struct ed_softc *sc; - DL100XX_MIISET(sc, ED_DL100XX_MII_DIROUT); - for (i = nbits - 1; i >= 0; i--) { - if ((val >> i) & 1) - DL100XX_MIISET(sc, ED_DL100XX_MII_DATAOUT); - else - DL100XX_MIICLR(sc, ED_DL100XX_MII_DATAOUT); - DL100XX_MIISET(sc, ED_DL100XX_MII_CLK); - DL100XX_MIICLR(sc, ED_DL100XX_MII_CLK); - } + sc = device_get_softc(dev); + + ed_asic_outb(sc, ED_DL100XX_MIIBUS, val); + ed_asic_barrier(sc, ED_DL100XX_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } -static u_int -ed_pccard_dl100xx_mii_readbits(struct ed_softc *sc, int nbits) +static uint32_t +ed_pccard_dl100xx_mii_bitbang_read(device_t dev) { - int i; - u_int val = 0; + struct ed_softc *sc; + uint32_t val; - DL100XX_MIICLR(sc, ED_DL100XX_MII_DIROUT); - for (i = nbits - 1; i >= 0; i--) { - DL100XX_MIISET(sc, ED_DL100XX_MII_CLK); - val <<= 1; - if (ed_asic_inb(sc, ED_DL100XX_MIIBUS) & ED_DL100XX_MII_DATAIN) - val++; - DL100XX_MIICLR(sc, ED_DL100XX_MII_CLK); - } - return val; + sc = device_get_softc(dev); + + val = ed_asic_inb(sc, ED_DL100XX_MIIBUS); + ed_asic_barrier(sc, ED_DL100XX_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return (val); } static void @@ -747,7 +771,11 @@ ed_pccard_ax88x90_reset(struct ed_softc int i; /* Reset Card */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STP | ED_CR_PAGE_0); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_asic_outb(sc, ED_NOVELL_RESET, ed_asic_inb(sc, ED_NOVELL_RESET)); /* Wait for the RST bit to assert, but cap it at 10ms */ @@ -880,7 +908,6 @@ ed_pccard_ax88x90_check_mii(device_t dev if (i == 32) return (ENXIO); return (0); - } /* @@ -910,18 +937,17 @@ ed_pccard_ax88x90(device_t dev, const st pccard_ccr_write_1(dev, PCCARD_CCR_IOBASE0, iobase & 0xff); pccard_ccr_write_1(dev, PCCARD_CCR_IOBASE1, (iobase >> 8) & 0xff); - sc->mii_readbits = ed_pccard_ax88x90_mii_readbits; - sc->mii_writebits = ed_pccard_ax88x90_mii_writebits; error = ed_probe_ax88x90_generic(dev, device_get_flags(dev)); if (error) { if (bootverbose) device_printf(dev, "probe ax88x90 failed %d\n", error); - goto fail; + return (error); } + sc->mii_bitbang_ops = &ed_pccard_ax88x90_mii_bitbang_ops; error = ed_pccard_ax88x90_check_mii(dev, sc); if (error) - goto fail; + return (error); sc->vendor = ED_VENDOR_NOVELL; sc->type = ED_TYPE_NE2000; if (sc->chip_type == ED_CHIP_TYPE_AX88190) @@ -929,40 +955,32 @@ ed_pccard_ax88x90(device_t dev, const st else sc->type_str = "AX88790"; return (0); -fail:; - sc->mii_readbits = 0; - sc->mii_writebits = 0; - return (error); } static void -ed_pccard_ax88x90_mii_writebits(struct ed_softc *sc, u_int val, int nbits) +ed_pccard_ax88x90_mii_bitbang_write(device_t dev, uint32_t val) { - int i, data; + struct ed_softc *sc; - for (i = nbits - 1; i >= 0; i--) { - data = (val >> i) & 1 ? ED_AX88X90_MII_DATAOUT : 0; - ed_asic_outb(sc, ED_AX88X90_MIIBUS, data); - ed_asic_outb(sc, ED_AX88X90_MIIBUS, data | ED_AX88X90_MII_CLK); - } + sc = device_get_softc(dev); + + ed_asic_outb(sc, ED_AX88X90_MIIBUS, val); + ed_asic_barrier(sc, ED_AX88X90_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } -static u_int -ed_pccard_ax88x90_mii_readbits(struct ed_softc *sc, int nbits) +static uint32_t +ed_pccard_ax88x90_mii_bitbang_read(device_t dev) { - int i; - u_int val = 0; - uint8_t mdio; + struct ed_softc *sc; + uint32_t val; - mdio = ED_AX88X90_MII_DIRIN; - for (i = nbits - 1; i >= 0; i--) { - ed_asic_outb(sc, ED_AX88X90_MIIBUS, mdio); - val <<= 1; - if (ed_asic_inb(sc, ED_AX88X90_MIIBUS) & ED_AX88X90_MII_DATAIN) - val++; - ed_asic_outb(sc, ED_AX88X90_MIIBUS, mdio | ED_AX88X90_MII_CLK); - } - return val; + sc = device_get_softc(dev); + + val = ed_asic_inb(sc, ED_AX88X90_MIIBUS); + ed_asic_barrier(sc, ED_AX88X90_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return (val); } /* @@ -983,7 +1001,7 @@ ed_pccard_tc5299j(device_t dev, const st error = ed_probe_Novell_generic(dev, device_get_flags(dev)); if (bootverbose) - device_printf(dev, "probe novel returns %d\n", error); + device_printf(dev, "Novell generic probe failed: %d\n", error); if (error != 0) return (error); @@ -992,24 +1010,17 @@ ed_pccard_tc5299j(device_t dev, const st * devices have MII and a PHY, so we use this to weed out chips that * would otherwise make it through the tests we have after this point. */ - sc->mii_readbits = ed_pccard_tc5299j_mii_readbits; - sc->mii_writebits = ed_pccard_tc5299j_mii_writebits; + sc->mii_bitbang_ops = &ed_pccard_tc5299j_mii_bitbang_ops; for (i = 0; i < 32; i++) { id = ed_miibus_readreg(dev, i, MII_PHYIDR1); if (id != 0 && id != 0xffff) break; } - if (i == 32) { - sc->mii_readbits = 0; - sc->mii_writebits = 0; + if (i == 32) return (ENXIO); - } ts = "TC5299J"; - if (ed_pccard_rom_mac(dev, sc->enaddr) == 0) { - sc->mii_readbits = 0; - sc->mii_writebits = 0; + if (ed_pccard_rom_mac(dev, sc->enaddr) == 0) return (ENXIO); - } sc->vendor = ED_VENDOR_NOVELL; sc->type = ED_TYPE_NE2000; sc->chip_type = ED_CHIP_TYPE_TC5299J; @@ -1018,50 +1029,31 @@ ed_pccard_tc5299j(device_t dev, const st } static void -ed_pccard_tc5299j_mii_writebits(struct ed_softc *sc, u_int val, int nbits) +ed_pccard_tc5299j_mii_bitbang_write(device_t dev, uint32_t val) { - int i; - uint8_t cr, data; + struct ed_softc *sc; - /* Select page 3 */ - cr = ed_nic_inb(sc, ED_P0_CR); - ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); - - for (i = nbits - 1; i >= 0; i--) { - data = (val >> i) & 1 ? ED_TC5299J_MII_DATAOUT : 0; - ed_nic_outb(sc, ED_TC5299J_MIIBUS, data); - ed_nic_outb(sc, ED_TC5299J_MIIBUS, data | ED_TC5299J_MII_CLK); - } - ed_nic_outb(sc, ED_TC5299J_MIIBUS, 0); - - /* Restore prior page */ - ed_nic_outb(sc, ED_P0_CR, cr); + sc = device_get_softc(dev); + + /* We are already on page 3. */ + ed_nic_outb(sc, ED_TC5299J_MIIBUS, val); + ed_nic_barrier(sc, ED_TC5299J_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } -static u_int -ed_pccard_tc5299j_mii_readbits(struct ed_softc *sc, int nbits) +static uint32_t +ed_pccard_tc5299j_mii_bitbang_read(device_t dev) { - int i; - u_int val = 0; - uint8_t cr; + struct ed_softc *sc; + uint32_t val; + + sc = device_get_softc(dev); - /* Select page 3 */ - cr = ed_nic_inb(sc, ED_P0_CR); - ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); - - ed_asic_outb(sc, ED_TC5299J_MIIBUS, ED_TC5299J_MII_DIROUT); - for (i = nbits - 1; i >= 0; i--) { - ed_nic_outb(sc, ED_TC5299J_MIIBUS, - ED_TC5299J_MII_CLK | ED_TC5299J_MII_DIROUT); - val <<= 1; - if (ed_nic_inb(sc, ED_TC5299J_MIIBUS) & ED_TC5299J_MII_DATAIN) - val++; - ed_nic_outb(sc, ED_TC5299J_MIIBUS, ED_TC5299J_MII_DIROUT); - } - - /* Restore prior page */ - ed_nic_outb(sc, ED_P0_CR, cr); - return val; + /* We are already on page 3. */ + val = ed_asic_inb(sc, ED_TC5299J_MIIBUS); + ed_nic_barrier(sc, ED_TC5299J_MIIBUS, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return (val); } /* @@ -1071,7 +1063,8 @@ static int ed_miibus_readreg(device_t dev, int phy, int reg) { struct ed_softc *sc; - int failed, val; + int val; + uint8_t cr = 0; sc = device_get_softc(dev); /* @@ -1085,10 +1078,6 @@ ed_miibus_readreg(device_t dev, int phy, * Also, PHYs above 16 appear to be phantoms on some cards, but not * others. Registers read for this are often the same as prior values * read. Filter all register requests to 17-31. - * - * I can't explain it, since I don't have the DL100xx data sheets, but - * the DL100xx chips do 13-bits before the 'ACK' but, but the AX88x90 - * chips have 14. The linux pcnet and axnet drivers confirm this. */ if (sc->chip_type == ED_CHIP_TYPE_AX88790) { if (phy > 0x10) @@ -1098,29 +1087,33 @@ ed_miibus_readreg(device_t dev, int phy, ED_AX88X90_GPIO_INT_PHY); else ed_asic_outb(sc, ED_AX88X90_GPIO, 0); + ed_asic_barrier(sc, ED_AX88X90_GPIO, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } else if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Select page 3. */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + cr = ed_nic_inb(sc, ED_P0_CR); + ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } + val = mii_bitbang_readreg(dev, sc->mii_bitbang_ops, phy, reg); + if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Restore prior page. */ + ed_nic_outb(sc, ED_P0_CR, cr); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } - - (*sc->mii_writebits)(sc, 0xffffffff, 32); - (*sc->mii_writebits)(sc, ED_MII_STARTDELIM, ED_MII_STARTDELIM_BITS); - (*sc->mii_writebits)(sc, ED_MII_READOP, ED_MII_OP_BITS); - (*sc->mii_writebits)(sc, phy, ED_MII_PHY_BITS); - (*sc->mii_writebits)(sc, reg, ED_MII_REG_BITS); - if (sc->chip_type == ED_CHIP_TYPE_AX88790 || - sc->chip_type == ED_CHIP_TYPE_AX88190) - (*sc->mii_readbits)(sc, ED_MII_ACK_BITS); - failed = (*sc->mii_readbits)(sc, ED_MII_ACK_BITS); - val = (*sc->mii_readbits)(sc, ED_MII_DATA_BITS); - (*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS); -/* printf("Reading phy %d reg %#x returning %#x (valid %d)\n", phy, reg, val, !failed); */ - return (failed ? 0 : val); + return (val); } static int ed_miibus_writereg(device_t dev, int phy, int reg, int data) { struct ed_softc *sc; + uint8_t cr = 0; -/* printf("Writing phy %d reg %#x data %#x\n", phy, reg, data); */ sc = device_get_softc(dev); /* See ed_miibus_readreg for details */ if (sc->chip_type == ED_CHIP_TYPE_AX88790) { @@ -1131,15 +1124,24 @@ ed_miibus_writereg(device_t dev, int phy ED_AX88X90_GPIO_INT_PHY); else ed_asic_outb(sc, ED_AX88X90_GPIO, 0); + ed_asic_barrier(sc, ED_AX88X90_GPIO, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } else if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Select page 3. */ + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + cr = ed_nic_inb(sc, ED_P0_CR); + ed_nic_outb(sc, ED_P0_CR, cr | ED_CR_PAGE_3); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + } + mii_bitbang_writereg(dev, sc->mii_bitbang_ops, phy, reg, data); + if (sc->chip_type == ED_CHIP_TYPE_TC5299J) { + /* Restore prior page. */ + ed_nic_outb(sc, ED_P0_CR, cr); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } - (*sc->mii_writebits)(sc, 0xffffffff, 32); - (*sc->mii_writebits)(sc, ED_MII_STARTDELIM, ED_MII_STARTDELIM_BITS); - (*sc->mii_writebits)(sc, ED_MII_WRITEOP, ED_MII_OP_BITS); - (*sc->mii_writebits)(sc, phy, ED_MII_PHY_BITS); - (*sc->mii_writebits)(sc, reg, ED_MII_REG_BITS); - (*sc->mii_writebits)(sc, ED_MII_TURNAROUND, ED_MII_TURNAROUND_BITS); - (*sc->mii_writebits)(sc, data, ED_MII_DATA_BITS); - (*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS); return (0); } @@ -1150,9 +1152,12 @@ ed_ifmedia_upd(struct ifnet *ifp) int error; sc = ifp->if_softc; - if (sc->miibus == NULL) - return (ENXIO); ED_LOCK(sc); + if (sc->miibus == NULL) { + ED_UNLOCK(sc); + return (ENXIO); + } + error = ed_pccard_kick_phy(sc); ED_UNLOCK(sc); return (error); @@ -1165,13 +1170,17 @@ ed_ifmedia_sts(struct ifnet *ifp, struct struct mii_data *mii; sc = ifp->if_softc; - if (sc->miibus == NULL) + ED_LOCK(sc); + if (sc->miibus == NULL) { return; + ED_UNLOCK(sc); + } mii = device_get_softc(sc->miibus); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ED_UNLOCK(sc); } static void @@ -1226,7 +1235,7 @@ static device_method_t ed_pccard_methods DEVMETHOD(miibus_readreg, ed_miibus_readreg), DEVMETHOD(miibus_writereg, ed_miibus_writereg), - { 0, 0 } + DEVMETHOD_END }; static driver_t ed_pccard_driver = { @@ -1235,7 +1244,7 @@ static driver_t ed_pccard_driver = { sizeof(struct ed_softc) }; -DRIVER_MODULE(ed, pccard, ed_pccard_driver, ed_devclass, 0, 0); -DRIVER_MODULE(miibus, ed, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE(ed, pccard, ed_pccard_driver, ed_devclass, 0, NULL); +DRIVER_MODULE(miibus, ed, miibus_driver, miibus_devclass, 0, NULL); MODULE_DEPEND(ed, miibus, 1, 1, 1); MODULE_DEPEND(ed, ether, 1, 1, 1); Modified: head/sys/dev/ed/if_ed_rtl80x9.c ============================================================================== --- head/sys/dev/ed/if_ed_rtl80x9.c Sun Dec 29 19:02:33 2013 (r260049) +++ head/sys/dev/ed/if_ed_rtl80x9.c Sun Dec 29 19:21:59 2013 (r260050) @@ -117,7 +117,11 @@ ed_probe_RTL80x9(device_t dev, int port_ ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_10_5, 0, 0); ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_AUTO, 0, 0); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_PAGE_3 | ED_CR_STP); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch (ed_nic_inb(sc, ED_RTL80X9_CONFIG2) & ED_RTL80X9_CF2_MEDIA) { case ED_RTL80X9_CF2_AUTO: @@ -145,8 +149,12 @@ ed_rtl_set_media(struct ifnet *ifp) sc = ifp->if_softc; ED_LOCK(sc); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_3 | (ed_nic_inb(sc, ED_P0_CR) & (ED_CR_STA | ED_CR_STP))); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch(IFM_SUBTYPE(sc->ifmedia.ifm_cur->ifm_media)) { case IFM_10_T: @@ -190,8 +198,12 @@ ed_rtl_get_media(struct ifnet *ifp, stru if (IFM_SUBTYPE(imr->ifm_active) == IFM_AUTO) { ED_LOCK(sc); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_3 | (ed_nic_inb(sc, ED_P0_CR) & (ED_CR_STA | ED_CR_STP))); + ed_nic_barrier(sc, ED_P0_CR, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch (ed_nic_inb(sc, ED_RTL80X9_CONFIG0) & (sc->chip_type == ED_CHIP_TYPE_RTL8029 ? ED_RTL80X9_CF0_BNC Modified: head/sys/dev/ed/if_edreg.h ============================================================================== --- head/sys/dev/ed/if_edreg.h Sun Dec 29 19:02:33 2013 (r260049) +++ head/sys/dev/ed/if_edreg.h Sun Dec 29 19:21:59 2013 (r260050) @@ -1079,22 +1079,3 @@ struct ed_ring { #define ED_CHIP_TYPE_TC5299J 10 #define ED_CHIP_TYPE_W89C926 11 #define ED_CHIP_TYPE_WD790 12 - -/* - * MII bus definitions. These are common to both DL100xx and AX88x90 - * MII definitions, because they are standards based. - */ -#define ED_MII_STARTDELIM 0x01 -#define ED_MII_WRITEOP 0x01 -#define ED_MII_READOP 0x02 -#define ED_MII_TURNAROUND 0x02 -#define ED_MII_IDLE 0x01 - -#define ED_MII_STARTDELIM_BITS 2 -#define ED_MII_OP_BITS 2 -#define ED_MII_PHY_BITS 5 -#define ED_MII_REG_BITS 5 -#define ED_MII_TURNAROUND_BITS 2 -#define ED_MII_ACK_BITS 1 -#define ED_MII_DATA_BITS 16 -#define ED_MII_IDLE_BITS 1 Modified: head/sys/dev/ed/if_edvar.h ============================================================================== --- head/sys/dev/ed/if_edvar.h Sun Dec 29 19:02:33 2013 (r260049) +++ head/sys/dev/ed/if_edvar.h Sun Dec 29 19:21:59 2013 (r260050) @@ -28,7 +28,10 @@ */ #ifndef SYS_DEV_ED_IF_EDVAR_H -#define SYS_DEV_ED_IF_EDVAR_H +#define SYS_DEV_ED_IF_EDVAR_H + +#include + /* * ed_softc: per line info and status */ @@ -62,8 +65,7 @@ struct ed_softc { u_long command); void (*sc_mediachg)(struct ed_softc *); device_t miibus; /* MII bus for cards with MII. */ - void (*mii_writebits)(struct ed_softc *, u_int, int); - u_int (*mii_readbits)(struct ed_softc *, int); + mii_bitbang_ops_t mii_bitbang_ops; struct callout tick_ch; void (*sc_tick)(struct ed_softc *); void (*readmem)(struct ed_softc *sc, bus_size_t src, uint8_t *dst, @@ -109,6 +111,10 @@ struct ed_softc { struct ifmib_iso_8802_3 mibdata; /* stuff for network mgmt */ }; +#define ed_nic_barrier(sc, port, length, flags) \ + bus_space_barrier(sc->port_bst, sc->port_bsh, \ + (sc)->nic_offset + (port), (length), (flags)) + #define ed_nic_inb(sc, port) \ bus_space_read_1(sc->port_bst, sc->port_bsh, (sc)->nic_offset + (port)) @@ -147,6 +153,10 @@ struct ed_softc { bus_space_write_multi_4(sc->port_bst, sc->port_bsh, \ (sc)->nic_offset + (port), (uint32_t *)(addr), (count)) +#define ed_asic_barrier(sc, port, length, flags) \ + bus_space_barrier(sc->port_bst, sc->port_bsh, \ + (sc)->asic_offset + (port), (length), (flags)) + #define ed_asic_inb(sc, port) \ bus_space_read_1(sc->port_bst, sc->port_bsh, \ (sc)->asic_offset + (port)) Modified: head/sys/dev/ed/tc5299jreg.h ============================================================================== --- head/sys/dev/ed/tc5299jreg.h Sun Dec 29 19:02:33 2013 (r260049) +++ head/sys/dev/ed/tc5299jreg.h Sun Dec 29 19:21:59 2013 (r260050) @@ -34,5 +34,5 @@ #define ED_TC5299J_MII_CLK 0x01 #define ED_TC5299J_MII_DATAOUT 0x02 -#define ED_TC5299J_MII_DIROUT 0x04 +#define ED_TC5299J_MII_DIRIN 0x04 #define ED_TC5299J_MII_DATAIN 0x08 From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 19:25:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 797695C2; Sun, 29 Dec 2013 19:25:48 +0000 (UTC) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 369881249; Sun, 29 Dec 2013 19:25:47 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id rBTJDDGf024770; Sun, 29 Dec 2013 13:15:25 -0600 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by pp2.rice.edu with ESMTP id 1h2e2503n5-1; Sun, 29 Dec 2013 13:15:25 -0600 X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id A95A340134; Sun, 29 Dec 2013 13:15:24 -0600 (CST) Message-ID: <52C074CA.4040208@rice.edu> Date: Sun, 29 Dec 2013 13:15:22 -0600 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r259908 - head/sys/vm References: <201312260546.rBQ5kAoJ009798@svn.freebsd.org> <52BF6699.1040006@freebsd.org> <52BF7195.2070606@rice.edu> <20131229090053.GU59496@kib.kiev.ua> In-Reply-To: <20131229090053.GU59496@kib.kiev.ua> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.629899992726084 urlsuspect_oldscore=0.0298999927260837 suspectscore=4 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=9.48027711888955e-10 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=498 rbsscore=0.629899992726084 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1305240000 definitions=main-1312290139 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org, Nathan Whitehorn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 19:25:48 -0000 On 12/29/2013 03:00, Konstantin Belousov wrote: > On Sat, Dec 28, 2013 at 06:49:25PM -0600, Alan Cox wrote: >> On 12/28/2013 18:02, Nathan Whitehorn wrote: >>> On 12/26/13 00:46, Marcel Moolenaar wrote: >>>> Author: marcel >>>> Date: Thu Dec 26 05:46:10 2013 >>>> New Revision: 259908 >>>> URL: http://svnweb.freebsd.org/changeset/base/259908 >>>> >>>> Log: >>>> For ia64, use pmap_remove_pages() and not pmap_remove(). The problem is >>>> that we don't have a good way (yet) to iterate over the mapped pages by >>>> virtual address and simply try each page within the range. Given that we >>>> call pmap_remove() over the entire 2^63 bytes of address space, it takes >>>> a while for pmap_remove to have tried all 2^50 pages. >>>> By using pmap_remove_pages() we use the PV list to find all mappings. >>>> >>>> Change derived from a patch by: alc >>>> >>> Why make this ia64-specific? It seems like a potentially useful general >>> optimization and certainly shouldn't be harmful on other architectures. >> Some of the other implementations of pmap_remove_pages() have >> limitations that don't permit them to be used for this purpose, e.g., >> >> if (pmap != PCPU_GET(curpmap)) { >> printf("warning: pmap_remove_pages called with >> non-current pmap\n"); >> return; >> } > BTW, I do not easily see why the current amd64 implementation needs > the pmap being current. I do not see accesses to recursive page table > mappings in the code. The amd64 implementation doesn't load and clear the PTEs atomically, so the dirty bit could be set by another processor after the PTE was loaded but before it was cleared. Alan From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 19:27:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED92A711; Sun, 29 Dec 2013 19:27: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D9A1A1254; Sun, 29 Dec 2013 19:27:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTJRWW1078257; Sun, 29 Dec 2013 19:27:32 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTJRWYj078256; Sun, 29 Dec 2013 19:27:32 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312291927.rBTJRWYj078256@svn.freebsd.org> From: Mark Johnston Date: Sun, 29 Dec 2013 19:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260051 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 19:27:33 -0000 Author: markj Date: Sun Dec 29 19:27:32 2013 New Revision: 260051 URL: http://svnweb.freebsd.org/changeset/base/260051 Log: When clearing relocations to __dtrace* symbols, handle both SHT_REL and SHT_RELA sections properly instead of assuming that the relocation section is of type SHT_REL. Submitted by: Prashanth Kumar (original version) MFC after: 1 month Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Dec 29 19:21:59 2013 (r260050) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Dec 29 19:27:32 2013 (r260051) @@ -1620,10 +1620,17 @@ process_obj(dtrace_hdl_t *dtp, const cha * the executable file as the symbol is going to be * change from UND to ABS. */ - rela.r_offset = 0; - rela.r_info = 0; - rela.r_addend = 0; - (void) gelf_update_rela(data_rel, i, &rela); + if (shdr_rel.sh_type == SHT_RELA) { + rela.r_offset = 0; + rela.r_info = 0; + rela.r_addend = 0; + (void) gelf_update_rela(data_rel, i, &rela); + } else { + GElf_Rel rel; + rel.r_offset = 0; + rel.r_info = 0; + (void) gelf_update_rel(data_rel, i, &rel); + } #endif mod = 1; From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 19:31:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9318A8D7; Sun, 29 Dec 2013 19:31:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F15112C6; Sun, 29 Dec 2013 19:31:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTJVnZG081278; Sun, 29 Dec 2013 19:31:49 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTJVnmb081277; Sun, 29 Dec 2013 19:31:49 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201312291931.rBTJVnmb081277@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 29 Dec 2013 19:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260052 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 19:31:49 -0000 Author: glebius Date: Sun Dec 29 19:31:49 2013 New Revision: 260052 URL: http://svnweb.freebsd.org/changeset/base/260052 Log: Claim copyright since I've almost rewritten this file in r256512. Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Sun Dec 29 19:27:32 2013 (r260051) +++ head/usr.bin/netstat/if.c Sun Dec 29 19:31:49 2013 (r260052) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2013 Gleb Smirnoff * Copyright (c) 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 19:32:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B3D6A10; Sun, 29 Dec 2013 19:32: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2717D12C8; Sun, 29 Dec 2013 19:32:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTJWSwG081398; Sun, 29 Dec 2013 19:32:28 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTJWR0H081396; Sun, 29 Dec 2013 19:32:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312291932.rBTJWR0H081396@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Dec 2013 19:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260053 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 19:32:28 -0000 Author: marius Date: Sun Dec 29 19:32:27 2013 New Revision: 260053 URL: http://svnweb.freebsd.org/changeset/base/260053 Log: - There's no need to keep track of resource IDs. - Simplify MSI allocation and release. For a single one, we don't need to fiddle with the MSI count and pci_release_msi(9) is smart enough to just do nothing in case of INTx. - Don't allocate MSI as RF_SHAREABLE. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. MFC after: 1 week Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Dec 29 19:31:49 2013 (r260052) +++ head/sys/dev/iwn/if_iwn.c Sun Dec 29 19:32:27 2013 (r260053) @@ -352,7 +352,8 @@ static device_method_t iwn_methods[] = { DEVMETHOD(device_shutdown, iwn_shutdown), DEVMETHOD(device_suspend, iwn_suspend), DEVMETHOD(device_resume, iwn_resume), - { 0, 0 } + + DEVMETHOD_END }; static driver_t iwn_driver = { @@ -362,7 +363,7 @@ static driver_t iwn_driver = { }; static devclass_t iwn_devclass; -DRIVER_MODULE(iwn, pci, iwn_driver, iwn_devclass, 0, 0); +DRIVER_MODULE(iwn, pci, iwn_driver, iwn_devclass, NULL, NULL); MODULE_VERSION(iwn, 1); @@ -392,7 +393,7 @@ iwn_attach(device_t dev) struct ieee80211com *ic; struct ifnet *ifp; uint32_t reg; - int i, error, result; + int i, error, rid; uint8_t macaddr[IEEE80211_ADDR_LEN]; sc->sc_dev = dev; @@ -433,8 +434,8 @@ iwn_attach(device_t dev) /* Enable bus-mastering. */ pci_enable_busmaster(dev); - sc->mem_rid = PCIR_BAR(0); - sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + rid = PCIR_BAR(0); + sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "can't map mem space\n"); @@ -444,13 +445,13 @@ iwn_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - sc->irq_rid = 0; - if ((result = pci_msi_count(dev)) == 1 && - pci_alloc_msi(dev, &result) == 0) - sc->irq_rid = 1; + i = 1; + rid = 0; + if (pci_alloc_msi(dev, &i) == 0) + rid = 1; /* Install interrupt handler. */ - sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, - RF_ACTIVE | RF_SHAREABLE); + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | + (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->irq == NULL) { device_printf(dev, "can't map interrupt\n"); error = ENOMEM; @@ -1319,9 +1320,9 @@ iwn_detach(device_t dev) /* Uninstall interrupt handler. */ if (sc->irq != NULL) { bus_teardown_intr(dev, sc->irq, sc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); - if (sc->irq_rid == 1) - pci_release_msi(dev); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), + sc->irq); + pci_release_msi(dev); } /* Free DMA resources. */ @@ -1335,7 +1336,8 @@ iwn_detach(device_t dev) iwn_free_fwmem(sc); if (sc->mem != NULL) - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem), sc->mem); if (ifp != NULL) if_free(ifp); Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Sun Dec 29 19:31:49 2013 (r260052) +++ head/sys/dev/iwn/if_iwnvar.h Sun Dec 29 19:32:27 2013 (r260053) @@ -296,11 +296,9 @@ struct iwn_softc { struct iwn_tx_ring txq[IWN5000_NTXQUEUES]; struct iwn_rx_ring rxq; - int mem_rid; struct resource *mem; bus_space_tag_t sc_st; bus_space_handle_t sc_sh; - int irq_rid; struct resource *irq; void *sc_ih; bus_size_t sc_sz; From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 19:55:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E09DD52; Sun, 29 Dec 2013 19:55:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A6421432; Sun, 29 Dec 2013 19:55:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTJt7ng089753; Sun, 29 Dec 2013 19:55:07 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTJt7r9089752; Sun, 29 Dec 2013 19:55:07 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312291955.rBTJt7r9089752@svn.freebsd.org> From: Dimitry Andric Date: Sun, 29 Dec 2013 19:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260054 - head/sys/dev/tpm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 19:55:07 -0000 Author: dim Date: Sun Dec 29 19:55:06 2013 New Revision: 260054 URL: http://svnweb.freebsd.org/changeset/base/260054 Log: In sys/dev/tpm/tpm.c, #if 0 an unused static function. MFC after: 3 days Modified: head/sys/dev/tpm/tpm.c Modified: head/sys/dev/tpm/tpm.c ============================================================================== --- head/sys/dev/tpm/tpm.c Sun Dec 29 19:32:27 2013 (r260053) +++ head/sys/dev/tpm/tpm.c Sun Dec 29 19:55:06 2013 (r260054) @@ -1138,6 +1138,7 @@ tpm_legacy_in(bus_space_tag_t iot, bus_s return bus_space_read_1(iot, ioh, 1); } +#if 0 /* Write single byte using legacy interface. */ static inline void tpm_legacy_out(bus_space_tag_t iot, bus_space_handle_t ioh, int reg, u_int8_t v) @@ -1145,6 +1146,7 @@ tpm_legacy_out(bus_space_tag_t iot, bus_ bus_space_write_1(iot, ioh, 0, reg); bus_space_write_1(iot, ioh, 1, v); } +#endif /* Probe for TPM using legacy interface. */ int From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 20:05:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40F5EEEC; Sun, 29 Dec 2013 20:05:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2CF6514C9; Sun, 29 Dec 2013 20:05:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTK5ncf093799; Sun, 29 Dec 2013 20:05:49 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTK5nja093798; Sun, 29 Dec 2013 20:05:49 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312292005.rBTK5nja093798@svn.freebsd.org> From: Dimitry Andric Date: Sun, 29 Dec 2013 20:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260055 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 20:05:49 -0000 Author: dim Date: Sun Dec 29 20:05:48 2013 New Revision: 260055 URL: http://svnweb.freebsd.org/changeset/base/260055 Log: In sys/dev/usb/wlan/if_urtw.c, #if 0 a static const variable, which has been unused since r198194. MFC after: 3 days Modified: head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Sun Dec 29 19:55:06 2013 (r260054) +++ head/sys/dev/usb/wlan/if_urtw.c Sun Dec 29 20:05:48 2013 (r260055) @@ -478,6 +478,7 @@ static struct urtw_pair urtw_ratetable[] { 96, 10 }, { 108, 11 } }; +#if 0 static const uint8_t urtw_8187b_reg_table[][3] = { { 0xf0, 0x32, 0 }, { 0xf1, 0x32, 0 }, { 0xf2, 0x00, 0 }, { 0xf3, 0x00, 0 }, { 0xf4, 0x32, 0 }, { 0xf5, 0x43, 0 }, @@ -511,6 +512,7 @@ static const uint8_t urtw_8187b_reg_tabl { 0x4c, 0x00, 2 }, { 0x9f, 0x00, 3 }, { 0x8c, 0x01, 0 }, { 0x8d, 0x10, 0 }, { 0x8e, 0x08, 0 }, { 0x8f, 0x00, 0 } }; +#endif static usb_callback_t urtw_bulk_rx_callback; static usb_callback_t urtw_bulk_tx_callback; From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 20:13:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE89A1BC; Sun, 29 Dec 2013 20:13:21 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 388781547; Sun, 29 Dec 2013 20:13:21 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rBTKDFrS015559; Sun, 29 Dec 2013 22:13:15 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rBTKDFrS015559 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rBTKDFXY015558; Sun, 29 Dec 2013 22:13:15 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 29 Dec 2013 22:13:15 +0200 From: Konstantin Belousov To: Alan Cox Subject: Re: svn commit: r259908 - head/sys/vm Message-ID: <20131229201315.GW59496@kib.kiev.ua> References: <201312260546.rBQ5kAoJ009798@svn.freebsd.org> <52BF6699.1040006@freebsd.org> <52BF7195.2070606@rice.edu> <20131229090053.GU59496@kib.kiev.ua> <52C074CA.4040208@rice.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oBzgnH5Lm+6YPTsS" Content-Disposition: inline In-Reply-To: <52C074CA.4040208@rice.edu> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org, Nathan Whitehorn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 20:13:21 -0000 --oBzgnH5Lm+6YPTsS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 29, 2013 at 01:15:22PM -0600, Alan Cox wrote: > On 12/29/2013 03:00, Konstantin Belousov wrote: > > BTW, I do not easily see why the current amd64 implementation needs > > the pmap being current. I do not see accesses to recursive page table > > mappings in the code. >=20 > The amd64 implementation doesn't load and clear the PTEs atomically, so > the dirty bit could be set by another processor after the PTE was loaded > but before it was cleared. But then, the check at the start of the function is not sufficient. Other thread in the process or rforked child could still operate on the address space. I think it is mostly enough since pmap_remove_pages() is (was) only called for the last reference on the vmspace going away, so accidentally the check is good enough. But IMO it definitely does not reflect the cause for the restriction. --oBzgnH5Lm+6YPTsS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSwIJaAAoJEJDCuSvBvK1Bt1cP/3zyVhLdCsmgNqETjYiyRs0o WmHTAfK7pbIIDtbXceShy5c0QBrDAAhaSo+iSLso95xMdLw2nxosC17HmUiw3q4W KF8HZnQFM3xzw+NX88HEY7j8n73g++FhrWCC8cIfwEJR1j6Z1MTxIX1B11MjHXNl a3LjBKpI+gXR5O+h4tsSi7eYBYjazR1ZRfVocqUnKtpG3HkDcao6p2w9tgN+G9Oc yNsI056WvZ5SxGkTBqJ9qtTh0WWYmc9JWPx2W/ENzoTHlhnrkTNnZ6Glc7ZpVvXf uspAC1tOT4klLG44bjBmSAkTXaTQYNukHwagu3SwFS5OXiHxJn+9Dqvx9UjncU/e aLyEfdVbC1VKYotvgIGQUiM+1mv/ROCfCQzPgvOpTWbYx0YFtNpSMzc+vSRfzR+D CjdCBq/3Tv77V7935uyMKtHGs6eSTk7Lh6wZ2H5G39eOuDwrc1azHkNZrIN2DCLe PN6FMOzKQrmYWShMMk+f99Ef6OOAGBs74RtTYiguJet/d6pMbPyuiYnbAjlaAEiK CoYLE0nByhmAeCEA3Ejikvlr/IFJznxOcP9NOjKXsRXo4RndSeQrg90rC20pA+An D+exNYAp+WZGQxS5eDiS0cF8HH6ZTXFiUbsKF8k+erlx+SetJvuRsbK/XGpGAz/1 68zShwO67C/Eaajivc+2 =+AUq -----END PGP SIGNATURE----- --oBzgnH5Lm+6YPTsS-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 20:16:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50B51301; Sun, 29 Dec 2013 20:16:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A8BB1554; Sun, 29 Dec 2013 20:16:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTKGDIS097890; Sun, 29 Dec 2013 20:16:13 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTKGDe8097889; Sun, 29 Dec 2013 20:16:13 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312292016.rBTKGDe8097889@svn.freebsd.org> From: Dimitry Andric Date: Sun, 29 Dec 2013 20:16:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260056 - head/sys/dev/vxge/vxgehal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 20:16:13 -0000 Author: dim Date: Sun Dec 29 20:16:12 2013 New Revision: 260056 URL: http://svnweb.freebsd.org/changeset/base/260056 Log: In sys/dev/vxge/vxgehal/vxgehal-ring.c, #if 0 an unused static function. MFC after: 3 days Modified: head/sys/dev/vxge/vxgehal/vxgehal-ring.c Modified: head/sys/dev/vxge/vxgehal/vxgehal-ring.c ============================================================================== --- head/sys/dev/vxge/vxgehal/vxgehal-ring.c Sun Dec 29 20:05:48 2013 (r260055) +++ head/sys/dev/vxge/vxgehal/vxgehal-ring.c Sun Dec 29 20:16:12 2013 (r260056) @@ -62,6 +62,7 @@ __hal_ring_block_memblock_idx_set( VXGE_HAL_RING_MEMBLOCK_IDX_OFFSET))) = memblock_idx; } +#if 0 /* * __hal_ring_block_next_pointer - Returns the dma address of next block * @block: RxD block @@ -76,6 +77,7 @@ __hal_ring_block_next_pointer( return (dma_addr_t)*((u64 *) ((void *)((u8 *) block + VXGE_HAL_RING_NEXT_BLOCK_POINTER_OFFSET))); } +#endif /* * __hal_ring_block_next_pointer_set - Sets the next block pointer in RxD block From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 20:23:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CABD57C; Sun, 29 Dec 2013 20:23:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0978D15E2; Sun, 29 Dec 2013 20:23:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTKN8RZ001273; Sun, 29 Dec 2013 20:23:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTKN8r2001272; Sun, 29 Dec 2013 20:23:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312292023.rBTKN8r2001272@svn.freebsd.org> From: Dimitry Andric Date: Sun, 29 Dec 2013 20:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260057 - head/sys/dev/scc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 20:23:09 -0000 Author: dim Date: Sun Dec 29 20:23:08 2013 New Revision: 260057 URL: http://svnweb.freebsd.org/changeset/base/260057 Log: In sys/dev/scc, remove unused static function scc_setmreg(). While here, invoke scc_getmreg() in two more places where it can be used. Reviewed by: marcel MFC after: 3 days Modified: head/sys/dev/scc/scc_dev_z8530.c Modified: head/sys/dev/scc/scc_dev_z8530.c ============================================================================== --- head/sys/dev/scc/scc_dev_z8530.c Sun Dec 29 20:16:12 2013 (r260056) +++ head/sys/dev/scc/scc_dev_z8530.c Sun Dec 29 20:23:08 2013 (r260057) @@ -66,15 +66,6 @@ struct scc_class scc_z8530_class = { }; /* Multiplexed I/O. */ -static __inline void -scc_setmreg(struct scc_bas *bas, int ch, int reg, int val) -{ - - scc_setreg(bas, ch + REG_CTRL, reg); - scc_barrier(bas); - scc_setreg(bas, ch + REG_CTRL, val); -} - static __inline uint8_t scc_getmreg(struct scc_bas *bas, int ch, int reg) { @@ -146,9 +137,7 @@ z8530_bfe_ipend(struct scc_softc *sc) if (ip & IP_TIB) ch[1]->ch_ipend |= SER_INT_TXIDLE; if (ip & IP_SIA) { - scc_setreg(bas, CHAN_A + REG_CTRL, CR_RSTXSI); - scc_barrier(bas); - bes = scc_getreg(bas, CHAN_A + REG_CTRL); + bes = scc_getmreg(bas, CHAN_A, CR_RSTXSI); if (bes & BES_BRK) ch[0]->ch_ipend |= SER_INT_BREAK; sig = ch[0]->ch_hwsig; @@ -164,9 +153,7 @@ z8530_bfe_ipend(struct scc_softc *sc) ch[0]->ch_ipend |= SER_INT_OVERRUN; } if (ip & IP_SIB) { - scc_setreg(bas, CHAN_B + REG_CTRL, CR_RSTXSI); - scc_barrier(bas); - bes = scc_getreg(bas, CHAN_B + REG_CTRL); + bes = scc_getmreg(bas, CHAN_B, CR_RSTXSI); if (bes & BES_BRK) ch[1]->ch_ipend |= SER_INT_BREAK; sig = ch[1]->ch_hwsig; From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 20:41:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78B209D4; Sun, 29 Dec 2013 20:41:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 63D2016D4; Sun, 29 Dec 2013 20:41:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTKfXMD008543; Sun, 29 Dec 2013 20:41:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTKfWtG008538; Sun, 29 Dec 2013 20:41:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312292041.rBTKfWtG008538@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Dec 2013 20:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260058 - head/sys/dev/mpt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 20:41:33 -0000 Author: marius Date: Sun Dec 29 20:41:32 2013 New Revision: 260058 URL: http://svnweb.freebsd.org/changeset/base/260058 Log: - Remove a redundant variable in mpt_pci_attach(). - #if 0 the currently unused paired port linking and unlinking of dual adapters. - Simplify MSI/MSI-X allocation and release. For a single one, we don't need to fiddle with the MSI/MSI-X count and pci_release_msi(9) is smart enough to just do nothing in case of INTx. - Canonicalize actions taken on attach failure and detach. - Remove the remainder of incomplete support for older FreeBSD versions. MFC after: 1 week Modified: head/sys/dev/mpt/mpt.h head/sys/dev/mpt/mpt_cam.c head/sys/dev/mpt/mpt_pci.c head/sys/dev/mpt/mpt_raid.c Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Sun Dec 29 20:23:08 2013 (r260057) +++ head/sys/dev/mpt/mpt.h Sun Dec 29 20:41:32 2013 (r260058) @@ -220,9 +220,6 @@ int mpt_modevent(module_t, int, void *); #define bus_dmamap_sync_range(dma_tag, dmamap, offset, len, op) \ bus_dmamap_sync(dma_tag, dmamap, op) -#if __FreeBSD_version < 600000 -#define bus_get_dma_tag(x) NULL -#endif #define mpt_dma_tag_create(mpt, parent_tag, alignment, boundary, \ lowaddr, highaddr, filter, filterarg, \ maxsize, nsegments, maxsegsz, flags, \ @@ -239,34 +236,6 @@ struct mpt_map_info { }; void mpt_map_rquest(void *, bus_dma_segment_t *, int, int); -/* **************************** NewBUS interrupt Crock ************************/ -#if __FreeBSD_version < 700031 -#define mpt_setup_intr(d, i, f, U, if, ifa, hp) \ - bus_setup_intr(d, i, f, if, ifa, hp) -#else -#define mpt_setup_intr bus_setup_intr -#endif - -/* **************************** NewBUS CAM Support ****************************/ -#if __FreeBSD_version < 700049 -#define mpt_xpt_bus_register(sim, parent, bus) \ - xpt_bus_register(sim, bus) -#else -#define mpt_xpt_bus_register xpt_bus_register -#endif - -/**************************** Kernel Thread Support ***************************/ -#if __FreeBSD_version > 800001 -#define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mpt_kthread_exit(status) \ - kproc_exit(status) -#else -#define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mpt_kthread_exit(status) \ - kthread_exit(status) -#endif /********************************** Endianess *********************************/ #define MPT_2_HOST64(ptr, tag) ptr->tag = le64toh(ptr->tag) @@ -671,7 +640,6 @@ struct mpt_softc { /* * PCI Hardware info */ - int pci_msi_count; struct resource * pci_irq; /* Interrupt map for chip */ void * ih; /* Interrupt handle */ #if 0 @@ -754,9 +722,10 @@ struct mpt_softc { uint16_t sequence; /* Sequence Number */ uint16_t pad3; - +#if 0 /* Paired port in some dual adapters configurations */ struct mpt_softc * mpt2; +#endif /* FW Image management */ uint32_t fw_image_size; Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Sun Dec 29 20:23:08 2013 (r260057) +++ head/sys/dev/mpt/mpt_cam.c Sun Dec 29 20:41:32 2013 (r260058) @@ -110,12 +110,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version >= 700025 -#ifndef CAM_NEW_TRAN_CODE -#define CAM_NEW_TRAN_CODE 1 -#endif -#endif - static void mpt_poll(struct cam_sim *); static timeout_t mpt_timeout; static void mpt_action(struct cam_sim *, union ccb *); @@ -344,7 +338,7 @@ mpt_cam_attach(struct mpt_softc *mpt) * Register exactly this bus. */ MPT_LOCK(mpt); - if (mpt_xpt_bus_register(mpt->sim, mpt->dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(mpt->sim, mpt->dev, 0) != CAM_SUCCESS) { mpt_prt(mpt, "Bus registration Failed!\n"); error = ENOMEM; MPT_UNLOCK(mpt); @@ -383,7 +377,7 @@ mpt_cam_attach(struct mpt_softc *mpt) * Register this bus. */ MPT_LOCK(mpt); - if (mpt_xpt_bus_register(mpt->phydisk_sim, mpt->dev, 1) != + if (xpt_bus_register(mpt->phydisk_sim, mpt->dev, 1) != CAM_SUCCESS) { mpt_prt(mpt, "Physical Disk Bus registration Failed!\n"); error = ENOMEM; @@ -2338,7 +2332,6 @@ mpt_cam_event(struct mpt_softc *mpt, req break; case MPI_EVENT_RESCAN: -#if __FreeBSD_version >= 600000 { union ccb *ccb; uint32_t pathid; @@ -2373,10 +2366,7 @@ mpt_cam_event(struct mpt_softc *mpt, req xpt_rescan(ccb); break; } -#else - mpt_prt(mpt, "Rescan Port: %d\n", (data0 >> 8) & 0xff); - break; -#endif + case MPI_EVENT_LINK_STATUS_CHANGE: mpt_prt(mpt, "Port %d: LinkState: %s\n", (data1 >> 8) & 0xff, @@ -3324,11 +3314,8 @@ mpt_action(struct cam_sim *sim, union cc break; } -#ifdef CAM_NEW_TRAN_CODE #define IS_CURRENT_SETTINGS(c) ((c)->type == CTS_TYPE_CURRENT_SETTINGS) -#else -#define IS_CURRENT_SETTINGS(c) ((c)->flags & CCB_TRANS_CURRENT_SETTINGS) -#endif + #define DP_DISC_ENABLE 0x1 #define DP_DISC_DISABL 0x2 #define DP_DISC (DP_DISC_ENABLE|DP_DISC_DISABL) @@ -3345,10 +3332,8 @@ mpt_action(struct cam_sim *sim, union cc case XPT_SET_TRAN_SETTINGS: /* Nexus Settings */ { -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi; struct ccb_trans_settings_spi *spi; -#endif uint8_t dval; u_int period; u_int offset; @@ -3361,7 +3346,6 @@ mpt_action(struct cam_sim *sim, union cc break; } -#ifdef CAM_NEW_TRAN_CODE scsi = &cts->proto_specific.scsi; spi = &cts->xport_specific.spi; @@ -3372,7 +3356,6 @@ mpt_action(struct cam_sim *sim, union cc mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; } -#endif /* * Skip attempting settings on RAID volume disks. @@ -3402,28 +3385,6 @@ mpt_action(struct cam_sim *sim, union cc period = 0; offset = 0; -#ifndef CAM_NEW_TRAN_CODE - if ((cts->valid & CCB_TRANS_DISC_VALID) != 0) { - dval |= (cts->flags & CCB_TRANS_DISC_ENB) ? - DP_DISC_ENABLE : DP_DISC_DISABL; - } - - if ((cts->valid & CCB_TRANS_TQ_VALID) != 0) { - dval |= (cts->flags & CCB_TRANS_TAG_ENB) ? - DP_TQING_ENABLE : DP_TQING_DISABL; - } - - if ((cts->valid & CCB_TRANS_BUS_WIDTH_VALID) != 0) { - dval |= cts->bus_width ? DP_WIDE : DP_NARROW; - } - - if ((cts->valid & CCB_TRANS_SYNC_RATE_VALID) && - (cts->valid & CCB_TRANS_SYNC_OFFSET_VALID)) { - dval |= DP_SYNC; - period = cts->sync_period; - offset = cts->sync_offset; - } -#else if ((spi->valid & CTS_SPI_VALID_DISC) != 0) { dval |= ((spi->flags & CTS_SPI_FLAGS_DISC_ENB) != 0) ? DP_DISC_ENABLE : DP_DISC_DISABL; @@ -3459,7 +3420,7 @@ mpt_action(struct cam_sim *sim, union cc period &= MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK; period >>= MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD; } -#endif + if (dval & DP_DISC_ENABLE) { mpt->mpt_disc_enable |= (1 << tgt); } else if (dval & DP_DISC_DISABL) { @@ -3492,7 +3453,6 @@ mpt_action(struct cam_sim *sim, union cc } case XPT_GET_TRAN_SETTINGS: { -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi; cts = &ccb->cts; cts->protocol = PROTO_SCSI; @@ -3524,21 +3484,6 @@ mpt_action(struct cam_sim *sim, union cc scsi = &cts->proto_specific.scsi; scsi->valid = CTS_SCSI_VALID_TQ; scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; -#else - cts = &ccb->cts; - if (mpt->is_fc) { - cts->flags = CCB_TRANS_TAG_ENB | CCB_TRANS_DISC_ENB; - cts->valid = CCB_TRANS_DISC_VALID | CCB_TRANS_TQ_VALID; - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - } else if (mpt->is_sas) { - cts->flags = CCB_TRANS_TAG_ENB | CCB_TRANS_DISC_ENB; - cts->valid = CCB_TRANS_DISC_VALID | CCB_TRANS_TQ_VALID; - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - } else if (mpt_get_spi_settings(mpt, cts) != 0) { - mpt_set_ccb_status(ccb, CAM_REQ_CMP_ERR); - break; - } -#endif mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; } @@ -3592,7 +3537,6 @@ mpt_action(struct cam_sim *sim, union cc /* * The base speed is the speed of the underlying connection. */ -#ifdef CAM_NEW_TRAN_CODE cpi->protocol = PROTO_SCSI; if (mpt->is_fc) { cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; @@ -3616,21 +3560,6 @@ mpt_action(struct cam_sim *sim, union cc cpi->transport_version = 2; cpi->protocol_version = SCSI_REV_2; } -#else - if (mpt->is_fc) { - cpi->hba_misc = PIM_NOBUSRESET; - cpi->base_transfer_speed = 100000; - cpi->hba_inquiry = PI_TAG_ABLE; - } else if (mpt->is_sas) { - cpi->hba_misc = PIM_NOBUSRESET; - cpi->base_transfer_speed = 300000; - cpi->hba_inquiry = PI_TAG_ABLE; - } else { - cpi->hba_misc = PIM_SEQSCAN; - cpi->base_transfer_speed = 3300; - cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; - } -#endif /* * We give our fake RAID passhtru bus a width that is MaxVolumes @@ -3726,10 +3655,8 @@ mpt_action(struct cam_sim *sim, union cc static int mpt_get_spi_settings(struct mpt_softc *mpt, struct ccb_trans_settings *cts) { -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; struct ccb_trans_settings_spi *spi = &cts->xport_specific.spi; -#endif target_id_t tgt; uint32_t dval, pval, oval; int rv; @@ -3790,29 +3717,6 @@ mpt_get_spi_settings(struct mpt_softc *m pval = MPI_SCSIPORTPAGE0_CAP_GET_MIN_SYNC_PERIOD(pval); } -#ifndef CAM_NEW_TRAN_CODE - cts->flags &= ~(CCB_TRANS_DISC_ENB|CCB_TRANS_TAG_ENB); - cts->valid = 0; - cts->sync_period = pval; - cts->sync_offset = oval; - cts->valid |= CCB_TRANS_SYNC_RATE_VALID; - cts->valid |= CCB_TRANS_SYNC_OFFSET_VALID; - cts->valid |= CCB_TRANS_BUS_WIDTH_VALID; - if (dval & DP_WIDE) { - cts->bus_width = MSG_EXT_WDTR_BUS_16_BIT; - } else { - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - } - if (cts->ccb_h.target_lun != CAM_LUN_WILDCARD) { - cts->valid |= CCB_TRANS_DISC_VALID | CCB_TRANS_TQ_VALID; - if (dval & DP_DISC_ENABLE) { - cts->flags |= CCB_TRANS_DISC_ENB; - } - if (dval & DP_TQING_ENABLE) { - cts->flags |= CCB_TRANS_TAG_ENB; - } - } -#else spi->valid = 0; scsi->valid = 0; spi->flags = 0; @@ -3837,10 +3741,10 @@ mpt_get_spi_settings(struct mpt_softc *m spi->flags |= CTS_SPI_FLAGS_DISC_ENB; } } -#endif + mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "mpt_get_spi_settings[%d]: %s flags 0x%x per 0x%x off=%d\n", tgt, - IS_CURRENT_SETTINGS(cts)? "ACTIVE" : "NVRAM ", dval, pval, oval); + IS_CURRENT_SETTINGS(cts) ? "ACTIVE" : "NVRAM ", dval, pval, oval); return (0); } @@ -3910,7 +3814,7 @@ mpt_spawn_recovery_thread(struct mpt_sof { int error; - error = mpt_kthread_create(mpt_recovery_thread, mpt, + error = kproc_create(mpt_recovery_thread, mpt, &mpt->recovery_thread, /*flags*/0, /*altstack*/0, "mpt_recovery%d", mpt->unit); return (error); @@ -3953,7 +3857,7 @@ mpt_recovery_thread(void *arg) mpt->recovery_thread = NULL; wakeup(&mpt->recovery_thread); MPT_UNLOCK(mpt); - mpt_kthread_exit(0); + kproc_exit(0); } static int Modified: head/sys/dev/mpt/mpt_pci.c ============================================================================== --- head/sys/dev/mpt/mpt_pci.c Sun Dec 29 20:23:08 2013 (r260057) +++ head/sys/dev/mpt/mpt_pci.c Sun Dec 29 20:41:32 2013 (r260058) @@ -105,14 +105,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version < 700000 -#define pci_msix_count(x) 0 -#define pci_msi_count(x) 0 -#define pci_alloc_msi(x, y) 1 -#define pci_alloc_msix(x, y) 1 -#define pci_release_msi(x) do { ; } while (0) -#endif - /* * XXX it seems no other MPT driver knows about the following chips. */ @@ -149,10 +141,6 @@ __FBSDID("$FreeBSD$"); #define MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB 0x007C #endif -#ifndef PCIM_CMD_SERRESPEN -#define PCIM_CMD_SERRESPEN 0x0100 -#endif - static int mpt_pci_probe(device_t); static int mpt_pci_attach(device_t); static void mpt_free_bus_resources(struct mpt_softc *mpt); @@ -178,6 +166,7 @@ static device_method_t mpt_methods[] = { static driver_t mpt_driver = { "mpt", mpt_methods, sizeof(struct mpt_softc) }; + static devclass_t mpt_devclass; DRIVER_MODULE(mpt, pci, mpt_driver, mpt_devclass, NULL, NULL); MODULE_DEPEND(mpt, pci, 1, 1, 1); @@ -288,6 +277,7 @@ mpt_set_options(struct mpt_softc *mpt) } } +#if 0 static void mpt_link_peer(struct mpt_softc *mpt) { @@ -326,13 +316,14 @@ mpt_unlink_peer(struct mpt_softc *mpt) mpt->mpt2->mpt2 = NULL; } } +#endif static int mpt_pci_attach(device_t dev) { struct mpt_softc *mpt; int iqd; - uint32_t data, cmd; + uint32_t val; int mpt_io_bar, mpt_mem_bar; mpt = (struct mpt_softc*)device_get_softc(dev); @@ -393,19 +384,19 @@ mpt_pci_attach(device_t dev) /* * Make sure that SERR, PERR, WRITE INVALIDATE and BUSMASTER are set. */ - cmd = pci_read_config(dev, PCIR_COMMAND, 2); - cmd |= - PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN | + val = pci_read_config(dev, PCIR_COMMAND, 2); + val |= PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN; - pci_write_config(dev, PCIR_COMMAND, cmd, 2); + pci_write_config(dev, PCIR_COMMAND, val, 2); /* * Make sure we've disabled the ROM. */ - data = pci_read_config(dev, PCIR_BIOS, 4); - data &= ~PCIM_BIOS_ENABLE; - pci_write_config(dev, PCIR_BIOS, data, 4); + val = pci_read_config(dev, PCIR_BIOS, 4); + val &= ~PCIM_BIOS_ENABLE; + pci_write_config(dev, PCIR_BIOS, val, 4); +#if 0 /* * Is this part a dual? * If so, link with our partner (around yet) @@ -422,12 +413,13 @@ mpt_pci_attach(device_t dev) default: break; } +#endif /* * Figure out which are the I/O and MEM Bars */ - data = pci_read_config(dev, PCIR_BAR(0), 4); - if (PCI_BAR_IO(data)) { + val = pci_read_config(dev, PCIR_BAR(0), 4); + if (PCI_BAR_IO(val)) { /* BAR0 is IO, BAR1 is memory */ mpt_io_bar = 0; mpt_mem_bar = 1; @@ -484,25 +476,15 @@ mpt_pci_attach(device_t dev) * First try to alloc an MSI-X message. If that * fails, then try to alloc an MSI message instead. */ - if (pci_msix_count(dev) == 1) { - mpt->pci_msi_count = 1; - if (pci_alloc_msix(dev, &mpt->pci_msi_count) == 0) { - iqd = 1; - } else { - mpt->pci_msi_count = 0; - } - } - if (iqd == 0 && pci_msi_count(dev) == 1) { - mpt->pci_msi_count = 1; - if (pci_alloc_msi(dev, &mpt->pci_msi_count) == 0) { - iqd = 1; - } else { - mpt->pci_msi_count = 0; - } - } + val = 1; + if (pci_alloc_msix(dev, &val) == 0) + iqd = 1; + val = 1; + if (iqd == 0 && pci_alloc_msi(dev, &val) == 0) + iqd = 1; } mpt->pci_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &iqd, - RF_ACTIVE | (mpt->pci_msi_count ? 0 : RF_SHAREABLE)); + RF_ACTIVE | (iqd != 0 ? 0 : RF_SHAREABLE)); if (mpt->pci_irq == NULL) { device_printf(dev, "could not allocate interrupt\n"); goto bad; @@ -514,7 +496,7 @@ mpt_pci_attach(device_t dev) mpt_disable_ints(mpt); /* Register the interrupt handler */ - if (mpt_setup_intr(dev, mpt->pci_irq, MPT_IFLAGS, NULL, mpt_pci_intr, + if (bus_setup_intr(dev, mpt->pci_irq, MPT_IFLAGS, NULL, mpt_pci_intr, mpt, &mpt->ih)) { device_printf(dev, "could not setup interrupt\n"); goto bad; @@ -562,7 +544,10 @@ mpt_pci_attach(device_t dev) if (mpt->eh == NULL) { mpt_prt(mpt, "shutdown event registration failed\n"); + mpt_disable_ints(mpt); (void) mpt_detach(mpt); + mpt_reset(mpt, /*reinit*/FALSE); + mpt_raid_free_mem(mpt); goto bad; } return (0); @@ -570,7 +555,9 @@ mpt_pci_attach(device_t dev) bad: mpt_dma_mem_free(mpt); mpt_free_bus_resources(mpt); +#if 0 mpt_unlink_peer(mpt); +#endif MPT_LOCK_DESTROY(mpt); @@ -595,25 +582,21 @@ mpt_free_bus_resources(struct mpt_softc if (mpt->pci_irq) { bus_release_resource(mpt->dev, SYS_RES_IRQ, rman_get_rid(mpt->pci_irq), mpt->pci_irq); + pci_release_msi(mpt->dev); mpt->pci_irq = NULL; } - if (mpt->pci_msi_count) { - pci_release_msi(mpt->dev); - mpt->pci_msi_count = 0; - } - if (mpt->pci_pio_reg) { bus_release_resource(mpt->dev, SYS_RES_IOPORT, rman_get_rid(mpt->pci_pio_reg), mpt->pci_pio_reg); mpt->pci_pio_reg = NULL; } + if (mpt->pci_reg) { bus_release_resource(mpt->dev, SYS_RES_MEMORY, rman_get_rid(mpt->pci_reg), mpt->pci_reg); mpt->pci_reg = NULL; } - MPT_LOCK_DESTROY(mpt); } /* @@ -630,12 +613,16 @@ mpt_pci_detach(device_t dev) mpt_disable_ints(mpt); mpt_detach(mpt); mpt_reset(mpt, /*reinit*/FALSE); + mpt_raid_free_mem(mpt); mpt_dma_mem_free(mpt); mpt_free_bus_resources(mpt); - mpt_raid_free_mem(mpt); +#if 0 + mpt_unlink_peer(mpt); +#endif if (mpt->eh != NULL) { EVENTHANDLER_DEREGISTER(shutdown_post_sync, mpt->eh); } + MPT_LOCK_DESTROY(mpt); } return(0); } @@ -649,11 +636,8 @@ mpt_pci_shutdown(device_t dev) struct mpt_softc *mpt; mpt = (struct mpt_softc *)device_get_softc(dev); - if (mpt) { - int r; - r = mpt_shutdown(mpt); - return (r); - } + if (mpt) + return (mpt_shutdown(mpt)); return(0); } @@ -669,20 +653,11 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) } len = sizeof (request_t) * MPT_MAX_REQUESTS(mpt); -#ifdef RELENG_4 - mpt->request_pool = (request_t *)malloc(len, M_DEVBUF, M_WAITOK); - if (mpt->request_pool == NULL) { - mpt_prt(mpt, "cannot allocate request pool\n"); - return (1); - } - memset(mpt->request_pool, 0, len); -#else mpt->request_pool = (request_t *)malloc(len, M_DEVBUF, M_WAITOK|M_ZERO); if (mpt->request_pool == NULL) { mpt_prt(mpt, "cannot allocate request pool\n"); return (1); } -#endif /* * Create a parent dma tag for this device. Modified: head/sys/dev/mpt/mpt_raid.c ============================================================================== --- head/sys/dev/mpt/mpt_raid.c Sun Dec 29 20:23:08 2013 (r260057) +++ head/sys/dev/mpt/mpt_raid.c Sun Dec 29 20:41:32 2013 (r260058) @@ -636,7 +636,7 @@ mpt_spawn_raid_thread(struct mpt_softc * MPT_LOCK(mpt); xpt_freeze_simq(mpt->phydisk_sim, 1); MPT_UNLOCK(mpt); - error = mpt_kthread_create(mpt_raid_thread, mpt, + error = kproc_create(mpt_raid_thread, mpt, &mpt->raid_thread, /*flags*/0, /*altstack*/0, "mpt_raid%d", mpt->unit); if (error != 0) { @@ -719,7 +719,7 @@ mpt_raid_thread(void *arg) mpt->raid_thread = NULL; wakeup(&mpt->raid_thread); MPT_UNLOCK(mpt); - mpt_kthread_exit(0); + kproc_exit(0); } #if 0 From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 20:48:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 305DCCF6; Sun, 29 Dec 2013 20:48:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1BB3316F9; Sun, 29 Dec 2013 20:48:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTKmlb9009471; Sun, 29 Dec 2013 20:48:47 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTKmlIu009469; Sun, 29 Dec 2013 20:48:47 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201312292048.rBTKmlIu009469@svn.freebsd.org> From: Scott Long Date: Sun, 29 Dec 2013 20:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260059 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 20:48:48 -0000 Author: scottl Date: Sun Dec 29 20:48:47 2013 New Revision: 260059 URL: http://svnweb.freebsd.org/changeset/base/260059 Log: Add the '-b' flag to 'camcontrol devlist'. This prints only the existing buses and their parent sims, useful for creating a sim->bus->device map. Obtained from: Netflix MFC after: 3 days Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sun Dec 29 20:41:32 2013 (r260058) +++ head/sbin/camcontrol/camcontrol.8 Sun Dec 29 20:48:47 2013 (r260059) @@ -41,6 +41,7 @@ .Op command args .Nm .Ic devlist +.Op Fl b .Op Fl v .Nm .Ic periphlist @@ -361,6 +362,10 @@ With the .Fl v argument, SCSI bus number, adapter name and unit numbers are printed as well. +On the other hand, with the +.Fl b +argument, only the bus adapter, and unit information will be printed, and +device information will be omitted. .It Ic periphlist List all peripheral drivers attached to a given physical device (logical unit). Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sun Dec 29 20:41:32 2013 (r260058) +++ head/sbin/camcontrol/camcontrol.c Sun Dec 29 20:48:47 2013 (r260059) @@ -202,7 +202,7 @@ static struct camcontrol_opts option_tab {"defects", CAM_CMD_READ_DEFECTS, CAM_ARG_NONE, readdefect_opts}, {"defectlist", CAM_CMD_READ_DEFECTS, CAM_ARG_NONE, readdefect_opts}, #endif /* MINIMALISTIC */ - {"devlist", CAM_CMD_DEVTREE, CAM_ARG_NONE, NULL}, + {"devlist", CAM_CMD_DEVTREE, CAM_ARG_NONE, "-b"}, #ifndef MINIMALISTIC {"periphlist", CAM_CMD_DEVLIST, CAM_ARG_NONE, NULL}, {"modepage", CAM_CMD_MODE_PAGE, CAM_ARG_NONE, "bdelm:P:"}, @@ -254,7 +254,7 @@ camcontrol_optret getoption(struct camco #ifndef MINIMALISTIC static int getdevlist(struct cam_device *device); #endif /* MINIMALISTIC */ -static int getdevtree(void); +static int getdevtree(int argc, char **argv, char *combinedopt); #ifndef MINIMALISTIC static int testunitready(struct cam_device *device, int retry_count, int timeout, int quiet); @@ -411,7 +411,7 @@ getdevlist(struct cam_device *device) #endif /* MINIMALISTIC */ static int -getdevtree(void) +getdevtree(int argc, char **argv, char *combinedopt) { union ccb ccb; int bufsize, fd; @@ -419,6 +419,19 @@ getdevtree(void) int need_close = 0; int error = 0; int skip_device = 0; + int busonly = 0; + char c; + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch(c) { + case 'b': + if ((arglist & CAM_ARG_VERBOSE) == 0) + busonly = 1; + break; + default: + break; + } + } if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) { warn("couldn't open %s", XPT_DEVICE); @@ -478,7 +491,8 @@ getdevtree(void) * Only print the bus information if the * user turns on the verbose flag. */ - if ((arglist & CAM_ARG_VERBOSE) == 0) + if ((busonly == 0) && + (arglist & CAM_ARG_VERBOSE) == 0) break; bus_result = @@ -489,11 +503,12 @@ getdevtree(void) need_close = 0; } - fprintf(stdout, "scbus%d on %s%d bus %d:\n", + fprintf(stdout, "scbus%d on %s%d bus %d%s\n", bus_result->path_id, bus_result->dev_name, bus_result->unit_number, - bus_result->bus_id); + bus_result->bus_id, + (busonly ? "" : ":")); break; } case DEV_MATCH_DEVICE: { @@ -501,6 +516,9 @@ getdevtree(void) char vendor[16], product[48], revision[16]; char fw[5], tmpstr[256]; + if (busonly == 1) + break; + dev_result = &ccb.cdm.matches[i].result.device_result; @@ -582,7 +600,7 @@ getdevtree(void) periph_result = &ccb.cdm.matches[i].result.periph_result; - if (skip_device != 0) + if (busonly || skip_device != 0) break; if (need_close > 1) @@ -8178,7 +8196,7 @@ main(int argc, char **argv) break; #endif /* MINIMALISTIC */ case CAM_CMD_DEVTREE: - error = getdevtree(); + error = getdevtree(argc, argv, combinedopt); break; #ifndef MINIMALISTIC case CAM_CMD_TUR: From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 20:51:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F5C6E56 for ; Sun, 29 Dec 2013 20:51:41 +0000 (UTC) Received: from nm20.bullet.mail.bf1.yahoo.com (nm20.bullet.mail.bf1.yahoo.com [98.139.212.179]) by mx1.freebsd.org (Postfix) with SMTP id A01C5175B for ; Sun, 29 Dec 2013 20:51:40 +0000 (UTC) Received: from [98.139.215.140] by nm20.bullet.mail.bf1.yahoo.com with NNFMP; 29 Dec 2013 20:51:33 -0000 Received: from [98.139.211.199] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 29 Dec 2013 20:51:33 -0000 Received: from [127.0.0.1] by smtp208.mail.bf1.yahoo.com with NNFMP; 29 Dec 2013 20:51:33 -0000 X-Yahoo-Newman-Id: 819451.83151.bm@smtp208.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: XY9J7r0VM1miGbQWyKRGKEzhVdGk63.9oMBdnkF9SSK5lY4 U7bzLJzLcx3lem8VMMihySLNyfN3w5NEewhTyfRqwm0C4OBokKrT4dDtZ5E2 zAvFjgR29Pm1FooPOHF6VVxgprcoyp2RaOFSuTYl3DRUXcWiZ5aPNY5hyMro ujHJNdOaM_hoTYPndn0LlV8b3aS_X9j8_KlJItxYYFGN4VVr7zrTxzaop6aY zAKZgMtzZe7UH1avK63_xgYzwuwh_5Yllccv7y0a.zaUzEr.qLdS2.eXs.G6 PEr3DpOcpiPgCakLYi.xzLrpz_RIr8MZnQKItCo2pMit0kReZDV0Ij7NgLz7 Q2VD_NsNrSJ0ZMSIWXXuA0XNQ0Ji3NS.DpZcq1PBzTEXdrYZaQwEIlRn1GjQ 0I0bekE5Wlv0IZLpKInIiUypDR2YuY.HuG4_LQZnU5l4zXmDKHSxevp.h9qk qprvxQMp15lNPuoTZPhEfbkvBrSGfZJEBWvqZFHClZDEolLC.Z5LAL3jyKpw Pto0pO1btbNFJv5LHLgiyXB3rA9fPuaZPcuS.ICZVnr4m2WkMtZAhClg- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.138.105.21]) by smtp208.mail.bf1.yahoo.com with SMTP; 29 Dec 2013 12:51:33 -0800 PST Message-ID: <52C08B47.70106@FreeBSD.org> Date: Sun, 29 Dec 2013 15:51:19 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Dimitry Andric , Adrian Chadd Subject: Re: svn commit: r259896 - head/sys/dev/cxgb/common References: <201312252245.rBPMjX5J046556@svn.freebsd.org> <76C5CECF-1A27-4245-B5D1-335C46B253E7@FreeBSD.org> In-Reply-To: <76C5CECF-1A27-4245-B5D1-335C46B253E7@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 20:51:41 -0000 On 26.12.2013 06:13, Dimitry Andric wrote: > On 26 Dec 2013, at 02:51, Adrian Chadd wrote: >> I'd prefer you didn't remove unused code in drivers like this. If you >> must, #if 0 them out. > I don't mind either way, but some other people are very much opposed to > littering code with #if 0'd sections. So, how do to determine what is > right in each situation? :-) > FWIW, I am also in favor of removing instead of #if 0. If we really need the code back, we have subversion for that. I guess an exception would be on contributed code, where one still wants to keep things similar. Just my 0.02$, no strong feelings about either way. Pedro. From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 21:28:27 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04345618; Sun, 29 Dec 2013 21:28:27 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B06AE1939; Sun, 29 Dec 2013 21:28:26 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rBTLSPu6041071 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 29 Dec 2013 13:28:26 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rBTLSPfI041070; Sun, 29 Dec 2013 13:28:25 -0800 (PST) (envelope-from jmg) Date: Sun, 29 Dec 2013 13:28:25 -0800 From: John-Mark Gurney To: Pedro Giffuni Subject: Re: svn commit: r259896 - head/sys/dev/cxgb/common Message-ID: <20131229212825.GE99167@funkthat.com> References: <201312252245.rBPMjX5J046556@svn.freebsd.org> <76C5CECF-1A27-4245-B5D1-335C46B253E7@FreeBSD.org> <52C08B47.70106@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52C08B47.70106@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sun, 29 Dec 2013 13:28:26 -0800 (PST) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , Dimitry Andric , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 21:28:27 -0000 Pedro Giffuni wrote this message on Sun, Dec 29, 2013 at 15:51 -0500: > On 26.12.2013 06:13, Dimitry Andric wrote: > >On 26 Dec 2013, at 02:51, Adrian Chadd wrote: > >>I'd prefer you didn't remove unused code in drivers like this. If you > >>must, #if 0 them out. > >I don't mind either way, but some other people are very much opposed to > >littering code with #if 0'd sections. So, how do to determine what is > >right in each situation? :-) > > > > FWIW, I am also in favor of removing instead of #if 0. > If we really need the code back, we have subversion for that. > > I guess an exception would be on contributed code, where one > still wants to keep things similar. > > Just my 0.02$, no strong feelings about either way. My vote for code like this to #if 0 it out.. The reason being is that this is generic hardware register access, and it's likely that if it is removed and someone needs it, they'll write their own instead of dig it out of history, since they might not even realize that it even existed... Though can't we annotate it as unused? Since it is static inline, the compiler should end up not including it in the object. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 22:20:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7490638D; Sun, 29 Dec 2013 22:20:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 611C91D40; Sun, 29 Dec 2013 22:20:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTMK796043714; Sun, 29 Dec 2013 22:20:07 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTMK7ls043713; Sun, 29 Dec 2013 22:20:07 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201312292220.rBTMK7ls043713@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 29 Dec 2013 22:20:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260060 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 22:20:07 -0000 Author: glebius Date: Sun Dec 29 22:20:06 2013 New Revision: 260060 URL: http://svnweb.freebsd.org/changeset/base/260060 Log: Fix couple of bugs from r257692 related to scan of address list on an interface: - in in_control() skip over not AF_INET addresses. - in in_aifaddr_ioctl() and in_difaddr_ioctl() do correct check of address family, w/o accessing memory beyond struct ifaddr. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sun Dec 29 20:48:47 2013 (r260059) +++ head/sys/netinet/in.c Sun Dec 29 22:20:06 2013 (r260060) @@ -247,6 +247,8 @@ in_control(struct socket *so, u_long cmd */ IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + if (ifa->ifa_addr->sa_family != AF_INET) + continue; ia = (struct in_ifaddr *)ifa; if (cmd == SIOCGIFADDR || addr->sin_addr.s_addr == INADDR_ANY) break; @@ -338,11 +340,12 @@ in_aifaddr_ioctl(u_long cmd, caddr_t dat ia = NULL; IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - struct in_ifaddr *it = ifatoia(ifa); + struct in_ifaddr *it; - if (it->ia_addr.sin_family != AF_INET) + if (ifa->ifa_addr->sa_family != AF_INET) continue; + it = (struct in_ifaddr *)ifa; iaIsFirst = false; if (it->ia_addr.sin_addr.s_addr == addr->sin_addr.s_addr && prison_check_ip4(td->td_ucred, &addr->sin_addr) == 0) @@ -530,11 +533,12 @@ in_difaddr_ioctl(caddr_t data, struct if ia = NULL; IF_ADDR_WLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - struct in_ifaddr *it = ifatoia(ifa); + struct in_ifaddr *it; - if (it->ia_addr.sin_family != AF_INET) + if (ifa->ifa_addr->sa_family != AF_INET) continue; + it = (struct in_ifaddr *)ifa; if (deleteAny && ia == NULL && (td == NULL || prison_check_ip4(td->td_ucred, &it->ia_addr.sin_addr) == 0)) ia = it; From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 22:43:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D330F82A; Sun, 29 Dec 2013 22:43:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE19C1ED6; Sun, 29 Dec 2013 22:43:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTMhF5b004660; Sun, 29 Dec 2013 22:43:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTMhFRD004659; Sun, 29 Dec 2013 22:43:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312292243.rBTMhFRD004659@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Dec 2013 22:43:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260061 - head/sys/dev/ral X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 22:43:15 -0000 Author: marius Date: Sun Dec 29 22:43:14 2013 New Revision: 260061 URL: http://svnweb.freebsd.org/changeset/base/260061 Log: - Add support for using MSI instead of INTx, controllable via the tunable hw.ral.msi_disable (defaulting to using MSI). - Probe with BUS_PROBE_DEFAULT instead of 0. - Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices. - Use PCIR_BAR instead of a homegrown macro. - There's no need to keep track of resource IDs. - Release resources again in case attaching fails. - Quiesce the interrupt before detaching. - Sprinkle const. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. - Trim headers. - Nuke dupe $FreeBSD$. MFC after: 1 week Modified: head/sys/dev/ral/if_ral_pci.c Modified: head/sys/dev/ral/if_ral_pci.c ============================================================================== --- head/sys/dev/ral/if_ral_pci.c Sun Dec 29 22:20:06 2013 (r260060) +++ head/sys/dev/ral/if_ral_pci.c Sun Dec 29 22:43:14 2013 (r260061) @@ -1,5 +1,3 @@ -/* $FreeBSD$ */ - /*- * Copyright (c) 2005, 2006 * Damien Bergamini @@ -25,32 +23,26 @@ __FBSDID("$FreeBSD$"); */ #include -#include -#include -#include -#include -#include #include +#include +#include +#include #include #include -#include -#include +#include +#include +#include #include #include -#include -#include -#include -#include #include -#include +#include #include -#include +#include #include #include -#include #include #include @@ -64,6 +56,9 @@ MODULE_DEPEND(ral, firmware, 1, 1, 1); MODULE_DEPEND(ral, wlan, 1, 1, 1); MODULE_DEPEND(ral, wlan_amrr, 1, 1, 1); +static int ral_msi_disable; +TUNABLE_INT("hw.ral.msi_disable", &ral_msi_disable); + struct ral_pci_ident { uint16_t vendor; uint16_t device; @@ -105,7 +100,7 @@ static const struct ral_pci_ident ral_pc { 0, 0, NULL } }; -static struct ral_opns { +static const struct ral_opns { int (*attach)(device_t, int); int (*detach)(void *); void (*shutdown)(void *); @@ -144,9 +139,7 @@ struct ral_pci_softc { struct rt2860_softc sc_rt2860; } u; - struct ral_opns *sc_opns; - int irq_rid; - int mem_rid; + const struct ral_opns *sc_opns; struct resource *irq; struct resource *mem; void *sc_ih; @@ -168,7 +161,7 @@ static device_method_t ral_pci_methods[] DEVMETHOD(device_suspend, ral_pci_suspend), DEVMETHOD(device_resume, ral_pci_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ral_pci_driver = { @@ -179,7 +172,7 @@ static driver_t ral_pci_driver = { static devclass_t ral_devclass; -DRIVER_MODULE(ral, pci, ral_pci_driver, ral_devclass, 0, 0); +DRIVER_MODULE(ral, pci, ral_pci_driver, ral_devclass, NULL, NULL); static int ral_pci_probe(device_t dev) @@ -190,29 +183,19 @@ ral_pci_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; } -/* Base Address Register */ -#define RAL_PCI_BAR0 0x10 - static int ral_pci_attach(device_t dev) { struct ral_pci_softc *psc = device_get_softc(dev); struct rt2560_softc *sc = &psc->u.sc_rt2560; - int error; - - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } + int count, error, rid; - /* enable bus-mastering */ pci_enable_busmaster(dev); switch (pci_get_device(dev)) { @@ -229,8 +212,8 @@ ral_pci_attach(device_t dev) break; } - psc->mem_rid = RAL_PCI_BAR0; - psc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &psc->mem_rid, + rid = PCIR_BAR(0); + psc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (psc->mem == NULL) { device_printf(dev, "could not allocate memory resource\n"); @@ -241,17 +224,27 @@ ral_pci_attach(device_t dev) sc->sc_sh = rman_get_bushandle(psc->mem); sc->sc_invalid = 1; - psc->irq_rid = 0; - psc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &psc->irq_rid, - RF_ACTIVE | RF_SHAREABLE); + rid = 0; + if (ral_msi_disable == 0) { + count = 1; + if (pci_alloc_msi(dev, &count) == 0) + rid = 1; + } + psc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | + (rid != 0 ? 0 : RF_SHAREABLE)); if (psc->irq == NULL) { device_printf(dev, "could not allocate interrupt resource\n"); + pci_release_msi(dev); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(psc->mem), psc->mem); return ENXIO; } error = (*psc->sc_opns->attach)(dev, pci_get_device(dev)); - if (error != 0) + if (error != 0) { + (void)ral_pci_detach(dev); return error; + } /* * Hook our interrupt after all initialization is complete. @@ -260,6 +253,7 @@ ral_pci_attach(device_t dev) NULL, psc->sc_opns->intr, psc, &psc->sc_ih); if (error != 0) { device_printf(dev, "could not set up interrupt\n"); + (void)ral_pci_detach(dev); return error; } sc->sc_invalid = 0; @@ -275,14 +269,18 @@ ral_pci_detach(device_t dev) /* check if device was removed */ sc->sc_invalid = !bus_child_present(dev); - + + if (psc->sc_ih != NULL) + bus_teardown_intr(dev, psc->irq, psc->sc_ih); (*psc->sc_opns->detach)(psc); bus_generic_detach(dev); - bus_teardown_intr(dev, psc->irq, psc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, psc->irq_rid, psc->irq); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(psc->irq), + psc->irq); + pci_release_msi(dev); - bus_release_resource(dev, SYS_RES_MEMORY, psc->mem_rid, psc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(psc->mem), + psc->mem); return 0; } From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 22:56:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70CF7A66; Sun, 29 Dec 2013 22:56:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5C5711F5C; Sun, 29 Dec 2013 22:56:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTMu61E008608; Sun, 29 Dec 2013 22:56:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTMu532008606; Sun, 29 Dec 2013 22:56:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312292256.rBTMu532008606@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Dec 2013 22:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260062 - head/sys/dev/ipw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 22:56:06 -0000 Author: marius Date: Sun Dec 29 22:56:05 2013 New Revision: 260062 URL: http://svnweb.freebsd.org/changeset/base/260062 Log: - Probe with BUS_PROBE_DEFAULT instead of 0. - Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices. - Use PCIR_BAR instead of a homegrown macro. - There's no need to keep track of resource IDs. - Quiesce the interrupt before actually detaching. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. - Nuke dupe $FreeBSD$. MFC after: 1 week Modified: head/sys/dev/ipw/if_ipw.c head/sys/dev/ipw/if_ipwvar.h Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Sun Dec 29 22:43:14 2013 (r260061) +++ head/sys/dev/ipw/if_ipw.c Sun Dec 29 22:56:05 2013 (r260062) @@ -1,5 +1,3 @@ -/* $FreeBSD$ */ - /*- * Copyright (c) 2004-2006 * Damien Bergamini . All rights reserved. @@ -187,7 +185,7 @@ static device_method_t ipw_methods[] = { DEVMETHOD(device_suspend, ipw_suspend), DEVMETHOD(device_resume, ipw_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ipw_driver = { @@ -198,7 +196,7 @@ static driver_t ipw_driver = { static devclass_t ipw_devclass; -DRIVER_MODULE(ipw, pci, ipw_driver, ipw_devclass, 0, 0); +DRIVER_MODULE(ipw, pci, ipw_driver, ipw_devclass, NULL, NULL); MODULE_VERSION(ipw, 1); @@ -211,15 +209,13 @@ ipw_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; } /* Base Address Register */ -#define IPW_PCI_BAR0 0x10 - static int ipw_attach(device_t dev) { @@ -239,20 +235,13 @@ ipw_attach(device_t dev) TASK_INIT(&sc->sc_init_task, 0, ipw_init_task, sc); callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0); - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } - pci_write_config(dev, 0x41, 0, 1); /* enable bus-mastering */ pci_enable_busmaster(dev); - sc->mem_rid = IPW_PCI_BAR0; - sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, - RF_ACTIVE); + i = PCIR_BAR(0); + sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &i, RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "could not allocate memory resource\n"); goto fail; @@ -261,8 +250,8 @@ ipw_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - sc->irq_rid = 0; - sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, + i = 0; + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, RF_ACTIVE | RF_SHAREABLE); if (sc->irq == NULL) { device_printf(dev, "could not allocate interrupt resource\n"); @@ -387,9 +376,10 @@ fail4: fail3: ipw_release(sc); fail2: - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), sc->irq); fail1: - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem), + sc->mem); fail: mtx_destroy(&sc->sc_mtx); return ENXIO; @@ -402,6 +392,8 @@ ipw_detach(device_t dev) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; + bus_teardown_intr(dev, sc->irq, sc->sc_ih); + ieee80211_draintask(ic, &sc->sc_init_task); ipw_stop(sc); @@ -411,10 +403,10 @@ ipw_detach(device_t dev) ipw_release(sc); - bus_teardown_intr(dev, sc->irq, sc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), sc->irq); - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem), + sc->mem); if_free(ifp); Modified: head/sys/dev/ipw/if_ipwvar.h ============================================================================== --- head/sys/dev/ipw/if_ipwvar.h Sun Dec 29 22:43:14 2013 (r260061) +++ head/sys/dev/ipw/if_ipwvar.h Sun Dec 29 22:56:05 2013 (r260062) @@ -105,8 +105,6 @@ struct ipw_softc { #define IPW_FLAG_ASSOCIATING 0x0080 #define IPW_FLAG_ASSOCIATED 0x0100 - int irq_rid; - int mem_rid; struct resource *irq; struct resource *mem; bus_space_tag_t sc_st; From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 23:05:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEDF2D02; Sun, 29 Dec 2013 23:05:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA6C31FE9; Sun, 29 Dec 2013 23:05:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTN511W012575; Sun, 29 Dec 2013 23:05:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTN512P012572; Sun, 29 Dec 2013 23:05:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312292305.rBTN512P012572@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Dec 2013 23:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260063 - head/sys/dev/iwi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 23:05:02 -0000 Author: marius Date: Sun Dec 29 23:05:01 2013 New Revision: 260063 URL: http://svnweb.freebsd.org/changeset/base/260063 Log: - Probe with BUS_PROBE_DEFAULT instead of 0. - Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices. - Use PCIR_BAR instead of a homegrown macro. - There's no need to keep track of resource IDs. - Quiesce the interrupt before actually detaching. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. MFC after: 1 week Modified: head/sys/dev/iwi/if_iwi.c head/sys/dev/iwi/if_iwivar.h Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Sun Dec 29 22:56:05 2013 (r260062) +++ head/sys/dev/iwi/if_iwi.c Sun Dec 29 23:05:01 2013 (r260063) @@ -220,7 +220,7 @@ static device_method_t iwi_methods[] = { DEVMETHOD(device_suspend, iwi_suspend), DEVMETHOD(device_resume, iwi_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t iwi_driver = { @@ -231,7 +231,7 @@ static driver_t iwi_driver = { static devclass_t iwi_devclass; -DRIVER_MODULE(iwi, pci, iwi_driver, iwi_devclass, 0, 0); +DRIVER_MODULE(iwi, pci, iwi_driver, iwi_devclass, NULL, NULL); MODULE_VERSION(iwi, 1); @@ -258,15 +258,12 @@ iwi_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; } -/* Base Address Register */ -#define IWI_PCI_BAR0 0x10 - static int iwi_attach(device_t dev) { @@ -301,20 +298,13 @@ iwi_attach(device_t dev) callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0); callout_init_mtx(&sc->sc_rftimer, &sc->sc_mtx, 0); - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } - pci_write_config(dev, 0x41, 0, 1); /* enable bus-mastering */ pci_enable_busmaster(dev); - sc->mem_rid = IWI_PCI_BAR0; - sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, - RF_ACTIVE); + i = PCIR_BAR(0); + sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &i, RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "could not allocate memory resource\n"); goto fail; @@ -323,8 +313,8 @@ iwi_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - sc->irq_rid = 0; - sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, + i = 0; + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, RF_ACTIVE | RF_SHAREABLE); if (sc->irq == NULL) { device_printf(dev, "could not allocate interrupt resource\n"); @@ -460,6 +450,8 @@ iwi_detach(device_t dev) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; + bus_teardown_intr(dev, sc->irq, sc->sc_ih); + /* NB: do early to drain any pending tasks */ ieee80211_draintask(ic, &sc->sc_radiontask); ieee80211_draintask(ic, &sc->sc_radiofftask); @@ -481,10 +473,10 @@ iwi_detach(device_t dev) iwi_free_tx_ring(sc, &sc->txq[3]); iwi_free_rx_ring(sc, &sc->rxq); - bus_teardown_intr(dev, sc->irq, sc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), sc->irq); - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem), + sc->mem); delete_unrhdr(sc->sc_unr); Modified: head/sys/dev/iwi/if_iwivar.h ============================================================================== --- head/sys/dev/iwi/if_iwivar.h Sun Dec 29 22:56:05 2013 (r260062) +++ head/sys/dev/iwi/if_iwivar.h Sun Dec 29 23:05:01 2013 (r260063) @@ -153,8 +153,6 @@ struct iwi_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; void *sc_ih; - int mem_rid; - int irq_rid; /* * The card needs external firmware images to work, which is made of a From owner-svn-src-all@FreeBSD.ORG Sun Dec 29 23:47:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 795C638B; Sun, 29 Dec 2013 23:47:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 594731251; Sun, 29 Dec 2013 23:47:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBTNl01f027369; Sun, 29 Dec 2013 23:47:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBTNkxSC027361; Sun, 29 Dec 2013 23:46:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312292346.rBTNkxSC027361@svn.freebsd.org> From: Marius Strobl Date: Sun, 29 Dec 2013 23:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260064 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 23:47:00 -0000 Author: marius Date: Sun Dec 29 23:46:59 2013 New Revision: 260064 URL: http://svnweb.freebsd.org/changeset/base/260064 Log: - Probe with BUS_PROBE_DEFAULT instead of 0. - Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0 devices. - There's no need to keep track of resource IDs. - Quiesce the interrupt before actually detaching. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. MFC after: 1 week 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 Dec 29 23:05:01 2013 (r260063) +++ head/sys/dev/wpi/if_wpi.c Sun Dec 29 23:46:59 2013 (r260064) @@ -253,7 +253,6 @@ static int wpi_shutdown(device_t); static int wpi_suspend(device_t); static int wpi_resume(device_t); - static device_method_t wpi_methods[] = { /* Device interface */ DEVMETHOD(device_probe, wpi_probe), @@ -263,7 +262,7 @@ static device_method_t wpi_methods[] = { DEVMETHOD(device_suspend, wpi_suspend), DEVMETHOD(device_resume, wpi_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t wpi_driver = { @@ -274,7 +273,7 @@ static driver_t wpi_driver = { static devclass_t wpi_devclass; -DRIVER_MODULE(wpi, pci, wpi_driver, wpi_devclass, 0, 0); +DRIVER_MODULE(wpi, pci, wpi_driver, wpi_devclass, NULL, NULL); MODULE_VERSION(wpi, 1); @@ -285,12 +284,12 @@ static const uint8_t wpi_ridx_to_plcp[] /* CCK: device-dependent */ 10, 20, 55, 110 }; + static const uint8_t wpi_ridx_to_rate[] = { 12, 18, 24, 36, 48, 72, 96, 108, /* OFDM */ 2, 4, 11, 22 /*CCK */ }; - static int wpi_probe(device_t dev) { @@ -300,7 +299,7 @@ wpi_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; @@ -493,7 +492,7 @@ wpi_attach(device_t dev) struct wpi_softc *sc = device_get_softc(dev); struct ifnet *ifp; struct ieee80211com *ic; - int ac, error, supportsa = 1; + int ac, error, rid, supportsa = 1; uint32_t tmp; const struct wpi_ident *ident; uint8_t macaddr[IEEE80211_ADDR_LEN]; @@ -525,20 +524,14 @@ wpi_attach(device_t dev) callout_init_mtx(&sc->calib_to, &sc->sc_mtx, 0); callout_init_mtx(&sc->watchdog_to, &sc->sc_mtx, 0); - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } - /* disable the retry timeout register */ pci_write_config(dev, 0x41, 0, 1); /* enable bus-mastering */ pci_enable_busmaster(dev); - sc->mem_rid = PCIR_BAR(0); - sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + rid = PCIR_BAR(0); + sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->mem == NULL) { device_printf(dev, "could not allocate memory resource\n"); @@ -549,8 +542,8 @@ wpi_attach(device_t dev) sc->sc_st = rman_get_bustag(sc->mem); sc->sc_sh = rman_get_bushandle(sc->mem); - sc->irq_rid = 0; - sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, + rid = 0; + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | RF_SHAREABLE); if (sc->irq == NULL) { device_printf(dev, "could not allocate interrupt resource\n"); @@ -717,6 +710,9 @@ wpi_detach(device_t dev) struct ieee80211com *ic; int ac; + if (sc->irq != NULL) + bus_teardown_intr(dev, sc->irq, sc->sc_ih); + if (ifp != NULL) { ic = ifp->if_l2com; @@ -746,13 +742,12 @@ wpi_detach(device_t dev) wpi_free_fwmem(sc); WPI_UNLOCK(sc); - if (sc->irq != NULL) { - bus_teardown_intr(dev, sc->irq, sc->sc_ih); - bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq); - } - + if (sc->irq != NULL) + bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq), + sc->irq); if (sc->mem != NULL) - bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem), sc->mem); if (ifp != NULL) if_free(ifp); @@ -3192,7 +3187,6 @@ wpi_stop_locked(struct wpi_softc *sc) callout_stop(&sc->watchdog_to); callout_stop(&sc->calib_to); - /* disable interrupts */ WPI_WRITE(sc, WPI_MASK, 0); WPI_WRITE(sc, WPI_INTR, WPI_INTR_MASK); Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Dec 29 23:05:01 2013 (r260063) +++ head/sys/dev/wpi/if_wpivar.h Sun Dec 29 23:46:59 2013 (r260064) @@ -162,8 +162,6 @@ struct wpi_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; void *sc_ih; - int mem_rid; - int irq_rid; struct wpi_config config; int temp; From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 00:43:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C33779CB; Mon, 30 Dec 2013 00:43:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE03D15E5; Mon, 30 Dec 2013 00:43:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU0hOpT050006; Mon, 30 Dec 2013 00:43:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU0hOr4050005; Mon, 30 Dec 2013 00:43:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312300043.rBU0hOr4050005@svn.freebsd.org> From: Marius Strobl Date: Mon, 30 Dec 2013 00:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260065 - stable/9/sys/sparc64/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 00:43:24 -0000 Author: marius Date: Mon Dec 30 00:43:24 2013 New Revision: 260065 URL: http://svnweb.freebsd.org/changeset/base/260065 Log: MFC: r255937 Implement GET_STACK_USAGE. Discussed with: mav Modified: stable/9/sys/sparc64/include/proc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sparc64/include/proc.h ============================================================================== --- stable/9/sys/sparc64/include/proc.h Sun Dec 29 23:46:59 2013 (r260064) +++ stable/9/sys/sparc64/include/proc.h Mon Dec 30 00:43:24 2013 (r260065) @@ -55,6 +55,17 @@ struct mdproc { #ifdef _KERNEL +#include + +/* Get the current kernel thread stack usage. */ +#define GET_STACK_USAGE(total, used) do { \ + struct thread *td = curthread; \ + (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ + (used) = (char *)td->td_kstack + \ + td->td_kstack_pages * PAGE_SIZE - \ + (char *)&td; \ +} while (0) + struct syscall_args { u_int code; struct sysent *callp; From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 00:51:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FA89B3E; Mon, 30 Dec 2013 00:51:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1882A164E; Mon, 30 Dec 2013 00:51:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU0pQeN053152; Mon, 30 Dec 2013 00:51:26 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU0pPbh053148; Mon, 30 Dec 2013 00:51:25 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201312300051.rBU0pPbh053148@svn.freebsd.org> From: Steve Kargl Date: Mon, 30 Dec 2013 00:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260066 - in head/lib/msun: ld128 ld80 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 00:51:26 -0000 Author: kargl Date: Mon Dec 30 00:51:25 2013 New Revision: 260066 URL: http://svnweb.freebsd.org/changeset/base/260066 Log: * ld80/k_expl.h: * ld128/k_expl.h: . Split out a computational kernel,__k_expl(x, &hi, &lo, &k) from expl(x). x must be finite and not tiny or huge. The kernel returns hi and lo values for extra precision and an exponent k for a 2**k scale factor. . Define additional kernels k_hexpl() and hexpl() that include a 1/2 scaling and are used by the hyperbolic functions. * ld80/s_expl.c: * ld128/s_expl.c: . Use the __k_expl() kernel. Obtained from: bde Added: head/lib/msun/ld128/k_expl.h (contents, props changed) head/lib/msun/ld80/k_expl.h (contents, props changed) Modified: head/lib/msun/ld128/s_expl.c head/lib/msun/ld80/s_expl.c Added: head/lib/msun/ld128/k_expl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/ld128/k_expl.h Mon Dec 30 00:51:25 2013 (r260066) @@ -0,0 +1,328 @@ +/* from: FreeBSD: head/lib/msun/ld128/s_expl.c 251345 2013-06-03 20:09:22Z kargl */ + +/*- + * Copyright (c) 2009-2013 Steven G. Kargl + * 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 ``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. + * + * Optimized by Bruce D. Evans. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * ld128 version of k_expl.h. See ../ld80/s_expl.c for most comments. + * + * See ../src/e_exp.c and ../src/k_exp.h for precision-independent comments + * about the secondary kernels. + */ + +#define INTERVALS 128 +#define LOG2_INTERVALS 7 +#define BIAS (LDBL_MAX_EXP - 1) + +static const double +/* + * ln2/INTERVALS = L1+L2 (hi+lo decomposition for multiplication). L1 must + * have at least 22 (= log2(|LDBL_MIN_EXP-extras|) + log2(INTERVALS)) lowest + * bits zero so that multiplication of it by n is exact. + */ +INV_L = 1.8466496523378731e+2, /* 0x171547652b82fe.0p-45 */ +L2 = -1.0253670638894731e-29; /* -0x1.9ff0342542fc3p-97 */ +static const long double +/* 0x1.62e42fefa39ef35793c768000000p-8 */ +L1 = 5.41521234812457272982212595914567508e-3L; + +/* + * XXX values in hex in comments have been lost (or were never present) + * from here. + */ +static const long double +/* + * Domain [-0.002708, 0.002708], range ~[-2.4021e-38, 2.4234e-38]: + * |exp(x) - p(x)| < 2**-124.9 + * (0.002708 is ln2/(2*INTERVALS) rounded up a little). + * + * XXX the coeffs aren't very carefully rounded, and I get 3.6 more bits. + */ +A2 = 0.5, +A3 = 1.66666666666666666666666666651085500e-1L, +A4 = 4.16666666666666666666666666425885320e-2L, +A5 = 8.33333333333333333334522877160175842e-3L, +A6 = 1.38888888888888888889971139751596836e-3L; + +static const double +A7 = 1.9841269841269470e-4, /* 0x1.a01a01a019f91p-13 */ +A8 = 2.4801587301585286e-5, /* 0x1.71de3ec75a967p-19 */ +A9 = 2.7557324277411235e-6, /* 0x1.71de3ec75a967p-19 */ +A10 = 2.7557333722375069e-7; /* 0x1.27e505ab56259p-22 */ + +static const struct { + /* + * hi must be rounded to at most 106 bits so that multiplication + * by r1 in expm1l() is exact, but it is rounded to 88 bits due to + * historical accidents. + * + * XXX it is wasteful to use long double for both hi and lo. ld128 + * exp2l() uses only float for lo (in a very differently organized + * table; ld80 exp2l() is different again. It uses 2 doubles in a + * table organized like this one. 1 double and 1 float would + * suffice). There are different packing/locality/alignment/caching + * problems with these methods. + * + * XXX C's bad %a format makes the bits unreadable. They happen + * to all line up for the hi values 1 before the point and 88 + * in 22 nybbles, but for the low values the nybbles are shifted + * randomly. + */ + long double hi; + long double lo; +} tbl[INTERVALS] = { + 0x1p0L, 0x0p0L, + 0x1.0163da9fb33356d84a66aep0L, 0x3.36dcdfa4003ec04c360be2404078p-92L, + 0x1.02c9a3e778060ee6f7cacap0L, 0x4.f7a29bde93d70a2cabc5cb89ba10p-92L, + 0x1.04315e86e7f84bd738f9a2p0L, 0xd.a47e6ed040bb4bfc05af6455e9b8p-96L, + 0x1.059b0d31585743ae7c548ep0L, 0xb.68ca417fe53e3495f7df4baf84a0p-92L, + 0x1.0706b29ddf6ddc6dc403a8p0L, 0x1.d87b27ed07cb8b092ac75e311753p-88L, + 0x1.0874518759bc808c35f25cp0L, 0x1.9427fa2b041b2d6829d8993a0d01p-88L, + 0x1.09e3ecac6f3834521e060cp0L, 0x5.84d6b74ba2e023da730e7fccb758p-92L, + 0x1.0b5586cf9890f6298b92b6p0L, 0x1.1842a98364291408b3ceb0a2a2bbp-88L, + 0x1.0cc922b7247f7407b705b8p0L, 0x9.3dc5e8aac564e6fe2ef1d431fd98p-92L, + 0x1.0e3ec32d3d1a2020742e4ep0L, 0x1.8af6a552ac4b358b1129e9f966a4p-88L, + 0x1.0fb66affed31af232091dcp0L, 0x1.8a1426514e0b627bda694a400a27p-88L, + 0x1.11301d0125b50a4ebbf1aep0L, 0xd.9318ceac5cc47ab166ee57427178p-92L, + 0x1.12abdc06c31cbfb92bad32p0L, 0x4.d68e2f7270bdf7cedf94eb1cb818p-92L, + 0x1.1429aaea92ddfb34101942p0L, 0x1.b2586d01844b389bea7aedd221d4p-88L, + 0x1.15a98c8a58e512480d573cp0L, 0x1.d5613bf92a2b618ee31b376c2689p-88L, + 0x1.172b83c7d517adcdf7c8c4p0L, 0x1.0eb14a792035509ff7d758693f24p-88L, + 0x1.18af9388c8de9bbbf70b9ap0L, 0x3.c2505c97c0102e5f1211941d2840p-92L, + 0x1.1a35beb6fcb753cb698f68p0L, 0x1.2d1c835a6c30724d5cfae31b84e5p-88L, + 0x1.1bbe084045cd39ab1e72b4p0L, 0x4.27e35f9acb57e473915519a1b448p-92L, + 0x1.1d4873168b9aa7805b8028p0L, 0x9.90f07a98b42206e46166cf051d70p-92L, + 0x1.1ed5022fcd91cb8819ff60p0L, 0x1.121d1e504d36c47474c9b7de6067p-88L, + 0x1.2063b88628cd63b8eeb028p0L, 0x1.50929d0fc487d21c2b84004264dep-88L, + 0x1.21f49917ddc962552fd292p0L, 0x9.4bdb4b61ea62477caa1dce823ba0p-92L, + 0x1.2387a6e75623866c1fadb0p0L, 0x1.c15cb593b0328566902df69e4de2p-88L, + 0x1.251ce4fb2a63f3582ab7dep0L, 0x9.e94811a9c8afdcf796934bc652d0p-92L, + 0x1.26b4565e27cdd257a67328p0L, 0x1.d3b249dce4e9186ddd5ff44e6b08p-92L, + 0x1.284dfe1f5638096cf15cf0p0L, 0x3.ca0967fdaa2e52d7c8106f2e262cp-92L, + 0x1.29e9df51fdee12c25d15f4p0L, 0x1.a24aa3bca890ac08d203fed80a07p-88L, + 0x1.2b87fd0dad98ffddea4652p0L, 0x1.8fcab88442fdc3cb6de4519165edp-88L, + 0x1.2d285a6e4030b40091d536p0L, 0xd.075384589c1cd1b3e4018a6b1348p-92L, + 0x1.2ecafa93e2f5611ca0f45cp0L, 0x1.523833af611bdcda253c554cf278p-88L, + 0x1.306fe0a31b7152de8d5a46p0L, 0x3.05c85edecbc27343629f502f1af2p-92L, + 0x1.32170fc4cd8313539cf1c2p0L, 0x1.008f86dde3220ae17a005b6412bep-88L, + 0x1.33c08b26416ff4c9c8610cp0L, 0x1.96696bf95d1593039539d94d662bp-88L, + 0x1.356c55f929ff0c94623476p0L, 0x3.73af38d6d8d6f9506c9bbc93cbc0p-92L, + 0x1.371a7373aa9caa7145502ep0L, 0x1.4547987e3e12516bf9c699be432fp-88L, + 0x1.38cae6d05d86585a9cb0d8p0L, 0x1.bed0c853bd30a02790931eb2e8f0p-88L, + 0x1.3a7db34e59ff6ea1bc9298p0L, 0x1.e0a1d336163fe2f852ceeb134067p-88L, + 0x1.3c32dc313a8e484001f228p0L, 0xb.58f3775e06ab66353001fae9fca0p-92L, + 0x1.3dea64c12342235b41223ep0L, 0x1.3d773fba2cb82b8244267c54443fp-92L, + 0x1.3fa4504ac801ba0bf701aap0L, 0x4.1832fb8c1c8dbdff2c49909e6c60p-92L, + 0x1.4160a21f72e29f84325b8ep0L, 0x1.3db61fb352f0540e6ba05634413ep-88L, + 0x1.431f5d950a896dc7044394p0L, 0x1.0ccec81e24b0caff7581ef4127f7p-92L, + 0x1.44e086061892d03136f408p0L, 0x1.df019fbd4f3b48709b78591d5cb5p-88L, + 0x1.46a41ed1d005772512f458p0L, 0x1.229d97df404ff21f39c1b594d3a8p-88L, + 0x1.486a2b5c13cd013c1a3b68p0L, 0x1.062f03c3dd75ce8757f780e6ec99p-88L, + 0x1.4a32af0d7d3de672d8bcf4p0L, 0x6.f9586461db1d878b1d148bd3ccb8p-92L, + 0x1.4bfdad5362a271d4397afep0L, 0xc.42e20e0363ba2e159c579f82e4b0p-92L, + 0x1.4dcb299fddd0d63b36ef1ap0L, 0x9.e0cc484b25a5566d0bd5f58ad238p-92L, + 0x1.4f9b2769d2ca6ad33d8b68p0L, 0x1.aa073ee55e028497a329a7333dbap-88L, + 0x1.516daa2cf6641c112f52c8p0L, 0x4.d822190e718226177d7608d20038p-92L, + 0x1.5342b569d4f81df0a83c48p0L, 0x1.d86a63f4e672a3e429805b049465p-88L, + 0x1.551a4ca5d920ec52ec6202p0L, 0x4.34ca672645dc6c124d6619a87574p-92L, + 0x1.56f4736b527da66ecb0046p0L, 0x1.64eb3c00f2f5ab3d801d7cc7272dp-88L, + 0x1.58d12d497c7fd252bc2b72p0L, 0x1.43bcf2ec936a970d9cc266f0072fp-88L, + 0x1.5ab07dd48542958c930150p0L, 0x1.91eb345d88d7c81280e069fbdb63p-88L, + 0x1.5c9268a5946b701c4b1b80p0L, 0x1.6986a203d84e6a4a92f179e71889p-88L, + 0x1.5e76f15ad21486e9be4c20p0L, 0x3.99766a06548a05829e853bdb2b52p-92L, + 0x1.605e1b976dc08b076f592ap0L, 0x4.86e3b34ead1b4769df867b9c89ccp-92L, + 0x1.6247eb03a5584b1f0fa06ep0L, 0x1.d2da42bb1ceaf9f732275b8aef30p-88L, + 0x1.6434634ccc31fc76f8714cp0L, 0x4.ed9a4e41000307103a18cf7a6e08p-92L, + 0x1.66238825522249127d9e28p0L, 0x1.b8f314a337f4dc0a3adf1787ff74p-88L, + 0x1.68155d44ca973081c57226p0L, 0x1.b9f32706bfe4e627d809a85dcc66p-88L, + 0x1.6a09e667f3bcc908b2fb12p0L, 0x1.66ea957d3e3adec17512775099dap-88L, + 0x1.6c012750bdabeed76a9980p0L, 0xf.4f33fdeb8b0ecd831106f57b3d00p-96L, + 0x1.6dfb23c651a2ef220e2cbep0L, 0x1.bbaa834b3f11577ceefbe6c1c411p-92L, + 0x1.6ff7df9519483cf87e1b4ep0L, 0x1.3e213bff9b702d5aa477c12523cep-88L, + 0x1.71f75e8ec5f73dd2370f2ep0L, 0xf.0acd6cb434b562d9e8a20adda648p-92L, + 0x1.73f9a48a58173bd5c9a4e6p0L, 0x8.ab1182ae217f3a7681759553e840p-92L, + 0x1.75feb564267c8bf6e9aa32p0L, 0x1.a48b27071805e61a17b954a2dad8p-88L, + 0x1.780694fde5d3f619ae0280p0L, 0x8.58b2bb2bdcf86cd08e35fb04c0f0p-92L, + 0x1.7a11473eb0186d7d51023ep0L, 0x1.6cda1f5ef42b66977960531e821bp-88L, + 0x1.7c1ed0130c1327c4933444p0L, 0x1.937562b2dc933d44fc828efd4c9cp-88L, + 0x1.7e2f336cf4e62105d02ba0p0L, 0x1.5797e170a1427f8fcdf5f3906108p-88L, + 0x1.80427543e1a11b60de6764p0L, 0x9.a354ea706b8e4d8b718a672bf7c8p-92L, + 0x1.82589994cce128acf88afap0L, 0xb.34a010f6ad65cbbac0f532d39be0p-92L, + 0x1.8471a4623c7acce52f6b96p0L, 0x1.c64095370f51f48817914dd78665p-88L, + 0x1.868d99b4492ec80e41d90ap0L, 0xc.251707484d73f136fb5779656b70p-92L, + 0x1.88ac7d98a669966530bcdep0L, 0x1.2d4e9d61283ef385de170ab20f96p-88L, + 0x1.8ace5422aa0db5ba7c55a0p0L, 0x1.92c9bb3e6ed61f2733304a346d8fp-88L, + 0x1.8cf3216b5448bef2aa1cd0p0L, 0x1.61c55d84a9848f8c453b3ca8c946p-88L, + 0x1.8f1ae991577362b982745cp0L, 0x7.2ed804efc9b4ae1458ae946099d4p-92L, + 0x1.9145b0b91ffc588a61b468p0L, 0x1.f6b70e01c2a90229a4c4309ea719p-88L, + 0x1.93737b0cdc5e4f4501c3f2p0L, 0x5.40a22d2fc4af581b63e8326efe9cp-92L, + 0x1.95a44cbc8520ee9b483694p0L, 0x1.a0fc6f7c7d61b2b3a22a0eab2cadp-88L, + 0x1.97d829fde4e4f8b9e920f8p0L, 0x1.1e8bd7edb9d7144b6f6818084cc7p-88L, + 0x1.9a0f170ca07b9ba3109b8cp0L, 0x4.6737beb19e1eada6825d3c557428p-92L, + 0x1.9c49182a3f0901c7c46b06p0L, 0x1.1f2be58ddade50c217186c90b457p-88L, + 0x1.9e86319e323231824ca78ep0L, 0x6.4c6e010f92c082bbadfaf605cfd4p-92L, + 0x1.a0c667b5de564b29ada8b8p0L, 0xc.ab349aa0422a8da7d4512edac548p-92L, + 0x1.a309bec4a2d3358c171f76p0L, 0x1.0daad547fa22c26d168ea762d854p-88L, + 0x1.a5503b23e255c8b424491cp0L, 0xa.f87bc8050a405381703ef7caff50p-92L, + 0x1.a799e1330b3586f2dfb2b0p0L, 0x1.58f1a98796ce8908ae852236ca94p-88L, + 0x1.a9e6b5579fdbf43eb243bcp0L, 0x1.ff4c4c58b571cf465caf07b4b9f5p-88L, + 0x1.ac36bbfd3f379c0db966a2p0L, 0x1.1265fc73e480712d20f8597a8e7bp-88L, + 0x1.ae89f995ad3ad5e8734d16p0L, 0x1.73205a7fbc3ae675ea440b162d6cp-88L, + 0x1.b0e07298db66590842acdep0L, 0x1.c6f6ca0e5dcae2aafffa7a0554cbp-88L, + 0x1.b33a2b84f15faf6bfd0e7ap0L, 0x1.d947c2575781dbb49b1237c87b6ep-88L, + 0x1.b59728de559398e3881110p0L, 0x1.64873c7171fefc410416be0a6525p-88L, + 0x1.b7f76f2fb5e46eaa7b081ap0L, 0xb.53c5354c8903c356e4b625aacc28p-92L, + 0x1.ba5b030a10649840cb3c6ap0L, 0xf.5b47f297203757e1cc6eadc8bad0p-92L, + 0x1.bcc1e904bc1d2247ba0f44p0L, 0x1.b3d08cd0b20287092bd59be4ad98p-88L, + 0x1.bf2c25bd71e088408d7024p0L, 0x1.18e3449fa073b356766dfb568ff4p-88L, + 0x1.c199bdd85529c2220cb12ap0L, 0x9.1ba6679444964a36661240043970p-96L, + 0x1.c40ab5fffd07a6d14df820p0L, 0xf.1828a5366fd387a7bdd54cdf7300p-92L, + 0x1.c67f12e57d14b4a2137fd2p0L, 0xf.2b301dd9e6b151a6d1f9d5d5f520p-96L, + 0x1.c8f6d9406e7b511acbc488p0L, 0x5.c442ddb55820171f319d9e5076a8p-96L, + 0x1.cb720dcef90691503cbd1ep0L, 0x9.49db761d9559ac0cb6dd3ed599e0p-92L, + 0x1.cdf0b555dc3f9c44f8958ep0L, 0x1.ac51be515f8c58bdfb6f5740a3a4p-88L, + 0x1.d072d4a07897b8d0f22f20p0L, 0x1.a158e18fbbfc625f09f4cca40874p-88L, + 0x1.d2f87080d89f18ade12398p0L, 0x9.ea2025b4c56553f5cdee4c924728p-92L, + 0x1.d5818dcfba48725da05aeap0L, 0x1.66e0dca9f589f559c0876ff23830p-88L, + 0x1.d80e316c98397bb84f9d04p0L, 0x8.805f84bec614de269900ddf98d28p-92L, + 0x1.da9e603db3285708c01a5ap0L, 0x1.6d4c97f6246f0ec614ec95c99392p-88L, + 0x1.dd321f301b4604b695de3cp0L, 0x6.30a393215299e30d4fb73503c348p-96L, + 0x1.dfc97337b9b5eb968cac38p0L, 0x1.ed291b7225a944efd5bb5524b927p-88L, + 0x1.e264614f5a128a12761fa0p0L, 0x1.7ada6467e77f73bf65e04c95e29dp-88L, + 0x1.e502ee78b3ff6273d13014p0L, 0x1.3991e8f49659e1693be17ae1d2f9p-88L, + 0x1.e7a51fbc74c834b548b282p0L, 0x1.23786758a84f4956354634a416cep-88L, + 0x1.ea4afa2a490d9858f73a18p0L, 0xf.5db301f86dea20610ceee13eb7b8p-92L, + 0x1.ecf482d8e67f08db0312fap0L, 0x1.949cef462010bb4bc4ce72a900dfp-88L, + 0x1.efa1bee615a27771fd21a8p0L, 0x1.2dac1f6dd5d229ff68e46f27e3dfp-88L, + 0x1.f252b376bba974e8696fc2p0L, 0x1.6390d4c6ad5476b5162f40e1d9a9p-88L, + 0x1.f50765b6e4540674f84b76p0L, 0x2.862baff99000dfc4352ba29b8908p-92L, + 0x1.f7bfdad9cbe138913b4bfep0L, 0x7.2bd95c5ce7280fa4d2344a3f5618p-92L, + 0x1.fa7c1819e90d82e90a7e74p0L, 0xb.263c1dc060c36f7650b4c0f233a8p-92L, + 0x1.fd3c22b8f71f10975ba4b2p0L, 0x1.2bcf3a5e12d269d8ad7c1a4a8875p-88L +}; + +/* + * Kernel for expl(x). x must be finite and not tiny or huge. + * "tiny" is anything that would make us underflow (|A6*x^6| < ~LDBL_MIN). + * "huge" is anything that would make fn*L1 inexact (|x| > ~2**17*ln2). + */ +static inline void +__k_expl(long double x, long double *hip, long double *lop, int *kp) +{ + long double q, r, r1, t; + double dr, fn, r2; + int n, n2; + + /* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */ + /* Use a specialized rint() to get fn. Assume round-to-nearest. */ + /* XXX assume no extra precision for the additions, as for trig fns. */ + /* XXX this set of comments is now quadruplicated. */ + /* XXX but see ../src/e_exp.c for a fix using double_t. */ + fn = (double)x * INV_L + 0x1.8p52 - 0x1.8p52; +#if defined(HAVE_EFFICIENT_IRINT) + n = irint(fn); +#else + n = (int)fn; +#endif + n2 = (unsigned)n % INTERVALS; + /* Depend on the sign bit being propagated: */ + *kp = n >> LOG2_INTERVALS; + r1 = x - fn * L1; + r2 = fn * -L2; + r = r1 + r2; + + /* Evaluate expl(endpoint[n2] + r1 + r2) = tbl[n2] * expl(r1 + r2). */ + dr = r; + q = r2 + r * r * (A2 + r * (A3 + r * (A4 + r * (A5 + r * (A6 + + dr * (A7 + dr * (A8 + dr * (A9 + dr * A10)))))))); + t = tbl[n2].lo + tbl[n2].hi; + *hip = tbl[n2].hi; + *lop = tbl[n2].lo + t * (q + r1); +} + +/* + * XXX: the rest of the functions are identical for ld80 and ld128. + * However, we should use scalbnl() for ld128, since long double + * multiplication is very slow on the only supported ld128 arch (sparc64). + */ + +static inline void +k_hexpl(long double x, long double *hip, long double *lop) +{ + float twopkm1; + int k; + + __k_expl(x, hip, lop, &k); + SET_FLOAT_WORD(twopkm1, 0x3f800000 + ((k - 1) << 23)); + *hip *= twopkm1; + *lop *= twopkm1; +} + +static inline long double +hexpl(long double x) +{ + long double hi, lo, twopkm2; + int k; + + twopkm2 = 1; + __k_expl(x, &hi, &lo, &k); + SET_LDBL_EXPSIGN(twopkm2, BIAS + k - 2); + return (lo + hi) * 2 * twopkm2; +} + +#ifdef _COMPLEX_H +/* + * See ../src/k_exp.c for details. + */ +static inline long double complex +__ldexp_cexpl(long double complex z, int expt) +{ + long double exp_x, hi, lo; + long double x, y, scale1, scale2; + int half_expt, k; + + x = creall(z); + y = cimagl(z); + __k_expl(x, &hi, &lo, &k); + + exp_x = (lo + hi) * 0x1p16382; + expt += k - 16382; + + scale1 = 1; + half_expt = expt / 2; + SET_LDBL_EXPSIGN(scale1, BIAS + half_expt); + scale2 = 1; + SET_LDBL_EXPSIGN(scale1, BIAS + expt - half_expt); + + return (cpackl(cos(y) * exp_x * scale1 * scale2, + sinl(y) * exp_x * scale1 * scale2)); +} +#endif /* _COMPLEX_H */ Modified: head/lib/msun/ld128/s_expl.c ============================================================================== --- head/lib/msun/ld128/s_expl.c Mon Dec 30 00:43:24 2013 (r260065) +++ head/lib/msun/ld128/s_expl.c Mon Dec 30 00:51:25 2013 (r260066) @@ -38,16 +38,15 @@ __FBSDID("$FreeBSD$"); #include "fpmath.h" #include "math.h" #include "math_private.h" +#include "k_expl.h" -#define INTERVALS 128 -#define LOG2_INTERVALS 7 -#define BIAS (LDBL_MAX_EXP - 1) +/* XXX Prevent compilers from erroneously constant folding these: */ +static const volatile long double +huge = 0x1p10000L, +tiny = 0x1p-10000L; static const long double -huge = 0x1p10000L, twom10000 = 0x1p-10000L; -/* XXX Prevent gcc from erroneously constant folding this: */ -static volatile const long double tiny = 0x1p-10000L; static const long double /* log(2**16384 - 0.5) rounded towards zero: */ @@ -56,184 +55,16 @@ o_threshold = 11356.5234062941439494919 /* log(2**(-16381-64-1)) rounded towards zero: */ u_threshold = -11433.462743336297878837243843452621503L; -static const double -/* - * ln2/INTERVALS = L1+L2 (hi+lo decomposition for multiplication). L1 must - * have at least 22 (= log2(|LDBL_MIN_EXP-extras|) + log2(INTERVALS)) lowest - * bits zero so that multiplication of it by n is exact. - */ -INV_L = 1.8466496523378731e+2, /* 0x171547652b82fe.0p-45 */ -L2 = -1.0253670638894731e-29; /* -0x1.9ff0342542fc3p-97 */ -static const long double -/* 0x1.62e42fefa39ef35793c768000000p-8 */ -L1 = 5.41521234812457272982212595914567508e-3L; - -static const long double -/* - * Domain [-0.002708, 0.002708], range ~[-2.4021e-38, 2.4234e-38]: - * |exp(x) - p(x)| < 2**-124.9 - * (0.002708 is ln2/(2*INTERVALS) rounded up a little). - */ -A2 = 0.5, -A3 = 1.66666666666666666666666666651085500e-1L, -A4 = 4.16666666666666666666666666425885320e-2L, -A5 = 8.33333333333333333334522877160175842e-3L, -A6 = 1.38888888888888888889971139751596836e-3L; - -static const double -A7 = 1.9841269841269471e-4, -A8 = 2.4801587301585284e-5, -A9 = 2.7557324277411234e-6, -A10 = 2.7557333722375072e-7; - -static const struct { - /* - * hi must be rounded to at most 106 bits so that multiplication - * by r1 in expm1l() is exact, but it is rounded to 88 bits due to - * historical accidents. - */ - long double hi; - long double lo; -} tbl[INTERVALS] = { - 0x1p0L, 0x0p0L, - 0x1.0163da9fb33356d84a66aep0L, 0x3.36dcdfa4003ec04c360be2404078p-92L, - 0x1.02c9a3e778060ee6f7cacap0L, 0x4.f7a29bde93d70a2cabc5cb89ba10p-92L, - 0x1.04315e86e7f84bd738f9a2p0L, 0xd.a47e6ed040bb4bfc05af6455e9b8p-96L, - 0x1.059b0d31585743ae7c548ep0L, 0xb.68ca417fe53e3495f7df4baf84a0p-92L, - 0x1.0706b29ddf6ddc6dc403a8p0L, 0x1.d87b27ed07cb8b092ac75e311753p-88L, - 0x1.0874518759bc808c35f25cp0L, 0x1.9427fa2b041b2d6829d8993a0d01p-88L, - 0x1.09e3ecac6f3834521e060cp0L, 0x5.84d6b74ba2e023da730e7fccb758p-92L, - 0x1.0b5586cf9890f6298b92b6p0L, 0x1.1842a98364291408b3ceb0a2a2bbp-88L, - 0x1.0cc922b7247f7407b705b8p0L, 0x9.3dc5e8aac564e6fe2ef1d431fd98p-92L, - 0x1.0e3ec32d3d1a2020742e4ep0L, 0x1.8af6a552ac4b358b1129e9f966a4p-88L, - 0x1.0fb66affed31af232091dcp0L, 0x1.8a1426514e0b627bda694a400a27p-88L, - 0x1.11301d0125b50a4ebbf1aep0L, 0xd.9318ceac5cc47ab166ee57427178p-92L, - 0x1.12abdc06c31cbfb92bad32p0L, 0x4.d68e2f7270bdf7cedf94eb1cb818p-92L, - 0x1.1429aaea92ddfb34101942p0L, 0x1.b2586d01844b389bea7aedd221d4p-88L, - 0x1.15a98c8a58e512480d573cp0L, 0x1.d5613bf92a2b618ee31b376c2689p-88L, - 0x1.172b83c7d517adcdf7c8c4p0L, 0x1.0eb14a792035509ff7d758693f24p-88L, - 0x1.18af9388c8de9bbbf70b9ap0L, 0x3.c2505c97c0102e5f1211941d2840p-92L, - 0x1.1a35beb6fcb753cb698f68p0L, 0x1.2d1c835a6c30724d5cfae31b84e5p-88L, - 0x1.1bbe084045cd39ab1e72b4p0L, 0x4.27e35f9acb57e473915519a1b448p-92L, - 0x1.1d4873168b9aa7805b8028p0L, 0x9.90f07a98b42206e46166cf051d70p-92L, - 0x1.1ed5022fcd91cb8819ff60p0L, 0x1.121d1e504d36c47474c9b7de6067p-88L, - 0x1.2063b88628cd63b8eeb028p0L, 0x1.50929d0fc487d21c2b84004264dep-88L, - 0x1.21f49917ddc962552fd292p0L, 0x9.4bdb4b61ea62477caa1dce823ba0p-92L, - 0x1.2387a6e75623866c1fadb0p0L, 0x1.c15cb593b0328566902df69e4de2p-88L, - 0x1.251ce4fb2a63f3582ab7dep0L, 0x9.e94811a9c8afdcf796934bc652d0p-92L, - 0x1.26b4565e27cdd257a67328p0L, 0x1.d3b249dce4e9186ddd5ff44e6b08p-92L, - 0x1.284dfe1f5638096cf15cf0p0L, 0x3.ca0967fdaa2e52d7c8106f2e262cp-92L, - 0x1.29e9df51fdee12c25d15f4p0L, 0x1.a24aa3bca890ac08d203fed80a07p-88L, - 0x1.2b87fd0dad98ffddea4652p0L, 0x1.8fcab88442fdc3cb6de4519165edp-88L, - 0x1.2d285a6e4030b40091d536p0L, 0xd.075384589c1cd1b3e4018a6b1348p-92L, - 0x1.2ecafa93e2f5611ca0f45cp0L, 0x1.523833af611bdcda253c554cf278p-88L, - 0x1.306fe0a31b7152de8d5a46p0L, 0x3.05c85edecbc27343629f502f1af2p-92L, - 0x1.32170fc4cd8313539cf1c2p0L, 0x1.008f86dde3220ae17a005b6412bep-88L, - 0x1.33c08b26416ff4c9c8610cp0L, 0x1.96696bf95d1593039539d94d662bp-88L, - 0x1.356c55f929ff0c94623476p0L, 0x3.73af38d6d8d6f9506c9bbc93cbc0p-92L, - 0x1.371a7373aa9caa7145502ep0L, 0x1.4547987e3e12516bf9c699be432fp-88L, - 0x1.38cae6d05d86585a9cb0d8p0L, 0x1.bed0c853bd30a02790931eb2e8f0p-88L, - 0x1.3a7db34e59ff6ea1bc9298p0L, 0x1.e0a1d336163fe2f852ceeb134067p-88L, - 0x1.3c32dc313a8e484001f228p0L, 0xb.58f3775e06ab66353001fae9fca0p-92L, - 0x1.3dea64c12342235b41223ep0L, 0x1.3d773fba2cb82b8244267c54443fp-92L, - 0x1.3fa4504ac801ba0bf701aap0L, 0x4.1832fb8c1c8dbdff2c49909e6c60p-92L, - 0x1.4160a21f72e29f84325b8ep0L, 0x1.3db61fb352f0540e6ba05634413ep-88L, - 0x1.431f5d950a896dc7044394p0L, 0x1.0ccec81e24b0caff7581ef4127f7p-92L, - 0x1.44e086061892d03136f408p0L, 0x1.df019fbd4f3b48709b78591d5cb5p-88L, - 0x1.46a41ed1d005772512f458p0L, 0x1.229d97df404ff21f39c1b594d3a8p-88L, - 0x1.486a2b5c13cd013c1a3b68p0L, 0x1.062f03c3dd75ce8757f780e6ec99p-88L, - 0x1.4a32af0d7d3de672d8bcf4p0L, 0x6.f9586461db1d878b1d148bd3ccb8p-92L, - 0x1.4bfdad5362a271d4397afep0L, 0xc.42e20e0363ba2e159c579f82e4b0p-92L, - 0x1.4dcb299fddd0d63b36ef1ap0L, 0x9.e0cc484b25a5566d0bd5f58ad238p-92L, - 0x1.4f9b2769d2ca6ad33d8b68p0L, 0x1.aa073ee55e028497a329a7333dbap-88L, - 0x1.516daa2cf6641c112f52c8p0L, 0x4.d822190e718226177d7608d20038p-92L, - 0x1.5342b569d4f81df0a83c48p0L, 0x1.d86a63f4e672a3e429805b049465p-88L, - 0x1.551a4ca5d920ec52ec6202p0L, 0x4.34ca672645dc6c124d6619a87574p-92L, - 0x1.56f4736b527da66ecb0046p0L, 0x1.64eb3c00f2f5ab3d801d7cc7272dp-88L, - 0x1.58d12d497c7fd252bc2b72p0L, 0x1.43bcf2ec936a970d9cc266f0072fp-88L, - 0x1.5ab07dd48542958c930150p0L, 0x1.91eb345d88d7c81280e069fbdb63p-88L, - 0x1.5c9268a5946b701c4b1b80p0L, 0x1.6986a203d84e6a4a92f179e71889p-88L, - 0x1.5e76f15ad21486e9be4c20p0L, 0x3.99766a06548a05829e853bdb2b52p-92L, - 0x1.605e1b976dc08b076f592ap0L, 0x4.86e3b34ead1b4769df867b9c89ccp-92L, - 0x1.6247eb03a5584b1f0fa06ep0L, 0x1.d2da42bb1ceaf9f732275b8aef30p-88L, - 0x1.6434634ccc31fc76f8714cp0L, 0x4.ed9a4e41000307103a18cf7a6e08p-92L, - 0x1.66238825522249127d9e28p0L, 0x1.b8f314a337f4dc0a3adf1787ff74p-88L, - 0x1.68155d44ca973081c57226p0L, 0x1.b9f32706bfe4e627d809a85dcc66p-88L, - 0x1.6a09e667f3bcc908b2fb12p0L, 0x1.66ea957d3e3adec17512775099dap-88L, - 0x1.6c012750bdabeed76a9980p0L, 0xf.4f33fdeb8b0ecd831106f57b3d00p-96L, - 0x1.6dfb23c651a2ef220e2cbep0L, 0x1.bbaa834b3f11577ceefbe6c1c411p-92L, - 0x1.6ff7df9519483cf87e1b4ep0L, 0x1.3e213bff9b702d5aa477c12523cep-88L, - 0x1.71f75e8ec5f73dd2370f2ep0L, 0xf.0acd6cb434b562d9e8a20adda648p-92L, - 0x1.73f9a48a58173bd5c9a4e6p0L, 0x8.ab1182ae217f3a7681759553e840p-92L, - 0x1.75feb564267c8bf6e9aa32p0L, 0x1.a48b27071805e61a17b954a2dad8p-88L, - 0x1.780694fde5d3f619ae0280p0L, 0x8.58b2bb2bdcf86cd08e35fb04c0f0p-92L, - 0x1.7a11473eb0186d7d51023ep0L, 0x1.6cda1f5ef42b66977960531e821bp-88L, - 0x1.7c1ed0130c1327c4933444p0L, 0x1.937562b2dc933d44fc828efd4c9cp-88L, - 0x1.7e2f336cf4e62105d02ba0p0L, 0x1.5797e170a1427f8fcdf5f3906108p-88L, - 0x1.80427543e1a11b60de6764p0L, 0x9.a354ea706b8e4d8b718a672bf7c8p-92L, - 0x1.82589994cce128acf88afap0L, 0xb.34a010f6ad65cbbac0f532d39be0p-92L, - 0x1.8471a4623c7acce52f6b96p0L, 0x1.c64095370f51f48817914dd78665p-88L, - 0x1.868d99b4492ec80e41d90ap0L, 0xc.251707484d73f136fb5779656b70p-92L, - 0x1.88ac7d98a669966530bcdep0L, 0x1.2d4e9d61283ef385de170ab20f96p-88L, - 0x1.8ace5422aa0db5ba7c55a0p0L, 0x1.92c9bb3e6ed61f2733304a346d8fp-88L, - 0x1.8cf3216b5448bef2aa1cd0p0L, 0x1.61c55d84a9848f8c453b3ca8c946p-88L, - 0x1.8f1ae991577362b982745cp0L, 0x7.2ed804efc9b4ae1458ae946099d4p-92L, - 0x1.9145b0b91ffc588a61b468p0L, 0x1.f6b70e01c2a90229a4c4309ea719p-88L, - 0x1.93737b0cdc5e4f4501c3f2p0L, 0x5.40a22d2fc4af581b63e8326efe9cp-92L, - 0x1.95a44cbc8520ee9b483694p0L, 0x1.a0fc6f7c7d61b2b3a22a0eab2cadp-88L, - 0x1.97d829fde4e4f8b9e920f8p0L, 0x1.1e8bd7edb9d7144b6f6818084cc7p-88L, - 0x1.9a0f170ca07b9ba3109b8cp0L, 0x4.6737beb19e1eada6825d3c557428p-92L, - 0x1.9c49182a3f0901c7c46b06p0L, 0x1.1f2be58ddade50c217186c90b457p-88L, - 0x1.9e86319e323231824ca78ep0L, 0x6.4c6e010f92c082bbadfaf605cfd4p-92L, - 0x1.a0c667b5de564b29ada8b8p0L, 0xc.ab349aa0422a8da7d4512edac548p-92L, - 0x1.a309bec4a2d3358c171f76p0L, 0x1.0daad547fa22c26d168ea762d854p-88L, - 0x1.a5503b23e255c8b424491cp0L, 0xa.f87bc8050a405381703ef7caff50p-92L, - 0x1.a799e1330b3586f2dfb2b0p0L, 0x1.58f1a98796ce8908ae852236ca94p-88L, - 0x1.a9e6b5579fdbf43eb243bcp0L, 0x1.ff4c4c58b571cf465caf07b4b9f5p-88L, - 0x1.ac36bbfd3f379c0db966a2p0L, 0x1.1265fc73e480712d20f8597a8e7bp-88L, - 0x1.ae89f995ad3ad5e8734d16p0L, 0x1.73205a7fbc3ae675ea440b162d6cp-88L, - 0x1.b0e07298db66590842acdep0L, 0x1.c6f6ca0e5dcae2aafffa7a0554cbp-88L, - 0x1.b33a2b84f15faf6bfd0e7ap0L, 0x1.d947c2575781dbb49b1237c87b6ep-88L, - 0x1.b59728de559398e3881110p0L, 0x1.64873c7171fefc410416be0a6525p-88L, - 0x1.b7f76f2fb5e46eaa7b081ap0L, 0xb.53c5354c8903c356e4b625aacc28p-92L, - 0x1.ba5b030a10649840cb3c6ap0L, 0xf.5b47f297203757e1cc6eadc8bad0p-92L, - 0x1.bcc1e904bc1d2247ba0f44p0L, 0x1.b3d08cd0b20287092bd59be4ad98p-88L, - 0x1.bf2c25bd71e088408d7024p0L, 0x1.18e3449fa073b356766dfb568ff4p-88L, - 0x1.c199bdd85529c2220cb12ap0L, 0x9.1ba6679444964a36661240043970p-96L, - 0x1.c40ab5fffd07a6d14df820p0L, 0xf.1828a5366fd387a7bdd54cdf7300p-92L, - 0x1.c67f12e57d14b4a2137fd2p0L, 0xf.2b301dd9e6b151a6d1f9d5d5f520p-96L, - 0x1.c8f6d9406e7b511acbc488p0L, 0x5.c442ddb55820171f319d9e5076a8p-96L, - 0x1.cb720dcef90691503cbd1ep0L, 0x9.49db761d9559ac0cb6dd3ed599e0p-92L, - 0x1.cdf0b555dc3f9c44f8958ep0L, 0x1.ac51be515f8c58bdfb6f5740a3a4p-88L, - 0x1.d072d4a07897b8d0f22f20p0L, 0x1.a158e18fbbfc625f09f4cca40874p-88L, - 0x1.d2f87080d89f18ade12398p0L, 0x9.ea2025b4c56553f5cdee4c924728p-92L, - 0x1.d5818dcfba48725da05aeap0L, 0x1.66e0dca9f589f559c0876ff23830p-88L, - 0x1.d80e316c98397bb84f9d04p0L, 0x8.805f84bec614de269900ddf98d28p-92L, - 0x1.da9e603db3285708c01a5ap0L, 0x1.6d4c97f6246f0ec614ec95c99392p-88L, - 0x1.dd321f301b4604b695de3cp0L, 0x6.30a393215299e30d4fb73503c348p-96L, - 0x1.dfc97337b9b5eb968cac38p0L, 0x1.ed291b7225a944efd5bb5524b927p-88L, - 0x1.e264614f5a128a12761fa0p0L, 0x1.7ada6467e77f73bf65e04c95e29dp-88L, - 0x1.e502ee78b3ff6273d13014p0L, 0x1.3991e8f49659e1693be17ae1d2f9p-88L, - 0x1.e7a51fbc74c834b548b282p0L, 0x1.23786758a84f4956354634a416cep-88L, - 0x1.ea4afa2a490d9858f73a18p0L, 0xf.5db301f86dea20610ceee13eb7b8p-92L, - 0x1.ecf482d8e67f08db0312fap0L, 0x1.949cef462010bb4bc4ce72a900dfp-88L, - 0x1.efa1bee615a27771fd21a8p0L, 0x1.2dac1f6dd5d229ff68e46f27e3dfp-88L, - 0x1.f252b376bba974e8696fc2p0L, 0x1.6390d4c6ad5476b5162f40e1d9a9p-88L, - 0x1.f50765b6e4540674f84b76p0L, 0x2.862baff99000dfc4352ba29b8908p-92L, - 0x1.f7bfdad9cbe138913b4bfep0L, 0x7.2bd95c5ce7280fa4d2344a3f5618p-92L, - 0x1.fa7c1819e90d82e90a7e74p0L, 0xb.263c1dc060c36f7650b4c0f233a8p-92L, - 0x1.fd3c22b8f71f10975ba4b2p0L, 0x1.2bcf3a5e12d269d8ad7c1a4a8875p-88L -}; - long double expl(long double x) { - union IEEEl2bits u, v; - long double q, r, r1, t, twopk, twopkp10000; - double dr, fn, r2; - int k, n, n2; + union IEEEl2bits u; + long double hi, lo, t, twopk; + int k; uint16_t hx, ix; + DOPRINT_START(&x); + /* Filter out exceptional cases. */ u.e = x; hx = u.xbits.expsign; @@ -241,60 +72,33 @@ expl(long double x) if (ix >= BIAS + 13) { /* |x| >= 8192 or x is NaN */ if (ix == BIAS + LDBL_MAX_EXP) { if (hx & 0x8000) /* x is -Inf or -NaN */ - return (-1 / x); - return (x + x); /* x is +Inf or +NaN */ + RETURNP(-1 / x); + RETURNP(x + x); /* x is +Inf or +NaN */ } if (x > o_threshold) - return (huge * huge); + RETURNP(huge * huge); if (x < u_threshold) - return (tiny * tiny); + RETURNP(tiny * tiny); } else if (ix < BIAS - 114) { /* |x| < 0x1p-114 */ - return (1 + x); /* 1 with inexact iff x != 0 */ + RETURN2P(1, x); /* 1 with inexact iff x != 0 */ } ENTERI(); - /* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */ - /* Use a specialized rint() to get fn. Assume round-to-nearest. */ - /* XXX assume no extra precision for the additions, as for trig fns. */ - /* XXX this set of comments is now quadruplicated. */ - fn = (double)x * INV_L + 0x1.8p52 - 0x1.8p52; -#if defined(HAVE_EFFICIENT_IRINT) - n = irint(fn); -#else - n = (int)fn; -#endif - n2 = (unsigned)n % INTERVALS; - k = n >> LOG2_INTERVALS; - r1 = x - fn * L1; - r2 = fn * -L2; - r = r1 + r2; - - /* Prepare scale factors. */ - /* XXX sparc64 multiplication is so slow that scalbnl() is faster. */ - v.e = 1; - if (k >= LDBL_MIN_EXP) { - v.xbits.expsign = BIAS + k; - twopk = v.e; - } else { - v.xbits.expsign = BIAS + k + 10000; - twopkp10000 = v.e; - } - - /* Evaluate expl(endpoint[n2] + r1 + r2) = tbl[n2] * expl(r1 + r2). */ - dr = r; - q = r2 + r * r * (A2 + r * (A3 + r * (A4 + r * (A5 + r * (A6 + - dr * (A7 + dr * (A8 + dr * (A9 + dr * A10)))))))); - t = tbl[n2].lo + tbl[n2].hi; - t = tbl[n2].lo + t * (q + r1) + tbl[n2].hi; + twopk = 1; + __k_expl(x, &hi, &lo, &k); + t = SUM2P(hi, lo); /* Scale by 2**k. */ + /* XXX sparc64 multiplication is so slow that scalbnl() is faster. */ if (k >= LDBL_MIN_EXP) { if (k == LDBL_MAX_EXP) RETURNI(t * 2 * 0x1p16383L); + SET_LDBL_EXPSIGN(twopk, BIAS + k); RETURNI(t * twopk); } else { - RETURNI(t * twopkp10000 * twom10000); + SET_LDBL_EXPSIGN(twopk, BIAS + k + 10000); + RETURNI(t * twopk * twom10000); } } @@ -312,6 +116,12 @@ expl(long double x) * Setting T3 to 0 would require the |x| < 0x1p-113 condition to appear * in both subintervals, so set T3 = 2**-5, which places the condition * into the [T1, T3] interval. + * + * XXX we now do this more to (partially) balance the number of terms + * in the C and D polys than to avoid checking the condition in both + * intervals. + * + * XXX these micro-optimizations are excessive. */ static const double T1 = -0.1659, /* ~-30.625/128 * log(2) */ @@ -321,6 +131,12 @@ T3 = 0.03125; /* * Domain [-0.1659, 0.03125], range ~[2.9134e-44, 1.8404e-37]: * |(exp(x)-1-x-x**2/2)/x - p(x)| < 2**-122.03 +/* + * XXX none of the long double C or D coeffs except C10 is correctly printed. + * If you re-print their values in %.35Le format, the result is always + * different. For example, the last 2 digits in C3 should be 59, not 67. + * 67 is apparently from rounding an extra-precision value to 36 decimal + * places. */ static const long double C3 = 1.66666666666666666666666666666666667e-1L, @@ -335,6 +151,13 @@ C11 = 2.5052108385441720361903196015125 C12 = 2.08767569878679576457272282566520649e-9L, C13 = 1.60590438367252471783548748824255707e-10L; +/* + * XXX this has 1 more coeff than needed. + * XXX can start the double coeffs but not the double mults at C10. + * With my coeffs (C10-C17 double; s = best_s): + * Domain [-0.1659, 0.03125], range ~[-1.1976e-37, 1.1976e-37]: + * |(exp(x)-1-x-x**2/2)/x - p(x)| ~< 2**-122.65 + */ static const double C14 = 1.1470745580491932e-11, /* 0x1.93974a81dae30p-37 */ C15 = 7.6471620181090468e-13, /* 0x1.ae7f3820adab1p-41 */ @@ -359,6 +182,13 @@ D11 = 2.5052108385508457004648045093526 D12 = 2.08767569819738524488686318024854942e-9L, D13 = 1.60590442297008495301927448122499313e-10L; +/* + * XXX this has 1 more coeff than needed. + * XXX can start the double coeffs but not the double mults at D11. + * With my coeffs (D11-D16 double): + * Domain [0.03125, 0.1659], range ~[-1.1980e-37, 1.1980e-37]: + * |(exp(x)-1-x-x**2/2)/x - p(x)| ~< 2**-122.65 + */ static const double D14 = 1.1470726176204336e-11, /* 0x1.93971dc395d9ep-37 */ D15 = 7.6478532249581686e-13, /* 0x1.ae892e3D16fcep-41 */ @@ -375,6 +205,8 @@ expm1l(long double x) int k, n, n2; uint16_t hx, ix; + DOPRINT_START(&x); + /* Filter out exceptional cases. */ u.e = x; hx = u.xbits.expsign; @@ -382,11 +214,11 @@ expm1l(long double x) if (ix >= BIAS + 7) { /* |x| >= 128 or x is NaN */ if (ix == BIAS + LDBL_MAX_EXP) { if (hx & 0x8000) /* x is -Inf or -NaN */ - return (-1 / x - 1); - return (x + x); /* x is +Inf or +NaN */ + RETURNP(-1 / x - 1); + RETURNP(x + x); /* x is +Inf or +NaN */ } if (x > o_threshold) - return (huge * huge); + RETURNP(huge * huge); /* * expm1l() never underflows, but it must avoid * unrepresentable large negative exponents. We used a @@ -395,7 +227,7 @@ expm1l(long double x) * in the same way as large ones here. */ if (hx & 0x8000) /* x <= -128 */ - return (tiny - 1); /* good for x < -114ln2 - eps */ + RETURN2P(tiny, -1); /* good for x < -114ln2 - eps */ } ENTERI(); @@ -407,7 +239,7 @@ expm1l(long double x) if (x < T3) { if (ix < BIAS - 113) { /* |x| < 0x1p-113 */ /* x (rounded) with inexact if x != 0: */ - RETURNI(x == 0 ? x : + RETURNPI(x == 0 ? x : (0x1p200 * x + fabsl(x)) * 0x1p-200); } q = x * x2 * C3 + x2 * x2 * (C4 + x * (C5 + x * (C6 + @@ -428,9 +260,9 @@ expm1l(long double x) hx2_hi = x_hi * x_hi / 2; hx2_lo = x_lo * (x + x_hi) / 2; if (ix >= BIAS - 7) - RETURNI(hx2_lo + x_lo + q + (hx2_hi + x_hi)); + RETURN2PI(hx2_hi + x_hi, hx2_lo + x_lo + q); else - RETURNI(hx2_lo + q + hx2_hi + x); + RETURN2PI(x, hx2_lo + q + hx2_hi); } /* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */ @@ -463,21 +295,21 @@ expm1l(long double x) t = tbl[n2].lo + tbl[n2].hi; if (k == 0) { - t = tbl[n2].lo * (r1 + 1) + t * q + tbl[n2].hi * r1 + - (tbl[n2].hi - 1); + t = SUM2P(tbl[n2].hi - 1, tbl[n2].lo * (r1 + 1) + t * q + + tbl[n2].hi * r1); RETURNI(t); } if (k == -1) { - t = tbl[n2].lo * (r1 + 1) + t * q + tbl[n2].hi * r1 + - (tbl[n2].hi - 2); + t = SUM2P(tbl[n2].hi - 2, tbl[n2].lo * (r1 + 1) + t * q + + tbl[n2].hi * r1); RETURNI(t / 2); } if (k < -7) { - t = tbl[n2].lo + t * (q + r1) + tbl[n2].hi; + t = SUM2P(tbl[n2].hi, tbl[n2].lo + t * (q + r1)); RETURNI(t * twopk - 1); } if (k > 2 * LDBL_MANT_DIG - 1) { - t = tbl[n2].lo + t * (q + r1) + tbl[n2].hi; + t = SUM2P(tbl[n2].hi, tbl[n2].lo + t * (q + r1)); if (k == LDBL_MAX_EXP) RETURNI(t * 2 * 0x1p16383L - 1); RETURNI(t * twopk - 1); @@ -487,8 +319,8 @@ expm1l(long double x) twomk = v.e; if (k > LDBL_MANT_DIG - 1) - t = tbl[n2].lo - twomk + t * (q + r1) + tbl[n2].hi; + t = SUM2P(tbl[n2].hi, tbl[n2].lo - twomk + t * (q + r1)); else - t = tbl[n2].lo + t * (q + r1) + (tbl[n2].hi - twomk); + t = SUM2P(tbl[n2].hi - twomk, tbl[n2].lo + t * (q + r1)); RETURNI(t * twopk); } Added: head/lib/msun/ld80/k_expl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/ld80/k_expl.h Mon Dec 30 00:51:25 2013 (r260066) @@ -0,0 +1,305 @@ +/* from: FreeBSD: head/lib/msun/ld80/s_expl.c 251343 2013-06-03 19:51:32Z kargl */ + +/*- + * Copyright (c) 2009-2013 Steven G. Kargl + * 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 ``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. + * + * Optimized by Bruce D. Evans. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * See s_expl.c for more comments about __k_expl(). + * + * See ../src/e_exp.c and ../src/k_exp.h for precision-independent comments + * about the secondary kernels. + */ + +#define INTERVALS 128 +#define LOG2_INTERVALS 7 +#define BIAS (LDBL_MAX_EXP - 1) + +static const double +/* + * ln2/INTERVALS = L1+L2 (hi+lo decomposition for multiplication). L1 must + * have at least 22 (= log2(|LDBL_MIN_EXP-extras|) + log2(INTERVALS)) lowest + * bits zero so that multiplication of it by n is exact. + */ +INV_L = 1.8466496523378731e+2, /* 0x171547652b82fe.0p-45 */ +L1 = 5.4152123484527692e-3, /* 0x162e42ff000000.0p-60 */ +L2 = -3.2819649005320973e-13, /* -0x1718432a1b0e26.0p-94 */ +/* + * Domain [-0.002708, 0.002708], range ~[-5.7136e-24, 5.7110e-24]: + * |exp(x) - p(x)| < 2**-77.2 + * (0.002708 is ln2/(2*INTERVALS) rounded up a little). + */ +A2 = 0.5, +A3 = 1.6666666666666119e-1, /* 0x15555555555490.0p-55 */ +A4 = 4.1666666666665887e-2, /* 0x155555555554e5.0p-57 */ +A5 = 8.3333354987869413e-3, /* 0x1111115b789919.0p-59 */ +A6 = 1.3888891738560272e-3; /* 0x16c16c651633ae.0p-62 */ + +/* + * 2^(i/INTERVALS) for i in [0,INTERVALS] is represented by two values where + * the first 53 bits of the significand are stored in hi and the next 53 + * bits are in lo. Tang's paper states that the trailing 6 bits of hi must + * be zero for his algorithm in both single and double precision, because + * the table is re-used in the implementation of expm1() where a floating + * point addition involving hi must be exact. Here hi is double, so + * converting it to long double gives 11 trailing zero bits. + */ +static const struct { + double hi; + double lo; +} tbl[INTERVALS] = { + 0x1p+0, 0x0p+0, + /* + * XXX hi is rounded down, and the formatting is not quite normal. + * But I rather like both. The 0x1.*p format is good for 4N+1 + * mantissa bits. Rounding down makes the lo terms positive, + * so that the columnar formatting can be simpler. + */ + 0x1.0163da9fb3335p+0, 0x1.b61299ab8cdb7p-54, + 0x1.02c9a3e778060p+0, 0x1.dcdef95949ef4p-53, + 0x1.04315e86e7f84p+0, 0x1.7ae71f3441b49p-53, + 0x1.059b0d3158574p+0, 0x1.d73e2a475b465p-55, + 0x1.0706b29ddf6ddp+0, 0x1.8db880753b0f6p-53, + 0x1.0874518759bc8p+0, 0x1.186be4bb284ffp-57, + 0x1.09e3ecac6f383p+0, 0x1.1487818316136p-54, + 0x1.0b5586cf9890fp+0, 0x1.8a62e4adc610bp-54, + 0x1.0cc922b7247f7p+0, 0x1.01edc16e24f71p-54, + 0x1.0e3ec32d3d1a2p+0, 0x1.03a1727c57b53p-59, + 0x1.0fb66affed31ap+0, 0x1.e464123bb1428p-53, + 0x1.11301d0125b50p+0, 0x1.49d77e35db263p-53, + 0x1.12abdc06c31cbp+0, 0x1.f72575a649ad2p-53, + 0x1.1429aaea92ddfp+0, 0x1.66820328764b1p-53, + 0x1.15a98c8a58e51p+0, 0x1.2406ab9eeab0ap-55, + 0x1.172b83c7d517ap+0, 0x1.b9bef918a1d63p-53, + 0x1.18af9388c8de9p+0, 0x1.777ee1734784ap-53, + 0x1.1a35beb6fcb75p+0, 0x1.e5b4c7b4968e4p-55, + 0x1.1bbe084045cd3p+0, 0x1.3563ce56884fcp-53, + 0x1.1d4873168b9aap+0, 0x1.e016e00a2643cp-54, + 0x1.1ed5022fcd91cp+0, 0x1.71033fec2243ap-53, + 0x1.2063b88628cd6p+0, 0x1.dc775814a8495p-55, + 0x1.21f49917ddc96p+0, 0x1.2a97e9494a5eep-55, + 0x1.2387a6e756238p+0, 0x1.9b07eb6c70573p-54, + 0x1.251ce4fb2a63fp+0, 0x1.ac155bef4f4a4p-55, + 0x1.26b4565e27cddp+0, 0x1.2bd339940e9d9p-55, + 0x1.284dfe1f56380p+0, 0x1.2d9e2b9e07941p-53, + 0x1.29e9df51fdee1p+0, 0x1.612e8afad1255p-55, + 0x1.2b87fd0dad98fp+0, 0x1.fbbd48ca71f95p-53, + 0x1.2d285a6e4030bp+0, 0x1.0024754db41d5p-54, + 0x1.2ecafa93e2f56p+0, 0x1.1ca0f45d52383p-56, + 0x1.306fe0a31b715p+0, 0x1.6f46ad23182e4p-55, + 0x1.32170fc4cd831p+0, 0x1.a9ce78e18047cp-55, + 0x1.33c08b26416ffp+0, 0x1.32721843659a6p-54, + 0x1.356c55f929ff0p+0, 0x1.928c468ec6e76p-53, + 0x1.371a7373aa9cap+0, 0x1.4e28aa05e8a8fp-53, + 0x1.38cae6d05d865p+0, 0x1.0b53961b37da2p-53, + 0x1.3a7db34e59ff6p+0, 0x1.d43792533c144p-53, + 0x1.3c32dc313a8e4p+0, 0x1.08003e4516b1ep-53, + 0x1.3dea64c123422p+0, 0x1.ada0911f09ebcp-55, + 0x1.3fa4504ac801bp+0, 0x1.417ee03548306p-53, + 0x1.4160a21f72e29p+0, 0x1.f0864b71e7b6cp-53, + 0x1.431f5d950a896p+0, 0x1.b8e088728219ap-53, + 0x1.44e086061892dp+0, 0x1.89b7a04ef80d0p-59, + 0x1.46a41ed1d0057p+0, 0x1.c944bd1648a76p-54, + 0x1.486a2b5c13cd0p+0, 0x1.3c1a3b69062f0p-56, + 0x1.4a32af0d7d3dep+0, 0x1.9cb62f3d1be56p-54, + 0x1.4bfdad5362a27p+0, 0x1.d4397afec42e2p-56, + 0x1.4dcb299fddd0dp+0, 0x1.8ecdbbc6a7833p-54, + 0x1.4f9b2769d2ca6p+0, 0x1.5a67b16d3540ep-53, + 0x1.516daa2cf6641p+0, 0x1.8225ea5909b04p-53, + 0x1.5342b569d4f81p+0, 0x1.be1507893b0d5p-53, + 0x1.551a4ca5d920ep+0, 0x1.8a5d8c4048699p-53, + 0x1.56f4736b527dap+0, 0x1.9bb2c011d93adp-54, + 0x1.58d12d497c7fdp+0, 0x1.295e15b9a1de8p-55, + 0x1.5ab07dd485429p+0, 0x1.6324c054647adp-54, + 0x1.5c9268a5946b7p+0, 0x1.c4b1b816986a2p-60, + 0x1.5e76f15ad2148p+0, 0x1.ba6f93080e65ep-54, + 0x1.605e1b976dc08p+0, 0x1.60edeb25490dcp-53, + 0x1.6247eb03a5584p+0, 0x1.63e1f40dfa5b5p-53, + 0x1.6434634ccc31fp+0, 0x1.8edf0e2989db3p-53, + 0x1.6623882552224p+0, 0x1.224fb3c5371e6p-53, + 0x1.68155d44ca973p+0, 0x1.038ae44f73e65p-57, + 0x1.6a09e667f3bccp+0, 0x1.21165f626cdd5p-53, + 0x1.6c012750bdabep+0, 0x1.daed533001e9ep-53, + 0x1.6dfb23c651a2ep+0, 0x1.e441c597c3775p-53, + 0x1.6ff7df9519483p+0, 0x1.9f0fc369e7c42p-53, + 0x1.71f75e8ec5f73p+0, 0x1.ba46e1e5de15ap-53, + 0x1.73f9a48a58173p+0, 0x1.7ab9349cd1562p-53, + 0x1.75feb564267c8p+0, 0x1.7edd354674916p-53, + 0x1.780694fde5d3fp+0, 0x1.866b80a02162dp-54, + 0x1.7a11473eb0186p+0, 0x1.afaa2047ed9b4p-53, + 0x1.7c1ed0130c132p+0, 0x1.f124cd1164dd6p-54, + 0x1.7e2f336cf4e62p+0, 0x1.05d02ba15797ep-56, + 0x1.80427543e1a11p+0, 0x1.6c1bccec9346bp-53, + 0x1.82589994cce12p+0, 0x1.159f115f56694p-53, + 0x1.8471a4623c7acp+0, 0x1.9ca5ed72f8c81p-53, + 0x1.868d99b4492ecp+0, 0x1.01c83b21584a3p-53, + 0x1.88ac7d98a6699p+0, 0x1.994c2f37cb53ap-54, + 0x1.8ace5422aa0dbp+0, 0x1.6e9f156864b27p-54, + 0x1.8cf3216b5448bp+0, 0x1.de55439a2c38bp-53, + 0x1.8f1ae99157736p+0, 0x1.5cc13a2e3976cp-55, + 0x1.9145b0b91ffc5p+0, 0x1.114c368d3ed6ep-53, + 0x1.93737b0cdc5e4p+0, 0x1.e8a0387e4a814p-53, + 0x1.95a44cbc8520ep+0, 0x1.d36906d2b41f9p-53, + 0x1.97d829fde4e4fp+0, 0x1.173d241f23d18p-53, + 0x1.9a0f170ca07b9p+0, 0x1.7462137188ce7p-53, + 0x1.9c49182a3f090p+0, 0x1.c7c46b071f2bep-56, + 0x1.9e86319e32323p+0, 0x1.824ca78e64c6ep-56, + 0x1.a0c667b5de564p+0, 0x1.6535b51719567p-53, + 0x1.a309bec4a2d33p+0, 0x1.6305c7ddc36abp-54, + 0x1.a5503b23e255cp+0, 0x1.1684892395f0fp-53, + 0x1.a799e1330b358p+0, 0x1.bcb7ecac563c7p-54, + 0x1.a9e6b5579fdbfp+0, 0x1.0fac90ef7fd31p-54, + 0x1.ac36bbfd3f379p+0, 0x1.81b72cd4624ccp-53, + 0x1.ae89f995ad3adp+0, 0x1.7a1cd345dcc81p-54, + 0x1.b0e07298db665p+0, 0x1.2108559bf8deep-53, + 0x1.b33a2b84f15fap+0, 0x1.ed7fa1cf7b290p-53, + 0x1.b59728de55939p+0, 0x1.1c7102222c90ep-53, + 0x1.b7f76f2fb5e46p+0, 0x1.d54f610356a79p-53, + 0x1.ba5b030a10649p+0, 0x1.0819678d5eb69p-53, + 0x1.bcc1e904bc1d2p+0, 0x1.23dd07a2d9e84p-55, + 0x1.bf2c25bd71e08p+0, 0x1.0811ae04a31c7p-53, + 0x1.c199bdd85529cp+0, 0x1.11065895048ddp-55, + 0x1.c40ab5fffd07ap+0, 0x1.b4537e083c60ap-54, + 0x1.c67f12e57d14bp+0, 0x1.2884dff483cadp-54, + 0x1.c8f6d9406e7b5p+0, 0x1.1acbc48805c44p-56, + 0x1.cb720dcef9069p+0, 0x1.503cbd1e949dbp-56, + 0x1.cdf0b555dc3f9p+0, 0x1.889f12b1f58a3p-53, + 0x1.d072d4a07897bp+0, 0x1.1a1e45e4342b2p-53, + 0x1.d2f87080d89f1p+0, 0x1.15bc247313d44p-53, + 0x1.d5818dcfba487p+0, 0x1.2ed02d75b3707p-55, + 0x1.d80e316c98397p+0, 0x1.7709f3a09100cp-53, + 0x1.da9e603db3285p+0, 0x1.c2300696db532p-54, + 0x1.dd321f301b460p+0, 0x1.2da5778f018c3p-54, + 0x1.dfc97337b9b5ep+0, 0x1.72d195873da52p-53, + 0x1.e264614f5a128p+0, 0x1.424ec3f42f5b5p-53, + 0x1.e502ee78b3ff6p+0, 0x1.39e8980a9cc8fp-55, + 0x1.e7a51fbc74c83p+0, 0x1.2d522ca0c8de2p-54, + 0x1.ea4afa2a490d9p+0, 0x1.0b1ee7431ebb6p-53, + 0x1.ecf482d8e67f0p+0, 0x1.1b60625f7293ap-53, + 0x1.efa1bee615a27p+0, 0x1.dc7f486a4b6b0p-54, + 0x1.f252b376bba97p+0, 0x1.3a1a5bf0d8e43p-54, + 0x1.f50765b6e4540p+0, 0x1.9d3e12dd8a18bp-54, + 0x1.f7bfdad9cbe13p+0, 0x1.1227697fce57bp-53, + 0x1.fa7c1819e90d8p+0, 0x1.74853f3a5931ep-55, + 0x1.fd3c22b8f71f1p+0, 0x1.2eb74966579e7p-57 +}; + +/* + * Kernel for expl(x). x must be finite and not tiny or huge. + * "tiny" is anything that would make us underflow (|A6*x^6| < ~LDBL_MIN). + * "huge" is anything that would make fn*L1 inexact (|x| > ~2**17*ln2). + */ +static inline void +__k_expl(long double x, long double *hip, long double *lop, int *kp) +{ + long double fn, q, r, r1, r2, t, z; + int n, n2; + + /* Reduce x to (k*ln2 + endpoint[n2] + r1 + r2). */ + /* Use a specialized rint() to get fn. Assume round-to-nearest. */ + fn = x * INV_L + 0x1.8p63 - 0x1.8p63; + r = x - fn * L1 - fn * L2; /* r = r1 + r2 done independently. */ +#if defined(HAVE_EFFICIENT_IRINTL) + n = irintl(fn); +#elif defined(HAVE_EFFICIENT_IRINT) + n = irint(fn); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 01:06:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BC9CDDF; Mon, 30 Dec 2013 01:06:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 83E6D16E5; Mon, 30 Dec 2013 01:06:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU16OAu058168; Mon, 30 Dec 2013 01:06:24 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU16L6x058148; Mon, 30 Dec 2013 01:06:21 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201312300106.rBU16L6x058148@svn.freebsd.org> From: Steve Kargl Date: Mon, 30 Dec 2013 01:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260067 - in head/lib/msun: . man src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 01:06:24 -0000 Author: kargl Date: Mon Dec 30 01:06:21 2013 New Revision: 260067 URL: http://svnweb.freebsd.org/changeset/base/260067 Log: * Makefile: . Hook coshl, sinhl, and tanhl into libm. . Create symbolic links for corresponding manpages. . While here remove a nearby extraneous space. * Symbol.map: * src/math.h: . Move coshl, sinhl, and tanhl to their proper locations. * man/cosh.3: * man/sinh.3: * man/tanh.3: . Update the manpages. * src/e_cosh.c: * src/e_sinh.c: * src/s_tanh.c: . Add weak reference for LBDL_MANT_DIG==53 targets. * src/imprecise.c: . Remove the coshl, sinhl, and tanhl kludge. * src/e_coshl.c: . ld80 and ld128 implementation of coshl(). * src/e_sinhl.c: . ld80 and ld128 implementation of sinhl(). * src/s_tanhl.c: . ld80 and ld128 implementation of tanhl(). Obtained from: bde (mostly), das and kargl Added: head/lib/msun/src/e_coshl.c (contents, props changed) head/lib/msun/src/e_sinhl.c (contents, props changed) head/lib/msun/src/s_tanhl.c (contents, props changed) Modified: head/lib/msun/Makefile head/lib/msun/Symbol.map head/lib/msun/man/cosh.3 head/lib/msun/man/sinh.3 head/lib/msun/man/tanh.3 head/lib/msun/src/e_cosh.c head/lib/msun/src/e_sinh.c head/lib/msun/src/imprecise.c head/lib/msun/src/math.h head/lib/msun/src/s_tanh.c Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Mon Dec 30 00:51:25 2013 (r260066) +++ head/lib/msun/Makefile Mon Dec 30 01:06:21 2013 (r260067) @@ -96,13 +96,14 @@ COMMON_SRCS+= s_copysignl.c s_fabsl.c s_ .if ${LDBL_PREC} != 53 # If long double != double use these; otherwise, we alias the double versions. COMMON_SRCS+= e_acoshl.c e_acosl.c e_asinl.c e_atan2l.c e_atanhl.c \ - e_fmodl.c e_hypotl.c e_remainderl.c e_sqrtl.c \ + e_coshl.c e_fmodl.c e_hypotl.c \ + e_remainderl.c e_sinhl.c e_sqrtl.c \ invtrig.c k_cosl.c k_sinl.c k_tanl.c \ s_asinhl.c s_atanl.c s_cbrtl.c s_ceill.c s_cosl.c s_cprojl.c \ s_csqrtl.c s_exp2l.c s_expl.c s_floorl.c s_fmal.c \ s_frexpl.c s_logbl.c s_logl.c s_nanl.c s_nextafterl.c \ - s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c s_scalbnl.c \ - s_sinl.c s_tanl.c s_truncl.c w_cabsl.c + s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c s_scalbnl.c \ + s_sinl.c s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c .endif # C99 complex functions @@ -160,7 +161,7 @@ MLINKS+=cimag.3 cimagf.3 cimag.3 cimagl. cimag.3 creal.3 cimag.3 crealf.3 cimag.3 creall.3 MLINKS+=copysign.3 copysignf.3 copysign.3 copysignl.3 MLINKS+=cos.3 cosf.3 cos.3 cosl.3 -MLINKS+=cosh.3 coshf.3 +MLINKS+=cosh.3 coshf.3 cosh.3 coshl.3 MLINKS+=csqrt.3 csqrtf.3 csqrt.3 csqrtl.3 MLINKS+=erf.3 erfc.3 erf.3 erff.3 erf.3 erfcf.3 MLINKS+=exp.3 expm1.3 exp.3 expm1f.3 exp.3 expm1l.3 exp.3 pow.3 exp.3 powf.3 \ @@ -208,11 +209,11 @@ MLINKS+=round.3 roundf.3 round.3 roundl. MLINKS+=scalbn.3 scalbln.3 scalbn.3 scalblnf.3 scalbn.3 scalblnl.3 MLINKS+=scalbn.3 scalbnf.3 scalbn.3 scalbnl.3 MLINKS+=sin.3 sinf.3 sin.3 sinl.3 -MLINKS+=sinh.3 sinhf.3 +MLINKS+=sinh.3 sinhf.3 sinh.3 sinhl.3 MLINKS+=sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 cbrtl.3 sqrt.3 sqrtf.3 \ sqrt.3 sqrtl.3 MLINKS+=tan.3 tanf.3 tan.3 tanl.3 -MLINKS+=tanh.3 tanhf.3 +MLINKS+=tanh.3 tanhf.3 tanh.3 tanhl.3 MLINKS+=trunc.3 truncf.3 trunc.3 truncl.3 .include Modified: head/lib/msun/Symbol.map ============================================================================== --- head/lib/msun/Symbol.map Mon Dec 30 00:51:25 2013 (r260066) +++ head/lib/msun/Symbol.map Mon Dec 30 01:06:21 2013 (r260067) @@ -260,6 +260,7 @@ FBSD_1.3 { ccosf; ccosh; ccoshf; + coshl; ctan; ctanf; ctanh; @@ -270,13 +271,12 @@ FBSD_1.3 { log1pl; log2l; logl; + sinhl; + tanhl; /* Implemented as weak aliases for imprecise versions */ - coshl; erfcl; erfl; lgammal; powl; - sinhl; - tanhl; tgammal; }; Modified: head/lib/msun/man/cosh.3 ============================================================================== --- head/lib/msun/man/cosh.3 Mon Dec 30 00:51:25 2013 (r260066) +++ head/lib/msun/man/cosh.3 Mon Dec 30 01:06:21 2013 (r260067) @@ -28,12 +28,13 @@ .\" from: @(#)cosh.3 5.1 (Berkeley) 5/2/91 .\" $FreeBSD$ .\" -.Dd January 14, 2005 +.Dd August 17, 2013 .Dt COSH 3 .Os .Sh NAME .Nm cosh , -.Nm coshf +.Nm coshf , +.Nm coshl .Nd hyperbolic cosine functions .Sh LIBRARY .Lb libm @@ -43,11 +44,14 @@ .Fn cosh "double x" .Ft float .Fn coshf "float x" +.Ft long double +.Fn coshl "long double x" .Sh DESCRIPTION The -.Fn cosh +.Fn cosh , +.Fn coshf , and the -.Fn coshf +.Fn coshl functions compute the hyperbolic cosine of .Fa x . .Sh SEE ALSO Modified: head/lib/msun/man/sinh.3 ============================================================================== --- head/lib/msun/man/sinh.3 Mon Dec 30 00:51:25 2013 (r260066) +++ head/lib/msun/man/sinh.3 Mon Dec 30 01:06:21 2013 (r260067) @@ -42,11 +42,14 @@ .Fn sinh "double x" .Ft float .Fn sinhf "float x" +.Ft long double +.Fn sinhl "long double x" .Sh DESCRIPTION The -.Fn sinh +.Fn sinh , +.Fn sinhf , and the -.Fn sinhf +.Fn sinhl functions compute the hyperbolic sine of .Fa x . .Sh SEE ALSO Modified: head/lib/msun/man/tanh.3 ============================================================================== --- head/lib/msun/man/tanh.3 Mon Dec 30 00:51:25 2013 (r260066) +++ head/lib/msun/man/tanh.3 Mon Dec 30 01:06:21 2013 (r260067) @@ -28,12 +28,13 @@ .\" from: @(#)tanh.3 5.1 (Berkeley) 5/2/91 .\" $FreeBSD$ .\" -.Dd May 2, 1991 +.Dd August 17, 2013 .Dt TANH 3 .Os .Sh NAME .Nm tanh , -.Nm tanhf +.Nm tanhf , +.Nm tanhl .Nd hyperbolic tangent functions .Sh LIBRARY .Lb libm @@ -43,20 +44,24 @@ .Fn tanh "double x" .Ft float .Fn tanhf "float x" +.Ft long double +.Fn tanhl "long double x" .Sh DESCRIPTION The -.Fn tanh +.Fn tanh , +.Fn tanhf , and the -.Fn tanhf +.Fn tanhl functions compute the hyperbolic tangent of .Fa x . For a discussion of error due to roundoff, see .Xr math 3 . .Sh RETURN VALUES The -.Fn tanh +.Fn tanh , +.Fn tanhf , and the -.Fn tanhf +.Fn tanhl functions return the hyperbolic tangent value. .Sh SEE ALSO .Xr acos 3 , Modified: head/lib/msun/src/e_cosh.c ============================================================================== --- head/lib/msun/src/e_cosh.c Mon Dec 30 00:51:25 2013 (r260066) +++ head/lib/msun/src/e_cosh.c Mon Dec 30 01:06:21 2013 (r260067) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); * only cosh(0)=1 is exact for finite x. */ +#include + #include "math.h" #include "math_private.h" @@ -77,3 +79,7 @@ __ieee754_cosh(double x) /* |x| > overflowthresold, cosh(x) overflow */ return huge*huge; } + +#if (LDBL_MANT_DIG == 53) +__weak_reference(cosh, coshl); +#endif Added: head/lib/msun/src/e_coshl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/e_coshl.c Mon Dec 30 01:06:21 2013 (r260067) @@ -0,0 +1,130 @@ +/* from: FreeBSD: head/lib/msun/src/e_coshl.c XXX */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * See e_cosh.c for complete comments. + * + * Converted to long double by Bruce D. Evans. + */ + +#include +#ifdef __i386__ +#include +#endif + +#include "fpmath.h" +#include "math.h" +#include "math_private.h" +#include "k_expl.h" + +#if LDBL_MAX_EXP != 0x4000 +/* We also require the usual expsign encoding. */ +#error "Unsupported long double format" +#endif + +#define BIAS (LDBL_MAX_EXP - 1) + +static const volatile long double huge = 0x1p10000L, tiny = 0x1p-10000L; +#if LDBL_MANT_DIG == 64 +/* + * Domain [-1, 1], range ~[-1.8211e-21, 1.8211e-21]: + * |cosh(x) - c(x)| < 2**-68.8 + */ +static const union IEEEl2bits +C4u = LD80C(0xaaaaaaaaaaaaac78, -5, 4.16666666666666682297e-2L); +#define C4 C4u.e +static const double +C2 = 0.5, +C6 = 1.3888888888888616e-3, /* 0x16c16c16c16b99.0p-62 */ +C8 = 2.4801587301767953e-5, /* 0x1a01a01a027061.0p-68 */ +C10 = 2.7557319163300398e-7, /* 0x127e4fb6c9b55f.0p-74 */ +C12 = 2.0876768371393075e-9, /* 0x11eed99406a3f4.0p-81 */ +C14 = 1.1469537039374480e-11, /* 0x1938c67cd18c48.0p-89 */ +C16 = 4.8473490896852041e-14; /* 0x1b49c429701e45.0p-97 */ +#elif LDBL_MANT_DIG == 113 +/* + * Domain [-1, 1], range ~[-2.3194e-37, 2.3194e-37]: + * |cosh(x) - c(x)| < 2**-121.69 + */ +static const long double +C4 = 4.16666666666666666666666666666666225e-2L, /* 0x1555555555555555555555555554e.0p-117L */ +C6 = 1.38888888888888888888888888889434831e-3L, /* 0x16c16c16c16c16c16c16c16c1dd7a.0p-122L */ +C8 = 2.48015873015873015873015871870962089e-5L, /* 0x1a01a01a01a01a01a01a017af2756.0p-128L */ +C10 = 2.75573192239858906525574318600800201e-7L, /* 0x127e4fb7789f5c72ef01c8a040640.0p-134L */ +C12 = 2.08767569878680989791444691755468269e-9L, /* 0x11eed8eff8d897b543d0679607399.0p-141L */ +C14= 1.14707455977297247387801189650495351e-11L, /* 0x193974a8c07c9d24ae169a7fa9b54.0p-149L */ +C16 = 4.77947733238737883626416876486279985e-14L; /* 0x1ae7f3e733b814d4e1b90f5727fe4.0p-157L */ +static const double +C2 = 0.5, +C18 = 1.5619206968597871e-16, /* 0x16827863b9900b.0p-105 */ +C20 = 4.1103176218528049e-19, /* 0x1e542ba3d3c269.0p-114 */ +C22 = 8.8967926401641701e-22, /* 0x10ce399542a014.0p-122 */ +C24 = 1.6116681626523904e-24, /* 0x1f2c981d1f0cb7.0p-132 */ +C26 = 2.5022374732804632e-27; /* 0x18c7ecf8b2c4a0.0p-141 */ +#else +#error "Unsupported long double format" +#endif /* LDBL_MANT_DIG == 64 */ + +/* log(2**16385 - 0.5) rounded towards up: */ +static const float +o_threshold = 1.13572168e4; /* 0xb174de.0p-10 */ + +long double +coshl(long double x) +{ + long double hi,lo,x2,x4; + double dx2; + uint16_t ix; + + GET_LDBL_EXPSIGN(ix,x); + ix &= 0x7fff; + + /* x is INF or NaN */ + if(ix>=0x7fff) return x*x; + + ENTERI(); + + /* |x| < 1, return 1 or c(x) */ + if(ix<0x3fff) { + if (ix o_threshold, cosh(x) overflow */ + RETURNI(huge*huge); +} Modified: head/lib/msun/src/e_sinh.c ============================================================================== --- head/lib/msun/src/e_sinh.c Mon Dec 30 00:51:25 2013 (r260066) +++ head/lib/msun/src/e_sinh.c Mon Dec 30 01:06:21 2013 (r260067) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); * only sinh(0)=0 is exact for finite x. */ +#include + #include "math.h" #include "math_private.h" @@ -71,3 +73,7 @@ __ieee754_sinh(double x) /* |x| > overflowthresold, sinh(x) overflow */ return x*shuge; } + +#if (LDBL_MANT_DIG == 53) +__weak_reference(sinh, sinhl); +#endif Added: head/lib/msun/src/e_sinhl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/e_sinhl.c Mon Dec 30 01:06:21 2013 (r260067) @@ -0,0 +1,131 @@ +/* from: FreeBSD: head/lib/msun/src/e_sinhl.c XXX */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * See e_sinh.c for complete comments. + * + * Converted to long double by Bruce D. Evans. + */ + +#include +#ifdef __i386__ +#include +#endif + +#include "fpmath.h" +#include "math.h" +#include "math_private.h" +#include "k_expl.h" + +#if LDBL_MAX_EXP != 0x4000 +/* We also require the usual expsign encoding. */ +#error "Unsupported long double format" +#endif + +#define BIAS (LDBL_MAX_EXP - 1) + +static const long double shuge = 0x1p16383L; +#if LDBL_MANT_DIG == 64 +/* + * Domain [-1, 1], range ~[-6.6749e-22, 6.6749e-22]: + * |sinh(x)/x - s(x)| < 2**-70.3 + */ +static const union IEEEl2bits +S3u = LD80C(0xaaaaaaaaaaaaaaaa, -3, 1.66666666666666666658e-1L); +#define S3 S3u.e +static const double +S5 = 8.3333333333333332e-3, /* 0x11111111111111.0p-59 */ +S7 = 1.9841269841270074e-4, /* 0x1a01a01a01a070.0p-65 */ +S9 = 2.7557319223873889e-6, /* 0x171de3a5565fe6.0p-71 */ +S11 = 2.5052108406704084e-8, /* 0x1ae6456857530f.0p-78 */ +S13 = 1.6059042748655297e-10, /* 0x161245fa910697.0p-85 */ +S15 = 7.6470006914396920e-13, /* 0x1ae7ce4eff2792.0p-93 */ +S17 = 2.8346142308424267e-15; /* 0x19882ce789ffc6.0p-101 */ +#elif LDBL_MANT_DIG == 113 +/* + * Domain [-1, 1], range ~[-2.9673e-36, 2.9673e-36]: + * |sinh(x)/x - s(x)| < 2**-118.0 + */ +static const long double +S3 = 1.66666666666666666666666666666666033e-1L, /* 0x1555555555555555555555555553b.0p-115L */ +S5 = 8.33333333333333333333333333337643193e-3L, /* 0x111111111111111111111111180f5.0p-119L */ +S7 = 1.98412698412698412698412697391263199e-4L, /* 0x1a01a01a01a01a01a01a0176aad11.0p-125L */ +S9 = 2.75573192239858906525574406205464218e-6L, /* 0x171de3a556c7338faac243aaa9592.0p-131L */ +S11 = 2.50521083854417187749675637460977997e-8L, /* 0x1ae64567f544e38fe59b3380d7413.0p-138L */ +S13 = 1.60590438368216146368737762431552702e-10L, /* 0x16124613a86d098059c7620850fc2.0p-145L */ +S15 = 7.64716373181980539786802470969096440e-13L, /* 0x1ae7f3e733b814193af09ce723043.0p-153L */ +S17 = 2.81145725434775409870584280722701574e-15L; /* 0x1952c77030c36898c3fd0b6dfc562.0p-161L */ +static const double +S19= 8.2206352435411005e-18, /* 0x12f49b4662b86d.0p-109 */ +S21= 1.9572943931418891e-20, /* 0x171b8f2fab9628.0p-118 */ +S23 = 3.8679983530666939e-23, /* 0x17617002b73afc.0p-127 */ +S25 = 6.5067867911512749e-26; /* 0x1423352626048a.0p-136 */ +#else +#error "Unsupported long double format" +#endif /* LDBL_MANT_DIG == 64 */ + +/* log(2**16385 - 0.5) rounded towards up: */ +static const float +o_threshold = 1.13572168e4; /* 0xb174de.0p-10 */ + +long double +sinhl(long double x) +{ + long double hi,lo,x2,x4; + double dx2,s; + int16_t ix,jx; + + GET_LDBL_EXPSIGN(jx,x); + ix = jx&0x7fff; + + /* x is INF or NaN */ + if(ix>=0x7fff) return x+x; + + ENTERI(); + + s = 1; + if (jx<0) s = -1; + + /* |x| < 64, return x, s(x), or accurate s*(exp(|x|)/2-1/exp(|x|)/2) */ + if (ix<0x4005) { /* |x|<64 */ + if (ix1) RETURNI(x); /* sinh(tiny) = tiny with inexact */ + if (ix<0x3fff) { /* |x|<1 */ + x2 = x*x; +#if LDBL_MANT_DIG == 64 + x4 = x2*x2; + RETURNI(((S17*x2 + S15)*x4 + (S13*x2 + S11))*(x2*x*x4*x4) + + ((S9*x2 + S7)*x2 + S5)*(x2*x*x2) + S3*(x2*x) + x); +#elif LDBL_MANT_DIG == 113 + dx2 = x2; + RETURNI(((((((((((S25*dx2 + S23)*dx2 + + S21)*x2 + S19)*x2 + + S17)*x2 + S15)*x2 + S13)*x2 + S11)*x2 + S9)*x2 + S7)*x2 + + S5)* (x2*x*x2) + + S3*(x2*x) + x); +#endif + } + k_hexpl(fabsl(x), &hi, &lo); + RETURNI(s*(lo - 0.25/(hi + lo) + hi)); + } + + /* |x| in [64, o_threshold], return correctly-overflowing s*exp(|x|)/2 */ + if (fabsl(x) <= o_threshold) + RETURNI(s*hexpl(fabsl(x))); + + /* |x| > o_threshold, sinh(x) overflow */ + return x*shuge; +} Modified: head/lib/msun/src/imprecise.c ============================================================================== --- head/lib/msun/src/imprecise.c Mon Dec 30 00:51:25 2013 (r260066) +++ head/lib/msun/src/imprecise.c Mon Dec 30 01:06:21 2013 (r260067) @@ -60,10 +60,7 @@ DECLARE_WEAK(powl); long double imprecise_ ## f ## l(long double v) { return f(v); }\ DECLARE_WEAK(f ## l) -DECLARE_IMPRECISE(cosh); DECLARE_IMPRECISE(erfc); DECLARE_IMPRECISE(erf); DECLARE_IMPRECISE(lgamma); -DECLARE_IMPRECISE(sinh); -DECLARE_IMPRECISE(tanh); DECLARE_IMPRECISE(tgamma); Modified: head/lib/msun/src/math.h ============================================================================== --- head/lib/msun/src/math.h Mon Dec 30 00:51:25 2013 (r260066) +++ head/lib/msun/src/math.h Mon Dec 30 01:06:21 2013 (r260067) @@ -451,6 +451,7 @@ long double atanl(long double); long double cbrtl(long double); long double ceill(long double); long double copysignl(long double, long double) __pure2; +long double coshl(long double); long double cosl(long double); long double exp2l(long double); long double expl(long double); @@ -488,8 +489,10 @@ long double rintl(long double); long double roundl(long double); long double scalblnl(long double, long); long double scalbnl(long double, int); +long double sinhl(long double); long double sinl(long double); long double sqrtl(long double); +long double tanhl(long double); long double tanl(long double); long double truncl(long double); @@ -510,13 +513,10 @@ __END_DECLS */ __BEGIN_DECLS -long double coshl(long double); long double erfcl(long double); long double erfl(long double); long double lgammal(long double); long double powl(long double, long double); -long double sinhl(long double); -long double tanhl(long double); long double tgammal(long double); __END_DECLS Modified: head/lib/msun/src/s_tanh.c ============================================================================== --- head/lib/msun/src/s_tanh.c Mon Dec 30 00:51:25 2013 (r260066) +++ head/lib/msun/src/s_tanh.c Mon Dec 30 01:06:21 2013 (r260067) @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); * only tanh(0)=0 is exact for finite argument. */ +#include + #include "math.h" #include "math_private.h" @@ -75,3 +77,7 @@ tanh(double x) } return (jx>=0)? z: -z; } + +#if (LDBL_MANT_DIG == 53) +__weak_reference(tanh, tanhl); +#endif Added: head/lib/msun/src/s_tanhl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/s_tanhl.c Mon Dec 30 01:06:21 2013 (r260067) @@ -0,0 +1,164 @@ +/* from: FreeBSD: head/lib/msun/src/s_tanhl.c XXX */ + +/* @(#)s_tanh.c 5.1 93/09/24 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * See s_tanh.c for complete comments. + * + * Converted to long double by Bruce D. Evans. + */ + +#include +#ifdef __i386__ +#include +#endif + +#include "math.h" +#include "math_private.h" +#include "fpmath.h" +#include "k_expl.h" + +#if LDBL_MAX_EXP != 0x4000 +/* We also require the usual expsign encoding. */ +#error "Unsupported long double format" +#endif + +#define BIAS (LDBL_MAX_EXP - 1) + +static const volatile double tiny = 1.0e-300; +static const double one = 1.0; +#if LDBL_MANT_DIG == 64 +/* + * Domain [-0.25, 0.25], range ~[-1.6304e-22, 1.6304e-22]: + * |tanh(x)/x - t(x)| < 2**-72.3 + */ +static const union IEEEl2bits +T3u = LD80C(0xaaaaaaaaaaaaaa9f, -2, -3.33333333333333333017e-1L); +#define T3 T3u.e +static const double +T5 = 1.3333333333333314e-1, /* 0x1111111111110a.0p-55 */ +T7 = -5.3968253968210485e-2, /* -0x1ba1ba1ba1a1a1.0p-57 */ +T9 = 2.1869488531393817e-2, /* 0x1664f488172022.0p-58 */ +T11 = -8.8632352345964591e-3, /* -0x1226e34bc138d5.0p-59 */ +T13 = 3.5921169709993771e-3, /* 0x1d6d371d3e400f.0p-61 */ +T15 = -1.4555786415756001e-3, /* -0x17d923aa63814d.0p-62 */ +T17 = 5.8645267876296793e-4, /* 0x13378589b85aa7.0p-63 */ +T19 = -2.1121033571392224e-4; /* -0x1baf0af80c4090.0p-65 */ +#elif LDBL_MANT_DIG == 113 +/* + * Domain [-0.25, 0.25], range ~[-2.4211e-37, 2.4211e-37]: + * |tanh(x)/x - t(x)| < 2**121.6 + */ +static const long double +T3 = -3.33333333333333333333333333333332980e-1L, /* -0x1555555555555555555555555554e.0p-114L */ +T5 = 1.33333333333333333333333333332707260e-1L, /* 0x1111111111111111111111110ab7b.0p-115L */ +T7 = -5.39682539682539682539682535723482314e-2L, /* -0x1ba1ba1ba1ba1ba1ba1ba17b5fc98.0p-117L */ +T9 = 2.18694885361552028218693591149061717e-2L, /* 0x1664f4882c10f9f32d6b1a12a25e5.0p-118L */ +T11 = -8.86323552990219656883762347736381851e-3L, /* -0x1226e355e6c23c8f5a5a0f386cb4d.0p-119L */ +T13 = 3.59212803657248101358314398220822722e-3L, /* 0x1d6d3d0e157ddfb403ad3637442c6.0p-121L */ +T15 = -1.45583438705131796512568010348874662e-3L; /* -0x17da36452b75e150c44cc34253b34.0p-122L */ +static const double +T17 = 5.9002744094556621e-4, /* 0x1355824803668e.0p-63 */ +T19 = -2.3912911424260516e-4, /* -0x1f57d7734c8dde.0p-65 */ +T21 = 9.6915379535512898e-5, /* 0x1967e18ad6a6ca.0p-66 */ +T23 = -3.9278322983156353e-5, /* -0x1497d8e6b75729.0p-67 */ +T25 = 1.5918887220143869e-5, /* 0x10b1319998cafa.0p-68 */ +T27 = -6.4514295231630956e-6, /* -0x1b0f2b71b218eb.0p-70 */ +T29 = 2.6120754043964365e-6, /* 0x15e963a3cf3a39.0p-71 */ +T31 = -1.0407567231003314e-6, /* -0x1176041e656869.0p-72 */ +T33 = 3.4744117554063574e-7; /* 0x1750fe732cab9c.0p-74 */ +#endif /* LDBL_MANT_DIG == 64 */ + +static inline long double +divl(long double a, long double b, long double c, long double d, + long double e, long double f) +{ + long double inv, r, w; + float fr, fw; + uint32_t hx; + + _2sumF(a, c); + b = b + c; + _2sumF(d, f); + e = e + f; + + inv = 1 / (d + e); + + r = (a + b) * inv; + fr = r; + r = fr; + + fw = d + e; + e = d - fw + e; + d = fw; + + r = r + (a - d * r + b - e * r) * inv; + + return r; +} + +long double +tanhl(long double x) +{ + long double hi,lo,s,x2,x4,z; + double dx2; + int16_t jx,ix; + + GET_LDBL_EXPSIGN(jx,x); + ix = jx&0x7fff; + + /* x is INF or NaN */ + if(ix>=0x7fff) { + if (jx>=0) return one/x+one; /* tanh(+-inf)=+-1 */ + else return one/x-one; /* tanh(NaN) = NaN */ + } + + ENTERI(); + + if (fabsl(x) < 40) { /* |x|<40 */ + if (__predict_false(ix= 40, return +-1 */ + } else { + z = one - tiny; /* raise inexact flag */ + } + s = 1; + if (jx<0) s = -1; + RETURNI(s*z); +} From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 01:16:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A19B5F5B; Mon, 30 Dec 2013 01:16:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 826411755; Mon, 30 Dec 2013 01:16:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU1GAhG062101; Mon, 30 Dec 2013 01:16:10 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU1G84X062090; Mon, 30 Dec 2013 01:16:08 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201312300116.rBU1G84X062090@svn.freebsd.org> From: Scott Long Date: Mon, 30 Dec 2013 01:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260068 - head/sbin/fsck_ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 01:16:10 -0000 Author: scottl Date: Mon Dec 30 01:16:08 2013 New Revision: 260068 URL: http://svnweb.freebsd.org/changeset/base/260068 Log: Add the -R option to allow fsck_ffs to restart itself when too many critical errors have been detected in a particular run. Clean up the global state variables so that a restart can happen correctly. Separate the global variables in fsck_ffs and fsdb to their own file. This fixes header sharing with fscd. Correctly initialize, static-ize, and remove global variables as needed in dir.c. This fixes a problem with lost+found directories that was causing a segfault. Correctly initialize, static-ize, and remove global variables as needed in suj.c. Initialize the suj globals before allocating the disk object, not after. Also ensure that 'preen' mode doesn't conflict with 'restart' mode Submitted by: scottl, max Reviewed by: max, mckusick (earlier version) Obtained from: Netflix MFC after: 3 days Modified: head/sbin/fsck_ffs/Makefile head/sbin/fsck_ffs/dir.c head/sbin/fsck_ffs/fsck.h head/sbin/fsck_ffs/fsck_ffs.8 head/sbin/fsck_ffs/fsutil.c head/sbin/fsck_ffs/main.c head/sbin/fsck_ffs/pass1.c head/sbin/fsck_ffs/pass1b.c head/sbin/fsck_ffs/suj.c head/sbin/fsck_ffs/utilities.c Modified: head/sbin/fsck_ffs/Makefile ============================================================================== --- head/sbin/fsck_ffs/Makefile Mon Dec 30 01:06:21 2013 (r260067) +++ head/sbin/fsck_ffs/Makefile Mon Dec 30 01:16:08 2013 (r260068) @@ -7,7 +7,8 @@ LINKS+= ${BINDIR}/fsck_ffs ${BINDIR}/fsc MAN= fsck_ffs.8 MLINKS= fsck_ffs.8 fsck_ufs.8 fsck_ffs.8 fsck_4.2bsd.8 SRCS= dir.c ea.c fsutil.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c \ - pass4.c pass5.c setup.c suj.c utilities.c gjournal.c getmntopts.c + pass4.c pass5.c setup.c suj.c utilities.c gjournal.c getmntopts.c \ + globs.c DPADD= ${LIBUFS} LDADD= -lufs WARNS?= 2 Modified: head/sbin/fsck_ffs/dir.c ============================================================================== --- head/sbin/fsck_ffs/dir.c Mon Dec 30 01:06:21 2013 (r260067) +++ head/sbin/fsck_ffs/dir.c Mon Dec 30 01:16:08 2013 (r260068) @@ -48,20 +48,14 @@ __FBSDID("$FreeBSD$"); #include "fsck.h" -const char *lfname = "lost+found"; -int lfmode = 0700; -struct dirtemplate emptydir = { +static struct dirtemplate emptydir = { 0, DIRBLKSIZ, DT_UNKNOWN, 0, "", 0, 0, DT_UNKNOWN, 0, "" }; -struct dirtemplate dirhead = { +static struct dirtemplate dirhead = { 0, 12, DT_DIR, 1, ".", 0, DIRBLKSIZ - 12, DT_DIR, 2, ".." }; -struct odirtemplate odirhead = { - 0, 12, 1, ".", - 0, DIRBLKSIZ - 12, 2, ".." -}; static int chgino(struct inodesc *); static int dircheck(struct inodesc *, struct direct *); @@ -133,6 +127,7 @@ dirscan(struct inodesc *idesc) (size_t)dsize); dirty(bp); sbdirty(); + rerun = 1; } if (n & STOP) return (n); Modified: head/sbin/fsck_ffs/fsck.h ============================================================================== --- head/sbin/fsck_ffs/fsck.h Mon Dec 30 01:06:21 2013 (r260067) +++ head/sbin/fsck_ffs/fsck.h Mon Dec 30 01:16:08 2013 (r260068) @@ -192,15 +192,15 @@ struct bufarea { "Inode Block", \ "Directory Contents", \ "User Data" } -long readcnt[BT_NUMBUFTYPES]; -long totalreadcnt[BT_NUMBUFTYPES]; -struct timespec readtime[BT_NUMBUFTYPES]; -struct timespec totalreadtime[BT_NUMBUFTYPES]; -struct timespec startprog; - -struct bufarea sblk; /* file system superblock */ -struct bufarea *pdirbp; /* current directory contents */ -struct bufarea *pbp; /* current inode block */ +extern long readcnt[BT_NUMBUFTYPES]; +extern long totalreadcnt[BT_NUMBUFTYPES]; +extern struct timespec readtime[BT_NUMBUFTYPES]; +extern struct timespec totalreadtime[BT_NUMBUFTYPES]; +extern struct timespec startprog; + +extern struct bufarea sblk; /* file system superblock */ +extern struct bufarea *pdirbp; /* current directory contents */ +extern struct bufarea *pbp; /* current inode block */ #define dirty(bp) do { \ if (fswritefd < 0) \ @@ -219,7 +219,7 @@ struct bufarea *pbp; /* current inode b #define sblock (*sblk.b_un.b_fs) enum fixstate {DONTKNOW, NOFIX, FIX, IGNORE}; -ino_t cursnapshot; +extern ino_t cursnapshot; struct inodesc { enum fixstate id_fix; /* policy on fixing errors */ @@ -282,63 +282,64 @@ struct inoinfo { u_int i_numblks; /* size of block array in bytes */ ufs2_daddr_t i_blks[1]; /* actually longer */ } **inphead, **inpsort; -long numdirs, dirhash, listmax, inplast; -long countdirs; /* number of directories we actually found */ +extern long numdirs, dirhash, listmax, inplast; +extern long countdirs; /* number of directories we actually found */ #define MIBSIZE 3 /* size of fsck sysctl MIBs */ -int adjrefcnt[MIBSIZE]; /* MIB command to adjust inode reference cnt */ -int adjblkcnt[MIBSIZE]; /* MIB command to adjust inode block count */ -int adjndir[MIBSIZE]; /* MIB command to adjust number of directories */ -int adjnbfree[MIBSIZE]; /* MIB command to adjust number of free blocks */ -int adjnifree[MIBSIZE]; /* MIB command to adjust number of free inodes */ -int adjnffree[MIBSIZE]; /* MIB command to adjust number of free frags */ -int adjnumclusters[MIBSIZE]; /* MIB command to adjust number of free clusters */ -int freefiles[MIBSIZE]; /* MIB command to free a set of files */ -int freedirs[MIBSIZE]; /* MIB command to free a set of directories */ -int freeblks[MIBSIZE]; /* MIB command to free a set of data blocks */ -struct fsck_cmd cmd; /* sysctl file system update commands */ -char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */ -char *cdevname; /* name of device being checked */ -long dev_bsize; /* computed value of DEV_BSIZE */ -long secsize; /* actual disk sector size */ -u_int real_dev_bsize; /* actual disk sector size, not overriden */ -char nflag; /* assume a no response */ -char yflag; /* assume a yes response */ -int bkgrdflag; /* use a snapshot to run on an active system */ -int bflag; /* location of alternate super block */ -int debug; /* output debugging info */ -int Eflag; /* delete empty data blocks */ -int Zflag; /* zero empty data blocks */ -int inoopt; /* trim out unused inodes */ -char ckclean; /* only do work if not cleanly unmounted */ -int cvtlevel; /* convert to newer file system format */ -int bkgrdcheck; /* determine if background check is possible */ -int bkgrdsumadj; /* whether the kernel have ability to adjust superblock summary */ -char usedsoftdep; /* just fix soft dependency inconsistencies */ -char preen; /* just fix normal inconsistencies */ -char rerun; /* rerun fsck. Only used in non-preen mode */ -int returntosingle; /* 1 => return to single user mode on exit */ -char resolved; /* cleared if unresolved changes => not clean */ -char havesb; /* superblock has been read */ -char skipclean; /* skip clean file systems if preening */ -int fsmodified; /* 1 => write done to file system */ -int fsreadfd; /* file descriptor for reading file system */ -int fswritefd; /* file descriptor for writing file system */ -int surrender; /* Give up if reads fail */ - -ufs2_daddr_t maxfsblock; /* number of blocks in the file system */ -char *blockmap; /* ptr to primary blk allocation map */ -ino_t maxino; /* number of inodes in file system */ - -ino_t lfdir; /* lost & found directory inode number */ -const char *lfname; /* lost & found directory name */ -int lfmode; /* lost & found directory creation mode */ +extern int adjrefcnt[MIBSIZE]; /* MIB command to adjust inode reference cnt */ +extern int adjblkcnt[MIBSIZE]; /* MIB command to adjust inode block count */ +extern int adjndir[MIBSIZE]; /* MIB command to adjust number of directories */ +extern int adjnbfree[MIBSIZE]; /* MIB command to adjust number of free blocks */ +extern int adjnifree[MIBSIZE]; /* MIB command to adjust number of free inodes */ +extern int adjnffree[MIBSIZE]; /* MIB command to adjust number of free frags */ +extern int adjnumclusters[MIBSIZE]; /* MIB command to adjust number of free clusters */ +extern int freefiles[MIBSIZE]; /* MIB command to free a set of files */ +extern int freedirs[MIBSIZE]; /* MIB command to free a set of directories */ +extern int freeblks[MIBSIZE]; /* MIB command to free a set of data blocks */ +extern struct fsck_cmd cmd; /* sysctl file system update commands */ +extern char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */ +extern char *cdevname; /* name of device being checked */ +extern long dev_bsize; /* computed value of DEV_BSIZE */ +extern long secsize; /* actual disk sector size */ +extern u_int real_dev_bsize; /* actual disk sector size, not overriden */ +extern char nflag; /* assume a no response */ +extern char yflag; /* assume a yes response */ +extern int bkgrdflag; /* use a snapshot to run on an active system */ +extern int bflag; /* location of alternate super block */ +extern int debug; /* output debugging info */ +extern int Eflag; /* delete empty data blocks */ +extern int Zflag; /* zero empty data blocks */ +extern int inoopt; /* trim out unused inodes */ +extern char ckclean; /* only do work if not cleanly unmounted */ +extern int cvtlevel; /* convert to newer file system format */ +extern int bkgrdcheck; /* determine if background check is possible */ +extern int bkgrdsumadj; /* whether the kernel have ability to adjust superblock summary */ +extern char usedsoftdep; /* just fix soft dependency inconsistencies */ +extern char preen; /* just fix normal inconsistencies */ +extern char rerun; /* rerun fsck. Only used in non-preen mode */ +extern int returntosingle; /* 1 => return to single user mode on exit */ +extern char resolved; /* cleared if unresolved changes => not clean */ +extern char havesb; /* superblock has been read */ +extern char skipclean; /* skip clean file systems if preening */ +extern int fsmodified; /* 1 => write done to file system */ +extern int fsreadfd; /* file descriptor for reading file system */ +extern int fswritefd; /* file descriptor for writing file system */ +extern int surrender; /* Give up if reads fail */ +extern int wantrestart; /* Restart fsck on early termination */ + +extern ufs2_daddr_t maxfsblock; /* number of blocks in the file system */ +extern char *blockmap; /* ptr to primary blk allocation map */ +extern ino_t maxino; /* number of inodes in file system */ + +extern ino_t lfdir; /* lost & found directory inode number */ +extern const char *lfname; /* lost & found directory name */ +extern int lfmode; /* lost & found directory creation mode */ -ufs2_daddr_t n_blks; /* number of blocks in use */ -ino_t n_files; /* number of files in use */ +extern ufs2_daddr_t n_blks; /* number of blocks in use */ +extern ino_t n_files; /* number of files in use */ -volatile sig_atomic_t got_siginfo; /* received a SIGINFO */ -volatile sig_atomic_t got_sigalarm; /* received a SIGALRM */ +extern volatile sig_atomic_t got_siginfo; /* received a SIGINFO */ +extern volatile sig_atomic_t got_sigalarm; /* received a SIGALRM */ #define clearinode(dp) \ if (sblock.fs_magic == FS_UFS1_MAGIC) { \ @@ -346,8 +347,8 @@ volatile sig_atomic_t got_sigalarm; /* r } else { \ (dp)->dp2 = ufs2_zino; \ } -struct ufs1_dinode ufs1_zino; -struct ufs2_dinode ufs2_zino; +extern struct ufs1_dinode ufs1_zino; +extern struct ufs2_dinode ufs2_zino; #define setbmap(blkno) setbit(blockmap, blkno) #define testbmap(blkno) isset(blockmap, blkno) @@ -360,6 +361,7 @@ struct ufs2_dinode ufs2_zino; #define FOUND 0x10 #define EEXIT 8 /* Standard error exit. */ +#define ERESTART -1 int flushentry(void); /* @@ -428,6 +430,7 @@ void flush(int fd, struct bufarea *bp); void freeblk(ufs2_daddr_t blkno, long frags); void freeino(ino_t ino); void freeinodebuf(void); +void fsutilinit(void); int ftypeok(union dinode *dp); void getblk(struct bufarea *bp, ufs2_daddr_t blk, long size); struct bufarea *cgget(int cg); @@ -466,5 +469,6 @@ int setup(char *dev); void gjournal_check(const char *filesys); int suj_check(const char *filesys); void update_maps(struct cg *, struct cg*, int); +void fsckinit(void); #endif /* !_FSCK_H_ */ Modified: head/sbin/fsck_ffs/fsck_ffs.8 ============================================================================== --- head/sbin/fsck_ffs/fsck_ffs.8 Mon Dec 30 01:06:21 2013 (r260067) +++ head/sbin/fsck_ffs/fsck_ffs.8 Mon Dec 30 01:16:08 2013 (r260068) @@ -38,7 +38,7 @@ .Nd file system consistency check and interactive repair .Sh SYNOPSIS .Nm -.Op Fl BEFfnpryZ +.Op Fl BEFfnpRryZ .Op Fl b Ar block .Op Fl c Ar level .Op Fl m Ar mode @@ -266,6 +266,11 @@ which is assumed to be affirmative; do not open the file system for writing. .It Fl p Preen file systems (see above). +.It Fl R +Instruct fsck_ffs to restart itself if it encounters certain errors that +warrant another run. It will limit itself to a maximum of 10 restarts +in a given run in order to avoid an endless loop with extremely corrupted +filesystems. .It Fl r Free up excess unused inodes. Decreasing the number of preallocated inodes reduces the Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Mon Dec 30 01:06:21 2013 (r260067) +++ head/sbin/fsck_ffs/fsutil.c Mon Dec 30 01:16:08 2013 (r260068) @@ -74,6 +74,25 @@ static struct bufarea cgblk; /* backup b static TAILQ_HEAD(buflist, bufarea) bufhead; /* head of buffer cache list */ static int numbufs; /* size of buffer cache */ static char *buftype[BT_NUMBUFTYPES] = BT_NAMES; +static struct bufarea *cgbufs; /* header for cylinder group cache */ +static int flushtries; /* number of tries to reclaim memory */ + +void +fsutilinit(void) +{ + diskreads = totaldiskreads = totalreads = 0; + bzero(&startpass, sizeof(struct timespec)); + bzero(&finishpass, sizeof(struct timespec)); + bzero(&slowio_starttime, sizeof(struct timeval)); + slowio_delay_usec = 10000; + slowio_pollcnt = 0; + bzero(&cgblk, sizeof(struct bufarea)); + TAILQ_INIT(&bufhead); + numbufs = 0; + /* buftype ? */ + cgbufs = NULL; + flushtries = 0; +} int ftypeok(union dinode *dp) Modified: head/sbin/fsck_ffs/main.c ============================================================================== --- head/sbin/fsck_ffs/main.c Mon Dec 30 01:06:21 2013 (r260067) +++ head/sbin/fsck_ffs/main.c Mon Dec 30 01:16:08 2013 (r260068) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); #include "fsck.h" +int restarts; + static void usage(void) __dead2; static int argtoi(int flag, const char *req, const char *str, int base); static int checkfilesys(char *filesys); @@ -82,7 +84,7 @@ main(int argc, char *argv[]) sync(); skipclean = 1; inoopt = 0; - while ((ch = getopt(argc, argv, "b:Bc:CdEfFm:nprSyZ")) != -1) { + while ((ch = getopt(argc, argv, "b:Bc:CdEfFm:npRrSyZ")) != -1) { switch (ch) { case 'b': skipclean = 0; @@ -138,6 +140,9 @@ main(int argc, char *argv[]) ckclean++; break; + case 'R': + wantrestart = 1; + break; case 'r': inoopt++; break; @@ -186,8 +191,12 @@ main(int argc, char *argv[]) rlimit.rlim_cur = rlimit.rlim_max; (void)setrlimit(RLIMIT_DATA, &rlimit); } - while (argc-- > 0) - (void)checkfilesys(*argv++); + while (argc > 0) { + if (checkfilesys(*argv) == ERESTART) + continue; + argc--; + argv++; + } if (returntosingle) ret = 2; @@ -228,6 +237,8 @@ checkfilesys(char *filesys) iov = NULL; iovlen = 0; errmsg[0] = '\0'; + fsutilinit(); + fsckinit(); cdevname = filesys; if (debug && ckclean) @@ -550,8 +561,12 @@ checkfilesys(char *filesys) inostathead = NULL; if (fsmodified && !preen) printf("\n***** FILE SYSTEM WAS MODIFIED *****\n"); - if (rerun) + if (rerun) { + if (wantrestart && (restarts++ < 10) && + (preen || reply("RESTART"))) + return (ERESTART); printf("\n***** PLEASE RERUN FSCK *****\n"); + } if (chkdoreload(mntp) != 0) { if (!fsmodified) return (0); @@ -654,3 +669,15 @@ usage(void) getprogname()); exit(1); } + +void +infohandler(int sig __unused) +{ + got_siginfo = 1; +} + +void +alarmhandler(int sig __unused) +{ + got_sigalarm = 1; +} Modified: head/sbin/fsck_ffs/pass1.c ============================================================================== --- head/sbin/fsck_ffs/pass1.c Mon Dec 30 01:06:21 2013 (r260067) +++ head/sbin/fsck_ffs/pass1.c Mon Dec 30 01:16:08 2013 (r260068) @@ -68,6 +68,8 @@ pass1(void) u_int8_t *cp; int c, rebuildcg; + badblk = dupblk = lastino = 0; + /* * Set file system reserved blocks in used block map. */ @@ -463,6 +465,7 @@ pass1check(struct inodesc *idesc) ckfini(0); exit(EEXIT); } + rerun = 1; return (STOP); } } @@ -483,6 +486,7 @@ pass1check(struct inodesc *idesc) ckfini(0); exit(EEXIT); } + rerun = 1; return (STOP); } new = (struct dups *)Malloc(sizeof(struct dups)); @@ -492,6 +496,7 @@ pass1check(struct inodesc *idesc) ckfini(0); exit(EEXIT); } + rerun = 1; return (STOP); } new->dup = blkno; Modified: head/sbin/fsck_ffs/pass1b.c ============================================================================== --- head/sbin/fsck_ffs/pass1b.c Mon Dec 30 01:06:21 2013 (r260067) +++ head/sbin/fsck_ffs/pass1b.c Mon Dec 30 01:16:08 2013 (r260068) @@ -80,8 +80,10 @@ pass1b(void) continue; idesc.id_number = inumber; if (inoinfo(inumber)->ino_state != USTATE && - (ckinode(dp, &idesc) & STOP)) + (ckinode(dp, &idesc) & STOP)) { + rerun = 1; return; + } } } } @@ -106,8 +108,10 @@ pass1bcheck(struct inodesc *idesc) if (dlp == muldup) break; } - if (muldup == 0 || duphead == muldup->next) + if (muldup == 0 || duphead == muldup->next) { + rerun = 1; return (STOP); + } } return (res); } Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Mon Dec 30 01:06:21 2013 (r260067) +++ head/sbin/fsck_ffs/suj.c Mon Dec 30 01:16:08 2013 (r260068) @@ -125,26 +125,26 @@ struct suj_cg { int sc_cgx; }; -LIST_HEAD(cghd, suj_cg) cghash[SUJ_HASHSIZE]; -LIST_HEAD(dblkhd, data_blk) dbhash[SUJ_HASHSIZE]; -struct suj_cg *lastcg; -struct data_blk *lastblk; +static LIST_HEAD(cghd, suj_cg) cghash[SUJ_HASHSIZE]; +static LIST_HEAD(dblkhd, data_blk) dbhash[SUJ_HASHSIZE]; +static struct suj_cg *lastcg; +static struct data_blk *lastblk; -TAILQ_HEAD(seghd, suj_seg) allsegs; -uint64_t oldseq; +static TAILQ_HEAD(seghd, suj_seg) allsegs; +static uint64_t oldseq; static struct uufsd *disk = NULL; static struct fs *fs = NULL; -ino_t sujino; +static ino_t sujino; /* * Summary statistics. */ -uint64_t freefrags; -uint64_t freeblocks; -uint64_t freeinos; -uint64_t freedir; -uint64_t jbytes; -uint64_t jrecs; +static uint64_t freefrags; +static uint64_t freeblocks; +static uint64_t freeinos; +static uint64_t freedir; +static uint64_t jbytes; +static uint64_t jrecs; static jmp_buf jmpbuf; @@ -155,6 +155,7 @@ static void ino_decr(ino_t); static void ino_adjust(struct suj_ino *); static void ino_build(struct suj_ino *); static int blk_isfree(ufs2_daddr_t); +static void initsuj(void); static void * errmalloc(size_t n) @@ -2413,7 +2414,7 @@ struct jextent { int je_blocks; /* Disk block count. */ }; -struct jblocks *suj_jblocks; +static struct jblocks *suj_jblocks; static struct jblocks * jblocks_create(void) @@ -2673,8 +2674,8 @@ suj_check(const char *filesys) struct suj_seg *seg; struct suj_seg *segn; + initsuj(); opendisk(filesys); - TAILQ_INIT(&allsegs); /* * Set an exit point when SUJ check failed @@ -2763,3 +2764,28 @@ suj_check(const char *filesys) return (0); } + +static void +initsuj(void) +{ + int i; + + for (i = 0; i < SUJ_HASHSIZE; i++) { + LIST_INIT(&cghash[i]); + LIST_INIT(&dbhash[i]); + } + lastcg = NULL; + lastblk = NULL; + TAILQ_INIT(&allsegs); + oldseq = 0; + disk = NULL; + fs = NULL; + sujino = 0; + freefrags = 0; + freeblocks = 0; + freeinos = 0; + freedir = 0; + jbytes = 0; + jrecs = 0; + suj_jblocks = NULL; +} Modified: head/sbin/fsck_ffs/utilities.c ============================================================================== --- head/sbin/fsck_ffs/utilities.c Mon Dec 30 01:06:21 2013 (r260067) +++ head/sbin/fsck_ffs/utilities.c Mon Dec 30 01:16:08 2013 (r260068) @@ -108,14 +108,3 @@ retry: return (origname); } -void -infohandler(int sig __unused) -{ - got_siginfo = 1; -} - -void -alarmhandler(int sig __unused) -{ - got_sigalarm = 1; -} From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 01:17:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B4C8139; Mon, 30 Dec 2013 01:17:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1770B175F; Mon, 30 Dec 2013 01:17:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU1H5x1062237; Mon, 30 Dec 2013 01:17:05 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU1H5xm062236; Mon, 30 Dec 2013 01:17:05 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201312300117.rBU1H5xm062236@svn.freebsd.org> From: Scott Long Date: Mon, 30 Dec 2013 01:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260069 - head/sbin/fsdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 01:17:06 -0000 Author: scottl Date: Mon Dec 30 01:17:05 2013 New Revision: 260069 URL: http://svnweb.freebsd.org/changeset/base/260069 Log: Add globs.c to the build now that it's a separate file. Reviewed by: max Obtained from: Netflix MFC after: 3 days Modified: head/sbin/fsdb/Makefile Modified: head/sbin/fsdb/Makefile ============================================================================== --- head/sbin/fsdb/Makefile Mon Dec 30 01:16:08 2013 (r260068) +++ head/sbin/fsdb/Makefile Mon Dec 30 01:17:05 2013 (r260069) @@ -6,7 +6,7 @@ PROG= fsdb MAN= fsdb.8 SRCS= fsdb.c fsdbutil.c \ dir.c ea.c fsutil.c inode.c pass1.c pass1b.c pass2.c pass3.c pass4.c \ - pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c + pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c globs.c CFLAGS+= -I${.CURDIR}/../fsck_ffs WARNS?= 2 LDADD= -ledit -ltermcap From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 01:32:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CCC2551; Mon, 30 Dec 2013 01:32:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ED3E4186E; Mon, 30 Dec 2013 01:32:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU1WHqJ068936; Mon, 30 Dec 2013 01:32:17 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU1WH7H068933; Mon, 30 Dec 2013 01:32:17 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201312300132.rBU1WH7H068933@svn.freebsd.org> From: Scott Long Date: Mon, 30 Dec 2013 01:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260070 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 01:32:18 -0000 Author: scottl Date: Mon Dec 30 01:32:17 2013 New Revision: 260070 URL: http://svnweb.freebsd.org/changeset/base/260070 Log: Multi-queue NIC drivers and multi-port lagg tend to use the same lower bits of the flowid as each other, resulting in a poor distribution of packets among queues in certain cases. Work around this by adding a set of sysctls for controlling a bit-shift on the flowid when doing multi-port aggrigation in lagg and lacp. By default, lagg/lacp will now use bits 16 and higher instead of 0 and higher. Reviewed by: max Obtained from: Netflix MFC after: 3 days Modified: head/sys/net/ieee8023ad_lacp.c head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Mon Dec 30 01:17:05 2013 (r260069) +++ head/sys/net/ieee8023ad_lacp.c Mon Dec 30 01:32:17 2013 (r260070) @@ -877,7 +877,7 @@ lacp_select_tx_port(struct lagg_softc *s } if (sc->use_flowid && (m->m_flags & M_FLOWID)) - hash = m->m_pkthdr.flowid; + hash = m->m_pkthdr.flowid >> sc->flowid_shift; else hash = lagg_hashmbuf(sc, m, lsc->lsc_hashkey); hash %= pm->pm_count; Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Mon Dec 30 01:17:05 2013 (r260069) +++ head/sys/net/if_lagg.c Mon Dec 30 01:32:17 2013 (r260070) @@ -184,6 +184,11 @@ TUNABLE_INT("net.link.lagg.default_use_f SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RW, &def_use_flowid, 0, "Default setting for using flow id for load sharing"); +static int def_flowid_shift = 16; /* Default value for using M_FLOWID */ +TUNABLE_INT("net.link.lagg.default_flowid_shift", &def_flowid_shift); +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, CTLFLAG_RW, + &def_flowid_shift, 0, + "Default setting for flowid shift for load sharing"); static int lagg_modevent(module_t mod, int type, void *data) @@ -293,12 +298,17 @@ lagg_clone_create(struct if_clone *ifc, sysctl_ctx_init(&sc->ctx); snprintf(num, sizeof(num), "%u", unit); sc->use_flowid = def_use_flowid; + sc->flowid_shift = def_flowid_shift; sc->sc_oid = oid = SYSCTL_ADD_NODE(&sc->ctx, &SYSCTL_NODE_CHILDREN(_net_link, lagg), OID_AUTO, num, CTLFLAG_RD, NULL, ""); SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "use_flowid", CTLTYPE_INT|CTLFLAG_RW, &sc->use_flowid, sc->use_flowid, - "Use flow id for load sharing"); + "use_flowid", CTLTYPE_INT|CTLFLAG_RW, &sc->use_flowid, + sc->use_flowid, "Use flow id for load sharing"); + SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "flowid_shift", CTLTYPE_INT|CTLFLAG_RW, &sc->flowid_shift, + sc->flowid_shift, + "Shift flowid bits to prevent multiqueue collisions"); SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "count", CTLTYPE_INT|CTLFLAG_RD, &sc->sc_count, sc->sc_count, "Total number of ports"); @@ -1850,7 +1860,7 @@ lagg_lb_start(struct lagg_softc *sc, str uint32_t p = 0; if (sc->use_flowid && (m->m_flags & M_FLOWID)) - p = m->m_pkthdr.flowid; + p = m->m_pkthdr.flowid >> sc->flowid_shift; else p = lagg_hashmbuf(sc, m, lb->lb_key); p %= sc->sc_count; Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Mon Dec 30 01:17:05 2013 (r260069) +++ head/sys/net/if_lagg.h Mon Dec 30 01:32:17 2013 (r260070) @@ -231,6 +231,7 @@ struct lagg_softc { struct sysctl_ctx_list ctx; /* sysctl variables */ struct sysctl_oid *sc_oid; /* sysctl tree oid */ int use_flowid; /* use M_FLOWID */ + int flowid_shift; /* shift the flowid */ }; struct lagg_port { From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 01:41:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9890A892 for ; Mon, 30 Dec 2013 01:41:32 +0000 (UTC) Received: from nm15-vm6.bullet.mail.ne1.yahoo.com (nm15-vm6.bullet.mail.ne1.yahoo.com [98.138.91.108]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1BB1818EE for ; Mon, 30 Dec 2013 01:41:31 +0000 (UTC) Received: from [98.138.101.129] by nm15.bullet.mail.ne1.yahoo.com with NNFMP; 30 Dec 2013 01:36:04 -0000 Received: from [98.138.84.41] by tm17.bullet.mail.ne1.yahoo.com with NNFMP; 30 Dec 2013 01:36:04 -0000 Received: from [127.0.0.1] by smtp109.mail.ne1.yahoo.com with NNFMP; 30 Dec 2013 01:36:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1388367364; bh=chi1UUPnrgDPi7VEOCjCbGGLN6TSyPiG/t+DbMjylnE=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=EYw2Xx2VRI6pSNHEy2xSKMTNEUhH1FbA6Z7g9P+pT3BkG9d4DVoNpqsU3jLL9ZWNQgosuoW5USO4Rg/WC0s/8gxJn6kgnBfIUpwfGH2+y5u72dUugG+K76azqdEcGqhXmLSksRIHiyWK+qDpYZzM6m7Kmibw3zE7FidYb8jvWB0= X-Yahoo-Newman-Id: 156983.82151.bm@smtp109.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: eCLRElsVM1kVXLDu3WZeqtkazabaETkY2_YAwhGNDFl0uP1 fzhn5VhXc__jVJGV8w400S3BU1hqqxpD0KjoCLGcLmSNkXWmvbos2jJzQ4KM E9v6.XqQhkfze6Hd0kNnlL2FRVDboHROpNxFdZY7JW0yrjr0deUjyrhiuJHT dp70N8PUr7Gd9KEITijw7seAMN0Ght1v.jxYUKPx_PUs0pSyepLz0YEVAT4w tZbeUXVykzyErASMc4oAj8JoAjf.YIWnMzOIwP1LaLnViJHXPY4o.9p6hiGt MG8kdSp2E8pZBFyX6r9LCx.Kcoy0OgWJVcrD6bZvE6SoyKRvfDpm_5OiWAvt .MpkmB9HvuiDGN7pXwsdACfTrO9eOUeCn6uu92RtIakXv8Q_m_ocr2KKX.hu ea1nroO_3MfvC_rp7aEiWVHOaaQ_GxmPcX0ih2vt6qzjEen1m5Hal2yeBLz7 JwWGreN97KmXeDZKunisNYLno4y5Qr32yexf5zofBkw0WGVOR3RmiX1beYjS wv4Qyw4vrDty0fS8en_kRzDFoDmufUs5oClFhgKprd0fPt_4Z9BWvVz6CAwM h1amq8uMF0Ta2gQ-- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- X-Rocket-Received: from lglt-nvaradarajan.corp.netflix.com (scott4long@69.53.236.251 with plain [98.139.211.125]) by smtp109.mail.ne1.yahoo.com with SMTP; 29 Dec 2013 17:36:04 -0800 PST Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r259896 - head/sys/dev/cxgb/common From: Scott Long In-Reply-To: <20131229212825.GE99167@funkthat.com> Date: Sun, 29 Dec 2013 18:35:59 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <7E3BD20D-C9EB-46B4-8744-D7F99100E408@yahoo.com> References: <201312252245.rBPMjX5J046556@svn.freebsd.org> <76C5CECF-1A27-4245-B5D1-335C46B253E7@FreeBSD.org> <52C08B47.70106@FreeBSD.org> <20131229212825.GE99167@funkthat.com> To: John-Mark Gurney , Pedro Giffuni , Adrian Chadd , Dimitry Andric X-Mailer: Apple Mail (2.1827) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 01:41:32 -0000 On Dec 29, 2013, at 2:28 PM, John-Mark Gurney wrote: > Pedro Giffuni wrote this message on Sun, Dec 29, 2013 at 15:51 -0500: >> On 26.12.2013 06:13, Dimitry Andric wrote: >>> On 26 Dec 2013, at 02:51, Adrian Chadd wrote: >>>> I'd prefer you didn't remove unused code in drivers like this. If = you >>>> must, #if 0 them out. >>> I don't mind either way, but some other people are very much opposed = to >>> littering code with #if 0'd sections. So, how do to determine what = is >>> right in each situation? :-) >>>=20 >>=20 >> FWIW, I am also in favor of removing instead of #if 0. >> If we really need the code back, we have subversion for that. >>=20 >> I guess an exception would be on contributed code, where one >> still wants to keep things similar. >>=20 >> Just my 0.02$, no strong feelings about either way. >=20 > My vote for code like this to #if 0 it out.. The reason being is > that this is generic hardware register access, and it's likely that > if it is removed and someone needs it, they'll write their own > instead of dig it out of history, since they might not even realize > that it even existed... >=20 > Though can't we annotate it as unused? Since it is static inline, the > compiler should end up not including it in the object. >=20 Since it=92s code that has an active maintainer, why not ask him instead of pretending that all of our opinions are more important? Scott From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 02:19:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5690FC9F; Mon, 30 Dec 2013 02:19:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 36D801A96; Mon, 30 Dec 2013 02:19:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU2JNch084657; Mon, 30 Dec 2013 02:19:23 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU2JNdV084656; Mon, 30 Dec 2013 02:19:23 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312300219.rBU2JNdV084656@svn.freebsd.org> From: Glen Barber Date: Mon, 30 Dec 2013 02:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260071 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 02:19:24 -0000 Author: gjb Date: Mon Dec 30 02:19:23 2013 New Revision: 260071 URL: http://svnweb.freebsd.org/changeset/base/260071 Log: MFC r259868, r259881, 259955: r259868 (jmmv): Delay copying of resolv.conf into the chroot until /etc exists. r259881 (jmmv): Put the release objdir inside the chroot. 259955: Move build_doc_ports() to the if...fi block from which it is called. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/release.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Mon Dec 30 01:32:17 2013 (r260070) +++ stable/10/release/release.sh Mon Dec 30 02:19:23 2013 (r260071) @@ -126,6 +126,7 @@ if [ "x${TARGET}" != "x" ] && [ "x${TARG else ARCH_FLAGS= fi +CHROOT_MAKEENV="MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}" CHROOT_IMAKEFLAGS="${CONF_FILES}" CHROOT_DMAKEFLAGS="${CONF_FILES}" @@ -162,29 +163,16 @@ if [ "x${NOPORTS}" = "x" ]; then svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports fi -cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf cd ${CHROOTDIR}/usr/src -make ${CHROOT_WMAKEFLAGS} buildworld -make ${CHROOT_IMAKEFLAGS} installworld DESTDIR=${CHROOTDIR} -make ${CHROOT_DMAKEFLAGS} distribution DESTDIR=${CHROOTDIR} +env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld +env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \ + DESTDIR=${CHROOTDIR} +env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \ + DESTDIR=${CHROOTDIR} mount -t devfs devfs ${CHROOTDIR}/dev +cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit -build_doc_ports() { - # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints - # is created. This is needed by ports-mgmt/pkg. - chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart - - ## Trick the ports 'run-autotools-fixup' target to do the right thing. - _OSVERSION=$(sysctl -n kern.osreldate) - if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then - PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" - PBUILD_FLAGS="${PBUILD_FLAGS}" - chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ - ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean - fi -} - # If MAKE_CONF and/or SRC_CONF are set and not character devices (/dev/null), # copy them to the chroot. if [ -e ${MAKE_CONF} ] && [ ! -c ${MAKE_CONF} ]; then @@ -197,7 +185,18 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CO fi if [ -d ${CHROOTDIR}/usr/ports ]; then - build_doc_ports ${CHROOTDIR} + # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints + # is created. This is needed by ports-mgmt/pkg. + chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart + + ## Trick the ports 'run-autotools-fixup' target to do the right thing. + _OSVERSION=$(sysctl -n kern.osreldate) + if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS}" + chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ + ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean + fi fi if [ "x${RELSTRING}" = "x" ]; then From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 02:19:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13C7EDCD; Mon, 30 Dec 2013 02:19:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B22FC1A99; Mon, 30 Dec 2013 02:19:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU2JmxL084728; Mon, 30 Dec 2013 02:19:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU2Jmab084726; Mon, 30 Dec 2013 02:19:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312300219.rBU2Jmab084726@svn.freebsd.org> From: Glen Barber Date: Mon, 30 Dec 2013 02:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260072 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 02:19:49 -0000 Author: gjb Date: Mon Dec 30 02:19:48 2013 New Revision: 260072 URL: http://svnweb.freebsd.org/changeset/base/260072 Log: MFC r254293, r259868, r259881, 259955: r254293: - Only set ARCH_FLAGS (TARGET/TARGET_ARCH) if specified, otherwise allow the toolchain to detect the correct values. - Remove {SRC,DOC,PORT}REVISION variables, and use 'branch@rNNNNNN' as the {SRC,DOC,PORT}BRANCH variables. - Only set default KERNEL_FLAGS and WORLD_FLAGS make(1) jobs if the number of CPUs is greater than 1. r259868 (jmmv): Delay copying of resolv.conf into the chroot until /etc exists. r259881 (jmmv): Put the release objdir inside the chroot. 259955: Move build_doc_ports() to the if...fi block from which it is called. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/release.conf.sample stable/9/release/release.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/release.conf.sample ============================================================================== --- stable/9/release/release.conf.sample Mon Dec 30 02:19:23 2013 (r260071) +++ stable/9/release/release.conf.sample Mon Dec 30 02:19:48 2013 (r260072) @@ -10,18 +10,13 @@ CHROOTDIR="/scratch" SVNROOT="svn://svn.FreeBSD.org" ## Set the src/, ports/, and doc/ branches or tags. -SRCBRANCH="base/stable/9" -DOCBRANCH="doc/head" -PORTBRANCH="ports/head" +SRCBRANCH="base/stable/9@rHEAD" +DOCBRANCH="doc/head@rHEAD" +PORTBRANCH="ports/head@rHEAD" ## Run svn co --force for src checkout. #SRC_FORCE_CHECKOUT=yes -## Set the src/, ports/, and doc/ revisions. -SRCREVISION="-rHEAD" -DOCREVISION="-rHEAD" -PORTREVISION="-rHEAD" - ## Set to override the default target architecture. #TARGET="amd64" #TARGET_ARCH="amd64" Modified: stable/9/release/release.sh ============================================================================== --- stable/9/release/release.sh Mon Dec 30 02:19:23 2013 (r260071) +++ stable/9/release/release.sh Mon Dec 30 02:19:48 2013 (r260072) @@ -41,19 +41,14 @@ CHROOTDIR="/scratch" # The default svn checkout server, and svn branches for src/, doc/, # and ports/. SVNROOT="svn://svn.freebsd.org" -SRCBRANCH="base/head" -DOCBRANCH="doc/head" -PORTBRANCH="ports/head" +SRCBRANCH="base/head@rHEAD" +DOCBRANCH="doc/head@rHEAD" +PORTBRANCH="ports/head@rHEAD" # Sometimes one needs to checkout src with --force svn option. # If custom kernel configs copied to src tree before checkout, e.g. SRC_FORCE_CHECKOUT= -# The default src/, doc/, and ports/ revisions. -SRCREVISION="-rHEAD" -DOCREVISION="-rHEAD" -PORTREVISION="-rHEAD" - # The default make.conf and src.conf to use. Set to /dev/null # by default to avoid polluting the chroot(8) environment with # non-default settings. @@ -62,17 +57,16 @@ SRC_CONF="/dev/null" # The number of make(1) jobs, defaults to the number of CPUs available for # buildworld, and half of number of CPUs available for buildkernel. -WORLD_FLAGS="-j$(sysctl -n hw.ncpu)" -KERNEL_FLAGS="-j$(expr $(sysctl -n hw.ncpu) / 2)" +NCPU=$(sysctl -n hw.ncpu) +if [ ${NCPU} -gt 1 ]; then + WORLD_FLAGS="-j${NCPU}" + KERNEL_FLAGS="-j$(expr ${NCPU} / 2)" +fi MAKE_FLAGS="-s" # The name of the kernel to build, defaults to GENERIC. KERNEL="GENERIC" -# The TARGET and TARGET_ARCH to build, defaults to the running system. -TARGET="$(uname -p)" -TARGET_ARCH="${TARGET}" - # Set to non-empty value to disable checkout of doc/ and/or ports/. Disabling # ports/ checkout also forces NODOC to be set. NODOC= @@ -127,7 +121,12 @@ fi # this file, unless overridden by release.conf. In most cases, these # will not need to be changed. CONF_FILES="__MAKE_CONF=${MAKE_CONF} SRCCONF=${SRC_CONF}" -ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" +if [ "x${TARGET}" != "x" ] && [ "x${TARGET_ARCH}" != "x" ]; then + ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" +else + ARCH_FLAGS= +fi +CHROOT_MAKEENV="MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}" CHROOT_IMAKEFLAGS="${CONF_FILES}" CHROOT_DMAKEFLAGS="${CONF_FILES}" @@ -156,37 +155,24 @@ set -e # Everything must succeed mkdir -p ${CHROOTDIR}/usr -svn co ${FORCE_SRC_KEY} ${SVNROOT}/${SRCBRANCH} ${CHROOTDIR}/usr/src $SRCREVISION +svn co ${FORCE_SRC_KEY} ${SVNROOT}/${SRCBRANCH} ${CHROOTDIR}/usr/src if [ "x${NODOC}" = "x" ]; then - svn co ${SVNROOT}/${DOCBRANCH} ${CHROOTDIR}/usr/doc $DOCREVISION + svn co ${SVNROOT}/${DOCBRANCH} ${CHROOTDIR}/usr/doc fi if [ "x${NOPORTS}" = "x" ]; then - svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports $PORTREVISION + svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports fi -cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf cd ${CHROOTDIR}/usr/src -make ${CHROOT_WMAKEFLAGS} buildworld -make ${CHROOT_IMAKEFLAGS} installworld DESTDIR=${CHROOTDIR} -make ${CHROOT_DMAKEFLAGS} distribution DESTDIR=${CHROOTDIR} +env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld +env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \ + DESTDIR=${CHROOTDIR} +env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \ + DESTDIR=${CHROOTDIR} mount -t devfs devfs ${CHROOTDIR}/dev +cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit -build_doc_ports() { - # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints - # is created. This is needed by ports-mgmt/pkg. - chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart - - ## Trick the ports 'run-autotools-fixup' target to do the right thing. - _OSVERSION=$(sysctl -n kern.osreldate) - if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then - PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" - PBUILD_FLAGS="${PBUILD_FLAGS}" - chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ - ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean - fi -} - # If MAKE_CONF and/or SRC_CONF are set and not character devices (/dev/null), # copy them to the chroot. if [ -e ${MAKE_CONF} ] && [ ! -c ${MAKE_CONF} ]; then @@ -199,7 +185,18 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CO fi if [ -d ${CHROOTDIR}/usr/ports ]; then - build_doc_ports ${CHROOTDIR} + # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints + # is created. This is needed by ports-mgmt/pkg. + chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart + + ## Trick the ports 'run-autotools-fixup' target to do the right thing. + _OSVERSION=$(sysctl -n kern.osreldate) + if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS}" + chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ + ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean + fi fi if [ "x${RELSTRING}" = "x" ]; then From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 02:52:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A38C24E; Mon, 30 Dec 2013 02:52:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A7BC1D76; Mon, 30 Dec 2013 02:52:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU2qjnk098619; Mon, 30 Dec 2013 02:52:45 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU2qhYK098609; Mon, 30 Dec 2013 02:52:43 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312300252.rBU2qhYK098609@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 30 Dec 2013 02:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260073 - in head/contrib/gcc: . cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 02:52:45 -0000 Author: pfg Date: Mon Dec 30 02:52:43 2013 New Revision: 260073 URL: http://svnweb.freebsd.org/changeset/base/260073 Log: gcc: small diff reduction wrt gcc43 and Apple GCC. Obtained from: gcc 4.3 (rev. 121464, 122528, 124106; GPLv2) MFC after: 3 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/cp/ChangeLog head/contrib/gcc/cp/g++spec.c head/contrib/gcc/libgcc2.c head/contrib/gcc/libgcc2.h head/contrib/gcc/loop-init.c head/contrib/gcc/toplev.c head/contrib/gcc/tree-ssa-address.c Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Mon Dec 30 02:19:48 2013 (r260072) +++ head/contrib/gcc/ChangeLog.gcc43 Mon Dec 30 02:52:43 2013 (r260073) @@ -156,6 +156,15 @@ * reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction. +2007-04-24 Richard Henderson (r124106) + + * libgcc2.h (AVOID_FP_TYPE_CONVERSION): Rename from + IS_IBM_EXTENDED. Also define in terms of WIDEST_HARDWARE_FP_SIZE. + * libgcc2.c (__floatdisf): Avoid double-word arithmetic when + looking for non-zero bits shifted out. Avoid a recursive call + when constructing the scalar. + (__floatundisf): Likewise. + 2007-04-16 Lawrence Crowl (r123909) * doc/invoke.texi (Debugging Options): Add documentation for the @@ -248,6 +257,11 @@ * tree-vrp.c (vrp_int_const_binop): Handle PLUS_EXPR and the *_DIV_EXPR codes correctly with overflow infinities. +2007-03-04 Zdenek Dvorak (r122528) + + * tree-ssa-address.c (create_mem_ref): Do not put an expression + containing a cast to the base of TARGET_MEM_REF. + 2007-02-09 Dwarakanath Rajagopal (r121763) * config/i386/driver-i386.c: Turn on -mtune=native for AMDFAM10. @@ -424,6 +438,11 @@ and amdfam10. * doc/extend.texi: Add documentation for SSE4A builtins. +2007-02-01 Zdenek Dvorak (r121464) + + * toplev.c (lang_dependent_init): Call init_set_costs. + * loop-init.c (loop_optimizer_init): Do not call init_set_costs. + 2007-01-24 Jakub Jelinek (r121140) * config/i386/i386.h (x86_cmpxchg16b): Remove const. Modified: head/contrib/gcc/cp/ChangeLog ============================================================================== --- head/contrib/gcc/cp/ChangeLog Mon Dec 30 02:19:48 2013 (r260072) +++ head/contrib/gcc/cp/ChangeLog Mon Dec 30 02:52:43 2013 (r260073) @@ -314,6 +314,12 @@ PR c++/30895 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees. +2007-03-02 Geoffrey Keating (r122488) + + * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling + Objective-C++. Don't exit early if -shared-libgcc needs to be + added. + 2007-02-22 Simon Martin PR c++/29475 Modified: head/contrib/gcc/cp/g++spec.c ============================================================================== --- head/contrib/gcc/cp/g++spec.c Mon Dec 30 02:19:48 2013 (r260072) +++ head/contrib/gcc/cp/g++spec.c Mon Dec 30 02:52:43 2013 (r260073) @@ -159,11 +159,19 @@ lang_specific_driver (int *in_argc, cons arg = ""; if (library == 0 && (strcmp (arg, "c++") == 0 - || strcmp (arg, "c++-cpp-output") == 0)) + || strcmp (arg, "c++-cpp-output") == 0 + || strcmp (arg, "objective-c++") == 0 + || strcmp (arg, "objective-c++-cpp-output") == 0)) library = 1; saw_speclang = 1; } + else if (strcmp (argv[i], "-ObjC++") == 0) + { + if (library == 0) + library = 1; + saw_speclang = 1; + } /* Arguments that go directly to the linker might be .o files, or something, and so might cause libstdc++ to be needed. */ else if (strcmp (argv[i], "-Xlinker") == 0) @@ -237,13 +245,6 @@ lang_specific_driver (int *in_argc, cons if (quote) fatal ("argument to '%s' missing\n", quote); - /* If we know we don't have to do anything, bail now. */ - if (! added && library <= 0) - { - free (args); - return; - } - /* There's no point adding -shared-libgcc if we don't have a shared libgcc. */ #ifndef ENABLE_SHARED_LIBGCC Modified: head/contrib/gcc/libgcc2.c ============================================================================== --- head/contrib/gcc/libgcc2.c Mon Dec 30 02:19:48 2013 (r260072) +++ head/contrib/gcc/libgcc2.c Mon Dec 30 02:52:43 2013 (r260073) @@ -1420,11 +1420,7 @@ __floatunditf (UDWtype u) #define F_MODE_OK(SIZE) \ (SIZE < DI_SIZE \ && SIZE > (DI_SIZE - SIZE + FSSIZE) \ - /* Don't use IBM Extended Double TFmode for TI->SF calculations. \ - The conversion from long double to float suffers from double \ - rounding, because we convert via double. In any case, the \ - fallback code is faster. */ \ - && !IS_IBM_EXTENDED (SIZE)) + && !AVOID_FP_TYPE_CONVERSION(SIZE)) #if defined(L_floatdisf) #define FUNC __floatdisf #define FSTYPE SFtype @@ -1515,13 +1511,21 @@ FUNC (DWtype u) hi = u >> shift; /* If we lost any nonzero bits, set the lsb to ensure correct rounding. */ - if (u & (((DWtype)1 << shift) - 1)) + if ((UWtype)u << (W_TYPE_SIZE - shift)) hi |= 1; /* Convert the one word of data, and rescale. */ - FSTYPE f = hi; - f *= (UDWtype)1 << shift; - return f; + FSTYPE f = hi, e; + if (shift == W_TYPE_SIZE) + e = Wtype_MAXp1_F; + /* The following two cases could be merged if we knew that the target + supported a native unsigned->float conversion. More often, we only + have a signed conversion, and have to add extra fixup code. */ + else if (shift == W_TYPE_SIZE - 1) + e = Wtype_MAXp1_F / 2; + else + e = (Wtype)1 << shift; + return f * e; #endif } #endif @@ -1532,11 +1536,7 @@ FUNC (DWtype u) #define F_MODE_OK(SIZE) \ (SIZE < DI_SIZE \ && SIZE > (DI_SIZE - SIZE + FSSIZE) \ - /* Don't use IBM Extended Double TFmode for TI->SF calculations. \ - The conversion from long double to float suffers from double \ - rounding, because we convert via double. In any case, the \ - fallback code is faster. */ \ - && !IS_IBM_EXTENDED (SIZE)) + && !AVOID_FP_TYPE_CONVERSION(SIZE)) #if defined(L_floatundisf) #define FUNC __floatundisf #define FSTYPE SFtype @@ -1620,13 +1620,21 @@ FUNC (UDWtype u) hi = u >> shift; /* If we lost any nonzero bits, set the lsb to ensure correct rounding. */ - if (u & (((UDWtype)1 << shift) - 1)) + if ((UWtype)u << (W_TYPE_SIZE - shift)) hi |= 1; /* Convert the one word of data, and rescale. */ - FSTYPE f = hi; - f *= (UDWtype)1 << shift; - return f; + FSTYPE f = hi, e; + if (shift == W_TYPE_SIZE) + e = Wtype_MAXp1_F; + /* The following two cases could be merged if we knew that the target + supported a native unsigned->float conversion. More often, we only + have a signed conversion, and have to add extra fixup code. */ + else if (shift == W_TYPE_SIZE - 1) + e = Wtype_MAXp1_F / 2; + else + e = (Wtype)1 << shift; + return f * e; #endif } #endif Modified: head/contrib/gcc/libgcc2.h ============================================================================== --- head/contrib/gcc/libgcc2.h Mon Dec 30 02:19:48 2013 (r260072) +++ head/contrib/gcc/libgcc2.h Mon Dec 30 02:52:43 2013 (r260073) @@ -119,10 +119,16 @@ extern short int __get_eh_table_version /* FIXME: This #ifdef probably should be removed, ie. enable the test for mips too. */ +/* Don't use IBM Extended Double TFmode for TI->SF calculations. + The conversion from long double to float suffers from double + rounding, because we convert via double. In other cases, going + through the software fp routines is much slower than the fallback. */ #ifdef __powerpc__ -#define IS_IBM_EXTENDED(SIZE) (SIZE == 106) +#define AVOID_FP_TYPE_CONVERSION(SIZE) (SIZE == 106) +#elif defined(WIDEST_HARDWARE_FP_SIZE) +#define AVOID_FP_TYPE_CONVERSION(SIZE) (SIZE > WIDEST_HARDWARE_FP_SIZE) #else -#define IS_IBM_EXTENDED(SIZE) 0 +#define AVOID_FP_TYPE_CONVERSION(SIZE) 0 #endif /* In the first part of this file, we are interfacing to calls generated Modified: head/contrib/gcc/loop-init.c ============================================================================== --- head/contrib/gcc/loop-init.c Mon Dec 30 02:19:48 2013 (r260072) +++ head/contrib/gcc/loop-init.c Mon Dec 30 02:52:43 2013 (r260073) @@ -43,13 +43,6 @@ loop_optimizer_init (unsigned flags) struct loops *loops = XCNEW (struct loops); edge e; edge_iterator ei; - static bool first_time = true; - - if (first_time) - { - first_time = false; - init_set_costs (); - } /* Avoid annoying special cases of edges going to exit block. */ Modified: head/contrib/gcc/toplev.c ============================================================================== --- head/contrib/gcc/toplev.c Mon Dec 30 02:19:48 2013 (r260072) +++ head/contrib/gcc/toplev.c Mon Dec 30 02:52:43 2013 (r260073) @@ -1948,6 +1948,11 @@ lang_dependent_init (const char *name) provide a dummy function context for them. */ init_dummy_function_start (); init_expr_once (); + + /* Although the actions of init_set_costs are language-independent, + it uses optabs, so we cannot call it from backend_init. */ + init_set_costs (); + expand_dummy_function_end (); /* If dbx symbol table desired, initialize writing it and output the Modified: head/contrib/gcc/tree-ssa-address.c ============================================================================== --- head/contrib/gcc/tree-ssa-address.c Mon Dec 30 02:19:48 2013 (r260072) +++ head/contrib/gcc/tree-ssa-address.c Mon Dec 30 02:52:43 2013 (r260073) @@ -569,7 +569,7 @@ create_mem_ref (block_stmt_iterator *bsi struct affine_tree_combination *addr) { tree mem_ref, tmp; - tree addr_type = build_pointer_type (type), atype; + tree atype; struct mem_address parts; addr_to_parts (addr, &parts); @@ -597,18 +597,23 @@ create_mem_ref (block_stmt_iterator *bsi if (parts.symbol) { - tmp = fold_convert (addr_type, - build_addr (parts.symbol, current_function_decl)); + tmp = build_addr (parts.symbol, current_function_decl); + gcc_assert (is_gimple_val (tmp)); /* Add the symbol to base, eventually forcing it to register. */ if (parts.base) { + gcc_assert (TREE_TYPE (parts.base) == sizetype); + if (parts.index) - parts.base = force_gimple_operand_bsi (bsi, - fold_build2 (PLUS_EXPR, addr_type, - fold_convert (addr_type, parts.base), + { + atype = TREE_TYPE (tmp); + parts.base = force_gimple_operand_bsi (bsi, + fold_build2 (PLUS_EXPR, atype, + fold_convert (atype, parts.base), tmp), true, NULL_TREE); + } else { parts.index = parts.base; From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 03:39:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F796B34; Mon, 30 Dec 2013 03:39:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC83210DE; Mon, 30 Dec 2013 03:39:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU3dnIh015654; Mon, 30 Dec 2013 03:39:49 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU3dkis015637; Mon, 30 Dec 2013 03:39:46 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312300339.rBU3dkis015637@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 30 Dec 2013 03:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260074 - in stable/10/contrib/gcc: . config/i386 config/rs6000 cp doc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 03:39:50 -0000 Author: pfg Date: Mon Dec 30 03:39:46 2013 New Revision: 260074 URL: http://svnweb.freebsd.org/changeset/base/260074 Log: MFC r259005, r259092: gcc: Add -flax-vector-conversions gcc: new fvisibility-ms-compat option These are useful for compatibility with newwer gcc and clang. Obtained from: gcc 4.3 (rev. 120572, 120688, 126088; GPLv2) Modified: stable/10/contrib/gcc/ChangeLog.gcc43 stable/10/contrib/gcc/c-common.c stable/10/contrib/gcc/c-common.h stable/10/contrib/gcc/c-opts.c stable/10/contrib/gcc/c-typeck.c stable/10/contrib/gcc/c.opt stable/10/contrib/gcc/config/i386/i386.c stable/10/contrib/gcc/config/rs6000/altivec.h stable/10/contrib/gcc/config/rs6000/rs6000-c.c stable/10/contrib/gcc/cp/ChangeLog.gcc43 stable/10/contrib/gcc/cp/call.c stable/10/contrib/gcc/cp/decl.c stable/10/contrib/gcc/cp/decl2.c stable/10/contrib/gcc/cp/typeck.c stable/10/contrib/gcc/doc/invoke.texi Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/10/contrib/gcc/ChangeLog.gcc43 Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/ChangeLog.gcc43 Mon Dec 30 03:39:46 2013 (r260074) @@ -45,6 +45,12 @@ * flags.h (force_align_functions_log): Delete. * toplev.c (force_align_functions_log): Delete. +2007-06-28 Geoffrey Keating (r126088) + + * doc/invoke.texi (C++ Dialect Options): Document + fvisibility-ms-compat. + * c.opt (fvisibility-ms-compat): New. + 2007-06-05 Joerg Wunsch (r125346) PR preprocessor/23479 @@ -405,14 +411,44 @@ * config.gcc: Support core2 processor. -2007-01-08 Geoffrey Keating (r120611) +2007-01-11 Joseph Myers (r120688) + + * c-common.c (vector_types_convertible_p): Treat opaque types as + always convertible if they have the same size, but not otherwise. +2007-01-08 Geoffrey Keating (r120611) + * target.h (struct gcc_target): New field library_rtti_comdat. * target-def.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): New. (TARGET_CXX): Add TARGET_CXX_LIBRARY_RTTI_COMDAT. * doc/tm.texi (C++ ABI): Document TARGET_CXX_LIBRARY_RTTI_COMDAT. * config/darwin.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define. +2007-01-08 Mark Shinwell (r120572) + + * c.opt: Add -flax-vector-conversions. + * c-typeck.c (convert_for_assignment): Pass flag to + vector_types_convertible_p to allow emission of note. + (digest_init): Likewise. + * c-opts.c: Handle -flax-vector-conversions. + * c-common.c (flag_lax_vector_conversions): New. + (vector_types_convertible_p): Unless -flax-vector conversions + has been passed, disallow conversions between vectors with + differing numbers of subparts and/or element types. If such + a conversion is disallowed, possibly emit a note on the first + occasion only to inform the user of -flax-vector-conversions. + The new last argument specifies this. + * c-common.h (flag_lax_vector_conversions): New. + (vector_types_convertible_p): Add extra argument. + * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use + char_type_node for V*QI type vectors. + * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): + Update to satisfy new typechecking rules. + * config/rs6000/altivec.h (vec_cmple): Use vec_cmpge, for both + C and C++ variants. + * doc/invoke.texi (C Dialect Options): Document + -flax-vector-conversions. + 2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 Modified: stable/10/contrib/gcc/c-common.c ============================================================================== --- stable/10/contrib/gcc/c-common.c Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/c-common.c Mon Dec 30 03:39:46 2013 (r260074) @@ -254,6 +254,10 @@ int flag_short_double; int flag_short_wchar; +/* Nonzero means allow implicit conversions between vectors with + differing numbers of subparts and/or differing element types. */ +int flag_lax_vector_conversions; + /* Nonzero means allow Microsoft extensions without warnings or errors. */ int flag_ms_extensions; @@ -1095,18 +1099,45 @@ constant_fits_type_p (tree c, tree type) return !TREE_OVERFLOW (c); } -/* Nonzero if vector types T1 and T2 can be converted to each other - without an explicit cast. */ -int -vector_types_convertible_p (tree t1, tree t2) + +/* True if vector types T1 and T2 can be converted to each other + without an explicit cast. If EMIT_LAX_NOTE is true, and T1 and T2 + can only be converted with -flax-vector-conversions yet that is not + in effect, emit a note telling the user about that option if such + a note has not previously been emitted. */ +bool +vector_types_convertible_p (tree t1, tree t2, bool emit_lax_note) { - return targetm.vector_opaque_p (t1) - || targetm.vector_opaque_p (t2) - || (tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)) - && (TREE_CODE (TREE_TYPE (t1)) != REAL_TYPE || - TYPE_PRECISION (t1) == TYPE_PRECISION (t2)) - && INTEGRAL_TYPE_P (TREE_TYPE (t1)) - == INTEGRAL_TYPE_P (TREE_TYPE (t2))); + static bool emitted_lax_note = false; + bool convertible_lax; + + if ((targetm.vector_opaque_p (t1) || targetm.vector_opaque_p (t2)) + && tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2))) + return true; + + convertible_lax = + (tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)) + && (TREE_CODE (TREE_TYPE (t1)) != REAL_TYPE || + TYPE_PRECISION (t1) == TYPE_PRECISION (t2)) + && (INTEGRAL_TYPE_P (TREE_TYPE (t1)) + == INTEGRAL_TYPE_P (TREE_TYPE (t2)))); + + if (!convertible_lax || flag_lax_vector_conversions) + return convertible_lax; + + if (TYPE_VECTOR_SUBPARTS (t1) == TYPE_VECTOR_SUBPARTS (t2) + && comptypes (TREE_TYPE (t1), TREE_TYPE (t2))) + return true; + + if (emit_lax_note && !emitted_lax_note) + { + emitted_lax_note = true; + inform ("use -flax-vector-conversions to permit " + "conversions between vectors with differing " + "element types or numbers of subparts"); + } + + return false; } /* Convert EXPR to TYPE, warning about conversion problems with constants. Modified: stable/10/contrib/gcc/c-common.h ============================================================================== --- stable/10/contrib/gcc/c-common.h Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/c-common.h Mon Dec 30 03:39:46 2013 (r260074) @@ -389,6 +389,10 @@ extern int flag_short_double; extern int flag_short_wchar; +/* Nonzero means allow implicit conversions between vectors with + differing numbers of subparts and/or differing element types. */ +extern int flag_lax_vector_conversions; + /* Nonzero means allow Microsoft extensions without warnings or errors. */ extern int flag_ms_extensions; @@ -791,7 +795,7 @@ extern tree finish_label_address_expr (t extern tree lookup_label (tree); extern tree lookup_name (tree); -extern int vector_types_convertible_p (tree t1, tree t2); +extern bool vector_types_convertible_p (tree t1, tree t2, bool emit_lax_note); extern rtx c_expand_expr (tree, rtx, enum machine_mode, int, rtx *); Modified: stable/10/contrib/gcc/c-opts.c ============================================================================== --- stable/10/contrib/gcc/c-opts.c Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/c-opts.c Mon Dec 30 03:39:46 2013 (r260074) @@ -716,6 +716,10 @@ c_common_handle_option (size_t scode, co flag_implicit_templates = value; break; + case OPT_flax_vector_conversions: + flag_lax_vector_conversions = value; + break; + case OPT_fms_extensions: flag_ms_extensions = value; break; Modified: stable/10/contrib/gcc/c-typeck.c ============================================================================== --- stable/10/contrib/gcc/c-typeck.c Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/c-typeck.c Mon Dec 30 03:39:46 2013 (r260074) @@ -3893,7 +3893,7 @@ convert_for_assignment (tree type, tree } /* Some types can interconvert without explicit casts. */ else if (codel == VECTOR_TYPE && coder == VECTOR_TYPE - && vector_types_convertible_p (type, TREE_TYPE (rhs))) + && vector_types_convertible_p (type, TREE_TYPE (rhs), true)) return convert (type, rhs); /* Arithmetic types all interconvert, and enum is treated like int. */ else if ((codel == INTEGER_TYPE || codel == REAL_TYPE @@ -4629,7 +4629,7 @@ digest_init (tree type, tree init, bool below and handle as a constructor. */ if (code == VECTOR_TYPE && TREE_CODE (TREE_TYPE (inside_init)) == VECTOR_TYPE - && vector_types_convertible_p (TREE_TYPE (inside_init), type) + && vector_types_convertible_p (TREE_TYPE (inside_init), type, true) && TREE_CONSTANT (inside_init)) { if (TREE_CODE (inside_init) == VECTOR_CST Modified: stable/10/contrib/gcc/c.opt ============================================================================== --- stable/10/contrib/gcc/c.opt Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/c.opt Mon Dec 30 03:39:46 2013 (r260074) @@ -590,6 +590,10 @@ Inject friend functions into enclosing n flabels-ok C++ ObjC++ +flax-vector-conversions +C ObjC C++ ObjC++ +Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types. + fms-extensions C ObjC C++ ObjC++ Don't warn about uses of Microsoft extensions @@ -743,6 +747,10 @@ fvisibility-inlines-hidden C++ ObjC++ Marks all inlined methods as having hidden visibility +fvisibility-ms-compat +C++ ObjC++ Var(flag_visibility_ms_compat) +Changes visibility to match Microsoft Visual Studio by default + fvtable-gc C++ ObjC++ Discard unused virtual functions Modified: stable/10/contrib/gcc/config/i386/i386.c ============================================================================== --- stable/10/contrib/gcc/config/i386/i386.c Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/config/i386/i386.c Mon Dec 30 03:39:46 2013 (r260074) @@ -15408,7 +15408,7 @@ ix86_init_mmx_sse_builtins (void) const struct builtin_description * d; size_t i; - tree V16QI_type_node = build_vector_type_for_mode (intQI_type_node, V16QImode); + tree V16QI_type_node = build_vector_type_for_mode (char_type_node, V16QImode); tree V2SI_type_node = build_vector_type_for_mode (intSI_type_node, V2SImode); tree V2SF_type_node = build_vector_type_for_mode (float_type_node, V2SFmode); tree V2DI_type_node @@ -15417,7 +15417,7 @@ ix86_init_mmx_sse_builtins (void) tree V4SF_type_node = build_vector_type_for_mode (float_type_node, V4SFmode); tree V4SI_type_node = build_vector_type_for_mode (intSI_type_node, V4SImode); tree V4HI_type_node = build_vector_type_for_mode (intHI_type_node, V4HImode); - tree V8QI_type_node = build_vector_type_for_mode (intQI_type_node, V8QImode); + tree V8QI_type_node = build_vector_type_for_mode (char_type_node, V8QImode); tree V8HI_type_node = build_vector_type_for_mode (intHI_type_node, V8HImode); tree pchar_type_node = build_pointer_type (char_type_node); Modified: stable/10/contrib/gcc/config/rs6000/altivec.h ============================================================================== --- stable/10/contrib/gcc/config/rs6000/altivec.h Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/config/rs6000/altivec.h Mon Dec 30 03:39:46 2013 (r260074) @@ -332,7 +332,7 @@ NAME (T a1, U a2) \ __altivec_binary_pred(vec_cmplt, __builtin_vec_cmpgt (a2, a1)) __altivec_binary_pred(vec_cmple, - __builtin_altivec_cmpge (a2, a1)) + __builtin_vec_cmpge (a2, a1)) __altivec_scalar_pred(vec_all_in, __builtin_altivec_vcmpbfp_p (__CR6_EQ, a1, a2)) @@ -402,7 +402,7 @@ __altivec_scalar_pred(vec_any_nle, #undef __altivec_binary_pred #else #define vec_cmplt(a1, a2) __builtin_vec_cmpgt ((a2), (a1)) -#define vec_cmple(a1, a2) __builtin_altivec_vcmpgefp ((a2), (a1)) +#define vec_cmple(a1, a2) __builtin_vec_cmpge ((a2), (a1)) #define vec_all_in(a1, a2) __builtin_altivec_vcmpbfp_p (__CR6_EQ, (a1), (a2)) #define vec_any_out(a1, a2) __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, (a1), (a2)) Modified: stable/10/contrib/gcc/config/rs6000/rs6000-c.c ============================================================================== --- stable/10/contrib/gcc/config/rs6000/rs6000-c.c Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/config/rs6000/rs6000-c.c Mon Dec 30 03:39:46 2013 (r260074) @@ -222,17 +222,17 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_pixel_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHSH, ALTIVEC_BUILTIN_VUPKHSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHSH, ALTIVEC_BUILTIN_VUPKHSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHPX, ALTIVEC_BUILTIN_VUPKHPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHPX, ALTIVEC_BUILTIN_VUPKHPX, @@ -240,17 +240,17 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_VUPKHSB, ALTIVEC_BUILTIN_VUPKHSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHSB, ALTIVEC_BUILTIN_VUPKHSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_pixel_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLPX, ALTIVEC_BUILTIN_VUPKLPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLPX, ALTIVEC_BUILTIN_VUPKLPX, @@ -258,11 +258,11 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_VUPKLSH, ALTIVEC_BUILTIN_VUPKLSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLSH, ALTIVEC_BUILTIN_VUPKLSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLSB, ALTIVEC_BUILTIN_VUPKLSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLSB, ALTIVEC_BUILTIN_VUPKLSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, /* Binary AltiVec builtins. */ { ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDUBM, @@ -576,31 +576,23 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQFP, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQFP, ALTIVEC_BUILTIN_VCMPEQFP, - RS6000_BTI_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, - RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, - RS6000_BTI_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, + { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, - RS6000_BTI_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, - RS6000_BTI_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, + { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, RS6000_BTI_bool_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, - RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, - RS6000_BTI_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, + { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, + { ALTIVEC_BUILTIN_VEC_CMPGE, ALTIVEC_BUILTIN_VCMPGEFP, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_CMPGT, ALTIVEC_BUILTIN_VCMPGTUB, @@ -618,29 +610,29 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_CMPGT, ALTIVEC_BUILTIN_VCMPGTFP, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTFP, ALTIVEC_BUILTIN_VCMPGTFP, - RS6000_BTI_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSW, ALTIVEC_BUILTIN_VCMPGTSW, - RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSW, ALTIVEC_BUILTIN_VCMPGTSW, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUW, ALTIVEC_BUILTIN_VCMPGTUW, - RS6000_BTI_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUW, ALTIVEC_BUILTIN_VCMPGTUW, RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSH, ALTIVEC_BUILTIN_VCMPGTSH, - RS6000_BTI_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSH, ALTIVEC_BUILTIN_VCMPGTSH, RS6000_BTI_bool_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUH, ALTIVEC_BUILTIN_VCMPGTUH, - RS6000_BTI_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUH, ALTIVEC_BUILTIN_VCMPGTUH, RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSB, ALTIVEC_BUILTIN_VCMPGTSB, - RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, + RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSB, ALTIVEC_BUILTIN_VCMPGTSB, RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUB, ALTIVEC_BUILTIN_VCMPGTUB, - RS6000_BTI_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, + RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUB, ALTIVEC_BUILTIN_VCMPGTUB, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_CMPLE, ALTIVEC_BUILTIN_VCMPGEFP, Modified: stable/10/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- stable/10/contrib/gcc/cp/ChangeLog.gcc43 Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/cp/ChangeLog.gcc43 Mon Dec 30 03:39:46 2013 (r260074) @@ -7,6 +7,13 @@ * typeck.c (cxx_alignof_expr): When alignof is used on a plain FUNCTION_DECL, return its alignment. +2007-06-28 Geoffrey Keating (r126088) + + * decl2.c (determine_visibility): Implement + flag_visibility_ms_compat effect on type info. + * decl.c (cxx_init_decl_processing): Implement + global effect of flag_visibility_ms_compat. + 2007-06-28 Geoffrey Keating (r126080) * decl2.c (start_objects): Mark constructor-runnning function @@ -37,14 +44,23 @@ * decl.c (compute_array_index_type): New warning flag warn_vla. -2007-01-07 Manuel Lopez-Ibanez +2007-01-08 Mark Shinwell (r120572) + + * call.c (standard_conversion): Pass flag to + vector_types_convertible_p to disallow emission of note. + * typeck.c (convert_for_assignment): Pass flag to + vector_types_convertible_p to allow emission of note. + (ptr_reasonably_similar): Pass flag to vector_types_convertible_p + to disallow emission of note. + +2007-01-07 Manuel Lopez-Ibanez (r120558) PR c++/28986 * typeck.c (build_binary_op): Call overflow_warning if TREE_OVERFLOW_P is true for the result and not for any of the operands. -2007-01-05 Manuel Lopez-Ibanez +2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 * semantics.c (finish_unary_op_expr): Warn only if result Modified: stable/10/contrib/gcc/cp/call.c ============================================================================== --- stable/10/contrib/gcc/cp/call.c Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/cp/call.c Mon Dec 30 03:39:46 2013 (r260074) @@ -838,7 +838,7 @@ standard_conversion (tree to, tree from, conv->rank = cr_promotion; } else if (fcode == VECTOR_TYPE && tcode == VECTOR_TYPE - && vector_types_convertible_p (from, to)) + && vector_types_convertible_p (from, to, false)) return build_conv (ck_std, to, conv); else if (!(flags & LOOKUP_CONSTRUCTOR_CALLABLE) && IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from) Modified: stable/10/contrib/gcc/cp/decl.c ============================================================================== --- stable/10/contrib/gcc/cp/decl.c Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/cp/decl.c Mon Dec 30 03:39:46 2013 (r260074) @@ -3157,6 +3157,9 @@ cxx_init_decl_processing (void) } if (flag_inline_functions) flag_inline_trees = 2; + + if (flag_visibility_ms_compat) + default_visibility = VISIBILITY_HIDDEN; /* Initially, C. */ current_lang_name = lang_name_c; Modified: stable/10/contrib/gcc/cp/decl2.c ============================================================================== --- stable/10/contrib/gcc/cp/decl2.c Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/cp/decl2.c Mon Dec 30 03:39:46 2013 (r260074) @@ -1726,6 +1726,19 @@ determine_visibility (tree decl) but have no TEMPLATE_INFO, so don't try to check it. */ use_template = 0; } + else if (TREE_CODE (decl) == VAR_DECL && DECL_TINFO_P (decl) + && flag_visibility_ms_compat) + { + /* Under -fvisibility-ms-compat, types are visible by default, + even though their contents aren't. */ + tree underlying_type = TREE_TYPE (DECL_NAME (decl)); + int underlying_vis = type_visibility (underlying_type); + if (underlying_vis == VISIBILITY_ANON + || CLASSTYPE_VISIBILITY_SPECIFIED (underlying_type)) + constrain_visibility (decl, underlying_vis); + else + DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT; + } else if (TREE_CODE (decl) == VAR_DECL && DECL_TINFO_P (decl)) { /* tinfo visibility is based on the type it's for. */ Modified: stable/10/contrib/gcc/cp/typeck.c ============================================================================== --- stable/10/contrib/gcc/cp/typeck.c Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/cp/typeck.c Mon Dec 30 03:39:46 2013 (r260074) @@ -6229,7 +6229,7 @@ convert_for_assignment (tree type, tree coder = TREE_CODE (rhstype); if (TREE_CODE (type) == VECTOR_TYPE && coder == VECTOR_TYPE - && vector_types_convertible_p (type, rhstype)) + && vector_types_convertible_p (type, rhstype, true)) return convert (type, rhs); if (rhs == error_mark_node || rhstype == error_mark_node) @@ -6799,7 +6799,7 @@ ptr_reasonably_similar (tree to, tree fr continue; if (TREE_CODE (to) == VECTOR_TYPE - && vector_types_convertible_p (to, from)) + && vector_types_convertible_p (to, from, false)) return 1; if (TREE_CODE (to) == INTEGER_TYPE Modified: stable/10/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/10/contrib/gcc/doc/invoke.texi Mon Dec 30 02:52:43 2013 (r260073) +++ stable/10/contrib/gcc/doc/invoke.texi Mon Dec 30 03:39:46 2013 (r260074) @@ -167,7 +167,7 @@ in the following sections. -fno-asm -fno-builtin -fno-builtin-@var{function} @gol -fhosted -ffreestanding -fopenmp -fms-extensions @gol -trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol --fallow-single-precision -fcond-mismatch @gol +-fallow-single-precision -fcond-mismatch -flax-vector-conversions @gol -fsigned-bitfields -fsigned-char @gol @c APPLE LOCAL -Wnewline-eof 2001-08-23 --sts ** -Wnewline-eof (Apple compatible) @gol @@ -188,6 +188,7 @@ in the following sections. -frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol -fno-default-inline -fvisibility-inlines-hidden @gol +-fvisibility-ms-compat @gol -Wabi -Wctor-dtor-privacy @gol -Wnon-virtual-dtor -Wreorder @gol -Weffc++ -Wno-deprecated -Wstrict-null-sentinel @gol @@ -1339,6 +1340,12 @@ Allow conditional expressions with misma third arguments. The value of such an expression is void. This option is not supported for C++. +@item -flax-vector-conversions +@opindex flax-vector-conversions +Allow implicit conversions between vectors with differing numbers of +elements and/or incompatible element types. This option should not be +used for new code. + @item -funsigned-char @opindex funsigned-char Let the type @code{char} be unsigned, like @code{unsigned char}. @@ -1622,6 +1629,40 @@ Explicitly instantiated inline methods a as their linkage might otherwise cross a shared library boundary. @xref{Template Instantiation}. +@item -fvisibility-ms-compat +@opindex fvisibility-ms-compat +This flag attempts to use visibility settings to make GCC's C++ +linkage model compatible with that of Microsoft Visual Studio. + +The flag makes these changes to GCC's linkage model: + +@enumerate +@item +It sets the default visibility to @code{hidden}, like +@option{-fvisibility=hidden}. + +@item +Types, but not their members, are not hidden by default. + +@item +The One Definition Rule is relaxed for types without explicit +visibility specifications which are defined in more than one different +shared object: those declarations are permitted if they would have +been permitted when this option was not used. +@end enumerate + +In new code it is better to use @option{-fvisibility=hidden} and +export those classes which are intended to be externally visible. +Unfortunately it is possible for code to rely, perhaps accidentally, +on the Visual Studio behaviour. + +Among the consequences of these changes are that static data members +of the same type with the same name but defined in different shared +objects will be different, so changing one will not change the other; +and that pointers to function members defined in different shared +objects may not compare equal. When this flag is given, it is a +violation of the ODR to define types with the same name differently. + @item -fno-weak @opindex fno-weak Do not use weak symbol support, even if it is provided by the linker. From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 03:40:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E44D9C63; Mon, 30 Dec 2013 03:40:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE8161130; Mon, 30 Dec 2013 03:40:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU3eJs9015830; Mon, 30 Dec 2013 03:40:19 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU3eGtO015815; Mon, 30 Dec 2013 03:40:16 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312300340.rBU3eGtO015815@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 30 Dec 2013 03:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260075 - in stable/9/contrib/gcc: . config/i386 config/rs6000 cp doc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 03:40:20 -0000 Author: pfg Date: Mon Dec 30 03:40:16 2013 New Revision: 260075 URL: http://svnweb.freebsd.org/changeset/base/260075 Log: MFC r259005, r259092: gcc: Add -flax-vector-conversions gcc: new fvisibility-ms-compat option These are useful for compatibility with newwer gcc and clang. Obtained from: gcc 4.3 (rev. 120572, 120688, 126088; GPLv2) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/c-common.c stable/9/contrib/gcc/c-common.h stable/9/contrib/gcc/c-opts.c stable/9/contrib/gcc/c-typeck.c stable/9/contrib/gcc/c.opt stable/9/contrib/gcc/config/i386/i386.c stable/9/contrib/gcc/config/rs6000/altivec.h stable/9/contrib/gcc/config/rs6000/rs6000-c.c stable/9/contrib/gcc/cp/call.c stable/9/contrib/gcc/cp/decl.c stable/9/contrib/gcc/cp/decl2.c stable/9/contrib/gcc/cp/typeck.c stable/9/contrib/gcc/doc/invoke.texi Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcc/ChangeLog.gcc43 Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/ChangeLog.gcc43 Mon Dec 30 03:40:16 2013 (r260075) @@ -45,6 +45,12 @@ * flags.h (force_align_functions_log): Delete. * toplev.c (force_align_functions_log): Delete. +2007-06-28 Geoffrey Keating (r126088) + + * doc/invoke.texi (C++ Dialect Options): Document + fvisibility-ms-compat. + * c.opt (fvisibility-ms-compat): New. + 2007-06-05 Joerg Wunsch (r125346) PR preprocessor/23479 @@ -398,6 +404,11 @@ * c-common.c (vector_types_convertible_p): Treat opaque types as always convertible if they have the same size, but not otherwise. +2007-01-11 Joseph Myers (r120688) + + * c-common.c (vector_types_convertible_p): Treat opaque types as + always convertible if they have the same size, but not otherwise. + 2007-01-08 Geoffrey Keating (r120611) * target.h (struct gcc_target): New field library_rtti_comdat. @@ -406,6 +417,31 @@ * doc/tm.texi (C++ ABI): Document TARGET_CXX_LIBRARY_RTTI_COMDAT. * config/darwin.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define. +2007-01-08 Mark Shinwell (r120572) + + * c.opt: Add -flax-vector-conversions. + * c-typeck.c (convert_for_assignment): Pass flag to + vector_types_convertible_p to allow emission of note. + (digest_init): Likewise. + * c-opts.c: Handle -flax-vector-conversions. + * c-common.c (flag_lax_vector_conversions): New. + (vector_types_convertible_p): Unless -flax-vector conversions + has been passed, disallow conversions between vectors with + differing numbers of subparts and/or element types. If such + a conversion is disallowed, possibly emit a note on the first + occasion only to inform the user of -flax-vector-conversions. + The new last argument specifies this. + * c-common.h (flag_lax_vector_conversions): New. + (vector_types_convertible_p): Add extra argument. + * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use + char_type_node for V*QI type vectors. + * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): + Update to satisfy new typechecking rules. + * config/rs6000/altivec.h (vec_cmple): Use vec_cmpge, for both + C and C++ variants. + * doc/invoke.texi (C Dialect Options): Document + -flax-vector-conversions. + 2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 Modified: stable/9/contrib/gcc/c-common.c ============================================================================== --- stable/9/contrib/gcc/c-common.c Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/c-common.c Mon Dec 30 03:40:16 2013 (r260075) @@ -254,6 +254,10 @@ int flag_short_double; int flag_short_wchar; +/* Nonzero means allow implicit conversions between vectors with + differing numbers of subparts and/or differing element types. */ +int flag_lax_vector_conversions; + /* Nonzero means allow Microsoft extensions without warnings or errors. */ int flag_ms_extensions; @@ -1095,18 +1099,45 @@ constant_fits_type_p (tree c, tree type) return !TREE_OVERFLOW (c); } -/* Nonzero if vector types T1 and T2 can be converted to each other - without an explicit cast. */ -int -vector_types_convertible_p (tree t1, tree t2) + +/* True if vector types T1 and T2 can be converted to each other + without an explicit cast. If EMIT_LAX_NOTE is true, and T1 and T2 + can only be converted with -flax-vector-conversions yet that is not + in effect, emit a note telling the user about that option if such + a note has not previously been emitted. */ +bool +vector_types_convertible_p (tree t1, tree t2, bool emit_lax_note) { - return targetm.vector_opaque_p (t1) - || targetm.vector_opaque_p (t2) - || (tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)) - && (TREE_CODE (TREE_TYPE (t1)) != REAL_TYPE || - TYPE_PRECISION (t1) == TYPE_PRECISION (t2)) - && INTEGRAL_TYPE_P (TREE_TYPE (t1)) - == INTEGRAL_TYPE_P (TREE_TYPE (t2))); + static bool emitted_lax_note = false; + bool convertible_lax; + + if ((targetm.vector_opaque_p (t1) || targetm.vector_opaque_p (t2)) + && tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2))) + return true; + + convertible_lax = + (tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)) + && (TREE_CODE (TREE_TYPE (t1)) != REAL_TYPE || + TYPE_PRECISION (t1) == TYPE_PRECISION (t2)) + && (INTEGRAL_TYPE_P (TREE_TYPE (t1)) + == INTEGRAL_TYPE_P (TREE_TYPE (t2)))); + + if (!convertible_lax || flag_lax_vector_conversions) + return convertible_lax; + + if (TYPE_VECTOR_SUBPARTS (t1) == TYPE_VECTOR_SUBPARTS (t2) + && comptypes (TREE_TYPE (t1), TREE_TYPE (t2))) + return true; + + if (emit_lax_note && !emitted_lax_note) + { + emitted_lax_note = true; + inform ("use -flax-vector-conversions to permit " + "conversions between vectors with differing " + "element types or numbers of subparts"); + } + + return false; } /* Convert EXPR to TYPE, warning about conversion problems with constants. Modified: stable/9/contrib/gcc/c-common.h ============================================================================== --- stable/9/contrib/gcc/c-common.h Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/c-common.h Mon Dec 30 03:40:16 2013 (r260075) @@ -389,6 +389,10 @@ extern int flag_short_double; extern int flag_short_wchar; +/* Nonzero means allow implicit conversions between vectors with + differing numbers of subparts and/or differing element types. */ +extern int flag_lax_vector_conversions; + /* Nonzero means allow Microsoft extensions without warnings or errors. */ extern int flag_ms_extensions; @@ -791,7 +795,7 @@ extern tree finish_label_address_expr (t extern tree lookup_label (tree); extern tree lookup_name (tree); -extern int vector_types_convertible_p (tree t1, tree t2); +extern bool vector_types_convertible_p (tree t1, tree t2, bool emit_lax_note); extern rtx c_expand_expr (tree, rtx, enum machine_mode, int, rtx *); Modified: stable/9/contrib/gcc/c-opts.c ============================================================================== --- stable/9/contrib/gcc/c-opts.c Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/c-opts.c Mon Dec 30 03:40:16 2013 (r260075) @@ -716,6 +716,10 @@ c_common_handle_option (size_t scode, co flag_implicit_templates = value; break; + case OPT_flax_vector_conversions: + flag_lax_vector_conversions = value; + break; + case OPT_fms_extensions: flag_ms_extensions = value; break; Modified: stable/9/contrib/gcc/c-typeck.c ============================================================================== --- stable/9/contrib/gcc/c-typeck.c Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/c-typeck.c Mon Dec 30 03:40:16 2013 (r260075) @@ -3893,7 +3893,7 @@ convert_for_assignment (tree type, tree } /* Some types can interconvert without explicit casts. */ else if (codel == VECTOR_TYPE && coder == VECTOR_TYPE - && vector_types_convertible_p (type, TREE_TYPE (rhs))) + && vector_types_convertible_p (type, TREE_TYPE (rhs), true)) return convert (type, rhs); /* Arithmetic types all interconvert, and enum is treated like int. */ else if ((codel == INTEGER_TYPE || codel == REAL_TYPE @@ -4629,7 +4629,7 @@ digest_init (tree type, tree init, bool below and handle as a constructor. */ if (code == VECTOR_TYPE && TREE_CODE (TREE_TYPE (inside_init)) == VECTOR_TYPE - && vector_types_convertible_p (TREE_TYPE (inside_init), type) + && vector_types_convertible_p (TREE_TYPE (inside_init), type, true) && TREE_CONSTANT (inside_init)) { if (TREE_CODE (inside_init) == VECTOR_CST Modified: stable/9/contrib/gcc/c.opt ============================================================================== --- stable/9/contrib/gcc/c.opt Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/c.opt Mon Dec 30 03:40:16 2013 (r260075) @@ -590,6 +590,10 @@ Inject friend functions into enclosing n flabels-ok C++ ObjC++ +flax-vector-conversions +C ObjC C++ ObjC++ +Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types. + fms-extensions C ObjC C++ ObjC++ Don't warn about uses of Microsoft extensions @@ -743,6 +747,10 @@ fvisibility-inlines-hidden C++ ObjC++ Marks all inlined methods as having hidden visibility +fvisibility-ms-compat +C++ ObjC++ Var(flag_visibility_ms_compat) +Changes visibility to match Microsoft Visual Studio by default + fvtable-gc C++ ObjC++ Discard unused virtual functions Modified: stable/9/contrib/gcc/config/i386/i386.c ============================================================================== --- stable/9/contrib/gcc/config/i386/i386.c Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/config/i386/i386.c Mon Dec 30 03:40:16 2013 (r260075) @@ -15394,7 +15394,7 @@ ix86_init_mmx_sse_builtins (void) const struct builtin_description * d; size_t i; - tree V16QI_type_node = build_vector_type_for_mode (intQI_type_node, V16QImode); + tree V16QI_type_node = build_vector_type_for_mode (char_type_node, V16QImode); tree V2SI_type_node = build_vector_type_for_mode (intSI_type_node, V2SImode); tree V2SF_type_node = build_vector_type_for_mode (float_type_node, V2SFmode); tree V2DI_type_node @@ -15403,7 +15403,7 @@ ix86_init_mmx_sse_builtins (void) tree V4SF_type_node = build_vector_type_for_mode (float_type_node, V4SFmode); tree V4SI_type_node = build_vector_type_for_mode (intSI_type_node, V4SImode); tree V4HI_type_node = build_vector_type_for_mode (intHI_type_node, V4HImode); - tree V8QI_type_node = build_vector_type_for_mode (intQI_type_node, V8QImode); + tree V8QI_type_node = build_vector_type_for_mode (char_type_node, V8QImode); tree V8HI_type_node = build_vector_type_for_mode (intHI_type_node, V8HImode); tree pchar_type_node = build_pointer_type (char_type_node); Modified: stable/9/contrib/gcc/config/rs6000/altivec.h ============================================================================== --- stable/9/contrib/gcc/config/rs6000/altivec.h Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/config/rs6000/altivec.h Mon Dec 30 03:40:16 2013 (r260075) @@ -332,7 +332,7 @@ NAME (T a1, U a2) \ __altivec_binary_pred(vec_cmplt, __builtin_vec_cmpgt (a2, a1)) __altivec_binary_pred(vec_cmple, - __builtin_altivec_cmpge (a2, a1)) + __builtin_vec_cmpge (a2, a1)) __altivec_scalar_pred(vec_all_in, __builtin_altivec_vcmpbfp_p (__CR6_EQ, a1, a2)) @@ -402,7 +402,7 @@ __altivec_scalar_pred(vec_any_nle, #undef __altivec_binary_pred #else #define vec_cmplt(a1, a2) __builtin_vec_cmpgt ((a2), (a1)) -#define vec_cmple(a1, a2) __builtin_altivec_vcmpgefp ((a2), (a1)) +#define vec_cmple(a1, a2) __builtin_vec_cmpge ((a2), (a1)) #define vec_all_in(a1, a2) __builtin_altivec_vcmpbfp_p (__CR6_EQ, (a1), (a2)) #define vec_any_out(a1, a2) __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, (a1), (a2)) Modified: stable/9/contrib/gcc/config/rs6000/rs6000-c.c ============================================================================== --- stable/9/contrib/gcc/config/rs6000/rs6000-c.c Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/config/rs6000/rs6000-c.c Mon Dec 30 03:40:16 2013 (r260075) @@ -222,17 +222,17 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKH, ALTIVEC_BUILTIN_VUPKHPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_pixel_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHSH, ALTIVEC_BUILTIN_VUPKHSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHSH, ALTIVEC_BUILTIN_VUPKHSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHPX, ALTIVEC_BUILTIN_VUPKHPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHPX, ALTIVEC_BUILTIN_VUPKHPX, @@ -240,17 +240,17 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_VUPKHSB, ALTIVEC_BUILTIN_VUPKHSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKHSB, ALTIVEC_BUILTIN_VUPKHSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_pixel_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VUPKLSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLPX, ALTIVEC_BUILTIN_VUPKLPX, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLPX, ALTIVEC_BUILTIN_VUPKLPX, @@ -258,11 +258,11 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_VUPKLSH, ALTIVEC_BUILTIN_VUPKLSH, RS6000_BTI_V4SI, RS6000_BTI_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLSH, ALTIVEC_BUILTIN_VUPKLSH, - RS6000_BTI_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V8HI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLSB, ALTIVEC_BUILTIN_VUPKLSB, RS6000_BTI_V8HI, RS6000_BTI_V16QI, 0, 0 }, { ALTIVEC_BUILTIN_VEC_VUPKLSB, ALTIVEC_BUILTIN_VUPKLSB, - RS6000_BTI_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 }, /* Binary AltiVec builtins. */ { ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDUBM, @@ -576,31 +576,23 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_CMPEQ, ALTIVEC_BUILTIN_VCMPEQFP, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQFP, ALTIVEC_BUILTIN_VCMPEQFP, - RS6000_BTI_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, - RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, - RS6000_BTI_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, + { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQUW, ALTIVEC_BUILTIN_VCMPEQUW, RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, - RS6000_BTI_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, - RS6000_BTI_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, + { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, RS6000_BTI_bool_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQUH, ALTIVEC_BUILTIN_VCMPEQUH, RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, - RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, - { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, - RS6000_BTI_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, + { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPEQUB, ALTIVEC_BUILTIN_VCMPEQUB, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, + { ALTIVEC_BUILTIN_VEC_CMPGE, ALTIVEC_BUILTIN_VCMPGEFP, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_CMPGT, ALTIVEC_BUILTIN_VCMPGTUB, @@ -618,29 +610,29 @@ const struct altivec_builtin_types altiv { ALTIVEC_BUILTIN_VEC_CMPGT, ALTIVEC_BUILTIN_VCMPGTFP, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTFP, ALTIVEC_BUILTIN_VCMPGTFP, - RS6000_BTI_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSW, ALTIVEC_BUILTIN_VCMPGTSW, - RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSW, ALTIVEC_BUILTIN_VCMPGTSW, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUW, ALTIVEC_BUILTIN_VCMPGTUW, - RS6000_BTI_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, + RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUW, ALTIVEC_BUILTIN_VCMPGTUW, RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSH, ALTIVEC_BUILTIN_VCMPGTSH, - RS6000_BTI_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSH, ALTIVEC_BUILTIN_VCMPGTSH, RS6000_BTI_bool_V8HI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUH, ALTIVEC_BUILTIN_VCMPGTUH, - RS6000_BTI_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, + RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUH, ALTIVEC_BUILTIN_VCMPGTUH, RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSB, ALTIVEC_BUILTIN_VCMPGTSB, - RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, + RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTSB, ALTIVEC_BUILTIN_VCMPGTSB, RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUB, ALTIVEC_BUILTIN_VCMPGTUB, - RS6000_BTI_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, + RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_VCMPGTUB, ALTIVEC_BUILTIN_VCMPGTUB, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_CMPLE, ALTIVEC_BUILTIN_VCMPGEFP, Modified: stable/9/contrib/gcc/cp/call.c ============================================================================== --- stable/9/contrib/gcc/cp/call.c Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/cp/call.c Mon Dec 30 03:40:16 2013 (r260075) @@ -838,7 +838,7 @@ standard_conversion (tree to, tree from, conv->rank = cr_promotion; } else if (fcode == VECTOR_TYPE && tcode == VECTOR_TYPE - && vector_types_convertible_p (from, to)) + && vector_types_convertible_p (from, to, false)) return build_conv (ck_std, to, conv); else if (!(flags & LOOKUP_CONSTRUCTOR_CALLABLE) && IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from) Modified: stable/9/contrib/gcc/cp/decl.c ============================================================================== --- stable/9/contrib/gcc/cp/decl.c Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/cp/decl.c Mon Dec 30 03:40:16 2013 (r260075) @@ -3157,6 +3157,9 @@ cxx_init_decl_processing (void) } if (flag_inline_functions) flag_inline_trees = 2; + + if (flag_visibility_ms_compat) + default_visibility = VISIBILITY_HIDDEN; /* Initially, C. */ current_lang_name = lang_name_c; Modified: stable/9/contrib/gcc/cp/decl2.c ============================================================================== --- stable/9/contrib/gcc/cp/decl2.c Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/cp/decl2.c Mon Dec 30 03:40:16 2013 (r260075) @@ -1730,6 +1730,19 @@ determine_visibility (tree decl) but have no TEMPLATE_INFO, so don't try to check it. */ use_template = 0; } + else if (TREE_CODE (decl) == VAR_DECL && DECL_TINFO_P (decl) + && flag_visibility_ms_compat) + { + /* Under -fvisibility-ms-compat, types are visible by default, + even though their contents aren't. */ + tree underlying_type = TREE_TYPE (DECL_NAME (decl)); + int underlying_vis = type_visibility (underlying_type); + if (underlying_vis == VISIBILITY_ANON + || CLASSTYPE_VISIBILITY_SPECIFIED (underlying_type)) + constrain_visibility (decl, underlying_vis); + else + DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT; + } else if (TREE_CODE (decl) == VAR_DECL && DECL_TINFO_P (decl)) { /* tinfo visibility is based on the type it's for. */ Modified: stable/9/contrib/gcc/cp/typeck.c ============================================================================== --- stable/9/contrib/gcc/cp/typeck.c Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/cp/typeck.c Mon Dec 30 03:40:16 2013 (r260075) @@ -6229,7 +6229,7 @@ convert_for_assignment (tree type, tree coder = TREE_CODE (rhstype); if (TREE_CODE (type) == VECTOR_TYPE && coder == VECTOR_TYPE - && vector_types_convertible_p (type, rhstype)) + && vector_types_convertible_p (type, rhstype, true)) return convert (type, rhs); if (rhs == error_mark_node || rhstype == error_mark_node) @@ -6799,7 +6799,7 @@ ptr_reasonably_similar (tree to, tree fr continue; if (TREE_CODE (to) == VECTOR_TYPE - && vector_types_convertible_p (to, from)) + && vector_types_convertible_p (to, from, false)) return 1; if (TREE_CODE (to) == INTEGER_TYPE Modified: stable/9/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/9/contrib/gcc/doc/invoke.texi Mon Dec 30 03:39:46 2013 (r260074) +++ stable/9/contrib/gcc/doc/invoke.texi Mon Dec 30 03:40:16 2013 (r260075) @@ -167,7 +167,7 @@ in the following sections. -fno-asm -fno-builtin -fno-builtin-@var{function} @gol -fhosted -ffreestanding -fopenmp -fms-extensions @gol -trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol --fallow-single-precision -fcond-mismatch @gol +-fallow-single-precision -fcond-mismatch -flax-vector-conversions @gol -fsigned-bitfields -fsigned-char @gol @c APPLE LOCAL -Wnewline-eof 2001-08-23 --sts ** -Wnewline-eof (Apple compatible) @gol @@ -188,6 +188,7 @@ in the following sections. -frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol -fno-default-inline -fvisibility-inlines-hidden @gol +-fvisibility-ms-compat @gol -Wabi -Wctor-dtor-privacy @gol -Wnon-virtual-dtor -Wreorder @gol -Weffc++ -Wno-deprecated -Wstrict-null-sentinel @gol @@ -1339,6 +1340,12 @@ Allow conditional expressions with misma third arguments. The value of such an expression is void. This option is not supported for C++. +@item -flax-vector-conversions +@opindex flax-vector-conversions +Allow implicit conversions between vectors with differing numbers of +elements and/or incompatible element types. This option should not be +used for new code. + @item -funsigned-char @opindex funsigned-char Let the type @code{char} be unsigned, like @code{unsigned char}. @@ -1622,6 +1629,40 @@ Explicitly instantiated inline methods a as their linkage might otherwise cross a shared library boundary. @xref{Template Instantiation}. +@item -fvisibility-ms-compat +@opindex fvisibility-ms-compat +This flag attempts to use visibility settings to make GCC's C++ +linkage model compatible with that of Microsoft Visual Studio. + +The flag makes these changes to GCC's linkage model: + +@enumerate +@item +It sets the default visibility to @code{hidden}, like +@option{-fvisibility=hidden}. + +@item +Types, but not their members, are not hidden by default. + +@item +The One Definition Rule is relaxed for types without explicit +visibility specifications which are defined in more than one different +shared object: those declarations are permitted if they would have +been permitted when this option was not used. +@end enumerate + +In new code it is better to use @option{-fvisibility=hidden} and +export those classes which are intended to be externally visible. +Unfortunately it is possible for code to rely, perhaps accidentally, +on the Visual Studio behaviour. + +Among the consequences of these changes are that static data members +of the same type with the same name but defined in different shared +objects will be different, so changing one will not change the other; +and that pointers to function members defined in different shared +objects may not compare equal. When this flag is given, it is a +violation of the ODR to define types with the same name differently. + @item -fno-weak @opindex fno-weak Do not use weak symbol support, even if it is provided by the linker. From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 05:02:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2457321F; Mon, 30 Dec 2013 05:02:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 050ED1587; Mon, 30 Dec 2013 05:02:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU52vbC047758; Mon, 30 Dec 2013 05:02:57 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU52vZv047757; Mon, 30 Dec 2013 05:02:57 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201312300502.rBU52vZv047757@svn.freebsd.org> From: Scott Long Date: Mon, 30 Dec 2013 05:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260076 - head/sbin/fsck_ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 05:02:58 -0000 Author: scottl Date: Mon Dec 30 05:02:57 2013 New Revision: 260076 URL: http://svnweb.freebsd.org/changeset/base/260076 Log: Add globs.c, missed in r260068,260069 Submitted by: peter Obtained from: Netflix MFC after: 3 Days Added: head/sbin/fsck_ffs/globs.c (contents, props changed) Added: head/sbin/fsck_ffs/globs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/fsck_ffs/globs.c Mon Dec 30 05:02:57 2013 (r260076) @@ -0,0 +1,165 @@ +/* + * Copyright (c) 1980, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if 0 +#ifndef lint +static const char copyright[] = +"@(#) Copyright (c) 1980, 1986, 1993\n\ + The Regents of the University of California. All rights reserved.\n"; +#endif /* not lint */ + +#ifndef lint +static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; +#endif /* not lint */ +#endif +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include "fsck.h" + +long readcnt[BT_NUMBUFTYPES]; +long totalreadcnt[BT_NUMBUFTYPES]; +struct timespec readtime[BT_NUMBUFTYPES]; +struct timespec totalreadtime[BT_NUMBUFTYPES]; +struct timespec startprog; +struct bufarea sblk; /* file system superblock */ +struct bufarea *pdirbp; /* current directory contents */ +struct bufarea *pbp; /* current inode block */ +ino_t cursnapshot; +long numdirs, dirhash, listmax, inplast; +long countdirs; /* number of directories we actually found */ +int adjrefcnt[MIBSIZE]; /* MIB command to adjust inode reference cnt */ +int adjblkcnt[MIBSIZE]; /* MIB command to adjust inode block count */ +int adjndir[MIBSIZE]; /* MIB command to adjust number of directories */ +int adjnbfree[MIBSIZE]; /* MIB command to adjust number of free blocks */ +int adjnifree[MIBSIZE]; /* MIB command to adjust number of free inodes */ +int adjnffree[MIBSIZE]; /* MIB command to adjust number of free frags */ +int adjnumclusters[MIBSIZE]; /* MIB command to adjust number of free clusters */ +int freefiles[MIBSIZE]; /* MIB command to free a set of files */ +int freedirs[MIBSIZE]; /* MIB command to free a set of directories */ +int freeblks[MIBSIZE]; /* MIB command to free a set of data blocks */ +struct fsck_cmd cmd; /* sysctl file system update commands */ +char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */ +char *cdevname; /* name of device being checked */ +long dev_bsize; /* computed value of DEV_BSIZE */ +long secsize; /* actual disk sector size */ +u_int real_dev_bsize; /* actual disk sector size, not overriden */ +char nflag; /* assume a no response */ +char yflag; /* assume a yes response */ +int bkgrdflag; /* use a snapshot to run on an active system */ +int bflag; /* location of alternate super block */ +int debug; /* output debugging info */ +int Eflag; /* delete empty data blocks */ +int Zflag; /* zero empty data blocks */ +int inoopt; /* trim out unused inodes */ +char ckclean; /* only do work if not cleanly unmounted */ +int cvtlevel; /* convert to newer file system format */ +int bkgrdcheck; /* determine if background check is possible */ +int bkgrdsumadj; /* whether the kernel have ability to adjust superblock summary */ +char usedsoftdep; /* just fix soft dependency inconsistencies */ +char preen; /* just fix normal inconsistencies */ +char rerun; /* rerun fsck. Only used in non-preen mode */ +int returntosingle; /* 1 => return to single user mode on exit */ +char resolved; /* cleared if unresolved changes => not clean */ +char havesb; /* superblock has been read */ +char skipclean; /* skip clean file systems if preening */ +int fsmodified; /* 1 => write done to file system */ +int fsreadfd; /* file descriptor for reading file system */ +int fswritefd; /* file descriptor for writing file system */ +int surrender; /* Give up if reads fail */ +int wantrestart; /* Restart fsck on early termination */ +ufs2_daddr_t maxfsblock; /* number of blocks in the file system */ +char *blockmap; /* ptr to primary blk allocation map */ +ino_t maxino; /* number of inodes in file system */ +ino_t lfdir; /* lost & found directory inode number */ +const char *lfname; /* lost & found directory name */ +int lfmode; /* lost & found directory creation mode */ +ufs2_daddr_t n_blks; /* number of blocks in use */ +ino_t n_files; /* number of files in use */ +volatile sig_atomic_t got_siginfo; /* received a SIGINFO */ +volatile sig_atomic_t got_sigalarm; /* received a SIGALRM */ +struct ufs1_dinode ufs1_zino; +struct ufs2_dinode ufs2_zino; + +void +fsckinit(void) +{ + bzero(readcnt, sizeof(long) * BT_NUMBUFTYPES); + bzero(totalreadcnt, sizeof(long) * BT_NUMBUFTYPES); + bzero(readtime, sizeof(struct timespec) * BT_NUMBUFTYPES); + bzero(totalreadtime, sizeof(struct timespec) * BT_NUMBUFTYPES); + bzero(&startprog, sizeof(struct timespec));; + bzero(&sblk, sizeof(struct bufarea)); + pdirbp = NULL; + pbp = NULL; + cursnapshot = 0; + numdirs = dirhash = listmax = inplast = 0; + countdirs = 0; + bzero(adjrefcnt, sizeof(int) * MIBSIZE); + bzero(adjblkcnt, sizeof(int) * MIBSIZE); + bzero(adjndir, sizeof(int) * MIBSIZE); + bzero(adjnbfree, sizeof(int) * MIBSIZE); + bzero(adjnifree, sizeof(int) * MIBSIZE); + bzero(adjnffree, sizeof(int) * MIBSIZE); + bzero(adjnumclusters, sizeof(int) * MIBSIZE); + bzero(freefiles, sizeof(int) * MIBSIZE); + bzero(freedirs, sizeof(int) * MIBSIZE); + bzero(freeblks, sizeof(int) * MIBSIZE); + bzero(&cmd, sizeof(struct fsck_cmd)); + bzero(snapname, sizeof(char) * BUFSIZ); + cdevname = NULL; + dev_bsize = 0; + secsize = 0; + real_dev_bsize = 0; + bkgrdsumadj = 0; + usedsoftdep = 0; + rerun = 0; + returntosingle = 0; + resolved = 0; + havesb = 0; + fsmodified = 0; + fsreadfd = 0; + fswritefd = 0; + maxfsblock = 0; + blockmap = NULL; + maxino = 0; + lfdir = 0; + lfname = "lost+found"; + lfmode = 0700; + n_blks = 0; + n_files = 0; + got_siginfo = 0; + got_sigalarm = 0; + bzero(&ufs1_zino, sizeof(struct ufs1_dinode)); + bzero(&ufs2_zino, sizeof(struct ufs2_dinode)); +} From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 05:19:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D92C3F1; Mon, 30 Dec 2013 05:19: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EDB56161A; Mon, 30 Dec 2013 05:19:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU5JRec052442; Mon, 30 Dec 2013 05:19:27 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU5JRLR052441; Mon, 30 Dec 2013 05:19:27 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201312300519.rBU5JRLR052441@svn.freebsd.org> From: Scott Long Date: Mon, 30 Dec 2013 05:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260077 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 05:19:28 -0000 Author: scottl Date: Mon Dec 30 05:19:27 2013 New Revision: 260077 URL: http://svnweb.freebsd.org/changeset/base/260077 Log: Merge r256563: In the flowtable scanner, restart the scan at the last found position, not at position 0. Changes the scanner from O(N^2) to O(N). Reviewed by: emax Obtained from: Netflix Modified: stable/10/sys/net/flowtable.c Modified: stable/10/sys/net/flowtable.c ============================================================================== --- stable/10/sys/net/flowtable.c Mon Dec 30 05:02:57 2013 (r260076) +++ stable/10/sys/net/flowtable.c Mon Dec 30 05:19:27 2013 (r260077) @@ -1401,7 +1401,7 @@ fle_free(struct flentry *fle, struct flo static void flowtable_free_stale(struct flowtable *ft, struct rtentry *rt) { - int curbit = 0, count; + int curbit = 0, count, tmpsize; struct flentry *fle, **flehead, *fleprev; struct flentry *flefreehead, *flefreetail, *fletmp; bitstr_t *mask, *tmpmask; @@ -1410,6 +1410,7 @@ flowtable_free_stale(struct flowtable *f flefreehead = flefreetail = NULL; mask = flowtable_mask(ft); tmpmask = ft->ft_tmpmask; + tmpsize = ft->ft_size; memcpy(tmpmask, mask, ft->ft_size/8); /* * XXX Note to self, bit_ffs operates at the byte level @@ -1479,7 +1480,9 @@ flowtable_free_stale(struct flowtable *f bit_clear(mask, curbit); FL_ENTRY_UNLOCK(ft, curbit); bit_clear(tmpmask, curbit); - bit_ffs(tmpmask, ft->ft_size, &curbit); + tmpmask += (curbit / 8); + tmpsize -= (curbit / 8) * 8; + bit_ffs(tmpmask, tmpsize, &curbit); } count = 0; while ((fle = flefreehead) != NULL) { From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 05:22:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2E2D52C; Mon, 30 Dec 2013 05:22:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCBF41670; Mon, 30 Dec 2013 05:22:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU5MMun055336; Mon, 30 Dec 2013 05:22:22 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU5MMiw055333; Mon, 30 Dec 2013 05:22:22 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201312300522.rBU5MMiw055333@svn.freebsd.org> From: Kirk McKusick Date: Mon, 30 Dec 2013 05:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260078 - in stable/10/sys/ufs: ffs ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 05:22:23 -0000 Author: mckusick Date: Mon Dec 30 05:22:22 2013 New Revision: 260078 URL: http://svnweb.freebsd.org/changeset/base/260078 Log: MFC of 256801, 256803, 256808, 256812, 256817, 256845, and 256860. This set of changes puts in place the infrastructure to allow soft updates to be multi-threaded. It introduces no functional changes from its current operation. MFC of 256860: Allow kernels without options SOFTUPDATES to build. This should fix the embedded tinderboxes. Reviewed by: emaste MFC of 256845: Fix build problem on ARM (which defaults to building without soft updates). Reported by: Tinderbox Sponsored by: Netflix MFC of 256817: Restructuring of the soft updates code to set it up so that the single kernel-wide soft update lock can be replaced with a per-filesystem soft-updates lock. This per-filesystem lock will allow each filesystem to have its own soft-updates flushing thread rather than being limited to a single soft-updates flushing thread for the entire kernel. Move soft update variables out of the ufsmount structure and into their own mount_softdeps structure referenced by ufsmount field um_softdep. Eventually the per-filesystem lock will be in this structure. For now there is simply a pointer to the kernel-wide soft updates lock. Change all instances of ACQUIRE_LOCK and FREE_LOCK to pass the lock pointer in the mount_softdeps structure instead of a pointer to the kernel-wide soft-updates lock. Replace the five hash tables used by soft updates with per-filesystem copies of these tables allocated in the mount_softdeps structure. Several functions that flush dependencies when too many are allocated in the kernel used to operate across all filesystems. They are now parameterized to flush dependencies from a specified filesystem. For now, we stick with the round-robin flushing strategy when the kernel as a whole has too many dependencies allocated. While there are many lines of changes, there should be no functional change in the operation of soft updates. Tested by: Peter Holm and Scott Long Sponsored by: Netflix MFC of 256812: Fourth of several cleanups to soft dependency implementation. Add KASSERTS that soft dependency functions only get called for filesystems running with soft dependencies. Calling these functions when soft updates are not compiled into the system become panic's. No functional change. Tested by: Peter Holm and Scott Long Sponsored by: Netflix MFC of 256808: Third of several cleanups to soft dependency implementation. Ensure that softdep_unmount() and softdep_setup_sbupdate() only get called for filesystems running with soft dependencies. No functional change. Tested by: Peter Holm and Scott Long Sponsored by: Netflix MFC of 256803: Second of several cleanups to soft dependency implementation. Delete two unused functions in ffs_sofdep.c. No functional change. Tested by: Peter Holm and Scott Long Sponsored by: Netflix MFC of 256801: First of several cleanups to soft dependency implementation. Convert three functions exported from ffs_softdep.c to static functions as they are not used outside of ffs_softdep.c. No functional change. Tested by: Peter Holm and Scott Long Sponsored by: Netflix Modified: stable/10/sys/ufs/ffs/ffs_extern.h stable/10/sys/ufs/ffs/ffs_softdep.c stable/10/sys/ufs/ffs/ffs_vfsops.c stable/10/sys/ufs/ffs/softdep.h stable/10/sys/ufs/ufs/ufs_extern.h stable/10/sys/ufs/ufs/ufsmount.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_extern.h ============================================================================== --- stable/10/sys/ufs/ffs/ffs_extern.h Mon Dec 30 05:19:27 2013 (r260077) +++ stable/10/sys/ufs/ffs/ffs_extern.h Mon Dec 30 05:22:22 2013 (r260078) @@ -152,9 +152,7 @@ void softdep_setup_sbupdate(struct ufsmo void softdep_fsync_mountdev(struct vnode *); int softdep_sync_metadata(struct vnode *); int softdep_sync_buf(struct vnode *, struct buf *, int); -int softdep_process_worklist(struct mount *, int); int softdep_fsync(struct vnode *); -int softdep_waitidle(struct mount *); int softdep_prealloc(struct vnode *, int); int softdep_journal_lookup(struct mount *, struct vnode **); void softdep_journal_freeblocks(struct inode *, struct ucred *, off_t, int); Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Mon Dec 30 05:19:27 2013 (r260077) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Mon Dec 30 05:22:22 2013 (r260078) @@ -138,6 +138,7 @@ softdep_unmount(mp) struct mount *mp; { + panic("softdep_unmount called"); } void @@ -146,6 +147,8 @@ softdep_setup_sbupdate(ump, fs, bp) struct fs *fs; struct buf *bp; { + + panic("softdep_setup_sbupdate called"); } void @@ -433,8 +436,6 @@ softdep_prealloc(vp, waitok) { panic("%s called", __FUNCTION__); - - return (0); } int @@ -503,14 +504,14 @@ int softdep_sync_metadata(struct vnode *vp) { - return (0); + panic("softdep_sync_metadata called"); } int softdep_sync_buf(struct vnode *vp, struct buf *bp, int waitfor) { - return (0); + panic("softdep_sync_buf called"); } int @@ -521,14 +522,6 @@ softdep_slowdown(vp) panic("softdep_slowdown called"); } -void -softdep_releasefile(ip) - struct inode *ip; /* inode with the zero effective link count */ -{ - - panic("softdep_releasefile called"); -} - int softdep_request_cleanup(fs, vp, cred, resource) struct fs *fs; @@ -543,16 +536,16 @@ softdep_request_cleanup(fs, vp, cred, re int softdep_check_suspend(struct mount *mp, struct vnode *devvp, - int softdep_deps, - int softdep_accdeps, + int softdep_depcnt, + int softdep_accdepcnt, int secondary_writes, int secondary_accwrites) { struct bufobj *bo; int error; - (void) softdep_deps, - (void) softdep_accdeps; + (void) softdep_depcnt, + (void) softdep_accdepcnt; bo = &devvp->v_bufobj; ASSERT_BO_WLOCKED(bo); @@ -623,48 +616,6 @@ softdep_freework(wkhd) FEATURE(softupdates, "FFS soft-updates support"); -/* - * These definitions need to be adapted to the system to which - * this file is being ported. - */ - -#define M_SOFTDEP_FLAGS (M_WAITOK) - -#define D_PAGEDEP 0 -#define D_INODEDEP 1 -#define D_BMSAFEMAP 2 -#define D_NEWBLK 3 -#define D_ALLOCDIRECT 4 -#define D_INDIRDEP 5 -#define D_ALLOCINDIR 6 -#define D_FREEFRAG 7 -#define D_FREEBLKS 8 -#define D_FREEFILE 9 -#define D_DIRADD 10 -#define D_MKDIR 11 -#define D_DIRREM 12 -#define D_NEWDIRBLK 13 -#define D_FREEWORK 14 -#define D_FREEDEP 15 -#define D_JADDREF 16 -#define D_JREMREF 17 -#define D_JMVREF 18 -#define D_JNEWBLK 19 -#define D_JFREEBLK 20 -#define D_JFREEFRAG 21 -#define D_JSEG 22 -#define D_JSEGDEP 23 -#define D_SBDEP 24 -#define D_JTRUNC 25 -#define D_JFSYNC 26 -#define D_SENTINEL 27 -#define D_LAST D_SENTINEL - -unsigned long dep_current[D_LAST + 1]; -unsigned long dep_highuse[D_LAST + 1]; -unsigned long dep_total[D_LAST + 1]; -unsigned long dep_write[D_LAST + 1]; - static SYSCTL_NODE(_debug, OID_AUTO, softdep, CTLFLAG_RW, 0, "soft updates stats"); static SYSCTL_NODE(_debug_softdep, OID_AUTO, total, CTLFLAG_RW, 0, @@ -676,6 +627,11 @@ static SYSCTL_NODE(_debug_softdep, OID_A static SYSCTL_NODE(_debug_softdep, OID_AUTO, write, CTLFLAG_RW, 0, "current dependencies written"); +unsigned long dep_current[D_LAST + 1]; +unsigned long dep_highuse[D_LAST + 1]; +unsigned long dep_total[D_LAST + 1]; +unsigned long dep_write[D_LAST + 1]; + #define SOFTDEP_TYPE(type, str, long) \ static MALLOC_DEFINE(M_ ## type, #str, long); \ SYSCTL_ULONG(_debug_softdep_total, OID_AUTO, str, CTLFLAG_RD, \ @@ -720,6 +676,9 @@ static MALLOC_DEFINE(M_SENTINEL, "sentin static MALLOC_DEFINE(M_SAVEDINO, "savedino", "Saved inodes"); static MALLOC_DEFINE(M_JBLOCKS, "jblocks", "Journal block locations"); +static MALLOC_DEFINE(M_MOUNTDATA, "softdep", "Softdep per-mount data"); + +#define M_SOFTDEP_FLAGS (M_WAITOK) /* * translate from workitem type to memory type @@ -756,8 +715,6 @@ static struct malloc_type *memtype[] = { M_SENTINEL }; -static LIST_HEAD(mkdirlist, mkdir) mkdirlisthd; - #define DtoM(type) (memtype[type]) /* @@ -773,49 +730,16 @@ static LIST_HEAD(mkdirlist, mkdir) mkdir #define DOT_OFFSET offsetof(struct dirtemplate, dot_ino) /* - * Forward declarations. - */ -struct inodedep_hashhead; -struct newblk_hashhead; -struct pagedep_hashhead; -struct bmsafemap_hashhead; - -/* - * Private journaling structures. - */ -struct jblocks { - struct jseglst jb_segs; /* TAILQ of current segments. */ - struct jseg *jb_writeseg; /* Next write to complete. */ - struct jseg *jb_oldestseg; /* Oldest segment with valid entries. */ - struct jextent *jb_extent; /* Extent array. */ - uint64_t jb_nextseq; /* Next sequence number. */ - uint64_t jb_oldestwrseq; /* Oldest written sequence number. */ - uint8_t jb_needseg; /* Need a forced segment. */ - uint8_t jb_suspended; /* Did journal suspend writes? */ - int jb_avail; /* Available extents. */ - int jb_used; /* Last used extent. */ - int jb_head; /* Allocator head. */ - int jb_off; /* Allocator extent offset. */ - int jb_blocks; /* Total disk blocks covered. */ - int jb_free; /* Total disk blocks free. */ - int jb_min; /* Minimum free space. */ - int jb_low; /* Low on space. */ - int jb_age; /* Insertion time of oldest rec. */ -}; - -struct jextent { - ufs2_daddr_t je_daddr; /* Disk block address. */ - int je_blocks; /* Disk block count. */ -}; - -/* * Internal function prototypes. */ +static void check_clear_deps(struct mount *); static void softdep_error(char *, int); +static int softdep_process_worklist(struct mount *, int); +static int softdep_waitidle(struct mount *); static void drain_output(struct vnode *); static struct buf *getdirtybuf(struct buf *, struct rwlock *, int); -static void clear_remove(void); -static void clear_inodedeps(void); +static void clear_remove(struct mount *); +static void clear_inodedeps(struct mount *); static void unlinked_inodedep(struct mount *, struct inodedep *); static void clear_unlinked_inodedep(struct inodedep *); static struct inodedep *first_unlinked_inodedep(struct ufsmount *); @@ -926,7 +850,7 @@ static inline void setup_freeindir(struc static inline struct freeblks *newfreeblks(struct mount *, struct inode *); static void freeblks_free(struct ufsmount *, struct freeblks *, int); static void indir_trunc(struct freework *, ufs2_daddr_t, ufs_lbn_t); -ufs2_daddr_t blkcount(struct fs *, ufs2_daddr_t, off_t); +static ufs2_daddr_t blkcount(struct fs *, ufs2_daddr_t, off_t); static int trunc_check_buf(struct buf *, int *, ufs_lbn_t, int, int); static void trunc_dependencies(struct inode *, struct freeblks *, ufs_lbn_t, int, int); @@ -959,20 +883,20 @@ static void allocdirect_merge(struct all struct allocdirect *, struct allocdirect *); static struct freefrag *allocindir_merge(struct allocindir *, struct allocindir *); -static int bmsafemap_find(struct bmsafemap_hashhead *, struct mount *, int, +static int bmsafemap_find(struct bmsafemap_hashhead *, int, struct bmsafemap **); static struct bmsafemap *bmsafemap_lookup(struct mount *, struct buf *, int cg, struct bmsafemap *); -static int newblk_find(struct newblk_hashhead *, struct mount *, ufs2_daddr_t, - int, struct newblk **); +static int newblk_find(struct newblk_hashhead *, ufs2_daddr_t, int, + struct newblk **); static int newblk_lookup(struct mount *, ufs2_daddr_t, int, struct newblk **); -static int inodedep_find(struct inodedep_hashhead *, struct fs *, ino_t, +static int inodedep_find(struct inodedep_hashhead *, ino_t, struct inodedep **); static int inodedep_lookup(struct mount *, ino_t, int, struct inodedep **); static int pagedep_lookup(struct mount *, struct buf *bp, ino_t, ufs_lbn_t, int, struct pagedep **); static int pagedep_find(struct pagedep_hashhead *, ino_t, ufs_lbn_t, - struct mount *mp, int, struct pagedep **); + struct pagedep **); static void pause_timer(void *); static int request_cleanup(struct mount *, int); static int process_worklist_item(struct mount *, int, int); @@ -987,9 +911,9 @@ static void remove_from_worklist(struct static void softdep_flush(void); static void softdep_flushjournal(struct mount *); static int softdep_speedup(void); -static void worklist_speedup(void); +static void worklist_speedup(struct mount *); static int journal_mount(struct mount *, struct fs *, struct ucred *); -static void journal_unmount(struct mount *); +static void journal_unmount(struct ufsmount *); static int journal_space(struct ufsmount *, int); static void journal_suspend(struct ufsmount *); static int journal_unsuspend(struct ufsmount *ump); @@ -1035,15 +959,25 @@ static void softdep_disk_write_complete( static void softdep_deallocate_dependencies(struct buf *); static int softdep_count_dependencies(struct buf *bp, int); +/* + * Global lock over all of soft updates. + */ static struct rwlock lk; RW_SYSINIT(softdep_lock, &lk, "Softdep Lock"); -#define TRY_ACQUIRE_LOCK(lk) rw_try_wlock(lk) -#define ACQUIRE_LOCK(lk) rw_wlock(lk) -#define FREE_LOCK(lk) rw_wunlock(lk) +/* + * Allow per-filesystem soft-updates locking. + * For now all use the same global lock defined above. + */ +#define LOCK_PTR(ump) ((ump)->um_softdep->sd_fslock) +#define TRY_ACQUIRE_LOCK(ump) rw_try_wlock((ump)->um_softdep->sd_fslock) +#define ACQUIRE_LOCK(ump) rw_wlock((ump)->um_softdep->sd_fslock) +#define FREE_LOCK(ump) rw_wunlock((ump)->um_softdep->sd_fslock) +#define LOCK_OWNED(ump) rw_assert((ump)->um_softdep->sd_fslock, \ + RA_WLOCKED) -#define BUF_AREC(bp) lockallowrecurse(&(bp)->b_lock) -#define BUF_NOREC(bp) lockdisablerecurse(&(bp)->b_lock) +#define BUF_AREC(bp) lockallowrecurse(&(bp)->b_lock) +#define BUF_NOREC(bp) lockdisablerecurse(&(bp)->b_lock) /* * Worklist queue management. @@ -1078,7 +1012,7 @@ worklist_insert(head, item, locked) { if (locked) - rw_assert(&lk, RA_WLOCKED); + LOCK_OWNED(VFSTOUFS(item->wk_mp)); if (item->wk_state & ONWORKLIST) panic("worklist_insert: %p %s(0x%X) already on list", item, TYPENAME(item->wk_type), item->wk_state); @@ -1093,7 +1027,7 @@ worklist_remove(item, locked) { if (locked) - rw_assert(&lk, RA_WLOCKED); + LOCK_OWNED(VFSTOUFS(item->wk_mp)); if ((item->wk_state & ONWORKLIST) == 0) panic("worklist_remove: %p %s(0x%X) not on list", item, TYPENAME(item->wk_type), item->wk_state); @@ -1166,7 +1100,6 @@ jwork_move(dst, src) freedep = freedep_merge(WK_FREEDEP(wk), freedep); } - rw_assert(&lk, RA_WLOCKED); while ((wk = LIST_FIRST(src)) != NULL) { WORKLIST_REMOVE(wk); WORKLIST_INSERT(dst, wk); @@ -1221,7 +1154,6 @@ workitem_free(item, type) int type; { struct ufsmount *ump; - rw_assert(&lk, RA_WLOCKED); #ifdef DEBUG if (item->wk_state & ONWORKLIST) @@ -1234,6 +1166,7 @@ workitem_free(item, type) if (item->wk_state & IOWAITING) wakeup(item); ump = VFSTOUFS(item->wk_mp); + LOCK_OWNED(ump); KASSERT(ump->softdep_deps > 0, ("workitem_free: %s: softdep_deps going negative", ump->um_fs->fs_fsmnt)); @@ -1242,7 +1175,11 @@ workitem_free(item, type) KASSERT(dep_current[item->wk_type] > 0, ("workitem_free: %s: dep_current[%s] going negative", ump->um_fs->fs_fsmnt, TYPENAME(item->wk_type))); + KASSERT(ump->softdep_curdeps[item->wk_type] > 0, + ("workitem_free: %s: softdep_curdeps[%s] going negative", + ump->um_fs->fs_fsmnt, TYPENAME(item->wk_type))); dep_current[item->wk_type]--; + ump->softdep_curdeps[item->wk_type] -= 1; free(item, DtoM(type)); } @@ -1259,14 +1196,15 @@ workitem_alloc(item, type, mp) item->wk_state = 0; ump = VFSTOUFS(mp); - ACQUIRE_LOCK(&lk); + ACQUIRE_LOCK(ump); dep_current[type]++; if (dep_current[type] > dep_highuse[type]) dep_highuse[type] = dep_current[type]; dep_total[type]++; + ump->softdep_curdeps[type] += 1; ump->softdep_deps++; ump->softdep_accdeps++; - FREE_LOCK(&lk); + FREE_LOCK(ump); } static void @@ -1274,7 +1212,15 @@ workitem_reassign(item, newtype) struct worklist *item; int newtype; { + struct ufsmount *ump; + ump = VFSTOUFS(item->wk_mp); + LOCK_OWNED(ump); + KASSERT(ump->softdep_curdeps[item->wk_type] > 0, + ("workitem_reassign: %s: softdep_curdeps[%s] going negative", + VFSTOUFS(item->wk_mp)->um_fs->fs_fsmnt, TYPENAME(item->wk_type))); + ump->softdep_curdeps[item->wk_type] -= 1; + ump->softdep_curdeps[newtype] += 1; KASSERT(dep_current[item->wk_type] > 0, ("workitem_reassign: %s: dep_current[%s] going negative", VFSTOUFS(item->wk_mp)->um_fs->fs_fsmnt, TYPENAME(item->wk_type))); @@ -1295,7 +1241,8 @@ static int tickdelay = 2; /* number of t static int proc_waiting; /* tracks whether we have a timeout posted */ static int *stat_countp; /* statistic to count in proc_waiting timeout */ static struct callout softdep_callout; -static int req_pending; +static struct mount *req_pending; +#define ALLCLEAN ((struct mount *)-1) static int req_clear_inodedeps; /* syncer process flush some inodedeps */ static int req_clear_remove; /* syncer process flush some freeblks */ static int softdep_flushcache = 0; /* Should we do BIO_FLUSH? */ @@ -1303,6 +1250,7 @@ static int softdep_flushcache = 0; /* Sh /* * runtime statistics */ +static int stat_softdep_mounts; /* number of softdep mounted filesystems */ static int stat_worklist_push; /* number of worklist cleanups */ static int stat_blk_limit_push; /* number of times block limit neared */ static int stat_ino_limit_push; /* number of times inode limit neared */ @@ -1334,6 +1282,8 @@ SYSCTL_INT(_debug_softdep, OID_AUTO, tic &tickdelay, 0, ""); SYSCTL_INT(_debug_softdep, OID_AUTO, maxindirdeps, CTLFLAG_RW, &maxindirdeps, 0, ""); +SYSCTL_INT(_debug_softdep, OID_AUTO, softdep_mounts, CTLFLAG_RD, + &stat_softdep_mounts, 0, ""); SYSCTL_INT(_debug_softdep, OID_AUTO, worklist_push, CTLFLAG_RW, &stat_worklist_push, 0,""); SYSCTL_INT(_debug_softdep, OID_AUTO, blk_limit_push, CTLFLAG_RW, @@ -1387,13 +1337,10 @@ SYSCTL_INT(_debug_softdep, OID_AUTO, flu SYSCTL_DECL(_vfs_ffs); -LIST_HEAD(bmsafemap_hashhead, bmsafemap) *bmsafemap_hashtbl; -static u_long bmsafemap_hash; /* size of hash table - 1 */ - -static int compute_summary_at_mount = 0; /* Whether to recompute the summary at mount time */ +/* Whether to recompute the summary at mount time */ +static int compute_summary_at_mount = 0; SYSCTL_INT(_vfs_ffs, OID_AUTO, compute_summary_at_mount, CTLFLAG_RW, &compute_summary_at_mount, 0, "Recompute summary at mount"); - static struct proc *softdepproc; static struct kproc_desc softdep_kp = { "softdepflush", @@ -1418,21 +1365,6 @@ softdep_flush(void) for (;;) { kproc_suspend_check(softdepproc); - ACQUIRE_LOCK(&lk); - /* - * If requested, try removing inode or removal dependencies. - */ - if (req_clear_inodedeps) { - clear_inodedeps(); - req_clear_inodedeps -= 1; - wakeup_one(&proc_waiting); - } - if (req_clear_remove) { - clear_remove(); - req_clear_remove -= 1; - wakeup_one(&proc_waiting); - } - FREE_LOCK(&lk); remaining = progress = 0; mtx_lock(&mountlist_mtx); for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { @@ -1441,8 +1373,8 @@ softdep_flush(void) continue; if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK)) continue; - progress += softdep_process_worklist(mp, 0); ump = VFSTOUFS(mp); + progress += softdep_process_worklist(mp, 0); remaining += ump->softdep_on_worklist; mtx_lock(&mountlist_mtx); nmp = TAILQ_NEXT(mp, mnt_list); @@ -1451,20 +1383,21 @@ softdep_flush(void) mtx_unlock(&mountlist_mtx); if (remaining && progress) continue; - ACQUIRE_LOCK(&lk); - if (!req_pending) + rw_wlock(&lk); + if (req_pending == NULL) msleep(&req_pending, &lk, PVM, "sdflush", hz); - req_pending = 0; - FREE_LOCK(&lk); + req_pending = NULL; + rw_wunlock(&lk); } } static void -worklist_speedup(void) +worklist_speedup(mp) + struct mount *mp; { rw_assert(&lk, RA_WLOCKED); if (req_pending == 0) { - req_pending = 1; + req_pending = mp; wakeup(&req_pending); } } @@ -1473,9 +1406,9 @@ static int softdep_speedup(void) { - worklist_speedup(); + worklist_speedup(ALLCLEAN); bd_speedup(); - return speedup_syncer(); + return (speedup_syncer()); } /* @@ -1496,8 +1429,8 @@ add_to_worklist(wk, flags) { struct ufsmount *ump; - rw_assert(&lk, RA_WLOCKED); ump = VFSTOUFS(wk->wk_mp); + LOCK_OWNED(ump); if (wk->wk_state & ONWORKLIST) panic("add_to_worklist: %s(0x%X) already on list", TYPENAME(wk->wk_type), wk->wk_state); @@ -1513,7 +1446,7 @@ add_to_worklist(wk, flags) } ump->softdep_on_worklist += 1; if (flags & WK_NODELAY) - worklist_speedup(); + worklist_speedup(wk->wk_mp); } /* @@ -1549,9 +1482,11 @@ wait_worklist(wk, wmesg) struct worklist *wk; char *wmesg; { + struct ufsmount *ump; + ump = VFSTOUFS(wk->wk_mp); wk->wk_state |= IOWAITING; - msleep(wk, &lk, PVM, wmesg, 0); + msleep(wk, LOCK_PTR(ump), PVM, wmesg, 0); } /* @@ -1563,7 +1498,7 @@ wait_worklist(wk, wmesg) * ordering ensures that no new triples will be generated * until all the old ones have been purged from the dependency lists. */ -int +static int softdep_process_worklist(mp, full) struct mount *mp; int full; @@ -1573,54 +1508,41 @@ softdep_process_worklist(mp, full) long starttime; KASSERT(mp != NULL, ("softdep_process_worklist: NULL mp")); - /* - * Record the process identifier of our caller so that we can give - * this process preferential treatment in request_cleanup below. - */ + if (MOUNTEDSOFTDEP(mp) == 0) + return (0); matchcnt = 0; ump = VFSTOUFS(mp); - ACQUIRE_LOCK(&lk); + ACQUIRE_LOCK(ump); starttime = time_second; - softdep_process_journal(mp, NULL, full?MNT_WAIT:0); + softdep_process_journal(mp, NULL, full ? MNT_WAIT : 0); + check_clear_deps(mp); while (ump->softdep_on_worklist > 0) { if ((cnt = process_worklist_item(mp, 10, LK_NOWAIT)) == 0) break; else matchcnt += cnt; - /* - * If requested, try removing inode or removal dependencies. - */ - if (req_clear_inodedeps) { - clear_inodedeps(); - req_clear_inodedeps -= 1; - wakeup_one(&proc_waiting); - } - if (req_clear_remove) { - clear_remove(); - req_clear_remove -= 1; - wakeup_one(&proc_waiting); - } + check_clear_deps(mp); /* * We do not generally want to stop for buffer space, but if * we are really being a buffer hog, we will stop and wait. */ if (should_yield()) { - FREE_LOCK(&lk); + FREE_LOCK(ump); kern_yield(PRI_USER); bwillwrite(); - ACQUIRE_LOCK(&lk); + ACQUIRE_LOCK(ump); } /* * Never allow processing to run for more than one - * second. Otherwise the other mountpoints may get - * excessively backlogged. + * second. This gives the syncer thread the opportunity + * to pause if appropriate. */ if (!full && starttime != time_second) break; } if (full == 0) journal_unsuspend(ump); - FREE_LOCK(&lk); + FREE_LOCK(ump); return (matchcnt); } @@ -1635,12 +1557,13 @@ process_removes(vp) { struct inodedep *inodedep; struct dirrem *dirrem; + struct ufsmount *ump; struct mount *mp; ino_t inum; - rw_assert(&lk, RA_WLOCKED); - mp = vp->v_mount; + ump = VFSTOUFS(mp); + LOCK_OWNED(ump); inum = VTOI(vp)->i_number; for (;;) { top: @@ -1663,12 +1586,12 @@ top: if (dirrem == NULL) return; remove_from_worklist(&dirrem->dm_list); - FREE_LOCK(&lk); + FREE_LOCK(ump); if (vn_start_secondary_write(NULL, &mp, V_NOWAIT)) panic("process_removes: suspended filesystem"); handle_workitem_remove(dirrem, 0); vn_finished_secondary_write(mp); - ACQUIRE_LOCK(&lk); + ACQUIRE_LOCK(ump); } } @@ -1684,13 +1607,14 @@ process_truncates(vp) { struct inodedep *inodedep; struct freeblks *freeblks; + struct ufsmount *ump; struct mount *mp; ino_t inum; int cgwait; - rw_assert(&lk, RA_WLOCKED); - mp = vp->v_mount; + ump = VFSTOUFS(mp); + LOCK_OWNED(ump); inum = VTOI(vp)->i_number; for (;;) { if (inodedep_lookup(mp, inum, 0, &inodedep) == 0) @@ -1711,33 +1635,33 @@ process_truncates(vp) } /* Freeblks is waiting on a inode write. */ if ((freeblks->fb_state & COMPLETE) == 0) { - FREE_LOCK(&lk); + FREE_LOCK(ump); ffs_update(vp, 1); - ACQUIRE_LOCK(&lk); + ACQUIRE_LOCK(ump); break; } if ((freeblks->fb_state & (ALLCOMPLETE | ONWORKLIST)) == (ALLCOMPLETE | ONWORKLIST)) { remove_from_worklist(&freeblks->fb_list); freeblks->fb_state |= INPROGRESS; - FREE_LOCK(&lk); + FREE_LOCK(ump); if (vn_start_secondary_write(NULL, &mp, V_NOWAIT)) panic("process_truncates: " "suspended filesystem"); handle_workitem_freeblocks(freeblks, 0); vn_finished_secondary_write(mp); - ACQUIRE_LOCK(&lk); + ACQUIRE_LOCK(ump); break; } if (freeblks->fb_cgwait) cgwait++; } if (cgwait) { - FREE_LOCK(&lk); + FREE_LOCK(ump); sync_cgs(mp, MNT_WAIT); ffs_sync_snap(mp, MNT_WAIT); - ACQUIRE_LOCK(&lk); + ACQUIRE_LOCK(ump); continue; } if (freeblks == NULL) @@ -1761,7 +1685,6 @@ process_worklist_item(mp, target, flags) int matchcnt; int error; - rw_assert(&lk, RA_WLOCKED); KASSERT(mp != NULL, ("process_worklist_item: NULL mp")); /* * If we are being called because of a process doing a @@ -1772,6 +1695,7 @@ process_worklist_item(mp, target, flags) return (-1); PHOLD(curproc); /* Don't let the stack go away. */ ump = VFSTOUFS(mp); + LOCK_OWNED(ump); matchcnt = 0; sentinel.wk_mp = NULL; sentinel.wk_type = D_SENTINEL; @@ -1788,7 +1712,7 @@ process_worklist_item(mp, target, flags) wk); wk->wk_state |= INPROGRESS; remove_from_worklist(wk); - FREE_LOCK(&lk); + FREE_LOCK(ump); if (vn_start_secondary_write(NULL, &mp, V_NOWAIT)) panic("process_worklist_item: suspended filesystem"); switch (wk->wk_type) { @@ -1821,7 +1745,7 @@ process_worklist_item(mp, target, flags) /* NOTREACHED */ } vn_finished_secondary_write(mp); - ACQUIRE_LOCK(&lk); + ACQUIRE_LOCK(ump); if (error == 0) { if (++matchcnt == target) break; @@ -1855,11 +1779,17 @@ softdep_move_dependencies(oldbp, newbp) struct buf *newbp; { struct worklist *wk, *wktail; + struct ufsmount *ump; int dirty; + if ((wk = LIST_FIRST(&oldbp->b_dep)) == NULL) + return (0); + KASSERT(MOUNTEDSOFTDEP(wk->wk_mp) != 0, + ("softdep_move_dependencies called on non-softdep filesystem")); dirty = 0; wktail = NULL; - ACQUIRE_LOCK(&lk); + ump = VFSTOUFS(wk->wk_mp); + ACQUIRE_LOCK(ump); while ((wk = LIST_FIRST(&oldbp->b_dep)) != NULL) { LIST_REMOVE(wk, wk_list); if (wk->wk_type == D_BMSAFEMAP && @@ -1871,7 +1801,7 @@ softdep_move_dependencies(oldbp, newbp) LIST_INSERT_AFTER(wktail, wk, wk_list); wktail = wk; } - FREE_LOCK(&lk); + FREE_LOCK(ump); return (dirty); } @@ -1909,7 +1839,7 @@ softdep_flushworklist(oldmnt, countp, td return (error); } -int +static int softdep_waitidle(struct mount *mp) { struct ufsmount *ump; @@ -1917,15 +1847,15 @@ softdep_waitidle(struct mount *mp) int i; ump = VFSTOUFS(mp); - ACQUIRE_LOCK(&lk); + ACQUIRE_LOCK(ump); for (i = 0; i < 10 && ump->softdep_deps; i++) { ump->softdep_req = 1; if (ump->softdep_on_worklist) panic("softdep_waitidle: work added after flush."); - msleep(&ump->softdep_deps, &lk, PVM, "softdeps", 1); + msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM, "softdeps", 1); } ump->softdep_req = 0; - FREE_LOCK(&lk); + FREE_LOCK(ump); error = 0; if (i == 10) { error = EBUSY; @@ -1952,6 +1882,8 @@ softdep_flushfiles(oldmnt, flags, td) int error, early, depcount, loopcnt, retry_flush_count, retry; int morework; + KASSERT(MOUNTEDSOFTDEP(oldmnt) != 0, + ("softdep_flushfiles called on non-softdep filesystem")); loopcnt = 10; retry_flush_count = 3; retry_flush: @@ -2022,12 +1954,14 @@ retry_flush: /* * Structure hashing. * - * There are three types of structures that can be looked up: + * There are four types of structures that can be looked up: * 1) pagedep structures identified by mount point, inode number, * and logical block. * 2) inodedep structures identified by mount point and inode number. * 3) newblk structures identified by mount point and * physical block number. + * 4) bmsafemap structures identified by mount point and + * cylinder group number. * * The "pagedep" and "inodedep" dependency structures are hashed * separately from the file blocks and inodes to which they correspond. @@ -2039,7 +1973,8 @@ retry_flush: * their allocdirect or allocindir structure. * * The lookup routines optionally create and hash a new instance when - * an existing entry is not found. + * an existing entry is not found. The bmsafemap lookup routine always + * allocates a new structure if an existing one is not found. */ #define DEPALLOC 0x0001 /* allocate structure if lookup fails */ #define NODELAY 0x0002 /* cannot do background work */ @@ -2047,26 +1982,20 @@ retry_flush: /* * Structures and routines associated with pagedep caching. */ -LIST_HEAD(pagedep_hashhead, pagedep) *pagedep_hashtbl; -u_long pagedep_hash; /* size of hash table - 1 */ -#define PAGEDEP_HASH(mp, inum, lbn) \ - (&pagedep_hashtbl[((((register_t)(mp)) >> 13) + (inum) + (lbn)) & \ - pagedep_hash]) +#define PAGEDEP_HASH(ump, inum, lbn) \ + (&(ump)->pagedep_hashtbl[((inum) + (lbn)) & (ump)->pagedep_hash_size]) static int -pagedep_find(pagedephd, ino, lbn, mp, flags, pagedeppp) +pagedep_find(pagedephd, ino, lbn, pagedeppp) struct pagedep_hashhead *pagedephd; ino_t ino; ufs_lbn_t lbn; - struct mount *mp; - int flags; struct pagedep **pagedeppp; { struct pagedep *pagedep; LIST_FOREACH(pagedep, pagedephd, pd_hash) { - if (ino == pagedep->pd_ino && lbn == pagedep->pd_lbn && - mp == pagedep->pd_list.wk_mp) { + if (ino == pagedep->pd_ino && lbn == pagedep->pd_lbn) { *pagedeppp = pagedep; return (1); } @@ -2092,10 +2021,12 @@ pagedep_lookup(mp, bp, ino, lbn, flags, struct pagedep *pagedep; struct pagedep_hashhead *pagedephd; struct worklist *wk; + struct ufsmount *ump; int ret; int i; - rw_assert(&lk, RA_WLOCKED); + ump = VFSTOUFS(mp); + LOCK_OWNED(ump); if (bp) { LIST_FOREACH(wk, &bp->b_dep, wk_list) { if (wk->wk_type == D_PAGEDEP) { @@ -2104,8 +2035,8 @@ pagedep_lookup(mp, bp, ino, lbn, flags, } } } - pagedephd = PAGEDEP_HASH(mp, ino, lbn); - ret = pagedep_find(pagedephd, ino, lbn, mp, flags, pagedeppp); + pagedephd = PAGEDEP_HASH(ump, ino, lbn); + ret = pagedep_find(pagedephd, ino, lbn, pagedeppp); if (ret) { if (((*pagedeppp)->pd_state & ONWORKLIST) == 0 && bp) WORKLIST_INSERT(&bp->b_dep, &(*pagedeppp)->pd_list); @@ -2113,12 +2044,12 @@ pagedep_lookup(mp, bp, ino, lbn, flags, } if ((flags & DEPALLOC) == 0) return (0); - FREE_LOCK(&lk); + FREE_LOCK(ump); pagedep = malloc(sizeof(struct pagedep), M_PAGEDEP, M_SOFTDEP_FLAGS|M_ZERO); workitem_alloc(&pagedep->pd_list, D_PAGEDEP, mp); - ACQUIRE_LOCK(&lk); - ret = pagedep_find(pagedephd, ino, lbn, mp, flags, pagedeppp); + ACQUIRE_LOCK(ump); + ret = pagedep_find(pagedephd, ino, lbn, pagedeppp); if (*pagedeppp) { /* * This should never happen since we only create pagedeps @@ -2142,22 +2073,19 @@ pagedep_lookup(mp, bp, ino, lbn, flags, /* * Structures and routines associated with inodedep caching. */ -LIST_HEAD(inodedep_hashhead, inodedep) *inodedep_hashtbl; -static u_long inodedep_hash; /* size of hash table - 1 */ -#define INODEDEP_HASH(fs, inum) \ - (&inodedep_hashtbl[((((register_t)(fs)) >> 13) + (inum)) & inodedep_hash]) +#define INODEDEP_HASH(ump, inum) \ + (&(ump)->inodedep_hashtbl[(inum) & (ump)->inodedep_hash_size]) static int -inodedep_find(inodedephd, fs, inum, inodedeppp) +inodedep_find(inodedephd, inum, inodedeppp) struct inodedep_hashhead *inodedephd; - struct fs *fs; ino_t inum; struct inodedep **inodedeppp; { struct inodedep *inodedep; LIST_FOREACH(inodedep, inodedephd, id_hash) - if (inum == inodedep->id_ino && fs == inodedep->id_fs) + if (inum == inodedep->id_ino) break; if (inodedep) { *inodedeppp = inodedep; @@ -2182,13 +2110,15 @@ inodedep_lookup(mp, inum, flags, inodede { struct inodedep *inodedep; struct inodedep_hashhead *inodedephd; + struct ufsmount *ump; struct fs *fs; - rw_assert(&lk, RA_WLOCKED); - fs = VFSTOUFS(mp)->um_fs; - inodedephd = INODEDEP_HASH(fs, inum); + ump = VFSTOUFS(mp); + LOCK_OWNED(ump); + fs = ump->um_fs; + inodedephd = INODEDEP_HASH(ump, inum); - if (inodedep_find(inodedephd, fs, inum, inodedeppp)) + if (inodedep_find(inodedephd, inum, inodedeppp)) return (1); if ((flags & DEPALLOC) == 0) return (0); @@ -2197,12 +2127,12 @@ inodedep_lookup(mp, inum, flags, inodede */ if (dep_current[D_INODEDEP] > max_softdeps && (flags & NODELAY) == 0) request_cleanup(mp, FLUSH_INODES); - FREE_LOCK(&lk); + FREE_LOCK(ump); inodedep = malloc(sizeof(struct inodedep), M_INODEDEP, M_SOFTDEP_FLAGS); workitem_alloc(&inodedep->id_list, D_INODEDEP, mp); - ACQUIRE_LOCK(&lk); - if (inodedep_find(inodedephd, fs, inum, inodedeppp)) { + ACQUIRE_LOCK(ump); + if (inodedep_find(inodedephd, inum, inodedeppp)) { WORKITEM_FREE(inodedep, D_INODEDEP); return (1); } @@ -2234,15 +2164,12 @@ inodedep_lookup(mp, inum, flags, inodede /* * Structures and routines associated with newblk caching. */ -LIST_HEAD(newblk_hashhead, newblk) *newblk_hashtbl; -u_long newblk_hash; /* size of hash table - 1 */ -#define NEWBLK_HASH(fs, inum) \ - (&newblk_hashtbl[((((register_t)(fs)) >> 13) + (inum)) & newblk_hash]) +#define NEWBLK_HASH(ump, inum) \ + (&(ump)->newblk_hashtbl[(inum) & (ump)->newblk_hash_size]) static int -newblk_find(newblkhd, mp, newblkno, flags, newblkpp) +newblk_find(newblkhd, newblkno, flags, newblkpp) struct newblk_hashhead *newblkhd; - struct mount *mp; ufs2_daddr_t newblkno; int flags; struct newblk **newblkpp; @@ -2252,8 +2179,6 @@ newblk_find(newblkhd, mp, newblkno, flag LIST_FOREACH(newblk, newblkhd, nb_hash) { if (newblkno != newblk->nb_newblkno) continue; - if (mp != newblk->nb_list.wk_mp) - continue; /* * If we're creating a new dependency don't match those that * have already been converted to allocdirects. This is for @@ -2285,18 +2210,21 @@ newblk_lookup(mp, newblkno, flags, newbl { struct newblk *newblk; struct newblk_hashhead *newblkhd; + struct ufsmount *ump; - newblkhd = NEWBLK_HASH(VFSTOUFS(mp)->um_fs, newblkno); - if (newblk_find(newblkhd, mp, newblkno, flags, newblkpp)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 06:19:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5976F96E; Mon, 30 Dec 2013 06:19:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 457031955; Mon, 30 Dec 2013 06:19:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU6JhXB074383; Mon, 30 Dec 2013 06:19:43 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU6JhPb074382; Mon, 30 Dec 2013 06:19:43 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201312300619.rBU6JhPb074382@svn.freebsd.org> From: Kirk McKusick Date: Mon, 30 Dec 2013 06:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260079 - head/sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 06:19:43 -0000 Author: mckusick Date: Mon Dec 30 06:19:42 2013 New Revision: 260079 URL: http://svnweb.freebsd.org/changeset/base/260079 Log: Properly handle unsigned comparison. MFC after: 2 weeks Modified: head/sys/ufs/ufs/ufs_quota.c Modified: head/sys/ufs/ufs/ufs_quota.c ============================================================================== --- head/sys/ufs/ufs/ufs_quota.c Mon Dec 30 05:22:22 2013 (r260078) +++ head/sys/ufs/ufs/ufs_quota.c Mon Dec 30 06:19:42 2013 (r260079) @@ -307,7 +307,6 @@ int chkiq(struct inode *ip, int change, struct ucred *cred, int flags) { struct dquot *dq; - ino_t ncurinodes; int i, error, warn, do_check; #ifdef DIAGNOSTIC @@ -322,10 +321,8 @@ chkiq(struct inode *ip, int change, stru continue; DQI_LOCK(dq); DQI_WAIT(dq, PINOD+1, "chkiq1"); - ncurinodes = dq->dq_curinodes + change; - /* XXX: ncurinodes is unsigned */ - if (dq->dq_curinodes != 0 && ncurinodes >= 0) - dq->dq_curinodes = ncurinodes; + if (dq->dq_curinodes >= -change) + dq->dq_curinodes += change; else dq->dq_curinodes = 0; dq->dq_flags &= ~DQ_INODS; @@ -359,11 +356,8 @@ chkiq(struct inode *ip, int change, stru continue; DQI_LOCK(dq); DQI_WAIT(dq, PINOD+1, "chkiq3"); - ncurinodes = dq->dq_curinodes - change; - /* XXX: ncurinodes is unsigned */ - if (dq->dq_curinodes != 0 && - ncurinodes >= 0) - dq->dq_curinodes = ncurinodes; + if (dq->dq_curinodes >= change) + dq->dq_curinodes -= change; else dq->dq_curinodes = 0; dq->dq_flags &= ~DQ_INODS; From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 08:36:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D80D564; Mon, 30 Dec 2013 08:36:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 09D82152F; Mon, 30 Dec 2013 08:36:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU8aHw8025800; Mon, 30 Dec 2013 08:36:17 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU8aHXT025799; Mon, 30 Dec 2013 08:36:17 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201312300836.rBU8aHXT025799@svn.freebsd.org> From: Rui Paulo Date: Mon, 30 Dec 2013 08:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260080 - head/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 08:36:18 -0000 Author: rpaulo Date: Mon Dec 30 08:36:17 2013 New Revision: 260080 URL: http://svnweb.freebsd.org/changeset/base/260080 Log: Add netpfil to CSCOPEDIRS. Modified: head/sys/Makefile Modified: head/sys/Makefile ============================================================================== --- head/sys/Makefile Mon Dec 30 06:19:42 2013 (r260079) +++ head/sys/Makefile Mon Dec 30 08:36:17 2013 (r260080) @@ -10,7 +10,7 @@ SUBDIR= boot # Directories to include in cscope name file and TAGS. CSCOPEDIRS= boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \ geom gnu isa kern libkern modules net net80211 netatalk \ - netgraph netinet netinet6 netipsec netipx netnatm \ + netgraph netinet netinet6 netipsec netipx netnatm netpfil \ netsmb nfs nfsclient nfsserver nlm ofed opencrypto \ pci rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR} .if !defined(CSCOPE_ARCHDIR) From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 08:57:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 879458B0; Mon, 30 Dec 2013 08:57:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 733E316CE; Mon, 30 Dec 2013 08:57:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU8vtVT033311; Mon, 30 Dec 2013 08:57:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU8vtgg033310; Mon, 30 Dec 2013 08:57:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312300857.rBU8vtgg033310@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 30 Dec 2013 08:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260081 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 08:57:55 -0000 Author: kib Date: Mon Dec 30 08:57:54 2013 New Revision: 260081 URL: http://svnweb.freebsd.org/changeset/base/260081 Log: MFC r259951: Do not coalesce stack entry. Pass MAP_STACK_GROWS_DOWN and MAP_STACK_GROWS_UP flags to vm_map_insert() from vm_map_stack() Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Mon Dec 30 08:36:17 2013 (r260080) +++ stable/10/sys/vm/vm_map.c Mon Dec 30 08:57:54 2013 (r260081) @@ -1207,6 +1207,7 @@ charged: } else if ((prev_entry != &map->header) && (prev_entry->eflags == protoeflags) && + (cow & (MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) == 0 && (prev_entry->end == start) && (prev_entry->wired_count == 0) && (prev_entry->cred == cred || @@ -3339,7 +3340,6 @@ vm_map_stack(vm_map_t map, vm_offset_t a * NOTE: We explicitly allow bi-directional stacks. */ orient = cow & (MAP_STACK_GROWS_DOWN|MAP_STACK_GROWS_UP); - cow &= ~orient; KASSERT(orient != 0, ("No stack grow direction")); if (addrbos < vm_map_min(map) || From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 09:04:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B58EEB0A; Mon, 30 Dec 2013 09:04:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A0FAF1768; Mon, 30 Dec 2013 09:04:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBU946jE036885; Mon, 30 Dec 2013 09:04:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBU9469I036884; Mon, 30 Dec 2013 09:04:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312300904.rBU9469I036884@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 30 Dec 2013 09:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260082 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 09:04:06 -0000 Author: kib Date: Mon Dec 30 09:04:06 2013 New Revision: 260082 URL: http://svnweb.freebsd.org/changeset/base/260082 Log: MFC r259951: Do not coalesce stack entry. Pass MAP_STACK_GROWS_DOWN and MAP_STACK_GROWS_UP flags to vm_map_insert() from vm_map_stack() Modified: stable/9/sys/vm/vm_map.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_map.c ============================================================================== --- stable/9/sys/vm/vm_map.c Mon Dec 30 08:57:54 2013 (r260081) +++ stable/9/sys/vm/vm_map.c Mon Dec 30 09:04:06 2013 (r260082) @@ -1230,6 +1230,7 @@ charged: } else if ((prev_entry != &map->header) && (prev_entry->eflags == protoeflags) && + (cow & (MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) == 0 && (prev_entry->end == start) && (prev_entry->wired_count == 0) && (prev_entry->cred == cred || @@ -3341,7 +3342,6 @@ vm_map_stack(vm_map_t map, vm_offset_t a * NOTE: We explicitly allow bi-directional stacks. */ orient = cow & (MAP_STACK_GROWS_DOWN|MAP_STACK_GROWS_UP); - cow &= ~orient; KASSERT(orient != 0, ("No stack grow direction")); if (addrbos < vm_map_min(map) || From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 12:18:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EBD0360; Mon, 30 Dec 2013 12:18:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE80F1754; Mon, 30 Dec 2013 12:18:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUCI6ig012047; Mon, 30 Dec 2013 12:18:06 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUCI6bm012046; Mon, 30 Dec 2013 12:18:06 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312301218.rBUCI6bm012046@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 30 Dec 2013 12:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260083 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 12:18:07 -0000 Author: trasz Date: Mon Dec 30 12:18:06 2013 New Revision: 260083 URL: http://svnweb.freebsd.org/changeset/base/260083 Log: Fix extremely slow operation with data digests enabled. This was caused by receive code waiting for data digest even when the data segment was empty. It didn't actually read it, but it waited until those four bytes become available in the socket buffer, i.e. until any other PDU (such as NOP) came in. PR: kern/185240 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/icl.c Modified: head/sys/dev/iscsi/icl.c ============================================================================== --- head/sys/dev/iscsi/icl.c Mon Dec 30 09:04:06 2013 (r260082) +++ head/sys/dev/iscsi/icl.c Mon Dec 30 12:18:06 2013 (r260083) @@ -239,7 +239,7 @@ icl_pdu_size(const struct icl_pdu *respo icl_pdu_padding(response); if (response->ip_conn->ic_header_crc32c) len += ISCSI_HEADER_DIGEST_SIZE; - if (response->ip_conn->ic_data_crc32c) + if (response->ip_data_len != 0 && response->ip_conn->ic_data_crc32c) len += ISCSI_DATA_DIGEST_SIZE; return (len); @@ -615,7 +615,7 @@ icl_conn_receive_pdu(struct icl_conn *ic break; ic->ic_receive_state = ICL_CONN_STATE_DATA_DIGEST; - if (ic->ic_data_crc32c == false) + if (request->ip_data_len == 0 || ic->ic_data_crc32c == false) ic->ic_receive_len = 0; else ic->ic_receive_len = ISCSI_DATA_DIGEST_SIZE; From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 13:05:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97A0E99; Mon, 30 Dec 2013 13:05:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 80B801A9B; Mon, 30 Dec 2013 13:05:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUD5LBb030793; Mon, 30 Dec 2013 13:05:21 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUD5JxO030781; Mon, 30 Dec 2013 13:05:19 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201312301305.rBUD5JxO030781@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 30 Dec 2013 13:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260084 - in stable/10/share/man: man5 man7 man8 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 13:05:21 -0000 Author: pluknet Date: Mon Dec 30 13:05:19 2013 New Revision: 260084 URL: http://svnweb.freebsd.org/changeset/base/260084 Log: MFC r259879: Clean up manual pages after BIND removal. Modified: stable/10/share/man/man5/hosts.5 stable/10/share/man/man5/hosts.equiv.5 stable/10/share/man/man5/nsswitch.conf.5 stable/10/share/man/man5/periodic.conf.5 stable/10/share/man/man5/rc.conf.5 stable/10/share/man/man5/resolver.5 stable/10/share/man/man7/hier.7 stable/10/share/man/man7/hostname.7 stable/10/share/man/man7/security.7 stable/10/share/man/man8/rc.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/hosts.5 ============================================================================== --- stable/10/share/man/man5/hosts.5 Mon Dec 30 12:18:06 2013 (r260083) +++ stable/10/share/man/man5/hosts.5 Mon Dec 30 13:05:19 2013 (r260084) @@ -32,7 +32,7 @@ .\" @(#)hosts.5 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd December 11, 1993 +.Dd December 25, 2013 .Dt HOSTS 5 .Os .Sh NAME @@ -60,9 +60,7 @@ A ``#'' indicates the beginning of a comment; characters up to the end of the line are not interpreted by routines which search the file. .Pp -When using the name server -.Xr named 8 , -this file provides a backup used when the name server +This file provides a backup used when the name server is not running. For the name server, it is suggested that only a few addresses be included in this file. @@ -104,8 +102,7 @@ file resides in .Sh SEE ALSO .Xr gethostbyname 3 , .Xr nsswitch.conf 5 , -.Xr ifconfig 8 , -.Xr named 8 +.Xr ifconfig 8 .Rs .%T "Name Server Operations Guide for BIND" .Re Modified: stable/10/share/man/man5/hosts.equiv.5 ============================================================================== --- stable/10/share/man/man5/hosts.equiv.5 Mon Dec 30 12:18:06 2013 (r260083) +++ stable/10/share/man/man5/hosts.equiv.5 Mon Dec 30 13:05:19 2013 (r260084) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 8, 2007 +.Dd December 25, 2013 .Dt HOSTS.EQUIV 5 .Os .Sh NAME @@ -139,7 +139,6 @@ except users from netgroup .Xr ruserok 3 , .Xr netgroup 5 , .Xr ifconfig 8 , -.Xr named 8 , .Xr yp 8 .Sh BUGS This manual page is incomplete. Modified: stable/10/share/man/man5/nsswitch.conf.5 ============================================================================== --- stable/10/share/man/man5/nsswitch.conf.5 Mon Dec 30 12:18:06 2013 (r260083) +++ stable/10/share/man/man5/nsswitch.conf.5 Mon Dec 30 13:05:19 2013 (r260084) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 4, 2010 +.Dd December 25, 2013 .Dt NSSWITCH.CONF 5 .Os .Sh NAME @@ -362,7 +362,6 @@ databases. .Xr nscd.conf 5 , .Xr resolv.conf 5 , .Xr nscd 8 , -.Xr named 8 , .Xr ypbind 8 .Sh HISTORY The Modified: stable/10/share/man/man5/periodic.conf.5 ============================================================================== --- stable/10/share/man/man5/periodic.conf.5 Mon Dec 30 12:18:06 2013 (r260083) +++ stable/10/share/man/man5/periodic.conf.5 Mon Dec 30 13:05:19 2013 (r260084) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 30, 2012 +.Dd December 25, 2013 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -493,17 +493,6 @@ for the previous day. .Pq Vt num Set to the number of maillog files that should be checked for yesterday's mail rejects. -.It Va daily_status_named_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to summarise denied zone transfers (AXFR and IXFR) -for the previous day. -.It Va daily_status_named_usedns -.Pq Vt bool -Set to -.Dq Li YES -if you want to enable reverse DNS lookups. .It Va daily_status_ntpd .Pq Vt bool Set to Modified: stable/10/share/man/man5/rc.conf.5 ============================================================================== --- stable/10/share/man/man5/rc.conf.5 Mon Dec 30 12:18:06 2013 (r260083) +++ stable/10/share/man/man5/rc.conf.5 Mon Dec 30 13:05:19 2013 (r260084) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 19, 2013 +.Dd December 25, 2013 .Dt RC.CONF 5 .Os .Sh NAME @@ -2048,85 +2048,6 @@ If set to run the .Xr unbound 8 daemon as a local caching resolver. -.It Va named_enable -.Pq Vt bool -If set to -.Dq Li YES , -run the -.Xr named 8 -daemon. -.It Va named_program -.Pq Vt str -Path to -.Xr named 8 -(default -.Pa /usr/sbin/named ) . -.It Va named_conf -.Pq Vt str -Path to -.Xr named 8 -configuration file, (default -.Pa /etc/namedb/named.conf ) . -.It Va named_flags -.Pq Vt str -If -.Va named_enable -is set to -.Dq Li YES , -these are the flags to pass to -.Xr named 8 . -.It Va named_uid -.Pq Vt str -The user that the -.Xr named 8 -process should be run as. -.It Va named_chrootdir -.Pq Vt str -The root directory for a name server run in a -.Xr chroot 8 -environment (default -.Pa /var/named ) . -If left empty -.Xr named 8 -will not be run in a -.Xr chroot 8 -environment. -.It Va named_chroot_autoupdate -.Pq Vt bool -Set to -.Dq Li NO -to disable automatic update of the -.Xr chroot 8 -environment. -.It Va named_symlink_enable -.Pq Vt bool -Set to -.Dq Li NO -to disable symlinking of -daemon's PID file -into the -.Xr chroot 8 -environment. -.It Va named_wait -.Pq Vt bool -Set to have -.Pa /etc/rc.d/named -loop until working name service is established. -.It Va named_wait_host -.Pq Vt str -Name of host to lookup for the named_wait option. -(Default localhost) -.It Va named_auto_forward -.Pq Vt bool -Set to enable automatic creation of a forwarder -configuration file derived from -.Pa /etc/resolv.conf . -.It Va named_auto_forward_only -.Pq Vt bool -Set to change the default forwarder configuration from -.Dq forward first -to -.Dq forward only . .It Va kerberos5_server_enable .Pq Vt bool Set to @@ -4559,7 +4480,6 @@ The default is 30. .Xr mountd 8 , .Xr moused 8 , .Xr mrouted 8 , -.Xr named 8 , .Xr newfs 8 , .Xr newsyslog 8 , .Xr nfsd 8 , Modified: stable/10/share/man/man5/resolver.5 ============================================================================== --- stable/10/share/man/man5/resolver.5 Mon Dec 30 12:18:06 2013 (r260083) +++ stable/10/share/man/man5/resolver.5 Mon Dec 30 13:05:19 2013 (r260084) @@ -32,7 +32,7 @@ .\" @(#)resolver.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 9, 2004 +.Dd December 25, 2013 .Dt RESOLVER 5 .Os .Sh NAME @@ -210,8 +210,7 @@ resides in .Sh SEE ALSO .Xr gethostbyname 3 , .Xr resolver 3 , -.Xr hostname 7 , -.Xr named 8 +.Xr hostname 7 .Rs .%T "Name Server Operations Guide for BIND" .Re Modified: stable/10/share/man/man7/hier.7 ============================================================================== --- stable/10/share/man/man7/hier.7 Mon Dec 30 12:18:06 2013 (r260083) +++ stable/10/share/man/man7/hier.7 Mon Dec 30 13:05:19 2013 (r260084) @@ -32,7 +32,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd October 29, 2013 +.Dd December 25, 2013 .Dt HIER 7 .Os .Sh NAME @@ -104,10 +104,6 @@ Sendmail control files mtree configuration files; see .Xr mtree 8 -.It Pa namedb/ -named configuration files; -see -.Xr named 8 .It Pa pam.d/ configuration files for the Pluggable Authentication Modules (PAM) library @@ -804,11 +800,6 @@ system information files describing vari system since it was booted .Pp .Bl -tag -width Fl -compact -.It Pa named/ -writable by the -.Dq bind -user; see -.Xr named 8 .It Pa ppp/ writable by the .Dq network Modified: stable/10/share/man/man7/hostname.7 ============================================================================== --- stable/10/share/man/man7/hostname.7 Mon Dec 30 12:18:06 2013 (r260083) +++ stable/10/share/man/man7/hostname.7 Mon Dec 30 13:05:19 2013 (r260084) @@ -32,7 +32,7 @@ .\" @(#)hostname.7 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd December 30, 1993 +.Dd December 25, 2013 .Dt HOSTNAME 7 .Os .Sh NAME @@ -86,8 +86,7 @@ by a system-wide configuration file (see .Sh SEE ALSO .Xr gethostbyname 3 , .Xr resolver 5 , -.Xr mailaddr 7 , -.Xr named 8 +.Xr mailaddr 7 .Sh HISTORY .Nm Hostname appeared in Modified: stable/10/share/man/man7/security.7 ============================================================================== --- stable/10/share/man/man7/security.7 Mon Dec 30 12:18:06 2013 (r260083) +++ stable/10/share/man/man7/security.7 Mon Dec 30 13:05:19 2013 (r260084) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd December 25, 2013 .Dt SECURITY 7 .Os .Sh NAME @@ -350,13 +350,6 @@ now defaults to running and .Xr fingerd 8 in a sandbox. -Another program which may be a candidate for running in a sandbox is -.Xr named 8 . -The default -.Pa rc.conf -includes the arguments necessary to run -.Xr named 8 -in a sandbox in a commented-out form. Depending on whether you are installing a new system or upgrading an existing system, the special user accounts used by these sandboxes may not be installed. @@ -825,8 +818,6 @@ ports A, B, C, D, and M-Z This way you can firewall off all of your low ports except for certain specific services such as -.Xr named 8 -(if you are primary for a zone), .Xr talkd 8 , .Xr sendmail 8 , and other internet-accessible services. Modified: stable/10/share/man/man8/rc.8 ============================================================================== --- stable/10/share/man/man8/rc.8 Mon Dec 30 12:18:06 2013 (r260083) +++ stable/10/share/man/man8/rc.8 Mon Dec 30 13:05:19 2013 (r260084) @@ -35,7 +35,7 @@ .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd October 19, 2013 +.Dd December 25, 2013 .Dt RC 8 .Os .Sh NAME @@ -242,7 +242,7 @@ network configuration. .It Pa SERVERS Ensure basic services exist for services that start early (such as -.Pa named ) , +.Pa nisdomain ) , because they are required by .Pa DAEMON below. From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 13:20:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACFAB5D4; Mon, 30 Dec 2013 13:20:34 +0000 (UTC) Received: from prod2.absolight.net (mx3.absolight.net [IPv6:2a01:678:2:100::25]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B0B21CAE; Mon, 30 Dec 2013 13:20:34 +0000 (UTC) Received: from prod2.absolight.net (localhost [127.0.0.1]) by prod2.absolight.net (Postfix) with ESMTP id 0CB69BDC2E; Mon, 30 Dec 2013 14:20:33 +0100 (CET) Received: from gw.in.absolight.net (gw-ecl.in.absolight.net [79.143.241.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gw.in.absolight.net", Issuer "CA Cert Signing Authority" (not verified)) by prod2.absolight.net (Postfix) with ESMTPSA id D29C1BDC24; Mon, 30 Dec 2013 14:20:32 +0100 (CET) Received: from ogg.in.absolight.net (ogg.in.absolight.net [79.143.241.239]) by gw.in.absolight.net (Postfix) with ESMTP id 2FDD66113; Mon, 30 Dec 2013 14:20:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ogg.in.absolight.net (Postfix) with ESMTP id BE3C367149E9; Mon, 30 Dec 2013 14:20:31 +0100 (CET) Date: Mon, 30 Dec 2013 14:20:31 +0100 From: Mathieu Arnold To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r260082 - stable/9/sys/vm Message-ID: <24E4126955E68C83E4CA5574@ogg.in.absolight.net> In-Reply-To: <201312300904.rBU9469I036884@svn.freebsd.org> References: <201312300904.rBU9469I036884@svn.freebsd.org> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 13:20:34 -0000 Hi, Would you mind committing that on stable/8 too ? The bug must be there too. +--On 30 d=C3=A9cembre 2013 09:04:06 +0000 Konstantin Belousov wrote: | Author: kib | Date: Mon Dec 30 09:04:06 2013 | New Revision: 260082 | URL: http://svnweb.freebsd.org/changeset/base/260082 |=20 | Log: | MFC r259951: | Do not coalesce stack entry. Pass MAP_STACK_GROWS_DOWN and | MAP_STACK_GROWS_UP flags to vm_map_insert() from vm_map_stack() |=20 | Modified: | stable/9/sys/vm/vm_map.c | Directory Properties: | stable/9/sys/ (props changed) |=20 | Modified: stable/9/sys/vm/vm_map.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 --- stable/9/sys/vm/vm_map.c Mon Dec 30 08:57:54 = 2013 (r260081) | +++ stable/9/sys/vm/vm_map.c Mon Dec 30 09:04:06 2013 (r260082) | @@ -1230,6 +1230,7 @@ charged: | } | else if ((prev_entry !=3D &map->header) && | (prev_entry->eflags =3D=3D protoeflags) && | + (cow & (MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) =3D=3D 0 && | (prev_entry->end =3D=3D start) && | (prev_entry->wired_count =3D=3D 0) && | (prev_entry->cred =3D=3D cred || | @@ -3341,7 +3342,6 @@ vm_map_stack(vm_map_t map, vm_offset_t a | * NOTE: We explicitly allow bi-directional stacks. | */ | orient =3D cow & (MAP_STACK_GROWS_DOWN|MAP_STACK_GROWS_UP); | - cow &=3D ~orient; | KASSERT(orient !=3D 0, ("No stack grow direction")); | =20 | if (addrbos < vm_map_min(map) || | _______________________________________________ | svn-src-all@freebsd.org mailing list | http://lists.freebsd.org/mailman/listinfo/svn-src-all | To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" |=20 --=20 Mathieu Arnold From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 13:47:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2CB0CF4; Mon, 30 Dec 2013 13:47:47 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 207ED1E03; Mon, 30 Dec 2013 13:47:46 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rBUDlfd2064630; Mon, 30 Dec 2013 15:47:41 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rBUDlfd2064630 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rBUDlfhL064629; Mon, 30 Dec 2013 15:47:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 30 Dec 2013 15:47:41 +0200 From: Konstantin Belousov To: Mathieu Arnold Subject: Re: svn commit: r260082 - stable/9/sys/vm Message-ID: <20131230134741.GZ59496@kib.kiev.ua> References: <201312300904.rBU9469I036884@svn.freebsd.org> <24E4126955E68C83E4CA5574@ogg.in.absolight.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qjx6QTCsaM7sjqzv" Content-Disposition: inline In-Reply-To: <24E4126955E68C83E4CA5574@ogg.in.absolight.net> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 13:47:47 -0000 --qjx6QTCsaM7sjqzv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 30, 2013 at 02:20:31PM +0100, Mathieu Arnold wrote: > Hi, >=20 > Would you mind committing that on stable/8 too ? The bug must be there to= o. I have no stable/8 systems. If somebody tests the patch there, I might consider the merge. --qjx6QTCsaM7sjqzv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSwXl8AAoJEJDCuSvBvK1BvhsQAJ/iuw8ACQegr/hl0dNRRRTv w9mijvHGZQd/ORyyHLkErAU1yVC6RR9k6ClgKRyOmAE2pAzjlGCYrlDuGf8Z0WPP QZElfVGswpaCzHQe/3UwtnT7EMb/QymlEDIytcjp0Q5m+c/T17rlGqHcVaI/oVXF qk5srICYUk5QHK7DWL13Z6K9a+7JjeptCbZQjLuGYYWbCcuftDccKdHzIlf7vHMT 5vcMRtMtLPVnEhnKXas/bz3O+vyBYsU/miAytiuKTEX6e95VaHz6YkJ7sAgBH0Yz wzVsW+2uTT3EufdXRMXSJy8MEsPk5xlwzaLhpM/2oYpP+tTpvvHDz3TUW+HzxfiY y2mYKH+OfEV+0LtUb9GFbtE7iFHrLRf++2tjFuuSTOyMuIoaRoFJXqx3KSnaYTrC DSH091lx6uYu7t/AbhHHrV7iNtY7nsQYEGEntH9YMiUQPFbDr5pgtZxszMpXQBqY 0ZJNH7S5BfopZG2sDO1S6tNWlL/JyBoIdKwpPm09NUjkObGbr/OtNt2/eq/g0QsM Nhs0hl9dj8vkip1G0AGHDtaO8mzjraF6anmec9/NvprgSN0DVG1sFsJzYj8jGtKq NPm3WV7PKF3O1HMZdmTqtUf1ai8JV0/K3XxDZD4moU+OS9MuIQzHRnA8k6q2YKVO ge8ugGR1R32MHlCc/ssi =aKDW -----END PGP SIGNATURE----- --qjx6QTCsaM7sjqzv-- From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 14:09:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B41E0FD2; Mon, 30 Dec 2013 14:09:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F1F21F12; Mon, 30 Dec 2013 14:09:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUE94Qu054011; Mon, 30 Dec 2013 14:09:04 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUE94BE054010; Mon, 30 Dec 2013 14:09:04 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201312301409.rBUE94BE054010@svn.freebsd.org> From: Julio Merino Date: Mon, 30 Dec 2013 14:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260085 - stable/10/tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 14:09:04 -0000 Author: jmmv Date: Mon Dec 30 14:09:04 2013 New Revision: 260085 URL: http://svnweb.freebsd.org/changeset/base/260085 Log: Fix 'make check-old' warnings when WITHOUT_TESTS is set. This is a MFC of r258025 and r257940, both of which resolve issues with dynamically setting the list of obsolete files based on the contents of /usr/tests. Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Mon Dec 30 13:05:19 2013 (r260084) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Mon Dec 30 14:09:04 2013 (r260085) @@ -4143,11 +4143,13 @@ OLD_FILES+=usr/share/man/man4/atf-test-c OLD_FILES+=usr/share/mk/atf.test.mk # Test suite. -TESTS_DIRS!=find ${DESTDIR}/usr/tests -type d | sed -e 's,^${DESTDIR}/,,' +. if(exists(${DESTDIR}/usr/tests/)) +TESTS_DIRS!=find ${DESTDIR}/usr/tests -type d | sed -e 's,^${DESTDIR}/,,'; echo OLD_DIRS+=${TESTS_DIRS} -TESTS_FILES!=find ${DESTDIR}/usr/tests \! -type d | sed -e 's,^${DESTDIR}/,,' +TESTS_FILES!=find ${DESTDIR}/usr/tests \! -type d | sed -e 's,^${DESTDIR}/,,'; echo OLD_FILES+=${TESTS_FILES} -.endif +. endif +.endif # Test suite. #.if ${MK_TOOLCHAIN} == no # to be filled in From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 16:46:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 037EC273; Mon, 30 Dec 2013 16:46:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E35FA1AFF; Mon, 30 Dec 2013 16:46:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUGkoTx015014; Mon, 30 Dec 2013 16:46:50 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUGkoIJ015013; Mon, 30 Dec 2013 16:46:50 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201312301646.rBUGkoIJ015013@svn.freebsd.org> From: Marius Strobl Date: Mon, 30 Dec 2013 16:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260086 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 16:46:51 -0000 Author: marius Date: Mon Dec 30 16:46:50 2013 New Revision: 260086 URL: http://svnweb.freebsd.org/changeset/base/260086 Log: - Probe with BUS_PROBE_DEFAULT instead of 0. - Remove clearing PCIM_CMD_INTxDIS; pci(4) will do that as appropriate since r189367. MFC after: 1 week Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Dec 30 14:09:04 2013 (r260085) +++ head/sys/dev/iwn/if_iwn.c Mon Dec 30 16:46:50 2013 (r260086) @@ -380,7 +380,7 @@ iwn_probe(device_t dev) if (pci_get_vendor(dev) == ident->vendor && pci_get_device(dev) == ident->device) { device_set_desc(dev, ident->name); - return 0; + return (BUS_PROBE_DEFAULT); } } return ENXIO; @@ -392,7 +392,6 @@ iwn_attach(device_t dev) struct iwn_softc *sc = (struct iwn_softc *)device_get_softc(dev); struct ieee80211com *ic; struct ifnet *ifp; - uint32_t reg; int i, error, rid; uint8_t macaddr[IEEE80211_ADDR_LEN]; @@ -422,15 +421,6 @@ iwn_attach(device_t dev) /* Clear device-specific "PCI retry timeout" register (41h). */ pci_write_config(dev, 0x41, 0, 1); - /* Hardware bug workaround. */ - reg = pci_read_config(dev, PCIR_COMMAND, 2); - if (reg & PCIM_CMD_INTxDIS) { - DPRINTF(sc, IWN_DEBUG_RESET, "%s: PCIe INTx Disable set\n", - __func__); - reg &= ~PCIM_CMD_INTxDIS; - pci_write_config(dev, PCIR_COMMAND, reg, 2); - } - /* Enable bus-mastering. */ pci_enable_busmaster(dev); @@ -6066,7 +6056,6 @@ iwn_send_advanced_btcoex(struct iwn_soft sizeof(btconfig), 1); } - if (error != 0) return error; From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 16:49:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1F033DD; Mon, 30 Dec 2013 16:49:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8DA8F1B18; Mon, 30 Dec 2013 16:49:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUGnVlq015336; Mon, 30 Dec 2013 16:49:31 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUGnVaK015335; Mon, 30 Dec 2013 16:49:31 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201312301649.rBUGnVaK015335@svn.freebsd.org> From: Scott Long Date: Mon, 30 Dec 2013 16:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260087 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 16:49:31 -0000 Author: scottl Date: Mon Dec 30 16:49:31 2013 New Revision: 260087 URL: http://svnweb.freebsd.org/changeset/base/260087 Log: getopt returns an int, not a char, so use the correct data type for the return value. Fixes powerpc tinderbox. MFC after: 2 days Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Mon Dec 30 16:46:50 2013 (r260086) +++ head/sbin/camcontrol/camcontrol.c Mon Dec 30 16:49:31 2013 (r260087) @@ -420,7 +420,7 @@ getdevtree(int argc, char **argv, char * int error = 0; int skip_device = 0; int busonly = 0; - char c; + int c; while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c) { From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 17:04:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 464DCA3C; Mon, 30 Dec 2013 17:04:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3150C1D5E; Mon, 30 Dec 2013 17:04:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUH4PuC022596; Mon, 30 Dec 2013 17:04:25 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUH4PmQ022595; Mon, 30 Dec 2013 17:04:25 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201312301704.rBUH4PmQ022595@svn.freebsd.org> From: Kirk McKusick Date: Mon, 30 Dec 2013 17:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260088 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 17:04:25 -0000 Author: mckusick Date: Mon Dec 30 17:04:24 2013 New Revision: 260088 URL: http://svnweb.freebsd.org/changeset/base/260088 Log: Fine tune filesystem block allocations under low free-space conditions (-r254995) based on further operational experience. Submitted by: Dmitry Sivachenko Fix Tested by: Dmitry Sivachenko MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Mon Dec 30 16:49:31 2013 (r260087) +++ head/sys/ufs/ffs/ffs_alloc.c Mon Dec 30 17:04:24 2013 (r260088) @@ -517,12 +517,12 @@ ffs_reallocblks_ufs1(ap) fs = ip->i_fs; ump = ip->i_ump; /* - * If we are not tracking block clusters or if we have less than 2% + * If we are not tracking block clusters or if we have less than 4% * free blocks left, then do not attempt to cluster. Running with * less than 5% free block reserve is not recommended and those that * choose to do so do not expect to have good file layout. */ - if (fs->fs_contigsumsize <= 0 || freespace(fs, 2) < 0) + if (fs->fs_contigsumsize <= 0 || freespace(fs, 4) < 0) return (ENOSPC); buflist = ap->a_buflist; len = buflist->bs_nchildren; @@ -744,12 +744,12 @@ ffs_reallocblks_ufs2(ap) fs = ip->i_fs; ump = ip->i_ump; /* - * If we are not tracking block clusters or if we have less than 2% + * If we are not tracking block clusters or if we have less than 4% * free blocks left, then do not attempt to cluster. Running with * less than 5% free block reserve is not recommended and those that * choose to do so do not expect to have good file layout. */ - if (fs->fs_contigsumsize <= 0 || freespace(fs, 2) < 0) + if (fs->fs_contigsumsize <= 0 || freespace(fs, 4) < 0) return (ENOSPC); buflist = ap->a_buflist; len = buflist->bs_nchildren; From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 17:11:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 509CBDF0; Mon, 30 Dec 2013 17:11:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3CA5B1DE8; Mon, 30 Dec 2013 17:11:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUHBbJL026420; Mon, 30 Dec 2013 17:11:37 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUHBbQ8026419; Mon, 30 Dec 2013 17:11:37 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201312301711.rBUHBbQ8026419@svn.freebsd.org> From: Steve Kargl Date: Mon, 30 Dec 2013 17:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260089 - head/lib/msun/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 17:11:37 -0000 Author: kargl Date: Mon Dec 30 17:11:36 2013 New Revision: 260089 URL: http://svnweb.freebsd.org/changeset/base/260089 Log: Fix a mismerge of my local doc changes to msun/man/sinh.3. Modified: head/lib/msun/man/sinh.3 Modified: head/lib/msun/man/sinh.3 ============================================================================== --- head/lib/msun/man/sinh.3 Mon Dec 30 17:04:24 2013 (r260088) +++ head/lib/msun/man/sinh.3 Mon Dec 30 17:11:36 2013 (r260089) @@ -27,12 +27,14 @@ .\" .\" from: @(#)sinh.3 6.6 (Berkeley) 4/19/91 .\" $FreeBSD$ -.Dd January 14, 2005 +.\" +.Dd August 17, 2013 .Dt SINH 3 .Os .Sh NAME .Nm sinh , -.Nm sinhf +.Nm sinhf , +.Nm sinhl .Nd hyperbolic sine function .Sh LIBRARY .Lb libm From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 17:37:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E0FFA9F; Mon, 30 Dec 2013 17:37:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5D2C41F83; Mon, 30 Dec 2013 17:37:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUHbXjx035092; Mon, 30 Dec 2013 17:37:33 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUHbW3I035088; Mon, 30 Dec 2013 17:37:32 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312301737.rBUHbW3I035088@svn.freebsd.org> From: Mark Johnston Date: Mon, 30 Dec 2013 17:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260091 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace contrib/opensolaris/uts/common/sys dev/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 17:37:33 -0000 Author: markj Date: Mon Dec 30 17:37:32 2013 New Revision: 260091 URL: http://svnweb.freebsd.org/changeset/base/260091 Log: Now that vmem(9) is available, use vmem arenas to allocate probe and aggregation IDs, as is done in the upstream illumos code. This still requires some FreeBSD-specific code, as our vmem API is not identical to the one in illumos. Submitted by: Mike Ma Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h head/sys/cddl/dev/dtrace/dtrace_load.c head/sys/cddl/dev/dtrace/dtrace_unload.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Dec 30 17:26:06 2013 (r260090) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Dec 30 17:37:32 2013 (r260091) @@ -206,12 +206,11 @@ const char dtrace_zero[256] = { 0 }; /* #if defined(sun) static dev_info_t *dtrace_devi; /* device info */ #endif -#if defined(sun) static vmem_t *dtrace_arena; /* probe ID arena */ +#if defined(sun) static vmem_t *dtrace_minor; /* minor number arena */ #else static taskq_t *dtrace_taskq; /* task queue */ -static struct unrhdr *dtrace_arena; /* Probe ID number. */ #endif static dtrace_probe_t **dtrace_probes; /* array of all probes */ static int dtrace_nprobes; /* number of probes */ @@ -7832,7 +7831,7 @@ dtrace_unregister(dtrace_provider_id_t i #if defined(sun) vmem_free(dtrace_arena, (void *)(uintptr_t)(probe->dtpr_id), 1); #else - free_unr(dtrace_arena, probe->dtpr_id); + vmem_free(dtrace_arena, (vmem_addr_t)(probe->dtpr_id), 1); #endif kmem_free(probe, sizeof (dtrace_probe_t)); } @@ -7953,7 +7952,7 @@ dtrace_condense(dtrace_provider_id_t id) #if defined(sun) vmem_free(dtrace_arena, (void *)((uintptr_t)i + 1), 1); #else - free_unr(dtrace_arena, i + 1); + vmem_free(dtrace_arena, (vmem_addr_t)i + 1, 1); #endif } @@ -7983,6 +7982,9 @@ dtrace_probe_create(dtrace_provider_id_t dtrace_probe_t *probe, **probes; dtrace_provider_t *provider = (dtrace_provider_t *)prov; dtrace_id_t id; +#if !defined(sun) + vmem_addr_t addr; +#endif if (provider == dtrace_provider) { ASSERT(MUTEX_HELD(&dtrace_lock)); @@ -7992,9 +7994,10 @@ dtrace_probe_create(dtrace_provider_id_t #if defined(sun) id = (dtrace_id_t)(uintptr_t)vmem_alloc(dtrace_arena, 1, - VM_BESTFIT | VM_SLEEP); + VM_BESTFIT | VM_WAITOK); #else - id = alloc_unr(dtrace_arena); + vmem_alloc(dtrace_arena, 1, M_BESTFIT | M_WAITOK, &addr); + id = (dtrace_id_t)addr; #endif probe = kmem_zalloc(sizeof (dtrace_probe_t), KM_SLEEP); @@ -10045,6 +10048,9 @@ dtrace_ecb_aggregation_create(dtrace_ecb dtrace_recdesc_t *frec; dtrace_aggid_t aggid; dtrace_state_t *state = ecb->dte_state; +#if !defined(sun) + vmem_addr_t addr; +#endif agg = kmem_zalloc(sizeof (dtrace_aggregation_t), KM_SLEEP); agg->dtag_ecb = ecb; @@ -10184,7 +10190,8 @@ success: aggid = (dtrace_aggid_t)(uintptr_t)vmem_alloc(state->dts_aggid_arena, 1, VM_BESTFIT | VM_SLEEP); #else - aggid = alloc_unr(state->dts_aggid_arena); + vmem_alloc(state->dts_aggid_arena, 1, M_BESTFIT | M_WAITOK, &addr); + aggid = (dtrace_aggid_t)addr; #endif if (aggid - 1 >= state->dts_naggregations) { @@ -10237,7 +10244,7 @@ dtrace_ecb_aggregation_destroy(dtrace_ec #if defined(sun) vmem_free(state->dts_aggid_arena, (void *)(uintptr_t)aggid, 1); #else - free_unr(state->dts_aggid_arena, aggid); + vmem_free(state->dts_aggid_arena, (vmem_addr_t)aggid, 1); #endif ASSERT(state->dts_aggregations[aggid - 1] == agg); @@ -13205,7 +13212,7 @@ dtrace_state_create(struct cdev *dev) if (dev != NULL) { cr = dev->si_cred; m = dev2unit(dev); - } + } /* Allocate memory for the state. */ state = kmem_zalloc(sizeof(dtrace_state_t), KM_SLEEP); @@ -13217,7 +13224,12 @@ dtrace_state_create(struct cdev *dev) #if defined(sun) state->dts_aggid_arena = vmem_create(c, (void *)1, UINT32_MAX, 1, NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER); +#else + state->dts_aggid_arena = vmem_create(c, (vmem_addr_t)1, UINT32_MAX, 1, + 0, M_WAITOK); +#endif +#if defined(sun) if (devp != NULL) { major = getemajor(*devp); } else { @@ -13229,7 +13241,6 @@ dtrace_state_create(struct cdev *dev) if (devp != NULL) *devp = state->dts_dev; #else - state->dts_aggid_arena = new_unrhdr(1, INT_MAX, &dtrace_unr_mtx); state->dts_dev = dev; #endif @@ -14036,11 +14047,7 @@ dtrace_state_destroy(dtrace_state_t *sta dtrace_format_destroy(state); if (state->dts_aggid_arena != NULL) { -#if defined(sun) vmem_destroy(state->dts_aggid_arena); -#else - delete_unrhdr(state->dts_aggid_arena); -#endif state->dts_aggid_arena = NULL; } #if defined(sun) @@ -15375,7 +15382,7 @@ dtrace_module_unloaded(modctl_t *ctl, in #if defined(sun) vmem_free(dtrace_arena, (void *)(uintptr_t)probe->dtpr_id, 1); #else - free_unr(dtrace_arena, probe->dtpr_id); + vmem_free(dtrace_arena, (vmem_addr_t)probe->dtpr_id, 1); #endif kmem_free(probe, sizeof (dtrace_probe_t)); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Mon Dec 30 17:26:06 2013 (r260090) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Mon Dec 30 17:37:32 2013 (r260091) @@ -1139,11 +1139,7 @@ struct dtrace_state { int dts_nspeculations; /* number of speculations */ int dts_naggregations; /* number of aggregations */ dtrace_aggregation_t **dts_aggregations; /* aggregation array */ -#if defined(sun) vmem_t *dts_aggid_arena; /* arena for aggregation IDs */ -#else - struct unrhdr *dts_aggid_arena; /* arena for aggregation IDs */ -#endif uint64_t dts_errors; /* total number of errors */ uint32_t dts_speculations_busy; /* number of spec. busy */ uint32_t dts_speculations_unavail; /* number of spec unavail */ Modified: head/sys/cddl/dev/dtrace/dtrace_load.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_load.c Mon Dec 30 17:26:06 2013 (r260090) +++ head/sys/cddl/dev/dtrace/dtrace_load.c Mon Dec 30 17:37:32 2013 (r260091) @@ -58,6 +58,9 @@ dtrace_load(void *dummy) dtrace_taskq = taskq_create("dtrace_taskq", 1, maxclsyspri, 0, 0, 0); + dtrace_arena = vmem_create("dtrace", 1, UINT32_MAX, 1, 0, + M_WAITOK | M_BESTFIT); + /* Register callbacks for linker file load and unload events. */ dtrace_kld_load_tag = EVENTHANDLER_REGISTER(kld_load, dtrace_kld_load, NULL, EVENTHANDLER_PRI_ANY); @@ -85,8 +88,6 @@ dtrace_load(void *dummy) ASSERT(MUTEX_HELD(&cpu_lock)); - dtrace_arena = new_unrhdr(1, INT_MAX, &dtrace_unr_mtx); - dtrace_state_cache = kmem_cache_create("dtrace_state_cache", sizeof (dtrace_dstate_percpu_t) * NCPU, DTRACE_STATE_ALIGN, NULL, NULL, NULL, NULL, NULL, 0); Modified: head/sys/cddl/dev/dtrace/dtrace_unload.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_unload.c Mon Dec 30 17:26:06 2013 (r260090) +++ head/sys/cddl/dev/dtrace/dtrace_unload.c Mon Dec 30 17:37:32 2013 (r260091) @@ -104,7 +104,7 @@ dtrace_unload() kmem_cache_destroy(dtrace_state_cache); - delete_unrhdr(dtrace_arena); + vmem_destroy(dtrace_arena); if (dtrace_toxrange != NULL) { kmem_free(dtrace_toxrange, 0); From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 18:07:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EE8A1DC; Mon, 30 Dec 2013 18:07:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A89311B7; Mon, 30 Dec 2013 18:07:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUI7oWi046497; Mon, 30 Dec 2013 18:07:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUI7ok5046496; Mon, 30 Dec 2013 18:07:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312301807.rBUI7ok5046496@svn.freebsd.org> From: Warner Losh Date: Mon, 30 Dec 2013 18:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260092 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 18:07:51 -0000 Author: imp Date: Mon Dec 30 18:07:50 2013 New Revision: 260092 URL: http://svnweb.freebsd.org/changeset/base/260092 Log: Allow AT91_MCI_ALLOW_OVERCLOCK to be an option in kernel config files. Modified: head/sys/conf/options.arm Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Mon Dec 30 17:37:32 2013 (r260091) +++ head/sys/conf/options.arm Mon Dec 30 18:07:50 2013 (r260092) @@ -54,6 +54,7 @@ XSACLE_DISABLE_CCNT opt_timer.h VERBOSE_INIT_ARM opt_global.h VM_MAXUSER_ADDRESS opt_global.h AT91_ATE_USE_RMII opt_at91.h +AT91_MCI_ALLOW_OVERCLOCK opt_at91.h AT91_MCI_HAS_4WIRE opt_at91.h AT91_MCI_SLOT_B opt_at91.h GFB_DEBUG opt_gfb.h From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 18:10:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 677C3408; Mon, 30 Dec 2013 18:10:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A19C11CB; Mon, 30 Dec 2013 18:10:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUIA5SX048573; Mon, 30 Dec 2013 18:10:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUIA5LG048572; Mon, 30 Dec 2013 18:10:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312301810.rBUIA5LG048572@svn.freebsd.org> From: Warner Losh Date: Mon, 30 Dec 2013 18:10:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260093 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 18:10:05 -0000 Author: imp Date: Mon Dec 30 18:10:04 2013 New Revision: 260093 URL: http://svnweb.freebsd.org/changeset/base/260093 Log: Set the SoC name for the atmelbus name. Modified: head/sys/arm/at91/at91.c Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Mon Dec 30 18:07:50 2013 (r260092) +++ head/sys/arm/at91/at91.c Mon Dec 30 18:10:04 2013 (r260093) @@ -231,7 +231,7 @@ static int at91_probe(device_t dev) { - device_set_desc(dev, "AT91 device bus"); + device_set_desc(dev, soc_info.name); return (BUS_PROBE_NOWILDCARD); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 18:42:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5912C46; Mon, 30 Dec 2013 18:42:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A55A01478; Mon, 30 Dec 2013 18:42:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUIg9jB060983; Mon, 30 Dec 2013 18:42:09 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUIg9T0060982; Mon, 30 Dec 2013 18:42:09 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312301842.rBUIg9T0060982@svn.freebsd.org> From: Glen Barber Date: Mon, 30 Dec 2013 18:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r260094 - releng/10.0/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 18:42:09 -0000 Author: gjb Date: Mon Dec 30 18:42:09 2013 New Revision: 260094 URL: http://svnweb.freebsd.org/changeset/base/260094 Log: Add manual page entities needed for the -RELEASE build that do not exist in the doc/release/10.0.0/ tag. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/10.0/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/10.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Dec 30 18:10:04 2013 (r260093) +++ releng/10.0/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Dec 30 18:42:09 2013 (r260094) @@ -3,6 +3,22 @@ "../../../share/xml/freebsd50.dtd" [ %release; + + +drill1"> +freebsd-version1"> +jemalloc3"> +bhyve4"> +nvme4"> +virtio4"> +virtio_balloon4"> +virtio_blk4"> +virtio_scsi4"> +vmx4"> +pkg7"> +bhyve8"> +bsdconfig8"> +unbound8"> ]>
&os; &release.current; Release Notes From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 19:05:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E69D227; Mon, 30 Dec 2013 19:05:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ECB2115FC; Mon, 30 Dec 2013 19:05:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUJ5pdm070357; Mon, 30 Dec 2013 19:05:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUJ5oKp070349; Mon, 30 Dec 2013 19:05:50 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312301905.rBUJ5oKp070349@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 19:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260095 - in head/sys/boot: i386 i386/boot2 i386/gptboot i386/gptzfsboot i386/zfsboot pc98/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 19:05:52 -0000 Author: dim Date: Mon Dec 30 19:05:50 2013 New Revision: 260095 URL: http://svnweb.freebsd.org/changeset/base/260095 Log: For sys/boot/i386 and sys/boot/pc98, separate flags to be passed directly to the linker (LD_FLAGS) from flags passed indirectly, via the compiler driver (LDFLAGS). This is because several Makefiles under sys/boot/i386 and sys/boot/pc98 use ${LD} directly to link, and the normal LDFLAGS value should not be used in these cases. MFC after: 3 days Modified: head/sys/boot/i386/Makefile.inc head/sys/boot/i386/boot2/Makefile head/sys/boot/i386/gptboot/Makefile head/sys/boot/i386/gptzfsboot/Makefile head/sys/boot/i386/zfsboot/Makefile head/sys/boot/pc98/boot2/Makefile Modified: head/sys/boot/i386/Makefile.inc ============================================================================== --- head/sys/boot/i386/Makefile.inc Mon Dec 30 18:42:09 2013 (r260094) +++ head/sys/boot/i386/Makefile.inc Mon Dec 30 19:05:50 2013 (r260095) @@ -13,7 +13,8 @@ LDFLAGS+= -nostdlib .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -m32 ACFLAGS+= -m32 -LDFLAGS+= -m elf_i386_fbsd +# LD_FLAGS is passed directly to ${LD}, not via ${CC}: +LD_FLAGS+= -m elf_i386_fbsd AFLAGS+= --32 .endif Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Mon Dec 30 18:42:09 2013 (r260094) +++ head/sys/boot/i386/boot2/Makefile Mon Dec 30 19:05:50 2013 (r260095) @@ -44,7 +44,7 @@ CFLAGS.gcc+= -fno-guess-branch-probabili -fno-unit-at-a-time \ -mno-align-long-strings \ -LDFLAGS=-static -N --gc-sections +LD_FLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. .include @@ -60,7 +60,7 @@ boot1: boot1.out objcopy -S -O binary boot1.out ${.TARGET} boot1.out: boot1.o - ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o + ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ boot2.s boot2.s.tmp boot2.h sio.o @@ -81,7 +81,7 @@ boot2.bin: boot2.out objcopy -S -O binary boot2.out ${.TARGET} boot2.out: ${BTXCRT} boot2.o sio.o - ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} boot2.o: boot2.s ${CC} ${ACFLAGS} -c boot2.s Modified: head/sys/boot/i386/gptboot/Makefile ============================================================================== --- head/sys/boot/i386/gptboot/Makefile Mon Dec 30 18:42:09 2013 (r260094) +++ head/sys/boot/i386/gptboot/Makefile Mon Dec 30 19:05:50 2013 (r260095) @@ -37,7 +37,7 @@ CFLAGS= -DBOOTPROG=\"gptboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline --param max-inline-insns-single=100 -LDFLAGS=-static -N --gc-sections +LD_FLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. .include @@ -54,7 +54,7 @@ gptldr.bin: gptldr.out objcopy -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o CLEANFILES+= gptboot.bin gptboot.out gptboot.o sio.o gpt.o crc32.o drv.o \ cons.o util.o @@ -63,7 +63,7 @@ gptboot.bin: gptboot.out objcopy -S -O binary gptboot.out ${.TARGET} gptboot.out: ${BTXCRT} gptboot.o sio.o gpt.o crc32.o drv.o cons.o util.o - ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} gptboot.o: ${.CURDIR}/../../common/ufsread.c Modified: head/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- head/sys/boot/i386/gptzfsboot/Makefile Mon Dec 30 18:42:09 2013 (r260094) +++ head/sys/boot/i386/gptzfsboot/Makefile Mon Dec 30 19:05:50 2013 (r260095) @@ -34,7 +34,7 @@ CFLAGS= -DBOOTPROG=\"gptzfsboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline --param max-inline-insns-single=100 -LDFLAGS=-static -N --gc-sections +LD_FLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. .include @@ -51,7 +51,7 @@ gptldr.bin: gptldr.out objcopy -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o CLEANFILES+= gptzfsboot.bin gptzfsboot.out zfsboot.o sio.o cons.o \ drv.o gpt.o util.o @@ -60,7 +60,7 @@ gptzfsboot.bin: gptzfsboot.out objcopy -S -O binary gptzfsboot.out ${.TARGET} gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o util.o - ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} zfsboot.o: ${.CURDIR}/../../zfs/zfsimpl.c Modified: head/sys/boot/i386/zfsboot/Makefile ============================================================================== --- head/sys/boot/i386/zfsboot/Makefile Mon Dec 30 18:42:09 2013 (r260094) +++ head/sys/boot/i386/zfsboot/Makefile Mon Dec 30 19:05:50 2013 (r260095) @@ -31,7 +31,7 @@ CFLAGS= -DBOOTPROG=\"zfsboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline --param max-inline-insns-single=100 -LDFLAGS=-static -N --gc-sections +LD_FLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. .include @@ -47,7 +47,7 @@ zfsboot1: zfsldr.out objcopy -S -O binary zfsldr.out ${.TARGET} zfsldr.out: zfsldr.o - ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} zfsldr.o + ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} zfsldr.o CLEANFILES+= zfsboot2 zfsboot.ld zfsboot.ldr zfsboot.bin zfsboot.out \ zfsboot.o zfsboot.s zfsboot.s.tmp sio.o cons.o drv.o util.o @@ -73,7 +73,7 @@ zfsboot.bin: zfsboot.out objcopy -S -O binary zfsboot.out ${.TARGET} zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o util.o - ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} SRCS= zfsboot.c Modified: head/sys/boot/pc98/boot2/Makefile ============================================================================== --- head/sys/boot/pc98/boot2/Makefile Mon Dec 30 18:42:09 2013 (r260094) +++ head/sys/boot/pc98/boot2/Makefile Mon Dec 30 19:05:50 2013 (r260095) @@ -50,7 +50,7 @@ CFLAGS= -Os \ # Initialize the bi_bios_geom using the BIOS geometry #CFLAGS+= -DGET_BIOSGEOM -LDFLAGS=-static -N --gc-sections +LD_FLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. .include @@ -68,7 +68,7 @@ boot1: boot1.out objcopy -S -O binary boot1.out ${.TARGET} boot1.out: boot1.o - ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o + ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ boot2.s boot2.s.tmp boot2.h sio.o @@ -89,7 +89,7 @@ boot2.bin: boot2.out objcopy -S -O binary boot2.out ${.TARGET} boot2.out: ${BTXCRT} boot2.o sio.o - ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} + ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} boot2.o: boot2.s From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:15:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A9E616D; Mon, 30 Dec 2013 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 607DF1ACE; Mon, 30 Dec 2013 20:15:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUKFoiG099681; Mon, 30 Dec 2013 20:15:50 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUKFlWA099666; Mon, 30 Dec 2013 20:15:47 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312302015.rBUKFlWA099666@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 20:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260096 - in stable: 10/gnu/lib/csu 10/gnu/lib/libgcc 10/gnu/lib/libstdc++ 10/gnu/lib/libsupc++ 10/lib/atf/libatf-c/tests 10/lib/libstand 10/share/mk 10/sys/boot/ficl 10/sys/boot/i386 1... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:15:50 -0000 Author: dim Date: Mon Dec 30 20:15:46 2013 New Revision: 260096 URL: http://svnweb.freebsd.org/changeset/base/260096 Log: MFC r257532 (by adrian): Fix this build for clang. MFC r259730: To avoid having to explicitly test COMPILER_TYPE for setting clang-specific or gcc-specific flags, introduce the following new variables for use in Makefiles: CFLAGS.clang CFLAGS.gcc CXXFLAGS.clang CXXFLAGS.gcc In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for the right compiler. MFC r259913: For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc. MFC r259927: Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's Makefile. Pointy hat to: dim Modified: stable/9/gnu/lib/csu/Makefile stable/9/lib/libstand/Makefile stable/9/share/mk/bsd.sys.mk (contents, props changed) stable/9/sys/boot/ficl/Makefile stable/9/sys/boot/i386/Makefile.inc stable/9/sys/boot/i386/boot2/Makefile stable/9/sys/boot/pc98/Makefile.inc stable/9/sys/boot/pc98/boot2/Makefile stable/9/sys/boot/userboot/ficl/Makefile stable/9/sys/boot/userboot/libstand/Makefile stable/9/sys/boot/zfs/Makefile stable/9/tools/tools/ath/athstats/Makefile stable/9/tools/tools/net80211/wlanstats/Makefile stable/9/usr.bin/mkcsmapper/Makefile.inc Directory Properties: stable/9/gnu/lib/csu/ (props changed) stable/9/lib/libstand/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/ (props changed) stable/9/usr.bin/mkcsmapper/ (props changed) Changes in other areas also in this revision: Modified: stable/10/gnu/lib/csu/Makefile stable/10/gnu/lib/libgcc/Makefile stable/10/gnu/lib/libstdc++/Makefile stable/10/gnu/lib/libsupc++/Makefile stable/10/lib/atf/libatf-c/tests/Makefile stable/10/lib/libstand/Makefile stable/10/share/mk/bsd.sys.mk stable/10/sys/boot/ficl/Makefile stable/10/sys/boot/i386/Makefile.inc stable/10/sys/boot/i386/boot2/Makefile stable/10/sys/boot/pc98/Makefile.inc stable/10/sys/boot/pc98/boot2/Makefile stable/10/sys/boot/usb/Makefile stable/10/sys/boot/usb/Makefile.test stable/10/sys/boot/userboot/ficl/Makefile stable/10/sys/boot/userboot/libstand/Makefile stable/10/sys/boot/zfs/Makefile stable/10/sys/conf/Makefile.arm stable/10/tools/tools/ath/athstats/Makefile stable/10/tools/tools/net80211/wlanstats/Makefile stable/10/usr.bin/mkcsmapper/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/9/gnu/lib/csu/Makefile ============================================================================== --- stable/9/gnu/lib/csu/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/gnu/lib/csu/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -15,9 +15,7 @@ OBJS= crtbegin.o crtend.o crtbeginT.o SOBJS= crtbegin.So crtend.So CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -.if ${COMPILER_TYPE} == "gcc" -CFLAGS+= -finhibit-size-directive -fno-toplevel-reorder -.endif +CFLAGS.gcc+= -finhibit-size-directive -fno-toplevel-reorder CFLAGS+= -fno-inline-functions -fno-exceptions \ -fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables \ -fno-omit-frame-pointer Modified: stable/9/lib/libstand/Makefile ============================================================================== --- stable/9/lib/libstand/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/lib/libstand/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -21,7 +21,7 @@ CFLAGS+= -ffreestanding -Wformat CFLAGS+= -I${.CURDIR} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif .if ${MACHINE} == "pc98" Modified: stable/9/share/mk/bsd.sys.mk ============================================================================== --- stable/9/share/mk/bsd.sys.mk Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/share/mk/bsd.sys.mk Mon Dec 30 20:15:46 2013 (r260096) @@ -110,12 +110,19 @@ CWARNFLAGS+= -Wno-format CWARNFLAGS+= -Wno-unknown-pragmas .endif # IGNORE_PRAGMA -.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD) +.if !defined(EARLY_BUILD) +.if ${COMPILER_TYPE} == "clang" CLANG_NO_IAS= -no-integrated-as CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret CFLAGS+= -Qunused-arguments +CFLAGS+= ${CFLAGS.clang} +CXXFLAGS+= ${CXXFLAGS.clang} +.else # !CLANG +CFLAGS+= ${CFLAGS.gcc} +CXXFLAGS+= ${CXXFLAGS.gcc} .endif # CLANG +.endif # !EARLY_BUILD .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" Modified: stable/9/sys/boot/ficl/Makefile ============================================================================== --- stable/9/sys/boot/ficl/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/sys/boot/ficl/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -9,7 +9,7 @@ CLEANFILES= softcore.c testmain testmain CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -march=i386 -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif .if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" Modified: stable/9/sys/boot/i386/Makefile.inc ============================================================================== --- stable/9/sys/boot/i386/Makefile.inc Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/sys/boot/i386/Makefile.inc Mon Dec 30 20:15:46 2013 (r260096) @@ -5,8 +5,9 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 -CFLAGS+= -march=i386 -ffreestanding -mpreferred-stack-boundary=2 \ - -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= -march=i386 -ffreestanding +CFLAGS.gcc+= -mpreferred-stack-boundary=2 +CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float LDFLAGS+= -nostdlib .if ${MACHINE_CPUARCH} == "amd64" Modified: stable/9/sys/boot/i386/boot2/Makefile ============================================================================== --- stable/9/sys/boot/i386/boot2/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/sys/boot/i386/boot2/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -23,10 +23,7 @@ BOOT2_UFS?= UFS1_AND_UFS2 #BOOT2_UFS?= UFS1_ONLY CFLAGS= -Os \ - -fno-guess-branch-probability \ -fomit-frame-pointer \ - -fno-unit-at-a-time \ - -mno-align-long-strings \ -mrtd \ -mregparm=3 \ -DUSE_XREAD \ @@ -43,6 +40,10 @@ CFLAGS= -Os \ -Winline --param max-inline-insns-single=100 \ ${CLANG_OPT_SMALL} +CFLAGS.gcc+= -fno-guess-branch-probability \ + -fno-unit-at-a-time \ + -mno-align-long-strings \ + LDFLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. Modified: stable/9/sys/boot/pc98/Makefile.inc ============================================================================== --- stable/9/sys/boot/pc98/Makefile.inc Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/sys/boot/pc98/Makefile.inc Mon Dec 30 20:15:46 2013 (r260096) @@ -5,8 +5,9 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 -CFLAGS+= -march=i386 -ffreestanding -mpreferred-stack-boundary=2 \ - -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= -march=i386 -ffreestanding +CFLAGS.gcc+= -mpreferred-stack-boundary=2 +CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float CFLAGS+= -Os -DPC98 LDFLAGS+= -nostdlib Modified: stable/9/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/9/sys/boot/pc98/boot2/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/sys/boot/pc98/boot2/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -4,6 +4,7 @@ # XXX: clang can compile the boot code just fine, but boot2 gets too big CC:= gcc +COMPILER_TYPE:= gcc FILES= boot boot1 boot2 Modified: stable/9/sys/boot/userboot/ficl/Makefile ============================================================================== --- stable/9/sys/boot/userboot/ficl/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/sys/boot/userboot/ficl/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -16,7 +16,7 @@ CFLAGS+= -ffreestanding -fPIC CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 .endif .if ${MACHINE_CPUARCH} == "i386" -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-sse3 .endif .if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" Modified: stable/9/sys/boot/userboot/libstand/Makefile ============================================================================== --- stable/9/sys/boot/userboot/libstand/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/sys/boot/userboot/libstand/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -28,7 +28,7 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/li CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 .endif .if ${MACHINE_CPUARCH} == "i386" -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-sse3 .endif .if ${MACHINE} == "pc98" Modified: stable/9/sys/boot/zfs/Makefile ============================================================================== --- stable/9/sys/boot/zfs/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/sys/boot/zfs/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -13,7 +13,7 @@ CFLAGS+= -I${.CURDIR}/../../cddl/boot/zf CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -march=i386 -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif .if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" Modified: stable/9/tools/tools/ath/athstats/Makefile ============================================================================== --- stable/9/tools/tools/ath/athstats/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/tools/tools/ath/athstats/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -1,9 +1,17 @@ # $FreeBSD$ +NO_MAN=1 + +.include + .PATH: ${.CURDIR}/../../../../sys/dev/ath/ath_hal PROG= athstats +# Because of a clang preprocessor parser limitation causing this +# to not compile, use gcc for now. +#CC= gcc + SRCS= main.c statfoo.c athstats.c opt_ah.h ah_osdep.h CLEANFILES+= opt_ah.h @@ -13,6 +21,8 @@ CLEANFILES+= opt_ah.h CFLAGS+=-DATH_SUPPORT_ANI CFLAGS+=-DATH_SUPPORT_TDMA +CFLAGS.clang+= -fbracket-depth=512 + opt_ah.h: echo "#define AH_DEBUG 1" > opt_ah.h echo "#define AH_DEBUG_COUNTRY 1" >> opt_ah.h Modified: stable/9/tools/tools/net80211/wlanstats/Makefile ============================================================================== --- stable/9/tools/tools/net80211/wlanstats/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/tools/tools/net80211/wlanstats/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -5,5 +5,6 @@ BINDIR= /usr/local/bin NO_MAN= SRCS= statfoo.c wlanstats.c main.c +CFLAGS.clang+= -fbracket-depth=512 .include Modified: stable/9/usr.bin/mkcsmapper/Makefile.inc ============================================================================== --- stable/9/usr.bin/mkcsmapper/Makefile.inc Mon Dec 30 19:05:50 2013 (r260095) +++ stable/9/usr.bin/mkcsmapper/Makefile.inc Mon Dec 30 20:15:46 2013 (r260096) @@ -6,6 +6,4 @@ SRCS+= lex.l yacc.y CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkcsmapper \ -I${.CURDIR}/../../lib/libc/iconv \ -I${.CURDIR}/../../lib/libiconv_modules/mapper_std -.if ${COMPILER_TYPE} == "gcc" -CFLAGS+= --param max-inline-insns-single=64 -.endif +CFLAGS.gcc+= --param max-inline-insns-single=64 From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:15:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F68D16E; Mon, 30 Dec 2013 20:15:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BFCF81ACF; Mon, 30 Dec 2013 20:15:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUKFsdd099713; Mon, 30 Dec 2013 20:15:54 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUKFo7n099686; Mon, 30 Dec 2013 20:15:50 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312302015.rBUKFo7n099686@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 20:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260096 - in stable: 10/gnu/lib/csu 10/gnu/lib/libgcc 10/gnu/lib/libstdc++ 10/gnu/lib/libsupc++ 10/lib/atf/libatf-c/tests 10/lib/libstand 10/share/mk 10/sys/boot/ficl 10/sys/boot/i386 1... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:15:55 -0000 Author: dim Date: Mon Dec 30 20:15:46 2013 New Revision: 260096 URL: http://svnweb.freebsd.org/changeset/base/260096 Log: MFC r257532 (by adrian): Fix this build for clang. MFC r259730: To avoid having to explicitly test COMPILER_TYPE for setting clang-specific or gcc-specific flags, introduce the following new variables for use in Makefiles: CFLAGS.clang CFLAGS.gcc CXXFLAGS.clang CXXFLAGS.gcc In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for the right compiler. MFC r259913: For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc. MFC r259927: Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's Makefile. Pointy hat to: dim Modified: stable/10/gnu/lib/csu/Makefile stable/10/gnu/lib/libgcc/Makefile stable/10/gnu/lib/libstdc++/Makefile stable/10/gnu/lib/libsupc++/Makefile stable/10/lib/atf/libatf-c/tests/Makefile stable/10/lib/libstand/Makefile stable/10/share/mk/bsd.sys.mk stable/10/sys/boot/ficl/Makefile stable/10/sys/boot/i386/Makefile.inc stable/10/sys/boot/i386/boot2/Makefile stable/10/sys/boot/pc98/Makefile.inc stable/10/sys/boot/pc98/boot2/Makefile stable/10/sys/boot/usb/Makefile stable/10/sys/boot/usb/Makefile.test stable/10/sys/boot/userboot/ficl/Makefile stable/10/sys/boot/userboot/libstand/Makefile stable/10/sys/boot/zfs/Makefile stable/10/sys/conf/Makefile.arm stable/10/tools/tools/ath/athstats/Makefile stable/10/tools/tools/net80211/wlanstats/Makefile stable/10/usr.bin/mkcsmapper/Makefile.inc Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/gnu/lib/csu/Makefile stable/9/lib/libstand/Makefile stable/9/share/mk/bsd.sys.mk (contents, props changed) stable/9/sys/boot/ficl/Makefile stable/9/sys/boot/i386/Makefile.inc stable/9/sys/boot/i386/boot2/Makefile stable/9/sys/boot/pc98/Makefile.inc stable/9/sys/boot/pc98/boot2/Makefile stable/9/sys/boot/userboot/ficl/Makefile stable/9/sys/boot/userboot/libstand/Makefile stable/9/sys/boot/zfs/Makefile stable/9/tools/tools/ath/athstats/Makefile stable/9/tools/tools/net80211/wlanstats/Makefile stable/9/usr.bin/mkcsmapper/Makefile.inc Directory Properties: stable/9/gnu/lib/csu/ (props changed) stable/9/lib/libstand/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/ (props changed) stable/9/usr.bin/mkcsmapper/ (props changed) Modified: stable/10/gnu/lib/csu/Makefile ============================================================================== --- stable/10/gnu/lib/csu/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/gnu/lib/csu/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -15,9 +15,7 @@ OBJS= crtbegin.o crtend.o crtbeginT.o SOBJS= crtbeginS.o crtendS.o CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -.if ${COMPILER_TYPE} == "gcc" -CFLAGS+= -finhibit-size-directive -fno-toplevel-reorder -.endif +CFLAGS.gcc+= -finhibit-size-directive -fno-toplevel-reorder CFLAGS+= -fno-inline-functions -fno-exceptions \ -fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables \ -fno-omit-frame-pointer Modified: stable/10/gnu/lib/libgcc/Makefile ============================================================================== --- stable/10/gnu/lib/libgcc/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/gnu/lib/libgcc/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -112,9 +112,7 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udi .if ${TARGET_CPUARCH} == "arm" # from config/arm/t-strongarm-elf CFLAGS+= -Dinhibit_libc -fno-inline -.if ${COMPILER_TYPE} == "clang" -CFLAGS+= -fheinous-gnu-extensions -.endif +CFLAGS.clang+= -fheinous-gnu-extensions LIB1ASMSRC = lib1funcs.asm LIB1ASMFUNCS = _dvmd_tls _bb_init_func Modified: stable/10/gnu/lib/libstdc++/Makefile ============================================================================== --- stable/10/gnu/lib/libstdc++/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/gnu/lib/libstdc++/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -637,6 +637,4 @@ CLEANFILES+= ${VERSION_MAP} # Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} -.if ${COMPILER_TYPE} == "clang" -CXXFLAGS+= -stdlib=libstdc++ -.endif +CXXFLAGS.clang+= -stdlib=libstdc++ Modified: stable/10/gnu/lib/libsupc++/Makefile ============================================================================== --- stable/10/gnu/lib/libsupc++/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/gnu/lib/libsupc++/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -57,6 +57,4 @@ VERSION_MAP= ${.CURDIR}/Version.map # Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} -.if ${COMPILER_TYPE} == "clang" -CXXFLAGS+= -stdlib=libstdc++ -.endif +CXXFLAGS.clang+= -stdlib=libstdc++ Modified: stable/10/lib/atf/libatf-c/tests/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/tests/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/lib/atf/libatf-c/tests/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -10,12 +10,10 @@ ATF= ${.CURDIR:H:H:H:H}/contrib/atf CFLAGS+= -I${ATF} -.if ${COMPILER_TYPE} == "clang" # macros_test.c contains a double 'const const' which will be gone with # the import of atf-0.18. # TODO(jmmv): Remove this workaround once we do that update. -CFLAGS+= -Wno-duplicate-decl-specifier -.endif +CFLAGS.clang+= -Wno-duplicate-decl-specifier FILESDIR= ${TESTSDIR} FILES= macros_h_test.c Modified: stable/10/lib/libstand/Makefile ============================================================================== --- stable/10/lib/libstand/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/lib/libstand/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -21,7 +21,7 @@ CFLAGS+= -ffreestanding -Wformat CFLAGS+= -I${.CURDIR} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif .if ${MACHINE} == "pc98" Modified: stable/10/share/mk/bsd.sys.mk ============================================================================== --- stable/10/share/mk/bsd.sys.mk Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/share/mk/bsd.sys.mk Mon Dec 30 20:15:46 2013 (r260096) @@ -114,12 +114,19 @@ CWARNFLAGS+= -Wno-format CWARNFLAGS+= -Wno-unknown-pragmas .endif # IGNORE_PRAGMA -.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD) +.if !defined(EARLY_BUILD) +.if ${COMPILER_TYPE} == "clang" CLANG_NO_IAS= -no-integrated-as CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret CFLAGS+= -Qunused-arguments +CFLAGS+= ${CFLAGS.clang} +CXXFLAGS+= ${CXXFLAGS.clang} +.else # !CLANG +CFLAGS+= ${CFLAGS.gcc} +CXXFLAGS+= ${CXXFLAGS.gcc} .endif # CLANG +.endif # !EARLY_BUILD .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" Modified: stable/10/sys/boot/ficl/Makefile ============================================================================== --- stable/10/sys/boot/ficl/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/boot/ficl/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -17,7 +17,7 @@ CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" .if !defined(FICL64) CFLAGS+= -march=i386 -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif Modified: stable/10/sys/boot/i386/Makefile.inc ============================================================================== --- stable/10/sys/boot/i386/Makefile.inc Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/boot/i386/Makefile.inc Mon Dec 30 20:15:46 2013 (r260096) @@ -5,8 +5,9 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 -CFLAGS+= -march=i386 -ffreestanding -mpreferred-stack-boundary=2 \ - -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= -march=i386 -ffreestanding +CFLAGS.gcc+= -mpreferred-stack-boundary=2 +CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float LDFLAGS+= -nostdlib .if ${MACHINE_CPUARCH} == "amd64" Modified: stable/10/sys/boot/i386/boot2/Makefile ============================================================================== --- stable/10/sys/boot/i386/boot2/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/boot/i386/boot2/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -23,10 +23,7 @@ BOOT2_UFS?= UFS1_AND_UFS2 #BOOT2_UFS?= UFS1_ONLY CFLAGS= -Os \ - -fno-guess-branch-probability \ -fomit-frame-pointer \ - -fno-unit-at-a-time \ - -mno-align-long-strings \ -mrtd \ -mregparm=3 \ -DUSE_XREAD \ @@ -43,6 +40,10 @@ CFLAGS= -Os \ -Winline --param max-inline-insns-single=100 \ ${CLANG_OPT_SMALL} +CFLAGS.gcc+= -fno-guess-branch-probability \ + -fno-unit-at-a-time \ + -mno-align-long-strings \ + LDFLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. Modified: stable/10/sys/boot/pc98/Makefile.inc ============================================================================== --- stable/10/sys/boot/pc98/Makefile.inc Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/boot/pc98/Makefile.inc Mon Dec 30 20:15:46 2013 (r260096) @@ -5,8 +5,9 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 -CFLAGS+= -march=i386 -ffreestanding -mpreferred-stack-boundary=2 \ - -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= -march=i386 -ffreestanding +CFLAGS.gcc+= -mpreferred-stack-boundary=2 +CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float CFLAGS+= -Os -DPC98 LDFLAGS+= -nostdlib Modified: stable/10/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/10/sys/boot/pc98/boot2/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/boot/pc98/boot2/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -4,6 +4,7 @@ # XXX: clang can compile the boot code just fine, but boot2 gets too big CC:= gcc +COMPILER_TYPE:= gcc FILES= boot boot1 boot2 Modified: stable/10/sys/boot/usb/Makefile ============================================================================== --- stable/10/sys/boot/usb/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/boot/usb/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -53,7 +53,7 @@ CFLAGS+= -g .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -march=i386 -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -m32 Modified: stable/10/sys/boot/usb/Makefile.test ============================================================================== --- stable/10/sys/boot/usb/Makefile.test Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/boot/usb/Makefile.test Mon Dec 30 20:15:46 2013 (r260096) @@ -40,7 +40,7 @@ CFLAGS+= -g .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -march=i386 -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -m32 Modified: stable/10/sys/boot/userboot/ficl/Makefile ============================================================================== --- stable/10/sys/boot/userboot/ficl/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/boot/userboot/ficl/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -16,7 +16,7 @@ CFLAGS+= -ffreestanding -fPIC CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 .endif .if ${MACHINE_CPUARCH} == "i386" -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-sse3 .endif .if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" Modified: stable/10/sys/boot/userboot/libstand/Makefile ============================================================================== --- stable/10/sys/boot/userboot/libstand/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/boot/userboot/libstand/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -28,7 +28,7 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/li CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 .endif .if ${MACHINE_CPUARCH} == "i386" -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-sse3 .endif .if ${MACHINE} == "pc98" Modified: stable/10/sys/boot/zfs/Makefile ============================================================================== --- stable/10/sys/boot/zfs/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/boot/zfs/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -13,7 +13,7 @@ CFLAGS+= -I${.CURDIR}/../../cddl/boot/zf CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -march=i386 -CFLAGS+= -mpreferred-stack-boundary=2 +CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif .if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" Modified: stable/10/sys/conf/Makefile.arm ============================================================================== --- stable/10/sys/conf/Makefile.arm Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/sys/conf/Makefile.arm Mon Dec 30 20:15:46 2013 (r260096) @@ -39,20 +39,16 @@ SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscri STRIP_FLAGS = -S .endif -.if ${COMPILER_TYPE} != "clang" -CFLAGS += -mno-thumb-interwork -.endif +CFLAGS.gcc += -mno-thumb-interwork .if empty(DDB_ENABLED) -.if defined(WITHOUT_ARM_EABI) && ${COMPILER_TYPE} != "clang" -CFLAGS += -mno-apcs-frame +.if defined(WITHOUT_ARM_EABI) +CFLAGS.gcc += -mno-apcs-frame .endif .elif !defined(WITHOUT_ARM_EABI) CFLAGS += -funwind-tables -.if ${COMPILER_TYPE} == "clang" # clang requires us to tell it to emit assembly with unwind information -CFLAGS += -mllvm -arm-enable-ehabi -.endif +CFLAGS.clang += -mllvm -arm-enable-ehabi .endif SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \ Modified: stable/10/tools/tools/ath/athstats/Makefile ============================================================================== --- stable/10/tools/tools/ath/athstats/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/tools/tools/ath/athstats/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -1,12 +1,16 @@ # $FreeBSD$ +NO_MAN=1 + +.include + .PATH: ${.CURDIR}/../../../../sys/dev/ath/ath_hal PROG= athstats # Because of a clang preprocessor parser limitation causing this # to not compile, use gcc for now. -CC= gcc +#CC= gcc SRCS= main.c statfoo.c athstats.c opt_ah.h ah_osdep.h @@ -17,6 +21,8 @@ CLEANFILES+= opt_ah.h CFLAGS+=-DATH_SUPPORT_ANI CFLAGS+=-DATH_SUPPORT_TDMA +CFLAGS.clang+= -fbracket-depth=512 + opt_ah.h: echo "#define AH_DEBUG 1" > opt_ah.h echo "#define AH_DEBUG_COUNTRY 1" >> opt_ah.h Modified: stable/10/tools/tools/net80211/wlanstats/Makefile ============================================================================== --- stable/10/tools/tools/net80211/wlanstats/Makefile Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/tools/tools/net80211/wlanstats/Makefile Mon Dec 30 20:15:46 2013 (r260096) @@ -7,8 +7,6 @@ BINDIR= /usr/local/bin NO_MAN= SRCS= statfoo.c wlanstats.c main.c -.if ${COMPILER_TYPE} == "clang" -CFLAGS+= -fbracket-depth=512 -.endif +CFLAGS.clang+= -fbracket-depth=512 .include Modified: stable/10/usr.bin/mkcsmapper/Makefile.inc ============================================================================== --- stable/10/usr.bin/mkcsmapper/Makefile.inc Mon Dec 30 19:05:50 2013 (r260095) +++ stable/10/usr.bin/mkcsmapper/Makefile.inc Mon Dec 30 20:15:46 2013 (r260096) @@ -6,6 +6,4 @@ SRCS+= lex.l yacc.y CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkcsmapper \ -I${.CURDIR}/../../lib/libc/iconv \ -I${.CURDIR}/../../lib/libiconv_modules/mapper_std -.if ${COMPILER_TYPE} == "gcc" -CFLAGS+= --param max-inline-insns-single=64 -.endif +CFLAGS.gcc+= --param max-inline-insns-single=64 From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:23:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65A124E5; Mon, 30 Dec 2013 20: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 508661C85; Mon, 30 Dec 2013 20:23:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUKNGIG003235; Mon, 30 Dec 2013 20:23:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUKNF2L003229; Mon, 30 Dec 2013 20:23:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312302023.rBUKNF2L003229@svn.freebsd.org> From: Alexander Motin Date: Mon, 30 Dec 2013 20:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260097 - in head/sys: nfs rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:23:16 -0000 Author: mav Date: Mon Dec 30 20:23:15 2013 New Revision: 260097 URL: http://svnweb.freebsd.org/changeset/base/260097 Log: Move most of NFS file handle affinity code out of the heavily congested global RPC thread pool lock and protect it with own set of locks. On synthetic benchmarks this improves peak NFS request rate by 40%. Modified: head/sys/nfs/nfs_fha.c head/sys/nfs/nfs_fha.h head/sys/rpc/svc.c head/sys/rpc/svc.h Modified: head/sys/nfs/nfs_fha.c ============================================================================== --- head/sys/nfs/nfs_fha.c Mon Dec 30 20:15:46 2013 (r260096) +++ head/sys/nfs/nfs_fha.c Mon Dec 30 20:23:15 2013 (r260097) @@ -52,13 +52,10 @@ void fha_init(struct fha_params *softc) { char tmpstr[128]; + int i; - /* - * A small hash table to map filehandles to fha_hash_entry - * structures. - */ - softc->g_fha.hashtable = hashinit(256, M_NFS_FHA, - &softc->g_fha.hashmask); + for (i = 0; i < FHA_HASH_SIZE; i++) + mtx_init(&softc->fha_hash[i].mtx, "fhalock", NULL, MTX_DEF); /* * Set the default tuning parameters. @@ -117,8 +114,11 @@ fha_init(struct fha_params *softc) void fha_uninit(struct fha_params *softc) { + int i; + sysctl_ctx_free(&softc->sysctl_ctx); - hashdestroy(softc->g_fha.hashtable, M_NFS_FHA, softc->g_fha.hashmask); + for (i = 0; i < FHA_HASH_SIZE; i++) + mtx_destroy(&softc->fha_hash[i].mtx); } /* @@ -207,8 +207,13 @@ static void fha_hash_entry_destroy(struct fha_hash_entry *e) { - if (e->num_rw + e->num_exclusive) - panic("nonempty fhe"); + mtx_assert(e->mtx, MA_OWNED); + KASSERT(e->num_rw == 0, + ("%d reqs on destroyed fhe %p", e->num_rw, e)); + KASSERT(e->num_exclusive == 0, + ("%d exclusive reqs on destroyed fhe %p", e->num_exclusive, e)); + KASSERT(e->num_threads == 0, + ("%d threads on destroyed fhe %p", e->num_threads, e)); free(e, M_NFS_FHA); } @@ -216,6 +221,7 @@ static void fha_hash_entry_remove(struct fha_hash_entry *e) { + mtx_assert(e->mtx, MA_OWNED); LIST_REMOVE(e, link); fha_hash_entry_destroy(e); } @@ -224,36 +230,22 @@ static struct fha_hash_entry * fha_hash_entry_lookup(struct fha_params *softc, u_int64_t fh) { SVCPOOL *pool; - - pool = *softc->pool; - + struct fha_hash_slot *fhs; struct fha_hash_entry *fhe, *new_fhe; - LIST_FOREACH(fhe, &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], - link) + pool = *softc->pool; + fhs = &softc->fha_hash[fh % FHA_HASH_SIZE]; + new_fhe = fha_hash_entry_new(fh); + new_fhe->mtx = &fhs->mtx; + mtx_lock(&fhs->mtx); + LIST_FOREACH(fhe, &fhs->list, link) if (fhe->fh == fh) break; - if (!fhe) { - /* Allocate a new entry. */ - mtx_unlock(&pool->sp_lock); - new_fhe = fha_hash_entry_new(fh); - mtx_lock(&pool->sp_lock); - - /* Double-check to make sure we still need the new entry. */ - LIST_FOREACH(fhe, - &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], link) - if (fhe->fh == fh) - break; - if (!fhe) { - fhe = new_fhe; - LIST_INSERT_HEAD( - &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], - fhe, link); - } else - fha_hash_entry_destroy(new_fhe); - } - + fhe = new_fhe; + LIST_INSERT_HEAD(&fhs->list, fhe, link); + } else + fha_hash_entry_destroy(new_fhe); return (fhe); } @@ -261,6 +253,8 @@ static void fha_hash_entry_add_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) { + mtx_assert(fhe->mtx, MA_OWNED); + thread->st_p2 = 0; LIST_INSERT_HEAD(&fhe->threads, thread, st_alink); fhe->num_threads++; } @@ -269,6 +263,9 @@ static void fha_hash_entry_remove_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) { + mtx_assert(fhe->mtx, MA_OWNED); + KASSERT(thread->st_p2 == 0, + ("%d reqs on removed thread %p", thread->st_p2, thread)); LIST_REMOVE(thread, st_alink); fhe->num_threads--; } @@ -280,6 +277,7 @@ static void fha_hash_entry_add_op(struct fha_hash_entry *fhe, int locktype, int count) { + mtx_assert(fhe->mtx, MA_OWNED); if (LK_EXCLUSIVE == locktype) fhe->num_exclusive += count; else @@ -306,7 +304,7 @@ fha_hash_entry_choose_thread(struct fha_ pool = *softc->pool; LIST_FOREACH(thread, &fhe->threads, st_alink) { - req_count = thread->st_reqcount; + req_count = thread->st_p2; /* If there are any writes in progress, use the first thread. */ if (fhe->num_exclusive) { @@ -322,7 +320,7 @@ fha_hash_entry_choose_thread(struct fha_ * exceed our per-thread load limit in the process. */ offset1 = i->offset; - offset2 = STAILQ_FIRST(&thread->st_reqs)->rq_p3; + offset2 = thread->st_p3; if (((offset1 >= offset2) && ((offset1 - offset2) < (1 << softc->ctls.bin_shift))) @@ -360,28 +358,11 @@ fha_hash_entry_choose_thread(struct fha_ */ if ((softc->ctls.max_nfsds_per_fh == 0) || (fhe->num_threads < softc->ctls.max_nfsds_per_fh)) { - /* - * We can add a new thread, so try for an idle thread - * first, and fall back to this_thread if none are idle. - */ - if (STAILQ_EMPTY(&this_thread->st_reqs)) { - thread = this_thread; + thread = this_thread; #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)t", thread, thread->st_reqcount); -#endif - } else if ((thread = LIST_FIRST(&pool->sp_idlethreads))) { -#if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)i", thread, thread->st_reqcount); -#endif - } else { - thread = this_thread; -#if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)b", thread, thread->st_reqcount); + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + "fha: %p(%d)t", thread, thread->st_p2); #endif - } fha_hash_entry_add_thread(fhe, thread); } else { /* @@ -411,16 +392,16 @@ fha_assign(SVCTHREAD *this_thread, struc /* Check to see whether we're enabled. */ if (softc->ctls.enable == 0) - return (this_thread); + goto thist; /* * Only do placement if this is an NFS request. */ if (req->rq_prog != NFS_PROG) - return (this_thread); + goto thist; if (req->rq_vers != 2 && req->rq_vers != 3) - return (this_thread); + goto thist; fha_extract_info(req, &i, cb); @@ -440,8 +421,21 @@ fha_assign(SVCTHREAD *this_thread, struc thread = fha_hash_entry_choose_thread(softc, fhe, &i, this_thread); KASSERT(thread, ("fha_assign: NULL thread!")); fha_hash_entry_add_op(fhe, i.locktype, 1); + thread->st_p2++; + thread->st_p3 = i.offset; + + /* + * Grab the pool lock here to not let chosen thread go away before + * the new request inserted to its queue while we drop fhe lock. + */ + mtx_lock(&(*softc->pool)->sp_lock); + mtx_unlock(fhe->mtx); return (thread); +thist: + req->rq_p1 = NULL; + mtx_lock(&(*softc->pool)->sp_lock); + return (this_thread); } /* @@ -452,6 +446,7 @@ void fha_nd_complete(SVCTHREAD *thread, struct svc_req *req) { struct fha_hash_entry *fhe = req->rq_p1; + struct mtx *mtx; /* * This may be called for reqs that didn't go through @@ -460,13 +455,18 @@ fha_nd_complete(SVCTHREAD *thread, struc if (!fhe) return; + mtx = fhe->mtx; + mtx_lock(mtx); fha_hash_entry_add_op(fhe, req->rq_p2, -1); - - if (thread->st_reqcount == 0) { + thread->st_p2--; + KASSERT(thread->st_p2 >= 0, ("Negative request count %d on %p", + thread->st_p2, thread)); + if (thread->st_p2 == 0) { fha_hash_entry_remove_thread(fhe, thread); if (0 == fhe->num_rw + fhe->num_exclusive) fha_hash_entry_remove(fhe); } + mtx_unlock(mtx); } int @@ -489,10 +489,9 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st } pool = *softc->pool; - mtx_lock(&pool->sp_lock); count = 0; - for (i = 0; i <= softc->g_fha.hashmask; i++) - if (!LIST_EMPTY(&softc->g_fha.hashtable[i])) + for (i = 0; i < FHA_HASH_SIZE; i++) + if (!LIST_EMPTY(&softc->fha_hash[i].list)) count++; if (count == 0) { @@ -500,8 +499,9 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st goto out; } - for (i = 0; i <= softc->g_fha.hashmask; i++) { - LIST_FOREACH(fhe, &softc->g_fha.hashtable[i], link) { + for (i = 0; i < FHA_HASH_SIZE; i++) { + mtx_lock(&softc->fha_hash[i].mtx); + LIST_FOREACH(fhe, &softc->fha_hash[i].list, link) { sbuf_printf(&sb, "%sfhe %p: {\n", first ? "" : ", ", fhe); sbuf_printf(&sb, " fh: %ju\n", (uintmax_t) fhe->fh); @@ -512,8 +512,7 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st LIST_FOREACH(thread, &fhe->threads, st_alink) { sbuf_printf(&sb, " thread %p offset %ju " "(count %d)\n", thread, - STAILQ_FIRST(&thread->st_reqs)->rq_p3, - thread->st_reqcount); + thread->st_p3, thread->st_p2); } sbuf_printf(&sb, "}"); @@ -525,11 +524,10 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st break; } } + mtx_unlock(&softc->fha_hash[i].mtx); } out: - if (pool) - mtx_unlock(&pool->sp_lock); sbuf_trim(&sb); sbuf_finish(&sb); error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); Modified: head/sys/nfs/nfs_fha.h ============================================================================== --- head/sys/nfs/nfs_fha.h Mon Dec 30 20:15:46 2013 (r260096) +++ head/sys/nfs/nfs_fha.h Mon Dec 30 20:23:15 2013 (r260097) @@ -35,11 +35,7 @@ #define FHA_DEF_MAX_NFSDS_PER_FH 8 #define FHA_DEF_MAX_REQS_PER_NFSD 0 /* Unlimited */ -/* This is the global structure that represents the state of the fha system. */ -struct fha_global { - struct fha_hash_entry_list *hashtable; - u_long hashmask; -}; +#define FHA_HASH_SIZE 251 struct fha_ctls { int enable; @@ -62,6 +58,7 @@ struct fha_ctls { * avoid contention between threads over single files. */ struct fha_hash_entry { + struct mtx *mtx; LIST_ENTRY(fha_hash_entry) link; u_int64_t fh; u_int32_t num_rw; @@ -72,6 +69,11 @@ struct fha_hash_entry { LIST_HEAD(fha_hash_entry_list, fha_hash_entry); +struct fha_hash_slot { + struct fha_hash_entry_list list; + struct mtx mtx; +}; + /* A structure used for passing around data internally. */ struct fha_info { u_int64_t fh; @@ -93,7 +95,7 @@ struct fha_callbacks { }; struct fha_params { - struct fha_global g_fha; + struct fha_hash_slot fha_hash[FHA_HASH_SIZE]; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; struct fha_ctls ctls; Modified: head/sys/rpc/svc.c ============================================================================== --- head/sys/rpc/svc.c Mon Dec 30 20:15:46 2013 (r260096) +++ head/sys/rpc/svc.c Mon Dec 30 20:23:15 2013 (r260097) @@ -71,6 +71,8 @@ static struct svc_callout *svc_find(SVCP char *); static void svc_new_thread(SVCPOOL *pool); static void xprt_unregister_locked(SVCXPRT *xprt); +static void svc_change_space_used(SVCPOOL *pool, int delta); +static bool_t svc_request_space_available(SVCPOOL *pool); /* *************** SVCXPRT related stuff **************** */ @@ -373,7 +375,8 @@ xprt_active(SVCXPRT *xprt) if (!xprt->xp_active) { xprt->xp_active = TRUE; if (xprt->xp_thread == NULL) { - if (!xprt_assignthread(xprt)) + if (!svc_request_space_available(pool) || + !xprt_assignthread(xprt)) TAILQ_INSERT_TAIL(&pool->sp_active, xprt, xp_alink); } @@ -965,56 +968,63 @@ svc_assign_waiting_sockets(SVCPOOL *pool { SVCXPRT *xprt; + mtx_lock(&pool->sp_lock); while ((xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { if (xprt_assignthread(xprt)) TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); else break; } + mtx_unlock(&pool->sp_lock); } -static bool_t -svc_request_space_available(SVCPOOL *pool) +static void +svc_change_space_used(SVCPOOL *pool, int delta) { + unsigned int value; - mtx_assert(&pool->sp_lock, MA_OWNED); - - if (pool->sp_space_throttled) { - /* - * Below the low-water yet? If so, assign any waiting sockets. - */ - if (pool->sp_space_used < pool->sp_space_low) { - pool->sp_space_throttled = FALSE; - svc_assign_waiting_sockets(pool); - return TRUE; - } - - return FALSE; - } else { - if (pool->sp_space_used - >= pool->sp_space_high) { + value = atomic_fetchadd_int(&pool->sp_space_used, delta) + delta; + if (delta > 0) { + if (value >= pool->sp_space_high && !pool->sp_space_throttled) { pool->sp_space_throttled = TRUE; pool->sp_space_throttle_count++; - return FALSE; } - - return TRUE; + if (value > pool->sp_space_used_highest) + pool->sp_space_used_highest = value; + } else { + if (value < pool->sp_space_low && pool->sp_space_throttled) { + pool->sp_space_throttled = FALSE; + svc_assign_waiting_sockets(pool); + } } } +static bool_t +svc_request_space_available(SVCPOOL *pool) +{ + + if (pool->sp_space_throttled) + return (FALSE); + return (TRUE); +} + static void svc_run_internal(SVCPOOL *pool, bool_t ismaster) { + struct svc_reqlist reqs; SVCTHREAD *st, *stpref; SVCXPRT *xprt; enum xprt_stat stat; struct svc_req *rqstp; + size_t sz; int error; st = mem_alloc(sizeof(*st)); + st->st_pool = pool; st->st_xprt = NULL; STAILQ_INIT(&st->st_reqs); cv_init(&st->st_cond, "rpcsvc"); + STAILQ_INIT(&reqs); mtx_lock(&pool->sp_lock); LIST_INSERT_HEAD(&pool->sp_threads, st, st_link); @@ -1108,15 +1118,14 @@ svc_run_internal(SVCPOOL *pool, bool_t i * RPCs. */ xprt->xp_lastactive = time_uptime; - stat = XPRT_IDLE; do { + mtx_unlock(&pool->sp_lock); if (!svc_request_space_available(pool)) break; rqstp = NULL; - mtx_unlock(&pool->sp_lock); stat = svc_getreq(xprt, &rqstp); - mtx_lock(&pool->sp_lock); if (rqstp) { + svc_change_space_used(pool, rqstp->rq_size); /* * See if the application has * a preference for some other @@ -1126,17 +1135,12 @@ svc_run_internal(SVCPOOL *pool, bool_t i if (pool->sp_assign) stpref = pool->sp_assign(st, rqstp); + else + mtx_lock(&pool->sp_lock); - pool->sp_space_used += - rqstp->rq_size; - if (pool->sp_space_used - > pool->sp_space_used_highest) - pool->sp_space_used_highest = - pool->sp_space_used; rqstp->rq_thread = stpref; STAILQ_INSERT_TAIL(&stpref->st_reqs, rqstp, rq_link); - stpref->st_reqcount++; /* * If we assigned the request @@ -1156,7 +1160,8 @@ svc_run_internal(SVCPOOL *pool, bool_t i stpref->st_idle = FALSE; cv_signal(&stpref->st_cond); } - } + } else + mtx_lock(&pool->sp_lock); } while (stat == XPRT_MOREREQS && pool->sp_state != SVCPOOL_CLOSING); @@ -1171,25 +1176,30 @@ svc_run_internal(SVCPOOL *pool, bool_t i xprt->xp_thread = NULL; st->st_xprt = NULL; if (xprt->xp_active) { - if (!xprt_assignthread(xprt)) + if (!svc_request_space_available(pool) || + !xprt_assignthread(xprt)) TAILQ_INSERT_TAIL(&pool->sp_active, xprt, xp_alink); } + STAILQ_CONCAT(&reqs, &st->st_reqs); mtx_unlock(&pool->sp_lock); SVC_RELEASE(xprt); - mtx_lock(&pool->sp_lock); + } else { + STAILQ_CONCAT(&reqs, &st->st_reqs); + mtx_unlock(&pool->sp_lock); } /* * Execute what we have queued. */ - while ((rqstp = STAILQ_FIRST(&st->st_reqs)) != NULL) { - size_t sz = rqstp->rq_size; - mtx_unlock(&pool->sp_lock); + sz = 0; + while ((rqstp = STAILQ_FIRST(&reqs)) != NULL) { + STAILQ_REMOVE_HEAD(&reqs, rq_link); + sz += rqstp->rq_size; svc_executereq(rqstp); - mtx_lock(&pool->sp_lock); - pool->sp_space_used -= sz; } + svc_change_space_used(pool, -sz); + mtx_lock(&pool->sp_lock); } if (st->st_xprt) { @@ -1309,24 +1319,13 @@ void svc_freereq(struct svc_req *rqstp) { SVCTHREAD *st; - SVCXPRT *xprt; SVCPOOL *pool; st = rqstp->rq_thread; - xprt = rqstp->rq_xprt; - if (xprt) - pool = xprt->xp_pool; - else - pool = NULL; if (st) { - mtx_lock(&pool->sp_lock); - KASSERT(rqstp == STAILQ_FIRST(&st->st_reqs), - ("Freeing request out of order")); - STAILQ_REMOVE_HEAD(&st->st_reqs, rq_link); - st->st_reqcount--; + pool = st->st_pool; if (pool->sp_done) pool->sp_done(st, rqstp); - mtx_unlock(&pool->sp_lock); } if (rqstp->rq_auth.svc_ah_ops) Modified: head/sys/rpc/svc.h ============================================================================== --- head/sys/rpc/svc.h Mon Dec 30 20:15:46 2013 (r260096) +++ head/sys/rpc/svc.h Mon Dec 30 20:23:15 2013 (r260097) @@ -275,14 +275,16 @@ STAILQ_HEAD(svc_reqlist, svc_req); * thread to read and execute pending RPCs. */ typedef struct __rpc_svcthread { + struct __rpc_svcpool *st_pool; SVCXPRT *st_xprt; /* transport we are processing */ struct svc_reqlist st_reqs; /* RPC requests to execute */ - int st_reqcount; /* number of queued reqs */ int st_idle; /* thread is on idle list */ struct cv st_cond; /* sleeping for work */ LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ LIST_ENTRY(__rpc_svcthread) st_alink; /* application thread list */ + int st_p2; /* application workspace */ + uint64_t st_p3; /* application workspace */ } SVCTHREAD; LIST_HEAD(svcthread_list, __rpc_svcthread); From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:24:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 554AD71F; Mon, 30 Dec 2013 20:24:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 422161C97; Mon, 30 Dec 2013 20:24:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUKO67M003404; Mon, 30 Dec 2013 20:24:06 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUKO6pI003403; Mon, 30 Dec 2013 20:24:06 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312302024.rBUKO6pI003403@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 30 Dec 2013 20:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260099 - head/contrib/gcc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:24:06 -0000 Author: pfg Date: Mon Dec 30 20:24:05 2013 New Revision: 260099 URL: http://svnweb.freebsd.org/changeset/base/260099 Log: gcc: Fix issue with "unavailable" attribute. While here, point where we dropped the support for objc from r260014. MFC after: 3 weeks Modified: head/contrib/gcc/c-common.c Modified: head/contrib/gcc/c-common.c ============================================================================== --- head/contrib/gcc/c-common.c Mon Dec 30 20:23:40 2013 (r260098) +++ head/contrib/gcc/c-common.c Mon Dec 30 20:24:05 2013 (r260099) @@ -5380,7 +5380,9 @@ handle_unavailable_attribute (tree *node if (TREE_CODE (decl) == TYPE_DECL || TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL - || TREE_CODE (decl) == FUNCTION_DECL) + || TREE_CODE (decl) == FUNCTION_DECL + || TREE_CODE (decl) == FIELD_DECL) + /* Removed radar 3803157 - objc attribute */ { TREE_UNAVAILABLE (decl) = 1; } From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:27:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 034EB8C9; Mon, 30 Dec 2013 20:27:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C88671CB7; Mon, 30 Dec 2013 20:27:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUKRwRL003842; Mon, 30 Dec 2013 20:27:58 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUKRwqK003841; Mon, 30 Dec 2013 20:27:58 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312302027.rBUKRwqK003841@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 20:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260100 - in stable: 10/sys/dev/drm 9/sys/dev/drm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:27:59 -0000 Author: dim Date: Mon Dec 30 20:27:58 2013 New Revision: 260100 URL: http://svnweb.freebsd.org/changeset/base/260100 Log: MFC r259902: In sys/dev/drm/mach64_dma.c, remove static function mach64_set_dma_eol(), which has never been used, even by upstream, since its initial upstream commit (see http://cgit.freedesktop.org/mesa/drm/commit/?id=873e1c4d ) Modified: stable/9/sys/dev/drm/mach64_dma.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/drm/mach64_dma.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/drm/mach64_dma.c ============================================================================== --- stable/9/sys/dev/drm/mach64_dma.c Mon Dec 30 20:24:05 2013 (r260099) +++ stable/9/sys/dev/drm/mach64_dma.c Mon Dec 30 20:27:58 2013 (r260100) @@ -559,54 +559,6 @@ void mach64_dump_ring_info(drm_mach64_pr /*@{*/ /** - * Add the end mark to the ring's new tail position. - * - * The bus master engine will keep processing the DMA buffers listed in the ring - * until it finds this mark, making it stop. - * - * \sa mach64_clear_dma_eol - */ -static __inline__ void mach64_set_dma_eol(volatile u32 *addr) -{ -#if defined(__i386__) - int nr = 31; - - /* Taken from include/asm-i386/bitops.h linux header */ - __asm__ __volatile__("lock;" "btsl %1,%0":"=m"(*addr) - :"Ir"(nr)); -#elif defined(__powerpc__) - u32 old; - u32 mask = cpu_to_le32(MACH64_DMA_EOL); - - /* Taken from the include/asm-ppc/bitops.h linux header */ - __asm__ __volatile__("\n\ -1: lwarx %0,0,%3 \n\ - or %0,%0,%2 \n\ - stwcx. %0,0,%3 \n\ - bne- 1b":"=&r"(old), "=m"(*addr) - :"r"(mask), "r"(addr), "m"(*addr) - :"cc"); -#elif defined(__alpha__) - u32 temp; - u32 mask = MACH64_DMA_EOL; - - /* Taken from the include/asm-alpha/bitops.h linux header */ - __asm__ __volatile__("1: ldl_l %0,%3\n" - " bis %0,%2,%0\n" - " stl_c %0,%1\n" - " beq %0,2f\n" - ".subsection 2\n" - "2: br 1b\n" - ".previous":"=&r"(temp), "=m"(*addr) - :"Ir"(mask), "m"(*addr)); -#else - u32 mask = cpu_to_le32(MACH64_DMA_EOL); - - *addr |= mask; -#endif -} - -/** * Remove the end mark from the ring's old tail position. * * It should be called after calling mach64_set_dma_eol to mark the ring's new From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:27:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 569A48CA; Mon, 30 Dec 2013 20:27:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 28B811CB8; Mon, 30 Dec 2013 20:27:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUKRx50003848; Mon, 30 Dec 2013 20:27:59 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUKRxGi003847; Mon, 30 Dec 2013 20:27:59 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312302027.rBUKRxGi003847@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 20:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260100 - in stable: 10/sys/dev/drm 9/sys/dev/drm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:27:59 -0000 Author: dim Date: Mon Dec 30 20:27:58 2013 New Revision: 260100 URL: http://svnweb.freebsd.org/changeset/base/260100 Log: MFC r259902: In sys/dev/drm/mach64_dma.c, remove static function mach64_set_dma_eol(), which has never been used, even by upstream, since its initial upstream commit (see http://cgit.freedesktop.org/mesa/drm/commit/?id=873e1c4d ) Modified: stable/10/sys/dev/drm/mach64_dma.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/drm/mach64_dma.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/drm/mach64_dma.c ============================================================================== --- stable/10/sys/dev/drm/mach64_dma.c Mon Dec 30 20:24:05 2013 (r260099) +++ stable/10/sys/dev/drm/mach64_dma.c Mon Dec 30 20:27:58 2013 (r260100) @@ -559,54 +559,6 @@ void mach64_dump_ring_info(drm_mach64_pr /*@{*/ /** - * Add the end mark to the ring's new tail position. - * - * The bus master engine will keep processing the DMA buffers listed in the ring - * until it finds this mark, making it stop. - * - * \sa mach64_clear_dma_eol - */ -static __inline__ void mach64_set_dma_eol(volatile u32 *addr) -{ -#if defined(__i386__) - int nr = 31; - - /* Taken from include/asm-i386/bitops.h linux header */ - __asm__ __volatile__("lock;" "btsl %1,%0":"=m"(*addr) - :"Ir"(nr)); -#elif defined(__powerpc__) - u32 old; - u32 mask = cpu_to_le32(MACH64_DMA_EOL); - - /* Taken from the include/asm-ppc/bitops.h linux header */ - __asm__ __volatile__("\n\ -1: lwarx %0,0,%3 \n\ - or %0,%0,%2 \n\ - stwcx. %0,0,%3 \n\ - bne- 1b":"=&r"(old), "=m"(*addr) - :"r"(mask), "r"(addr), "m"(*addr) - :"cc"); -#elif defined(__alpha__) - u32 temp; - u32 mask = MACH64_DMA_EOL; - - /* Taken from the include/asm-alpha/bitops.h linux header */ - __asm__ __volatile__("1: ldl_l %0,%3\n" - " bis %0,%2,%0\n" - " stl_c %0,%1\n" - " beq %0,2f\n" - ".subsection 2\n" - "2: br 1b\n" - ".previous":"=&r"(temp), "=m"(*addr) - :"Ir"(mask), "m"(*addr)); -#else - u32 mask = cpu_to_le32(MACH64_DMA_EOL); - - *addr |= mask; -#endif -} - -/** * Remove the end mark from the ring's old tail position. * * It should be called after calling mach64_set_dma_eol to mark the ring's new From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:32:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C295DC50; Mon, 30 Dec 2013 20:32:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE5C31D39; Mon, 30 Dec 2013 20:32:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUKWRaK007060; Mon, 30 Dec 2013 20:32:27 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUKWRP5007059; Mon, 30 Dec 2013 20:32:27 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312302032.rBUKWRP5007059@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 20:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260101 - stable/10/sys/dev/bxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:32:27 -0000 Author: dim Date: Mon Dec 30 20:32:27 2013 New Revision: 260101 URL: http://svnweb.freebsd.org/changeset/base/260101 Log: MFC r259928: In sys/dev/bxe/bxe.c, remove static function bxe_has_tx_work_unload(), which has never been used. Reviewed by: edavis Modified: stable/10/sys/dev/bxe/bxe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Mon Dec 30 20:27:58 2013 (r260100) +++ stable/10/sys/dev/bxe/bxe.c Mon Dec 30 20:32:27 2013 (r260101) @@ -2745,13 +2745,6 @@ bxe_drv_pulse(struct bxe_softc *sc) sc->fw_drv_pulse_wr_seq); } -static inline int -bxe_has_tx_work_unload(struct bxe_fastpath *fp) -{ - mb(); /* consumer and producer can change */ - return (fp->tx_pkt_prod != fp->tx_pkt_cons); -} - static inline uint16_t bxe_tx_avail(struct bxe_softc *sc, struct bxe_fastpath *fp) From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:34:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 789B5DED; Mon, 30 Dec 2013 20:34:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 58C661D63; Mon, 30 Dec 2013 20:34:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUKYu8W007393; Mon, 30 Dec 2013 20:34:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUKYsGc007377; Mon, 30 Dec 2013 20:34:54 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312302034.rBUKYsGc007377@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 20:34:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260102 - in head/sys: conf modules/drm2/radeonkms modules/ibcore modules/ipoib modules/mlx4 modules/mlx4ib modules/mlxen modules/mthca ofed/drivers/infiniband/hw/mlx4 ofed/drivers/net/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:34:56 -0000 Author: dim Date: Mon Dec 30 20:34:53 2013 New Revision: 260102 URL: http://svnweb.freebsd.org/changeset/base/260102 Log: Similar to r260020, only use -fms-extensions with gcc, for all other modules which require this flag to compile. Use a GCC_MS_EXTENSIONS variable, defined in kern.pre.mk, which can be used to easily supply the flag (or not), depending on the compiler type. MFC after: 3 days Modified: head/sys/conf/kern.pre.mk head/sys/modules/drm2/radeonkms/Makefile head/sys/modules/ibcore/Makefile head/sys/modules/ipoib/Makefile head/sys/modules/mlx4/Makefile head/sys/modules/mlx4ib/Makefile head/sys/modules/mlxen/Makefile head/sys/modules/mthca/Makefile head/sys/ofed/drivers/infiniband/hw/mlx4/Makefile head/sys/ofed/drivers/net/mlx4/Makefile Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Mon Dec 30 20:32:27 2013 (r260101) +++ head/sys/conf/kern.pre.mk Mon Dec 30 20:34:53 2013 (r260102) @@ -100,6 +100,8 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCO .if ${COMPILER_TYPE} == "clang" CLANG_NO_IAS= -no-integrated-as +.else +GCC_MS_EXTENSIONS= -fms-extensions .endif .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 @@ -158,7 +160,7 @@ NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLA # Infiniband C flags. Correct include paths and omit errors that linux # does not honor. OFEDINCLUDES= -I$S/ofed/include/ -OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} OFEDCFLAGS= ${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR} OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF} OFED_C= ${OFED_C_NOIMP} ${.IMPSRC} Modified: head/sys/modules/drm2/radeonkms/Makefile ============================================================================== --- head/sys/modules/drm2/radeonkms/Makefile Mon Dec 30 20:32:27 2013 (r260101) +++ head/sys/modules/drm2/radeonkms/Makefile Mon Dec 30 20:34:53 2013 (r260102) @@ -105,9 +105,6 @@ SRCS += \ iicbus_if.h \ pci_if.h -CFLAGS += -I${.CURDIR}/../../../dev/drm2/radeon -.if ${COMPILER_TYPE} == "gcc" -CFLAGS += -fms-extensions -.endif +CFLAGS += -I${.CURDIR}/../../../dev/drm2/radeon ${GCC_MS_EXTENSIONS} .include Modified: head/sys/modules/ibcore/Makefile ============================================================================== --- head/sys/modules/ibcore/Makefile Mon Dec 30 20:32:27 2013 (r260101) +++ head/sys/modules/ibcore/Makefile Mon Dec 30 20:34:53 2013 (r260102) @@ -20,4 +20,4 @@ CFLAGS+= -DINET6 -DINET -DOFED .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Modified: head/sys/modules/ipoib/Makefile ============================================================================== --- head/sys/modules/ipoib/Makefile Mon Dec 30 20:32:27 2013 (r260101) +++ head/sys/modules/ipoib/Makefile Mon Dec 30 20:34:53 2013 (r260102) @@ -28,4 +28,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Modified: head/sys/modules/mlx4/Makefile ============================================================================== --- head/sys/modules/mlx4/Makefile Mon Dec 30 20:32:27 2013 (r260101) +++ head/sys/modules/mlx4/Makefile Mon Dec 30 20:34:53 2013 (r260102) @@ -26,4 +26,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Modified: head/sys/modules/mlx4ib/Makefile ============================================================================== --- head/sys/modules/mlx4ib/Makefile Mon Dec 30 20:32:27 2013 (r260101) +++ head/sys/modules/mlx4ib/Makefile Mon Dec 30 20:34:53 2013 (r260102) @@ -31,4 +31,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Modified: head/sys/modules/mlxen/Makefile ============================================================================== --- head/sys/modules/mlxen/Makefile Mon Dec 30 20:32:27 2013 (r260101) +++ head/sys/modules/mlxen/Makefile Mon Dec 30 20:34:53 2013 (r260102) @@ -25,4 +25,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Modified: head/sys/modules/mthca/Makefile ============================================================================== --- head/sys/modules/mthca/Makefile Mon Dec 30 20:32:27 2013 (r260101) +++ head/sys/modules/mthca/Makefile Mon Dec 30 20:34:53 2013 (r260102) @@ -28,4 +28,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/Makefile ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mlx4/Makefile Mon Dec 30 20:32:27 2013 (r260101) +++ head/sys/ofed/drivers/infiniband/hw/mlx4/Makefile Mon Dec 30 20:34:53 2013 (r260102) @@ -28,4 +28,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Modified: head/sys/ofed/drivers/net/mlx4/Makefile ============================================================================== --- head/sys/ofed/drivers/net/mlx4/Makefile Mon Dec 30 20:32:27 2013 (r260101) +++ head/sys/ofed/drivers/net/mlx4/Makefile Mon Dec 30 20:34:53 2013 (r260102) @@ -30,5 +30,5 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:37:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8895F64; Mon, 30 Dec 2013 20:37: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4B631D7D; Mon, 30 Dec 2013 20:37:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUKblVv007740; Mon, 30 Dec 2013 20:37:47 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUKblCD007739; Mon, 30 Dec 2013 20:37:47 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312302037.rBUKblCD007739@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 20:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260103 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:37:47 -0000 Author: dim Date: Mon Dec 30 20:37:47 2013 New Revision: 260103 URL: http://svnweb.freebsd.org/changeset/base/260103 Log: In sys/amd64/amd64/pmap.c, remove static function pmap_is_current(), which has been unused since r189415. Reviewed by: alc MFC after: 3 days Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Dec 30 20:34:53 2013 (r260102) +++ head/sys/amd64/amd64/pmap.c Mon Dec 30 20:37:47 2013 (r260103) @@ -1766,16 +1766,6 @@ pmap_invalidate_cache_pages(vm_page_t *p } /* - * Are we current address space or kernel? - */ -static __inline int -pmap_is_current(pmap_t pmap) -{ - return (pmap == kernel_pmap || - (pmap->pm_pml4[PML4PML4I] & PG_FRAME) == (PML4pml4e[0] & PG_FRAME)); -} - -/* * Routine: pmap_extract * Function: * Extract the physical page address associated From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:42:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26F9139C; Mon, 30 Dec 2013 20:42:20 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C1A21E17; Mon, 30 Dec 2013 20:42:18 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rBUKgAIF040076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 31 Dec 2013 00:42:10 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rBUKgA0I040075; Tue, 31 Dec 2013 00:42:10 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 31 Dec 2013 00:42:10 +0400 From: Gleb Smirnoff To: Mark Johnston , Mike Ma Subject: Re: svn commit: r260091 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace contrib/opensolaris/uts/common/sys dev/dtrace Message-ID: <20131230204210.GD71033@FreeBSD.org> References: <201312301737.rBUHbW3I035088@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201312301737.rBUHbW3I035088@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:42:20 -0000 On Mon, Dec 30, 2013 at 05:37:32PM +0000, Mark Johnston wrote: M> Author: markj M> Date: Mon Dec 30 17:37:32 2013 M> New Revision: 260091 M> URL: http://svnweb.freebsd.org/changeset/base/260091 M> M> Log: M> Now that vmem(9) is available, use vmem arenas to allocate probe and M> aggregation IDs, as is done in the upstream illumos code. This still M> requires some FreeBSD-specific code, as our vmem API is not identical to the M> one in illumos. M> M> Submitted by: Mike Ma IMHO, alloc_unr() was lighter and thus better for allocating just IDs. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 20:58:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A73A85D; Mon, 30 Dec 2013 20:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 264621EF2; Mon, 30 Dec 2013 20:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUKw7fO018136; Mon, 30 Dec 2013 20:58:07 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUKw63B018134; Mon, 30 Dec 2013 20:58:06 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312302058.rBUKw63B018134@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 20:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260104 - in head/sys: conf modules/ibcore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 20:58:07 -0000 Author: dim Date: Mon Dec 30 20:58:06 2013 New Revision: 260104 URL: http://svnweb.freebsd.org/changeset/base/260104 Log: For sys/ofed/drivers/infiniband/core/cm.c, disable warning about unused functions for now. MFC after: 3 days Modified: head/sys/conf/files head/sys/modules/ibcore/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Dec 30 20:37:47 2013 (r260103) +++ head/sys/conf/files Mon Dec 30 20:58:06 2013 (r260104) @@ -3461,7 +3461,7 @@ ofed/drivers/infiniband/core/mad.c opti compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" ofed/drivers/infiniband/core/cm.c optional ofed \ no-depend \ - compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/ -Wno-unused-function" ofed/drivers/infiniband/core/cma.c optional ofed \ no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" Modified: head/sys/modules/ibcore/Makefile ============================================================================== --- head/sys/modules/ibcore/Makefile Mon Dec 30 20:37:47 2013 (r260103) +++ head/sys/modules/ibcore/Makefile Mon Dec 30 20:58:06 2013 (r260104) @@ -21,3 +21,6 @@ CFLAGS+= -DINET6 -DINET -DOFED .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} + +CWARNFLAGS.cm.c= -Wno-unused-function +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 21:04:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FA49A7F; Mon, 30 Dec 2013 21:04:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1B4B01FAB; Mon, 30 Dec 2013 21:04:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUL4OU0021772; Mon, 30 Dec 2013 21:04:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUL4OEp021771; Mon, 30 Dec 2013 21:04:24 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312302104.rBUL4OEp021771@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 30 Dec 2013 21:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260105 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 21:04:25 -0000 Author: trasz Date: Mon Dec 30 21:04:24 2013 New Revision: 260105 URL: http://svnweb.freebsd.org/changeset/base/260105 Log: Fix typo. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/iscsictl/iscsictl.8 Modified: head/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- head/usr.bin/iscsictl/iscsictl.8 Mon Dec 30 20:58:06 2013 (r260104) +++ head/usr.bin/iscsictl/iscsictl.8 Mon Dec 30 21:04:24 2013 (r260105) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 30, 2013 +.Dd December 30, 2013 .Dt ISCSICTL 8 .Os .Sh NAME @@ -132,8 +132,8 @@ The .Nm utility exits 0 on success, and >0 if an error occurs. .Sh EXAMPLES -Attach to target qn.2012-06.com.example:target0, served by 192.168.1.1: -.Dl Nm Fl A Fl t Ar qn.2012-06.com.example:target0 Fl p Ar 192.168.1.1 +Attach to target iqn.2012-06.com.example:target0, served by 192.168.1.1: +.Dl Nm Fl A Fl t Ar iqn.2012-06.com.example:target0 Fl p Ar 192.168.1.1 .Pp Disconnect all iSCSI sessions: .Dl Nm Fl Ra From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 21:06:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D60BBD5; Mon, 30 Dec 2013 21:06:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 18A2D1FBC; Mon, 30 Dec 2013 21:06:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUL68si022078; Mon, 30 Dec 2013 21:06:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUL68ec022077; Mon, 30 Dec 2013 21:06:08 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312302106.rBUL68ec022077@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 30 Dec 2013 21:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260106 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 21:06:09 -0000 Author: trasz Date: Mon Dec 30 21:06:08 2013 New Revision: 260106 URL: http://svnweb.freebsd.org/changeset/base/260106 Log: The devd part never got implemented; remove for now, until someone actually needs this feature and can talk to me about how it should look like. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/iscsictl/iscsictl.8 Modified: head/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- head/usr.bin/iscsictl/iscsictl.8 Mon Dec 30 21:04:24 2013 (r260105) +++ head/usr.bin/iscsictl/iscsictl.8 Mon Dec 30 21:06:08 2013 (r260106) @@ -99,9 +99,6 @@ exit status does not mean that the sessi Use .Nm Fl L to check the connection status. -The initiator notifies -.Xr devd 8 -when session gets connected or disconnected. .Pp Note that in order to the iSCSI initiator to be able to connect to a target, the From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 21:17:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D70AA83; Mon, 30 Dec 2013 21:17:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6CFB81163; Mon, 30 Dec 2013 21:17:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBULHLaw026528; Mon, 30 Dec 2013 21:17:21 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBULHKFO026523; Mon, 30 Dec 2013 21:17:20 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201312302117.rBULHKFO026523@svn.freebsd.org> From: Rick Macklem Date: Mon, 30 Dec 2013 21:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260107 - in stable/10/sys: fs/nfsclient nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 21:17:21 -0000 Author: rmacklem Date: Mon Dec 30 21:17:20 2013 New Revision: 260107 URL: http://svnweb.freebsd.org/changeset/base/260107 Log: MFC: r259084 For software builds, the NFS client does many small synchronous (with FILE_SYNC) writes because non-contiguous byte ranges in the same buffer cache block are being written. This patch adds a new mount option "noncontigwr" which allows the non-contiguous byte ranges to be combined, with the dirty byte range becoming the superset of the bytes that are dirty, if the file has not been file locked. This reduces the number of writes significantly for software builds. The only case where this change might break existing applications is where an application is writing non-overlapping byte ranges within the same buffer cache block of a file from multiple clients concurrently. Since such an application would normally do file locking on the file, avoiding the byte range merge for files that have been file locked should be sufficient for most (maybe all?) cases. Modified: stable/10/sys/fs/nfsclient/nfs_clbio.c stable/10/sys/fs/nfsclient/nfs_clvfsops.c stable/10/sys/fs/nfsclient/nfs_clvnops.c stable/10/sys/fs/nfsclient/nfsnode.h stable/10/sys/nfsclient/nfsargs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clbio.c Mon Dec 30 21:06:08 2013 (r260106) +++ stable/10/sys/fs/nfsclient/nfs_clbio.c Mon Dec 30 21:17:20 2013 (r260107) @@ -874,7 +874,7 @@ ncl_write(struct vop_write_args *ap) struct vattr vattr; struct nfsmount *nmp = VFSTONFS(vp->v_mount); daddr_t lbn; - int bcount; + int bcount, noncontig_write, obcount; int bp_cached, n, on, error = 0, error1; size_t orig_resid, local_resid; off_t orig_size, tmp_off; @@ -1037,7 +1037,15 @@ again: * unaligned buffer size. */ mtx_lock(&np->n_mtx); - if (uio->uio_offset == np->n_size && n) { + if ((np->n_flag & NHASBEENLOCKED) == 0 && + (nmp->nm_flag & NFSMNT_NONCONTIGWR) != 0) + noncontig_write = 1; + else + noncontig_write = 0; + if ((uio->uio_offset == np->n_size || + (noncontig_write != 0 && + lbn == (np->n_size / biosize) && + uio->uio_offset + n > np->n_size)) && n) { mtx_unlock(&np->n_mtx); /* * Get the buffer (in its pre-append state to maintain @@ -1045,8 +1053,8 @@ again: * nfsnode after we have locked the buffer to prevent * readers from reading garbage. */ - bcount = on; - bp = nfs_getcacheblk(vp, lbn, bcount, td); + obcount = np->n_size - (lbn * biosize); + bp = nfs_getcacheblk(vp, lbn, obcount, td); if (bp != NULL) { long save; @@ -1058,9 +1066,12 @@ again: mtx_unlock(&np->n_mtx); save = bp->b_flags & B_CACHE; - bcount += n; + bcount = on + n; allocbuf(bp, bcount); bp->b_flags |= save; + if (noncontig_write != 0 && on > obcount) + vfs_bio_bzero_buf(bp, obcount, on - + obcount); } } else { /* @@ -1159,19 +1170,23 @@ again: * area, just update the b_dirtyoff and b_dirtyend, * otherwise force a write rpc of the old dirty area. * + * If there has been a file lock applied to this file + * or vfs.nfs.old_noncontig_writing is set, do the following: * While it is possible to merge discontiguous writes due to * our having a B_CACHE buffer ( and thus valid read data * for the hole), we don't because it could lead to * significant cache coherency problems with multiple clients, * especially if locking is implemented later on. * - * As an optimization we could theoretically maintain - * a linked list of discontinuous areas, but we would still - * have to commit them separately so there isn't much - * advantage to it except perhaps a bit of asynchronization. + * If vfs.nfs.old_noncontig_writing is not set and there has + * not been file locking done on this file: + * Relax coherency a bit for the sake of performance and + * expand the current dirty region to contain the new + * write even if it means we mark some non-dirty data as + * dirty. */ - if (bp->b_dirtyend > 0 && + if (noncontig_write == 0 && bp->b_dirtyend > 0 && (on > bp->b_dirtyend || (on + n) < bp->b_dirtyoff)) { if (bwrite(bp) == EINTR) { error = EINTR; Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvfsops.c Mon Dec 30 21:06:08 2013 (r260106) +++ stable/10/sys/fs/nfsclient/nfs_clvfsops.c Mon Dec 30 21:17:20 2013 (r260107) @@ -719,7 +719,8 @@ static const char *nfs_opts[] = { "from" "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "resvport", "readahead", "hostname", "timeout", "addr", "fh", "nfsv3", "sec", "principal", "nfsv4", "gssname", "allgssname", "dirpath", "minorversion", - "nametimeo", "negnametimeo", "nocto", "pnfs", "wcommitsize", + "nametimeo", "negnametimeo", "nocto", "noncontigwr", "pnfs", + "wcommitsize", NULL }; /* @@ -840,6 +841,8 @@ nfs_mount(struct mount *mp) args.flags |= NFSMNT_ALLGSSNAME; if (vfs_getopt(mp->mnt_optnew, "nocto", NULL, NULL) == 0) args.flags |= NFSMNT_NOCTO; + if (vfs_getopt(mp->mnt_optnew, "noncontigwr", NULL, NULL) == 0) + args.flags |= NFSMNT_NONCONTIGWR; if (vfs_getopt(mp->mnt_optnew, "pnfs", NULL, NULL) == 0) args.flags |= NFSMNT_PNFS; if (vfs_getopt(mp->mnt_optnew, "readdirsize", (void **)&opt, NULL) == 0) { @@ -1792,6 +1795,8 @@ void nfscl_retopts(struct nfsmount *nmp, &blen); nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NOCTO) != 0, ",nocto", &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NONCONTIGWR) != 0, + ",noncontigwr", &buf, &blen); nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_NOLOCKD | NFSMNT_NFSV4)) == 0, ",lockd", &buf, &blen); nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_NOLOCKD | NFSMNT_NFSV4)) == Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvnops.c Mon Dec 30 21:06:08 2013 (r260106) +++ stable/10/sys/fs/nfsclient/nfs_clvnops.c Mon Dec 30 21:17:20 2013 (r260107) @@ -3079,6 +3079,10 @@ nfs_advlock(struct vop_advlock_args *ap) np->n_change = va.va_filerev; } } + /* Mark that a file lock has been acquired. */ + mtx_lock(&np->n_mtx); + np->n_flag |= NHASBEENLOCKED; + mtx_unlock(&np->n_mtx); } NFSVOPUNLOCK(vp, 0); return (0); @@ -3098,6 +3102,12 @@ nfs_advlock(struct vop_advlock_args *ap) error = ENOLCK; } } + if (error == 0 && ap->a_op == F_SETLK) { + /* Mark that a file lock has been acquired. */ + mtx_lock(&np->n_mtx); + np->n_flag |= NHASBEENLOCKED; + mtx_unlock(&np->n_mtx); + } } return (error); } Modified: stable/10/sys/fs/nfsclient/nfsnode.h ============================================================================== --- stable/10/sys/fs/nfsclient/nfsnode.h Mon Dec 30 21:06:08 2013 (r260106) +++ stable/10/sys/fs/nfsclient/nfsnode.h Mon Dec 30 21:17:20 2013 (r260107) @@ -157,6 +157,7 @@ struct nfsnode { #define NLOCKWANT 0x00010000 /* Want the sleep lock */ #define NNOLAYOUT 0x00020000 /* Can't get a layout for this file */ #define NWRITEOPENED 0x00040000 /* Has been opened for writing */ +#define NHASBEENLOCKED 0x00080000 /* Has been file locked. */ /* * Convert between nfsnode pointers and vnode pointers Modified: stable/10/sys/nfsclient/nfsargs.h ============================================================================== --- stable/10/sys/nfsclient/nfsargs.h Mon Dec 30 21:06:08 2013 (r260106) +++ stable/10/sys/nfsclient/nfsargs.h Mon Dec 30 21:17:20 2013 (r260107) @@ -99,5 +99,6 @@ struct nfs_args { #define NFSMNT_STRICT3530 0x10000000 /* Adhere strictly to RFC3530 */ #define NFSMNT_NOCTO 0x20000000 /* Don't flush attrcache on open */ #define NFSMNT_PNFS 0x40000000 /* Enable pNFS support */ +#define NFSMNT_NONCONTIGWR 0x80000000 /* Enable non-contiguous writes */ #endif From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 21:20:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDBE0D04; Mon, 30 Dec 2013 21:20:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C8FD211DB; Mon, 30 Dec 2013 21:20:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBULKpGA029103; Mon, 30 Dec 2013 21:20:51 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBULKp9c029102; Mon, 30 Dec 2013 21:20:51 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201312302120.rBULKp9c029102@svn.freebsd.org> From: Rick Macklem Date: Mon, 30 Dec 2013 21:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260108 - stable/10/sbin/mount_nfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 21:20:51 -0000 Author: rmacklem Date: Mon Dec 30 21:20:51 2013 New Revision: 260108 URL: http://svnweb.freebsd.org/changeset/base/260108 Log: MFC: r259089 Document the noncontigwr NFS mount option. This is a content change. Modified: stable/10/sbin/mount_nfs/mount_nfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- stable/10/sbin/mount_nfs/mount_nfs.8 Mon Dec 30 21:17:20 2013 (r260107) +++ stable/10/sbin/mount_nfs/mount_nfs.8 Mon Dec 30 21:20:51 2013 (r260108) @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd July 8, 2013 +.Dd December 7, 2013 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -257,6 +257,19 @@ servers on the client. Note that this option will only be honored when performing the initial mount, it will be silently ignored if used while updating the mount options. +.It Cm noncontigwr +This mount option allows the NFS client to +combine non-contiguous byte ranges being written +such that the dirty byte range becomes a superset of the bytes +that are dirty. +This reduces the number of writes significantly for software +builds. +The merging of byte ranges isn't done if the file has been file +locked, since most applications modifying a file from multiple +clients will use file locking. +As such, this option could result in a corrupted file for the +rare case of an application modifying the file from multiple +clients concurrently without using file locking. .It Cm principal For the RPCSEC_GSS security flavors, such as krb5, krb5i and krb5p, this option sets the name of the host based principal name expected From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 21:24:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CC58E72; Mon, 30 Dec 2013 21:24:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C6541200; Mon, 30 Dec 2013 21:24:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBULOgu6029943; Mon, 30 Dec 2013 21:24:42 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBULOgDM029942; Mon, 30 Dec 2013 21:24:42 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201312302124.rBULOgDM029942@svn.freebsd.org> From: Rick Macklem Date: Mon, 30 Dec 2013 21:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260109 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 21:24:42 -0000 Author: rmacklem Date: Mon Dec 30 21:24:41 2013 New Revision: 260109 URL: http://svnweb.freebsd.org/changeset/base/260109 Log: MFC: r259771 The NFSv4.1 client didn't return NFSv4.1 specific error codes for the Getattr and Recall callbacks. This patch fixes it. Since the NFSv4.1 specific error codes would only happen for abnormal circumstances, this patch has little effect, in practice. Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clstate.c Mon Dec 30 21:20:51 2013 (r260108) +++ stable/10/sys/fs/nfsclient/nfs_clstate.c Mon Dec 30 21:24:41 2013 (r260109) @@ -146,7 +146,7 @@ static int nfscl_trylock(struct nfsmount static int nfsrpc_reopen(struct nfsmount *, u_int8_t *, int, u_int32_t, struct nfsclopen *, struct nfscldeleg **, struct ucred *, NFSPROC_T *); static void nfscl_freedeleg(struct nfscldeleghead *, struct nfscldeleg *); -static int nfscl_errmap(struct nfsrv_descript *); +static int nfscl_errmap(struct nfsrv_descript *, u_int32_t); static void nfscl_cleanup_common(struct nfsclclient *, u_int8_t *); static int nfscl_recalldeleg(struct nfsclclient *, struct nfsmount *, struct nfscldeleg *, vnode_t, struct ucred *, NFSPROC_T *, int); @@ -3146,7 +3146,7 @@ nfscl_docb(struct nfsrv_descript *nd, NF struct nfsclclient *clp; struct nfscldeleg *dp = NULL; int numops, taglen = -1, error = 0, trunc; - u_int32_t minorvers, retops = 0, *retopsp = NULL, *repp, cbident; + u_int32_t minorvers = 0, retops = 0, *retopsp = NULL, *repp, cbident; u_char tag[NFSV4_SMALLSTR + 1], *tagstr; vnode_t vp = NULL; struct nfsnode *np; @@ -3210,7 +3210,7 @@ nfscl_docb(struct nfsrv_descript *nd, NF (op > NFSV4OP_CBNOTIFYDEVID && minorvers == NFSV41_MINORVERSION)) { nd->nd_repstat = NFSERR_OPILLEGAL; - *repp = nfscl_errmap(nd); + *repp = nfscl_errmap(nd, minorvers); retops++; break; } @@ -3518,7 +3518,7 @@ nfscl_docb(struct nfsrv_descript *nd, NF } retops++; if (nd->nd_repstat) { - *repp = nfscl_errmap(nd); + *repp = nfscl_errmap(nd, minorvers); break; } else *repp = 0; /* NFS4_OK */ @@ -3539,7 +3539,7 @@ nfsmout: } else { *retopsp = txdr_unsigned(retops); } - *nd->nd_errp = nfscl_errmap(nd); + *nd->nd_errp = nfscl_errmap(nd, minorvers); out: if (gotseq_ok != 0) { rep = m_copym(nd->nd_mreq, 0, M_COPYALL, M_WAITOK); @@ -4645,7 +4645,7 @@ nfscl_deleggetmodtime(vnode_t vp, struct } static int -nfscl_errmap(struct nfsrv_descript *nd) +nfscl_errmap(struct nfsrv_descript *nd, u_int32_t minorvers) { short *defaulterrp, *errp; @@ -4658,6 +4658,11 @@ nfscl_errmap(struct nfsrv_descript *nd) if (nd->nd_repstat == NFSERR_MINORVERMISMATCH || nd->nd_repstat == NFSERR_OPILLEGAL) return (txdr_unsigned(nd->nd_repstat)); + if (nd->nd_repstat >= NFSERR_BADIOMODE && nd->nd_repstat < 20000 && + minorvers > NFSV4_MINORVERSION) { + /* NFSv4.n error. */ + return (txdr_unsigned(nd->nd_repstat)); + } if (nd->nd_procnum < NFSV4OP_CBNOPS) errp = defaulterrp = nfscl_cberrmap[nd->nd_procnum]; else From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 21:30:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 717CB9E; Mon, 30 Dec 2013 21:30:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5CB2D1288; Mon, 30 Dec 2013 21:30:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBULUoTm031209; Mon, 30 Dec 2013 21:30:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBULUoNv031208; Mon, 30 Dec 2013 21:30:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312302130.rBULUoNv031208@svn.freebsd.org> From: Xin LI Date: Mon, 30 Dec 2013 21:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260110 - head/sys/dev/oce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 21:30:50 -0000 Author: delphij Date: Mon Dec 30 21:30:49 2013 New Revision: 260110 URL: http://svnweb.freebsd.org/changeset/base/260110 Log: Eliminate unused drbr_stats_update implementation in oce(4) driver. Noticed by: dim MFC after: 2 weeks Modified: head/sys/dev/oce/oce_if.c Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Mon Dec 30 21:24:41 2013 (r260109) +++ head/sys/dev/oce/oce_if.c Mon Dec 30 21:30:49 2013 (r260110) @@ -1233,18 +1233,6 @@ oce_wq_handler(void *arg) } -#if __FreeBSD_version >= 1000000 -static __inline void -drbr_stats_update(struct ifnet *ifp, int len, int mflags) -{ -#ifndef NO_SLOW_STATS - ifp->if_obytes += len; - if (mflags & M_MCAST) - ifp->if_omcasts++; -#endif -} -#endif - static int oce_multiq_transmit(struct ifnet *ifp, struct mbuf *m, struct oce_wq *wq) { From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 22:14:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E184FEE2; Mon, 30 Dec 2013 22:14:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CD65715D5; Mon, 30 Dec 2013 22:14:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUMEVXF049504; Mon, 30 Dec 2013 22:14:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUMEV0E049502; Mon, 30 Dec 2013 22:14:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312302214.rBUMEV0E049502@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 22:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260111 - in head/sys: conf modules/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 22:14:32 -0000 Author: dim Date: Mon Dec 30 22:14:31 2013 New Revision: 260111 URL: http://svnweb.freebsd.org/changeset/base/260111 Log: For sys/ofed/drivers/infiniband/hw/mlx4/mcg.c, disable warning about unused variables for now. MFC after: 3 days Modified: head/sys/conf/files head/sys/modules/mlx4/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Dec 30 21:30:49 2013 (r260110) +++ head/sys/conf/files Mon Dec 30 22:14:31 2013 (r260111) @@ -3569,7 +3569,7 @@ ofed/drivers/infiniband/hw/mlx4/alias_GU compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" ofed/drivers/infiniband/hw/mlx4/mcg.c optional mlx4ib \ no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/ -Wno-unused" ofed/drivers/infiniband/hw/mlx4/sysfs.c optional mlx4ib \ no-depend obj-prefix "mlx4ib_" \ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" Modified: head/sys/modules/mlx4/Makefile ============================================================================== --- head/sys/modules/mlx4/Makefile Mon Dec 30 21:30:49 2013 (r260110) +++ head/sys/modules/mlx4/Makefile Mon Dec 30 22:14:31 2013 (r260111) @@ -27,3 +27,6 @@ opt_inet6.h: .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} + +CWARNFLAGS.mcg.c= -Wno-unused +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 22:17:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D4721BD; Mon, 30 Dec 2013 22:17:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 68EB915F7; Mon, 30 Dec 2013 22:17:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUMHYkP049969; Mon, 30 Dec 2013 22:17:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUMHYTG049968; Mon, 30 Dec 2013 22:17:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312302217.rBUMHYTG049968@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Dec 2013 22:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260112 - head/sys/dev/sound/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 22:17:34 -0000 Author: dim Date: Mon Dec 30 22:17:33 2013 New Revision: 260112 URL: http://svnweb.freebsd.org/changeset/base/260112 Log: In sys/dev/sound/pci/maestro.c, #if 0 two unused static functions. MFC after: 3 days Modified: head/sys/dev/sound/pci/maestro.c Modified: head/sys/dev/sound/pci/maestro.c ============================================================================== --- head/sys/dev/sound/pci/maestro.c Mon Dec 30 22:14:31 2013 (r260111) +++ head/sys/dev/sound/pci/maestro.c Mon Dec 30 22:17:33 2013 (r260112) @@ -207,9 +207,11 @@ SYSCTL_UINT(_debug_maestro, OID_AUTO, po static void agg_sleep(struct agg_info*, const char *wmesg, int msec); +#if 0 static __inline u_int32_t agg_rd(struct agg_info*, int, int size); static __inline void agg_wr(struct agg_info*, int, u_int32_t data, int size); +#endif static int agg_rdcodec(struct agg_info*, int); static int agg_wrcodec(struct agg_info*, int, u_int32_t); @@ -286,6 +288,7 @@ agg_sleep(struct agg_info *sc, const cha /* I/O port */ +#if 0 static __inline u_int32_t agg_rd(struct agg_info *sc, int regno, int size) { @@ -300,12 +303,14 @@ agg_rd(struct agg_info *sc, int regno, i return ~(u_int32_t)0; } } +#endif #define AGG_RD(sc, regno, size) \ bus_space_read_##size( \ ((struct agg_info*)(sc))->st, \ ((struct agg_info*)(sc))->sh, (regno)) +#if 0 static __inline void agg_wr(struct agg_info *sc, int regno, u_int32_t data, int size) { @@ -321,6 +326,7 @@ agg_wr(struct agg_info *sc, int regno, u break; } } +#endif #define AGG_WR(sc, regno, data, size) \ bus_space_write_##size( \ From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 22:23:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E04D5536; Mon, 30 Dec 2013 22:23:27 +0000 (UTC) Received: from mail-qe0-x22b.google.com (mail-qe0-x22b.google.com [IPv6:2607:f8b0:400d:c02::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 620BB1686; Mon, 30 Dec 2013 22:23:27 +0000 (UTC) Received: by mail-qe0-f43.google.com with SMTP id jy17so11875440qeb.2 for ; Mon, 30 Dec 2013 14:23:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=wey4LSoIQVtuQ42sY9CGTEiC5e1qbh6wRkZD2GeVZc0=; b=c7D75zimYh/GFqyWHuYuEV/usgfkG4AwZg0ihig5EX9PBqDMGqxFE2oQIfBdl8lTDq moct/b2d+wQ6HbZYzLnG6b2jmd3JfaRUmHudtm814uNo3IV0rK4Wjip42RzbGzyT+/8a lyYglGfBQnFZkbI7OowNQ35q9If6ohknONOucb8JCHuhOphO3A2cDJQvEoDz7j4Jp2pQ PRzktyf3XsKWXWzDTaqPbGaRtVQ4mbuP0IlsY4yiJeNj8Wimu8nOWommlr668Q++F2R0 TL7FMjJwxrx8gGmT/8/98+YBEW5dKMbfEpbArpHMngoJlZjGbTq3vMcVco8KNg663rtg nleQ== MIME-Version: 1.0 X-Received: by 10.49.34.207 with SMTP id b15mr114568277qej.49.1388442206633; Mon, 30 Dec 2013 14:23:26 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.52.8 with HTTP; Mon, 30 Dec 2013 14:23:26 -0800 (PST) In-Reply-To: <201312302023.rBUKNF2L003229@svn.freebsd.org> References: <201312302023.rBUKNF2L003229@svn.freebsd.org> Date: Mon, 30 Dec 2013 14:23:26 -0800 X-Google-Sender-Auth: dzo5rExTO1OZV5smBGYAvXiwot8 Message-ID: Subject: Re: svn commit: r260097 - in head/sys: nfs rpc From: Adrian Chadd To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 22:23:28 -0000 Hm, this kind of per-bucket hash table may end up wanting to be used in a variety of places. I wonder if we should create a locked hash table type to reuse in various laces. Nice work though. I wonder about doing this elsewhere (eg inpcb hash, kqueue hash, etc.) -a On 30 December 2013 12:23, Alexander Motin wrote: > Author: mav > Date: Mon Dec 30 20:23:15 2013 > New Revision: 260097 > URL: http://svnweb.freebsd.org/changeset/base/260097 > > Log: > Move most of NFS file handle affinity code out of the heavily congested > global RPC thread pool lock and protect it with own set of locks. > > On synthetic benchmarks this improves peak NFS request rate by 40%. > > Modified: > head/sys/nfs/nfs_fha.c > head/sys/nfs/nfs_fha.h > head/sys/rpc/svc.c > head/sys/rpc/svc.h > > Modified: head/sys/nfs/nfs_fha.c > ============================================================================== > --- head/sys/nfs/nfs_fha.c Mon Dec 30 20:15:46 2013 (r260096) > +++ head/sys/nfs/nfs_fha.c Mon Dec 30 20:23:15 2013 (r260097) > @@ -52,13 +52,10 @@ void > fha_init(struct fha_params *softc) > { > char tmpstr[128]; > + int i; > > - /* > - * A small hash table to map filehandles to fha_hash_entry > - * structures. > - */ > - softc->g_fha.hashtable = hashinit(256, M_NFS_FHA, > - &softc->g_fha.hashmask); > + for (i = 0; i < FHA_HASH_SIZE; i++) > + mtx_init(&softc->fha_hash[i].mtx, "fhalock", NULL, MTX_DEF); > > /* > * Set the default tuning parameters. > @@ -117,8 +114,11 @@ fha_init(struct fha_params *softc) > void > fha_uninit(struct fha_params *softc) > { > + int i; > + > sysctl_ctx_free(&softc->sysctl_ctx); > - hashdestroy(softc->g_fha.hashtable, M_NFS_FHA, softc->g_fha.hashmask); > + for (i = 0; i < FHA_HASH_SIZE; i++) > + mtx_destroy(&softc->fha_hash[i].mtx); > } > > /* > @@ -207,8 +207,13 @@ static void > fha_hash_entry_destroy(struct fha_hash_entry *e) > { > > - if (e->num_rw + e->num_exclusive) > - panic("nonempty fhe"); > + mtx_assert(e->mtx, MA_OWNED); > + KASSERT(e->num_rw == 0, > + ("%d reqs on destroyed fhe %p", e->num_rw, e)); > + KASSERT(e->num_exclusive == 0, > + ("%d exclusive reqs on destroyed fhe %p", e->num_exclusive, e)); > + KASSERT(e->num_threads == 0, > + ("%d threads on destroyed fhe %p", e->num_threads, e)); > free(e, M_NFS_FHA); > } > > @@ -216,6 +221,7 @@ static void > fha_hash_entry_remove(struct fha_hash_entry *e) > { > > + mtx_assert(e->mtx, MA_OWNED); > LIST_REMOVE(e, link); > fha_hash_entry_destroy(e); > } > @@ -224,36 +230,22 @@ static struct fha_hash_entry * > fha_hash_entry_lookup(struct fha_params *softc, u_int64_t fh) > { > SVCPOOL *pool; > - > - pool = *softc->pool; > - > + struct fha_hash_slot *fhs; > struct fha_hash_entry *fhe, *new_fhe; > > - LIST_FOREACH(fhe, &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], > - link) > + pool = *softc->pool; > + fhs = &softc->fha_hash[fh % FHA_HASH_SIZE]; > + new_fhe = fha_hash_entry_new(fh); > + new_fhe->mtx = &fhs->mtx; > + mtx_lock(&fhs->mtx); > + LIST_FOREACH(fhe, &fhs->list, link) > if (fhe->fh == fh) > break; > - > if (!fhe) { > - /* Allocate a new entry. */ > - mtx_unlock(&pool->sp_lock); > - new_fhe = fha_hash_entry_new(fh); > - mtx_lock(&pool->sp_lock); > - > - /* Double-check to make sure we still need the new entry. */ > - LIST_FOREACH(fhe, > - &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], link) > - if (fhe->fh == fh) > - break; > - if (!fhe) { > - fhe = new_fhe; > - LIST_INSERT_HEAD( > - &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], > - fhe, link); > - } else > - fha_hash_entry_destroy(new_fhe); > - } > - > + fhe = new_fhe; > + LIST_INSERT_HEAD(&fhs->list, fhe, link); > + } else > + fha_hash_entry_destroy(new_fhe); > return (fhe); > } > > @@ -261,6 +253,8 @@ static void > fha_hash_entry_add_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) > { > > + mtx_assert(fhe->mtx, MA_OWNED); > + thread->st_p2 = 0; > LIST_INSERT_HEAD(&fhe->threads, thread, st_alink); > fhe->num_threads++; > } > @@ -269,6 +263,9 @@ static void > fha_hash_entry_remove_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) > { > > + mtx_assert(fhe->mtx, MA_OWNED); > + KASSERT(thread->st_p2 == 0, > + ("%d reqs on removed thread %p", thread->st_p2, thread)); > LIST_REMOVE(thread, st_alink); > fhe->num_threads--; > } > @@ -280,6 +277,7 @@ static void > fha_hash_entry_add_op(struct fha_hash_entry *fhe, int locktype, int count) > { > > + mtx_assert(fhe->mtx, MA_OWNED); > if (LK_EXCLUSIVE == locktype) > fhe->num_exclusive += count; > else > @@ -306,7 +304,7 @@ fha_hash_entry_choose_thread(struct fha_ > pool = *softc->pool; > > LIST_FOREACH(thread, &fhe->threads, st_alink) { > - req_count = thread->st_reqcount; > + req_count = thread->st_p2; > > /* If there are any writes in progress, use the first thread. */ > if (fhe->num_exclusive) { > @@ -322,7 +320,7 @@ fha_hash_entry_choose_thread(struct fha_ > * exceed our per-thread load limit in the process. > */ > offset1 = i->offset; > - offset2 = STAILQ_FIRST(&thread->st_reqs)->rq_p3; > + offset2 = thread->st_p3; > > if (((offset1 >= offset2) > && ((offset1 - offset2) < (1 << softc->ctls.bin_shift))) > @@ -360,28 +358,11 @@ fha_hash_entry_choose_thread(struct fha_ > */ > if ((softc->ctls.max_nfsds_per_fh == 0) || > (fhe->num_threads < softc->ctls.max_nfsds_per_fh)) { > - /* > - * We can add a new thread, so try for an idle thread > - * first, and fall back to this_thread if none are idle. > - */ > - if (STAILQ_EMPTY(&this_thread->st_reqs)) { > - thread = this_thread; > + thread = this_thread; > #if 0 > - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, > - "fha: %p(%d)t", thread, thread->st_reqcount); > -#endif > - } else if ((thread = LIST_FIRST(&pool->sp_idlethreads))) { > -#if 0 > - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, > - "fha: %p(%d)i", thread, thread->st_reqcount); > -#endif > - } else { > - thread = this_thread; > -#if 0 > - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, > - "fha: %p(%d)b", thread, thread->st_reqcount); > + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, > + "fha: %p(%d)t", thread, thread->st_p2); > #endif > - } > fha_hash_entry_add_thread(fhe, thread); > } else { > /* > @@ -411,16 +392,16 @@ fha_assign(SVCTHREAD *this_thread, struc > > /* Check to see whether we're enabled. */ > if (softc->ctls.enable == 0) > - return (this_thread); > + goto thist; > > /* > * Only do placement if this is an NFS request. > */ > if (req->rq_prog != NFS_PROG) > - return (this_thread); > + goto thist; > > if (req->rq_vers != 2 && req->rq_vers != 3) > - return (this_thread); > + goto thist; > > fha_extract_info(req, &i, cb); > > @@ -440,8 +421,21 @@ fha_assign(SVCTHREAD *this_thread, struc > thread = fha_hash_entry_choose_thread(softc, fhe, &i, this_thread); > KASSERT(thread, ("fha_assign: NULL thread!")); > fha_hash_entry_add_op(fhe, i.locktype, 1); > + thread->st_p2++; > + thread->st_p3 = i.offset; > + > + /* > + * Grab the pool lock here to not let chosen thread go away before > + * the new request inserted to its queue while we drop fhe lock. > + */ > + mtx_lock(&(*softc->pool)->sp_lock); > + mtx_unlock(fhe->mtx); > > return (thread); > +thist: > + req->rq_p1 = NULL; > + mtx_lock(&(*softc->pool)->sp_lock); > + return (this_thread); > } > > /* > @@ -452,6 +446,7 @@ void > fha_nd_complete(SVCTHREAD *thread, struct svc_req *req) > { > struct fha_hash_entry *fhe = req->rq_p1; > + struct mtx *mtx; > > /* > * This may be called for reqs that didn't go through > @@ -460,13 +455,18 @@ fha_nd_complete(SVCTHREAD *thread, struc > if (!fhe) > return; > > + mtx = fhe->mtx; > + mtx_lock(mtx); > fha_hash_entry_add_op(fhe, req->rq_p2, -1); > - > - if (thread->st_reqcount == 0) { > + thread->st_p2--; > + KASSERT(thread->st_p2 >= 0, ("Negative request count %d on %p", > + thread->st_p2, thread)); > + if (thread->st_p2 == 0) { > fha_hash_entry_remove_thread(fhe, thread); > if (0 == fhe->num_rw + fhe->num_exclusive) > fha_hash_entry_remove(fhe); > } > + mtx_unlock(mtx); > } > > int > @@ -489,10 +489,9 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st > } > pool = *softc->pool; > > - mtx_lock(&pool->sp_lock); > count = 0; > - for (i = 0; i <= softc->g_fha.hashmask; i++) > - if (!LIST_EMPTY(&softc->g_fha.hashtable[i])) > + for (i = 0; i < FHA_HASH_SIZE; i++) > + if (!LIST_EMPTY(&softc->fha_hash[i].list)) > count++; > > if (count == 0) { > @@ -500,8 +499,9 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st > goto out; > } > > - for (i = 0; i <= softc->g_fha.hashmask; i++) { > - LIST_FOREACH(fhe, &softc->g_fha.hashtable[i], link) { > + for (i = 0; i < FHA_HASH_SIZE; i++) { > + mtx_lock(&softc->fha_hash[i].mtx); > + LIST_FOREACH(fhe, &softc->fha_hash[i].list, link) { > sbuf_printf(&sb, "%sfhe %p: {\n", first ? "" : ", ", fhe); > > sbuf_printf(&sb, " fh: %ju\n", (uintmax_t) fhe->fh); > @@ -512,8 +512,7 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st > LIST_FOREACH(thread, &fhe->threads, st_alink) { > sbuf_printf(&sb, " thread %p offset %ju " > "(count %d)\n", thread, > - STAILQ_FIRST(&thread->st_reqs)->rq_p3, > - thread->st_reqcount); > + thread->st_p3, thread->st_p2); > } > > sbuf_printf(&sb, "}"); > @@ -525,11 +524,10 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st > break; > } > } > + mtx_unlock(&softc->fha_hash[i].mtx); > } > > out: > - if (pool) > - mtx_unlock(&pool->sp_lock); > sbuf_trim(&sb); > sbuf_finish(&sb); > error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); > > Modified: head/sys/nfs/nfs_fha.h > ============================================================================== > --- head/sys/nfs/nfs_fha.h Mon Dec 30 20:15:46 2013 (r260096) > +++ head/sys/nfs/nfs_fha.h Mon Dec 30 20:23:15 2013 (r260097) > @@ -35,11 +35,7 @@ > #define FHA_DEF_MAX_NFSDS_PER_FH 8 > #define FHA_DEF_MAX_REQS_PER_NFSD 0 /* Unlimited */ > > -/* This is the global structure that represents the state of the fha system. */ > -struct fha_global { > - struct fha_hash_entry_list *hashtable; > - u_long hashmask; > -}; > +#define FHA_HASH_SIZE 251 > > struct fha_ctls { > int enable; > @@ -62,6 +58,7 @@ struct fha_ctls { > * avoid contention between threads over single files. > */ > struct fha_hash_entry { > + struct mtx *mtx; > LIST_ENTRY(fha_hash_entry) link; > u_int64_t fh; > u_int32_t num_rw; > @@ -72,6 +69,11 @@ struct fha_hash_entry { > > LIST_HEAD(fha_hash_entry_list, fha_hash_entry); > > +struct fha_hash_slot { > + struct fha_hash_entry_list list; > + struct mtx mtx; > +}; > + > /* A structure used for passing around data internally. */ > struct fha_info { > u_int64_t fh; > @@ -93,7 +95,7 @@ struct fha_callbacks { > }; > > struct fha_params { > - struct fha_global g_fha; > + struct fha_hash_slot fha_hash[FHA_HASH_SIZE]; > struct sysctl_ctx_list sysctl_ctx; > struct sysctl_oid *sysctl_tree; > struct fha_ctls ctls; > > Modified: head/sys/rpc/svc.c > ============================================================================== > --- head/sys/rpc/svc.c Mon Dec 30 20:15:46 2013 (r260096) > +++ head/sys/rpc/svc.c Mon Dec 30 20:23:15 2013 (r260097) > @@ -71,6 +71,8 @@ static struct svc_callout *svc_find(SVCP > char *); > static void svc_new_thread(SVCPOOL *pool); > static void xprt_unregister_locked(SVCXPRT *xprt); > +static void svc_change_space_used(SVCPOOL *pool, int delta); > +static bool_t svc_request_space_available(SVCPOOL *pool); > > /* *************** SVCXPRT related stuff **************** */ > > @@ -373,7 +375,8 @@ xprt_active(SVCXPRT *xprt) > if (!xprt->xp_active) { > xprt->xp_active = TRUE; > if (xprt->xp_thread == NULL) { > - if (!xprt_assignthread(xprt)) > + if (!svc_request_space_available(pool) || > + !xprt_assignthread(xprt)) > TAILQ_INSERT_TAIL(&pool->sp_active, xprt, > xp_alink); > } > @@ -965,56 +968,63 @@ svc_assign_waiting_sockets(SVCPOOL *pool > { > SVCXPRT *xprt; > > + mtx_lock(&pool->sp_lock); > while ((xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { > if (xprt_assignthread(xprt)) > TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); > else > break; > } > + mtx_unlock(&pool->sp_lock); > } > > -static bool_t > -svc_request_space_available(SVCPOOL *pool) > +static void > +svc_change_space_used(SVCPOOL *pool, int delta) > { > + unsigned int value; > > - mtx_assert(&pool->sp_lock, MA_OWNED); > - > - if (pool->sp_space_throttled) { > - /* > - * Below the low-water yet? If so, assign any waiting sockets. > - */ > - if (pool->sp_space_used < pool->sp_space_low) { > - pool->sp_space_throttled = FALSE; > - svc_assign_waiting_sockets(pool); > - return TRUE; > - } > - > - return FALSE; > - } else { > - if (pool->sp_space_used > - >= pool->sp_space_high) { > + value = atomic_fetchadd_int(&pool->sp_space_used, delta) + delta; > + if (delta > 0) { > + if (value >= pool->sp_space_high && !pool->sp_space_throttled) { > pool->sp_space_throttled = TRUE; > pool->sp_space_throttle_count++; > - return FALSE; > } > - > - return TRUE; > + if (value > pool->sp_space_used_highest) > + pool->sp_space_used_highest = value; > + } else { > + if (value < pool->sp_space_low && pool->sp_space_throttled) { > + pool->sp_space_throttled = FALSE; > + svc_assign_waiting_sockets(pool); > + } > } > } > > +static bool_t > +svc_request_space_available(SVCPOOL *pool) > +{ > + > + if (pool->sp_space_throttled) > + return (FALSE); > + return (TRUE); > +} > + > static void > svc_run_internal(SVCPOOL *pool, bool_t ismaster) > { > + struct svc_reqlist reqs; > SVCTHREAD *st, *stpref; > SVCXPRT *xprt; > enum xprt_stat stat; > struct svc_req *rqstp; > + size_t sz; > int error; > > st = mem_alloc(sizeof(*st)); > + st->st_pool = pool; > st->st_xprt = NULL; > STAILQ_INIT(&st->st_reqs); > cv_init(&st->st_cond, "rpcsvc"); > + STAILQ_INIT(&reqs); > > mtx_lock(&pool->sp_lock); > LIST_INSERT_HEAD(&pool->sp_threads, st, st_link); > @@ -1108,15 +1118,14 @@ svc_run_internal(SVCPOOL *pool, bool_t i > * RPCs. > */ > xprt->xp_lastactive = time_uptime; > - stat = XPRT_IDLE; > do { > + mtx_unlock(&pool->sp_lock); > if (!svc_request_space_available(pool)) > break; > rqstp = NULL; > - mtx_unlock(&pool->sp_lock); > stat = svc_getreq(xprt, &rqstp); > - mtx_lock(&pool->sp_lock); > if (rqstp) { > + svc_change_space_used(pool, rqstp->rq_size); > /* > * See if the application has > * a preference for some other > @@ -1126,17 +1135,12 @@ svc_run_internal(SVCPOOL *pool, bool_t i > if (pool->sp_assign) > stpref = pool->sp_assign(st, > rqstp); > + else > + mtx_lock(&pool->sp_lock); > > - pool->sp_space_used += > - rqstp->rq_size; > - if (pool->sp_space_used > - > pool->sp_space_used_highest) > - pool->sp_space_used_highest = > - pool->sp_space_used; > rqstp->rq_thread = stpref; > STAILQ_INSERT_TAIL(&stpref->st_reqs, > rqstp, rq_link); > - stpref->st_reqcount++; > > /* > * If we assigned the request > @@ -1156,7 +1160,8 @@ svc_run_internal(SVCPOOL *pool, bool_t i > stpref->st_idle = FALSE; > cv_signal(&stpref->st_cond); > } > - } > + } else > + mtx_lock(&pool->sp_lock); > } while (stat == XPRT_MOREREQS > && pool->sp_state != SVCPOOL_CLOSING); > > @@ -1171,25 +1176,30 @@ svc_run_internal(SVCPOOL *pool, bool_t i > xprt->xp_thread = NULL; > st->st_xprt = NULL; > if (xprt->xp_active) { > - if (!xprt_assignthread(xprt)) > + if (!svc_request_space_available(pool) || > + !xprt_assignthread(xprt)) > TAILQ_INSERT_TAIL(&pool->sp_active, > xprt, xp_alink); > } > + STAILQ_CONCAT(&reqs, &st->st_reqs); > mtx_unlock(&pool->sp_lock); > SVC_RELEASE(xprt); > - mtx_lock(&pool->sp_lock); > + } else { > + STAILQ_CONCAT(&reqs, &st->st_reqs); > + mtx_unlock(&pool->sp_lock); > } > > /* > * Execute what we have queued. > */ > - while ((rqstp = STAILQ_FIRST(&st->st_reqs)) != NULL) { > - size_t sz = rqstp->rq_size; > - mtx_unlock(&pool->sp_lock); > + sz = 0; > + while ((rqstp = STAILQ_FIRST(&reqs)) != NULL) { > + STAILQ_REMOVE_HEAD(&reqs, rq_link); > + sz += rqstp->rq_size; > svc_executereq(rqstp); > - mtx_lock(&pool->sp_lock); > - pool->sp_space_used -= sz; > } > + svc_change_space_used(pool, -sz); > + mtx_lock(&pool->sp_lock); > } > > if (st->st_xprt) { > @@ -1309,24 +1319,13 @@ void > svc_freereq(struct svc_req *rqstp) > { > SVCTHREAD *st; > - SVCXPRT *xprt; > SVCPOOL *pool; > > st = rqstp->rq_thread; > - xprt = rqstp->rq_xprt; > - if (xprt) > - pool = xprt->xp_pool; > - else > - pool = NULL; > if (st) { > - mtx_lock(&pool->sp_lock); > - KASSERT(rqstp == STAILQ_FIRST(&st->st_reqs), > - ("Freeing request out of order")); > - STAILQ_REMOVE_HEAD(&st->st_reqs, rq_link); > - st->st_reqcount--; > + pool = st->st_pool; > if (pool->sp_done) > pool->sp_done(st, rqstp); > - mtx_unlock(&pool->sp_lock); > } > > if (rqstp->rq_auth.svc_ah_ops) > > Modified: head/sys/rpc/svc.h > ============================================================================== > --- head/sys/rpc/svc.h Mon Dec 30 20:15:46 2013 (r260096) > +++ head/sys/rpc/svc.h Mon Dec 30 20:23:15 2013 (r260097) > @@ -275,14 +275,16 @@ STAILQ_HEAD(svc_reqlist, svc_req); > * thread to read and execute pending RPCs. > */ > typedef struct __rpc_svcthread { > + struct __rpc_svcpool *st_pool; > SVCXPRT *st_xprt; /* transport we are processing */ > struct svc_reqlist st_reqs; /* RPC requests to execute */ > - int st_reqcount; /* number of queued reqs */ > int st_idle; /* thread is on idle list */ > struct cv st_cond; /* sleeping for work */ > LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ > LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ > LIST_ENTRY(__rpc_svcthread) st_alink; /* application thread list */ > + int st_p2; /* application workspace */ > + uint64_t st_p3; /* application workspace */ > } SVCTHREAD; > LIST_HEAD(svcthread_list, __rpc_svcthread); > From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 22:31:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90B629AF; Mon, 30 Dec 2013 22:31:02 +0000 (UTC) Received: from mail-ea0-x22b.google.com (mail-ea0-x22b.google.com [IPv6:2a00:1450:4013:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E550173C; Mon, 30 Dec 2013 22:31:01 +0000 (UTC) Received: by mail-ea0-f171.google.com with SMTP id h10so5337236eak.30 for ; Mon, 30 Dec 2013 14:31:00 -0800 (PST) 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=pQAjUZPXBMQup8VwJnTDtFpWyh2SnuHAjolbkTfPc1w=; b=Ya3D1pfSx3KzNKzko5Ji+dZsW8/f9SrRC2lFrTlOCN8oWTmOOZQTs9a4kOsqLEwCrj ZpCGluu+NtjHu8WEBj6VZyYAh6xqvPX6Xb6Wr5M9y/o3t/9RIY5SlSY4pPTo1Spe3tXF sh50wxwA+DriEvvyI9YeKTOnDaw3VZ4NLofBWSbSjaladkgV0elceuBSulVDRP9fJrds u8SGTosU26OMZkOow0SXDqNBXMgCibYm+yn3rP8Bqf8tZIuL3FFqIVsGrCJYX/fnnyy3 Qgsv1+xPMUsIzwqy4h1O6VdF5WOAnkKqftq6hRf6qUs057mJlBae6SDhRcn7XvuG3rKj WZdQ== X-Received: by 10.15.75.68 with SMTP id k44mr3818720eey.57.1388442659932; Mon, 30 Dec 2013 14:30:59 -0800 (PST) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id n1sm112615024eep.20.2013.12.30.14.30.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Dec 2013 14:30:58 -0800 (PST) Sender: Alexander Motin Message-ID: <52C1F420.80306@FreeBSD.org> Date: Tue, 31 Dec 2013 00:30:56 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r260097 - in head/sys: nfs rpc References: <201312302023.rBUKNF2L003229@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 22:31:02 -0000 On 31.12.2013 00:23, Adrian Chadd wrote: > Hm, this kind of per-bucket hash table may end up wanting to be used > in a variety of places. I wonder if we should create a locked hash > table type to reuse in various laces. I don't see there enough of reuse to create KPI for it. IMHO existing hashinit(9) KPI is quite useless either in its triviality. IMO simple array of struct as here now is much easier for understanding. > Nice work though. I wonder about doing this elsewhere (eg inpcb hash, > kqueue hash, etc.) > > > > -a > > > On 30 December 2013 12:23, Alexander Motin wrote: >> Author: mav >> Date: Mon Dec 30 20:23:15 2013 >> New Revision: 260097 >> URL: http://svnweb.freebsd.org/changeset/base/260097 >> >> Log: >> Move most of NFS file handle affinity code out of the heavily congested >> global RPC thread pool lock and protect it with own set of locks. >> >> On synthetic benchmarks this improves peak NFS request rate by 40%. >> >> Modified: >> head/sys/nfs/nfs_fha.c >> head/sys/nfs/nfs_fha.h >> head/sys/rpc/svc.c >> head/sys/rpc/svc.h >> >> Modified: head/sys/nfs/nfs_fha.c >> ============================================================================== >> --- head/sys/nfs/nfs_fha.c Mon Dec 30 20:15:46 2013 (r260096) >> +++ head/sys/nfs/nfs_fha.c Mon Dec 30 20:23:15 2013 (r260097) >> @@ -52,13 +52,10 @@ void >> fha_init(struct fha_params *softc) >> { >> char tmpstr[128]; >> + int i; >> >> - /* >> - * A small hash table to map filehandles to fha_hash_entry >> - * structures. >> - */ >> - softc->g_fha.hashtable = hashinit(256, M_NFS_FHA, >> - &softc->g_fha.hashmask); >> + for (i = 0; i < FHA_HASH_SIZE; i++) >> + mtx_init(&softc->fha_hash[i].mtx, "fhalock", NULL, MTX_DEF); >> >> /* >> * Set the default tuning parameters. >> @@ -117,8 +114,11 @@ fha_init(struct fha_params *softc) >> void >> fha_uninit(struct fha_params *softc) >> { >> + int i; >> + >> sysctl_ctx_free(&softc->sysctl_ctx); >> - hashdestroy(softc->g_fha.hashtable, M_NFS_FHA, softc->g_fha.hashmask); >> + for (i = 0; i < FHA_HASH_SIZE; i++) >> + mtx_destroy(&softc->fha_hash[i].mtx); >> } >> >> /* >> @@ -207,8 +207,13 @@ static void >> fha_hash_entry_destroy(struct fha_hash_entry *e) >> { >> >> - if (e->num_rw + e->num_exclusive) >> - panic("nonempty fhe"); >> + mtx_assert(e->mtx, MA_OWNED); >> + KASSERT(e->num_rw == 0, >> + ("%d reqs on destroyed fhe %p", e->num_rw, e)); >> + KASSERT(e->num_exclusive == 0, >> + ("%d exclusive reqs on destroyed fhe %p", e->num_exclusive, e)); >> + KASSERT(e->num_threads == 0, >> + ("%d threads on destroyed fhe %p", e->num_threads, e)); >> free(e, M_NFS_FHA); >> } >> >> @@ -216,6 +221,7 @@ static void >> fha_hash_entry_remove(struct fha_hash_entry *e) >> { >> >> + mtx_assert(e->mtx, MA_OWNED); >> LIST_REMOVE(e, link); >> fha_hash_entry_destroy(e); >> } >> @@ -224,36 +230,22 @@ static struct fha_hash_entry * >> fha_hash_entry_lookup(struct fha_params *softc, u_int64_t fh) >> { >> SVCPOOL *pool; >> - >> - pool = *softc->pool; >> - >> + struct fha_hash_slot *fhs; >> struct fha_hash_entry *fhe, *new_fhe; >> >> - LIST_FOREACH(fhe, &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], >> - link) >> + pool = *softc->pool; >> + fhs = &softc->fha_hash[fh % FHA_HASH_SIZE]; >> + new_fhe = fha_hash_entry_new(fh); >> + new_fhe->mtx = &fhs->mtx; >> + mtx_lock(&fhs->mtx); >> + LIST_FOREACH(fhe, &fhs->list, link) >> if (fhe->fh == fh) >> break; >> - >> if (!fhe) { >> - /* Allocate a new entry. */ >> - mtx_unlock(&pool->sp_lock); >> - new_fhe = fha_hash_entry_new(fh); >> - mtx_lock(&pool->sp_lock); >> - >> - /* Double-check to make sure we still need the new entry. */ >> - LIST_FOREACH(fhe, >> - &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], link) >> - if (fhe->fh == fh) >> - break; >> - if (!fhe) { >> - fhe = new_fhe; >> - LIST_INSERT_HEAD( >> - &softc->g_fha.hashtable[fh % softc->g_fha.hashmask], >> - fhe, link); >> - } else >> - fha_hash_entry_destroy(new_fhe); >> - } >> - >> + fhe = new_fhe; >> + LIST_INSERT_HEAD(&fhs->list, fhe, link); >> + } else >> + fha_hash_entry_destroy(new_fhe); >> return (fhe); >> } >> >> @@ -261,6 +253,8 @@ static void >> fha_hash_entry_add_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) >> { >> >> + mtx_assert(fhe->mtx, MA_OWNED); >> + thread->st_p2 = 0; >> LIST_INSERT_HEAD(&fhe->threads, thread, st_alink); >> fhe->num_threads++; >> } >> @@ -269,6 +263,9 @@ static void >> fha_hash_entry_remove_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) >> { >> >> + mtx_assert(fhe->mtx, MA_OWNED); >> + KASSERT(thread->st_p2 == 0, >> + ("%d reqs on removed thread %p", thread->st_p2, thread)); >> LIST_REMOVE(thread, st_alink); >> fhe->num_threads--; >> } >> @@ -280,6 +277,7 @@ static void >> fha_hash_entry_add_op(struct fha_hash_entry *fhe, int locktype, int count) >> { >> >> + mtx_assert(fhe->mtx, MA_OWNED); >> if (LK_EXCLUSIVE == locktype) >> fhe->num_exclusive += count; >> else >> @@ -306,7 +304,7 @@ fha_hash_entry_choose_thread(struct fha_ >> pool = *softc->pool; >> >> LIST_FOREACH(thread, &fhe->threads, st_alink) { >> - req_count = thread->st_reqcount; >> + req_count = thread->st_p2; >> >> /* If there are any writes in progress, use the first thread. */ >> if (fhe->num_exclusive) { >> @@ -322,7 +320,7 @@ fha_hash_entry_choose_thread(struct fha_ >> * exceed our per-thread load limit in the process. >> */ >> offset1 = i->offset; >> - offset2 = STAILQ_FIRST(&thread->st_reqs)->rq_p3; >> + offset2 = thread->st_p3; >> >> if (((offset1 >= offset2) >> && ((offset1 - offset2) < (1 << softc->ctls.bin_shift))) >> @@ -360,28 +358,11 @@ fha_hash_entry_choose_thread(struct fha_ >> */ >> if ((softc->ctls.max_nfsds_per_fh == 0) || >> (fhe->num_threads < softc->ctls.max_nfsds_per_fh)) { >> - /* >> - * We can add a new thread, so try for an idle thread >> - * first, and fall back to this_thread if none are idle. >> - */ >> - if (STAILQ_EMPTY(&this_thread->st_reqs)) { >> - thread = this_thread; >> + thread = this_thread; >> #if 0 >> - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, >> - "fha: %p(%d)t", thread, thread->st_reqcount); >> -#endif >> - } else if ((thread = LIST_FIRST(&pool->sp_idlethreads))) { >> -#if 0 >> - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, >> - "fha: %p(%d)i", thread, thread->st_reqcount); >> -#endif >> - } else { >> - thread = this_thread; >> -#if 0 >> - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, >> - "fha: %p(%d)b", thread, thread->st_reqcount); >> + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, >> + "fha: %p(%d)t", thread, thread->st_p2); >> #endif >> - } >> fha_hash_entry_add_thread(fhe, thread); >> } else { >> /* >> @@ -411,16 +392,16 @@ fha_assign(SVCTHREAD *this_thread, struc >> >> /* Check to see whether we're enabled. */ >> if (softc->ctls.enable == 0) >> - return (this_thread); >> + goto thist; >> >> /* >> * Only do placement if this is an NFS request. >> */ >> if (req->rq_prog != NFS_PROG) >> - return (this_thread); >> + goto thist; >> >> if (req->rq_vers != 2 && req->rq_vers != 3) >> - return (this_thread); >> + goto thist; >> >> fha_extract_info(req, &i, cb); >> >> @@ -440,8 +421,21 @@ fha_assign(SVCTHREAD *this_thread, struc >> thread = fha_hash_entry_choose_thread(softc, fhe, &i, this_thread); >> KASSERT(thread, ("fha_assign: NULL thread!")); >> fha_hash_entry_add_op(fhe, i.locktype, 1); >> + thread->st_p2++; >> + thread->st_p3 = i.offset; >> + >> + /* >> + * Grab the pool lock here to not let chosen thread go away before >> + * the new request inserted to its queue while we drop fhe lock. >> + */ >> + mtx_lock(&(*softc->pool)->sp_lock); >> + mtx_unlock(fhe->mtx); >> >> return (thread); >> +thist: >> + req->rq_p1 = NULL; >> + mtx_lock(&(*softc->pool)->sp_lock); >> + return (this_thread); >> } >> >> /* >> @@ -452,6 +446,7 @@ void >> fha_nd_complete(SVCTHREAD *thread, struct svc_req *req) >> { >> struct fha_hash_entry *fhe = req->rq_p1; >> + struct mtx *mtx; >> >> /* >> * This may be called for reqs that didn't go through >> @@ -460,13 +455,18 @@ fha_nd_complete(SVCTHREAD *thread, struc >> if (!fhe) >> return; >> >> + mtx = fhe->mtx; >> + mtx_lock(mtx); >> fha_hash_entry_add_op(fhe, req->rq_p2, -1); >> - >> - if (thread->st_reqcount == 0) { >> + thread->st_p2--; >> + KASSERT(thread->st_p2 >= 0, ("Negative request count %d on %p", >> + thread->st_p2, thread)); >> + if (thread->st_p2 == 0) { >> fha_hash_entry_remove_thread(fhe, thread); >> if (0 == fhe->num_rw + fhe->num_exclusive) >> fha_hash_entry_remove(fhe); >> } >> + mtx_unlock(mtx); >> } >> >> int >> @@ -489,10 +489,9 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st >> } >> pool = *softc->pool; >> >> - mtx_lock(&pool->sp_lock); >> count = 0; >> - for (i = 0; i <= softc->g_fha.hashmask; i++) >> - if (!LIST_EMPTY(&softc->g_fha.hashtable[i])) >> + for (i = 0; i < FHA_HASH_SIZE; i++) >> + if (!LIST_EMPTY(&softc->fha_hash[i].list)) >> count++; >> >> if (count == 0) { >> @@ -500,8 +499,9 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st >> goto out; >> } >> >> - for (i = 0; i <= softc->g_fha.hashmask; i++) { >> - LIST_FOREACH(fhe, &softc->g_fha.hashtable[i], link) { >> + for (i = 0; i < FHA_HASH_SIZE; i++) { >> + mtx_lock(&softc->fha_hash[i].mtx); >> + LIST_FOREACH(fhe, &softc->fha_hash[i].list, link) { >> sbuf_printf(&sb, "%sfhe %p: {\n", first ? "" : ", ", fhe); >> >> sbuf_printf(&sb, " fh: %ju\n", (uintmax_t) fhe->fh); >> @@ -512,8 +512,7 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st >> LIST_FOREACH(thread, &fhe->threads, st_alink) { >> sbuf_printf(&sb, " thread %p offset %ju " >> "(count %d)\n", thread, >> - STAILQ_FIRST(&thread->st_reqs)->rq_p3, >> - thread->st_reqcount); >> + thread->st_p3, thread->st_p2); >> } >> >> sbuf_printf(&sb, "}"); >> @@ -525,11 +524,10 @@ fhe_stats_sysctl(SYSCTL_HANDLER_ARGS, st >> break; >> } >> } >> + mtx_unlock(&softc->fha_hash[i].mtx); >> } >> >> out: >> - if (pool) >> - mtx_unlock(&pool->sp_lock); >> sbuf_trim(&sb); >> sbuf_finish(&sb); >> error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); >> >> Modified: head/sys/nfs/nfs_fha.h >> ============================================================================== >> --- head/sys/nfs/nfs_fha.h Mon Dec 30 20:15:46 2013 (r260096) >> +++ head/sys/nfs/nfs_fha.h Mon Dec 30 20:23:15 2013 (r260097) >> @@ -35,11 +35,7 @@ >> #define FHA_DEF_MAX_NFSDS_PER_FH 8 >> #define FHA_DEF_MAX_REQS_PER_NFSD 0 /* Unlimited */ >> >> -/* This is the global structure that represents the state of the fha system. */ >> -struct fha_global { >> - struct fha_hash_entry_list *hashtable; >> - u_long hashmask; >> -}; >> +#define FHA_HASH_SIZE 251 >> >> struct fha_ctls { >> int enable; >> @@ -62,6 +58,7 @@ struct fha_ctls { >> * avoid contention between threads over single files. >> */ >> struct fha_hash_entry { >> + struct mtx *mtx; >> LIST_ENTRY(fha_hash_entry) link; >> u_int64_t fh; >> u_int32_t num_rw; >> @@ -72,6 +69,11 @@ struct fha_hash_entry { >> >> LIST_HEAD(fha_hash_entry_list, fha_hash_entry); >> >> +struct fha_hash_slot { >> + struct fha_hash_entry_list list; >> + struct mtx mtx; >> +}; >> + >> /* A structure used for passing around data internally. */ >> struct fha_info { >> u_int64_t fh; >> @@ -93,7 +95,7 @@ struct fha_callbacks { >> }; >> >> struct fha_params { >> - struct fha_global g_fha; >> + struct fha_hash_slot fha_hash[FHA_HASH_SIZE]; >> struct sysctl_ctx_list sysctl_ctx; >> struct sysctl_oid *sysctl_tree; >> struct fha_ctls ctls; >> >> Modified: head/sys/rpc/svc.c >> ============================================================================== >> --- head/sys/rpc/svc.c Mon Dec 30 20:15:46 2013 (r260096) >> +++ head/sys/rpc/svc.c Mon Dec 30 20:23:15 2013 (r260097) >> @@ -71,6 +71,8 @@ static struct svc_callout *svc_find(SVCP >> char *); >> static void svc_new_thread(SVCPOOL *pool); >> static void xprt_unregister_locked(SVCXPRT *xprt); >> +static void svc_change_space_used(SVCPOOL *pool, int delta); >> +static bool_t svc_request_space_available(SVCPOOL *pool); >> >> /* *************** SVCXPRT related stuff **************** */ >> >> @@ -373,7 +375,8 @@ xprt_active(SVCXPRT *xprt) >> if (!xprt->xp_active) { >> xprt->xp_active = TRUE; >> if (xprt->xp_thread == NULL) { >> - if (!xprt_assignthread(xprt)) >> + if (!svc_request_space_available(pool) || >> + !xprt_assignthread(xprt)) >> TAILQ_INSERT_TAIL(&pool->sp_active, xprt, >> xp_alink); >> } >> @@ -965,56 +968,63 @@ svc_assign_waiting_sockets(SVCPOOL *pool >> { >> SVCXPRT *xprt; >> >> + mtx_lock(&pool->sp_lock); >> while ((xprt = TAILQ_FIRST(&pool->sp_active)) != NULL) { >> if (xprt_assignthread(xprt)) >> TAILQ_REMOVE(&pool->sp_active, xprt, xp_alink); >> else >> break; >> } >> + mtx_unlock(&pool->sp_lock); >> } >> >> -static bool_t >> -svc_request_space_available(SVCPOOL *pool) >> +static void >> +svc_change_space_used(SVCPOOL *pool, int delta) >> { >> + unsigned int value; >> >> - mtx_assert(&pool->sp_lock, MA_OWNED); >> - >> - if (pool->sp_space_throttled) { >> - /* >> - * Below the low-water yet? If so, assign any waiting sockets. >> - */ >> - if (pool->sp_space_used < pool->sp_space_low) { >> - pool->sp_space_throttled = FALSE; >> - svc_assign_waiting_sockets(pool); >> - return TRUE; >> - } >> - >> - return FALSE; >> - } else { >> - if (pool->sp_space_used >> - >= pool->sp_space_high) { >> + value = atomic_fetchadd_int(&pool->sp_space_used, delta) + delta; >> + if (delta > 0) { >> + if (value >= pool->sp_space_high && !pool->sp_space_throttled) { >> pool->sp_space_throttled = TRUE; >> pool->sp_space_throttle_count++; >> - return FALSE; >> } >> - >> - return TRUE; >> + if (value > pool->sp_space_used_highest) >> + pool->sp_space_used_highest = value; >> + } else { >> + if (value < pool->sp_space_low && pool->sp_space_throttled) { >> + pool->sp_space_throttled = FALSE; >> + svc_assign_waiting_sockets(pool); >> + } >> } >> } >> >> +static bool_t >> +svc_request_space_available(SVCPOOL *pool) >> +{ >> + >> + if (pool->sp_space_throttled) >> + return (FALSE); >> + return (TRUE); >> +} >> + >> static void >> svc_run_internal(SVCPOOL *pool, bool_t ismaster) >> { >> + struct svc_reqlist reqs; >> SVCTHREAD *st, *stpref; >> SVCXPRT *xprt; >> enum xprt_stat stat; >> struct svc_req *rqstp; >> + size_t sz; >> int error; >> >> st = mem_alloc(sizeof(*st)); >> + st->st_pool = pool; >> st->st_xprt = NULL; >> STAILQ_INIT(&st->st_reqs); >> cv_init(&st->st_cond, "rpcsvc"); >> + STAILQ_INIT(&reqs); >> >> mtx_lock(&pool->sp_lock); >> LIST_INSERT_HEAD(&pool->sp_threads, st, st_link); >> @@ -1108,15 +1118,14 @@ svc_run_internal(SVCPOOL *pool, bool_t i >> * RPCs. >> */ >> xprt->xp_lastactive = time_uptime; >> - stat = XPRT_IDLE; >> do { >> + mtx_unlock(&pool->sp_lock); >> if (!svc_request_space_available(pool)) >> break; >> rqstp = NULL; >> - mtx_unlock(&pool->sp_lock); >> stat = svc_getreq(xprt, &rqstp); >> - mtx_lock(&pool->sp_lock); >> if (rqstp) { >> + svc_change_space_used(pool, rqstp->rq_size); >> /* >> * See if the application has >> * a preference for some other >> @@ -1126,17 +1135,12 @@ svc_run_internal(SVCPOOL *pool, bool_t i >> if (pool->sp_assign) >> stpref = pool->sp_assign(st, >> rqstp); >> + else >> + mtx_lock(&pool->sp_lock); >> >> - pool->sp_space_used += >> - rqstp->rq_size; >> - if (pool->sp_space_used >> - > pool->sp_space_used_highest) >> - pool->sp_space_used_highest = >> - pool->sp_space_used; >> rqstp->rq_thread = stpref; >> STAILQ_INSERT_TAIL(&stpref->st_reqs, >> rqstp, rq_link); >> - stpref->st_reqcount++; >> >> /* >> * If we assigned the request >> @@ -1156,7 +1160,8 @@ svc_run_internal(SVCPOOL *pool, bool_t i >> stpref->st_idle = FALSE; >> cv_signal(&stpref->st_cond); >> } >> - } >> + } else >> + mtx_lock(&pool->sp_lock); >> } while (stat == XPRT_MOREREQS >> && pool->sp_state != SVCPOOL_CLOSING); >> >> @@ -1171,25 +1176,30 @@ svc_run_internal(SVCPOOL *pool, bool_t i >> xprt->xp_thread = NULL; >> st->st_xprt = NULL; >> if (xprt->xp_active) { >> - if (!xprt_assignthread(xprt)) >> + if (!svc_request_space_available(pool) || >> + !xprt_assignthread(xprt)) >> TAILQ_INSERT_TAIL(&pool->sp_active, >> xprt, xp_alink); >> } >> + STAILQ_CONCAT(&reqs, &st->st_reqs); >> mtx_unlock(&pool->sp_lock); >> SVC_RELEASE(xprt); >> - mtx_lock(&pool->sp_lock); >> + } else { >> + STAILQ_CONCAT(&reqs, &st->st_reqs); >> + mtx_unlock(&pool->sp_lock); >> } >> >> /* >> * Execute what we have queued. >> */ >> - while ((rqstp = STAILQ_FIRST(&st->st_reqs)) != NULL) { >> - size_t sz = rqstp->rq_size; >> - mtx_unlock(&pool->sp_lock); >> + sz = 0; >> + while ((rqstp = STAILQ_FIRST(&reqs)) != NULL) { >> + STAILQ_REMOVE_HEAD(&reqs, rq_link); >> + sz += rqstp->rq_size; >> svc_executereq(rqstp); >> - mtx_lock(&pool->sp_lock); >> - pool->sp_space_used -= sz; >> } >> + svc_change_space_used(pool, -sz); >> + mtx_lock(&pool->sp_lock); >> } >> >> if (st->st_xprt) { >> @@ -1309,24 +1319,13 @@ void >> svc_freereq(struct svc_req *rqstp) >> { >> SVCTHREAD *st; >> - SVCXPRT *xprt; >> SVCPOOL *pool; >> >> st = rqstp->rq_thread; >> - xprt = rqstp->rq_xprt; >> - if (xprt) >> - pool = xprt->xp_pool; >> - else >> - pool = NULL; >> if (st) { >> - mtx_lock(&pool->sp_lock); >> - KASSERT(rqstp == STAILQ_FIRST(&st->st_reqs), >> - ("Freeing request out of order")); >> - STAILQ_REMOVE_HEAD(&st->st_reqs, rq_link); >> - st->st_reqcount--; >> + pool = st->st_pool; >> if (pool->sp_done) >> pool->sp_done(st, rqstp); >> - mtx_unlock(&pool->sp_lock); >> } >> >> if (rqstp->rq_auth.svc_ah_ops) >> >> Modified: head/sys/rpc/svc.h >> ============================================================================== >> --- head/sys/rpc/svc.h Mon Dec 30 20:15:46 2013 (r260096) >> +++ head/sys/rpc/svc.h Mon Dec 30 20:23:15 2013 (r260097) >> @@ -275,14 +275,16 @@ STAILQ_HEAD(svc_reqlist, svc_req); >> * thread to read and execute pending RPCs. >> */ >> typedef struct __rpc_svcthread { >> + struct __rpc_svcpool *st_pool; >> SVCXPRT *st_xprt; /* transport we are processing */ >> struct svc_reqlist st_reqs; /* RPC requests to execute */ >> - int st_reqcount; /* number of queued reqs */ >> int st_idle; /* thread is on idle list */ >> struct cv st_cond; /* sleeping for work */ >> LIST_ENTRY(__rpc_svcthread) st_link; /* all threads list */ >> LIST_ENTRY(__rpc_svcthread) st_ilink; /* idle threads list */ >> LIST_ENTRY(__rpc_svcthread) st_alink; /* application thread list */ >> + int st_p2; /* application workspace */ >> + uint64_t st_p3; /* application workspace */ >> } SVCTHREAD; >> LIST_HEAD(svcthread_list, __rpc_svcthread); >> -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 23:02:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F29B2266; Mon, 30 Dec 2013 23:02:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD9AC192C; Mon, 30 Dec 2013 23:02:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUN2QBO068428; Mon, 30 Dec 2013 23:02:26 GMT (envelope-from edavis@svn.freebsd.org) Received: (from edavis@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUN2QIk068426; Mon, 30 Dec 2013 23:02:26 GMT (envelope-from edavis@svn.freebsd.org) Message-Id: <201312302302.rBUN2QIk068426@svn.freebsd.org> From: Eric Davis Date: Mon, 30 Dec 2013 23:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260113 - head/sys/dev/bxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 23:02:27 -0000 Author: edavis Date: Mon Dec 30 23:02:26 2013 New Revision: 260113 URL: http://svnweb.freebsd.org/changeset/base/260113 Log: For TSO, when the first mbuf contains both the packet header and data, the header is split out into its own BD for processing by the firmware. When this split occurred the data length in the BD was not being set correctly resulting in packet corruption. Approved by: davidcd (mentor) Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/ecore_sp.c Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Mon Dec 30 22:17:33 2013 (r260112) +++ head/sys/dev/bxe/bxe.c Mon Dec 30 23:02:26 2013 (r260113) @@ -34,7 +34,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.75" +#define BXE_DRIVER_VERSION "1.78.76" #include "bxe.h" #include "ecore_sp.h" @@ -5004,6 +5004,7 @@ bxe_dump_mbuf(struct bxe_softc *sc, uint8_t contents) { char * type; + int i = 0; if (!(sc->debug & DBG_MBUF)) { return; @@ -5016,28 +5017,21 @@ bxe_dump_mbuf(struct bxe_softc *sc, while (m) { BLOGD(sc, DBG_MBUF, - "mbuf=%p m_len=%d m_flags=0x%b m_data=%p\n", - m, m->m_len, m->m_flags, - "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY", m->m_data); + "%02d: mbuf=%p m_len=%d m_flags=0x%b m_data=%p\n", + i, m, m->m_len, m->m_flags, M_FLAG_BITS, m->m_data); if (m->m_flags & M_PKTHDR) { BLOGD(sc, DBG_MBUF, - "- m_pkthdr: len=%d flags=0x%b csum_flags=%b\n", - m->m_pkthdr.len, m->m_flags, - "\20\12M_BCAST\13M_MCAST\14M_FRAG" - "\15M_FIRSTFRAG\16M_LASTFRAG\21M_VLANTAG" - "\22M_PROMISC\23M_NOFREE", - (int)m->m_pkthdr.csum_flags, - "\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP\4CSUM_IP_FRAGS" - "\5CSUM_FRAGMENT\6CSUM_TSO\11CSUM_IP_CHECKED" - "\12CSUM_IP_VALID\13CSUM_DATA_VALID" - "\14CSUM_PSEUDO_HDR"); + "%02d: - m_pkthdr: tot_len=%d flags=0x%b csum_flags=%b\n", + i, m->m_pkthdr.len, m->m_flags, M_FLAG_BITS, + (int)m->m_pkthdr.csum_flags, CSUM_BITS); } if (m->m_flags & M_EXT) { switch (m->m_ext.ext_type) { case EXT_CLUSTER: type = "EXT_CLUSTER"; break; case EXT_SFBUF: type = "EXT_SFBUF"; break; + case EXT_JUMBOP: type = "EXT_JUMBOP"; break; case EXT_JUMBO9: type = "EXT_JUMBO9"; break; case EXT_JUMBO16: type = "EXT_JUMBO16"; break; case EXT_PACKET: type = "EXT_PACKET"; break; @@ -5050,8 +5044,8 @@ bxe_dump_mbuf(struct bxe_softc *sc, } BLOGD(sc, DBG_MBUF, - "- m_ext: %p ext_size=%d, type=%s\n", - m->m_ext.ext_buf, m->m_ext.ext_size, type); + "%02d: - m_ext: %p ext_size=%d type=%s\n", + i, m->m_ext.ext_buf, m->m_ext.ext_size, type); } if (contents) { @@ -5059,6 +5053,7 @@ bxe_dump_mbuf(struct bxe_softc *sc, } m = m->m_next; + i++; } } @@ -5669,6 +5664,7 @@ bxe_tx_encap_continue: /* split the first BD into header/data making the fw job easy */ nbds++; tx_start_bd->nbd = htole16(nbds); + tx_start_bd->nbytes = htole16(hlen); bd_prod = TX_BD_NEXT(bd_prod); Modified: head/sys/dev/bxe/ecore_sp.c ============================================================================== --- head/sys/dev/bxe/ecore_sp.c Mon Dec 30 22:17:33 2013 (r260112) +++ head/sys/dev/bxe/ecore_sp.c Mon Dec 30 23:02:26 2013 (r260113) @@ -4264,7 +4264,7 @@ void ecore_init_mac_credit_pool(struct b if (!CHIP_REV_IS_SLOW(sc)) cam_sz = (MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(sc)) - / func_num + / func_num + GET_NUM_VFS_PER_PF(sc); else cam_sz = ECORE_CAM_SIZE_EMUL; @@ -4443,8 +4443,11 @@ int ecore_config_rss(struct bxe_softc *s struct ecore_raw_obj *r = &o->raw; /* Do nothing if only driver cleanup was requested */ - if (ECORE_TEST_BIT(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags)) + if (ECORE_TEST_BIT(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags)) { + ECORE_MSG(sc, "Not configuring RSS ramrod_flags=%lx\n", + p->ramrod_flags); return ECORE_SUCCESS; + } r->set_pending(r); From owner-svn-src-all@FreeBSD.ORG Mon Dec 30 23:46:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19643A3A; Mon, 30 Dec 2013 23:46: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 049DE1C93; Mon, 30 Dec 2013 23:46:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBUNkZik084243; Mon, 30 Dec 2013 23:46:35 GMT (envelope-from edavis@svn.freebsd.org) Received: (from edavis@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBUNkZjZ084241; Mon, 30 Dec 2013 23:46:35 GMT (envelope-from edavis@svn.freebsd.org) Message-Id: <201312302346.rBUNkZjZ084241@svn.freebsd.org> From: Eric Davis Date: Mon, 30 Dec 2013 23:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260114 - stable/10/sys/dev/bxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 23:46:36 -0000 Author: edavis Date: Mon Dec 30 23:46:35 2013 New Revision: 260114 URL: http://svnweb.freebsd.org/changeset/base/260114 Log: Approved by: re@ (gjb) Approved by: davidch (mentor) Modified: stable/10/sys/dev/bxe/bxe.c stable/10/sys/dev/bxe/ecore_sp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Mon Dec 30 23:02:26 2013 (r260113) +++ stable/10/sys/dev/bxe/bxe.c Mon Dec 30 23:46:35 2013 (r260114) @@ -34,7 +34,7 @@ #include __FBSDID("$FreeBSD$"); -#define BXE_DRIVER_VERSION "1.78.75" +#define BXE_DRIVER_VERSION "1.78.76" #include "bxe.h" #include "ecore_sp.h" @@ -5004,6 +5004,7 @@ bxe_dump_mbuf(struct bxe_softc *sc, uint8_t contents) { char * type; + int i = 0; if (!(sc->debug & DBG_MBUF)) { return; @@ -5016,28 +5017,21 @@ bxe_dump_mbuf(struct bxe_softc *sc, while (m) { BLOGD(sc, DBG_MBUF, - "mbuf=%p m_len=%d m_flags=0x%b m_data=%p\n", - m, m->m_len, m->m_flags, - "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY", m->m_data); + "%02d: mbuf=%p m_len=%d m_flags=0x%b m_data=%p\n", + i, m, m->m_len, m->m_flags, M_FLAG_BITS, m->m_data); if (m->m_flags & M_PKTHDR) { BLOGD(sc, DBG_MBUF, - "- m_pkthdr: len=%d flags=0x%b csum_flags=%b\n", - m->m_pkthdr.len, m->m_flags, - "\20\12M_BCAST\13M_MCAST\14M_FRAG" - "\15M_FIRSTFRAG\16M_LASTFRAG\21M_VLANTAG" - "\22M_PROMISC\23M_NOFREE", - (int)m->m_pkthdr.csum_flags, - "\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP\4CSUM_IP_FRAGS" - "\5CSUM_FRAGMENT\6CSUM_TSO\11CSUM_IP_CHECKED" - "\12CSUM_IP_VALID\13CSUM_DATA_VALID" - "\14CSUM_PSEUDO_HDR"); + "%02d: - m_pkthdr: tot_len=%d flags=0x%b csum_flags=%b\n", + i, m->m_pkthdr.len, m->m_flags, M_FLAG_BITS, + (int)m->m_pkthdr.csum_flags, CSUM_BITS); } if (m->m_flags & M_EXT) { switch (m->m_ext.ext_type) { case EXT_CLUSTER: type = "EXT_CLUSTER"; break; case EXT_SFBUF: type = "EXT_SFBUF"; break; + case EXT_JUMBOP: type = "EXT_JUMBOP"; break; case EXT_JUMBO9: type = "EXT_JUMBO9"; break; case EXT_JUMBO16: type = "EXT_JUMBO16"; break; case EXT_PACKET: type = "EXT_PACKET"; break; @@ -5050,8 +5044,8 @@ bxe_dump_mbuf(struct bxe_softc *sc, } BLOGD(sc, DBG_MBUF, - "- m_ext: %p ext_size=%d, type=%s\n", - m->m_ext.ext_buf, m->m_ext.ext_size, type); + "%02d: - m_ext: %p ext_size=%d type=%s\n", + i, m->m_ext.ext_buf, m->m_ext.ext_size, type); } if (contents) { @@ -5059,6 +5053,7 @@ bxe_dump_mbuf(struct bxe_softc *sc, } m = m->m_next; + i++; } } @@ -5669,6 +5664,7 @@ bxe_tx_encap_continue: /* split the first BD into header/data making the fw job easy */ nbds++; tx_start_bd->nbd = htole16(nbds); + tx_start_bd->nbytes = htole16(hlen); bd_prod = TX_BD_NEXT(bd_prod); Modified: stable/10/sys/dev/bxe/ecore_sp.c ============================================================================== --- stable/10/sys/dev/bxe/ecore_sp.c Mon Dec 30 23:02:26 2013 (r260113) +++ stable/10/sys/dev/bxe/ecore_sp.c Mon Dec 30 23:46:35 2013 (r260114) @@ -4264,7 +4264,7 @@ void ecore_init_mac_credit_pool(struct b if (!CHIP_REV_IS_SLOW(sc)) cam_sz = (MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(sc)) - / func_num + / func_num + GET_NUM_VFS_PER_PF(sc); else cam_sz = ECORE_CAM_SIZE_EMUL; @@ -4443,8 +4443,11 @@ int ecore_config_rss(struct bxe_softc *s struct ecore_raw_obj *r = &o->raw; /* Do nothing if only driver cleanup was requested */ - if (ECORE_TEST_BIT(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags)) + if (ECORE_TEST_BIT(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags)) { + ECORE_MSG(sc, "Not configuring RSS ramrod_flags=%lx\n", + p->ramrod_flags); return ECORE_SUCCESS; + } r->set_pending(r); From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 00:07:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3A4CED0; Tue, 31 Dec 2013 00:07:41 +0000 (UTC) Received: from mail-ea0-x22a.google.com (mail-ea0-x22a.google.com [IPv6:2a00:1450:4013:c01::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C9F671DAC; Tue, 31 Dec 2013 00:07:40 +0000 (UTC) Received: by mail-ea0-f170.google.com with SMTP id k10so5348847eaj.1 for ; Mon, 30 Dec 2013 16:07:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=g12a0HT0palQ1IasGu4Lc/H+g9upT2+AVugk9tlBkhU=; b=lZMwufu6rfAYmktXpqSIzKF2aLjbeZ3J73BkEPPx1evVCpRnA0j5s/V1bnW2CPkytc I0NZqXgUdAo6cot1WkDfx0mAdZOm4J8P+DUWYl1qChcdBJQ8NU7Fy9C/qEkNcNvfMEuF hxd45Kn3UwYs6/HGoou85+PTrCN16kjuTps/IXKxCp3F2/nipLmRnOt8OTlkjrkqQRIu S3Wet8lU6RkZzKO6JFC3Kw/pQUtFBdk4II6oDH5gXxCBBeSm62ymALYMjDZRlrc3mhOz HADi1UUrfOgC0jZk5GoeB5tiejN18+8wQfjXHtdZLYu0ZeB/ym/O/2KHJvvY/k8n+Jz5 uMBw== MIME-Version: 1.0 X-Received: by 10.15.95.72 with SMTP id bc48mr4052632eeb.49.1388448459324; Mon, 30 Dec 2013 16:07:39 -0800 (PST) Sender: hiren.panchasara@gmail.com Received: by 10.14.2.66 with HTTP; Mon, 30 Dec 2013 16:07:39 -0800 (PST) In-Reply-To: <201312302346.rBUNkZjZ084241@svn.freebsd.org> References: <201312302346.rBUNkZjZ084241@svn.freebsd.org> Date: Mon, 30 Dec 2013 16:07:39 -0800 X-Google-Sender-Auth: GBoepojR5TNMjI-rul3o6lYyIRQ Message-ID: Subject: Re: svn commit: r260114 - stable/10/sys/dev/bxe From: hiren panchasara To: Eric Davis Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, svn-src-all , src-committers , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 00:07:41 -0000 On Mon, Dec 30, 2013 at 3:46 PM, Eric Davis wrote: > Author: edavis > Date: Mon Dec 30 23:46:35 2013 > New Revision: 260114 > URL: http://svnweb.freebsd.org/changeset/base/260114 > > Log: > Approved by: re@ (gjb) > Approved by: davidch (mentor) Missed the commit-log message? :-) cheers, Hiren From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 00:12:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C5842A1; Tue, 31 Dec 2013 00:12:53 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF3AC1E34; Tue, 31 Dec 2013 00:12:52 +0000 (UTC) Received: from glenbarber.us (c-71-224-221-174.hsd1.nj.comcast.net [71.224.221.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 3949995C7; Tue, 31 Dec 2013 00:12:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 3949995C7 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Mon, 30 Dec 2013 19:12:49 -0500 From: Glen Barber To: Eric Davis Subject: Re: svn commit: r260114 - stable/10/sys/dev/bxe Message-ID: <20131231001249.GK1748@glenbarber.us> References: <201312302346.rBUNkZjZ084241@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ucgz5Oc/kKURWzXs" Content-Disposition: inline In-Reply-To: <201312302346.rBUNkZjZ084241@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 00:12:53 -0000 --Ucgz5Oc/kKURWzXs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 30, 2013 at 11:46:35PM +0000, Eric Davis wrote: > Author: edavis > Date: Mon Dec 30 23:46:35 2013 > New Revision: 260114 > URL: http://svnweb.freebsd.org/changeset/base/260114 >=20 > Log: > Approved by: re@ (gjb) > Approved by: davidch (mentor) It was not approved by re@, as stable/10 is not frozen. Glen >=20 > Modified: > stable/10/sys/dev/bxe/bxe.c > stable/10/sys/dev/bxe/ecore_sp.c > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/sys/dev/bxe/bxe.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 > --- stable/10/sys/dev/bxe/bxe.c Mon Dec 30 23:02:26 2013 (r260113) > +++ stable/10/sys/dev/bxe/bxe.c Mon Dec 30 23:46:35 2013 (r260114) > @@ -34,7 +34,7 @@ > #include > __FBSDID("$FreeBSD$"); > =20 > -#define BXE_DRIVER_VERSION "1.78.75" > +#define BXE_DRIVER_VERSION "1.78.76" > =20 > #include "bxe.h" > #include "ecore_sp.h" > @@ -5004,6 +5004,7 @@ bxe_dump_mbuf(struct bxe_softc *sc, > uint8_t contents) > { > char * type; > + int i =3D 0; > =20 > if (!(sc->debug & DBG_MBUF)) { > return; > @@ -5016,28 +5017,21 @@ bxe_dump_mbuf(struct bxe_softc *sc, > =20 > while (m) { > BLOGD(sc, DBG_MBUF, > - "mbuf=3D%p m_len=3D%d m_flags=3D0x%b m_data=3D%p\n", > - m, m->m_len, m->m_flags, > - "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY", m->m_data); > + "%02d: mbuf=3D%p m_len=3D%d m_flags=3D0x%b m_data=3D%p\n", > + i, m, m->m_len, m->m_flags, M_FLAG_BITS, m->m_data); > =20 > if (m->m_flags & M_PKTHDR) { > BLOGD(sc, DBG_MBUF, > - "- m_pkthdr: len=3D%d flags=3D0x%b csum_flags=3D%b\n", > - m->m_pkthdr.len, m->m_flags, > - "\20\12M_BCAST\13M_MCAST\14M_FRAG" > - "\15M_FIRSTFRAG\16M_LASTFRAG\21M_VLANTAG" > - "\22M_PROMISC\23M_NOFREE", > - (int)m->m_pkthdr.csum_flags, > - "\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP\4CSUM_IP_FRAGS" > - "\5CSUM_FRAGMENT\6CSUM_TSO\11CSUM_IP_CHECKED" > - "\12CSUM_IP_VALID\13CSUM_DATA_VALID" > - "\14CSUM_PSEUDO_HDR"); > + "%02d: - m_pkthdr: tot_len=3D%d flags=3D0x%b csum_fla= gs=3D%b\n", > + i, m->m_pkthdr.len, m->m_flags, M_FLAG_BITS, > + (int)m->m_pkthdr.csum_flags, CSUM_BITS); > } > =20 > if (m->m_flags & M_EXT) { > switch (m->m_ext.ext_type) { > case EXT_CLUSTER: type =3D "EXT_CLUSTER"; break; > case EXT_SFBUF: type =3D "EXT_SFBUF"; break; > + case EXT_JUMBOP: type =3D "EXT_JUMBOP"; break; > case EXT_JUMBO9: type =3D "EXT_JUMBO9"; break; > case EXT_JUMBO16: type =3D "EXT_JUMBO16"; break; > case EXT_PACKET: type =3D "EXT_PACKET"; break; > @@ -5050,8 +5044,8 @@ bxe_dump_mbuf(struct bxe_softc *sc, > } > =20 > BLOGD(sc, DBG_MBUF, > - "- m_ext: %p ext_size=3D%d, type=3D%s\n", > - m->m_ext.ext_buf, m->m_ext.ext_size, type); > + "%02d: - m_ext: %p ext_size=3D%d type=3D%s\n", > + i, m->m_ext.ext_buf, m->m_ext.ext_size, type); > } > =20 > if (contents) { > @@ -5059,6 +5053,7 @@ bxe_dump_mbuf(struct bxe_softc *sc, > } > =20 > m =3D m->m_next; > + i++; > } > } > =20 > @@ -5669,6 +5664,7 @@ bxe_tx_encap_continue: > /* split the first BD into header/data making the fw job eas= y */ > nbds++; > tx_start_bd->nbd =3D htole16(nbds); > + tx_start_bd->nbytes =3D htole16(hlen); > =20 > bd_prod =3D TX_BD_NEXT(bd_prod); > =20 >=20 > Modified: stable/10/sys/dev/bxe/ecore_sp.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 > --- stable/10/sys/dev/bxe/ecore_sp.c Mon Dec 30 23:02:26 2013 (r260113) > +++ stable/10/sys/dev/bxe/ecore_sp.c Mon Dec 30 23:46:35 2013 (r260114) > @@ -4264,7 +4264,7 @@ void ecore_init_mac_credit_pool(struct b > if (!CHIP_REV_IS_SLOW(sc)) > cam_sz =3D (MAX_MAC_CREDIT_E2 > - GET_NUM_VFS_PER_PATH(sc)) > - / func_num=20 > + / func_num > + GET_NUM_VFS_PER_PF(sc); > else > cam_sz =3D ECORE_CAM_SIZE_EMUL; > @@ -4443,8 +4443,11 @@ int ecore_config_rss(struct bxe_softc *s > struct ecore_raw_obj *r =3D &o->raw; > =20 > /* Do nothing if only driver cleanup was requested */ > - if (ECORE_TEST_BIT(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags)) > + if (ECORE_TEST_BIT(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags)) { > + ECORE_MSG(sc, "Not configuring RSS ramrod_flags=3D%lx\n", > + p->ramrod_flags); > return ECORE_SUCCESS; > + } > =20 > r->set_pending(r); > =20 --Ucgz5Oc/kKURWzXs Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJSwgwBAAoJELls3eqvi17Qs/UQAIATaNrfZV0SYgV89CvMOKJ+ Bv6vuZBfKUMNHRSNjxfEaB2uN9Zsl2gFfXPX9Iummh2qDxQm3oHQVmt0BjgvT+9V 2Wne1eKo1IInNE87j5oEOv9rWx+uXFMucGjGFPb9cFXQimp7jkhr2pYXtw4dX/Uv QP/EwYZ74Rhnsq+c3R2lwkkoGYxEoU4yRbYQkw6T/jmKfMqqteWVUK7GALMbEpvv cnRvRDUzsMo/iM6OqqRFJCFWAuICw1lndz6QgD1fzPY1YSZ+izzmEyjzxmHsHyud eJ1SvkMSqpc6gpa4Fl7/BCIIFhF2pNy0U7lE2IQGhwlkFpMSAlf4gfch2vZsQhyg 9Pwq3WJr3zCUnQ2tdq7a3ny97tD7EmoshhN78u3KiG5qDSu4n6JZBpu9D1Ev2cX9 MzI+gZR75JydwIaa6uWemRXwFkBS5yReK10CxEb8zVD+LgBJHDEiYg7cKWk9EmEZ YCbAlSAJOoW/ZI0M/UY/eM1Hk+RniBrrEZJD9O/CTggf28odSXNj4D8mNXXjTADL o9sk+76uIHGrx4Cl0Q7s7YRoNxHlPUhwupA/Eu2y2vF885oY3JhDboY3jrEho+Aj TmTEngUKu1AVRs/snPOle0L+Gd1V0Pdi0KCBXTTmgjj8F/0/PifdBwxbA+f3+uVS lkekMA1n4ULrl8yBYoUE =VmDe -----END PGP SIGNATURE----- --Ucgz5Oc/kKURWzXs-- From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 00:15:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A8FC4D4; Tue, 31 Dec 2013 00:15:35 +0000 (UTC) Received: from mail-gw3-out.broadcom.com (mail-gw3-out.broadcom.com [216.31.210.64]) by mx1.freebsd.org (Postfix) with ESMTP id 2B8E31E4F; Tue, 31 Dec 2013 00:15:34 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,576,1384329600"; d="scan'208";a="6575262" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw3-out.broadcom.com with ESMTP; 30 Dec 2013 16:18:52 -0800 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Mon, 30 Dec 2013 16:15:33 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.1.438.0; Mon, 30 Dec 2013 16:15:34 -0800 Received: from localhost (dhcp-10-12-137-51.irv.broadcom.com [10.12.137.51]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id DD3BA246A7; Mon, 30 Dec 2013 16:15:33 -0800 (PST) Date: Mon, 30 Dec 2013 16:15:33 -0800 From: Eric Davis To: hiren panchasara Subject: Re: svn commit: r260114 - stable/10/sys/dev/bxe Message-ID: <20131231001533.GA30565@broadcom.com> References: <201312302346.rBUNkZjZ084241@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) Cc: svn-src-stable@freebsd.org, svn-src-all , src-committers , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Eric Davis List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 00:15:35 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 30, 2013 at 04:07:39PM -0800, hiren panchasara wrote: > On Mon, Dec 30, 2013 at 3:46 PM, Eric Davis wrote: > > Author: edavis > > Date: Mon Dec 30 23:46:35 2013 > > New Revision: 260114 > > URL: http://svnweb.freebsd.org/changeset/base/260114 > > > > Log: > > Approved by: re@ (gjb) > > Approved by: davidch (mentor) >=20 > Missed the commit-log message? :-) >=20 > cheers, > Hiren Hey Hiren, Ah yes! Should have included: Merged r260113 from head. - e --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAEBAgAGBQJSwgylAAoJEPUt8GDsVYPdOmsH/2A5ZyVmyRW07GtFyPpOwDhE WmLfG5G9eZbfZTEcoOuIt3C+SVWO1U5ApD7wPnuSHydGsqjmcMVAejWV62SAY4Td N8ZFJ6bn6ZUNiDVzcaP37YCuvT3p4tw6YoPM8Vth52/M8nuotlNfkvOFxzvM/xYS VrDawbq3L08bSOjQWxT7L0nKSW6qnFOt2D4CrP/xnQwOMyAd4lmAjGfCeVA8Wlx3 8d8noLPrc1uhqfkA4h7urJmU3Jlz6NsM8h0s+iMF4NhE7yQvpocd2o+uHv19pEkk 4xlWu4nX0g+HSqG5jYaKTTwR33++WwsBy88WLFP4SY7SjnyrliH+ay6ladL+bOY= =8Tvc -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 00:21:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6747E834; Tue, 31 Dec 2013 00:21:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 537361EDF; Tue, 31 Dec 2013 00:21:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBV0LGjq099782; Tue, 31 Dec 2013 00:21:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBV0LGkW099781; Tue, 31 Dec 2013 00:21:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312310021.rBV0LGkW099781@svn.freebsd.org> From: Glen Barber Date: Tue, 31 Dec 2013 00:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260115 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 00:21:16 -0000 Author: gjb Date: Tue Dec 31 00:21:15 2013 New Revision: 260115 URL: http://svnweb.freebsd.org/changeset/base/260115 Log: Revert r259862: Don't try to bootstrap a utility that does not exist in the branch. Pointyhat: gjb Submitted by: John W. O'Brien (via -stable@) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/Makefile Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/Makefile ============================================================================== --- stable/9/release/Makefile Mon Dec 30 23:46:35 2013 (r260114) +++ stable/9/release/Makefile Tue Dec 31 00:21:15 2013 (r260115) @@ -103,8 +103,6 @@ base.txz: # Set up mergemaster root database sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base" - etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \ - -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" # Package all components cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} mv ${DISTDIR}/*.txz . From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 02:41:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0676565; Tue, 31 Dec 2013 02:41:13 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7CCD016D6; Tue, 31 Dec 2013 02:41:13 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id x13so12631996ief.20 for ; Mon, 30 Dec 2013 18:41:12 -0800 (PST) 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=nVgTfs5Yn3VHY8p9Kcv0aNNUZnp5LRefEgdRmlZTXCU=; b=mtr9Vx5iHoC/ZkxvVC544jDFfSB5lpd8VTe6ugsQfW+0IeeomzE1eh3TH7Xio7LWxx GH2dX26bmVABnLLaggitE2GJEP4+JiqSAzfz74dA3YOCK0fcnEpWoecfkAKjJVdcYDuT kMI4d/Ms1avXgPwRncfVnuGwdlalwjUxfdmJM50MkjQCWTbBgHtRGEzNdQtiFw+QymlB BjtYOjsIOBHfQCzjgNLtk11nFC7p2aKOdhxc64fNw3QOg9nuqSd6B4r5b+ChRoGGGD98 Y6MmYve/mNlHNvYlt7RZKB8FNQeLTlbk1GI3GI5TuYiHofqbtEC8pkkCU6pDbXG6ugzj BUSg== X-Received: by 10.42.4.201 with SMTP id 9mr5425629ict.57.1388457672802; Mon, 30 Dec 2013 18:41:12 -0800 (PST) Received: from charmander.home ([65.95.94.123]) by mx.google.com with ESMTPSA id v2sm60828837igz.3.2013.12.30.18.41.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Dec 2013 18:41:11 -0800 (PST) Sender: Mark Johnston Date: Mon, 30 Dec 2013 21:40:34 -0500 From: Mark Johnston To: Gleb Smirnoff Subject: Re: svn commit: r260091 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace contrib/opensolaris/uts/common/sys dev/dtrace Message-ID: <20131231023952.GA11997@charmander.home> References: <201312301737.rBUHbW3I035088@svn.freebsd.org> <20131230204210.GD71033@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131230204210.GD71033@FreeBSD.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Mike Ma , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 02:41:13 -0000 On Tue, Dec 31, 2013 at 12:42:10AM +0400, Gleb Smirnoff wrote: > On Mon, Dec 30, 2013 at 05:37:32PM +0000, Mark Johnston wrote: > M> Author: markj > M> Date: Mon Dec 30 17:37:32 2013 > M> New Revision: 260091 > M> URL: http://svnweb.freebsd.org/changeset/base/260091 > M> > M> Log: > M> Now that vmem(9) is available, use vmem arenas to allocate probe and > M> aggregation IDs, as is done in the upstream illumos code. This still > M> requires some FreeBSD-specific code, as our vmem API is not identical to the > M> one in illumos. > M> > M> Submitted by: Mike Ma > > IMHO, alloc_unr() was lighter and thus better for allocating just IDs. That's true; I committed the change since it helps keep our code similar to upstream and, as Pedro notes, it was a long-standing todo item on the wiki. After doing some testing, it looks like vmem is a bit slower: process startup is on the order of tenths of milliseconds longer with this change, for executables containing one USDT probe (since such probes are allocated during process startup). So probably the right thing to do is revert this change. It doesn't actually reduce the upstream diff as much as I'd hoped, anyway. Thanks, -Mark From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 03:22:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75F26123 for ; Tue, 31 Dec 2013 03:22:09 +0000 (UTC) Received: from nm4.bullet.mail.bf1.yahoo.com (nm4.bullet.mail.bf1.yahoo.com [98.139.212.163]) by mx1.freebsd.org (Postfix) with SMTP id 084AF1A4D for ; Tue, 31 Dec 2013 03:22:08 +0000 (UTC) Received: from [98.139.212.153] by nm4.bullet.mail.bf1.yahoo.com with NNFMP; 31 Dec 2013 03:22:01 -0000 Received: from [98.139.211.206] by tm10.bullet.mail.bf1.yahoo.com with NNFMP; 31 Dec 2013 03:22:00 -0000 Received: from [127.0.0.1] by smtp215.mail.bf1.yahoo.com with NNFMP; 31 Dec 2013 03:22:00 -0000 X-Yahoo-Newman-Id: 976141.96410.bm@smtp215.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Thkt8PIVM1kEaiFSX68uXeeB5FSV2CCHrzH4uEIKSkPZ24e KAXATPh8M_NboE6RgSoASTCIGVs7h_plBXl.Tw6Z3L0SCytFvl17jGX0khpp JQRKuBRgSamZCu.DmNt0LHybyr1jclpS9BjGBJnn0v8zQ.MfIrhNRGAnkwNp Ff5wtgkuMgL1D9vAVAPYN.6.oID7IN4.TpdQmtTlE1vb3lcwZcFkarfEJOec MkzgjOBYGEE_O01SWmkgoDewXPcw4q5MhcdsvFXweB.iZgfu4D6k4S1bzx6A 3sXi8k74eMS9RDOBDLjHUaYFj7VIsHO7hyDbgJKmw_d9ZwfwsFC.3B82WHOz E_1eEj1Kaq3uohrKpPqQxs7DYUP66Iybwx5YBbv5FHaDRuTFX4ugIVMsWOqk H5_mwtC534h0Q8dtsL3n5By8HEKPz5CnB2wllrGF7NW36xMsuXaCFWD3iqm. 3RhJ1zBQf8SP5rbstG26vse9zR.NcRVyiHfU548gFNWhK8KyLwHrNhqVfylg FZf752vRbXwQ8O7F3H.jUlyp84U0lUnWhEQqkmC3Cz8_IUxMJI2I- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.101] (pfg@190.157.126.109 with plain [98.139.211.125]) by smtp215.mail.bf1.yahoo.com with SMTP; 30 Dec 2013 19:22:00 -0800 PST Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: svn commit: r260091 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace contrib/opensolaris/uts/common/sys dev/dtrace From: Pedro Giffuni In-Reply-To: <20131231023952.GA11997@charmander.home> Date: Mon, 30 Dec 2013 22:21:58 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <7A335B4A-D986-4E6E-8D8B-22E7E7991A75@FreeBSD.org> References: <201312301737.rBUHbW3I035088@svn.freebsd.org> <20131230204210.GD71033@FreeBSD.org> <20131231023952.GA11997@charmander.home> To: Mark Johnston X-Mailer: Apple Mail (2.1822) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , Mike Ma , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 03:22:09 -0000 Il giorno 30/dic/2013, alle ore 21:40, Mark Johnston = ha scritto: > On Tue, Dec 31, 2013 at 12:42:10AM +0400, Gleb Smirnoff wrote: >> On Mon, Dec 30, 2013 at 05:37:32PM +0000, Mark Johnston wrote: >> M> Author: markj >> M> Date: Mon Dec 30 17:37:32 2013 >> M> New Revision: 260091 >> M> URL: http://svnweb.freebsd.org/changeset/base/260091 >> M>=20 >> M> Log: >> M> Now that vmem(9) is available, use vmem arenas to allocate probe = and >> M> aggregation IDs, as is done in the upstream illumos code. This = still >> M> requires some FreeBSD-specific code, as our vmem API is not = identical to the >> M> one in illumos. >> M> =20 >> M> Submitted by: Mike Ma >>=20 >> IMHO, alloc_unr() was lighter and thus better for allocating just = IDs. >=20 > That's true; I committed the change since it helps keep our code = similar > to upstream and, as Pedro notes, it was a long-standing todo item on = the > wiki. After doing some testing, it looks like vmem is a bit slower: > process startup is on the order of tenths of milliseconds longer with > this change, for executables containing one USDT probe (since such > probes are allocated during process startup). >=20 > So probably the right thing to do is revert this change. It doesn't > actually reduce the upstream diff as much as I'd hoped, anyway. >=20 Since it is our option to decide, perhaps just keep the vmem version as = reference and #ifdef FreeBSD alloc_unr() ? I don=92t think we need to keep most of those SUN defines anymore. Pedro. > Thanks, > -Mark From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 03:29:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EDD6376; Tue, 31 Dec 2013 03:29:20 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0FBA61A8C; Tue, 31 Dec 2013 03:29:20 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id e14so12720734iej.40 for ; Mon, 30 Dec 2013 19:29:19 -0800 (PST) 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=1UEiP1L5DMizIrqAu4Id5eqdjUK6XT3tijXdRe5BJ1c=; b=bYODebS+VFFyEq5FLC6ZtJBoCX1DvITeR5ZAh/bROfJh1DE0pYsVDeoGXTDizb/tQe MANMWWIph9ghpZPVni+K5wGx0SHaL2w/glP+QcjxNV101+SXAL7FdWHpPDcpD1EE4BKG Yi5FNOg401lAk+WU4kqvo/RChFST+aUiWOBtvgY1VSvlyR+jzMllMWiz0BmPKC3RqXfy 28ProcmGxt5YPPAowKWn9INOEeeJ8HFsXGrUtdQZKlAqy0Sad22N8kdNcBD9DEmddWYv O4g+3PC7uw/EmpNLhcH+HiHMYtEamvz7Nxt4lVhI+wjiolTMWvnIu9FLUICCp19yfe8R dBAg== X-Received: by 10.50.29.114 with SMTP id j18mr57943142igh.24.1388460559385; Mon, 30 Dec 2013 19:29:19 -0800 (PST) Received: from charmander.home ([65.95.94.123]) by mx.google.com with ESMTPSA id o1sm62710885igh.9.2013.12.30.19.29.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Dec 2013 19:29:18 -0800 (PST) Sender: Mark Johnston Date: Mon, 30 Dec 2013 22:28:46 -0500 From: Mark Johnston To: Pedro Giffuni Subject: Re: svn commit: r260091 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace contrib/opensolaris/uts/common/sys dev/dtrace Message-ID: <20131231032845.GB11997@charmander.home> References: <201312301737.rBUHbW3I035088@svn.freebsd.org> <20131230204210.GD71033@FreeBSD.org> <20131231023952.GA11997@charmander.home> <7A335B4A-D986-4E6E-8D8B-22E7E7991A75@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7A335B4A-D986-4E6E-8D8B-22E7E7991A75@FreeBSD.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , Mike Ma , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 03:29:20 -0000 On Mon, Dec 30, 2013 at 10:21:58PM -0500, Pedro Giffuni wrote: > > Il giorno 30/dic/2013, alle ore 21:40, Mark Johnston ha scritto: > > > On Tue, Dec 31, 2013 at 12:42:10AM +0400, Gleb Smirnoff wrote: > >> On Mon, Dec 30, 2013 at 05:37:32PM +0000, Mark Johnston wrote: > >> M> Author: markj > >> M> Date: Mon Dec 30 17:37:32 2013 > >> M> New Revision: 260091 > >> M> URL: http://svnweb.freebsd.org/changeset/base/260091 > >> M> > >> M> Log: > >> M> Now that vmem(9) is available, use vmem arenas to allocate probe and > >> M> aggregation IDs, as is done in the upstream illumos code. This still > >> M> requires some FreeBSD-specific code, as our vmem API is not identical to the > >> M> one in illumos. > >> M> > >> M> Submitted by: Mike Ma > >> > >> IMHO, alloc_unr() was lighter and thus better for allocating just IDs. > > > > That's true; I committed the change since it helps keep our code similar > > to upstream and, as Pedro notes, it was a long-standing todo item on the > > wiki. After doing some testing, it looks like vmem is a bit slower: > > process startup is on the order of tenths of milliseconds longer with > > this change, for executables containing one USDT probe (since such > > probes are allocated during process startup). > > > > So probably the right thing to do is revert this change. It doesn't > > actually reduce the upstream diff as much as I'd hoped, anyway. > > > > Since it is our option to decide, perhaps just keep the vmem version as reference and #ifdef FreeBSD alloc_unr() ? You mean just having #if defined(sun) vmem code #else *_unr code #endif ? That's what we'd get by reverting the change. From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 03:49:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1663372A for ; Tue, 31 Dec 2013 03:49:41 +0000 (UTC) Received: from nm8-vm0.bullet.mail.bf1.yahoo.com (nm8-vm0.bullet.mail.bf1.yahoo.com [98.139.213.95]) by mx1.freebsd.org (Postfix) with SMTP id 9CCA71CCB for ; Tue, 31 Dec 2013 03:49:40 +0000 (UTC) Received: from [98.139.215.143] by nm8.bullet.mail.bf1.yahoo.com with NNFMP; 31 Dec 2013 03:49:33 -0000 Received: from [68.142.230.69] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 31 Dec 2013 03:49:33 -0000 Received: from [127.0.0.1] by smtp226.mail.bf1.yahoo.com with NNFMP; 31 Dec 2013 03:49:33 -0000 X-Yahoo-Newman-Id: 412209.9915.bm@smtp226.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: pffOzqsVM1k4vZ9_HlITKy2U9WJqOpNa0FH4zIkMaiRJxeK Hu_Z5acsQ0EF.MKnUufr3Jkq4u1pWOmg7W6bLN7ti.LO_3ggZ9.oDJj_DCsU puNhNUX9mUtHMAo_SkrJqhGOSvERhBauimm5IT8Kt6hc0gwS54ciFr3pj5Sj 2XFRWNIMUluEqrDhnoxbjNiwaxip92nBEK1w_zp_Xlp1qpYaGzWC1zqcfp.e oO24.49RHgN4IIMs2j5wmwtm4dgTAaBQ6nGyFXm8GqImkrVDrgWm3hj_7uWr CHGaFqn2dYh3pdvFD97u6_WdA._ig_3wM_B.K8hbm9MqWG5NjD1LO6v7GAKO __Wv4DkGPD1ZMJOwtgWihoBK65C7PlsFILqqZwK0fbcGZ1T1jG4ZE._MqMWY ig6mfD2zCWGM1Jp8iSBZg27.KVyj4oAzFe4w9pvnZQ0u8D6VhwA9fOgxUDad RWDQpn.hYNbunhPGsnxhlHmuW6Fky6T0CgU57RgTZY_Kqkg35iz56RwNq0Qc yZboFoypB0SN87L42mUHr9Z02t_Lc.Yhbecxou8h.iZYW7VdLKek- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.101] (pfg@190.157.126.109 with plain [98.139.211.125]) by smtp226.mail.bf1.yahoo.com with SMTP; 31 Dec 2013 03:49:33 +0000 UTC Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: svn commit: r260091 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace contrib/opensolaris/uts/common/sys dev/dtrace From: Pedro Giffuni In-Reply-To: <20131231032845.GB11997@charmander.home> Date: Mon, 30 Dec 2013 22:49:23 -0500 Message-Id: References: <201312301737.rBUHbW3I035088@svn.freebsd.org> <20131230204210.GD71033@FreeBSD.org> <20131231023952.GA11997@charmander.home> <7A335B4A-D986-4E6E-8D8B-22E7E7991A75@FreeBSD.org> <20131231032845.GB11997@charmander.home> To: Mark Johnston X-Mailer: Apple Mail (2.1822) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , Mike Ma , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 03:49:41 -0000 Il giorno 30/dic/2013, alle ore 22:28, Mark Johnston = ha scritto: > On Mon, Dec 30, 2013 at 10:21:58PM -0500, Pedro Giffuni wrote: >>=20 >> Il giorno 30/dic/2013, alle ore 21:40, Mark Johnston = ha scritto: >>=20 >>> On Tue, Dec 31, 2013 at 12:42:10AM +0400, Gleb Smirnoff wrote: >>>> On Mon, Dec 30, 2013 at 05:37:32PM +0000, Mark Johnston wrote: >>>> M> Author: markj >>>> M> Date: Mon Dec 30 17:37:32 2013 >>>> M> New Revision: 260091 >>>> M> URL: http://svnweb.freebsd.org/changeset/base/260091 >>>> M>=20 >>>> M> Log: >>>> M> Now that vmem(9) is available, use vmem arenas to allocate = probe and >>>> M> aggregation IDs, as is done in the upstream illumos code. This = still >>>> M> requires some FreeBSD-specific code, as our vmem API is not = identical to the >>>> M> one in illumos. >>>> M> =20 >>>> M> Submitted by: Mike Ma >>>>=20 >>>> IMHO, alloc_unr() was lighter and thus better for allocating just = IDs. >>>=20 >>> That's true; I committed the change since it helps keep our code = similar >>> to upstream and, as Pedro notes, it was a long-standing todo item on = the >>> wiki. After doing some testing, it looks like vmem is a bit slower: >>> process startup is on the order of tenths of milliseconds longer = with >>> this change, for executables containing one USDT probe (since such >>> probes are allocated during process startup). >>>=20 >>> So probably the right thing to do is revert this change. It doesn't >>> actually reduce the upstream diff as much as I'd hoped, anyway. >>>=20 >>=20 >> Since it is our option to decide, perhaps just keep the vmem version = as reference and #ifdef FreeBSD alloc_unr() ? >=20 > You mean just having >=20 > #if defined(sun) > vmem code > #else > *_unr code > #endif >=20 > ? That's what we'd get by reverting the change. Rather=20 #ifdef __FreeBSD__ *_unr code #else vmem code (FreeBSD variant) #endif Not much different, but if we are going to keep dead code let=92s keep = at least code that is known to work ;) Pedro.= From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 04:00:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98B6A8C9; Tue, 31 Dec 2013 04:00:31 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 366051D9A; Tue, 31 Dec 2013 04:00:31 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id x13so12713074ief.34 for ; Mon, 30 Dec 2013 20:00:30 -0800 (PST) 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:content-transfer-encoding :in-reply-to:user-agent; bh=coEH8EjPeTJ82uun9ijjmuVtHBGKKIDhkbSI5jRy0d4=; b=vEdkOi7iXlkT6/7owgPs2DkbeFwmcixlH3XqeMinyZL+e1aFJrJGrZarnicqbS/rxY qC6ejM+cbUQCy2852Bp7iB7FWmqQV0f5+BbAnRAO7ZMmyXuUTGap8et70mcmp21TXxkO 7SI7tM40deJGfJ39/wltOhn28m8BH2yRBG8UQOC6BpjzXgQwQ2+qAjr1ywYrBNBbfgkj pewU50XXCvD3Mwnh81blWJjI+lddznXLx+w4yMxoqD38VwMMRFFyujrjfZ2/PwIr+pBF 4E/cEBGhKLLKSMKOOezHP3wTIqrZyhCVSD6jehf8SBzyUylz3UDMcQbk/4fI0yYzBnLt 3l2g== X-Received: by 10.50.25.227 with SMTP id f3mr58638578igg.21.1388462430686; Mon, 30 Dec 2013 20:00:30 -0800 (PST) Received: from charmander.home ([65.95.94.123]) by mx.google.com with ESMTPSA id au9sm23933288igc.7.2013.12.30.20.00.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Dec 2013 20:00:30 -0800 (PST) Sender: Mark Johnston Date: Mon, 30 Dec 2013 22:59:57 -0500 From: Mark Johnston To: Pedro Giffuni Subject: Re: svn commit: r260091 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace contrib/opensolaris/uts/common/sys dev/dtrace Message-ID: <20131231035957.GC11997@charmander.home> References: <201312301737.rBUHbW3I035088@svn.freebsd.org> <20131230204210.GD71033@FreeBSD.org> <20131231023952.GA11997@charmander.home> <7A335B4A-D986-4E6E-8D8B-22E7E7991A75@FreeBSD.org> <20131231032845.GB11997@charmander.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , Mike Ma , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 04:00:31 -0000 On Mon, Dec 30, 2013 at 10:49:23PM -0500, Pedro Giffuni wrote: > > Il giorno 30/dic/2013, alle ore 22:28, Mark Johnston ha scritto: > > > On Mon, Dec 30, 2013 at 10:21:58PM -0500, Pedro Giffuni wrote: > >> > >> Il giorno 30/dic/2013, alle ore 21:40, Mark Johnston ha scritto: > >> > >>> On Tue, Dec 31, 2013 at 12:42:10AM +0400, Gleb Smirnoff wrote: > >>>> On Mon, Dec 30, 2013 at 05:37:32PM +0000, Mark Johnston wrote: > >>>> M> Author: markj > >>>> M> Date: Mon Dec 30 17:37:32 2013 > >>>> M> New Revision: 260091 > >>>> M> URL: http://svnweb.freebsd.org/changeset/base/260091 > >>>> M> > >>>> M> Log: > >>>> M> Now that vmem(9) is available, use vmem arenas to allocate probe and > >>>> M> aggregation IDs, as is done in the upstream illumos code. This still > >>>> M> requires some FreeBSD-specific code, as our vmem API is not identical to the > >>>> M> one in illumos. > >>>> M> > >>>> M> Submitted by: Mike Ma > >>>> > >>>> IMHO, alloc_unr() was lighter and thus better for allocating just IDs. > >>> > >>> That's true; I committed the change since it helps keep our code similar > >>> to upstream and, as Pedro notes, it was a long-standing todo item on the > >>> wiki. After doing some testing, it looks like vmem is a bit slower: > >>> process startup is on the order of tenths of milliseconds longer with > >>> this change, for executables containing one USDT probe (since such > >>> probes are allocated during process startup). > >>> > >>> So probably the right thing to do is revert this change. It doesn't > >>> actually reduce the upstream diff as much as I'd hoped, anyway. > >>> > >> > >> Since it is our option to decide, perhaps just keep the vmem version as reference and #ifdef FreeBSD alloc_unr() ? > > > > You mean just having > > > > #if defined(sun) > > vmem code > > #else > > *_unr code > > #endif > > > > ? That's what we'd get by reverting the change. > > > Rather > #ifdef __FreeBSD__ > *_unr code > #else > vmem code (FreeBSD variant) > #endif > > Not much different, but if we are going to keep dead code let’s keep at least code that is known to work ;) IMHO, the whole point of keeping the dead code is to make it easier to merge upstream changes, and to have a quick reference handy when comparing illumos- and FreeBSD-specific code. That's how it's used in all of dtrace.c, so I'd prefer to be consistent in this case as well, rather than having two versions of FreeBSD-specific code. -Mark From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 04:40:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90DAB9E5; Tue, 31 Dec 2013 04:40:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E8731FF1; Tue, 31 Dec 2013 04:40:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBV4ePMd098694; Tue, 31 Dec 2013 04:40:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBV4ePup098693; Tue, 31 Dec 2013 04:40:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312310440.rBV4ePup098693@svn.freebsd.org> From: Warner Losh Date: Tue, 31 Dec 2013 04:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260118 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 04:40:25 -0000 Author: imp Date: Tue Dec 31 04:40:25 2013 New Revision: 260118 URL: http://svnweb.freebsd.org/changeset/base/260118 Log: Delete echoed doesn't rub out the previous character, so always use instead. This fixes hitting DELETE instead of BACKSPACE at mountroot> prompt. Modified: head/sys/kern/kern_cons.c Modified: head/sys/kern/kern_cons.c ============================================================================== --- head/sys/kern/kern_cons.c Tue Dec 31 01:11:03 2013 (r260117) +++ head/sys/kern/kern_cons.c Tue Dec 31 04:40:25 2013 (r260118) @@ -432,10 +432,8 @@ cngets(char *cp, size_t size, int visibl case '\b': case '\177': if (lp > cp) { - if (visible) { - cnputc(c); - cnputs(" \b"); - } + if (visible) + cnputs("\b \b"); lp--; } continue; From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 05:15:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B20CF10; Tue, 31 Dec 2013 05:15:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 15BB111DE; Tue, 31 Dec 2013 05:15:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBV5FUaU013176; Tue, 31 Dec 2013 05:15:30 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBV5FUmq013175; Tue, 31 Dec 2013 05:15:30 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201312310515.rBV5FUmq013175@svn.freebsd.org> From: Kevin Lo Date: Tue, 31 Dec 2013 05:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260119 - stable/9/sys/contrib/dev/run X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 05:15:30 -0000 Author: kevlo Date: Tue Dec 31 05:15:29 2013 New Revision: 260119 URL: http://svnweb.freebsd.org/changeset/base/260119 Log: MFC r256717: Update firmware for run(4) to version 0.33. Modified: stable/9/sys/contrib/dev/run/rt2870.fw.uu Directory Properties: stable/9/sys/contrib/dev/run/ (props changed) Modified: stable/9/sys/contrib/dev/run/rt2870.fw.uu ============================================================================== --- stable/9/sys/contrib/dev/run/rt2870.fw.uu Tue Dec 31 04:40:25 2013 (r260118) +++ stable/9/sys/contrib/dev/run/rt2870.fw.uu Tue Dec 31 05:15:29 2013 (r260119) @@ -42,191 +42,191 @@ # is RT3071. On each 4KB firmware, the last 2 bytes are CRC, 3rd last byte # is minor version number and 4th last byte is major version number. # This file comes with -# RT2870 v. 0.236 -# RT3071 v. 0.236 +# RT2870 v. 0.33 +# RT3071 v. 0.33 begin 644 rt2870.fw.uu -M____`A`H`A`R`A!]`A.[`A.\`A/;`A/@$A/<(@(8V@(:&@(5/`(4=S`%!B`- -M`Q(:_R*0`8S@,.,@Y5@PX!#E3##@!']`@`)_`)`0+^_PD`&,=`CPY)`!I_"0 -M`8S@,.`!4#_4ZY4>T"0CE.K0#`^3U -M1N5'M`H(Y3JT`0/D]4;D_:]6$@N1T@0BD'`1X/3_D'`0X%__D'`1X%4G3Y!P -M&/"0D`(I -M\#!'!*\G@`3E)_3_D`(H[_#E5O1P`P(3N@(3LY!P$.#^D'`1X/WM^.;U5_VO -M5A(+D9`$%'2`\.20#][?6"CH/@]5?] -MKU82"Y&0!!1T@/#DD'`3\.56]'`#`A.Z`A.SD!``X/57Y/58]5F0$`/@M"@% -M=5@!@#R0$`/@M#`%=5@"@#"0$`/@M#,%=5@$@"20$`/@M#4,D!`"X+1R!758 -M"(`1D!`#X+0U"I`0`N"TDP-U6!#E6##A&9`%".!$`?#]D`4%X%3[\$0$\.U4 -M_I`%"/#D]4[U3W4Z_W4\_ZU7KU82"Y'DD'`R\,(6]5SU6O5;D'`P\*/PD`04 -M=(#PY)!P$_#E5O1P`P(3NH!WD'`0X"3_DI/D_:]6$@N1D`04=(#PY)!P$_#E -M5O1@7X!6D'`0X"3_DDK2!:U7KU82"Y&0!!1T@/#DD'`3\.56]&`\@#.0#U7*U7KU82"Y&0!!1T@/"0<##E6O"CY5OPY/5:]5N00<"7@1`'P(B+E4W`:,&`)LDTP300%1L($Y4]%3F`(Y4\53W`"%4XB(L)" -MTR(P%#"0#_D'`9X/[O7I`"*?`P1P2O)X`$Y2?T -M_Y`"*._PPA0P%F#"KY`0!.#U5Y`"*.!4!?57Y5QD`7`AY5>0$`0PX`;@5/OP -M@`3@1`3PY50$`3@1`3PTJ\BPDO"3.5$$@J=%)D`%2<$%2,(%0,0%*T@%,U@ -M%-Z@```5*85(0X5*0H5,7N5'9`9@`P(5*8`;Y4C$5`_U0^5*Q%0/]4+E3,14 -M#_5>Y4=D!G!A4T,/@%R%24.%2T*%35[E1V0&<$V`&^5)Q%0/]4/E2\14#_5" -MY4W$5`_U7N5'9`9P,.5#5`]$$/5#@";E1V0$8`7E1[0%!D->!'5"">5'M`80 -MY4-4#T0P]4.`!M)+@`+23.3U)>5"Q%3P_^5#5`]/]5_28"+2%>5')/5@"R3+ -M8`PA7"K\($TJ\BPJ^0!!3@5`Y@!-(8@`CE3D5/)/^2 -M&-*OD`04X*+DDAET'O#E7U0/]2WE)7`3,!@%Y5\@Y0LP&1GE7U0P_[\P$>4E -M<`5U)0R``A4ETFS2;8`/Y5\PY@;";-)M@`32;,)MY4=D`W`A,$L&PFS2;8`8 -MY25P`S!,$<),Y25P!74E!X`"%272;-)MY4>T"13E1"#C"^4Z9`)@!>4ZM`,$ -MPFS2;>5'M`H3Y3JT`0;";-)M@`CE.G`$TFS";2!I!^5>(.`"LF@@:P?E7B#A -M`K)J(&T'Y5X@X@*R;'4N0"!I!*)H@"8P:`;E1J+B@!WE7B#@!'\!@`)_`.5& -M5/#^OO`$?@&``GX`[F\D_Y)SDG(@:P2B:H`F,&H&Y4:BXH`=Y5X@X01_`8`" -M?P#E1E3P_K[P!'X!@`)^`.YO)/^2=9)T(&T$HFR`)N5'9`IP(C!L!N5&HN.` -M%^4ZM`$&Y4:BXX`TY48@Y`,PY0/3@`'#@"8P;`;E1J+B@!WE7B#B!'\!@`)_ -M`.5&5/#^OO`$?@&``GX`[F\D_Y)QDG"0$`#@D!`L\)`0`^##E#!`%*)QDG>B -M<))VY2X3$U0_]2["=])VD!`OY2[PY4=D!G!'D`(HX#!'`_^``O3_CR>0`BG@ -M5/[PY4/$5`\48`PD_F`,)`-P$\(X@`_2.(`+Y48PX@/3@`'#DC@P1P6O)P(8 -MG^4G]/\"&)_E1V0'8`_E1V0(8`GE1V0)8`,"&`V0`BC@,$<#_X`"]/^/)Y`" -M*>!4_/#E.A1@(A1@)11@+23\8$DD^6`4)`YP4.5&$Q-4/W7P`X3E\"3_@#K2 -M.<(X@#[E1C#B`].`'<.`&N5&,.(-5#C#E#!0!GX`?P&`!'X`?P#N3R3_DCC" -M.8`3Y48PX@/3@`'#DCG".(`$PCC".3!'!*\G@`3E)_3_`AB?Y4=D#&`)Y4=D -M"V`#`ABDD`(HX#!'`_^``O3_CR>0`BG@5/WPY3H48"`48"$48"LD_&!%)/E@ -M$B0.<$KE1A,35#]U\`.$Y?"`*=(Y@#KE1C#B`].``<.2.8`MY48PX@U4.,.4 -M,%`&?@!_`8`$?@!_`.Y/)/^2.8`/Y48PX@/3@`'#DCF``L(Y,$<$KR>`!.4G -M]/^0`BCO\"+E1[0+$)`"*>!4Z_#E)U3K147U)R+DD`(I\#!'!*]%@`3E1?3_ -MD`(H[_`BCU#262*/5-)8(N3U8L*OY5$48$@48&8D`F`#`AG^TEEU50&0`J+@ -M5'_PH^`@YR.0!#3@M`(CX+0"$G\@$AC0D!`$X%3S\'51`0(9_N50 -M<`9U8@,"&?Z0$@#@5`-P$G\@$AC0D`*BX%2_\'51`@(9_N50<`,"&?F0`J/@ -M,.8#`AGUD`0WX&0B8`,"&?60`8IT?O"0`9;PD!($=`KPY5@PXQ7DD`4`\*-T -M"/"C=`'P=`/P?P$2#2J0$RC@D'`:\)`3*>"0!4\X`1X%3[\(`4Y3STD!,J8`C@ -M5/)%//"`!.!4^O"0!`'@5/WP=6(!=54"Y/51@`GE4'`%=6(#]5'E8F`5P@'D -M]5'"6:UBKT`2&LOE8K0#`M(#TJ\BPJ\P`1+DD`&6\/51PEG"`7T"KT`2&LOE -M4A1@#`1@`P(:R'52`755`Y`$`>!$#O#E6%088!Z03^=!0N]8+D-'#U@^"T_QET%"[U@N0T -M\)`0'.#U8I`0'N`@X?.0$!S@D'`H\)`0'>"0<"GPD!`> -MX)!P*O`P2@>0<"3@1`'PP@72KR(B(@`````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````````.SQ -M2O___P(0*`(0,@(0?0(3NP(3O`(3VP(3X!(3W"("&-H"&AH"%3P"%'"T"`9U3@%U3X20`D_Y)'(I`$!.`EX"1=]5>0T#`B0#T_Y!P$.!?_Y!P$>!5)T^0 -M#_D'`9X/[O7I`" -M*?`P1P2O)X`$Y2?T_Y`"*._PY5;T<`,"$[H"$[.0#][?CF]5?] -MKU82"ZJ0!!1T@/#DD'`3\.56]'`#`A.Z`A.SD'`0X/Z0WU@HZ#X/57 -M_:]6$@NJD`04=(#PY)!P$_#E5O1P`P(3N@(3LY`0`.#U5^3U6/59D!`#X+0H -M!758`8`\D!`#X+0P!758`H`PD!`#X+0S!758!(`DD!`#X+0U#)`0`N"T<@5U -M6`B`$9`0`^"T-0J0$`+@M),#=5@0Y5@PX1F0!0C@1`'P_9`%!>!4^_!$!/#M -M5/Z0!0CPY/5.]4]U.O]U//^M5Z]6$@NJY)!P,O#"%O5<]5KU6Y!P,/"C\)`$ -M%'2`\.200`BG@_Y!P&>#^[UZ0`BGP,$<$KR>`!.4G -M]/^0`BCO\,(4,!9@PJ^0$`3@]5>0`BC@5`7U5^5<9`%P(>57D!`$,.`&X%3[ -M\(`$X$0$\.57,.(Q!5OE6W`K!5J`)^57,.`;Y5R0$`1P!N!4^_"`!.!$!/`% -M6^5;<`L%6H`'D!`$X$0$\-*O(L)+PDSE1!(*MA29`!4G!!4C"!4#$!2M(!3- -M8!3>H```%2F%2$.%2D*%3%[E1V0&8`,"%2F`&^5(Q%0/]4/E2L14#_5"Y4S$ -M5`_U7N5'9`9P85-##X!Y4=D!G!-@!OE2<14#_5#Y4O$5`_U -M0N5-Q%0/]5[E1V0&<##E0U0/1!#U0X`FY4=D!&`%Y4>T!09#7@1U0@GE1[0& -M$.5#5`]$,/5#@`;22X`"TDSD]27E0L14\/_E0U0/3_5?TF`BTA7E1R3U8`LD -MRV`')$!P!L(5(A(8I1(57L(5PJ_"!-*O(L*OD`04X%0.8`32&(`(Y4Y%3R3_ -MDAC2KY`$%."BY)(9=![PY5]4#_4MY25P$S`8!>5?(.4+,!D9Y5]4,/^_,!'E -M)7`%=24,@`(5)=)LTFV`#^5?,.8&PFS2;8`$TFS";>5'9`-P(3!+!L)LTFV` -M&.4E<`,P3!'"3.4E<`5U)0>``A4ETFS2;>5'M`D4Y40@XPOE.F0"8`7E.K0# -M!,)LTFWE1[0*$^4ZM`$&PFS2;8`(Y3IP!-)LPFT@:0?E7B#@`K)H(&L'Y5X@ -MX0*R:B!M!^5>(.("LFQU+D`@:02B:(`F,&@&Y4:BXH`=Y5X@X`1_`8`"?P#E -M1E3P_K[P!'X!@`)^`.YO)/^25>(.$$?P&` -M`G\`Y494\/Z^\`1^`8`"?@#N;R3_DG62="!M!*)L@";E1V0*<"(P;`;E1J+C -M@!?E.K0!!N5&HN.`-.5&(.0#,.4#TX`!PX`F,&P&Y4:BXH`=Y5X@X@1_`8`" -M?P#E1E3P_K[P!'X!@`)^`.YO)/^2<9)PD!``X)`0+/"0$`/@PY0P0!2B<9)W -MHG"2=N4N$Q-4/_4NPG?2=I`0+^4N\.5'9`9P1Y`"*.`P1P/_@`+T_X\GD`(I -MX%3^\.5#Q%0/%&`,)/Y@#"0#0 -M`BG@5/SPY3H48"(48"448"TD_&!))/E@%"0.<%#E1A,35#]U\`.$Y?`D_X`Z -MTCG".(`^Y48PX@/3@!W#@!KE1C#B#50XPY0P4`9^`'\!@`1^`'\`[D\D_Y(X -MPCF`$^5&,.(#TX`!PY(YPCB`!,(XPCDP1P2O)X`$Y2?T_P(8G^5'9`Q@">5' -M9`M@`P(8I)`"*.`P1P/_@`+T_X\GD`(IX%3]\.4Z%&`@%&`A%&`K)/Q@123Y -M8!(D#G!*Y483$U0_=?`#A.7P@"G2.8`ZY48PX@/3@`'#DCF`+>5&,.(-5#C# -ME#!0!GX`?P&`!'X`?P#N3R3_DCF`#^5&,.(#TX`!PY(Y@`+".3!'!*\G@`3E -M)_3_D`(H[_`BY4>T"Q"0`BG@5.OPY2=4ZT5%]2!4^_"`%.4\])`3*F`( -MX%3R13SP@`3@5/KPD`0!X%3]\'5B`755`N3U48`)Y5!P!75B`_51Y6)@%<(! -MY/51PEFM8J]`$AK+Y6*T`P+2`]*O(L*O,`$2Y)`!EO#U4<)9P@%]`J]`$AK+ -MY5(48`P$8`,"&LAU4@%U50.0!`'@1`[PY5A4&&`>D'`:X)`3*/"0"0$!WPD'`JX)`0'O"0$!S@]6*0$![@(.'SD!`,B*0`8S@,.,@Y5@PX!#E3##@!']`@`)_`)`0+^_PD`&, +M=`CPY)`!I_"0`8S@,.`D'`2X/56D`0$X!(*G1#S,1#7-A$<4!%341%<4A%<4Q%<5!&= +M51'L5A*O9!)*91)U9A+;`A57(`(#,`,=?0*O5A(+D9`$%'2`\.20%5D'2`B*0!4#_4ZY4>T"0CE.K0#`^3U1N5'M`H(Y3JT`0/D]4;D_:]6$@N1T@0BD'`1 +MX/3_D'`0X%__D'`1X%4_3Y!P&/"0D`(I\#!'!*\_@`3E/_3_D`(H[_#E5O1P`P(57@(5 +M5Y!P$.`3DAO"'*U7KU82"Y&0!!1T@/`P&P+2!^200 +M3+'@D$R^\)!,N."03+_PY)!,L?"03+G@D$RX\*U7KU82"Y&0!!1T@/#DD'`3 +M\.56]'`#`A5>`A57D'`0X/4J=3T#=3X?Y/4OK5>O5A(+D9`$%'2`\.200$`#@]5?D]5CU69`0`^"T*`5U6`&`/)`0`^"T,`5U6`*` +M,)`0`^"T,P5U6`2`))`0`^"T-0R0$`+@M'(%=5@(@!&0$`/@M#4*D!`"X+23 +M`W58$.58,.$9D`4(X$0!\/V0!07@5/OP1`3P[53^D`4(\'4[&.3U)O4GPAS" +M&_5.]4]U.O]U//^M5Z]6$@N1D'`V=#?PHW0R\)`$`>!$`?#"%N3U7/5:]5N0 +M<##PH_#U*L(7D`04=(#PY)!P$_#E5O1P`P(57@(55Y!P$.`D_Y*3Y/VO5A(+ +MD9`$%'2`\.200$`#@D!`L\)`0+W1`\)!P$>!4?_57 +MX%2`D'`R\)!P$.#_Y5?3GT!#D'`SY5?PD'`0X/^0<#/@PY_3E`1`<^`D_/#@ +M_Y!P,N!/D`4`\.585`]@!'\7@`)_$9`%`>_PHW0!\'0#\/\2#2J`PY!P,^57 +M\)!P,^#_D'`0X,.?TY0$0#"0<#/@)`3PX/^0<#+@3Y`%`/#E6%0/8`1_%X`" +M?Q&0!0'O\*-T`?!T`_#_$@TJ@,"0_PHW0!\'0#\/\2#2J0$`#@D!`L\)`0+W1_\.3]KU82"Y&0!!1T@/#D +MD'`3\"*0O5A(+D9`$%'2`\.20O5A(+D9`$%'2`\)!P,.5:\*/E6_#D]5KU6Y!P$_#E5O1@ +M1(`[D'`1X"3_DA>00<"7@1`'P(B+E/D4]8`KE/A4^<`H5/8`&=3T# +M=3X?Y3Y%/6`#`A8.Y2IP`P(6#G2@)2_U@N0T3/6#X&!Z?WX2%S[O5/Y$`OU_ +M?A(7).4O?P`EX/[O)`#U@G1-/J^"D$RH\*/O\.3U5O57?W\2%SZ03*C@^J/@ +M)5?U@NHU5O6#[_`%5^57<`(%5L.4@.56E`%`V']^$A<^[T0#_7]^$A3U(8`,T@G2"M(+T@R``M,BPR*0!`+@1`CPA3F"A3B#Y3/P +MY3*C\)`$`N!4]_`B,!0PD'`9X%4__Y!P&.!/]3^0`BG@_Y!P&>#^[UZ0`BGP +M,$<$KS^`!.4_]/^0`BCO\,(4,!9@PJ^0$`3@]5>0`BC@5`7U5^5<9`%P(>57 +MD!`$,.`&X%3[\(`$X$0$\.57,.(Q!5OE6W`K!5J`)^57,.`;Y5R0$`1P!N!4 +M^_"`!.!$!/`%6^5;<`L%6H`'D!`$X$0$\-*O(I`0'.WPH^_PHW0*\)`0'.#U +M6)`0'N`@X?,BD!`=[_"C=`OPD!`X"#A\Z]8(L)+PDSE1!(*G1=Y +M`!@'!!@#"!?C$!>-(!>M8!>^H```&`F%2$.%2D*%3%[E1V0&8`,"&`F`&^5( +MQ%0/]4/E2L14#_5"Y4S$5`_U7N5'9`9P85-##X!Y4=D!G!- +M@!OE2<14#_5#Y4O$5`_U0N5-Q%0/]5[E1V0&<##E0U0/1!#U0X`FY4=D!&`% +MY4>T!09#7@1U0@GE1[0&$.5#5`]$,/5#@`;22X`"TDSD]27E0L14\/_E0U0/ +M3_5?TF`BTA7E1R3U8`LDRV`')$!P!L(5(A(;FA(8/L(5PJ_"!-*O(L*OD`04 +MX%0.8`32&(`(Y4Y%3R3_DAC2KY`$%."BY)(9=![PY5]4#_4MY25P$S`8!>5? +M(.4+,!D9Y5]4,/^_,!'E)7`%=24,@`(5)=)LTFV`#^5?,.8&PFS2;8`$TFS" +M;>5'9`-P(3!+!L)LTFV`&.4E<`,P3!'"3.4E<`5U)0>``A4ETFS2;>5'M`D4 +MY40@XPOE.F0"8`7E.K0#!,)LTFWE1[0*$^4ZM`$&PFS2;8`(Y3IP!-)LPFT@ +M:0?E7B#@`K)H(&L'Y5X@X0*R:B!M!^5>(.("LFQU+D`@:02B:(`F,&@&Y4:B +MXH`=Y5X@X`1_`8`"?P#E1E3P_K[P!'X!@`)^`.YO)/^25>(.$$?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG62="!M!*)L +M@";E1V0*<"(P;`;E1J+C@!?E.K0!!N5&HN.`-.5&(.0#,.4#TX`!PX`F,&P& +MY4:BXH`=Y5X@X@1_`8`"?P#E1E3P_K[P!'X!@`)^`.YO)/^2<9)PD!``X)`0 +M+/"0$`/@PY0P0!G@9#)@%*)QDG>B<))VY2X3$U0_]2["=])V,!<-4R[PY2Y% +M79`0+_"`!I`0+^4N\.5'9`9P1Y`"*.`P1P/_@`+T_X\_D`(IX%3^\.5#Q%0/ +M%&`,)/Y@#"0#5'9`M@`P(;F9`" +M*.`P1P/_@`+T_X\_D`(IX%3]\.4Z%&`@%&`A%&`K)/Q@123Y8!(D#G!*Y483 +M$U0_=?`#A.7P@"G2^8`ZY48PX@/3@`'#DOF`+>5&,.(-5#C#E#!0!GX`?P&` +M!'X`?P#N3R3_DOF`#^5&,.(#TX`!PY+Y@`+"^3!'!*\_@`3E/_3_D`(H[_`B +MY4>T"Q"0`BG@5.OPY3]4ZT5%]3\BY)`"*?`P1P2O18`$Y47T_Y`"*._P(H]0 +MTEDBCU326"+D]6+"K^51%&!+%&!L)`)@`P(!4_?!U8@%U50+D]5&`">50 +M<`5U8@/U4>5B8!7"`>3U4<)9K6*O0!(=J>5BM`,"T@/2KR+"KS`!$N20`9;P +M]5'"6<(!?0*O0!(=J>52%&`,!&`#`AVF=5(!=54#D`0!X$0.\.585!A@'I!P +M&N"0$RCPD'`;X)`3*?"C=`7PD'`BX)`3*_"`$9`3*.!$#_"CX$0/\*/@1`7P +MD!($=`/PY5@PXQ:0!0!T@/"C=`CPHW0!\'0#\'\!$@TJD`*BX$3`\)`0!.!$ +M#/#D]5+U53`""<("?0&O01(=J3`#`L(#Y)`!EO#2KR+O]&`MY/YT%"[U@N0T +MX"#A\Y`0'."0 +M<"CPD!`=X)!P*?"0$![@D'`J\#!*!Y!P).!$`?#"!=*O(B`<6GT%$A]SD$RP +M$A]DD$R[[_!]`Q(?_P?0D2'WZ03+?O\'T($A]^D$RV[_!] +M!Q(?F9!,M>_P?082'YF03+3O\.203+'PD$RYX)!,N/#2',('(GT!?[@2%R1_ +MN1(7/N]D`6`#`A]9TY!,L^"5)Y!,LN"5)D`1D$RQX`3PD$RXX&`:X!3P@!60 +M3+G@_Y!,N.##GU`(D$RYX)!,N/#D]2;U)WT%?[@2%R203+`2'XE]`G^X$AD'`1X/4\Y)!P +M$_"0!!1T@/#E5O1P`P(57@(55R`"`S`#'7T"KU82"ZJ0!!1T@/#DD'`3\.56 +M]'`#`A5>`A57A59!T@(BD'`0X%1__[\*#9!P$>"T"`9U3@%U3X20`D_Y)'(I`$!.`EX"1=]5>0 +M`A57Y4=D!V`=Y4=D"&`7Y4=D"6`1Y4=D"F`+Y4=D"V`%Y4>T#`B0 +M#T_Y!P$.!?_Y!P$>!5/T^0#_D'`9X/[O7I`"*?`P1P2O/X`$Y3_T_Y`"*._PY5;T<`,"%5X" +M%5>0`A57 +MD$RQX)!,OO"03+C@D$R_\.203+'PD$RYX)!,N/"M5Z]6$@NJD`04=(#PY)!P +M$_#E5O1P`P(57@(55Y!P$.#U*G4]`W4^'^3U+ZU7KU82"ZJ0!!1T@/#DD'`3 +M\.56]'`#`A5>`A57D!``X/57Y/58]5F0$`/@M"@%=5@!@#R0$`/@M#`%=5@" +M@#"0$`/@M#,%=5@$@"20$`/@M#4,D!`"X+1R!758"(`1D!`#X+0U"I`0`N"T +MDP-U6!#E6##A&9`%".!$`?#]D`4%X%3[\$0$\.U4_I`%"/!U.QCD]2;U)\(< +MPAOU3O5/=3K_=3S_K5>O5A(+JI!P-G0W\*-T,O"0!`'@1`'PPA;D]5SU6O5; +MD'`P\*/P]2K"%Y`$%'2`\.200`A57D!``X)`0+/"0$"]T0/"0` +M`G\1D`4![_"C=`'P=`/P_Q(-2(#`D'`0X/^0<#+@3Y`%`/#E6%0/8`1_%X`" +M?Q&0!0'O\*-T`?!T`_#_$@U(D!``X)`0+/"0$"]T?_#D_:]6$@NJD`04=(#P +MY)!P$_`BD'`0X"3_DDK2!:U7KU82"ZJ0!!1T@/#DD'`3\.56]&!Y@'"0#U7*U7KU82"ZJ0!!1T@/"0<##E6O"CY5OPY/5:]5N0`D_Y(7D'`0X/5=K5>O5A(+JI`$%'2`\#`7$Y`0`."0$"SPD!`O +MX%3P]5=%7?#DD'`3\.56]&`'D'`EX$0!\"(BY3Y%/6`*Y3X5/G`*%3V`!G4] +M`W4^'^4^13U@`P(6#N4J<`,"%@YTH"4O]8+D-$SU@^!@>G]^$A<^[U3^1`+] +M?WX2%R3E+W\`)>#^[R0`]8)T33ZO@I!,J/"C[_#D]5;U5W]_$A<^D$RHX/JC +MX"57]8+J-5;U@^_P!5?E5W`"!5;#E(#E5I0!0-A_?A(7/N]$`_U_?A(7)'2@ +M)2_U@N0T3/6#Y/`%+^4OM`@#Y/4OY3M@!!4[@`-U._[E.W`((`<%,!L"T@?E +M4W`:,&`)LDTP300%1L($Y4]%3F`(Y4\53W`"%4XB(N4Q).Y@#Q1@$!1@$B0$ +M!5/_^0D`(I +M\#!'!*\_@`3E/_3_D`(H[_#"%#`68,*OD!`$X/57D`(HX%0%]5?E7&0!<"'E +M5Y`0!##@!N!4^_"`!.!$!/#E5S#B,05;Y5MP*P5:@"?E5S#@&^5_PHW0+\)`0'.#U6)`0'N`@X?.O6"+"2\),Y402"K87 +M>0`8!P08`P@7XQ`7C2`7K6`7OJ```!@)A4A#A4I"A4Q>Y4=D!F`#`A@)@!OE +M2,14#_5#Y4K$5`_U0N5,Q%0/]5[E1V0&<&%30P^`7(5)0X5+0H5-7N5'9`9P +M38`;Y4G$5`_U0^5+Q%0/]4+E3<14#_5>Y4=D!G`PY4-4#T00]4.`)N5'9`1@ +M!>5'M`4&0UX$=4()Y4>T!A#E0U0/1##U0X`&TDN``M),Y/4EY4+$5/#_Y4-4 +M#T_U7])@(M(5Y4\.5?5`_U+>4E5?5##_OS`1Y25P!74E#(`"%272;-)M@`_E7S#F!L)LTFV`!-)L +MPFWE1V0#<"$P2P;";-)M@!CE)7`#,$P1PDSE)7`%=24'@`(5)=)LTFWE1[0) +M%.5$(.,+Y3ID`F`%Y3JT`P3";-)MY4>T"A/E.K0!!L)LTFV`".4Z<`32;,)M +M(&D'Y5X@X`*R:"!K!^5>(.$"LFH@;0?E7B#B`K)L=2Y`(&D$HFB`)C!H!N5& +MHN*`'>5>(.`$?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG.25>(.($?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG&2<)`0`."0 +M$"SPD!`#X,.4,$`9X&0R8!2B<9)WHG"2=N4N$Q-4/_4NPG?2=C`7#5,N\.4N +M15V0$"_P@`:0$"_E+O#E1V0&<$>0`BC@,$<#_X`"]/^//Y`"*>!4_O#E0\14 +M#Q1@#"3^8`PD`W`3POB`#]+X@`OE1C#B`].``<.2^#!'!:\_`AN4Y3_T_P(; +ME.5'9`=@#^5'9`A@">5'9`E@`P(;`I`"*.`P1P/_@`+T_X\_D`(IX%3\\.4Z +M%&`B%&`E%&`M)/Q@223Y8!0D#G!0Y483$U0_=?`#A.7P)/^`.M+YPOB`/N5& +M,.(#TX`=PX`:Y48PX@U4.,.4,%`&?@!_`8`$?@!_`.Y/)/^2^,+Y@!/E1C#B +M`].``<.2^<+X@`3"^,+Y,$<$KS^`!.4_]/\"&Y3E1V0,8`GE1V0+8`,"&YF0 +M`BC@,$<#_X`"]/^//Y`"*>!4_?#E.A1@(!1@(11@*R3\8$4D^6`2)`YP2N5& +M$Q-4/W7P`X3E\(`ITOF`.N5&,.(#TX`!PY+Y@"WE1C#B#50XPY0P4`9^`'\! +M@`1^`'\`[D\D_Y+Y@`_E1C#B`].``<.2^8`"PODP1P2O/X`$Y3_T_Y`"*._P +M(N5'M`L0D`(IX%3K\.4_5.M%1?4_(N20`BGP,$<$KT6`!.5%]/^0`BCO\"*/ +M4-)9(H]4TE@BY/5BPJ_E411@2Q1@;"0"8`,"'-S26755`9`"HN!4?_"CX"#G +M(Y`$-."T`ARCX+0"%Z/@M`(2?R`2&\60$`3@5//P=5$!`AS9`!BG1^\)`!EO"0$@1T"O"0$RC@D'`:\)`3*>"0!4\X`1 +MX%3[\(`4Y3STD!,J8`C@5/)%//"`!.!4^O"0!`'@5/WP=6(!=54"Y/51@`GE +M4'`%=6(#]5'E8F`5P@'D]5'"6:UBKT`2':GE8K0#`M(#TJ\BPJ\P`1+DD`&6 +M\/51PEG"`7T"KT`2':GE4A1@#`1@`P(=IG52`755`Y`$`>!$#O#E6%088!Z0 +M3^=!0N]8+D +M-'#U@^"T_QET%"[U@N0T\)`0'.#U8I`0'N`@X?.0$!S@ +MD'`H\)`0'>"0<"GPD!`>X)!P*O`P2@>0<"3@1`'PP@72KR(@'%I]!1(?"03+CPTAS"!R)]`7^X$A03++@E29`$9!,L>`$\)!,N.!@&N`4\(`5 +MD$RYX/^03+C@PY]0")!,N>"03+CPY/4F]2=]!7^X$A Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0F0619D; Tue, 31 Dec 2013 05: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8B4F611FF; Tue, 31 Dec 2013 05:20:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBV5KiR0016030; Tue, 31 Dec 2013 05:20:44 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBV5Ki8E016029; Tue, 31 Dec 2013 05:20:44 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201312310520.rBV5Ki8E016029@svn.freebsd.org> From: Kevin Lo Date: Tue, 31 Dec 2013 05:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260120 - stable/10/sys/contrib/dev/run X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 05:20:44 -0000 Author: kevlo Date: Tue Dec 31 05:20:44 2013 New Revision: 260120 URL: http://svnweb.freebsd.org/changeset/base/260120 Log: MFC r256717: Update firmware for run(4) to version 0.33. Modified: stable/10/sys/contrib/dev/run/rt2870.fw.uu Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/dev/run/rt2870.fw.uu ============================================================================== --- stable/10/sys/contrib/dev/run/rt2870.fw.uu Tue Dec 31 05:15:29 2013 (r260119) +++ stable/10/sys/contrib/dev/run/rt2870.fw.uu Tue Dec 31 05:20:44 2013 (r260120) @@ -42,191 +42,191 @@ # is RT3071. On each 4KB firmware, the last 2 bytes are CRC, 3rd last byte # is minor version number and 4th last byte is major version number. # This file comes with -# RT2870 v. 0.236 -# RT3071 v. 0.236 +# RT2870 v. 0.33 +# RT3071 v. 0.33 begin 644 rt2870.fw.uu -M____`A`H`A`R`A!]`A.[`A.\`A/;`A/@$A/<(@(8V@(:&@(5/`(4=S`%!B`- -M`Q(:_R*0`8S@,.,@Y5@PX!#E3##@!']`@`)_`)`0+^_PD`&,=`CPY)`!I_"0 -M`8S@,.`!4#_4ZY4>T"0CE.K0#`^3U -M1N5'M`H(Y3JT`0/D]4;D_:]6$@N1T@0BD'`1X/3_D'`0X%__D'`1X%4G3Y!P -M&/"0D`(I -M\#!'!*\G@`3E)_3_D`(H[_#E5O1P`P(3N@(3LY!P$.#^D'`1X/WM^.;U5_VO -M5A(+D9`$%'2`\.20#][?6"CH/@]5?] -MKU82"Y&0!!1T@/#DD'`3\.56]'`#`A.Z`A.SD!``X/57Y/58]5F0$`/@M"@% -M=5@!@#R0$`/@M#`%=5@"@#"0$`/@M#,%=5@$@"20$`/@M#4,D!`"X+1R!758 -M"(`1D!`#X+0U"I`0`N"TDP-U6!#E6##A&9`%".!$`?#]D`4%X%3[\$0$\.U4 -M_I`%"/#D]4[U3W4Z_W4\_ZU7KU82"Y'DD'`R\,(6]5SU6O5;D'`P\*/PD`04 -M=(#PY)!P$_#E5O1P`P(3NH!WD'`0X"3_DI/D_:]6$@N1D`04=(#PY)!P$_#E -M5O1@7X!6D'`0X"3_DDK2!:U7KU82"Y&0!!1T@/#DD'`3\.56]&`\@#.0#U7*U7KU82"Y&0!!1T@/"0<##E6O"CY5OPY/5:]5N00<"7@1`'P(B+E4W`:,&`)LDTP300%1L($Y4]%3F`(Y4\53W`"%4XB(L)" -MTR(P%#"0#_D'`9X/[O7I`"*?`P1P2O)X`$Y2?T -M_Y`"*._PPA0P%F#"KY`0!.#U5Y`"*.!4!?57Y5QD`7`AY5>0$`0PX`;@5/OP -M@`3@1`3PY50$`3@1`3PTJ\BPDO"3.5$$@J=%)D`%2<$%2,(%0,0%*T@%,U@ -M%-Z@```5*85(0X5*0H5,7N5'9`9@`P(5*8`;Y4C$5`_U0^5*Q%0/]4+E3,14 -M#_5>Y4=D!G!A4T,/@%R%24.%2T*%35[E1V0&<$V`&^5)Q%0/]4/E2\14#_5" -MY4W$5`_U7N5'9`9P,.5#5`]$$/5#@";E1V0$8`7E1[0%!D->!'5"">5'M`80 -MY4-4#T0P]4.`!M)+@`+23.3U)>5"Q%3P_^5#5`]/]5_28"+2%>5')/5@"R3+ -M8`PA7"K\($TJ\BPJ^0!!3@5`Y@!-(8@`CE3D5/)/^2 -M&-*OD`04X*+DDAET'O#E7U0/]2WE)7`3,!@%Y5\@Y0LP&1GE7U0P_[\P$>4E -M<`5U)0R``A4ETFS2;8`/Y5\PY@;";-)M@`32;,)MY4=D`W`A,$L&PFS2;8`8 -MY25P`S!,$<),Y25P!74E!X`"%272;-)MY4>T"13E1"#C"^4Z9`)@!>4ZM`,$ -MPFS2;>5'M`H3Y3JT`0;";-)M@`CE.G`$TFS";2!I!^5>(.`"LF@@:P?E7B#A -M`K)J(&T'Y5X@X@*R;'4N0"!I!*)H@"8P:`;E1J+B@!WE7B#@!'\!@`)_`.5& -M5/#^OO`$?@&``GX`[F\D_Y)SDG(@:P2B:H`F,&H&Y4:BXH`=Y5X@X01_`8`" -M?P#E1E3P_K[P!'X!@`)^`.YO)/^2=9)T(&T$HFR`)N5'9`IP(C!L!N5&HN.` -M%^4ZM`$&Y4:BXX`TY48@Y`,PY0/3@`'#@"8P;`;E1J+B@!WE7B#B!'\!@`)_ -M`.5&5/#^OO`$?@&``GX`[F\D_Y)QDG"0$`#@D!`L\)`0`^##E#!`%*)QDG>B -M<))VY2X3$U0_]2["=])VD!`OY2[PY4=D!G!'D`(HX#!'`_^``O3_CR>0`BG@ -M5/[PY4/$5`\48`PD_F`,)`-P$\(X@`_2.(`+Y48PX@/3@`'#DC@P1P6O)P(8 -MG^4G]/\"&)_E1V0'8`_E1V0(8`GE1V0)8`,"&`V0`BC@,$<#_X`"]/^/)Y`" -M*>!4_/#E.A1@(A1@)11@+23\8$DD^6`4)`YP4.5&$Q-4/W7P`X3E\"3_@#K2 -M.<(X@#[E1C#B`].`'<.`&N5&,.(-5#C#E#!0!GX`?P&`!'X`?P#N3R3_DCC" -M.8`3Y48PX@/3@`'#DCG".(`$PCC".3!'!*\G@`3E)_3_`AB?Y4=D#&`)Y4=D -M"V`#`ABDD`(HX#!'`_^``O3_CR>0`BG@5/WPY3H48"`48"$48"LD_&!%)/E@ -M$B0.<$KE1A,35#]U\`.$Y?"`*=(Y@#KE1C#B`].``<.2.8`MY48PX@U4.,.4 -M,%`&?@!_`8`$?@!_`.Y/)/^2.8`/Y48PX@/3@`'#DCF``L(Y,$<$KR>`!.4G -M]/^0`BCO\"+E1[0+$)`"*>!4Z_#E)U3K147U)R+DD`(I\#!'!*]%@`3E1?3_ -MD`(H[_`BCU#262*/5-)8(N3U8L*OY5$48$@48&8D`F`#`AG^TEEU50&0`J+@ -M5'_PH^`@YR.0!#3@M`(CX+0"$G\@$AC0D!`$X%3S\'51`0(9_N50 -M<`9U8@,"&?Z0$@#@5`-P$G\@$AC0D`*BX%2_\'51`@(9_N50<`,"&?F0`J/@ -M,.8#`AGUD`0WX&0B8`,"&?60`8IT?O"0`9;PD!($=`KPY5@PXQ7DD`4`\*-T -M"/"C=`'P=`/P?P$2#2J0$RC@D'`:\)`3*>"0!4\X`1X%3[\(`4Y3STD!,J8`C@ -M5/)%//"`!.!4^O"0!`'@5/WP=6(!=54"Y/51@`GE4'`%=6(#]5'E8F`5P@'D -M]5'"6:UBKT`2&LOE8K0#`M(#TJ\BPJ\P`1+DD`&6\/51PEG"`7T"KT`2&LOE -M4A1@#`1@`P(:R'52`755`Y`$`>!$#O#E6%088!Z03^=!0N]8+D-'#U@^"T_QET%"[U@N0T -M\)`0'.#U8I`0'N`@X?.0$!S@D'`H\)`0'>"0<"GPD!`> -MX)!P*O`P2@>0<"3@1`'PP@72KR(B(@`````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````````````````````.SQ -M2O___P(0*`(0,@(0?0(3NP(3O`(3VP(3X!(3W"("&-H"&AH"%3P"%'"T"`9U3@%U3X20`D_Y)'(I`$!.`EX"1=]5>0T#`B0#T_Y!P$.!?_Y!P$>!5)T^0 -M#_D'`9X/[O7I`" -M*?`P1P2O)X`$Y2?T_Y`"*._PY5;T<`,"$[H"$[.0#][?CF]5?] -MKU82"ZJ0!!1T@/#DD'`3\.56]'`#`A.Z`A.SD'`0X/Z0WU@HZ#X/57 -M_:]6$@NJD`04=(#PY)!P$_#E5O1P`P(3N@(3LY`0`.#U5^3U6/59D!`#X+0H -M!758`8`\D!`#X+0P!758`H`PD!`#X+0S!758!(`DD!`#X+0U#)`0`N"T<@5U -M6`B`$9`0`^"T-0J0$`+@M),#=5@0Y5@PX1F0!0C@1`'P_9`%!>!4^_!$!/#M -M5/Z0!0CPY/5.]4]U.O]U//^M5Z]6$@NJY)!P,O#"%O5<]5KU6Y!P,/"C\)`$ -M%'2`\.200`BG@_Y!P&>#^[UZ0`BGP,$<$KR>`!.4G -M]/^0`BCO\,(4,!9@PJ^0$`3@]5>0`BC@5`7U5^5<9`%P(>57D!`$,.`&X%3[ -M\(`$X$0$\.57,.(Q!5OE6W`K!5J`)^57,.`;Y5R0$`1P!N!4^_"`!.!$!/`% -M6^5;<`L%6H`'D!`$X$0$\-*O(L)+PDSE1!(*MA29`!4G!!4C"!4#$!2M(!3- -M8!3>H```%2F%2$.%2D*%3%[E1V0&8`,"%2F`&^5(Q%0/]4/E2L14#_5"Y4S$ -M5`_U7N5'9`9P85-##X!Y4=D!G!-@!OE2<14#_5#Y4O$5`_U -M0N5-Q%0/]5[E1V0&<##E0U0/1!#U0X`FY4=D!&`%Y4>T!09#7@1U0@GE1[0& -M$.5#5`]$,/5#@`;22X`"TDSD]27E0L14\/_E0U0/3_5?TF`BTA7E1R3U8`LD -MRV`')$!P!L(5(A(8I1(57L(5PJ_"!-*O(L*OD`04X%0.8`32&(`(Y4Y%3R3_ -MDAC2KY`$%."BY)(9=![PY5]4#_4MY25P$S`8!>5?(.4+,!D9Y5]4,/^_,!'E -M)7`%=24,@`(5)=)LTFV`#^5?,.8&PFS2;8`$TFS";>5'9`-P(3!+!L)LTFV` -M&.4E<`,P3!'"3.4E<`5U)0>``A4ETFS2;>5'M`D4Y40@XPOE.F0"8`7E.K0# -M!,)LTFWE1[0*$^4ZM`$&PFS2;8`(Y3IP!-)LPFT@:0?E7B#@`K)H(&L'Y5X@ -MX0*R:B!M!^5>(.("LFQU+D`@:02B:(`F,&@&Y4:BXH`=Y5X@X`1_`8`"?P#E -M1E3P_K[P!'X!@`)^`.YO)/^25>(.$$?P&` -M`G\`Y494\/Z^\`1^`8`"?@#N;R3_DG62="!M!*)L@";E1V0*<"(P;`;E1J+C -M@!?E.K0!!N5&HN.`-.5&(.0#,.4#TX`!PX`F,&P&Y4:BXH`=Y5X@X@1_`8`" -M?P#E1E3P_K[P!'X!@`)^`.YO)/^2<9)PD!``X)`0+/"0$`/@PY0P0!2B<9)W -MHG"2=N4N$Q-4/_4NPG?2=I`0+^4N\.5'9`9P1Y`"*.`P1P/_@`+T_X\GD`(I -MX%3^\.5#Q%0/%&`,)/Y@#"0#0 -M`BG@5/SPY3H48"(48"448"TD_&!))/E@%"0.<%#E1A,35#]U\`.$Y?`D_X`Z -MTCG".(`^Y48PX@/3@!W#@!KE1C#B#50XPY0P4`9^`'\!@`1^`'\`[D\D_Y(X -MPCF`$^5&,.(#TX`!PY(YPCB`!,(XPCDP1P2O)X`$Y2?T_P(8G^5'9`Q@">5' -M9`M@`P(8I)`"*.`P1P/_@`+T_X\GD`(IX%3]\.4Z%&`@%&`A%&`K)/Q@123Y -M8!(D#G!*Y483$U0_=?`#A.7P@"G2.8`ZY48PX@/3@`'#DCF`+>5&,.(-5#C# -ME#!0!GX`?P&`!'X`?P#N3R3_DCF`#^5&,.(#TX`!PY(Y@`+".3!'!*\G@`3E -M)_3_D`(H[_`BY4>T"Q"0`BG@5.OPY2=4ZT5%]2!4^_"`%.4\])`3*F`( -MX%3R13SP@`3@5/KPD`0!X%3]\'5B`755`N3U48`)Y5!P!75B`_51Y6)@%<(! -MY/51PEFM8J]`$AK+Y6*T`P+2`]*O(L*O,`$2Y)`!EO#U4<)9P@%]`J]`$AK+ -MY5(48`P$8`,"&LAU4@%U50.0!`'@1`[PY5A4&&`>D'`:X)`3*/"0"0$!WPD'`JX)`0'O"0$!S@]6*0$![@(.'SD!`,B*0`8S@,.,@Y5@PX!#E3##@!']`@`)_`)`0+^_PD`&, +M=`CPY)`!I_"0`8S@,.`D'`2X/56D`0$X!(*G1#S,1#7-A$<4!%341%<4A%<4Q%<5!&= +M51'L5A*O9!)*91)U9A+;`A57(`(#,`,=?0*O5A(+D9`$%'2`\.20%5D'2`B*0!4#_4ZY4>T"0CE.K0#`^3U1N5'M`H(Y3JT`0/D]4;D_:]6$@N1T@0BD'`1 +MX/3_D'`0X%__D'`1X%4_3Y!P&/"0D`(I\#!'!*\_@`3E/_3_D`(H[_#E5O1P`P(57@(5 +M5Y!P$.`3DAO"'*U7KU82"Y&0!!1T@/`P&P+2!^200 +M3+'@D$R^\)!,N."03+_PY)!,L?"03+G@D$RX\*U7KU82"Y&0!!1T@/#DD'`3 +M\.56]'`#`A5>`A57D'`0X/4J=3T#=3X?Y/4OK5>O5A(+D9`$%'2`\.200$`#@]5?D]5CU69`0`^"T*`5U6`&`/)`0`^"T,`5U6`*` +M,)`0`^"T,P5U6`2`))`0`^"T-0R0$`+@M'(%=5@(@!&0$`/@M#4*D!`"X+23 +M`W58$.58,.$9D`4(X$0!\/V0!07@5/OP1`3P[53^D`4(\'4[&.3U)O4GPAS" +M&_5.]4]U.O]U//^M5Z]6$@N1D'`V=#?PHW0R\)`$`>!$`?#"%N3U7/5:]5N0 +M<##PH_#U*L(7D`04=(#PY)!P$_#E5O1P`P(57@(55Y!P$.`D_Y*3Y/VO5A(+ +MD9`$%'2`\.200$`#@D!`L\)`0+W1`\)!P$>!4?_57 +MX%2`D'`R\)!P$.#_Y5?3GT!#D'`SY5?PD'`0X/^0<#/@PY_3E`1`<^`D_/#@ +M_Y!P,N!/D`4`\.585`]@!'\7@`)_$9`%`>_PHW0!\'0#\/\2#2J`PY!P,^57 +M\)!P,^#_D'`0X,.?TY0$0#"0<#/@)`3PX/^0<#+@3Y`%`/#E6%0/8`1_%X`" +M?Q&0!0'O\*-T`?!T`_#_$@TJ@,"0_PHW0!\'0#\/\2#2J0$`#@D!`L\)`0+W1_\.3]KU82"Y&0!!1T@/#D +MD'`3\"*0O5A(+D9`$%'2`\.20O5A(+D9`$%'2`\)!P,.5:\*/E6_#D]5KU6Y!P$_#E5O1@ +M1(`[D'`1X"3_DA>00<"7@1`'P(B+E/D4]8`KE/A4^<`H5/8`&=3T# +M=3X?Y3Y%/6`#`A8.Y2IP`P(6#G2@)2_U@N0T3/6#X&!Z?WX2%S[O5/Y$`OU_ +M?A(7).4O?P`EX/[O)`#U@G1-/J^"D$RH\*/O\.3U5O57?W\2%SZ03*C@^J/@ +M)5?U@NHU5O6#[_`%5^57<`(%5L.4@.56E`%`V']^$A<^[T0#_7]^$A3U(8`,T@G2"M(+T@R``M,BPR*0!`+@1`CPA3F"A3B#Y3/P +MY3*C\)`$`N!4]_`B,!0PD'`9X%4__Y!P&.!/]3^0`BG@_Y!P&>#^[UZ0`BGP +M,$<$KS^`!.4_]/^0`BCO\,(4,!9@PJ^0$`3@]5>0`BC@5`7U5^5<9`%P(>57 +MD!`$,.`&X%3[\(`$X$0$\.57,.(Q!5OE6W`K!5J`)^57,.`;Y5R0$`1P!N!4 +M^_"`!.!$!/`%6^5;<`L%6H`'D!`$X$0$\-*O(I`0'.WPH^_PHW0*\)`0'.#U +M6)`0'N`@X?,BD!`=[_"C=`OPD!`X"#A\Z]8(L)+PDSE1!(*G1=Y +M`!@'!!@#"!?C$!>-(!>M8!>^H```&`F%2$.%2D*%3%[E1V0&8`,"&`F`&^5( +MQ%0/]4/E2L14#_5"Y4S$5`_U7N5'9`9P85-##X!Y4=D!G!- +M@!OE2<14#_5#Y4O$5`_U0N5-Q%0/]5[E1V0&<##E0U0/1!#U0X`FY4=D!&`% +MY4>T!09#7@1U0@GE1[0&$.5#5`]$,/5#@`;22X`"TDSD]27E0L14\/_E0U0/ +M3_5?TF`BTA7E1R3U8`LDRV`')$!P!L(5(A(;FA(8/L(5PJ_"!-*O(L*OD`04 +MX%0.8`32&(`(Y4Y%3R3_DAC2KY`$%."BY)(9=![PY5]4#_4MY25P$S`8!>5? +M(.4+,!D9Y5]4,/^_,!'E)7`%=24,@`(5)=)LTFV`#^5?,.8&PFS2;8`$TFS" +M;>5'9`-P(3!+!L)LTFV`&.4E<`,P3!'"3.4E<`5U)0>``A4ETFS2;>5'M`D4 +MY40@XPOE.F0"8`7E.K0#!,)LTFWE1[0*$^4ZM`$&PFS2;8`(Y3IP!-)LPFT@ +M:0?E7B#@`K)H(&L'Y5X@X0*R:B!M!^5>(.("LFQU+D`@:02B:(`F,&@&Y4:B +MXH`=Y5X@X`1_`8`"?P#E1E3P_K[P!'X!@`)^`.YO)/^25>(.$$?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG62="!M!*)L +M@";E1V0*<"(P;`;E1J+C@!?E.K0!!N5&HN.`-.5&(.0#,.4#TX`!PX`F,&P& +MY4:BXH`=Y5X@X@1_`8`"?P#E1E3P_K[P!'X!@`)^`.YO)/^2<9)PD!``X)`0 +M+/"0$`/@PY0P0!G@9#)@%*)QDG>B<))VY2X3$U0_]2["=])V,!<-4R[PY2Y% +M79`0+_"`!I`0+^4N\.5'9`9P1Y`"*.`P1P/_@`+T_X\_D`(IX%3^\.5#Q%0/ +M%&`,)/Y@#"0#5'9`M@`P(;F9`" +M*.`P1P/_@`+T_X\_D`(IX%3]\.4Z%&`@%&`A%&`K)/Q@123Y8!(D#G!*Y483 +M$U0_=?`#A.7P@"G2^8`ZY48PX@/3@`'#DOF`+>5&,.(-5#C#E#!0!GX`?P&` +M!'X`?P#N3R3_DOF`#^5&,.(#TX`!PY+Y@`+"^3!'!*\_@`3E/_3_D`(H[_`B +MY4>T"Q"0`BG@5.OPY3]4ZT5%]3\BY)`"*?`P1P2O18`$Y47T_Y`"*._P(H]0 +MTEDBCU326"+D]6+"K^51%&!+%&!L)`)@`P(!4_?!U8@%U50+D]5&`">50 +M<`5U8@/U4>5B8!7"`>3U4<)9K6*O0!(=J>5BM`,"T@/2KR+"KS`!$N20`9;P +M]5'"6<(!?0*O0!(=J>52%&`,!&`#`AVF=5(!=54#D`0!X$0.\.585!A@'I!P +M&N"0$RCPD'`;X)`3*?"C=`7PD'`BX)`3*_"`$9`3*.!$#_"CX$0/\*/@1`7P +MD!($=`/PY5@PXQ:0!0!T@/"C=`CPHW0!\'0#\'\!$@TJD`*BX$3`\)`0!.!$ +M#/#D]5+U53`""<("?0&O01(=J3`#`L(#Y)`!EO#2KR+O]&`MY/YT%"[U@N0T +MX"#A\Y`0'."0 +M<"CPD!`=X)!P*?"0$![@D'`J\#!*!Y!P).!$`?#"!=*O(B`<6GT%$A]SD$RP +M$A]DD$R[[_!]`Q(?_P?0D2'WZ03+?O\'T($A]^D$RV[_!] +M!Q(?F9!,M>_P?082'YF03+3O\.203+'PD$RYX)!,N/#2',('(GT!?[@2%R1_ +MN1(7/N]D`6`#`A]9TY!,L^"5)Y!,LN"5)D`1D$RQX`3PD$RXX&`:X!3P@!60 +M3+G@_Y!,N.##GU`(D$RYX)!,N/#D]2;U)WT%?[@2%R203+`2'XE]`G^X$AD'`1X/4\Y)!P +M$_"0!!1T@/#E5O1P`P(57@(55R`"`S`#'7T"KU82"ZJ0!!1T@/#DD'`3\.56 +M]'`#`A5>`A57A59!T@(BD'`0X%1__[\*#9!P$>"T"`9U3@%U3X20`D_Y)'(I`$!.`EX"1=]5>0 +M`A57Y4=D!V`=Y4=D"&`7Y4=D"6`1Y4=D"F`+Y4=D"V`%Y4>T#`B0 +M#T_Y!P$.!?_Y!P$>!5/T^0#_D'`9X/[O7I`"*?`P1P2O/X`$Y3_T_Y`"*._PY5;T<`,"%5X" +M%5>0`A57 +MD$RQX)!,OO"03+C@D$R_\.203+'PD$RYX)!,N/"M5Z]6$@NJD`04=(#PY)!P +M$_#E5O1P`P(57@(55Y!P$.#U*G4]`W4^'^3U+ZU7KU82"ZJ0!!1T@/#DD'`3 +M\.56]'`#`A5>`A57D!``X/57Y/58]5F0$`/@M"@%=5@!@#R0$`/@M#`%=5@" +M@#"0$`/@M#,%=5@$@"20$`/@M#4,D!`"X+1R!758"(`1D!`#X+0U"I`0`N"T +MDP-U6!#E6##A&9`%".!$`?#]D`4%X%3[\$0$\.U4_I`%"/!U.QCD]2;U)\(< +MPAOU3O5/=3K_=3S_K5>O5A(+JI!P-G0W\*-T,O"0!`'@1`'PPA;D]5SU6O5; +MD'`P\*/P]2K"%Y`$%'2`\.200`A57D!``X)`0+/"0$"]T0/"0` +M`G\1D`4![_"C=`'P=`/P_Q(-2(#`D'`0X/^0<#+@3Y`%`/#E6%0/8`1_%X`" +M?Q&0!0'O\*-T`?!T`_#_$@U(D!``X)`0+/"0$"]T?_#D_:]6$@NJD`04=(#P +MY)!P$_`BD'`0X"3_DDK2!:U7KU82"ZJ0!!1T@/#DD'`3\.56]&!Y@'"0#U7*U7KU82"ZJ0!!1T@/"0<##E6O"CY5OPY/5:]5N0`D_Y(7D'`0X/5=K5>O5A(+JI`$%'2`\#`7$Y`0`."0$"SPD!`O +MX%3P]5=%7?#DD'`3\.56]&`'D'`EX$0!\"(BY3Y%/6`*Y3X5/G`*%3V`!G4] +M`W4^'^4^13U@`P(6#N4J<`,"%@YTH"4O]8+D-$SU@^!@>G]^$A<^[U3^1`+] +M?WX2%R3E+W\`)>#^[R0`]8)T33ZO@I!,J/"C[_#D]5;U5W]_$A<^D$RHX/JC +MX"57]8+J-5;U@^_P!5?E5W`"!5;#E(#E5I0!0-A_?A(7/N]$`_U_?A(7)'2@ +M)2_U@N0T3/6#Y/`%+^4OM`@#Y/4OY3M@!!4[@`-U._[E.W`((`<%,!L"T@?E +M4W`:,&`)LDTP300%1L($Y4]%3F`(Y4\53W`"%4XB(N4Q).Y@#Q1@$!1@$B0$ +M!5/_^0D`(I +M\#!'!*\_@`3E/_3_D`(H[_#"%#`68,*OD!`$X/57D`(HX%0%]5?E7&0!<"'E +M5Y`0!##@!N!4^_"`!.!$!/#E5S#B,05;Y5MP*P5:@"?E5S#@&^5_PHW0+\)`0'.#U6)`0'N`@X?.O6"+"2\),Y402"K87 +M>0`8!P08`P@7XQ`7C2`7K6`7OJ```!@)A4A#A4I"A4Q>Y4=D!F`#`A@)@!OE +M2,14#_5#Y4K$5`_U0N5,Q%0/]5[E1V0&<&%30P^`7(5)0X5+0H5-7N5'9`9P +M38`;Y4G$5`_U0^5+Q%0/]4+E3<14#_5>Y4=D!G`PY4-4#T00]4.`)N5'9`1@ +M!>5'M`4&0UX$=4()Y4>T!A#E0U0/1##U0X`&TDN``M),Y/4EY4+$5/#_Y4-4 +M#T_U7])@(M(5Y4\.5?5`_U+>4E5?5##_OS`1Y25P!74E#(`"%272;-)M@`_E7S#F!L)LTFV`!-)L +MPFWE1V0#<"$P2P;";-)M@!CE)7`#,$P1PDSE)7`%=24'@`(5)=)LTFWE1[0) +M%.5$(.,+Y3ID`F`%Y3JT`P3";-)MY4>T"A/E.K0!!L)LTFV`".4Z<`32;,)M +M(&D'Y5X@X`*R:"!K!^5>(.$"LFH@;0?E7B#B`K)L=2Y`(&D$HFB`)C!H!N5& +MHN*`'>5>(.`$?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG.25>(.($?P&``G\`Y494\/Z^\`1^`8`"?@#N;R3_DG&2<)`0`."0 +M$"SPD!`#X,.4,$`9X&0R8!2B<9)WHG"2=N4N$Q-4/_4NPG?2=C`7#5,N\.4N +M15V0$"_P@`:0$"_E+O#E1V0&<$>0`BC@,$<#_X`"]/^//Y`"*>!4_O#E0\14 +M#Q1@#"3^8`PD`W`3POB`#]+X@`OE1C#B`].``<.2^#!'!:\_`AN4Y3_T_P(; +ME.5'9`=@#^5'9`A@">5'9`E@`P(;`I`"*.`P1P/_@`+T_X\_D`(IX%3\\.4Z +M%&`B%&`E%&`M)/Q@223Y8!0D#G!0Y483$U0_=?`#A.7P)/^`.M+YPOB`/N5& +M,.(#TX`=PX`:Y48PX@U4.,.4,%`&?@!_`8`$?@!_`.Y/)/^2^,+Y@!/E1C#B +M`].``<.2^<+X@`3"^,+Y,$<$KS^`!.4_]/\"&Y3E1V0,8`GE1V0+8`,"&YF0 +M`BC@,$<#_X`"]/^//Y`"*>!4_?#E.A1@(!1@(11@*R3\8$4D^6`2)`YP2N5& +M$Q-4/W7P`X3E\(`ITOF`.N5&,.(#TX`!PY+Y@"WE1C#B#50XPY0P4`9^`'\! +M@`1^`'\`[D\D_Y+Y@`_E1C#B`].``<.2^8`"PODP1P2O/X`$Y3_T_Y`"*._P +M(N5'M`L0D`(IX%3K\.4_5.M%1?4_(N20`BGP,$<$KT6`!.5%]/^0`BCO\"*/ +M4-)9(H]4TE@BY/5BPJ_E411@2Q1@;"0"8`,"'-S26755`9`"HN!4?_"CX"#G +M(Y`$-."T`ARCX+0"%Z/@M`(2?R`2&\60$`3@5//P=5$!`AS9`!BG1^\)`!EO"0$@1T"O"0$RC@D'`:\)`3*>"0!4\X`1 +MX%3[\(`4Y3STD!,J8`C@5/)%//"`!.!4^O"0!`'@5/WP=6(!=54"Y/51@`GE +M4'`%=6(#]5'E8F`5P@'D]5'"6:UBKT`2':GE8K0#`M(#TJ\BPJ\P`1+DD`&6 +M\/51PEG"`7T"KT`2':GE4A1@#`1@`P(=IG52`755`Y`$`>!$#O#E6%088!Z0 +M3^=!0N]8+D +M-'#U@^"T_QET%"[U@N0T\)`0'.#U8I`0'N`@X?.0$!S@ +MD'`H\)`0'>"0<"GPD!`>X)!P*O`P2@>0<"3@1`'PP@72KR(@'%I]!1(?"03+CPTAS"!R)]`7^X$A03++@E29`$9!,L>`$\)!,N.!@&N`4\(`5 +MD$RYX/^03+C@PY]0")!,N>"03+CPY/4F]2=]!7^X$A Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1281BD6A; Tue, 31 Dec 2013 07:36:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F20331A3B; Tue, 31 Dec 2013 07:36:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBV7adxl066812; Tue, 31 Dec 2013 07:36:39 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBV7adgx066811; Tue, 31 Dec 2013 07:36:39 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312310736.rBV7adgx066811@svn.freebsd.org> From: Warner Losh Date: Tue, 31 Dec 2013 07:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260121 - head/sys/dev/nand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 07:36:40 -0000 Author: imp Date: Tue Dec 31 07:36:39 2013 New Revision: 260121 URL: http://svnweb.freebsd.org/changeset/base/260121 Log: Add support for Samsung K9F2G08U0A (256MiB SLC) NAND found on some old Atmel boards I have. # All Samsung, Toshiba and SanDisk parts will need to be in this table # since they don't conform to the ONFI specification (they are all Toggle # parts). There's some standards for the additional bytes so there's some hope # to decode them automatically on a per-vendor basis, but even that has # problems (and is what motivated the ONFI parameter page). Modified: head/sys/dev/nand/nand_id.c Modified: head/sys/dev/nand/nand_id.c ============================================================================== --- head/sys/dev/nand/nand_id.c Tue Dec 31 05:20:44 2013 (r260120) +++ head/sys/dev/nand/nand_id.c Tue Dec 31 07:36:39 2013 (r260121) @@ -39,6 +39,8 @@ struct nand_params nand_ids[] = { 0x400, 0x800, 0x40, 0x40, 0 }, { { NAND_MAN_SAMSUNG, 0xdc }, "Samsung NAND 512MiB 3,3V 8-bit", 0x200, 0x800, 0x40, 0x40, 0 }, + { { NAND_MAN_SAMSUNG, 0xda }, "Samsung NAND 256MiB 3,3V 8-bit", + 0x100, 0x800, 0x40, 0x40, 0 }, { { NAND_MAN_HYNIX, 0x76 }, "Hynix NAND 64MiB 3,3V 8-bit", 0x40, 0x200, 0x10, 0x20, 0 }, { { NAND_MAN_HYNIX, 0xdc }, "Hynix NAND 512MiB 3,3V 8-bit", From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 08:02:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 923C04F9; Tue, 31 Dec 2013 08:02:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7EC1CDA; Tue, 31 Dec 2013 08:02:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBV82ZFP077851; Tue, 31 Dec 2013 08:02:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBV82Zf3077850; Tue, 31 Dec 2013 08:02:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312310802.rBV82Zf3077850@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 31 Dec 2013 08:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r260122 - releng/10.0/sys/vm X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 08:02:35 -0000 Author: kib Date: Tue Dec 31 08:02:34 2013 New Revision: 260122 URL: http://svnweb.freebsd.org/changeset/base/260122 Log: MFC r259951: Do not coalesce stack entry. Pass MAP_STACK_GROWS_DOWN and MAP_STACK_GROWS_UP flags to vm_map_insert() from vm_map_stack() Approved by: re (delphij) Modified: releng/10.0/sys/vm/vm_map.c Directory Properties: releng/10.0/ (props changed) Modified: releng/10.0/sys/vm/vm_map.c ============================================================================== --- releng/10.0/sys/vm/vm_map.c Tue Dec 31 07:36:39 2013 (r260121) +++ releng/10.0/sys/vm/vm_map.c Tue Dec 31 08:02:34 2013 (r260122) @@ -1207,6 +1207,7 @@ charged: } else if ((prev_entry != &map->header) && (prev_entry->eflags == protoeflags) && + (cow & (MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) == 0 && (prev_entry->end == start) && (prev_entry->wired_count == 0) && (prev_entry->cred == cred || @@ -3316,7 +3317,6 @@ vm_map_stack(vm_map_t map, vm_offset_t a * NOTE: We explicitly allow bi-directional stacks. */ orient = cow & (MAP_STACK_GROWS_DOWN|MAP_STACK_GROWS_UP); - cow &= ~orient; KASSERT(orient != 0, ("No stack grow direction")); if (addrbos < vm_map_min(map) || From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 12:11:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8CCB5EF; Tue, 31 Dec 2013 12:11:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C522A1CCF; Tue, 31 Dec 2013 12:11:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVCBmjZ076420; Tue, 31 Dec 2013 12:11:48 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVCBmrm076419; Tue, 31 Dec 2013 12:11:48 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201312311211.rBVCBmrm076419@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Tue, 31 Dec 2013 12:11:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260124 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 12:11:48 -0000 Author: melifaro Date: Tue Dec 31 12:11:48 2013 New Revision: 260124 URL: http://svnweb.freebsd.org/changeset/base/260124 Log: Explicitly free rt_tables to please Coverity. Reported by: Coverity Coverity CID: 1147174 MFC after: 2 weeks Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Tue Dec 31 11:54:37 2013 (r260123) +++ head/usr.bin/netstat/route.c Tue Dec 31 12:11:48 2013 (r260124) @@ -426,7 +426,7 @@ p_rtable_kvm(int fibnum, int af) if (kread((u_long)(rtree), (char *)(rt_tables) + fibnum * af_size, af_size) != 0) - return; + err(EX_OSERR, "error retrieving radix pointers"); for (fam = 0; fam <= AF_MAX; fam++) { int tmpfib; @@ -462,6 +462,8 @@ p_rtable_kvm(int fibnum, int af) p_rtree_kvm(head.rnh_treetop); } } + + free(rt_tables); } /* From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 12:18:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53C7B759; Tue, 31 Dec 2013 12:18:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 406B71CEF; Tue, 31 Dec 2013 12:18:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVCIBdQ077263; Tue, 31 Dec 2013 12:18:11 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVCIACe077258; Tue, 31 Dec 2013 12:18:10 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312311218.rBVCIACe077258@svn.freebsd.org> From: Glen Barber Date: Tue, 31 Dec 2013 12:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260125 - in 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 12:18:11 -0000 Author: gjb Date: Tue Dec 31 12:18:10 2013 New Revision: 260125 URL: http://svnweb.freebsd.org/changeset/base/260125 Log: Bump copyright year. Happy New Year 2014! Sponsored by: The FreeBSD Foundation Modified: head/COPYRIGHT head/sys/sys/copyright.h Modified: head/COPYRIGHT ============================================================================== --- head/COPYRIGHT Tue Dec 31 12:11:48 2013 (r260124) +++ head/COPYRIGHT Tue Dec 31 12:18:10 2013 (r260125) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2013 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2014 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: head/sys/sys/copyright.h ============================================================================== --- head/sys/sys/copyright.h Tue Dec 31 12:11:48 2013 (r260124) +++ head/sys/sys/copyright.h Tue Dec 31 12:18:10 2013 (r260125) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2013 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2014 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2013 The FreeBSD Project.\n" + "Copyright (c) 1992-2014 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 12:24:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43C048FE; Tue, 31 Dec 2013 12: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2FBC01D71; Tue, 31 Dec 2013 12:24:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVCOdiS080586; Tue, 31 Dec 2013 12:24:39 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVCOc75080584; Tue, 31 Dec 2013 12:24:38 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312311224.rBVCOc75080584@svn.freebsd.org> From: Glen Barber Date: Tue, 31 Dec 2013 12:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260126 - in stable/10: . sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 12:24:39 -0000 Author: gjb Date: Tue Dec 31 12:24:38 2013 New Revision: 260126 URL: http://svnweb.freebsd.org/changeset/base/260126 Log: MFC r260125: Bump copyright year. Happy New Year 2014! Sponsored by: The FreeBSD Foundation Modified: stable/10/COPYRIGHT stable/10/sys/sys/copyright.h Directory Properties: stable/10/ (props changed) Modified: stable/10/COPYRIGHT ============================================================================== --- stable/10/COPYRIGHT Tue Dec 31 12:18:10 2013 (r260125) +++ stable/10/COPYRIGHT Tue Dec 31 12:24:38 2013 (r260126) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2013 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2014 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/10/sys/sys/copyright.h ============================================================================== --- stable/10/sys/sys/copyright.h Tue Dec 31 12:18:10 2013 (r260125) +++ stable/10/sys/sys/copyright.h Tue Dec 31 12:24:38 2013 (r260126) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2013 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2014 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2013 The FreeBSD Project.\n" + "Copyright (c) 1992-2014 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 12:24:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46E24A28; Tue, 31 Dec 2013 12:24:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 335E91D72; Tue, 31 Dec 2013 12:24:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVCOqje080642; Tue, 31 Dec 2013 12:24:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVCOpnF080640; Tue, 31 Dec 2013 12:24:51 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312311224.rBVCOpnF080640@svn.freebsd.org> From: Glen Barber Date: Tue, 31 Dec 2013 12:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260127 - in stable/9: . sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 12:24:52 -0000 Author: gjb Date: Tue Dec 31 12:24:51 2013 New Revision: 260127 URL: http://svnweb.freebsd.org/changeset/base/260127 Log: MFC r260125: Bump copyright year. Happy New Year 2014! Sponsored by: The FreeBSD Foundation Modified: stable/9/COPYRIGHT (contents, props changed) stable/9/sys/sys/copyright.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/COPYRIGHT ============================================================================== --- stable/9/COPYRIGHT Tue Dec 31 12:24:38 2013 (r260126) +++ stable/9/COPYRIGHT Tue Dec 31 12:24:51 2013 (r260127) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2013 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2014 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/9/sys/sys/copyright.h ============================================================================== --- stable/9/sys/sys/copyright.h Tue Dec 31 12:24:38 2013 (r260126) +++ stable/9/sys/sys/copyright.h Tue Dec 31 12:24:51 2013 (r260127) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2013 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2014 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2013 The FreeBSD Project.\n" + "Copyright (c) 1992-2014 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 12:25:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 548D1B5E; Tue, 31 Dec 2013 12: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4153B1D79; Tue, 31 Dec 2013 12:25:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVCP5lw080757; Tue, 31 Dec 2013 12:25:05 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVCP49X080754; Tue, 31 Dec 2013 12:25:04 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312311225.rBVCP49X080754@svn.freebsd.org> From: Glen Barber Date: Tue, 31 Dec 2013 12:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r260128 - in stable/8: . sys/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 12:25:05 -0000 Author: gjb Date: Tue Dec 31 12:25:04 2013 New Revision: 260128 URL: http://svnweb.freebsd.org/changeset/base/260128 Log: MFC r260125: Bump copyright year. Happy New Year 2014! Sponsored by: The FreeBSD Foundation Modified: stable/8/COPYRIGHT (contents, props changed) stable/8/sys/sys/copyright.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/COPYRIGHT ============================================================================== --- stable/8/COPYRIGHT Tue Dec 31 12:24:51 2013 (r260127) +++ stable/8/COPYRIGHT Tue Dec 31 12:25:04 2013 (r260128) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2013 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2014 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/8/sys/sys/copyright.h ============================================================================== --- stable/8/sys/sys/copyright.h Tue Dec 31 12:24:51 2013 (r260127) +++ stable/8/sys/sys/copyright.h Tue Dec 31 12:25:04 2013 (r260128) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2013 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2014 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2013 The FreeBSD Project.\n" + "Copyright (c) 1992-2014 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 12:27:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D92BFE1C; Tue, 31 Dec 2013 12:27:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C5A8C1D97; Tue, 31 Dec 2013 12:27:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVCRMkv081142; Tue, 31 Dec 2013 12:27:22 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVCRMGv081140; Tue, 31 Dec 2013 12:27:22 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312311227.rBVCRMGv081140@svn.freebsd.org> From: Glen Barber Date: Tue, 31 Dec 2013 12:27:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r260129 - in releng/10.0: . sys/sys X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 12:27:22 -0000 Author: gjb Date: Tue Dec 31 12:27:22 2013 New Revision: 260129 URL: http://svnweb.freebsd.org/changeset/base/260129 Log: MFC r260125: Bump copyright year. Happy New Year 2014! Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.0/COPYRIGHT releng/10.0/sys/sys/copyright.h Directory Properties: releng/10.0/ (props changed) Modified: releng/10.0/COPYRIGHT ============================================================================== --- releng/10.0/COPYRIGHT Tue Dec 31 12:25:04 2013 (r260128) +++ releng/10.0/COPYRIGHT Tue Dec 31 12:27:22 2013 (r260129) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2013 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2014 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: releng/10.0/sys/sys/copyright.h ============================================================================== --- releng/10.0/sys/sys/copyright.h Tue Dec 31 12:25:04 2013 (r260128) +++ releng/10.0/sys/sys/copyright.h Tue Dec 31 12:27:22 2013 (r260129) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2013 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2014 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2013 The FreeBSD Project.\n" + "Copyright (c) 1992-2014 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 12:36:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DCFE24A; Tue, 31 Dec 2013 12:36: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2AD751E2C; Tue, 31 Dec 2013 12:36:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVCalZ3084929; Tue, 31 Dec 2013 12:36:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVCal4l084928; Tue, 31 Dec 2013 12:36:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312311236.rBVCal4l084928@svn.freebsd.org> From: Glen Barber Date: Tue, 31 Dec 2013 12:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r260130 - releng/10.0/sys/conf X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 12:36:47 -0000 Author: gjb Date: Tue Dec 31 12:36:46 2013 New Revision: 260130 URL: http://svnweb.freebsd.org/changeset/base/260130 Log: Update releng/10.0/ to -RC4 as part of the 10.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.0/sys/conf/newvers.sh Modified: releng/10.0/sys/conf/newvers.sh ============================================================================== --- releng/10.0/sys/conf/newvers.sh Tue Dec 31 12:27:22 2013 (r260129) +++ releng/10.0/sys/conf/newvers.sh Tue Dec 31 12:36:46 2013 (r260130) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="RC3" +BRANCH="RC4" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 15:37:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06D0AABF; Tue, 31 Dec 2013 15:37:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC0721A7D; Tue, 31 Dec 2013 15:37:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVFbqXX056585; Tue, 31 Dec 2013 15:37:52 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVFbqND056581; Tue, 31 Dec 2013 15:37:52 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312311537.rBVFbqND056581@svn.freebsd.org> From: Mark Johnston Date: Tue, 31 Dec 2013 15:37:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260131 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace contrib/opensolaris/uts/common/sys dev/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 15:37:53 -0000 Author: markj Date: Tue Dec 31 15:37:51 2013 New Revision: 260131 URL: http://svnweb.freebsd.org/changeset/base/260131 Log: Revert r260091. The vmem calls seem to be slower than the *_unr() calls that they replaced, which is important considering that probe IDs are allocated during process startup for USDT probes. Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h head/sys/cddl/dev/dtrace/dtrace_load.c head/sys/cddl/dev/dtrace/dtrace_unload.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Dec 31 12:36:46 2013 (r260130) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Dec 31 15:37:51 2013 (r260131) @@ -206,11 +206,12 @@ const char dtrace_zero[256] = { 0 }; /* #if defined(sun) static dev_info_t *dtrace_devi; /* device info */ #endif -static vmem_t *dtrace_arena; /* probe ID arena */ #if defined(sun) +static vmem_t *dtrace_arena; /* probe ID arena */ static vmem_t *dtrace_minor; /* minor number arena */ #else static taskq_t *dtrace_taskq; /* task queue */ +static struct unrhdr *dtrace_arena; /* Probe ID number. */ #endif static dtrace_probe_t **dtrace_probes; /* array of all probes */ static int dtrace_nprobes; /* number of probes */ @@ -7831,7 +7832,7 @@ dtrace_unregister(dtrace_provider_id_t i #if defined(sun) vmem_free(dtrace_arena, (void *)(uintptr_t)(probe->dtpr_id), 1); #else - vmem_free(dtrace_arena, (vmem_addr_t)(probe->dtpr_id), 1); + free_unr(dtrace_arena, probe->dtpr_id); #endif kmem_free(probe, sizeof (dtrace_probe_t)); } @@ -7952,7 +7953,7 @@ dtrace_condense(dtrace_provider_id_t id) #if defined(sun) vmem_free(dtrace_arena, (void *)((uintptr_t)i + 1), 1); #else - vmem_free(dtrace_arena, (vmem_addr_t)i + 1, 1); + free_unr(dtrace_arena, i + 1); #endif } @@ -7982,9 +7983,6 @@ dtrace_probe_create(dtrace_provider_id_t dtrace_probe_t *probe, **probes; dtrace_provider_t *provider = (dtrace_provider_t *)prov; dtrace_id_t id; -#if !defined(sun) - vmem_addr_t addr; -#endif if (provider == dtrace_provider) { ASSERT(MUTEX_HELD(&dtrace_lock)); @@ -7994,10 +7992,9 @@ dtrace_probe_create(dtrace_provider_id_t #if defined(sun) id = (dtrace_id_t)(uintptr_t)vmem_alloc(dtrace_arena, 1, - VM_BESTFIT | VM_WAITOK); + VM_BESTFIT | VM_SLEEP); #else - vmem_alloc(dtrace_arena, 1, M_BESTFIT | M_WAITOK, &addr); - id = (dtrace_id_t)addr; + id = alloc_unr(dtrace_arena); #endif probe = kmem_zalloc(sizeof (dtrace_probe_t), KM_SLEEP); @@ -10048,9 +10045,6 @@ dtrace_ecb_aggregation_create(dtrace_ecb dtrace_recdesc_t *frec; dtrace_aggid_t aggid; dtrace_state_t *state = ecb->dte_state; -#if !defined(sun) - vmem_addr_t addr; -#endif agg = kmem_zalloc(sizeof (dtrace_aggregation_t), KM_SLEEP); agg->dtag_ecb = ecb; @@ -10190,8 +10184,7 @@ success: aggid = (dtrace_aggid_t)(uintptr_t)vmem_alloc(state->dts_aggid_arena, 1, VM_BESTFIT | VM_SLEEP); #else - vmem_alloc(state->dts_aggid_arena, 1, M_BESTFIT | M_WAITOK, &addr); - aggid = (dtrace_aggid_t)addr; + aggid = alloc_unr(state->dts_aggid_arena); #endif if (aggid - 1 >= state->dts_naggregations) { @@ -10244,7 +10237,7 @@ dtrace_ecb_aggregation_destroy(dtrace_ec #if defined(sun) vmem_free(state->dts_aggid_arena, (void *)(uintptr_t)aggid, 1); #else - vmem_free(state->dts_aggid_arena, (vmem_addr_t)aggid, 1); + free_unr(state->dts_aggid_arena, aggid); #endif ASSERT(state->dts_aggregations[aggid - 1] == agg); @@ -13212,7 +13205,7 @@ dtrace_state_create(struct cdev *dev) if (dev != NULL) { cr = dev->si_cred; m = dev2unit(dev); - } + } /* Allocate memory for the state. */ state = kmem_zalloc(sizeof(dtrace_state_t), KM_SLEEP); @@ -13224,12 +13217,7 @@ dtrace_state_create(struct cdev *dev) #if defined(sun) state->dts_aggid_arena = vmem_create(c, (void *)1, UINT32_MAX, 1, NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER); -#else - state->dts_aggid_arena = vmem_create(c, (vmem_addr_t)1, UINT32_MAX, 1, - 0, M_WAITOK); -#endif -#if defined(sun) if (devp != NULL) { major = getemajor(*devp); } else { @@ -13241,6 +13229,7 @@ dtrace_state_create(struct cdev *dev) if (devp != NULL) *devp = state->dts_dev; #else + state->dts_aggid_arena = new_unrhdr(1, INT_MAX, &dtrace_unr_mtx); state->dts_dev = dev; #endif @@ -14047,7 +14036,11 @@ dtrace_state_destroy(dtrace_state_t *sta dtrace_format_destroy(state); if (state->dts_aggid_arena != NULL) { +#if defined(sun) vmem_destroy(state->dts_aggid_arena); +#else + delete_unrhdr(state->dts_aggid_arena); +#endif state->dts_aggid_arena = NULL; } #if defined(sun) @@ -15382,7 +15375,7 @@ dtrace_module_unloaded(modctl_t *ctl, in #if defined(sun) vmem_free(dtrace_arena, (void *)(uintptr_t)probe->dtpr_id, 1); #else - vmem_free(dtrace_arena, (vmem_addr_t)probe->dtpr_id, 1); + free_unr(dtrace_arena, probe->dtpr_id); #endif kmem_free(probe, sizeof (dtrace_probe_t)); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Tue Dec 31 12:36:46 2013 (r260130) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Tue Dec 31 15:37:51 2013 (r260131) @@ -1139,7 +1139,11 @@ struct dtrace_state { int dts_nspeculations; /* number of speculations */ int dts_naggregations; /* number of aggregations */ dtrace_aggregation_t **dts_aggregations; /* aggregation array */ +#if defined(sun) vmem_t *dts_aggid_arena; /* arena for aggregation IDs */ +#else + struct unrhdr *dts_aggid_arena; /* arena for aggregation IDs */ +#endif uint64_t dts_errors; /* total number of errors */ uint32_t dts_speculations_busy; /* number of spec. busy */ uint32_t dts_speculations_unavail; /* number of spec unavail */ Modified: head/sys/cddl/dev/dtrace/dtrace_load.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_load.c Tue Dec 31 12:36:46 2013 (r260130) +++ head/sys/cddl/dev/dtrace/dtrace_load.c Tue Dec 31 15:37:51 2013 (r260131) @@ -58,9 +58,6 @@ dtrace_load(void *dummy) dtrace_taskq = taskq_create("dtrace_taskq", 1, maxclsyspri, 0, 0, 0); - dtrace_arena = vmem_create("dtrace", 1, UINT32_MAX, 1, 0, - M_WAITOK | M_BESTFIT); - /* Register callbacks for linker file load and unload events. */ dtrace_kld_load_tag = EVENTHANDLER_REGISTER(kld_load, dtrace_kld_load, NULL, EVENTHANDLER_PRI_ANY); @@ -88,6 +85,8 @@ dtrace_load(void *dummy) ASSERT(MUTEX_HELD(&cpu_lock)); + dtrace_arena = new_unrhdr(1, INT_MAX, &dtrace_unr_mtx); + dtrace_state_cache = kmem_cache_create("dtrace_state_cache", sizeof (dtrace_dstate_percpu_t) * NCPU, DTRACE_STATE_ALIGN, NULL, NULL, NULL, NULL, NULL, 0); Modified: head/sys/cddl/dev/dtrace/dtrace_unload.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_unload.c Tue Dec 31 12:36:46 2013 (r260130) +++ head/sys/cddl/dev/dtrace/dtrace_unload.c Tue Dec 31 15:37:51 2013 (r260131) @@ -104,7 +104,7 @@ dtrace_unload() kmem_cache_destroy(dtrace_state_cache); - vmem_destroy(dtrace_arena); + delete_unrhdr(dtrace_arena); if (dtrace_toxrange != NULL) { kmem_free(dtrace_toxrange, 0); From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 15:41:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8E68C2C; Tue, 31 Dec 2013 15:41:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A525C1AE7; Tue, 31 Dec 2013 15:41:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVFfGXM059167; Tue, 31 Dec 2013 15:41:16 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVFfGlw059166; Tue, 31 Dec 2013 15:41:16 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312311541.rBVFfGlw059166@svn.freebsd.org> From: Mark Johnston Date: Tue, 31 Dec 2013 15:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260132 - head/sys/cddl/dev/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 15:41:16 -0000 Author: markj Date: Tue Dec 31 15:41:16 2013 New Revision: 260132 URL: http://svnweb.freebsd.org/changeset/base/260132 Log: Allocate the probe ID unrhdr before the DTrace kld_* event handlers are registered. Otherwise there is a small window during which probe IDs may be allocated before the unrhdr is allocated. MFC after: 2 weeks Modified: head/sys/cddl/dev/dtrace/dtrace_load.c Modified: head/sys/cddl/dev/dtrace/dtrace_load.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_load.c Tue Dec 31 15:37:51 2013 (r260131) +++ head/sys/cddl/dev/dtrace/dtrace_load.c Tue Dec 31 15:41:16 2013 (r260132) @@ -58,6 +58,8 @@ dtrace_load(void *dummy) dtrace_taskq = taskq_create("dtrace_taskq", 1, maxclsyspri, 0, 0, 0); + dtrace_arena = new_unrhdr(1, INT_MAX, &dtrace_unr_mtx); + /* Register callbacks for linker file load and unload events. */ dtrace_kld_load_tag = EVENTHANDLER_REGISTER(kld_load, dtrace_kld_load, NULL, EVENTHANDLER_PRI_ANY); @@ -85,8 +87,6 @@ dtrace_load(void *dummy) ASSERT(MUTEX_HELD(&cpu_lock)); - dtrace_arena = new_unrhdr(1, INT_MAX, &dtrace_unr_mtx); - dtrace_state_cache = kmem_cache_create("dtrace_state_cache", sizeof (dtrace_dstate_percpu_t) * NCPU, DTRACE_STATE_ALIGN, NULL, NULL, NULL, NULL, NULL, 0); From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 15:45:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5E63D80; Tue, 31 Dec 2013 15:45:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 91ED31AF6; Tue, 31 Dec 2013 15:45:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVFjCpG060065; Tue, 31 Dec 2013 15:45:12 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVFjC8V060064; Tue, 31 Dec 2013 15:45:12 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312311545.rBVFjC8V060064@svn.freebsd.org> From: Mark Johnston Date: Tue, 31 Dec 2013 15:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260133 - head/tools/test/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 15:45:12 -0000 Author: markj Date: Tue Dec 31 15:45:12 2013 New Revision: 260133 URL: http://svnweb.freebsd.org/changeset/base/260133 Log: Some DTrace tests (mostly in the pid provider directory) make use of executable ksh scripts. These are currently not copied into the test directory the way that compiled executables are, so the tests which make use of them cannot work. This changes the test Makefile to copy the scripts into the test directory. Modified: head/tools/test/dtrace/Makefile Modified: head/tools/test/dtrace/Makefile ============================================================================== --- head/tools/test/dtrace/Makefile Tue Dec 31 15:41:16 2013 (r260132) +++ head/tools/test/dtrace/Makefile Tue Dec 31 15:45:12 2013 (r260133) @@ -297,6 +297,8 @@ ${_d}_TSTD!= find ${TESTSRCDIR}/tst/comm ${_d}_TSTC!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.c" ${_d}_SHERR!= find ${TESTSRCDIR}/tst/common/${_d} -name "err.*.ksh" ${_d}_SHTST!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.ksh" +${_d}_EXE!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.exe" -o \ + -name "err.*.exe" ${_d}_TF= ${${_d}_ERR} ${${_d}_TSTD} ${${_d}_SHERR} ${${_d}_SHTST} # Go through the list of test files and prepare another list that contains @@ -317,15 +319,16 @@ ${_d}_TFCS+= ${_f} .endfor ALL_TESTCFILES+= ${${_d}_TFCS} +ALL_TESTEXEFILES+= ${${_d}_EXE} -${_d} : ${${_d}_TFCS:T:S/c$/exe/} +${_d} : ${${_d}_TFCS:T:S/c$/exe/} ${${_d}_EXE:T} @${DTEST} ${${_d}_TFS} .endfor # -------------------------------------------------------------------------------- # -PRGS= ${ALL_TESTCFILES:T:S/c$/exe/} +PRGS= ${ALL_TESTCFILES:T:S/c$/exe/} ${ALL_TESTEXEFILES:T} listprgs : @echo ${PRGS} @@ -338,6 +341,12 @@ ${_f:T:S/c$/exe/} : ${_f} gcc -o ${.TARGET} ${_f} -lrt .endfor +.for _f in ${ALL_TESTEXEFILES} +${_f:T} : ${_f} + cp -f ${_f} ${.TARGET} + chmod a+x ${.TARGET} +.endfor + listcfiles : @echo ${ALL_TESTCFILES} From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 16:01:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DE54245; Tue, 31 Dec 2013 16:01:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 796731D07; Tue, 31 Dec 2013 16:01:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVG1ILc067462; Tue, 31 Dec 2013 16:01:18 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVG1Iv5067461; Tue, 31 Dec 2013 16:01:18 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201312311601.rBVG1Iv5067461@svn.freebsd.org> From: Kevin Lo Date: Tue, 31 Dec 2013 16:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260134 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 16:01:18 -0000 Author: kevlo Date: Tue Dec 31 16:01:17 2013 New Revision: 260134 URL: http://svnweb.freebsd.org/changeset/base/260134 Log: MFC r252064: Rename run(4) firmware file from runfw to run.fw. Previous name was the same as top-level target name for "device runfw" kernel option and caused cyclic dependancy that lead to kernel build breakage Module change is not strictly required and done for name unification sake PR: conf/175751 Submitted by: Issei Modified: stable/9/sys/conf/files Directory Properties: stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Tue Dec 31 15:45:12 2013 (r260133) +++ stable/9/sys/conf/files Tue Dec 31 16:01:17 2013 (r260134) @@ -2033,19 +2033,19 @@ dev/usb/net/uhso.c optional uhso dev/usb/wlan/if_rum.c optional rum dev/usb/wlan/if_run.c optional run runfw.c optional runfw \ - compile-with "${AWK} -f $S/tools/fw_stub.awk runfw:runfw -mrunfw -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk run.fw:runfw -mrunfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "runfw.c" runfw.fwo optional runfw \ - dependency "runfw" \ + dependency "run.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "runfw.fwo" -runfw optional runfw \ +run.fw optional runfw \ dependency "$S/contrib/dev/run/rt2870.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ - clean "runfw" + clean "run.fw" dev/usb/wlan/if_uath.c optional uath dev/usb/wlan/if_upgt.c optional upgt dev/usb/wlan/if_ural.c optional ural From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 17:29:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9F36D69; Tue, 31 Dec 2013 17:29:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4E54121A; Tue, 31 Dec 2013 17:29:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVHT3Hs098543; Tue, 31 Dec 2013 17:29:03 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVHT3NW098542; Tue, 31 Dec 2013 17:29:03 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312311729.rBVHT3NW098542@svn.freebsd.org> From: Peter Wemm Date: Tue, 31 Dec 2013 17:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260135 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 17:29:03 -0000 Author: peter Date: Tue Dec 31 17:29:03 2013 New Revision: 260135 URL: http://svnweb.freebsd.org/changeset/base/260135 Log: Bump __FreeBSD_version for MFC of r259951 - don't coalesce map entries for vm_map_stack(). Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Tue Dec 31 16:01:17 2013 (r260134) +++ stable/10/sys/sys/param.h Tue Dec 31 17:29:03 2013 (r260135) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000701 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000702 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 17:29:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD52BE99; Tue, 31 Dec 2013 17:29:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C867A121F; Tue, 31 Dec 2013 17:29:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVHTTjJ098624; Tue, 31 Dec 2013 17:29:29 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVHTTYD098623; Tue, 31 Dec 2013 17:29:29 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312311729.rBVHTTYD098623@svn.freebsd.org> From: Peter Wemm Date: Tue, 31 Dec 2013 17:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260136 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 17:29:29 -0000 Author: peter Date: Tue Dec 31 17:29:29 2013 New Revision: 260136 URL: http://svnweb.freebsd.org/changeset/base/260136 Log: Bump __FreeBSD_version for MFC of r259951 - don't coalesce map entries for vm_map_stack(). Modified: stable/9/sys/sys/param.h Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Tue Dec 31 17:29:03 2013 (r260135) +++ stable/9/sys/sys/param.h Tue Dec 31 17:29:29 2013 (r260136) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 902505 /* Master, propagated to newvers */ +#define __FreeBSD_version 902506 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 18:25:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 803D1872; Tue, 31 Dec 2013 18:25:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B2F3162E; Tue, 31 Dec 2013 18:25:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVIPGj2021269; Tue, 31 Dec 2013 18:25:16 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVIPFZs021262; Tue, 31 Dec 2013 18:25:15 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201312311825.rBVIPFZs021262@svn.freebsd.org> From: Alan Cox Date: Tue, 31 Dec 2013 18:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260137 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 18:25:16 -0000 Author: alc Date: Tue Dec 31 18:25:15 2013 New Revision: 260137 URL: http://svnweb.freebsd.org/changeset/base/260137 Log: Since the introduction of the popmap to reservations in r259999, there is no longer any need for the page's PG_CACHED and PG_FREE flags to be set and cleared while the free page queues lock is held. Thus, vm_page_alloc(), vm_page_alloc_contig(), and vm_page_alloc_freelist() can wait until after the free page queues lock is released to clear the page's flags. Moreover, the PG_FREE flag can be retired. Now that the reservation system no longer uses it, its only uses are in a few assertions. Eliminating these assertions is no real loss. Other assertions catch the same types of misbehavior, like doubly freeing a page (see r260032) or dirtying a free page (free pages are invalid and only valid pages can be dirtied). Eliminate an unneeded variable from vm_page_alloc_contig(). Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_phys.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Dec 31 17:29:29 2013 (r260136) +++ head/sys/vm/vm_page.c Tue Dec 31 18:25:15 2013 (r260137) @@ -922,8 +922,6 @@ vm_page_dirty_KBI(vm_page_t m) /* These assertions refer to this operation by its public name. */ KASSERT((m->flags & PG_CACHED) == 0, ("vm_page_dirty: page in cache!")); - KASSERT(!VM_PAGE_IS_FREE(m), - ("vm_page_dirty: page is free!")); KASSERT(m->valid == VM_PAGE_BITS_ALL, ("vm_page_dirty: page is invalid!")); m->dirty = VM_PAGE_BITS_ALL; @@ -1568,27 +1566,24 @@ vm_page_alloc(vm_object_t object, vm_pin vm_object_cache_is_empty(m_object)) vp = m_object->handle; } else { - KASSERT(VM_PAGE_IS_FREE(m), - ("vm_page_alloc: page %p is not free", m)); KASSERT(m->valid == 0, ("vm_page_alloc: free page %p is valid", m)); vm_phys_freecnt_adj(m, -1); + if ((m->flags & PG_ZERO) != 0) + vm_page_zero_count--; } + mtx_unlock(&vm_page_queue_free_mtx); /* - * Only the PG_ZERO flag is inherited. The PG_CACHED or PG_FREE flag - * must be cleared before the free page queues lock is released. + * Initialize the page. Only the PG_ZERO flag is inherited. */ flags = 0; - if (m->flags & PG_ZERO) { - vm_page_zero_count--; - if (req & VM_ALLOC_ZERO) - flags = PG_ZERO; - } - if (req & VM_ALLOC_NODUMP) + if ((req & VM_ALLOC_ZERO) != 0) + flags = PG_ZERO; + flags &= m->flags; + if ((req & VM_ALLOC_NODUMP) != 0) flags |= PG_NODUMP; m->flags = flags; - mtx_unlock(&vm_page_queue_free_mtx); m->aflags = 0; m->oflags = object == NULL || (object->flags & OBJ_UNMANAGED) != 0 ? VPO_UNMANAGED : 0; @@ -1704,7 +1699,7 @@ vm_page_alloc_contig(vm_object_t object, struct vnode *drop; struct spglist deferred_vdrop_list; vm_page_t m, m_tmp, m_ret; - u_int flags, oflags; + u_int flags; int req_class; KASSERT((object != NULL) == ((req & VM_ALLOC_NOOBJ) == 0) && @@ -1782,7 +1777,6 @@ retry: flags |= PG_NODUMP; if ((req & VM_ALLOC_WIRED) != 0) atomic_add_int(&cnt.v_wire_count, npages); - oflags = VPO_UNMANAGED; if (object != NULL) { if (object->memattr != VM_MEMATTR_DEFAULT && memattr == VM_MEMATTR_DEFAULT) @@ -1801,7 +1795,7 @@ retry: if ((req & VM_ALLOC_WIRED) != 0) m->wire_count = 1; /* Unmanaged pages don't use "act_count". */ - m->oflags = oflags; + m->oflags = VPO_UNMANAGED; if (object != NULL) { if (vm_page_insert(m, object, pindex)) { vm_page_alloc_contig_vdrop( @@ -1873,16 +1867,12 @@ vm_page_alloc_init(vm_page_t m) vm_object_cache_is_empty(m_object)) drop = m_object->handle; } else { - KASSERT(VM_PAGE_IS_FREE(m), - ("vm_page_alloc_init: page %p is not free", m)); KASSERT(m->valid == 0, ("vm_page_alloc_init: free page %p is valid", m)); vm_phys_freecnt_adj(m, -1); if ((m->flags & PG_ZERO) != 0) vm_page_zero_count--; } - /* Don't clear the PG_ZERO flag; we'll need it later. */ - m->flags &= PG_ZERO; return (drop); } @@ -2211,10 +2201,9 @@ vm_page_cache_turn_free(vm_page_t m) m->object = NULL; m->valid = 0; - /* Clear PG_CACHED and set PG_FREE. */ - m->flags ^= PG_CACHED | PG_FREE; - KASSERT((m->flags & (PG_CACHED | PG_FREE)) == PG_FREE, - ("vm_page_cache_free: page %p has inconsistent flags", m)); + KASSERT((m->flags & PG_CACHED) != 0, + ("vm_page_cache_turn_free: page %p is not cached", m)); + m->flags &= ~PG_CACHED; cnt.v_cache_count--; vm_phys_freecnt_adj(m, 1); } @@ -2240,9 +2229,7 @@ vm_page_free_toq(vm_page_t m) ("vm_page_free_toq: unmanaged page %p is queued", m)); PCPU_INC(cnt.v_tfree); - if (VM_PAGE_IS_FREE(m)) - panic("vm_page_free: freeing free page %p", m); - else if (vm_page_sbusied(m)) + if (vm_page_sbusied(m)) panic("vm_page_free: freeing busy page %p", m); /* @@ -2284,7 +2271,6 @@ vm_page_free_toq(vm_page_t m) * cache/free page queues. */ mtx_lock(&vm_page_queue_free_mtx); - m->flags |= PG_FREE; vm_phys_freecnt_adj(m, 1); #if VM_NRESERVLEVEL > 0 if (!vm_reserv_free_page(m)) Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Tue Dec 31 17:29:29 2013 (r260136) +++ head/sys/vm/vm_page.h Tue Dec 31 18:25:15 2013 (r260137) @@ -321,7 +321,6 @@ extern struct mtx_padalign pa_lock[]; * freeing, the modification must be protected by the vm_page lock. */ #define PG_CACHED 0x0001 /* page is cached */ -#define PG_FREE 0x0002 /* page is free */ #define PG_FICTITIOUS 0x0004 /* physical page doesn't exist */ #define PG_ZERO 0x0008 /* page is zeroed */ #define PG_MARKER 0x0010 /* special queue marker page */ @@ -372,8 +371,6 @@ extern vm_page_t vm_page_array; /* Firs extern long vm_page_array_size; /* number of vm_page_t's */ extern long first_page; /* first physical page number */ -#define VM_PAGE_IS_FREE(m) (((m)->flags & PG_FREE) != 0) - #define VM_PAGE_TO_PHYS(entry) ((entry)->phys_addr) vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Tue Dec 31 17:29:29 2013 (r260136) +++ head/sys/vm/vm_phys.c Tue Dec 31 18:25:15 2013 (r260137) @@ -391,7 +391,6 @@ vm_phys_add_page(vm_paddr_t pa) vmd = vm_phys_domain(m); vmd->vmd_page_count++; vmd->vmd_segs |= 1UL << m->segind; - m->flags = PG_FREE; KASSERT(m->order == VM_NFREEORDER, ("vm_phys_add_page: page %p has unexpected order %d", m, m->order)); From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 19:39:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2846E244; Tue, 31 Dec 2013 19:39:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 103221A88; Tue, 31 Dec 2013 19:39:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVJdHjN048003; Tue, 31 Dec 2013 19:39:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVJdFUs047994; Tue, 31 Dec 2013 19:39:15 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312311939.rBVJdFUs047994@svn.freebsd.org> From: Xin LI Date: Tue, 31 Dec 2013 19:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260138 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 19:39:17 -0000 Author: delphij Date: Tue Dec 31 19:39:15 2013 New Revision: 260138 URL: http://svnweb.freebsd.org/changeset/base/260138 Log: MFV r242733: 3306 zdb should be able to issue reads in parallel 3321 'zpool reopen' command should be documented in the man page and help message illumos/illumos-gate@31d7e8fa33fae995f558673adb22641b5aa8b6e1 FreeBSD porting notes: the kernel part of this changeset depends on Solaris buf(9S) interfaces and are not really applicable for our use. vdev_disk.c is patched as-is to reduce diverge from upstream, but vdev_file.c is left intact. MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Tue Dec 31 18:25:15 2013 (r260137) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Tue Dec 31 19:39:15 2013 (r260138) @@ -14,11 +14,12 @@ .\" .\" Copyright 2012, Richard Lowe. .\" Copyright (c) 2012, Marcelo Araujo . +.\" Copyright (c) 2012 by Delphix. All rights reserved. .\" All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd May 10, 2012 +.Dd December 31, 2013 .Dt ZDB 8 .Os .Sh NAME @@ -29,27 +30,35 @@ .Op Fl CumdibcsDvhLXFPA .Op Fl e Op Fl p Ar path... .Op Fl t Ar txg +.Op Fl U Ar cache +.Op Fl M Ar inflight I/Os .Ar poolname .Op Ar object ... .Nm .Op Fl divPA .Op Fl e Op Fl p Ar path... +.Op Fl U Ar cache .Ar dataset .Op Ar object ... .Nm .Fl m Op Fl LXFPA .Op Fl t Ar txg .Op Fl e Op Fl p Ar path... +.Op Fl U Ar cache .Ar poolname .Nm .Fl R Op Fl A .Op Fl e Op Fl p Ar path... +.Op Fl U Ar cache +.Ar poolname .Ar poolname .Ar vdev Ns : Ns Ar offset Ns : Ns Ar size Ns Op Ns : Ns Ar flags .Nm .Fl S .Op Fl AP .Op Fl e Op Fl p Ar path... +.Op Fl U Ar cache +.Ar poolname .Ar poolname .Nm .Fl l @@ -205,6 +214,11 @@ flag specifies the path under which devi .It Fl F Attempt to make an unreadable pool readable by trying progressively older transactions. +.It Fl M Ar inflight I/Os +Limit the number of outstanding checksum I/Os to the specified value. +The default value is 200. This option affects the performance of the +.Fl c +option. .It Fl P Print numbers in an unscaled form more amenable to parsing, eg. 1000000 rather than 1M. @@ -218,9 +232,7 @@ options for a means to see the available transaction numbers. .It Fl U Ar cachefile Use a cache file other than -.Pa /etc/zfs/zpool.cache . -This option is only valid with -.Fl C +.Pa /boot/zfs/zpool.cache . .It Fl v Enable verbosity. Specify multiple times for increased verbosity. Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Dec 31 18:25:15 2013 (r260137) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Dec 31 19:39:15 2013 (r260138) @@ -89,6 +89,7 @@ extern void dump_intent_log(zilog_t *); uint64_t *zopt_object = NULL; int zopt_objects = 0; libzfs_handle_t *g_zfs; +uint64_t max_inflight = 200; /* * These libumem hooks provide a reasonable set of defaults for the allocator's @@ -110,16 +111,17 @@ static void usage(void) { (void) fprintf(stderr, - "Usage: %s [-CumdibcsDvhLXFPA] [-t txg] [-e [-p path...]]" - "poolname [object...]\n" - " %s [-divPA] [-e -p path...] dataset [object...]\n" - " %s -m [-LXFPA] [-t txg] [-e [-p path...]]" - "poolname [vdev [metaslab...]]\n" - " %s -R [-A] [-e [-p path...]] poolname " - "vdev:offset:size[:flags]\n" - " %s -S [-PA] [-e [-p path...]] poolname\n" - " %s -l [-uA] device\n" - " %s -C [-A] [-U config]\n\n", + "Usage: %s [-CumdibcsDvhLXFPA] [-t txg] [-e [-p path...]] " + "[-U config] [-M inflight I/Os] poolname [object...]\n" + " %s [-divPA] [-e -p path...] [-U config] dataset " + "[object...]\n" + " %s -m [-LXFPA] [-t txg] [-e [-p path...]] [-U config] " + "poolname [vdev [metaslab...]]\n" + " %s -R [-A] [-e [-p path...]] poolname " + "vdev:offset:size[:flags]\n" + " %s -S [-PA] [-e [-p path...]] [-U config] poolname\n" + " %s -l [-uA] device\n" + " %s -C [-A] [-U config]\n\n", cmdname, cmdname, cmdname, cmdname, cmdname, cmdname, cmdname); (void) fprintf(stderr, " Dataset name must include at least one " @@ -164,6 +166,8 @@ usage(void) (void) fprintf(stderr, " -P print numbers in parseable form\n"); (void) fprintf(stderr, " -t -- highest txg to use when " "searching for uberblocks\n"); + (void) fprintf(stderr, " -M -- " + "specify the maximum number of checksumming I/Os [default is 200]"); (void) fprintf(stderr, "Specify an option more than once (e.g. -bb) " "to make only that option verbose\n"); (void) fprintf(stderr, "Default is to dump everything non-verbosely\n"); @@ -2154,6 +2158,47 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * bp, NULL, NULL, ZIO_FLAG_CANFAIL)), ==, 0); } +/* ARGSUSED */ +static void +zdb_blkptr_done(zio_t *zio) +{ + spa_t *spa = zio->io_spa; + blkptr_t *bp = zio->io_bp; + int ioerr = zio->io_error; + zdb_cb_t *zcb = zio->io_private; + zbookmark_t *zb = &zio->io_bookmark; + + zio_data_buf_free(zio->io_data, zio->io_size); + + mutex_enter(&spa->spa_scrub_lock); + spa->spa_scrub_inflight--; + cv_broadcast(&spa->spa_scrub_io_cv); + + if (ioerr && !(zio->io_flags & ZIO_FLAG_SPECULATIVE)) { + char blkbuf[BP_SPRINTF_LEN]; + + zcb->zcb_haderrors = 1; + zcb->zcb_errors[ioerr]++; + + if (dump_opt['b'] >= 2) + sprintf_blkptr(blkbuf, bp); + else + blkbuf[0] = '\0'; + + (void) printf("zdb_blkptr_cb: " + "Got error %d reading " + "<%llu, %llu, %lld, %llx> %s -- skipping\n", + ioerr, + (u_longlong_t)zb->zb_objset, + (u_longlong_t)zb->zb_object, + (u_longlong_t)zb->zb_level, + (u_longlong_t)zb->zb_blkid, + blkbuf); + } + mutex_exit(&spa->spa_scrub_lock); +} + +/* ARGSUSED */ static int zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) @@ -2174,38 +2219,22 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog is_metadata = (BP_GET_LEVEL(bp) != 0 || DMU_OT_IS_METADATA(type)); if (dump_opt['c'] > 1 || (dump_opt['c'] && is_metadata)) { - int ioerr; size_t size = BP_GET_PSIZE(bp); - void *data = malloc(size); + void *data = zio_data_buf_alloc(size); int flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB | ZIO_FLAG_RAW; /* If it's an intent log block, failure is expected. */ if (zb->zb_level == ZB_ZIL_LEVEL) flags |= ZIO_FLAG_SPECULATIVE; - ioerr = zio_wait(zio_read(NULL, spa, bp, data, size, - NULL, NULL, ZIO_PRIORITY_ASYNC_READ, flags, zb)); - - free(data); - if (ioerr && !(flags & ZIO_FLAG_SPECULATIVE)) { - zcb->zcb_haderrors = 1; - zcb->zcb_errors[ioerr]++; + mutex_enter(&spa->spa_scrub_lock); + while (spa->spa_scrub_inflight > max_inflight) + cv_wait(&spa->spa_scrub_io_cv, &spa->spa_scrub_lock); + spa->spa_scrub_inflight++; + mutex_exit(&spa->spa_scrub_lock); - if (dump_opt['b'] >= 2) - sprintf_blkptr(blkbuf, bp); - else - blkbuf[0] = '\0'; - - (void) printf("zdb_blkptr_cb: " - "Got error %d reading " - "<%llu, %llu, %lld, %llx> %s -- skipping\n", - ioerr, - (u_longlong_t)zb->zb_objset, - (u_longlong_t)zb->zb_object, - (u_longlong_t)zb->zb_level, - (u_longlong_t)zb->zb_blkid, - blkbuf); - } + zio_nowait(zio_read(NULL, spa, bp, data, size, + zdb_blkptr_done, zcb, ZIO_PRIORITY_ASYNC_READ, flags, zb)); } zcb->zcb_readfails = 0; @@ -2433,6 +2462,18 @@ dump_block_stats(spa_t *spa) zcb.zcb_start = zcb.zcb_lastprint = gethrtime(); zcb.zcb_haderrors |= traverse_pool(spa, 0, flags, zdb_blkptr_cb, &zcb); + /* + * If we've traversed the data blocks then we need to wait for those + * I/Os to complete. We leverage "The Godfather" zio to wait on + * all async I/Os to complete. + */ + if (dump_opt['c']) { + (void) zio_wait(spa->spa_async_zio_root); + spa->spa_async_zio_root = zio_root(spa, NULL, NULL, + ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE | + ZIO_FLAG_GODFATHER); + } + if (zcb.zcb_haderrors) { (void) printf("\nError counts:\n\n"); (void) printf("\t%5s %s\n", "errno", "count"); @@ -3202,7 +3243,7 @@ main(int argc, char **argv) dprintf_setup(&argc, argv); - while ((c = getopt(argc, argv, "bcdhilmsuCDRSAFLXevp:t:U:P")) != -1) { + while ((c = getopt(argc, argv, "bcdhilmM:suCDRSAFLXevp:t:U:P")) != -1) { switch (c) { case 'b': case 'c': @@ -3231,6 +3272,15 @@ main(int argc, char **argv) case 'v': verbose++; break; + case 'M': + max_inflight = strtoull(optarg, NULL, 0); + if (max_inflight == 0) { + (void) fprintf(stderr, "maximum number " + "of inflight I/Os must be greater " + "than 0\n"); + usage(); + } + break; case 'p': if (searchdirs == NULL) { searchdirs = umem_alloc(sizeof (char *), Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Dec 31 18:25:15 2013 (r260137) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Dec 31 19:39:15 2013 (r260138) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 14, 2013 +.Dd December 31, 2013 .Dt ZPOOL 8 .Os .Sh NAME @@ -141,6 +141,9 @@ .Cm remove .Ar pool device ... .Nm +.Cm reopen +.Ar pool +.Nm .Cm replace .Op Fl f .Ar pool device @@ -1431,6 +1434,13 @@ command. Non-redundant and devices cannot be removed from a pool. .It Xo .Nm +.Cm reopen +.Ar pool +.Xc +.Pp +Reopen all the vdevs associated with the pool. +.It Xo +.Nm .Cm replace .Op Fl f .Ar pool device Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Tue Dec 31 18:25:15 2013 (r260137) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Tue Dec 31 19:39:15 2013 (r260138) @@ -248,7 +248,7 @@ get_usage(zpool_help_t idx) { case HELP_REMOVE: return (gettext("\tremove ...\n")); case HELP_REOPEN: - return (""); /* Undocumented command */ + return (gettext("\treopen \n")); case HELP_SCRUB: return (gettext("\tscrub [-s] ...\n")); case HELP_STATUS: @@ -3720,22 +3720,37 @@ zpool_do_reguid(int argc, char **argv) * zpool reopen * * Reopen the pool so that the kernel can update the sizes of all vdevs. - * - * NOTE: This command is currently undocumented. If the command is ever - * exposed then the appropriate usage() messages will need to be made. */ int zpool_do_reopen(int argc, char **argv) { + int c; int ret = 0; zpool_handle_t *zhp; char *pool; + /* check options */ + while ((c = getopt(argc, argv, "")) != -1) { + switch (c) { + case '?': + (void) fprintf(stderr, gettext("invalid option '%c'\n"), + optopt); + usage(B_FALSE); + } + } + argc--; argv++; - if (argc != 1) - return (2); + if (argc < 1) { + (void) fprintf(stderr, gettext("missing pool name\n")); + usage(B_FALSE); + } + + if (argc > 1) { + (void) fprintf(stderr, gettext("too many arguments\n")); + usage(B_FALSE); + } pool = argv[0]; if ((zhp = zpool_open_canfail(g_zfs, pool)) == NULL) Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Tue Dec 31 18:25:15 2013 (r260137) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Tue Dec 31 19:39:15 2013 (r260138) @@ -661,7 +661,7 @@ __dprintf(const char *file, const char * if (dprintf_find_string("pid")) (void) printf("%d ", getpid()); if (dprintf_find_string("tid")) - (void) printf("%u ", thr_self()); + (void) printf("%ul ", thr_self()); #if 0 if (dprintf_find_string("cpu")) (void) printf("%u ", getcpuid()); @@ -1125,3 +1125,50 @@ zvol_create_minors(const char *name) return (0); } #endif + +#ifdef illumos +void +bioinit(buf_t *bp) +{ + bzero(bp, sizeof (buf_t)); +} + +void +biodone(buf_t *bp) +{ + if (bp->b_iodone != NULL) { + (*(bp->b_iodone))(bp); + return; + } + ASSERT((bp->b_flags & B_DONE) == 0); + bp->b_flags |= B_DONE; +} + +void +bioerror(buf_t *bp, int error) +{ + ASSERT(bp != NULL); + ASSERT(error >= 0); + + if (error != 0) { + bp->b_flags |= B_ERROR; + } else { + bp->b_flags &= ~B_ERROR; + } + bp->b_error = error; +} + + +int +geterror(struct buf *bp) +{ + int error = 0; + + if (bp->b_flags & B_ERROR) { + error = bp->b_error; + if (!error) + error = EIO; + } + return (error); +} +#endif Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Tue Dec 31 18:25:15 2013 (r260137) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Tue Dec 31 19:39:15 2013 (r260138) @@ -778,6 +778,38 @@ extern void cyclic_remove(cyclic_id_t); extern int cyclic_reprogram(cyclic_id_t, hrtime_t); #endif /* illumos */ +#ifdef illumos +/* + * Buf structure + */ +#define B_BUSY 0x0001 +#define B_DONE 0x0002 +#define B_ERROR 0x0004 +#define B_READ 0x0040 /* read when I/O occurs */ +#define B_WRITE 0x0100 /* non-read pseudo-flag */ + +typedef struct buf { + int b_flags; + size_t b_bcount; + union { + caddr_t b_addr; + } b_un; + + lldaddr_t _b_blkno; +#define b_lblkno _b_blkno._f + size_t b_resid; + size_t b_bufsize; + int (*b_iodone)(struct buf *); + int b_error; + void *b_private; +} buf_t; + +extern void bioinit(buf_t *); +extern void biodone(buf_t *); +extern void bioerror(buf_t *, int); +extern int geterror(buf_t *); +#endif + #ifdef __cplusplus } #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Tue Dec 31 18:25:15 2013 (r260137) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Tue Dec 31 19:39:15 2013 (r260138) @@ -363,6 +363,16 @@ extern void vdev_set_min_asize(vdev_t *v /* zdb uses this tunable, so it must be declared here to make lint happy. */ extern int zfs_vdev_cache_size; +#ifdef illumos +/* + * The vdev_buf_t is used to translate between zio_t and buf_t, and back again. + */ +typedef struct vdev_buf { + buf_t vb_buf; /* buffer that describes the io */ + zio_t *vb_io; /* pointer back to the original zio_t */ +} vdev_buf_t; +#endif + #ifdef __cplusplus } #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Tue Dec 31 18:25:15 2013 (r260137) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Tue Dec 31 19:39:15 2013 (r260138) @@ -42,11 +42,6 @@ extern ldi_ident_t zfs_li; -typedef struct vdev_disk_buf { - buf_t vdb_buf; - zio_t *vdb_io; -} vdev_disk_buf_t; - static void vdev_disk_hold(vdev_t *vd) { @@ -483,8 +478,8 @@ vdev_disk_ldi_physio(ldi_handle_t vd_lh, static void vdev_disk_io_intr(buf_t *bp) { - vdev_disk_buf_t *vdb = (vdev_disk_buf_t *)bp; - zio_t *zio = vdb->vdb_io; + vdev_buf_t *vb = (vdev_buf_t *)bp; + zio_t *zio = vb->vb_io; /* * The rest of the zio stack only deals with EIO, ECKSUM, and ENXIO. @@ -496,7 +491,7 @@ vdev_disk_io_intr(buf_t *bp) if (zio->io_error == 0 && bp->b_resid != 0) zio->io_error = SET_ERROR(EIO); - kmem_free(vdb, sizeof (vdev_disk_buf_t)); + kmem_free(vb, sizeof (vdev_buf_t)); zio_interrupt(zio); } @@ -527,7 +522,7 @@ vdev_disk_io_start(zio_t *zio) { vdev_t *vd = zio->io_vd; vdev_disk_t *dvd = vd->vdev_tsd; - vdev_disk_buf_t *vdb; + vdev_buf_t *vb; struct dk_callback *dkc; buf_t *bp; int error; @@ -591,10 +586,10 @@ vdev_disk_io_start(zio_t *zio) return (ZIO_PIPELINE_CONTINUE); } - vdb = kmem_alloc(sizeof (vdev_disk_buf_t), KM_SLEEP); + vb = kmem_alloc(sizeof (vdev_buf_t), KM_SLEEP); - vdb->vdb_io = zio; - bp = &vdb->vdb_buf; + vb->vb_io = zio; + bp = &vb->vb_buf; bioinit(bp); bp->b_flags = B_BUSY | B_NOCACHE | From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 20:15:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A30A6CC; Tue, 31 Dec 2013 20:15:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 084F11DB0; Tue, 31 Dec 2013 20:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVKFNSh063023; Tue, 31 Dec 2013 20:15:23 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVKFMKS063011; Tue, 31 Dec 2013 20:15:22 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312312015.rBVKFMKS063011@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 31 Dec 2013 20:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260139 - in stable/10/contrib/gcc: . config/rs6000 cp doc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 20:15:24 -0000 Author: pfg Date: Tue Dec 31 20:15:21 2013 New Revision: 260139 URL: http://svnweb.freebsd.org/changeset/base/260139 Log: MFC r259525, r259526, r259529 gcc: small merges from upstream fix ICE in rs6000 when using -fno-trapping-math. Solves GCC-PR target/30485 Solve GCC issues: PR middle-end/32602 PR middle-end/32603 Updates the to documentation and processing improvement. Obtained from: gcc 4.3 (rev. 120902, 120902, 119427, 126278, 126422; GPLv2) Modified: stable/10/contrib/gcc/ChangeLog.gcc43 stable/10/contrib/gcc/calls.c stable/10/contrib/gcc/config/rs6000/rs6000.c stable/10/contrib/gcc/cp/ChangeLog.gcc43 stable/10/contrib/gcc/cp/decl.c stable/10/contrib/gcc/cp/method.c stable/10/contrib/gcc/cp/parser.c stable/10/contrib/gcc/doc/cppopts.texi stable/10/contrib/gcc/doc/invoke.texi Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/10/contrib/gcc/ChangeLog.gcc43 Tue Dec 31 19:39:15 2013 (r260138) +++ stable/10/contrib/gcc/ChangeLog.gcc43 Tue Dec 31 20:15:21 2013 (r260139) @@ -45,6 +45,20 @@ * flags.h (force_align_functions_log): Delete. * toplev.c (force_align_functions_log): Delete. +2007-07-06 Josh Conner (r126422) + + PR middle-end/32602 + PR middle-end/32603 + * calls.c (store_one_arg): Handle arguments which are partially + on the stack when detecting argument overlap. + +2007-07-03 Eric Christopher (r126278) + + * doc/cppopts.texi: Add conflicting option note to -dM. + * doc/invoke.texi: Add note about possible conflicts with + -E for -dCHARS and note that -dM will not produce + any results if there is no machine dependent reorg. + 2007-06-28 Geoffrey Keating (r126088) * doc/invoke.texi (C++ Dialect Options): Document @@ -407,6 +421,12 @@ (override_options): Add PTA_CX16 flag. Set x86_cmpxchg16b for CPUs that have PTA_CX16 set. +2007-01-18 Josh Conner (r120902) + + PR target/30485 + * config/rs6000/rs6000.c (rs6000_emit_vector_compare): Add + support for UNLE, UNLT, UNGE, and UNGT. + 2007-01-17 Eric Christopher (r120846) * config.gcc: Support core2 processor. Modified: stable/10/contrib/gcc/calls.c ============================================================================== --- stable/10/contrib/gcc/calls.c Tue Dec 31 19:39:15 2013 (r260138) +++ stable/10/contrib/gcc/calls.c Tue Dec 31 20:15:21 2013 (r260139) @@ -4297,6 +4297,7 @@ store_one_arg (struct arg_data *arg, rtx /* expand_call should ensure this. */ gcc_assert (!arg->locate.offset.var + && arg->locate.size.var == 0 && GET_CODE (size_rtx) == CONST_INT); if (arg->locate.offset.constant > i) @@ -4306,7 +4307,21 @@ store_one_arg (struct arg_data *arg, rtx } else if (arg->locate.offset.constant < i) { - if (i < arg->locate.offset.constant + INTVAL (size_rtx)) + /* Use arg->locate.size.constant instead of size_rtx + because we only care about the part of the argument + on the stack. */ + if (i < (arg->locate.offset.constant + + arg->locate.size.constant)) + sibcall_failure = 1; + } + else + { + /* Even though they appear to be at the same location, + if part of the outgoing argument is in registers, + they aren't really at the same location. Check for + this by making sure that the incoming size is the + same as the outgoing size. */ + if (arg->locate.size.constant != INTVAL (size_rtx)) sibcall_failure = 1; } } Modified: stable/10/contrib/gcc/config/rs6000/rs6000.c ============================================================================== --- stable/10/contrib/gcc/config/rs6000/rs6000.c Tue Dec 31 19:39:15 2013 (r260138) +++ stable/10/contrib/gcc/config/rs6000/rs6000.c Tue Dec 31 20:15:21 2013 (r260139) @@ -11738,11 +11738,20 @@ rs6000_emit_vector_compare (enum rtx_cod try_again = true; break; case NE: - /* Treat A != B as ~(A==B). */ + case UNLE: + case UNLT: + case UNGE: + case UNGT: + /* Invert condition and try again. + e.g., A != B becomes ~(A==B). */ { + enum rtx_code rev_code; enum insn_code nor_code; - rtx eq_rtx = rs6000_emit_vector_compare (EQ, op0, op1, - dest_mode); + rtx eq_rtx; + + rev_code = reverse_condition_maybe_unordered (rcode); + eq_rtx = rs6000_emit_vector_compare (rev_code, op0, op1, + dest_mode); nor_code = one_cmpl_optab->handlers[(int)dest_mode].insn_code; gcc_assert (nor_code != CODE_FOR_nothing); Modified: stable/10/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- stable/10/contrib/gcc/cp/ChangeLog.gcc43 Tue Dec 31 19:39:15 2013 (r260138) +++ stable/10/contrib/gcc/cp/ChangeLog.gcc43 Tue Dec 31 20:15:21 2013 (r260139) @@ -66,6 +66,18 @@ * semantics.c (finish_unary_op_expr): Warn only if result overflowed and operands did not. +2006-12-01 Geoffrey Keating (r119427) + + * decl.c (poplevel): Check DECL_INITIAL invariant. + (duplicate_decls): Preserve DECL_INITIAL when eliminating + a new definition in favour of an old declaration. + (start_preparsed_function): Define and document value of + DECL_INITIAL before and after routine. + (finish_function): Check DECL_INITIAL invariant. + * parser.c + (cp_parser_function_definition_from_specifiers_and_declarator): + Skip duplicate function definitions. + 2006-10-31 Geoffrey Keating (r118360) * name-lookup.c (get_anonymous_namespace_name): New. Modified: stable/10/contrib/gcc/cp/decl.c ============================================================================== --- stable/10/contrib/gcc/cp/decl.c Tue Dec 31 19:39:15 2013 (r260138) +++ stable/10/contrib/gcc/cp/decl.c Tue Dec 31 20:15:21 2013 (r260139) @@ -758,7 +758,12 @@ poplevel (int keep, int reverse, int fun leave_scope (); if (functionbody) - DECL_INITIAL (current_function_decl) = block; + { + /* The current function is being defined, so its DECL_INITIAL + should be error_mark_node. */ + gcc_assert (DECL_INITIAL (current_function_decl) == error_mark_node); + DECL_INITIAL (current_function_decl) = block; + } else if (block) current_binding_level->blocks = chainon (current_binding_level->blocks, block); @@ -1635,13 +1640,15 @@ duplicate_decls (tree newdecl, tree oldd } /* If the new declaration is a definition, update the file and - line information on the declaration. */ + line information on the declaration, and also make + the old declaration the same definition. */ if (DECL_INITIAL (old_result) == NULL_TREE && DECL_INITIAL (new_result) != NULL_TREE) { DECL_SOURCE_LOCATION (olddecl) = DECL_SOURCE_LOCATION (old_result) = DECL_SOURCE_LOCATION (newdecl); + DECL_INITIAL (old_result) = DECL_INITIAL (new_result); if (DECL_FUNCTION_TEMPLATE_P (newdecl)) DECL_ARGUMENTS (old_result) = DECL_ARGUMENTS (new_result); @@ -10509,7 +10516,13 @@ check_function_type (tree decl, tree cur For C++, we must first check whether that datum makes any sense. For example, "class A local_a(1,2);" means that variable local_a is an aggregate of type A, which should have a constructor - applied to it with the argument list [1, 2]. */ + applied to it with the argument list [1, 2]. + + On entry, DECL_INITIAL (decl1) should be NULL_TREE or error_mark_node, + or may be a BLOCK if the function has been defined previously + in this translation unit. On exit, DECL_INITIAL (decl1) will be + error_mark_node if the function has never been defined, or + a BLOCK if the function has been defined somewhere. */ void start_preparsed_function (tree decl1, tree attrs, int flags) @@ -10638,24 +10651,6 @@ start_preparsed_function (tree decl1, tr cp_apply_type_quals_to_decl (cp_type_quals (restype), resdecl); } - /* Initialize RTL machinery. We cannot do this until - CURRENT_FUNCTION_DECL and DECL_RESULT are set up. We do this - even when processing a template; this is how we get - CFUN set up, and our per-function variables initialized. - FIXME factor out the non-RTL stuff. */ - bl = current_binding_level; - allocate_struct_function (decl1); - current_binding_level = bl; - - /* Even though we're inside a function body, we still don't want to - call expand_expr to calculate the size of a variable-sized array. - We haven't necessarily assigned RTL to all variables yet, so it's - not safe to try to expand expressions involving them. */ - cfun->x_dont_save_pending_sizes_p = 1; - - /* Start the statement-tree, start the tree now. */ - DECL_SAVED_TREE (decl1) = push_stmt_list (); - /* Let the user know we're compiling this function. */ announce_function (decl1); @@ -10701,9 +10696,33 @@ start_preparsed_function (tree decl1, tr maybe_apply_pragma_weak (decl1); } - /* Reset these in case the call to pushdecl changed them. */ + /* Reset this in case the call to pushdecl changed it. */ current_function_decl = decl1; - cfun->decl = decl1; + + gcc_assert (DECL_INITIAL (decl1)); + + /* This function may already have been parsed, in which case just + return; our caller will skip over the body without parsing. */ + if (DECL_INITIAL (decl1) != error_mark_node) + return; + + /* Initialize RTL machinery. We cannot do this until + CURRENT_FUNCTION_DECL and DECL_RESULT are set up. We do this + even when processing a template; this is how we get + CFUN set up, and our per-function variables initialized. + FIXME factor out the non-RTL stuff. */ + bl = current_binding_level; + allocate_struct_function (decl1); + current_binding_level = bl; + + /* Even though we're inside a function body, we still don't want to + call expand_expr to calculate the size of a variable-sized array. + We haven't necessarily assigned RTL to all variables yet, so it's + not safe to try to expand expressions involving them. */ + cfun->x_dont_save_pending_sizes_p = 1; + + /* Start the statement-tree, start the tree now. */ + DECL_SAVED_TREE (decl1) = push_stmt_list (); /* If we are (erroneously) defining a function that we have already defined before, wipe out what we knew before. */ @@ -11212,6 +11231,10 @@ finish_function (int flags) which then got a warning when stored in a ptr-to-function variable. */ gcc_assert (building_stmt_tree ()); + /* The current function is being defined, so its DECL_INITIAL should + be set, and unless there's a multiple definition, it should be + error_mark_node. */ + gcc_assert (DECL_INITIAL (fndecl) == error_mark_node); /* For a cloned function, we've already got all the code we need; there's no need to add any extra bits. */ Modified: stable/10/contrib/gcc/cp/method.c ============================================================================== --- stable/10/contrib/gcc/cp/method.c Tue Dec 31 19:39:15 2013 (r260138) +++ stable/10/contrib/gcc/cp/method.c Tue Dec 31 20:15:21 2013 (r260139) @@ -407,10 +407,6 @@ use_thunk (tree thunk_fndecl, bool emit_ } } - /* The back-end expects DECL_INITIAL to contain a BLOCK, so we - create one. */ - DECL_INITIAL (thunk_fndecl) = make_node (BLOCK); - /* Set up cloned argument trees for the thunk. */ t = NULL_TREE; for (a = DECL_ARGUMENTS (function); a; a = TREE_CHAIN (a)) @@ -424,17 +420,23 @@ use_thunk (tree thunk_fndecl, bool emit_ } a = nreverse (t); DECL_ARGUMENTS (thunk_fndecl) = a; - BLOCK_VARS (DECL_INITIAL (thunk_fndecl)) = a; if (this_adjusting && targetm.asm_out.can_output_mi_thunk (thunk_fndecl, fixed_offset, virtual_value, alias)) { const char *fnname; + tree fn_block; + current_function_decl = thunk_fndecl; DECL_RESULT (thunk_fndecl) = build_decl (RESULT_DECL, 0, integer_type_node); fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0); + /* The back-end expects DECL_INITIAL to contain a BLOCK, so we + create one. */ + fn_block = make_node (BLOCK); + BLOCK_VARS (fn_block) = a; + DECL_INITIAL (thunk_fndecl) = fn_block; init_function_start (thunk_fndecl); current_function_is_thunk = 1; assemble_start_function (thunk_fndecl, fnname); Modified: stable/10/contrib/gcc/cp/parser.c ============================================================================== --- stable/10/contrib/gcc/cp/parser.c Tue Dec 31 19:39:15 2013 (r260138) +++ stable/10/contrib/gcc/cp/parser.c Tue Dec 31 20:15:21 2013 (r260139) @@ -15637,6 +15637,16 @@ cp_parser_function_definition_from_speci cp_parser_skip_to_end_of_block_or_statement (parser); fn = error_mark_node; } + else if (DECL_INITIAL (current_function_decl) != error_mark_node) + { + /* Seen already, skip it. An error message has already been output. */ + cp_parser_skip_to_end_of_block_or_statement (parser); + fn = current_function_decl; + current_function_decl = NULL_TREE; + /* If this is a function from a class, pop the nested class. */ + if (current_class_name) + pop_nested_class (); + } else fn = cp_parser_function_definition_after_declarator (parser, /*inline_p=*/false); Modified: stable/10/contrib/gcc/doc/cppopts.texi ============================================================================== --- stable/10/contrib/gcc/doc/cppopts.texi Tue Dec 31 19:39:15 2013 (r260138) +++ stable/10/contrib/gcc/doc/cppopts.texi Tue Dec 31 20:15:21 2013 (r260139) @@ -645,6 +645,10 @@ touch foo.h; cpp -dM foo.h @noindent will show all the predefined macros. +If you use @option{-dM} without the @option{-E} option, @option{-dM} is +interpreted as a synonym for @option{-fdump-rtl-mach}. +@xref{Debugging Options, , ,gcc}. + @item D @opindex dD Like @samp{M} except in two respects: it does @emph{not} include the Modified: stable/10/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/10/contrib/gcc/doc/invoke.texi Tue Dec 31 19:39:15 2013 (r260138) +++ stable/10/contrib/gcc/doc/invoke.texi Tue Dec 31 20:15:21 2013 (r260139) @@ -3683,7 +3683,9 @@ Says to make debugging dumps during comp compiler. The file names for most of the dumps are made by appending a pass number and a word to the @var{dumpname}. @var{dumpname} is generated from the name of the output file, if explicitly specified and it is not -an executable, otherwise it is the basename of the source file. +an executable, otherwise it is the basename of the source file. These +switches may have different effects when @option{-E} is used for +preprocessing. Most debug dumps can be enabled either passing a letter to the @option{-d} option, or with a long @option{-fdump-rtl} switch; here are the possible @@ -3818,7 +3820,7 @@ Dump after modulo scheduling, to @file{@ @opindex dM @opindex fdump-rtl-mach Dump after performing the machine dependent reorganization pass, to -@file{@var{file}.155r.mach}. +@file{@var{file}.155r.mach} if that pass exists. @item -dn @itemx -fdump-rtl-rnreg From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 20:18:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBDBB818; Tue, 31 Dec 2013 20:18:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB2B41DBE; Tue, 31 Dec 2013 20:18:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVKICwx063368; Tue, 31 Dec 2013 20:18:12 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVKIB6R063354; Tue, 31 Dec 2013 20:18:11 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312312018.rBVKIB6R063354@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 31 Dec 2013 20:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260140 - in stable/9/contrib/gcc: . config/rs6000 cp doc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 20:18:13 -0000 Author: pfg Date: Tue Dec 31 20:18:10 2013 New Revision: 260140 URL: http://svnweb.freebsd.org/changeset/base/260140 Log: MFC r259525, r259526, r259529 gcc: small merges from upstream fix ICE in rs6000 when using -fno-trapping-math. Solves GCC-PR target/30485 Solve GCC issues: PR middle-end/32602 PR middle-end/32603 Updates the to documentation and processing improvement. Obtained from: gcc 4.3 (rev. 120902, 120902, 119427, 126278, 126422; GPLv2) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/calls.c stable/9/contrib/gcc/config/rs6000/rs6000.c stable/9/contrib/gcc/cp/decl.c stable/9/contrib/gcc/cp/method.c stable/9/contrib/gcc/cp/parser.c stable/9/contrib/gcc/doc/cppopts.texi stable/9/contrib/gcc/doc/invoke.texi Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcc/ChangeLog.gcc43 Tue Dec 31 20:15:21 2013 (r260139) +++ stable/9/contrib/gcc/ChangeLog.gcc43 Tue Dec 31 20:18:10 2013 (r260140) @@ -45,6 +45,20 @@ * flags.h (force_align_functions_log): Delete. * toplev.c (force_align_functions_log): Delete. +2007-07-06 Josh Conner (r126422) + + PR middle-end/32602 + PR middle-end/32603 + * calls.c (store_one_arg): Handle arguments which are partially + on the stack when detecting argument overlap. + +2007-07-03 Eric Christopher (r126278) + + * doc/cppopts.texi: Add conflicting option note to -dM. + * doc/invoke.texi: Add note about possible conflicts with + -E for -dCHARS and note that -dM will not produce + any results if there is no machine dependent reorg. + 2007-06-28 Geoffrey Keating (r126088) * doc/invoke.texi (C++ Dialect Options): Document @@ -395,6 +409,12 @@ (override_options): Add PTA_CX16 flag. Set x86_cmpxchg16b for CPUs that have PTA_CX16 set. +2007-01-18 Josh Conner (r120902) + + PR target/30485 + * config/rs6000/rs6000.c (rs6000_emit_vector_compare): Add + support for UNLE, UNLT, UNGE, and UNGT. + 2007-01-17 Eric Christopher (r120846) * config.gcc: Support core2 processor. Modified: stable/9/contrib/gcc/calls.c ============================================================================== --- stable/9/contrib/gcc/calls.c Tue Dec 31 20:15:21 2013 (r260139) +++ stable/9/contrib/gcc/calls.c Tue Dec 31 20:18:10 2013 (r260140) @@ -4297,6 +4297,7 @@ store_one_arg (struct arg_data *arg, rtx /* expand_call should ensure this. */ gcc_assert (!arg->locate.offset.var + && arg->locate.size.var == 0 && GET_CODE (size_rtx) == CONST_INT); if (arg->locate.offset.constant > i) @@ -4306,7 +4307,21 @@ store_one_arg (struct arg_data *arg, rtx } else if (arg->locate.offset.constant < i) { - if (i < arg->locate.offset.constant + INTVAL (size_rtx)) + /* Use arg->locate.size.constant instead of size_rtx + because we only care about the part of the argument + on the stack. */ + if (i < (arg->locate.offset.constant + + arg->locate.size.constant)) + sibcall_failure = 1; + } + else + { + /* Even though they appear to be at the same location, + if part of the outgoing argument is in registers, + they aren't really at the same location. Check for + this by making sure that the incoming size is the + same as the outgoing size. */ + if (arg->locate.size.constant != INTVAL (size_rtx)) sibcall_failure = 1; } } Modified: stable/9/contrib/gcc/config/rs6000/rs6000.c ============================================================================== --- stable/9/contrib/gcc/config/rs6000/rs6000.c Tue Dec 31 20:15:21 2013 (r260139) +++ stable/9/contrib/gcc/config/rs6000/rs6000.c Tue Dec 31 20:18:10 2013 (r260140) @@ -11738,10 +11738,18 @@ rs6000_emit_vector_compare (enum rtx_cod try_again = true; break; case NE: - /* Treat A != B as ~(A==B). */ + case UNLE: + case UNLT: + case UNGE: + case UNGT: + /* Invert condition and try again. + e.g., A != B becomes ~(A==B). */ { + enum rtx_code rev_code; enum insn_code nor_code; - rtx eq_rtx = rs6000_emit_vector_compare (EQ, op0, op1, + + rev_code = reverse_condition_maybe_unordered (rcode); + rtx eq_rtx = rs6000_emit_vector_compare (rev_code, op0, op1, dest_mode); nor_code = one_cmpl_optab->handlers[(int)dest_mode].insn_code; Modified: stable/9/contrib/gcc/cp/decl.c ============================================================================== --- stable/9/contrib/gcc/cp/decl.c Tue Dec 31 20:15:21 2013 (r260139) +++ stable/9/contrib/gcc/cp/decl.c Tue Dec 31 20:18:10 2013 (r260140) @@ -758,7 +758,12 @@ poplevel (int keep, int reverse, int fun leave_scope (); if (functionbody) - DECL_INITIAL (current_function_decl) = block; + { + /* The current function is being defined, so its DECL_INITIAL + should be error_mark_node. */ + gcc_assert (DECL_INITIAL (current_function_decl) == error_mark_node); + DECL_INITIAL (current_function_decl) = block; + } else if (block) current_binding_level->blocks = chainon (current_binding_level->blocks, block); @@ -1635,13 +1640,15 @@ duplicate_decls (tree newdecl, tree oldd } /* If the new declaration is a definition, update the file and - line information on the declaration. */ + line information on the declaration, and also make + the old declaration the same definition. */ if (DECL_INITIAL (old_result) == NULL_TREE && DECL_INITIAL (new_result) != NULL_TREE) { DECL_SOURCE_LOCATION (olddecl) = DECL_SOURCE_LOCATION (old_result) = DECL_SOURCE_LOCATION (newdecl); + DECL_INITIAL (old_result) = DECL_INITIAL (new_result); if (DECL_FUNCTION_TEMPLATE_P (newdecl)) DECL_ARGUMENTS (old_result) = DECL_ARGUMENTS (new_result); @@ -10509,7 +10516,13 @@ check_function_type (tree decl, tree cur For C++, we must first check whether that datum makes any sense. For example, "class A local_a(1,2);" means that variable local_a is an aggregate of type A, which should have a constructor - applied to it with the argument list [1, 2]. */ + applied to it with the argument list [1, 2]. + + On entry, DECL_INITIAL (decl1) should be NULL_TREE or error_mark_node, + or may be a BLOCK if the function has been defined previously + in this translation unit. On exit, DECL_INITIAL (decl1) will be + error_mark_node if the function has never been defined, or + a BLOCK if the function has been defined somewhere. */ void start_preparsed_function (tree decl1, tree attrs, int flags) @@ -10638,24 +10651,6 @@ start_preparsed_function (tree decl1, tr cp_apply_type_quals_to_decl (cp_type_quals (restype), resdecl); } - /* Initialize RTL machinery. We cannot do this until - CURRENT_FUNCTION_DECL and DECL_RESULT are set up. We do this - even when processing a template; this is how we get - CFUN set up, and our per-function variables initialized. - FIXME factor out the non-RTL stuff. */ - bl = current_binding_level; - allocate_struct_function (decl1); - current_binding_level = bl; - - /* Even though we're inside a function body, we still don't want to - call expand_expr to calculate the size of a variable-sized array. - We haven't necessarily assigned RTL to all variables yet, so it's - not safe to try to expand expressions involving them. */ - cfun->x_dont_save_pending_sizes_p = 1; - - /* Start the statement-tree, start the tree now. */ - DECL_SAVED_TREE (decl1) = push_stmt_list (); - /* Let the user know we're compiling this function. */ announce_function (decl1); @@ -10701,9 +10696,33 @@ start_preparsed_function (tree decl1, tr maybe_apply_pragma_weak (decl1); } - /* Reset these in case the call to pushdecl changed them. */ + /* Reset this in case the call to pushdecl changed it. */ current_function_decl = decl1; - cfun->decl = decl1; + + gcc_assert (DECL_INITIAL (decl1)); + + /* This function may already have been parsed, in which case just + return; our caller will skip over the body without parsing. */ + if (DECL_INITIAL (decl1) != error_mark_node) + return; + + /* Initialize RTL machinery. We cannot do this until + CURRENT_FUNCTION_DECL and DECL_RESULT are set up. We do this + even when processing a template; this is how we get + CFUN set up, and our per-function variables initialized. + FIXME factor out the non-RTL stuff. */ + bl = current_binding_level; + allocate_struct_function (decl1); + current_binding_level = bl; + + /* Even though we're inside a function body, we still don't want to + call expand_expr to calculate the size of a variable-sized array. + We haven't necessarily assigned RTL to all variables yet, so it's + not safe to try to expand expressions involving them. */ + cfun->x_dont_save_pending_sizes_p = 1; + + /* Start the statement-tree, start the tree now. */ + DECL_SAVED_TREE (decl1) = push_stmt_list (); /* If we are (erroneously) defining a function that we have already defined before, wipe out what we knew before. */ @@ -11212,6 +11231,10 @@ finish_function (int flags) which then got a warning when stored in a ptr-to-function variable. */ gcc_assert (building_stmt_tree ()); + /* The current function is being defined, so its DECL_INITIAL should + be set, and unless there's a multiple definition, it should be + error_mark_node. */ + gcc_assert (DECL_INITIAL (fndecl) == error_mark_node); /* For a cloned function, we've already got all the code we need; there's no need to add any extra bits. */ Modified: stable/9/contrib/gcc/cp/method.c ============================================================================== --- stable/9/contrib/gcc/cp/method.c Tue Dec 31 20:15:21 2013 (r260139) +++ stable/9/contrib/gcc/cp/method.c Tue Dec 31 20:18:10 2013 (r260140) @@ -407,10 +407,6 @@ use_thunk (tree thunk_fndecl, bool emit_ } } - /* The back-end expects DECL_INITIAL to contain a BLOCK, so we - create one. */ - DECL_INITIAL (thunk_fndecl) = make_node (BLOCK); - /* Set up cloned argument trees for the thunk. */ t = NULL_TREE; for (a = DECL_ARGUMENTS (function); a; a = TREE_CHAIN (a)) @@ -424,17 +420,23 @@ use_thunk (tree thunk_fndecl, bool emit_ } a = nreverse (t); DECL_ARGUMENTS (thunk_fndecl) = a; - BLOCK_VARS (DECL_INITIAL (thunk_fndecl)) = a; if (this_adjusting && targetm.asm_out.can_output_mi_thunk (thunk_fndecl, fixed_offset, virtual_value, alias)) { const char *fnname; + tree fn_block; + current_function_decl = thunk_fndecl; DECL_RESULT (thunk_fndecl) = build_decl (RESULT_DECL, 0, integer_type_node); fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0); + /* The back-end expects DECL_INITIAL to contain a BLOCK, so we + create one. */ + fn_block = make_node (BLOCK); + BLOCK_VARS (fn_block) = a; + DECL_INITIAL (thunk_fndecl) = fn_block; init_function_start (thunk_fndecl); current_function_is_thunk = 1; assemble_start_function (thunk_fndecl, fnname); Modified: stable/9/contrib/gcc/cp/parser.c ============================================================================== --- stable/9/contrib/gcc/cp/parser.c Tue Dec 31 20:15:21 2013 (r260139) +++ stable/9/contrib/gcc/cp/parser.c Tue Dec 31 20:18:10 2013 (r260140) @@ -15637,6 +15637,16 @@ cp_parser_function_definition_from_speci cp_parser_skip_to_end_of_block_or_statement (parser); fn = error_mark_node; } + else if (DECL_INITIAL (current_function_decl) != error_mark_node) + { + /* Seen already, skip it. An error message has already been output. */ + cp_parser_skip_to_end_of_block_or_statement (parser); + fn = current_function_decl; + current_function_decl = NULL_TREE; + /* If this is a function from a class, pop the nested class. */ + if (current_class_name) + pop_nested_class (); + } else fn = cp_parser_function_definition_after_declarator (parser, /*inline_p=*/false); Modified: stable/9/contrib/gcc/doc/cppopts.texi ============================================================================== --- stable/9/contrib/gcc/doc/cppopts.texi Tue Dec 31 20:15:21 2013 (r260139) +++ stable/9/contrib/gcc/doc/cppopts.texi Tue Dec 31 20:18:10 2013 (r260140) @@ -645,6 +645,10 @@ touch foo.h; cpp -dM foo.h @noindent will show all the predefined macros. +If you use @option{-dM} without the @option{-E} option, @option{-dM} is +interpreted as a synonym for @option{-fdump-rtl-mach}. +@xref{Debugging Options, , ,gcc}. + @item D @opindex dD Like @samp{M} except in two respects: it does @emph{not} include the Modified: stable/9/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/9/contrib/gcc/doc/invoke.texi Tue Dec 31 20:15:21 2013 (r260139) +++ stable/9/contrib/gcc/doc/invoke.texi Tue Dec 31 20:18:10 2013 (r260140) @@ -3683,7 +3683,9 @@ Says to make debugging dumps during comp compiler. The file names for most of the dumps are made by appending a pass number and a word to the @var{dumpname}. @var{dumpname} is generated from the name of the output file, if explicitly specified and it is not -an executable, otherwise it is the basename of the source file. +an executable, otherwise it is the basename of the source file. These +switches may have different effects when @option{-E} is used for +preprocessing. Most debug dumps can be enabled either passing a letter to the @option{-d} option, or with a long @option{-fdump-rtl} switch; here are the possible @@ -3818,7 +3820,7 @@ Dump after modulo scheduling, to @file{@ @opindex dM @opindex fdump-rtl-mach Dump after performing the machine dependent reorganization pass, to -@file{@var{file}.155r.mach}. +@file{@var{file}.155r.mach} if that pass exists. @item -dn @itemx -fdump-rtl-rnreg From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 21:24:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02B07D9F; Tue, 31 Dec 2013 21:24:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D69CB1179; Tue, 31 Dec 2013 21:24:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVLO0C0089081; Tue, 31 Dec 2013 21:24:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVLO04d089078; Tue, 31 Dec 2013 21:24:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312312124.rBVLO04d089078@svn.freebsd.org> From: Xin LI Date: Tue, 31 Dec 2013 21:24:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260141 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 21:24:01 -0000 Author: delphij Date: Tue Dec 31 21:24:00 2013 New Revision: 260141 URL: http://svnweb.freebsd.org/changeset/base/260141 Log: MFV r258385: (Note: this change is not applicable to FreeBSD and the file is not included in build. It's integrated for completeness). 4128 disks in zpools never go away when pulled illumos/illumos-gate@39cddb10a31c1c2e66aed69e6871d09caa4c8147 MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_disk.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_disk.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_disk.h Tue Dec 31 20:18:10 2013 (r260140) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_disk.h Tue Dec 31 21:24:00 2013 (r260141) @@ -22,6 +22,7 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * Copyright (c) 2013 Joyent, Inc. All rights reserved. + * Copyright 2012 Nexenta Systems, Inc. All rights reserved. */ #ifndef _SYS_VDEV_DISK_H @@ -44,6 +45,8 @@ typedef struct vdev_disk { ddi_devid_t vd_devid; char *vd_minor; ldi_handle_t vd_lh; + list_t vd_ldi_cbs; + boolean_t vd_ldi_offline; } vdev_disk_t; #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Tue Dec 31 20:18:10 2013 (r260140) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Tue Dec 31 21:24:00 2013 (r260141) @@ -22,7 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. - * Copyright 2013 Joyent, Inc. All rights reserved. + * Copyright (c) 2013 Joyent, Inc. All rights reserved. */ #include @@ -42,6 +42,146 @@ extern ldi_ident_t zfs_li; +static void vdev_disk_close(vdev_t *); + +typedef struct vdev_disk_ldi_cb { + list_node_t lcb_next; + ldi_callback_id_t lcb_id; +} vdev_disk_ldi_cb_t; + +static void +vdev_disk_alloc(vdev_t *vd) +{ + vdev_disk_t *dvd; + + dvd = vd->vdev_tsd = kmem_zalloc(sizeof (vdev_disk_t), KM_SLEEP); + /* + * Create the LDI event callback list. + */ + list_create(&dvd->vd_ldi_cbs, sizeof (vdev_disk_ldi_cb_t), + offsetof(vdev_disk_ldi_cb_t, lcb_next)); +} + +static void +vdev_disk_free(vdev_t *vd) +{ + vdev_disk_t *dvd = vd->vdev_tsd; + vdev_disk_ldi_cb_t *lcb; + + if (dvd == NULL) + return; + + /* + * We have already closed the LDI handle. Clean up the LDI event + * callbacks and free vd->vdev_tsd. + */ + while ((lcb = list_head(&dvd->vd_ldi_cbs)) != NULL) { + list_remove(&dvd->vd_ldi_cbs, lcb); + (void) ldi_ev_remove_callbacks(lcb->lcb_id); + kmem_free(lcb, sizeof (vdev_disk_ldi_cb_t)); + } + list_destroy(&dvd->vd_ldi_cbs); + kmem_free(dvd, sizeof (vdev_disk_t)); + vd->vdev_tsd = NULL; +} + +/* ARGSUSED */ +static int +vdev_disk_off_notify(ldi_handle_t lh, ldi_ev_cookie_t ecookie, void *arg, + void *ev_data) +{ + vdev_t *vd = (vdev_t *)arg; + vdev_disk_t *dvd = vd->vdev_tsd; + + /* + * Ignore events other than offline. + */ + if (strcmp(ldi_ev_get_type(ecookie), LDI_EV_OFFLINE) != 0) + return (LDI_EV_SUCCESS); + + /* + * All LDI handles must be closed for the state change to succeed, so + * call on vdev_disk_close() to do this. + * + * We inform vdev_disk_close that it is being called from offline + * notify context so it will defer cleanup of LDI event callbacks and + * freeing of vd->vdev_tsd to the offline finalize or a reopen. + */ + dvd->vd_ldi_offline = B_TRUE; + vdev_disk_close(vd); + + /* + * Now that the device is closed, request that the spa_async_thread + * mark the device as REMOVED and notify FMA of the removal. + */ + zfs_post_remove(vd->vdev_spa, vd); + vd->vdev_remove_wanted = B_TRUE; + spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + + return (LDI_EV_SUCCESS); +} + +/* ARGSUSED */ +static void +vdev_disk_off_finalize(ldi_handle_t lh, ldi_ev_cookie_t ecookie, + int ldi_result, void *arg, void *ev_data) +{ + vdev_t *vd = (vdev_t *)arg; + + /* + * Ignore events other than offline. + */ + if (strcmp(ldi_ev_get_type(ecookie), LDI_EV_OFFLINE) != 0) + return; + + /* + * We have already closed the LDI handle in notify. + * Clean up the LDI event callbacks and free vd->vdev_tsd. + */ + vdev_disk_free(vd); + + /* + * Request that the vdev be reopened if the offline state change was + * unsuccessful. + */ + if (ldi_result != LDI_EV_SUCCESS) { + vd->vdev_probe_wanted = B_TRUE; + spa_async_request(vd->vdev_spa, SPA_ASYNC_PROBE); + } +} + +static ldi_ev_callback_t vdev_disk_off_callb = { + .cb_vers = LDI_EV_CB_VERS, + .cb_notify = vdev_disk_off_notify, + .cb_finalize = vdev_disk_off_finalize +}; + +/* ARGSUSED */ +static void +vdev_disk_dgrd_finalize(ldi_handle_t lh, ldi_ev_cookie_t ecookie, + int ldi_result, void *arg, void *ev_data) +{ + vdev_t *vd = (vdev_t *)arg; + + /* + * Ignore events other than degrade. + */ + if (strcmp(ldi_ev_get_type(ecookie), LDI_EV_DEGRADE) != 0) + return; + + /* + * Degrade events always succeed. Mark the vdev as degraded. + * This status is purely informative for the user. + */ + (void) vdev_degrade(vd->vdev_spa, vd->vdev_guid, 0); +} + +static ldi_ev_callback_t vdev_disk_dgrd_callb = { + .cb_vers = LDI_EV_CB_VERS, + .cb_notify = NULL, + .cb_finalize = vdev_disk_dgrd_finalize +}; + static void vdev_disk_hold(vdev_t *vd) { @@ -146,7 +286,9 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi uint64_t *ashift) { spa_t *spa = vd->vdev_spa; - vdev_disk_t *dvd; + vdev_disk_t *dvd = vd->vdev_tsd; + ldi_ev_cookie_t ecookie; + vdev_disk_ldi_cb_t *lcb; union { struct dk_minfo_ext ude; struct dk_minfo ud; @@ -172,13 +314,25 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi * Reopen the device if it's not currently open. Otherwise, * just update the physical size of the device. */ - if (vd->vdev_tsd != NULL) { - ASSERT(vd->vdev_reopening); - dvd = vd->vdev_tsd; - goto skip_open; + if (dvd != NULL) { + if (dvd->vd_ldi_offline && dvd->vd_lh == NULL) { + /* + * If we are opening a device in its offline notify + * context, the LDI handle was just closed. Clean + * up the LDI event callbacks and free vd->vdev_tsd. + */ + vdev_disk_free(vd); + } else { + ASSERT(vd->vdev_reopening); + goto skip_open; + } } - dvd = vd->vdev_tsd = kmem_zalloc(sizeof (vdev_disk_t), KM_SLEEP); + /* + * Create vd->vdev_tsd. + */ + vdev_disk_alloc(vd); + dvd = vd->vdev_tsd; /* * When opening a disk device, we want to preserve the user's original @@ -211,23 +365,28 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi if (vd->vdev_wholedisk == -1ULL) { size_t len = strlen(vd->vdev_path) + 3; char *buf = kmem_alloc(len, KM_SLEEP); - ldi_handle_t lh; (void) snprintf(buf, len, "%ss0", vd->vdev_path); - if (ldi_open_by_name(buf, spa_mode(spa), kcred, - &lh, zfs_li) == 0) { + error = ldi_open_by_name(buf, spa_mode(spa), kcred, + &dvd->vd_lh, zfs_li); + if (error == 0) { spa_strfree(vd->vdev_path); vd->vdev_path = buf; vd->vdev_wholedisk = 1ULL; - (void) ldi_close(lh, spa_mode(spa), kcred); } else { kmem_free(buf, len); } } - error = ldi_open_by_name(vd->vdev_path, spa_mode(spa), kcred, - &dvd->vd_lh, zfs_li); + /* + * If we have not yet opened the device, try to open it by the + * specified path. + */ + if (error != 0) { + error = ldi_open_by_name(vd->vdev_path, spa_mode(spa), + kcred, &dvd->vd_lh, zfs_li); + } /* * Compare the devid to the stored value. @@ -334,6 +493,27 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi kmem_free(physpath, MAXPATHLEN); } + /* + * Register callbacks for the LDI offline event. + */ + if (ldi_ev_get_cookie(dvd->vd_lh, LDI_EV_OFFLINE, &ecookie) == + LDI_EV_SUCCESS) { + lcb = kmem_zalloc(sizeof (vdev_disk_ldi_cb_t), KM_SLEEP); + list_insert_tail(&dvd->vd_ldi_cbs, lcb); + (void) ldi_ev_register_callbacks(dvd->vd_lh, ecookie, + &vdev_disk_off_callb, (void *) vd, &lcb->lcb_id); + } + + /* + * Register callbacks for the LDI degrade event. + */ + if (ldi_ev_get_cookie(dvd->vd_lh, LDI_EV_DEGRADE, &ecookie) == + LDI_EV_SUCCESS) { + lcb = kmem_zalloc(sizeof (vdev_disk_ldi_cb_t), KM_SLEEP); + list_insert_tail(&dvd->vd_ldi_cbs, lcb); + (void) ldi_ev_register_callbacks(dvd->vd_lh, ecookie, + &vdev_disk_dgrd_callb, (void *) vd, &lcb->lcb_id); + } skip_open: /* * Determine the actual size of the device. @@ -412,18 +592,31 @@ vdev_disk_close(vdev_t *vd) if (vd->vdev_reopening || dvd == NULL) return; - if (dvd->vd_minor != NULL) + if (dvd->vd_minor != NULL) { ddi_devid_str_free(dvd->vd_minor); + dvd->vd_minor = NULL; + } - if (dvd->vd_devid != NULL) + if (dvd->vd_devid != NULL) { ddi_devid_free(dvd->vd_devid); + dvd->vd_devid = NULL; + } - if (dvd->vd_lh != NULL) + if (dvd->vd_lh != NULL) { (void) ldi_close(dvd->vd_lh, spa_mode(vd->vdev_spa), kcred); + dvd->vd_lh = NULL; + } vd->vdev_delayed_close = B_FALSE; - kmem_free(dvd, sizeof (vdev_disk_t)); - vd->vdev_tsd = NULL; + /* + * If we closed the LDI handle due to an offline notify from LDI, + * don't free vd->vdev_tsd or unregister the callbacks here; + * the offline finalize callback or a reopen will take care of it. + */ + if (dvd->vd_ldi_offline) + return; + + vdev_disk_free(vd); } int @@ -432,6 +625,13 @@ vdev_disk_physio(vdev_t *vd, caddr_t dat { vdev_disk_t *dvd = vd->vdev_tsd; + /* + * If the vdev is closed, it's likely in the REMOVED or FAULTED state. + * Nothing to be done here but return failure. + */ + if (dvd == NULL || (dvd->vd_ldi_offline && dvd->vd_lh == NULL)) + return (EIO); + ASSERT(vd->vdev_ops == &vdev_disk_ops); /* @@ -527,6 +727,15 @@ vdev_disk_io_start(zio_t *zio) buf_t *bp; int error; + /* + * If the vdev is closed, it's likely in the REMOVED or FAULTED state. + * Nothing to be done here but return failure. + */ + if (dvd == NULL || (dvd->vd_ldi_offline && dvd->vd_lh == NULL)) { + zio->io_error = ENXIO; + return (ZIO_PIPELINE_CONTINUE); + } + if (zio->io_type == ZIO_TYPE_IOCTL) { /* XXPOLICY */ if (!vdev_readable(vd)) { From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 21:37:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C403CFAE; Tue, 31 Dec 2013 21:37:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ADC1E1223; Tue, 31 Dec 2013 21:37:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVLbPhd093213; Tue, 31 Dec 2013 21:37:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVLbPUe093210; Tue, 31 Dec 2013 21:37:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312312137.rBVLbPUe093210@svn.freebsd.org> From: Xin LI Date: Tue, 31 Dec 2013 21:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260142 - head/cddl/contrib/opensolaris/cmd/zstreamdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 21:37:25 -0000 Author: delphij Date: Tue Dec 31 21:37:24 2013 New Revision: 260142 URL: http://svnweb.freebsd.org/changeset/base/260142 Log: MFV r258972: 4373 add block contents print to zstreamdump illumos/illumos-gate@994fb6b8a9d07a8021d77d79f46e30637bca3ad3 MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Tue Dec 31 21:24:00 2013 (r260141) +++ head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Tue Dec 31 21:37:24 2013 (r260142) @@ -18,10 +18,11 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved. +.\" Copyright (c) 2013, Delphix. All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd November 26, 2011 +.Dd December 31, 2013 .Dt ZSTREAMDUMP 8 .Os .Sh NAME @@ -30,6 +31,7 @@ .Sh SYNOPSIS .Nm .Op Fl C +.Op Fl d .Op Fl v .Sh DESCRIPTION The @@ -43,6 +45,8 @@ The following options are supported: .Bl -tag -width indent .It Fl C Suppress the validation of checksums. +.It Fl d +Dump contents of blocks modified, implies verbose. .It Fl v Verbose. Dump all headers, not only begin and end headers. .El Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Tue Dec 31 21:24:00 2013 (r260141) +++ head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Tue Dec 31 21:37:24 2013 (r260142) @@ -24,6 +24,11 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2013 by Delphix. All rights reserved. + */ + +#include #include #include #include @@ -34,6 +39,16 @@ #include #include +/* + * If dump mode is enabled, the number of bytes to print per line + */ +#define BYTES_PER_LINE 16 +/* + * If dump mode is enabled, the number of bytes to group together, separated + * by newlines or spaces + */ +#define DUMP_GROUPING 4 + uint64_t drr_record_count[DRR_NUMTYPES]; uint64_t total_write_size = 0; uint64_t total_stream_len = 0; @@ -45,9 +60,11 @@ boolean_t do_cksum = B_TRUE; static void usage(void) { - (void) fprintf(stderr, "usage: zstreamdump [-v] [-C] < file\n"); + (void) fprintf(stderr, "usage: zstreamdump [-v] [-C] [-d] < file\n"); (void) fprintf(stderr, "\t -v -- verbose\n"); (void) fprintf(stderr, "\t -C -- suppress checksum verification\n"); + (void) fprintf(stderr, "\t -d -- dump contents of blocks modified, " + "implies verbose\n"); exit(1); } @@ -75,6 +92,70 @@ ssread(void *buf, size_t len, zio_cksum_ return (outlen); } +/* + * Print part of a block in ASCII characters + */ +static void +print_ascii_block(char *subbuf, int length) +{ + int i; + + for (i = 0; i < length; i++) { + char char_print = isprint(subbuf[i]) ? subbuf[i] : '.'; + if (i != 0 && i % DUMP_GROUPING == 0) { + (void) printf(" "); + } + (void) printf("%c", char_print); + } + (void) printf("\n"); +} + +/* + * print_block - Dump the contents of a modified block to STDOUT + * + * Assume that buf has capacity evenly divisible by BYTES_PER_LINE + */ +static void +print_block(char *buf, int length) +{ + int i; + /* + * Start printing ASCII characters at a constant offset, after + * the hex prints. Leave 3 characters per byte on a line (2 digit + * hex number plus 1 space) plus spaces between characters and + * groupings + */ + int ascii_start = BYTES_PER_LINE * 3 + + BYTES_PER_LINE / DUMP_GROUPING + 2; + + for (i = 0; i < length; i += BYTES_PER_LINE) { + int j; + int this_line_length = MIN(BYTES_PER_LINE, length - i); + int print_offset = 0; + + for (j = 0; j < this_line_length; j++) { + int buf_offset = i + j; + + /* + * Separate every DUMP_GROUPING bytes by a space. + */ + if (buf_offset % DUMP_GROUPING == 0) { + print_offset += printf(" "); + } + + /* + * Print the two-digit hex value for this byte. + */ + unsigned char hex_print = buf[buf_offset]; + print_offset += printf("%02x ", hex_print); + } + + (void) printf("%*s", ascii_start - print_offset, " "); + + print_ascii_block(buf + i, this_line_length); + } +} + int main(int argc, char *argv[]) { @@ -92,11 +173,17 @@ main(int argc, char *argv[]) char c; boolean_t verbose = B_FALSE; boolean_t first = B_TRUE; + /* + * dump flag controls whether the contents of any modified data blocks + * are printed to the console during processing of the stream. Warning: + * for large streams, this can obviously lead to massive prints. + */ + boolean_t dump = B_FALSE; int err; zio_cksum_t zc = { 0 }; zio_cksum_t pcksum = { 0 }; - while ((c = getopt(argc, argv, ":vC")) != -1) { + while ((c = getopt(argc, argv, ":vCd")) != -1) { switch (c) { case 'C': do_cksum = B_FALSE; @@ -104,6 +191,10 @@ main(int argc, char *argv[]) case 'v': verbose = B_TRUE; break; + case 'd': + dump = B_TRUE; + verbose = B_TRUE; + break; case ':': (void) fprintf(stderr, "missing argument for '%c' option\n", optopt); @@ -128,6 +219,10 @@ main(int argc, char *argv[]) pcksum = zc; while (ssread(drr, sizeof (dmu_replay_record_t), &zc)) { + /* + * If this is the first DMU record being processed, check for + * the magic bytes and figure out the endian-ness based on them. + */ if (first) { if (drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) { do_byteswap = B_TRUE; @@ -209,7 +304,7 @@ main(int argc, char *argv[]) nvlist_t *nv; int sz = drr->drr_payloadlen; - if (sz > 1<<20) { + if (sz > INITIAL_BUFLEN) { free(buf); buf = malloc(sz); } @@ -283,6 +378,10 @@ main(int argc, char *argv[]) if (drro->drr_bonuslen > 0) { (void) ssread(buf, P2ROUNDUP(drro->drr_bonuslen, 8), &zc); + if (dump) { + print_block(buf, + P2ROUNDUP(drro->drr_bonuslen, 8)); + } } break; @@ -312,6 +411,10 @@ main(int argc, char *argv[]) drrw->drr_key.ddk_prop = BSWAP_64(drrw->drr_key.ddk_prop); } + /* + * If this is verbose and/or dump output, + * print info on the modified block + */ if (verbose) { (void) printf("WRITE object = %llu type = %u " "checksum type = %u\n" @@ -324,7 +427,16 @@ main(int argc, char *argv[]) (u_longlong_t)drrw->drr_length, (u_longlong_t)drrw->drr_key.ddk_prop); } + /* + * Read the contents of the block in from STDIN to buf + */ (void) ssread(buf, drrw->drr_length, &zc); + /* + * If in dump mode + */ + if (dump) { + print_block(buf, drrw->drr_length); + } total_write_size += drrw->drr_length; break; @@ -390,6 +502,9 @@ main(int argc, char *argv[]) drrs->drr_length); } (void) ssread(buf, drrs->drr_length, &zc); + if (dump) { + print_block(buf, drrs->drr_length); + } break; } pcksum = zc; From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 21:56:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1141C4C4; Tue, 31 Dec 2013 21:56:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D688C1348; Tue, 31 Dec 2013 21:56:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVLu2gL000498; Tue, 31 Dec 2013 21:56:02 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVLu2uT000494; Tue, 31 Dec 2013 21:56:02 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201312312156.rBVLu2uT000494@svn.freebsd.org> From: Rick Macklem Date: Tue, 31 Dec 2013 21:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260143 - in stable/10/sys/fs: nfs nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 21:56:03 -0000 Author: rmacklem Date: Tue Dec 31 21:56:02 2013 New Revision: 260143 URL: http://svnweb.freebsd.org/changeset/base/260143 Log: MFC: r259801 The NFSv4 client was passing both the p and cred arguments to nfsv4_fillattr() as NULLs for the Getattr callback. This caused nfsv4_fillattr() to not fill in the Change attribute for the reply. I believe this was a violation of the RFC, but had little effect on server behaviour. This patch passes a non-NULL p argument to fix this. Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c stable/10/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonsubs.c Tue Dec 31 21:37:24 2013 (r260142) +++ stable/10/sys/fs/nfs/nfs_commonsubs.c Tue Dec 31 21:56:02 2013 (r260143) @@ -2011,7 +2011,12 @@ nfsv4_fillattr(struct nfsrv_descript *nd * First, set the bits that can be filled and get fsinfo. */ NFSSET_ATTRBIT(retbitp, attrbitp); - /* If p and cred are NULL, it is a client side call */ + /* + * If both p and cred are NULL, it is a client side setattr call. + * If both p and cred are not NULL, it is a server side reply call. + * If p is not NULL and cred is NULL, it is a client side callback + * reply call. + */ if (p == NULL && cred == NULL) { NFSCLRNOTSETABLE_ATTRBIT(retbitp); aclp = saclp; Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clstate.c Tue Dec 31 21:37:24 2013 (r260142) +++ stable/10/sys/fs/nfsclient/nfs_clstate.c Tue Dec 31 21:56:02 2013 (r260143) @@ -3279,7 +3279,7 @@ nfscl_docb(struct nfsrv_descript *nd, NF FREE((caddr_t)nfhp, M_NFSFH); if (!error) (void) nfsv4_fillattr(nd, NULL, NULL, NULL, &va, - NULL, 0, &rattrbits, NULL, NULL, 0, 0, 0, 0, + NULL, 0, &rattrbits, NULL, p, 0, 0, 0, 0, (uint64_t)0); break; case NFSV4OP_CBRECALL: From owner-svn-src-all@FreeBSD.ORG Tue Dec 31 22:00:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25D3266E; Tue, 31 Dec 2013 22:00:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8EB51360; Tue, 31 Dec 2013 22:00:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBVM0Piq003455; Tue, 31 Dec 2013 22:00:25 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBVM0PX3003454; Tue, 31 Dec 2013 22:00:25 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201312312200.rBVM0PX3003454@svn.freebsd.org> From: Rick Macklem Date: Tue, 31 Dec 2013 22:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260144 - stable/10/sys/fs/nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Dec 2013 22:00:26 -0000 Author: rmacklem Date: Tue Dec 31 22:00:25 2013 New Revision: 260144 URL: http://svnweb.freebsd.org/changeset/base/260144 Log: MFC: r259845 An intermittent problem with NFSv4 exporting of ZFS snapshots was reported to the freebsd-fs mailing list. I believe the problem was caused by the Readdir operation using VFS_VGET() for a snapshot file entry instead of VOP_LOOKUP(). This would not occur for NFSv3, since it will do a VFS_VGET() of "." which fails with ENOTSUPP at the beginning of the directory, whereas NFSv4 does not check "." or "..". This patch adds a call to VFS_VGET() for the directory being read to check for ENOTSUPP. I also observed that the mount_on_fileid and fsid attributes were not correct at the snapshot's auto mountpoints when looking at packet traces for the Readdir. This patch fixes the attributes by doing a check for different v_mount structure, even if the vnode v_mountedhere is not set. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdport.c Tue Dec 31 21:56:02 2013 (r260143) +++ stable/10/sys/fs/nfsserver/nfs_nfsdport.c Tue Dec 31 22:00:25 2013 (r260144) @@ -1984,6 +1984,27 @@ again: } /* + * Check to see if entries in this directory can be safely acquired + * via VFS_VGET() or if a switch to VOP_LOOKUP() is required. + * ZFS snapshot directories need VOP_LOOKUP(), so that any + * automount of the snapshot directory that is required will + * be done. + * This needs to be done here for NFSv4, since NFSv4 never does + * a VFS_VGET() for "." or "..". + */ + if (not_zfs == 0) { + r = VFS_VGET(mp, at.na_fileid, LK_SHARED, &nvp); + if (r == EOPNOTSUPP) { + usevget = 0; + cn.cn_nameiop = LOOKUP; + cn.cn_lkflags = LK_SHARED | LK_RETRY; + cn.cn_cred = nd->nd_cred; + cn.cn_thread = p; + } else if (r == 0) + vput(nvp); + } + + /* * Save this position, in case there is an error before one entry * is created. */ @@ -2120,6 +2141,22 @@ again: if (!r) r = nfsvno_getattr(nvp, nvap, nd->nd_cred, p, 1); + if (r == 0 && not_zfs == 0 && + nfsrv_enable_crossmntpt != 0 && + (nd->nd_flag & ND_NFSV4) != 0 && + nvp->v_type == VDIR && + vp->v_mount != nvp->v_mount) { + /* + * For a ZFS snapshot, there is a + * pseudo mount that does not set + * v_mountedhere, so it needs to + * be detected via a different + * mount structure. + */ + at_root = 1; + if (new_mp == mp) + new_mp = nvp->v_mount; + } } } else { nvp = NULL;