From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 00:01:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 835F883D for ; Sun, 19 Apr 2015 00:01:25 +0000 (UTC) Received: from nm24-vm0.bullet.mail.bf1.yahoo.com (nm24-vm0.bullet.mail.bf1.yahoo.com [98.139.213.161]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3333F698 for ; Sun, 19 Apr 2015 00:01:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429401677; bh=vAk6qO/z4o0BXp376Ves/9fLOX2/3vGU1nFuDuUHMBk=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=HxexhSSoHe7MdNOvo9/I1+0kZxvyqxFixNoIjDMqI5OomKuDpOcQls+QX2/Nll+it/aI9YLYCOK7uadP2GBCf1+8nJ60U2uHaoSuq0zGNqHEWs4Lvl2cvl4s2dZPuUzBpV5T4LiM98lno0MW68E8syNSMUIqlHzRjOTWmRJk+EDgTblqGAtu8uJ7ceXsQVQ9hSoo9qOK6Go56JqJIyNB3JWBt6rTNltJo7ij3gX2fZ2vK8sInZrah9TwZUkGiwAJ5w7IAeTqabh8/7N3iWPNHzlOxkTBjHjLpS85Yh4GAQ7LxQImz+8+1MHcwjxaX8ds//wLtaq2EvqC6DFTgqacgA== Received: from [98.139.215.140] by nm24.bullet.mail.bf1.yahoo.com with NNFMP; 19 Apr 2015 00:01:17 -0000 Received: from [98.139.211.207] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 19 Apr 2015 00:01:17 -0000 Received: from [127.0.0.1] by smtp216.mail.bf1.yahoo.com with NNFMP; 19 Apr 2015 00:01:17 -0000 X-Yahoo-Newman-Id: 155474.87340.bm@smtp216.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 5ObfdfEVM1k2By6rXJLAmqajUKU4aiweXqycBrVqk9kFQQg .msmNOJKf8gNlGazxDfaeymlF1.DZ2lL4fSp4SLdntzaA3s43PXHBSvPtZ2A h6VZgUbdQfBccf90VtvMqclzKJXlqOf.gHaz9nwx3oJPL3cXIJO8jambMyfR Yoa6B7p7NdlKBuVLBM.8jsbr.z_zq_51A_QuGSgPRbrGurSEOfosKH2qtQHl tCbxa5L53c1iMTzGrskn87PJNJbtDjidVuQIU0eDFHH2KU.L5d0e851bIdFT rWpSL2ygEOnCF85NKGuggONy_AJ0Cuk.PIkZ7cHPsncSnF2lt4sqiGMxTvOL Zf2oJK7iBHi7xL_u1mLHgE0VW_0rjevlE4Eonqvez0_2eac0qqgLjYckDzJ. Xc4ezp2VLeeLEuO_axmr11xdxQ6E3ZUGUGsXGY7tD_wZC8t38Ohe9NlCJ3Sg 9oiIpp87xYalKqa9h1Ye9BZDmut7h1QB1hVubtBuCj8lIW8FZQJxTPoFa.VI kSbD_GQEA4jWB9Xbp4umk_t6qMA.s3SJA X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <5532F05B.2070204@FreeBSD.org> Date: Sat, 18 Apr 2015 19:01:31 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281719 - head/bin/ed References: <201504182356.t3INu4HD008807@svn.freebsd.org> In-Reply-To: <201504182356.t3INu4HD008807@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 00:01:25 -0000 Oh yes ... On 04/18/15 18:56, Eitan Adler wrote: > Author: eadler > Date: Sat Apr 18 23:56:04 2015 > New Revision: 281719 > URL: https://svnweb.freebsd.org/changeset/base/281719 > > Log: > bin/ed: use correct type in multiplication > The result is line_t** so the multiplication should be size * > sizeof(line_t*) > > MFC After: 1 month > > Modified: > head/bin/ed/glbl.c > > Modified: head/bin/ed/glbl.c > ============================================================================== > --- head/bin/ed/glbl.c Sat Apr 18 23:49:57 2015 (r281718) > +++ head/bin/ed/glbl.c Sat Apr 18 23:56:04 2015 (r281719) > @@ -153,7 +153,7 @@ set_active_node(line_t *lp) > if (active_list != NULL) { > #endif > if ((ts = (line_t **) realloc(active_list, > - (ti += MINBUFSZ) * sizeof(line_t **))) == NULL) { > + (ti += MINBUFSZ) * sizeof(line_t *))) == NULL) { > fprintf(stderr, "%s\n", strerror(errno)); > errmsg = "out of memory"; > SPL0(); > Found by: clang static checker http://scan.freebsd.org/scan-build/bin/2015-04-18-amd64/report-9ba1bb.html#EndPath ;) Thanks, Pedro. From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 00:29:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F971B47; Sun, 19 Apr 2015 00: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E3318B5; Sun, 19 Apr 2015 00:29:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J0T3BS035929; Sun, 19 Apr 2015 00:29:03 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J0T3SL035928; Sun, 19 Apr 2015 00:29:03 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504190029.t3J0T3SL035928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 19 Apr 2015 00:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281720 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 00:29:03 -0000 Author: alc Date: Sun Apr 19 00:29:02 2015 New Revision: 281720 URL: https://svnweb.freebsd.org/changeset/base/281720 Log: Eliminate an unused variable. MFC after: 1 week Modified: head/sys/vm/device_pager.c Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Sat Apr 18 23:56:04 2015 (r281719) +++ head/sys/vm/device_pager.c Sun Apr 19 00:29:02 2015 (r281720) @@ -294,7 +294,6 @@ static int old_dev_pager_fault(vm_object_t object, vm_ooffset_t offset, int prot, vm_page_t *mres) { - vm_pindex_t pidx; vm_paddr_t paddr; vm_page_t m_paddr, page; struct cdev *dev; @@ -304,7 +303,6 @@ old_dev_pager_fault(vm_object_t object, vm_memattr_t memattr; int ref, ret; - pidx = OFF_TO_IDX(offset); memattr = object->memattr; VM_OBJECT_WUNLOCK(object); From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 00:33:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81943CAA; Sun, 19 Apr 2015 00:33:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC3296B; Sun, 19 Apr 2015 00:33:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J0XMxp041770; Sun, 19 Apr 2015 00:33:22 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J0XMDX041769; Sun, 19 Apr 2015 00:33:22 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504190033.t3J0XMDX041769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 19 Apr 2015 00:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281721 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 00:33:22 -0000 Author: jhibbits Date: Sun Apr 19 00:33:21 2015 New Revision: 281721 URL: https://svnweb.freebsd.org/changeset/base/281721 Log: Fix the build. Commit the last part of e500 PMC. Pointy hat to: jhibbits Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Sun Apr 19 00:29:02 2015 (r281720) +++ head/sys/sys/pmc.h Sun Apr 19 00:33:21 2015 (r281721) @@ -102,6 +102,8 @@ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ __PMC_CPU(MIPS_74K, 0x202, "MIPS 74K") \ __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ + __PMC_CPU(PPC_E500, 0x340, "PowerPC e500 Core") \ + __PMC_CPU(PPC_MPC85XX, 0x340, "Freescale PowerPC MPC85XX") \ __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ __PMC_CPU(GENERIC, 0x400, "Generic") @@ -136,6 +138,7 @@ enum pmc_cputype { __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ + __PMC_CLASS(E500) /* Freescale e500 class */ \ __PMC_CLASS(SOFT) /* Software events */ enum pmc_class { From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 00:37:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8902FE09; Sun, 19 Apr 2015 00:37:57 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 65CDB97E; Sun, 19 Apr 2015 00:37:57 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t3J0UpP4055922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 18 Apr 2015 17:30:51 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t3J0Uput055921; Sat, 18 Apr 2015 17:30:51 -0700 (PDT) (envelope-from sgk) Date: Sat, 18 Apr 2015 17:30:51 -0700 From: Steve Kargl To: Oliver Pinter Cc: Konstantin Belousov , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r281707 - in head/sys: amd64/amd64 i386/i386 i386/include i386/xen x86/include x86/xen Message-ID: <20150419003051.GA55896@troutmask.apl.washington.edu> References: <201504182123.t3ILNHUk080941@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 00:37:57 -0000 On Sun, Apr 19, 2015 at 12:39:47AM +0200, Oliver Pinter wrote: > On Sat, Apr 18, 2015 at 11:23 PM, Konstantin Belousov wrote: > > > > void acpi_SetDefaultIntrModel(int model); > > void acpi_cpu_c1(void); > > > > +void acpi_cpu_idle_mwait(uint32_t mwait_hint); > > This change is related of this commit or this belongs to other modificatons? > Please trim your replies. -- Steve From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 04:27:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C906DFFA; Sun, 19 Apr 2015 04:27:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B32D8FEB; Sun, 19 Apr 2015 04:27:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J4RppF035756; Sun, 19 Apr 2015 04:27:51 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J4RpHI035755; Sun, 19 Apr 2015 04:27:51 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190427.t3J4RpHI035755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 04:27:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281723 - head/usr.bin/calendar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 04:27:52 -0000 Author: eadler Date: Sun Apr 19 04:27:50 2015 New Revision: 281723 URL: https://svnweb.freebsd.org/changeset/base/281723 Log: calendar: remove useless check lineline checked for 0 in the while loop condition. There is no need to check for it additionally in the body. CID: 1288959 MFC After: 1 week Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Sun Apr 19 01:23:12 2015 (r281722) +++ head/usr.bin/calendar/io.c Sun Apr 19 04:27:50 2015 (r281723) @@ -257,9 +257,6 @@ cal_parse(FILE *in, FILE *out) return (1); while ((linelen = getline(&line, &linecap, in)) > 0) { - if (linelen == 0) - continue; - if (*line == '#') { switch (token(line+1, out, &skip)) { case T_ERR: From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 04:53:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BBF227B; Sun, 19 Apr 2015 04:53: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49BA82FC; Sun, 19 Apr 2015 04:53:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J4rT1R057323; Sun, 19 Apr 2015 04:53:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J4rTQT057322; Sun, 19 Apr 2015 04:53:29 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190453.t3J4rTQT057322@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 04:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281724 - head/usr.bin/rpcgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 04:53:29 -0000 Author: eadler Date: Sun Apr 19 04:53:28 2015 New Revision: 281724 URL: https://svnweb.freebsd.org/changeset/base/281724 Log: rpcgen: fix use use of strcmp strcmp only guarantee that it will return at least 1 if the string B is greater than that of string A. Modified: head/usr.bin/rpcgen/rpc_sample.c Modified: head/usr.bin/rpcgen/rpc_sample.c ============================================================================== --- head/usr.bin/rpcgen/rpc_sample.c Sun Apr 19 04:27:50 2015 (r281723) +++ head/usr.bin/rpcgen/rpc_sample.c Sun Apr 19 04:53:28 2015 (r281724) @@ -115,7 +115,7 @@ write_sample_client(const char *program_ for (l = proc->args.decls; l != NULL; l = l->next) { f_print(fout, "\t"); ptype(l->decl.prefix, l->decl.type, 1); - if (strcmp(l->decl.type,"string") == 1) + if (strcmp(l->decl.type,"string") >= 1) f_print(fout, " "); pvname(proc->proc_name, vp->vers_num); f_print(fout, "_%s;\n", l->decl.name); From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 06:18:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FBDA798; Sun, 19 Apr 2015 06:18:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D337BCA; Sun, 19 Apr 2015 06:18:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J6IgH0023884; Sun, 19 Apr 2015 06:18:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J6Ifth023878; Sun, 19 Apr 2015 06:18:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504190618.t3J6Ifth023878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 Apr 2015 06:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281725 - in head/sys/fs: nfs nfsclient nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 06:18:42 -0000 Author: trasz Date: Sun Apr 19 06:18:41 2015 New Revision: 281725 URL: https://svnweb.freebsd.org/changeset/base/281725 Log: Replace "new NFS" with just "NFS" in some sysctl description strings. Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Sun Apr 19 04:53:28 2015 (r281724) +++ head/sys/fs/nfs/nfs_commonport.c Sun Apr 19 06:18:41 2015 (r281725) @@ -69,7 +69,7 @@ void (*ncl_call_invalcaches)(struct vnod static int nfs_realign_test; static int nfs_realign_count; -SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "New NFS filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "NFS filesystem"); SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, 0, "Number of realign tests done"); SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, @@ -78,7 +78,7 @@ SYSCTL_STRING(_vfs_nfs, OID_AUTO, callba nfsv4_callbackaddr, sizeof(nfsv4_callbackaddr), "NFSv4 callback addr for server to use"); SYSCTL_INT(_vfs_nfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nfscl_debuglevel, - 0, "Debug level for new nfs client"); + 0, "Debug level for NFS client"); /* * Defines for malloc @@ -100,12 +100,12 @@ MALLOC_DEFINE(M_NEWNFSCLDELEG, "NFSCL de MALLOC_DEFINE(M_NEWNFSCLCLIENT, "NFSCL client", "NFSCL Client"); MALLOC_DEFINE(M_NEWNFSCLLOCKOWNER, "NFSCL lckown", "NFSCL Lock Owner"); MALLOC_DEFINE(M_NEWNFSCLLOCK, "NFSCL lck", "NFSCL Lock"); -MALLOC_DEFINE(M_NEWNFSV4NODE, "NEWNFSnode", "New nfs vnode"); -MALLOC_DEFINE(M_NEWNFSDIRECTIO, "NEWdirectio", "New nfs Direct IO buffer"); +MALLOC_DEFINE(M_NEWNFSV4NODE, "NEWNFSnode", "NFS vnode"); +MALLOC_DEFINE(M_NEWNFSDIRECTIO, "NEWdirectio", "NFS Direct IO buffer"); MALLOC_DEFINE(M_NEWNFSDIROFF, "NFSCL diroffdiroff", - "New NFS directory offset data"); + "NFS directory offset data"); MALLOC_DEFINE(M_NEWNFSDROLLBACK, "NFSD rollback", - "New NFS local lock rollback"); + "NFS local lock rollback"); MALLOC_DEFINE(M_NEWNFSLAYOUT, "NFSCL layout", "NFSv4.1 Layout"); MALLOC_DEFINE(M_NEWNFSFLAYOUT, "NFSCL flayout", "NFSv4.1 File Layout"); MALLOC_DEFINE(M_NEWNFSDEVINFO, "NFSCL devinfo", "NFSv4.1 Device Info"); Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 19 04:53:28 2015 (r281724) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 19 06:18:41 2015 (r281725) @@ -86,8 +86,8 @@ extern struct nfsmount *ncl_iodmount[NFS extern struct mtx ncl_iod_mutex; NFSCLSTATEMUTEX; -MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "New NFS request header"); -MALLOC_DEFINE(M_NEWNFSMNT, "newnfsmnt", "New NFS mount struct"); +MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "NFS request header"); +MALLOC_DEFINE(M_NEWNFSMNT, "newnfsmnt", "NFS mount struct"); SYSCTL_DECL(_vfs_nfs); static int nfs_ip_paranoia = 1; Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 19 04:53:28 2015 (r281724) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 19 06:18:41 2015 (r281725) @@ -84,7 +84,7 @@ extern int nfsrv_issuedelegs; extern int nfsrv_dolocallocks; extern int nfsd_enable_stringtouid; -SYSCTL_NODE(_vfs, OID_AUTO, nfsd, CTLFLAG_RW, 0, "New NFS server"); +SYSCTL_NODE(_vfs, OID_AUTO, nfsd, CTLFLAG_RW, 0, "NFS server"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, mirrormnt, CTLFLAG_RW, &nfsrv_enable_crossmntpt, 0, "Enable nfsd to cross mount points"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, commit_blks, CTLFLAG_RW, &nfs_commit_blks, @@ -96,7 +96,7 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, issue_de SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_locallocks, CTLFLAG_RW, &nfsrv_dolocallocks, 0, "Enable nfsd to acquire local locks on files"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, debuglevel, CTLFLAG_RW, &nfsd_debuglevel, - 0, "Debug level for new nfs server"); + 0, "Debug level for NFS server"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_stringtouid, CTLFLAG_RW, &nfsd_enable_stringtouid, 0, "Enable nfsd to accept numeric owner_names"); From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 07:12:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 957D1DB8; Sun, 19 Apr 2015 07:12:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69633EA; Sun, 19 Apr 2015 07:12:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J7CHC4071029; Sun, 19 Apr 2015 07:12:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J7CHvg071028; Sun, 19 Apr 2015 07:12:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504190712.t3J7CHvg071028@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 Apr 2015 07:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281726 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 07:12:17 -0000 Author: trasz Date: Sun Apr 19 07:12:16 2015 New Revision: 281726 URL: https://svnweb.freebsd.org/changeset/base/281726 Log: Optimize the O_NOCTTY handling hack in linux_common_open(). Differential Revision: https://reviews.freebsd.org/D2323 Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Sun Apr 19 06:18:41 2015 (r281725) +++ head/sys/compat/linux/linux_file.c Sun Apr 19 07:12:16 2015 (r281726) @@ -132,39 +132,38 @@ linux_common_open(struct thread *td, int /* XXX LINUX_O_NOATIME: unable to be easily implemented. */ error = kern_openat(td, dirfd, path, UIO_SYSSPACE, bsd_flags, mode); + if (error != 0) + goto done; - if (!error) { - fd = td->td_retval[0]; - /* - * XXX In between kern_open() and fget(), another process - * having the same filedesc could use that fd without - * checking below. - */ - error = fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp); - if (!error) { - sx_slock(&proctree_lock); - PROC_LOCK(p); - if (!(bsd_flags & O_NOCTTY) && - SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { - PROC_UNLOCK(p); - sx_unlock(&proctree_lock); - /* XXXPJD: Verify if TIOCSCTTY is allowed. */ - if (fp->f_type == DTYPE_VNODE) - (void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, - td->td_ucred, td); - } else { - PROC_UNLOCK(p); - sx_sunlock(&proctree_lock); - } + if (bsd_flags & O_NOCTTY) + goto done; + + /* + * XXX In between kern_open() and fget(), another process + * having the same filedesc could use that fd without + * checking below. + */ + fd = td->td_retval[0]; + if (fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp) == 0) { + if (fp->f_type != DTYPE_VNODE) { fdrop(fp, td); - /* - * XXX as above, fdrop()/kern_close() pair is racy. - */ - if (error) - kern_close(td, fd); + goto done; + } + sx_slock(&proctree_lock); + PROC_LOCK(p); + if (SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { + PROC_UNLOCK(p); + sx_sunlock(&proctree_lock); + /* XXXPJD: Verify if TIOCSCTTY is allowed. */ + (void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, + td->td_ucred, td); + } else { + PROC_UNLOCK(p); + sx_sunlock(&proctree_lock); } } +done: #ifdef DEBUG if (ldebug(open)) printf(LMSG("open returns error %d"), error); From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 07:16:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A012AB2; Sun, 19 Apr 2015 07:16:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8142D169; Sun, 19 Apr 2015 07:16:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J7GjSs072745; Sun, 19 Apr 2015 07:16:45 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J7GjmW072744; Sun, 19 Apr 2015 07:16:45 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190716.t3J7GjmW072744@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 07:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281727 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 07:16:45 -0000 Author: eadler Date: Sun Apr 19 07:16:44 2015 New Revision: 281727 URL: https://svnweb.freebsd.org/changeset/base/281727 Log: README: changes and fixups Two orthogonal goals: - try to make README look a little nicer on phabricator by using Remarkup syntax for commands (using `` instead of using a closing ') - try to make README look a little nicer on github. - Don't encourage `make world` when the handbook specifies otherwise - Change language around documentation to be a bit clearer MFC After: 2 weeks Modified: head/README Modified: head/README ============================================================================== --- head/README Sun Apr 19 07:12:16 2015 (r281726) +++ head/README Sun Apr 19 07:16:44 2015 (r281727) @@ -8,37 +8,32 @@ sources in this tree - please see the sp more information). The Makefile in this directory supports a number of targets for -building components (or all) of the FreeBSD source tree, the most -commonly used one being ``world'', which rebuilds and installs -everything in the FreeBSD system from the source tree except the -kernel, the kernel-modules and the contents of /etc. The ``world'' -target should only be used in cases where the source tree has not -changed from the currently running version. See: -http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html +building components (or all) of the FreeBSD source tree. See build(7) +and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html for more information, including setting make(1) variables. -The ``buildkernel'' and ``installkernel'' targets build and install +The `buildkernel` and `installkernel` targets build and install the kernel and the modules (see below). Please see the top of the Makefile in this directory for more information on the standard build targets and compile-time flags. -Building a kernel is a somewhat more involved process, documentation -for which can be found at: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html -And in the config(8) man page. +Building a kernel is a somewhat more involved process. See build(7), config(8), +and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html +for more information. + Note: If you want to build and install the kernel with the -``buildkernel'' and ``installkernel'' targets, you might need to build +`buildkernel` and `installkernel` targets, you might need to build world before. More information is available in the handbook. -The sample kernel configuration files reside in the sys//conf -sub-directory (assuming that you've installed the kernel sources), the -file named GENERIC being the one used to build your initial installation -kernel. The file NOTES contains entries and documentation for all possible +The kernel configuration files reside in the sys//conf +sub-directory. GENERIC is the default configuration used in release builds. +NOTES contains entries and documentation for all possible devices, not just those commonly used. Source Roadmap: --------------- + bin System/user commands. cddl Various commands and libraries under the Common Development From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 07:35:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B47573E8; Sun, 19 Apr 2015 07:35:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2A3033C; Sun, 19 Apr 2015 07:35:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J7ZJAf088042; Sun, 19 Apr 2015 07:35:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J7ZJEr088041; Sun, 19 Apr 2015 07:35:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504190735.t3J7ZJEr088041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 19 Apr 2015 07:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281728 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 07:35:19 -0000 Author: trasz Date: Sun Apr 19 07:35:18 2015 New Revision: 281728 URL: https://svnweb.freebsd.org/changeset/base/281728 Log: Add back fdrop() missed in r281726. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Sun Apr 19 07:16:44 2015 (r281727) +++ head/sys/compat/linux/linux_file.c Sun Apr 19 07:35:18 2015 (r281728) @@ -161,6 +161,7 @@ linux_common_open(struct thread *td, int PROC_UNLOCK(p); sx_sunlock(&proctree_lock); } + fdrop(fp, td); } done: From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 08:23:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40D7FF53; Sun, 19 Apr 2015 08:23:44 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 779D7A38; Sun, 19 Apr 2015 08:23:43 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id B3F15780E07; Sun, 19 Apr 2015 18:23:27 +1000 (AEST) Date: Sun, 19 Apr 2015 18:23:26 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281724 - head/usr.bin/rpcgen In-Reply-To: <201504190453.t3J4rTQT057322@svn.freebsd.org> Message-ID: <20150419172929.F1928@besplex.bde.org> References: <201504190453.t3J4rTQT057322@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=0J2RCfu4unCSrN9MOBsA:9 a=VqtkUkEFVafXuUsY:21 a=rwKKNUuyyiyYeohE:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:23:44 -0000 On Sun, 19 Apr 2015, Eitan Adler wrote: > Log: > rpcgen: fix use use of strcmp > strcmp only guarantee that it will return at least 1 if the string B > is greater than that of string A. > > Modified: > head/usr.bin/rpcgen/rpc_sample.c > > Modified: head/usr.bin/rpcgen/rpc_sample.c > ============================================================================== > --- head/usr.bin/rpcgen/rpc_sample.c Sun Apr 19 04:27:50 2015 (r281723) > +++ head/usr.bin/rpcgen/rpc_sample.c Sun Apr 19 04:53:28 2015 (r281724) > @@ -115,7 +115,7 @@ write_sample_client(const char *program_ > for (l = proc->args.decls; l != NULL; l = l->next) { > f_print(fout, "\t"); > ptype(l->decl.prefix, l->decl.type, 1); > - if (strcmp(l->decl.type,"string") == 1) > + if (strcmp(l->decl.type,"string") >= 1) > f_print(fout, " "); > pvname(proc->proc_name, vp->vers_num); > f_print(fout, "_%s;\n", l->decl.name); It is still a bad example. strcmp is actually documented as returning > 0 if . ' >= 1' is just an obfuscated way of writing ' > 0'. Actually, it is still nonsense. I think l_decl.type is a keyword with a limited number of values. Probably 1 was never returned, since there is no keyword starting with "r" or "sr". So to avoid changing the behaviour, the correct change was to remove the dead code. However, the behaviour was probably broken. Signed comparison with keywords makes no sense. Only comparison for equality, or perhaps for being a prefix, makes sense. I think comparison for equality was intended. That could be written as 'strcmp ... == 0'. However, using strcmp to compare for equality would be a style bug. Everywhere else in the file, and almost everywhere else in the program spell this comparison using streq, since strcmp is apparently too hard to use. The other broken places are: - rpc_cout.c: 3 instances of strcmp, 9 of streq - rpc_main.c: 4 instances of strcmp, 4 of streq - rpc_parse.c: 2 instances of strcmp, 11 of streq - rpc_sample.c: 1 instances of strcmp, 6 of streq - rpc_svcout.c: 3 instances of strcmp, 5 of streq - rpc_util.c: 2 instances of strcmp, 9 of streq streq is used fairly consistently in old code, and the style was broken fairly consistently in changes (about half, including the above, apparently from Sun in 1995). There are often mounds of collateral style bugs near changes to use strcmp. In the above, the next statement is misindented. In this file, the indentation elsewhere is mostly using tabs. It is never using spaces where that would be correct, but is often where it is incorrect (mostly for corrupted tabs and 2-space indentation). Old sun code had many more indentation errors from 5-space indentation for K&R function headers. Altogether, this file had a mixture of 2-space indentation, 4-space indentation which gave bogus lining up of parentheses (in the above code), 5-space indentation, correct lining-up-parentheses indentation, 8-space indentation from corrupt tabs, and normal indentation with tabs. A grate sample. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 08:30:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB71C240; Sun, 19 Apr 2015 08:30:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9F9DA62; Sun, 19 Apr 2015 08:30:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J8UDNb031993; Sun, 19 Apr 2015 08:30:13 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J8UDKm031992; Sun, 19 Apr 2015 08:30:13 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190830.t3J8UDKm031992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 08:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281731 - head/usr.sbin/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:30:14 -0000 Author: eadler Date: Sun Apr 19 08:30:13 2015 New Revision: 281731 URL: https://svnweb.freebsd.org/changeset/base/281731 Log: config: remove set but unchecked variable reported by: gcc5.1 Modified: head/usr.sbin/config/main.c Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Sun Apr 19 07:49:39 2015 (r281730) +++ head/usr.sbin/config/main.c Sun Apr 19 08:30:13 2015 (r281731) @@ -686,7 +686,7 @@ kernconfdump(const char *file) { struct stat st; FILE *fp, *pp; - int error, len, osz, r; + int error, osz, r; unsigned int i, off, size, t1, t2, align; char *cmd, *o; @@ -714,7 +714,7 @@ kernconfdump(const char *file) if (pp == NULL) errx(EXIT_FAILURE, "popen() failed"); free(cmd); - len = fread(o, osz, 1, pp); + fread(o, osz, 1, pp); pclose(pp); r = sscanf(o, "%d%d%d%d%d", &off, &size, &t1, &t2, &align); free(o); From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 08:34:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 56BFC62F; Sun, 19 Apr 2015 08:34:51 +0000 (UTC) Date: Sun, 19 Apr 2015 08:34:51 +0000 From: Alexey Dokuchaev To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281727 - head Message-ID: <20150419083451.GA79519@FreeBSD.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504190716.t3J7GjmW072744@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:34:51 -0000 On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: > New Revision: 281727 > URL: https://svnweb.freebsd.org/changeset/base/281727 > > Log: > README: changes and fixups > Two orthogonal goals: > - try to make README look a little nicer on phabricator by using > Remarkup syntax for commands (using `` instead of using a closing ') > - try to make README look a little nicer on github. FreeBSD had traditionally used both double (``...'') and single (`...') to express "literal" something; I am not convinced that changing it just to match GitHub's markdown warrants it. This `...` form is alien to FreeBSD, and can be also confused with backquoted form of shell's $(...) command substitution. ./danfe From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 08:42:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04402922 for ; Sun, 19 Apr 2015 08:42:41 +0000 (UTC) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AB28C14 for ; Sun, 19 Apr 2015 08:42:40 +0000 (UTC) Received: by wgsk9 with SMTP id k9so150300409wgs.3 for ; Sun, 19 Apr 2015 01:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=+J9/csZEEXgoGybOWPYqaBE8zamEvHnRBEF0LT8Il+I=; b=MoOLBmypjq49OmWZisAt+bg0TsC6KsKNG2HXQgoA+mL2FOwWY6rr2BqLwF9rwiBWxc vO1oPz/ccVkE/jpC3VYBKHmzMX9zNXkVt5yHGqLKp/uBOlBQaBRw/Wdys2XqKHA01A9n rurBtf6E5WiKO0KbX9kT3AkSmGZUH159aAfT8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=+J9/csZEEXgoGybOWPYqaBE8zamEvHnRBEF0LT8Il+I=; b=adGMbjPnI5+5PTErNAi5g+zllKDM0M68jTHVPw0FKiQXoyAMtcRMjJTXWGjcYzz9qR zzQPESpHbFHSmrSp3GjmM00mMjsBE4AMHbU/0UMox5MX6nZmuCwkGxPgsKtrxLe8zjlF MJywc60UEdbSwfSfql6jOnoh6Ie8P/LDINtYs/bmZam3G3Pz8AsO67cqUcVshV7xeQ/V jkr6HPdRlncIJ0ejD19irnLxTVJR8to4MBOtvEVNtJHh8YYLy3TFEoVZ9dVBD2nfAV8J lqqZvJOjRojFnKTg5AY+HnLcWM88F/al66r45ht81bivUMvqDU+40jNPIizdr4CyYsgV 7xRg== X-Gm-Message-State: ALoCoQkPUsfDTKVWpHYMiYnaffql4vqoPT4s0LypCkgLM4be/VHhZmHzD/oZgZX6ivGiXMFkSzBZ X-Received: by 10.194.237.34 with SMTP id uz2mr20487896wjc.157.1429432958988; Sun, 19 Apr 2015 01:42:38 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Sun, 19 Apr 2015 01:42:08 -0700 (PDT) In-Reply-To: <20150419083451.GA79519@FreeBSD.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> From: Eitan Adler Date: Sun, 19 Apr 2015 01:42:08 -0700 X-Google-Sender-Auth: cuO27SwLTqWeOzO9vV97gTH9XRs Message-ID: Subject: Re: svn commit: r281727 - head To: Alexey Dokuchaev Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:42:41 -0000 On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: > On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: >> New Revision: 281727 >> URL: https://svnweb.freebsd.org/changeset/base/281727 >> >> Log: >> README: changes and fixups >> Two orthogonal goals: >> - try to make README look a little nicer on phabricator by using >> Remarkup syntax for commands (using `` instead of using a closing ') >> - try to make README look a little nicer on github. > > FreeBSD had traditionally used both double (``...'') and single (`...') to > express "literal" something; I am not convinced that changing it just to > match GitHub's markdown warrants it. This `...` form is alien to FreeBSD, > and can be also confused with backquoted form of shell's $(...) command > substitution. Without this change, the syntax ends up being parsed very weirdly by both phabricator and github. That said, if there is strong precedent not to use the markdown syntax, and it would cause confusion, I will revert those changes. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 08:45:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19CBEC31; Sun, 19 Apr 2015 08:45:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0846DC2C; Sun, 19 Apr 2015 08:45:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J8jbiV045814; Sun, 19 Apr 2015 08:45:37 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J8jb6Z045813; Sun, 19 Apr 2015 08:45:37 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190845.t3J8jb6Z045813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 08:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281733 - head/usr.sbin/tzsetup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 08:45:38 -0000 Author: eadler Date: Sun Apr 19 08:45:37 2015 New Revision: 281733 URL: https://svnweb.freebsd.org/changeset/base/281733 Log: tzsetup: remove set but unused variable - leave a comment explaining which variable it used to be Reported by: gcc5.1 Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- head/usr.sbin/tzsetup/tzsetup.c Sun Apr 19 08:31:26 2015 (r281732) +++ head/usr.sbin/tzsetup/tzsetup.c Sun Apr 19 08:45:37 2015 (r281733) @@ -475,7 +475,7 @@ read_zones(void) FILE *fp; struct continent *cont; size_t len; - char *line, *tlc, *coord, *file, *descr, *p; + char *line, *tlc, *file, *descr, *p; int lineno; fp = fopen(path_zonetab, "r"); @@ -495,7 +495,7 @@ read_zones(void) if (strlen(tlc) != 2) errx(1, "%s:%d: invalid country code `%s'", path_zonetab, lineno, tlc); - coord = strsep(&line, "\t"); /* Unused */ + /* coord = */ strsep(&line, "\t"); /* Unused */ file = strsep(&line, "\t"); p = strchr(file, '/'); if (p == 0) From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 09:07:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBD83134; Sun, 19 Apr 2015 09:07:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA54ADEC; Sun, 19 Apr 2015 09:07:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J97wku063972; Sun, 19 Apr 2015 09:07:58 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J97wiZ063971; Sun, 19 Apr 2015 09:07:58 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190907.t3J97wiZ063971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 09:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281734 - head/usr.sbin/inetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 09:07:58 -0000 Author: eadler Date: Sun Apr 19 09:07:57 2015 New Revision: 281734 URL: https://svnweb.freebsd.org/changeset/base/281734 Log: identd: remove redundant zeroing se_rpc_lowvers was set to 0 twice, so remove one of them I can not find any other variable which they may have been a typo of. Reported by: gcc5.1 Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Sun Apr 19 08:45:37 2015 (r281733) +++ head/usr.sbin/inetd/inetd.c Sun Apr 19 09:07:57 2015 (r281734) @@ -1752,8 +1752,7 @@ more: memmove(sep->se_proto, sep->se_proto + 4, strlen(sep->se_proto) + 1 - 4); sep->se_rpc = 1; - sep->se_rpc_prog = sep->se_rpc_lowvers = - sep->se_rpc_lowvers = 0; + sep->se_rpc_prog = sep->se_rpc_lowvers = 0; memcpy(&sep->se_ctrladdr4, bind_sa4, sizeof(sep->se_ctrladdr4)); if ((versp = strrchr(sep->se_service, '/'))) { From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 09:17:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10C043FC; Sun, 19 Apr 2015 09:17:33 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0AFBECF; Sun, 19 Apr 2015 09:17:32 +0000 (UTC) Received: by widdi4 with SMTP id di4so66079123wid.0; Sun, 19 Apr 2015 02:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=UCQa0IgNjko/+A3rRvUw3sQgpQhiCfbSHqlyzrJoMSs=; b=nG/jfD/nd6DjWf2pRjKztWko2thFlEseTMN46jfVngpltLisylb0pEP137CXAEjD6Z MErq3/s9Gh2G3f9vkYMuuJLKMBBTR6cb7OgHCWRB8kG5hS/7WHPv0MqBNM6o+J1K604h E/SlWj4jz2zhl9FBiS2/AnQgHesOVRzOH7cMmcfKh43IwBWg84SFqMtbLOYlmeImgSB5 7BGwgcp6T93dCnxMZwnz9UIc+9QXawtJp4Z31j7/o2dS1GwIrX28VDQmLMepHiRoN+I+ EMFxlv6T1w6yDe4hmgqkifVVmAgF5WerYW9XC//KVC9TwBRfxlMSiVZLFlIsK2xld3/s hj3A== MIME-Version: 1.0 X-Received: by 10.194.236.33 with SMTP id ur1mr20701606wjc.77.1429435051175; Sun, 19 Apr 2015 02:17:31 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.80.202 with HTTP; Sun, 19 Apr 2015 02:17:31 -0700 (PDT) In-Reply-To: <201504190907.t3J97wiZ063971@svn.freebsd.org> References: <201504190907.t3J97wiZ063971@svn.freebsd.org> Date: Sun, 19 Apr 2015 12:17:31 +0300 X-Google-Sender-Auth: dthxEs8eZo9owv_rY852ySJ9Kzk Message-ID: Subject: Re: svn commit: r281734 - head/usr.sbin/inetd From: Sergey Kandaurov To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 09:17:33 -0000 On 19 April 2015 at 12:07, Eitan Adler wrote: > Author: eadler > Date: Sun Apr 19 09:07:57 2015 > New Revision: 281734 > URL: https://svnweb.freebsd.org/changeset/base/281734 > > Log: > identd: remove redundant zeroing > se_rpc_lowvers was set to 0 twice, so remove one of them > I can not find any other variable which they may have been a typo of. > > Reported by: gcc5.1 > > Modified: > head/usr.sbin/inetd/inetd.c > > Modified: head/usr.sbin/inetd/inetd.c > ============================================================================== > --- head/usr.sbin/inetd/inetd.c Sun Apr 19 08:45:37 2015 (r281733) > +++ head/usr.sbin/inetd/inetd.c Sun Apr 19 09:07:57 2015 (r281734) > @@ -1752,8 +1752,7 @@ more: > memmove(sep->se_proto, sep->se_proto + 4, > strlen(sep->se_proto) + 1 - 4); > sep->se_rpc = 1; > - sep->se_rpc_prog = sep->se_rpc_lowvers = > - sep->se_rpc_lowvers = 0; > + sep->se_rpc_prog = sep->se_rpc_lowvers = 0; > memcpy(&sep->se_ctrladdr4, bind_sa4, > sizeof(sep->se_ctrladdr4)); > if ((versp = strrchr(sep->se_service, '/'))) { > se_rpc_highvers ? They both seem to be used prezeroed in a later sscanf(). -- wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 09:26:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EA7A608 for ; Sun, 19 Apr 2015 09:26:21 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A4BBEFA1 for ; Sun, 19 Apr 2015 09:26:20 +0000 (UTC) Received: by widdi4 with SMTP id di4so61185827wid.0 for ; Sun, 19 Apr 2015 02:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ZEQdzeYbzcVAZHqsKehVMX75qdADsPG2QfWtzOoxAco=; b=EMaNXgeHlXUlxm+Lk3B8B1PQzWO9S4U6aFF7uu3C1qlLfmWg/Afr2ckvEmGQ7ACcaL risqqLO+bIL225bavNgSEl+X5LyuEoEJ7uZb4F6NFOq0TU7ADgy0rmE70BAxS1IrXpAb PwF+01jW+B3wKGZjmR9vtiLX2AkdBIWg1k7aU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=ZEQdzeYbzcVAZHqsKehVMX75qdADsPG2QfWtzOoxAco=; b=M4yHaS3EHXngio5VS5gECERzyZs/3VGRcnEypJOxKupm1uF6eErAQQnwe3bwonL20F s5NUeByatKAABSmAaG8IX7/OK8V0LKWSiR6Mu8P18/mhTwJ0VMNTLw7Nw2M+RCK1Cyp5 xIgKhmjkvD2GO70M/DLBWN83iEXuMcv5LmwiKR1nwefa3+NcShrDqE5wH1evuW92a2i9 U1aZaUQVRctsMZYqKAOBbDOodVLIncr55uXaqcac7BOkQR+s6+E8VGbTrafbCAJOBkUt UrdKJLcUVX/3/5qtMdoecVZvmTPti6bRiN4dYKfLsFKGzQ0i28AX7+DDdE948fSY5O90 Ndrw== X-Gm-Message-State: ALoCoQlnEIyAg19Ukh6wzTplKscOzKzyK7FifJNCLC0GKS88wA93MODRvfUCWtWqjsqVT/UdJuAk X-Received: by 10.180.77.170 with SMTP id t10mr15680939wiw.5.1429435579043; Sun, 19 Apr 2015 02:26:19 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Sun, 19 Apr 2015 02:25:48 -0700 (PDT) In-Reply-To: References: <201504190907.t3J97wiZ063971@svn.freebsd.org> From: Eitan Adler Date: Sun, 19 Apr 2015 02:25:48 -0700 X-Google-Sender-Auth: cON8RTfV3YpPY2sHTb4Fy4FprIg Message-ID: Subject: Re: svn commit: r281734 - head/usr.sbin/inetd To: Sergey Kandaurov Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 09:26:21 -0000 On 19 April 2015 at 02:17, Sergey Kandaurov wrote: > On 19 April 2015 at 12:07, Eitan Adler wrote: >> Author: eadler >> Date: Sun Apr 19 09:07:57 2015 >> New Revision: 281734 >> URL: https://svnweb.freebsd.org/changeset/base/281734 >> >> Log: >> identd: remove redundant zeroing >> se_rpc_lowvers was set to 0 twice, so remove one of them >> I can not find any other variable which they may have been a typo of. >> >> Reported by: gcc5.1 >> >> Modified: >> head/usr.sbin/inetd/inetd.c >> >> Modified: head/usr.sbin/inetd/inetd.c >> ============================================================================== >> --- head/usr.sbin/inetd/inetd.c Sun Apr 19 08:45:37 2015 (r281733) >> +++ head/usr.sbin/inetd/inetd.c Sun Apr 19 09:07:57 2015 (r281734) >> @@ -1752,8 +1752,7 @@ more: >> memmove(sep->se_proto, sep->se_proto + 4, >> strlen(sep->se_proto) + 1 - 4); >> sep->se_rpc = 1; >> - sep->se_rpc_prog = sep->se_rpc_lowvers = >> - sep->se_rpc_lowvers = 0; >> + sep->se_rpc_prog = sep->se_rpc_lowvers = 0; >> memcpy(&sep->se_ctrladdr4, bind_sa4, >> sizeof(sep->se_ctrladdr4)); >> if ((versp = strrchr(sep->se_service, '/'))) { >> > > se_rpc_highvers ? > They both seem to be used prezeroed in a later sscanf(). hmmm, likely. I was looking for a different variable, not a different member :\ I'll fix -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 09:27:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78AD674A; Sun, 19 Apr 2015 09:27:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66FA4FAA; Sun, 19 Apr 2015 09:27:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J9RmrM080195; Sun, 19 Apr 2015 09:27:48 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J9Rm9g080194; Sun, 19 Apr 2015 09:27:48 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190927.t3J9Rm9g080194@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 09:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281735 - head/usr.sbin/inetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 09:27:48 -0000 Author: eadler Date: Sun Apr 19 09:27:47 2015 New Revision: 281735 URL: https://svnweb.freebsd.org/changeset/base/281735 Log: identd: also zero se_rpc_highvers Reported by: pluknet Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Sun Apr 19 09:07:57 2015 (r281734) +++ head/usr.sbin/inetd/inetd.c Sun Apr 19 09:27:47 2015 (r281735) @@ -1752,9 +1752,8 @@ more: memmove(sep->se_proto, sep->se_proto + 4, strlen(sep->se_proto) + 1 - 4); sep->se_rpc = 1; - sep->se_rpc_prog = sep->se_rpc_lowvers = 0; - memcpy(&sep->se_ctrladdr4, bind_sa4, - sizeof(sep->se_ctrladdr4)); + sep->se_rpc_prog = sep->se_rpc_lowvers = + sep->se_rpc_highvers = 0; if ((versp = strrchr(sep->se_service, '/'))) { *versp++ = '\0'; switch (sscanf(versp, "%u-%u", From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 09:35:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDFBCA68; Sun, 19 Apr 2015 09:35:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAE79ED; Sun, 19 Apr 2015 09:35:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3J9ZkZN088202; Sun, 19 Apr 2015 09:35:46 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3J9ZkAL088201; Sun, 19 Apr 2015 09:35:46 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504190935.t3J9ZkAL088201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Apr 2015 09:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281736 - head/usr.sbin/inetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 09:35:47 -0000 Author: eadler Date: Sun Apr 19 09:35:46 2015 New Revision: 281736 URL: https://svnweb.freebsd.org/changeset/base/281736 Log: identd: restore memcpy I should not be committing at 2:30am.... Reported by: pluknet Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Sun Apr 19 09:27:47 2015 (r281735) +++ head/usr.sbin/inetd/inetd.c Sun Apr 19 09:35:46 2015 (r281736) @@ -1752,6 +1752,8 @@ more: memmove(sep->se_proto, sep->se_proto + 4, strlen(sep->se_proto) + 1 - 4); sep->se_rpc = 1; + memcpy(&sep->se_ctrladdr4, bind_sa4, + sizeof(sep->se_ctrladdr4)); sep->se_rpc_prog = sep->se_rpc_lowvers = sep->se_rpc_highvers = 0; if ((versp = strrchr(sep->se_service, '/'))) { From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 11:34:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88688D88; Sun, 19 Apr 2015 11:34:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76E9EE0D; Sun, 19 Apr 2015 11:34:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JBYgVb087784; Sun, 19 Apr 2015 11:34:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JBYgD1087783; Sun, 19 Apr 2015 11:34:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504191134.t3JBYgD1087783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 19 Apr 2015 11:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281738 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 11:34:42 -0000 Author: mav Date: Sun Apr 19 11:34:41 2015 New Revision: 281738 URL: https://svnweb.freebsd.org/changeset/base/281738 Log: Change wcommitsize default from one empirical value to another. The new value is more predictable with growing RAM size: hibufspace maxvnodes old new i386: 256MB 32980992 15800 2198732 2097152 2GB 94027776 107677 878764 4194304 amd64: 256MB 32980992 15800 2198732 2097152 1GB 114114560 68062 1678155 4194304 4GB 217055232 111807 1955452 4194304 16GB 1717846016 337308 5097465 16777216 64GB 1734918144 1164427 1490479 16777216 256GB 1734918144 4426453 391983 16777216 Reviewed by: rmacklem MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 19 10:47:55 2015 (r281737) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sun Apr 19 11:34:41 2015 (r281738) @@ -1324,10 +1324,13 @@ mountnfs(struct nfs_args *argp, struct m nmp->nm_timeo = NFS_TIMEO; nmp->nm_retry = NFS_RETRANS; nmp->nm_readahead = NFS_DEFRAHEAD; - if (desiredvnodes >= 11000) - nmp->nm_wcommitsize = hibufspace / (desiredvnodes / 1000); - else - nmp->nm_wcommitsize = hibufspace / 10; + + /* This is empirical approximation of sqrt(hibufspace) * 256. */ + nmp->nm_wcommitsize = NFS_MAXBSIZE / 256; + while ((long)nmp->nm_wcommitsize * nmp->nm_wcommitsize < hibufspace) + nmp->nm_wcommitsize *= 2; + nmp->nm_wcommitsize *= 256; + if ((argp->flags & NFSMNT_NFSV4) != 0) nmp->nm_minorvers = minvers; else From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 12:49:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFE4AC6F; Sun, 19 Apr 2015 12: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE65D6EC; Sun, 19 Apr 2015 12:49:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JCnVc0044603; Sun, 19 Apr 2015 12:49:31 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JCnVPX044602; Sun, 19 Apr 2015 12:49:31 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201504191249.t3JCnVPX044602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 19 Apr 2015 12:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281740 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 12:49:31 -0000 Author: melifaro Date: Sun Apr 19 12:49:30 2015 New Revision: 281740 URL: https://svnweb.freebsd.org/changeset/base/281740 Log: Fix use-after-free. Reported by: Coverity Scan, pfg CID: 1245747 Modified: head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/nat.c ============================================================================== --- head/sbin/ipfw/nat.c Sun Apr 19 12:11:07 2015 (r281739) +++ head/sbin/ipfw/nat.c Sun Apr 19 12:49:30 2015 (r281740) @@ -1008,11 +1008,10 @@ nat_foreach(nat_cb_t *f, void *arg, int olh->size = sz; if (do_get3(IP_FW_NAT44_LIST_NAT, &olh->opheader, &sz) != 0) { + sz = olh->size; free(olh); - if (errno == ENOMEM) { - sz = olh->size; + if (errno == ENOMEM) continue; - } return (errno); } From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 15:39:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id CA3E0B1B; Sun, 19 Apr 2015 15:39:27 +0000 (UTC) Date: Sun, 19 Apr 2015 15:39:27 +0000 From: Alexey Dokuchaev To: Eitan Adler Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r281727 - head Message-ID: <20150419153927.GA30772@FreeBSD.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 15:39:27 -0000 On Sun, Apr 19, 2015 at 01:42:08AM -0700, Eitan Adler wrote: > On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: > > On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: > >> New Revision: 281727 > >> URL: https://svnweb.freebsd.org/changeset/base/281727 > >> > >> Log: > >> README: changes and fixups > >> Two orthogonal goals: > >> - try to make README look a little nicer on phabricator by using > >> Remarkup syntax for commands (using `` instead of using a > >> closing ') > >> - try to make README look a little nicer on github. > > > > FreeBSD had traditionally used both double (``...'') and single (`...') > > to express "literal" something; I am not convinced that changing it > > just to match GitHub's markdown warrants it. This `...` form is alien > > to FreeBSD, and can be also confused with backquoted form of shell's > > $(...) command substitution. > > Without this change, the syntax ends up being parsed very weirdly by > both phabricator and github. That said, if there is strong precedent > not to use the markdown syntax, and it would cause confusion, I will > revert those changes. I understand your reasons. I don't think we have any strong precedent for those things, but nor do I want to neglect the issue of markdowning our docs... Seeing /usr/ports/CONTRIBUTING.md already made me shiver. Since we control our own installation of Phabricator, maybe we should teach it to recognize ``...'' and `...' instead of converting them? (I don't know what to do about GitHub, but I don't like the idea that their markdown syntax inadvertently affects our files.) ./danfe From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 15:44:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 774C4CB7; Sun, 19 Apr 2015 15:44:55 +0000 (UTC) Received: from relay.mailchannels.net (tkt-001-i373.relay.mailchannels.net [174.136.5.175]) by mx1.freebsd.org (Postfix) with ESMTP id BA9EEA62; Sun, 19 Apr 2015 15:44:53 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp6.ore.mailhop.org (ip-10-204-4-183.us-west-2.compute.internal [10.204.4.183]) by relay.mailchannels.net (Postfix) with ESMTPA id A984F608FE; Sun, 19 Apr 2015 15:44:50 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp6.ore.mailhop.org (smtp6.ore.mailhop.org [10.45.8.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Sun, 19 Apr 2015 15:44:51 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1429458290817:3322840153 X-MC-Ingress-Time: 1429458290817 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp6.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YjrOs-0001PF-0d; Sun, 19 Apr 2015 15:44:50 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t3JFiktq027639; Sun, 19 Apr 2015 09:44:46 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1/yctJyptgXBtlI3/rUkSaB Message-ID: <1429458286.1182.89.camel@freebsd.org> Subject: Re: svn commit: r281727 - head From: Ian Lepore To: Alexey Dokuchaev Cc: Eitan Adler , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Sun, 19 Apr 2015 09:44:46 -0600 In-Reply-To: <20150419153927.GA30772@FreeBSD.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> <20150419153927.GA30772@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 15:44:55 -0000 On Sun, 2015-04-19 at 15:39 +0000, Alexey Dokuchaev wrote: > On Sun, Apr 19, 2015 at 01:42:08AM -0700, Eitan Adler wrote: > > On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: > > > On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: > > >> New Revision: 281727 > > >> URL: https://svnweb.freebsd.org/changeset/base/281727 > > >> > > >> Log: > > >> README: changes and fixups > > >> Two orthogonal goals: > > >> - try to make README look a little nicer on phabricator by using > > >> Remarkup syntax for commands (using `` instead of using a > > >> closing ') > > >> - try to make README look a little nicer on github. > > > > > > FreeBSD had traditionally used both double (``...'') and single (`...') > > > to express "literal" something; I am not convinced that changing it > > > just to match GitHub's markdown warrants it. This `...` form is alien > > > to FreeBSD, and can be also confused with backquoted form of shell's > > > $(...) command substitution. > > > > Without this change, the syntax ends up being parsed very weirdly by > > both phabricator and github. That said, if there is strong precedent > > not to use the markdown syntax, and it would cause confusion, I will > > revert those changes. > > I understand your reasons. I don't think we have any strong precedent > for those things, but nor do I want to neglect the issue of markdowning > our docs... Seeing /usr/ports/CONTRIBUTING.md already made me shiver. > > Since we control our own installation of Phabricator, maybe we should > teach it to recognize ``...'' and `...' instead of converting them? > (I don't know what to do about GitHub, but I don't like the idea that > their markdown syntax inadvertently affects our files.) > > ./danfe > Indeed, chasing the fad of the day seems like a Really Bad Idea. I know people are religious about github and will bristle at labeling it a fad. People had similar feelings about sourceforge a few years ago. We wisely avoiding changing anything then, and we should do so some more. Our readme and similar files are plain ascii text. If that confuses github, then the fix needs to be applied at github. -- Ian From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 15:54:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6909CE80; Sun, 19 Apr 2015 15:54:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6C7B39; Sun, 19 Apr 2015 15:54:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JFs0dq000191; Sun, 19 Apr 2015 15:54:00 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JFrxP5000178; Sun, 19 Apr 2015 15:53:59 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201504191553.t3JFrxP5000178@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sun, 19 Apr 2015 15:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281745 - in head: share/man/man4 sys/dev/usb 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 15:54:00 -0000 Author: kevlo Date: Sun Apr 19 15:53:58 2015 New Revision: 281745 URL: https://svnweb.freebsd.org/changeset/base/281745 Log: Add new USB ID. PR: 199522 Modified: head/share/man/man4/run.4 head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_run.c Modified: head/share/man/man4/run.4 ============================================================================== --- head/share/man/man4/run.4 Sun Apr 19 14:55:22 2015 (r281744) +++ head/share/man/man4/run.4 Sun Apr 19 15:53:58 2015 (r281745) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 3, 2014 +.Dd April 19, 2015 .Dt RUN 4 .Os .Sh NAME @@ -133,6 +133,7 @@ driver supports the following wireless a .It Belkin F6D4050 ver 1 .It Belkin F9L1103 .It Buffalo WLI-UC-AG300N +.It Buffalo WLI-UC-G300HP .It Buffalo WLI-UC-G300N .It Buffalo WLI-UC-G301N .It Buffalo WLI-UC-GN Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Apr 19 14:55:22 2015 (r281744) +++ head/sys/dev/usb/usbdevs Sun Apr 19 15:53:58 2015 (r281745) @@ -3017,11 +3017,12 @@ product MELCO WLRUCG 0x0116 WLR-UC-G product MELCO WLRUCGAOSS 0x0119 WLR-UC-G-AOSS product MELCO WLIUCAG300N 0x012e WLI-UC-AG300N product MELCO WLIUCG 0x0137 WLI-UC-G -product MELCO RT2870_1 0x0148 RT2870 +product MELCO WLIUCG300HP 0x0148 WLI-UC-G300HP product MELCO RT2870_2 0x0150 RT2870 product MELCO WLIUCGN 0x015d WLI-UC-GN product MELCO WLIUCG301N 0x016f WLI-UC-G301N product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM +product MELCO WLIUCG300HPV1 0x01a8 WLI-UC-G300HP-V1 product MELCO WLIUCGNM2 0x01ee WLI-UC-GNM2 /* Merlin products */ Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sun Apr 19 14:55:22 2015 (r281744) +++ head/sys/dev/usb/wlan/if_run.c Sun Apr 19 15:53:58 2015 (r281745) @@ -225,13 +225,14 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(LOGITEC, LANW300NU2), RUN_DEV(LOGITEC, LANW150NU2), RUN_DEV(LOGITEC, LANW300NU2S), - RUN_DEV(MELCO, RT2870_1), + RUN_DEV(MELCO, WLIUCG300HP), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), RUN_DEV(MELCO, WLIUCG300N), RUN_DEV(MELCO, WLIUCG301N), RUN_DEV(MELCO, WLIUCGN), RUN_DEV(MELCO, WLIUCGNM), + RUN_DEV(MELCO, WLIUCG300HPV1), RUN_DEV(MELCO, WLIUCGNM2), RUN_DEV(MOTOROLA4, RT2770), RUN_DEV(MOTOROLA4, RT3070), From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 16:14:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5964D28B for ; Sun, 19 Apr 2015 16:14:23 +0000 (UTC) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4FBAD12 for ; Sun, 19 Apr 2015 16:14:22 +0000 (UTC) Received: by wgsk9 with SMTP id k9so156092833wgs.3 for ; Sun, 19 Apr 2015 09:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=5Rtl+OdZGJ12ciPXUcxy8int9EC1QGiqM5Mit1QJaRE=; b=PkWKUB3T22vNDhmLRXIs53lOYxHNe4xMCoIvtTZzAtNABmEKaFIhr6pErixN66N3OY 7OLfS4+5ZyZ8i+sqoV7Q/5yd0PsGSH+GjbXy2IEl5ICyVX/yEPZCgXYFVWX9WfOzPih4 Jc3BNDU5w3nef1tb5Pyniznxs+fZj3AOMW7fU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=5Rtl+OdZGJ12ciPXUcxy8int9EC1QGiqM5Mit1QJaRE=; b=bxEalIVxg+ktEU8cRu++Hl4Ue+hxid81VIAMPlWFhXvtrtzYcAdUS2jsxxR1YD3u7+ LEhS0/lTXeeY5NbgHODkqwN1h3NLIq0O/jJovnpAJKMebfLGnSuUMXvfzR4yduv+wDSQ 4XF8ggS+wSy8dhV6cuvqaB/agT5++9iVknnEe7/iMYeCniHUx/1FoTk9rloM+aBmArwe 2Qpr/Q7MOyqruWbGM/R4E8IG1Hd0W5VhLlBAN3pQQhy1ssskMnUmItraK/MKzpQx9vLd HfrODSXLclwtFAYbeCjR7hqUA0wPe//fh6Ulstkfhn1Wqx7qH8hBJWOuDfnMmv7LqdU4 igpg== X-Gm-Message-State: ALoCoQlKPUzjrAnpomnAinffeweGuJGWLwLoY/pBOiPTk1/EEjMq0q24AqrPn5JQHlhZ4C6RBDqF X-Received: by 10.180.81.104 with SMTP id z8mr17862608wix.5.1429460061310; Sun, 19 Apr 2015 09:14:21 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Sun, 19 Apr 2015 09:13:50 -0700 (PDT) In-Reply-To: <1429458286.1182.89.camel@freebsd.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> <20150419153927.GA30772@FreeBSD.org> <1429458286.1182.89.camel@freebsd.org> From: Eitan Adler Date: Sun, 19 Apr 2015 09:13:50 -0700 X-Google-Sender-Auth: 5sLptwNR5HR53nfvgQSK-X5Y5ak Message-ID: Subject: Re: svn commit: r281727 - head To: Ian Lepore Cc: Alexey Dokuchaev , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 16:14:23 -0000 On 19 April 2015 at 08:44, Ian Lepore wrote: > On Sun, 2015-04-19 at 15:39 +0000, Alexey Dokuchaev wrote: >> On Sun, Apr 19, 2015 at 01:42:08AM -0700, Eitan Adler wrote: >> > On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: >> > > On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: >> > >> New Revision: 281727 >> > >> URL: https://svnweb.freebsd.org/changeset/base/281727 >> > >> >> > >> Log: >> > >> README: changes and fixups >> > >> Two orthogonal goals: >> > >> - try to make README look a little nicer on phabricator by using >> > >> Remarkup syntax for commands (using `` instead of using a >> > >> closing ') >> > >> - try to make README look a little nicer on github. >> > > >> > > FreeBSD had traditionally used both double (``...'') and single (`...') >> > > to express "literal" something; I am not convinced that changing it >> > > just to match GitHub's markdown warrants it. This `...` form is alien >> > > to FreeBSD, and can be also confused with backquoted form of shell's >> > > $(...) command substitution. >> > >> > Without this change, the syntax ends up being parsed very weirdly by >> > both phabricator and github. That said, if there is strong precedent >> > not to use the markdown syntax, and it would cause confusion, I will >> > revert those changes. >> >> I understand your reasons. I don't think we have any strong precedent >> for those things, but nor do I want to neglect the issue of markdowning >> our docs... Seeing /usr/ports/CONTRIBUTING.md already made me shiver. >> >> Since we control our own installation of Phabricator, maybe we should >> teach it to recognize ``...'' and `...' instead of converting them? >> (I don't know what to do about GitHub, but I don't like the idea that >> their markdown syntax inadvertently affects our files.) >> >> ./danfe >> > > Indeed, chasing the fad of the day seems like a Really Bad Idea. I know > people are religious about github and will bristle at labeling it a fad. > People had similar feelings about sourceforge a few years ago. We > wisely avoiding changing anything then, and we should do so some more. There is a difference between chasing the latest fad at the expense of the tools we already use, vs trying to allow users to do both. > Our readme and similar files are plain ascii text. If that confuses > github, then the fix needs to be applied at github. Note well: I avoided changing the files to be pure Markdown or Remarkup. I kept the files readable as plaintext. The goal of r281727 (this commit) was to - keep the plaintext readable - make it more readable on github - make it more readable on phabricator As an example, in the list of the 'source roadmap' only the entry usr.sbin has a single tab instead of double tab. This causes it to be non-tabular when parsed as GHB. I chose not to fix this, because it would break the plaintext alignment. Trying to get all three of these right is actually quite difficult :'( -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 16:18:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A05FA45F for ; Sun, 19 Apr 2015 16:18:00 +0000 (UTC) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31A7DD34 for ; Sun, 19 Apr 2015 16:18:00 +0000 (UTC) Received: by wizk4 with SMTP id k4so72588874wiz.1 for ; Sun, 19 Apr 2015 09:17:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=OWheE/8NvSRGSQpoG12UQeAuRvFXvx/kf7heYkZE3do=; b=ZFTR2rCkgwCw7YoSUM13Za6MbVjLFQ6dHfc9n0VAdxfk8w/w74Xeip9SJSYlA8virj MoqblEVt7Mt8xVnfaVvOG9uhi7D31S8SBTQhmHWuMsPP5IfjOma6fALrjUdko8k4WgSK rjRRv02wp5TU0vnbu1ULqsdLjuLLm9+VmXqqY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=OWheE/8NvSRGSQpoG12UQeAuRvFXvx/kf7heYkZE3do=; b=T/UoqIJbVwkA+rGkefsE065KoB8QMLhq/q1phiOhyaGdHjJS3al6/sI2bSSsmAIm6l NnV9MP5h0u2wjM3Njb/fSK+JNhM+54TTk6mTpQ0Ly8cfNxDbNTs/wFxHFGLfWHSbwAkA WPXAzV9LY1H9D4NfBeP2BKcE0vyGEnPJQ05CwQXV76v2ye7ssCRm3JMqnhMwjL1H+fzl 6dSW0ueboKDy3bYw5uycinJ1BAEen8el8qGGXX+iuQv/my7Xd7uDpD1xh6tCDhQzjDR3 RGOCNg64HV+8QHtbGfX8pHm9euk7Rx2/Qb3JgVnEOPm3TCyNyLHGvZP1DJsZdXHYorcJ oqWA== X-Gm-Message-State: ALoCoQnwKj0lXPjbzafcY8AkxBxE77/8udzCtpE8Bq5QP2TyZD1XnVoYsugwdRzhNOKEh1IIZDde X-Received: by 10.180.92.161 with SMTP id cn1mr17752429wib.91.1429460278540; Sun, 19 Apr 2015 09:17:58 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Sun, 19 Apr 2015 09:17:28 -0700 (PDT) In-Reply-To: <20150419153927.GA30772@FreeBSD.org> References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> <20150419153927.GA30772@FreeBSD.org> From: Eitan Adler Date: Sun, 19 Apr 2015 09:17:28 -0700 X-Google-Sender-Auth: q3csPyRtl2UU8nmpczbJoabm4qY Message-ID: Subject: Re: svn commit: r281727 - head To: Alexey Dokuchaev Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 16:18:00 -0000 On 19 April 2015 at 08:39, Alexey Dokuchaev wrote: > On Sun, Apr 19, 2015 at 01:42:08AM -0700, Eitan Adler wrote: >> On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: >> > On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: >> >> New Revision: 281727 >> >> URL: https://svnweb.freebsd.org/changeset/base/281727 >> >> >> >> Log: >> >> README: changes and fixups >> >> Two orthogonal goals: >> >> - try to make README look a little nicer on phabricator by using >> >> Remarkup syntax for commands (using `` instead of using a >> >> closing ') >> >> - try to make README look a little nicer on github. >> > >> > FreeBSD had traditionally used both double (``...'') and single (`...') >> > to express "literal" something; I am not convinced that changing it >> > just to match GitHub's markdown warrants it. This `...` form is alien >> > to FreeBSD, and can be also confused with backquoted form of shell's >> > $(...) command substitution. >> >> Without this change, the syntax ends up being parsed very weirdly by >> both phabricator and github. That said, if there is strong precedent >> not to use the markdown syntax, and it would cause confusion, I will >> revert those changes. > > I understand your reasons. I don't think we have any strong precedent > for those things, but nor do I want to neglect the issue of markdowning > our docs... Seeing /usr/ports/CONTRIBUTING.md already made me shiver. > > Since we control our own installation of Phabricator, maybe we should > teach it to recognize ``...'' and `...' instead of converting them? > (I don't know what to do about GitHub, but I don't like the idea that > their markdown syntax inadvertently affects our files.) I will have a conversation with the phabricator folks. If there is an option to provide a custom parser for such things I don't see the harm in trying it. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 17:07:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9837F193 for ; Sun, 19 Apr 2015 17:07:49 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C9D8236 for ; Sun, 19 Apr 2015 17:07:49 +0000 (UTC) Received: by widdi4 with SMTP id di4so67659869wid.0 for ; Sun, 19 Apr 2015 10:07:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=WotAkS5bHeZqIwUbfamZeFYSUW0J3eFyWKEmiLIH69c=; b=Dhru7THu/boFFuc5kedAuITRn+XiqQpDlWPFSGVcFN8sUv8DyTBzbu2qsw+Jk3Wq87 U5UaDK0Vsz86HZ6A8OC5sbiBcgNLZNGQR32mn/Yn6zfq8uf0r3rwkS3Upacip5MhVF1i +epJMzeyTphpDWjtETWMupOdR5Z4aEyiv08qrCeiwFg0GfNTvyjqM3F0TDpnXKQfXJOu k4f42pn6AAVmzW5hlw0BAEe13jYQbSlW3uMxDm1lIVaYbUxautFNfuE/cojE+9Q6I8TS fFC1DS1HylIMDh1lDbx3el1P98AscmyvmiNuI8oDvu7t3RskAhx7AvV+ho7Q4FY/rSV9 fBiQ== X-Gm-Message-State: ALoCoQmZLqE46/qropeoqcZL0dyB2NvhTAl6vvL/sRL9wjGJwDTvGQHpLTpzK9lCGIwiwT1InBd/ X-Received: by 10.194.157.39 with SMTP id wj7mr23932158wjb.57.1429463261196; Sun, 19 Apr 2015 10:07:41 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id eh5sm11692553wic.20.2015.04.19.10.07.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Apr 2015 10:07:40 -0700 (PDT) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <5533E0E1.7030801@freebsd.org> Date: Sun, 19 Apr 2015 18:07:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Eitan Adler , Alexey Dokuchaev CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r281727 - head References: <201504190716.t3J7GjmW072744@svn.freebsd.org> <20150419083451.GA79519@FreeBSD.org> <20150419153927.GA30772@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 17:07:49 -0000 On 19/04/2015 17:17, Eitan Adler wrote: > On 19 April 2015 at 08:39, Alexey Dokuchaev wrote: >> On Sun, Apr 19, 2015 at 01:42:08AM -0700, Eitan Adler wrote: >>> On 19 April 2015 at 01:34, Alexey Dokuchaev wrote: >>>> On Sun, Apr 19, 2015 at 07:16:45AM +0000, Eitan Adler wrote: >>>>> New Revision: 281727 >>>>> URL: https://svnweb.freebsd.org/changeset/base/281727 >>>>> >>>>> Log: >>>>> README: changes and fixups >>>>> Two orthogonal goals: >>>>> - try to make README look a little nicer on phabricator by using >>>>> Remarkup syntax for commands (using `` instead of using a >>>>> closing ') >>>>> - try to make README look a little nicer on github. >>>> FreeBSD had traditionally used both double (``...'') and single (`...') >>>> to express "literal" something; I am not convinced that changing it >>>> just to match GitHub's markdown warrants it. This `...` form is alien >>>> to FreeBSD, and can be also confused with backquoted form of shell's >>>> $(...) command substitution. >>> Without this change, the syntax ends up being parsed very weirdly by >>> both phabricator and github. That said, if there is strong precedent >>> not to use the markdown syntax, and it would cause confusion, I will >>> revert those changes. >> I understand your reasons. I don't think we have any strong precedent >> for those things, but nor do I want to neglect the issue of markdowning >> our docs... Seeing /usr/ports/CONTRIBUTING.md already made me shiver. >> >> Since we control our own installation of Phabricator, maybe we should >> teach it to recognize ``...'' and `...' instead of converting them? >> (I don't know what to do about GitHub, but I don't like the idea that >> their markdown syntax inadvertently affects our files.) > I will have a conversation with the phabricator folks. If there is an > option to provide a custom parser for such things I don't see the harm > in trying it. Making the simple changes in the commit achieves its goal and it doesn't effect its readability in plan text so why wast time adapting tools when its not needed. Lets not be afraid to adapt for the greater good :) Regards Steve From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 17:07:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D157E198; Sun, 19 Apr 2015 17: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF4E2239; Sun, 19 Apr 2015 17:07:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JH7p2e061123; Sun, 19 Apr 2015 17:07:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JH7pQY061122; Sun, 19 Apr 2015 17:07:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504191707.t3JH7pQY061122@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 19 Apr 2015 17:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281746 - head/tools/tools/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 17:07:51 -0000 Author: adrian Date: Sun Apr 19 17:07:51 2015 New Revision: 281746 URL: https://svnweb.freebsd.org/changeset/base/281746 Log: Update pkt-gen to optionally use randomised source/destination IPv4 addresses/ports. When doing traffic testing of actual code that /does/ things to the packet (rather than say, 'bridge.c'), it's typically a good idea to use a variety of cache-busting and flow-tracking-busting packet spreads. The pkt-gen method of testing an IP range was to walk it linearly - which is fine, but not useful enough. This can be used to completely randomize the source/destination addresses (eg to test out flow-tracking-busting) and to keep the destination fixed whilst randomising the source (eg to test out what a DDoS may look like.) Tested: * Intel ixgbe 10G (82599) netmap Differential Revision: https://reviews.freebsd.org/D2309 MFC after: 2 weeks Sponsored by: Norse Corp, Inc. Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Sun Apr 19 15:53:58 2015 (r281745) +++ head/tools/tools/netmap/pkt-gen.c Sun Apr 19 17:07:51 2015 (r281746) @@ -183,6 +183,8 @@ struct glob_arg { #define OPT_DUMP 64 /* dump rx/tx traffic */ #define OPT_MONITOR_TX 128 #define OPT_MONITOR_RX 256 +#define OPT_RANDOM_SRC 512 +#define OPT_RANDOM_DST 1024 int dev_type; #ifndef NO_PCAP pcap_t *p; @@ -567,32 +569,44 @@ update_addresses(struct pkt *pkt, struct struct udphdr *udp = &pkt->udp; do { - p = ntohs(udp->uh_sport); - if (p < g->src_ip.port1) { /* just inc, no wrap */ - udp->uh_sport = htons(p + 1); - break; - } - udp->uh_sport = htons(g->src_ip.port0); + /* XXX for now it doesn't handle non-random src, random dst */ + if (g->options & OPT_RANDOM_SRC) { + udp->uh_sport = random(); + ip->ip_src.s_addr = random(); + } else { + p = ntohs(udp->uh_sport); + if (p < g->src_ip.port1) { /* just inc, no wrap */ + udp->uh_sport = htons(p + 1); + break; + } + udp->uh_sport = htons(g->src_ip.port0); - a = ntohl(ip->ip_src.s_addr); - if (a < g->src_ip.end) { /* just inc, no wrap */ - ip->ip_src.s_addr = htonl(a + 1); - break; - } - ip->ip_src.s_addr = htonl(g->src_ip.start); + a = ntohl(ip->ip_src.s_addr); + if (a < g->src_ip.end) { /* just inc, no wrap */ + ip->ip_src.s_addr = htonl(a + 1); + break; + } + ip->ip_src.s_addr = htonl(g->src_ip.start); - udp->uh_sport = htons(g->src_ip.port0); - p = ntohs(udp->uh_dport); - if (p < g->dst_ip.port1) { /* just inc, no wrap */ - udp->uh_dport = htons(p + 1); - break; + udp->uh_sport = htons(g->src_ip.port0); } - udp->uh_dport = htons(g->dst_ip.port0); - a = ntohl(ip->ip_dst.s_addr); - if (a < g->dst_ip.end) { /* just inc, no wrap */ - ip->ip_dst.s_addr = htonl(a + 1); - break; + if (g->options & OPT_RANDOM_DST) { + udp->uh_dport = random(); + ip->ip_dst.s_addr = random(); + } else { + p = ntohs(udp->uh_dport); + if (p < g->dst_ip.port1) { /* just inc, no wrap */ + udp->uh_dport = htons(p + 1); + break; + } + udp->uh_dport = htons(g->dst_ip.port0); + + a = ntohl(ip->ip_dst.s_addr); + if (a < g->dst_ip.end) { /* just inc, no wrap */ + ip->ip_dst.s_addr = htonl(a + 1); + break; + } } ip->ip_dst.s_addr = htonl(g->dst_ip.start); } while (0); @@ -1394,7 +1408,9 @@ usage(void) "\t-R rate in packets per second\n" "\t-X dump payload\n" "\t-H len add empty virtio-net-header with size 'len'\n" - "\t-P file load packet from pcap file" + "\t-P file load packet from pcap file\n" + "\t-z use random IPv4 src address/port\n" + "\t-Z use random IPv4 dst address/port\n" "", cmd); @@ -1667,7 +1683,7 @@ main(int arc, char **argv) g.virt_header = 0; while ( (ch = getopt(arc, argv, - "a:f:F:n:i:Il:d:s:D:S:b:c:o:p:T:w:WvR:XC:H:e:m:P:")) != -1) { + "a:f:F:n:i:Il:d:s:D:S:b:c:o:p:T:w:WvR:XC:H:e:m:P:zZ")) != -1) { struct sf *fn; switch(ch) { @@ -1813,8 +1829,13 @@ main(int arc, char **argv) case 'P': g.packet_file = strdup(optarg); break; + case 'z': + g.options |= OPT_RANDOM_SRC; + break; + case 'Z': + g.options |= OPT_RANDOM_DST; + break; } - } if (strlen(g.ifname) <=0 ) { From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 17:15:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 469EE474; Sun, 19 Apr 2015 17:15:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27F56330; Sun, 19 Apr 2015 17:15:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JHFuOe068376; Sun, 19 Apr 2015 17:15:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JHFtGh068372; Sun, 19 Apr 2015 17:15:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504191715.t3JHFtGh068372@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 19 Apr 2015 17:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281747 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 17:15:56 -0000 Author: adrian Date: Sun Apr 19 17:15:55 2015 New Revision: 281747 URL: https://svnweb.freebsd.org/changeset/base/281747 Log: Refactor out the _PXM -> VM domain lookup done in ACPI, in preparation for its use in upcoming code. This is inspired by something in jhb's NUMA IRQ allocation patchset. However, the tricky bit here is that the PXM lookup for a node may fail, requiring a lookup on the parent node. So if it doesn't exist, don't fail - just go up to the parent. Only error out of the lookup is the ACPI lookup returns an error. Sponsored by: Norse Corp, Inc. Modified: head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpivar.h Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Sun Apr 19 17:07:51 2015 (r281746) +++ head/sys/dev/acpica/acpi.c Sun Apr 19 17:15:55 2015 (r281747) @@ -1071,30 +1071,53 @@ acpi_hint_device_unit(device_t acdev, de } /* - * Fetch the NUMA domain for the given device. - * - * If a device has a _PXM method, map that to a NUMA domain. + * Fetch the VM domain for the given device 'dev'. * - * If none is found, then it'll call the parent method. - * If there's no domain, return ENOENT. + * Return 1 + domain if there's a domain, 0 if not found; + * -1 upon an error. */ int -acpi_get_domain(device_t dev, device_t child, int *domain) +acpi_parse_pxm(device_t dev, int *domain) { #if MAXMEMDOM > 1 ACPI_HANDLE h; int d, pxm; - h = acpi_get_handle(child); + h = acpi_get_handle(dev); if ((h != NULL) && ACPI_SUCCESS(acpi_GetInteger(h, "_PXM", &pxm))) { d = acpi_map_pxm_to_vm_domainid(pxm); if (d < 0) - return (ENOENT); + return (-1); *domain = d; - return (0); + return (1); } #endif + + return (0); +} + +/* + * Fetch the NUMA domain for the given device. + * + * If a device has a _PXM method, map that to a NUMA domain. + * + * If none is found, then it'll call the parent method. + * If there's no domain, return ENOENT. + */ +int +acpi_get_domain(device_t dev, device_t child, int *domain) +{ + int ret; + + ret = acpi_parse_pxm(child, domain); + /* Error */ + if (ret == -1) + return (ENOENT); + /* Found */ + if (ret == 1) + return (0); + /* No _PXM node; go up a level */ return (bus_generic_get_domain(dev, child, domain)); } Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Sun Apr 19 17:07:51 2015 (r281746) +++ head/sys/dev/acpica/acpivar.h Sun Apr 19 17:15:55 2015 (r281747) @@ -500,8 +500,8 @@ SYSCTL_DECL(_debug_acpi); #if MAXMEMDOM > 1 extern int acpi_map_pxm_to_vm_domainid(int pxm); #endif - extern int acpi_get_domain(device_t dev, device_t child, int *domain); +extern int acpi_parse_pxm(device_t dev, int *domain); #endif /* _KERNEL */ #endif /* !_ACPIVAR_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 20:15:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35AC4F14; Sun, 19 Apr 2015 20:15:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23B1293A; Sun, 19 Apr 2015 20:15:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JKFws3018368; Sun, 19 Apr 2015 20:15:58 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JKFwm1018367; Sun, 19 Apr 2015 20:15:58 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201504192015.t3JKFwm1018367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 19 Apr 2015 20:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281751 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 20:15:58 -0000 Author: marius Date: Sun Apr 19 20:15:57 2015 New Revision: 281751 URL: https://svnweb.freebsd.org/changeset/base/281751 Log: Refine the workaround for Intel HSD131 [1] added in r269052: - Use the full mask described by the erratum as with a sufficiently high number of these false-positives, the overflow bit (bit 62) additionally gets set [7]. - HSD131 has been brought into several other Haswell-derived CPUs including to the next generation, i. e. Intel Broadwell. Thus, also skip reporting of these benign errors by default on CPU models affected by HSM142, HSW131 and BDM48 [2 - 5], describing the HSD131 silicon bug for additional models. Also, Celeron 2955U with a CPU ID of 0x45 have been reported to be covered by this fault [6], with the specification update concerned with HSM142 [2] only referring to 0x3c and 0x46. Submitted by: David Froehlich [7] MFC after: 3 days http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf [1] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-mobile-specification-update.pdf [2] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/5th-gen-core-family-spec-update.pdf [3] http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/core-m-processor-family-spec-update.pdf [4] http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e3-1200v3-spec-update.pdf [5] https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046878.html [6] Modified: head/sys/x86/x86/mca.c Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Sun Apr 19 20:08:36 2015 (r281750) +++ head/sys/x86/x86/mca.c Sun Apr 19 20:15:57 2015 (r281751) @@ -251,15 +251,24 @@ mca_mute(const struct mca_record *rec) { /* - * Skip spurious corrected parity errors generated by desktop Haswell - * (see HSD131 erratum) unless reporting is enabled. - * Note that these errors also have been observed with D0-stepping, - * while the revision 014 desktop Haswell specification update only - * talks about C0-stepping. + * Skip spurious corrected parity errors generated by Intel Haswell- + * and Broadwell-based CPUs (see HSD131, HSM142, HSW131 and BDM48 + * erratum respectively), unless reporting is enabled. + * Note that these errors also have been observed with the D0-stepping + * of Haswell, while at least initially the CPU specification updates + * suggested only the C0-stepping to be affected. Similarly, Celeron + * 2955U with a CPU ID of 0x45 apparently are also concerned with the + * same problem, with HSM142 only referring to 0x3c and 0x46. */ - if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && - rec->mr_cpu_id == 0x306c3 && rec->mr_bank == 0 && - rec->mr_status == 0x90000040000f0005 && !intel6h_HSD131) + if (cpu_vendor_id == CPU_VENDOR_INTEL && + CPUID_TO_FAMILY(cpu_id) == 0x6 && + (CPUID_TO_MODEL(cpu_id) == 0x3c || /* HSD131, HSM142, HSW131 */ + CPUID_TO_MODEL(cpu_id) == 0x3d || /* BDM48 */ + CPUID_TO_MODEL(cpu_id) == 0x45 || + CPUID_TO_MODEL(cpu_id) == 0x46) && /* HSM142 */ + rec->mr_bank == 0 && + (rec->mr_status & 0xa0000000ffffffff) == 0x80000000000f0005 && + !intel6h_HSD131) return (1); return (0); From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 20:20:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB69D106; Sun, 19 Apr 2015 20:20:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9EB095B; Sun, 19 Apr 2015 20:20:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JKKqlx022560; Sun, 19 Apr 2015 20:20:52 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JKKqie022559; Sun, 19 Apr 2015 20:20:52 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201504192020.t3JKKqie022559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 19 Apr 2015 20:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281752 - head/sys/arm/allwinner/a20 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 20:20:53 -0000 Author: marius Date: Sun Apr 19 20:20:52 2015 New Revision: 281752 URL: https://svnweb.freebsd.org/changeset/base/281752 Log: Make a comment reflect reality. Modified: head/sys/arm/allwinner/a20/a20_mp.c Modified: head/sys/arm/allwinner/a20/a20_mp.c ============================================================================== --- head/sys/arm/allwinner/a20/a20_mp.c Sun Apr 19 20:15:57 2015 (r281751) +++ head/sys/arm/allwinner/a20/a20_mp.c Sun Apr 19 20:20:52 2015 (r281752) @@ -25,6 +25,7 @@ #include __FBSDID("$FreeBSD$"); + #include #include #include @@ -71,7 +72,7 @@ platform_mp_setmaxid(void) if (mp_ncpus != 0) return; - /* Read current CP15 Cache Size ID Register */ + /* Read the number of cores from the CP15 L2 Control Register. */ __asm __volatile("mrc p15, 1, %0, c9, c0, 2" : "=r" (ncpu)); ncpu = ((ncpu >> 24) & 0x3) + 1; From owner-svn-src-head@FreeBSD.ORG Sun Apr 19 23:56:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F090846E; Sun, 19 Apr 2015 23:55:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEB4FFE2; Sun, 19 Apr 2015 23:55:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JNtxfQ079922; Sun, 19 Apr 2015 23:55:59 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JNtx0i079921; Sun, 19 Apr 2015 23:55:59 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504192355.t3JNtx0i079921@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 19 Apr 2015 23:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281756 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 23:56:00 -0000 Author: pfg Date: Sun Apr 19 23:55:59 2015 New Revision: 281756 URL: https://svnweb.freebsd.org/changeset/base/281756 Log: nfsrpc_createv4: fix double free. Reported by: Oliver Pinter, clang static checker Obtained from: HardenedBSD (commit 63cac77c42c0c3fc67da62f97d5ab651d52ae707) Reviewed by: rmacklem MFC after: 5 days Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 19 23:45:04 2015 (r281755) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 19 23:55:59 2015 (r281756) @@ -2153,8 +2153,10 @@ nfsrpc_createv4(vnode_t dvp, char *name, (void) nfs_catnap(PZERO, ret, "nfs_crt2"); } while (ret == NFSERR_DELAY); if (ret) { - if (dp != NULL) + if (dp != NULL) { FREE((caddr_t)dp, M_NFSCLDELEG); + dp = NULL; + } if (ret == NFSERR_STALECLIENTID || ret == NFSERR_STALEDONTRECOVER || ret == NFSERR_BADSESSION) From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 02:07:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 002D3AA; Mon, 20 Apr 2015 02:07:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2AA8DDC; Mon, 20 Apr 2015 02:07:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K27vj4078042; Mon, 20 Apr 2015 02:07:57 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K27vFt078041; Mon, 20 Apr 2015 02:07:57 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504200207.t3K27vFt078041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 20 Apr 2015 02:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281758 - head/bin/ed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 02:07:58 -0000 Author: eadler Date: Mon Apr 20 02:07:57 2015 New Revision: 281758 URL: https://svnweb.freebsd.org/changeset/base/281758 Log: ed(1): Fix [-Werror=logical-not-parentheses] /usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied to theleft hand side of comparison [-Werror=logical-not-parentheses] Obtained from: Dragonfly (1fff89cbaeaa43af720a1f23d9c466b756dd8a58) MFC After: 1 month Modified: head/bin/ed/glbl.c Modified: head/bin/ed/glbl.c ============================================================================== --- head/bin/ed/glbl.c Mon Apr 20 00:24:32 2015 (r281757) +++ head/bin/ed/glbl.c Mon Apr 20 02:07:57 2015 (r281758) @@ -60,7 +60,7 @@ build_active_list(int isgcmd) return ERR; if (isbinary) NUL_TO_NEWLINE(s, lp->len); - if (!regexec(pat, s, 0, NULL, 0) == isgcmd && + if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && set_active_node(lp) < 0) return ERR; } From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 02:23:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 525022C7; Mon, 20 Apr 2015 02:23:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40B00F64; Mon, 20 Apr 2015 02:23:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K2N1Yd091371; Mon, 20 Apr 2015 02:23:01 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K2N1LJ091370; Mon, 20 Apr 2015 02:23:01 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504200223.t3K2N1LJ091370@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 20 Apr 2015 02:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281759 - head/usr.bin/find X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 02:23:01 -0000 Author: eadler Date: Mon Apr 20 02:23:00 2015 New Revision: 281759 URL: https://svnweb.freebsd.org/changeset/base/281759 Log: find.1: Add missing whitespace: Obtained from: Dragonfly (dee38d02d51cc8316f82b0263158d2546f2398bc) Modified: head/usr.bin/find/find.1 Modified: head/usr.bin/find/find.1 ============================================================================== --- head/usr.bin/find/find.1 Mon Apr 20 02:07:57 2015 (r281758) +++ head/usr.bin/find/find.1 Mon Apr 20 02:23:00 2015 (r281759) @@ -1015,7 +1015,7 @@ and as well as .Ic -amin , -anewer , -cmin , -cnewer , -delete , -empty , -fstype , .Ic -iname , -inum , -iregex , -ls , -maxdepth , -mindepth , -mmin , -.Ic -path , -print0 , -regex, -sparse +.Ic -path , -print0 , -regex , -sparse and all of the .Ic -B* birthtime related primaries are extensions to From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 04:24:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DF91136; Mon, 20 Apr 2015 04:24:03 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 46487E0D; Mon, 20 Apr 2015 04:24:02 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 83D733C6323; Mon, 20 Apr 2015 14:23:58 +1000 (AEST) Date: Mon, 20 Apr 2015 14:23:58 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281758 - head/bin/ed In-Reply-To: <201504200207.t3K27vFt078041@svn.freebsd.org> Message-ID: <20150420134409.I855@besplex.bde.org> References: <201504200207.t3K27vFt078041@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=SCDeaYg9Xmf2xJ3y6JIA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 04:24:03 -0000 On Mon, 20 Apr 2015, Eitan Adler wrote: > Log: > ed(1): Fix [-Werror=logical-not-parentheses] > /usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied to > theleft hand side of comparison [-Werror=logical-not-parentheses] > > Obtained from: Dragonfly (1fff89cbaeaa43af720a1f23d9c466b756dd8a58) > MFC After: 1 month > > Modified: > head/bin/ed/glbl.c > > Modified: head/bin/ed/glbl.c > ============================================================================== > --- head/bin/ed/glbl.c Mon Apr 20 00:24:32 2015 (r281757) > +++ head/bin/ed/glbl.c Mon Apr 20 02:07:57 2015 (r281758) > @@ -60,7 +60,7 @@ build_active_list(int isgcmd) > return ERR; > if (isbinary) > NUL_TO_NEWLINE(s, lp->len); > - if (!regexec(pat, s, 0, NULL, 0) == isgcmd && > + if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && > set_active_node(lp) < 0) > return ERR; > } How can this be right? !(a == b) is an obfuscated way of writing a != b. The old code seems to have been correct. regexec() returns a pseudo-inverted boolean (0 for success, nonzero for error). isgcmd is a pure boolean (it is an int function arg, so it could be any integer, but it is in a function whose only caller passes it the result of a logical expression). Presumably it is not inverted. Pseudo-inverted booleans must be turned into a pure booleans before being compared with pure booleans, and must usually be inverted. Presumably, inversion is wanted here. This was done using the ! operator. Now, nonsense is done. There is a type mismatch (integer compared with boolean), and even if the integer has only boolean values, then these are probably reversed. The correct way to turn a pseudo-inverted boolean named `error' into a non-inverted boolean is (error == 0), not !error, even if `error' is spelled `regexec(pat, s, 0, NULL, 0)'. Strict KNF doesn't even allow using the ! operator for booleans, but ed(1) uses the ! operator a bit. Sloppy code uses `if (error)' and `if (!error)'. These work because they are equivalent to `if (error != 0)' and `if (error == 0') respectively, and integer 0 represents boolean false uniquely. Similar expressions with integer 1 or a boolean variable don't work because nonzero integers don't represent boolean true uniquely. A related popular obfuscation is to convert a pseudo-non-inverted boolean pnib to a non-inverted boolean using !!pnib. This saves a few characters and is easy for a quick edit than writing (pnib != 0). Bruce From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 08:25:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 872426DB; Mon, 20 Apr 2015 08:25:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7564DBE1; Mon, 20 Apr 2015 08:25:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K8PuHR058547; Mon, 20 Apr 2015 08:25:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K8Pu2V058541; Mon, 20 Apr 2015 08:25:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504200825.t3K8Pu2V058541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Apr 2015 08:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281762 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 08:25:56 -0000 Author: kib Date: Mon Apr 20 08:25:55 2015 New Revision: 281762 URL: https://svnweb.freebsd.org/changeset/base/281762 Log: Remove duplicate definitions of MWAIT_CX hints. Identical defines in specialreg.h are enough. Discussed with: mav Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Apr 20 03:46:52 2015 (r281761) +++ head/sys/amd64/amd64/machdep.c Mon Apr 20 08:25:55 2015 (r281762) @@ -730,15 +730,6 @@ cpu_idle_hlt(sbintime_t sbt) *state = STATE_RUNNING; } -/* - * MWAIT cpu power states. Lower 4 bits are sub-states. - */ -#define MWAIT_C0 0xf0 -#define MWAIT_C1 0x00 -#define MWAIT_C2 0x10 -#define MWAIT_C3 0x20 -#define MWAIT_C4 0x30 - static void cpu_idle_mwait(sbintime_t sbt) { Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Apr 20 03:46:52 2015 (r281761) +++ head/sys/i386/i386/machdep.c Mon Apr 20 08:25:55 2015 (r281762) @@ -1361,15 +1361,6 @@ cpu_idle_hlt(sbintime_t sbt) } #endif -/* - * MWAIT cpu power states. Lower 4 bits are sub-states. - */ -#define MWAIT_C0 0xf0 -#define MWAIT_C1 0x00 -#define MWAIT_C2 0x10 -#define MWAIT_C3 0x20 -#define MWAIT_C4 0x30 - static void cpu_idle_mwait(sbintime_t sbt) { From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 09:07:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31985F91; Mon, 20 Apr 2015 09:07:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FACE72; Mon, 20 Apr 2015 09:07:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K97CZk089842; Mon, 20 Apr 2015 09:07:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K97Cv6089841; Mon, 20 Apr 2015 09:07:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504200907.t3K97Cv6089841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Apr 2015 09:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281763 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 09:07:13 -0000 Author: kib Date: Mon Apr 20 09:07:12 2015 New Revision: 281763 URL: https://svnweb.freebsd.org/changeset/base/281763 Log: Remove code to support the top of the stack layout for FreeBSD 1.x/2.x kernel, but keep explanation of the old ps_strings structure to make it clear what sanity check tries to accomplish. Noted by: Oliver Pinter Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/lib/libc/gen/setproctitle.c Modified: head/lib/libc/gen/setproctitle.c ============================================================================== --- head/lib/libc/gen/setproctitle.c Mon Apr 20 08:25:55 2015 (r281762) +++ head/lib/libc/gen/setproctitle.c Mon Apr 20 09:07:12 2015 (r281763) @@ -42,9 +42,10 @@ __FBSDID("$FreeBSD$"); * 1: old_ps_strings at the very top of the stack. * 2: old_ps_strings at SPARE_USRSPACE below the top of the stack. * 3: ps_strings at the very top of the stack. - * This attempts to support a kernel built in the #2 and #3 era. - */ - + * We only support a kernel providing #3 style ps_strings. + * + * For historical purposes, a definition of the old ps_strings structure + * and location is preserved below: struct old_ps_strings { char *old_ps_argvstr; int old_ps_nargvstr; @@ -53,6 +54,7 @@ struct old_ps_strings { }; #define OLD_PS_STRINGS ((struct old_ps_strings *) \ (USRSTACK - SPARE_USRSPACE - sizeof(struct old_ps_strings))) + */ #include @@ -136,41 +138,38 @@ setproctitle(const char *fmt, ...) ps_strings = (struct ps_strings *)ul_ps_strings; } - /* PS_STRINGS points to zeroed memory on a style #2 kernel */ - if (ps_strings->ps_argvstr) { - /* style #3 */ - if (oargc == -1) { - /* Record our original args */ - oargc = ps_strings->ps_nargvstr; - oargv = ps_strings->ps_argvstr; - for (i = len = 0; i < oargc; i++) { - /* - * The program may have scribbled into its - * argv array, e.g., to remove some arguments. - * If that has happened, break out before - * trying to call strlen on a NULL pointer. - */ - if (oargv[i] == NULL) { - oargc = i; - break; - } - snprintf(obuf + len, SPT_BUFSIZE - len, "%s%s", - len ? " " : "", oargv[i]); - if (len) - len++; - len += strlen(oargv[i]); - if (len >= SPT_BUFSIZE) - break; + /* + * PS_STRINGS points to zeroed memory on a style #2 kernel. + * Should not happen. + */ + if (ps_strings->ps_argvstr == NULL) + return; + + /* style #3 */ + if (oargc == -1) { + /* Record our original args */ + oargc = ps_strings->ps_nargvstr; + oargv = ps_strings->ps_argvstr; + for (i = len = 0; i < oargc; i++) { + /* + * The program may have scribbled into its + * argv array, e.g., to remove some arguments. + * If that has happened, break out before + * trying to call strlen on a NULL pointer. + */ + if (oargv[i] == NULL) { + oargc = i; + break; } + snprintf(obuf + len, SPT_BUFSIZE - len, "%s%s", + len != 0 ? " " : "", oargv[i]); + if (len != 0) + len++; + len += strlen(oargv[i]); + if (len >= SPT_BUFSIZE) + break; } - ps_strings->ps_nargvstr = nargc; - ps_strings->ps_argvstr = nargvp; - } else { - /* style #2 - we can only restore our first arg :-( */ - if (*obuf == '\0') - strncpy(obuf, OLD_PS_STRINGS->old_ps_argvstr, - SPT_BUFSIZE - 1); - OLD_PS_STRINGS->old_ps_nargvstr = 1; - OLD_PS_STRINGS->old_ps_argvstr = nargvp[0]; } + ps_strings->ps_nargvstr = nargc; + ps_strings->ps_argvstr = nargvp; } From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 10:29:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDF84EC8; Mon, 20 Apr 2015 10:29:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC6E1B18; Mon, 20 Apr 2015 10:29:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KATgbN050968; Mon, 20 Apr 2015 10:29:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KATgM4050967; Mon, 20 Apr 2015 10:29:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504201029.t3KATgM4050967@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2015 10:29:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281764 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 10:29:43 -0000 Author: mav Date: Mon Apr 20 10:29:42 2015 New Revision: 281764 URL: https://svnweb.freebsd.org/changeset/base/281764 Log: Disable RX/TX queues notifications when not needed. This reduces CPU load and doubles iperf throughput, reaching 2-3Gbit/s. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 09:07:12 2015 (r281763) +++ head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 10:29:42 2015 (r281764) @@ -393,6 +393,7 @@ pci_vtnet_ping_rxq(void *vsc, struct vqu */ if (sc->vsc_rx_ready == 0) { sc->vsc_rx_ready = 1; + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; } } @@ -438,6 +439,7 @@ pci_vtnet_ping_txq(void *vsc, struct vqu /* Signal the tx thread for processing */ pthread_mutex_lock(&sc->tx_mtx); + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; if (sc->tx_in_progress == 0) pthread_cond_signal(&sc->tx_cond); pthread_mutex_unlock(&sc->tx_mtx); @@ -466,6 +468,7 @@ pci_vtnet_tx_thread(void *param) for (;;) { /* note - tx mutex is locked here */ do { + vq->vq_used->vu_flags &= ~VRING_USED_F_NO_NOTIFY; if (sc->resetting) have_work = 0; else @@ -478,6 +481,7 @@ pci_vtnet_tx_thread(void *param) assert(error == 0); } } while (!have_work); + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; sc->tx_in_progress = 1; pthread_mutex_unlock(&sc->tx_mtx); From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 10:44:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46CFA370; Mon, 20 Apr 2015 10:44:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35351D05; Mon, 20 Apr 2015 10:44:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KAilRw065079; Mon, 20 Apr 2015 10:44:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KAilfq065078; Mon, 20 Apr 2015 10:44:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504201044.t3KAilfq065078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2015 10:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281765 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 10:44:47 -0000 Author: mav Date: Mon Apr 20 10:44:46 2015 New Revision: 281765 URL: https://svnweb.freebsd.org/changeset/base/281765 Log: Activate write-only optimization if bpf device opened with O_WRONLY. dhclient opens bpf as write-only to send packets. It never reads received packets from that descriptor, but processing them in kernel takes time. Especially much time takes packet timestamping on systems with expensive timecounter, such as bhyve guest, where network speed dropped in half. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Mon Apr 20 10:29:42 2015 (r281764) +++ head/sys/net/bpf.c Mon Apr 20 10:44:46 2015 (r281765) @@ -601,7 +601,7 @@ bpf_attachd(struct bpf_d *d, struct bpf_ * Save sysctl value to protect from sysctl change * between reads */ - op_w = V_bpf_optimize_writers; + op_w = V_bpf_optimize_writers || d->bd_writer; if (d->bd_bif != NULL) bpf_detachd_locked(d); @@ -864,6 +864,8 @@ bpfopen(struct cdev *dev, int flags, int * particular buffer method. */ bpf_buffer_init(d); + if ((flags & FREAD) == 0) + d->bd_writer = 2; d->bd_hbuf_in_use = 0; d->bd_bufmode = BPF_BUFMODE_BUFFER; d->bd_sig = SIGIO; From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 11:54:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8DB0E7B; Mon, 20 Apr 2015 11:54:02 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6D91697; Mon, 20 Apr 2015 11:54:01 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t3KBrsOO001847 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 20 Apr 2015 14:53:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t3KBrsOO001847 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t3KBrpjT001845; Mon, 20 Apr 2015 14:53:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 20 Apr 2015 14:53:51 +0300 From: Konstantin Belousov To: Jung-uk Kim Cc: Alan Cox , John Baldwin , Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <20150420115351.GD2390@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <550DA656.5060004@FreeBSD.org> <20150322080015.O955@besplex.bde.org> <17035816.lxyzYKiOWV@ralph.baldwin.cx> <552BFEB2.8040407@rice.edu> <552C215D.8020107@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <552C215D.8020107@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 11:54:03 -0000 On Mon, Apr 13, 2015 at 04:04:45PM -0400, Jung-uk Kim wrote: > Please try the attached patch. > > Jung-uk Kim > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQEcBAEBCAAGBQJVLCFZAAoJEHyflib82/FGOp0H/1+Jr+cKUn/MnV5O5SghPw9f > XzTM4+BV9BcWabLRjFe1LR065SfLDXqKLuU4h5lmVSlXQaxElAXxaMeyO3mrMzR4 > Sb1xr0rf+ZfUARJeEJWI65Wpn+gEH+7XxXAIAetYGMwwclBOBgbZIoDXITnCaUFa > /pi3zQIey8EzbvlzhQcffLDV8oF4f8HNEMoSxMRtOiZNNPu/8ECnyGeHZhOd++kh > pwZNsSbcCw3RXMheuErTpKPrJSEXgMNmWG3G00aP7L8IjcObgOqMUQt+8eT8Ge8B > tEv40kgm2G/OG2akONh4/6bX3hyodW3IHcb6AYhqZogiDIqd/eXD4jDup/kkVxU= > =1Ca9 > -----END PGP SIGNATURE----- > Index: sys/amd64/amd64/pmap.c > =================================================================== > --- sys/amd64/amd64/pmap.c (revision 281496) > +++ sys/amd64/amd64/pmap.c (working copy) > @@ -412,7 +412,7 @@ static caddr_t crashdumpmap; > static void free_pv_chunk(struct pv_chunk *pc); > static void free_pv_entry(pmap_t pmap, pv_entry_t pv); > static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); > -static int popcnt_pc_map_elem_pq(uint64_t elem); > +static int popcnt_pc_map(uint64_t *pc_map); > static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); > static void reserve_pv_entries(pmap_t pmap, int needed, > struct rwlock **lockp); > @@ -2979,7 +2979,7 @@ retry: > } > > /* > - * Returns the number of one bits within the given PV chunk map element. > + * Returns the number of one bits within the given PV chunk map. > * > * The erratas for Intel processors state that "POPCNT Instruction May > * Take Longer to Execute Than Expected". It is believed that the > @@ -2994,12 +2994,21 @@ retry: > * 5th Gen Core: BDM85 > */ > static int > -popcnt_pc_map_elem_pq(uint64_t elem) > +popcnt_pc_map(uint64_t *pc_map) > { > - u_long result; > + u_long count, result; > + int field; > > - __asm __volatile("xorl %k0,%k0;popcntq %1,%0" > - : "=&r" (result) : "rm" (elem)); > + result = 0; > + if ((cpu_feature2 & CPUID2_POPCNT) != 0) > + for (field = 0; field < _NPCM; field++) { > + __asm __volatile("xorl %k0, %k0; popcntq %1, %0" > + : "=r" (count) : "m" (pc_map[field])); > + result += count; > + } > + else > + for (field = 0; field < _NPCM; field++) > + result += bitcount64(pc_map[field]); > return (result); > } > > @@ -3031,15 +3040,7 @@ reserve_pv_entries(pmap_t pmap, int needed, struct > retry: > avail = 0; > TAILQ_FOREACH(pc, &pmap->pm_pvchunk, pc_list) { > - if ((cpu_feature2 & CPUID2_POPCNT) == 0) { > - free = bitcount64(pc->pc_map[0]); > - free += bitcount64(pc->pc_map[1]); > - free += bitcount64(pc->pc_map[2]); > - } else { > - free = popcnt_pc_map_elem_pq(pc->pc_map[0]); > - free += popcnt_pc_map_elem_pq(pc->pc_map[1]); > - free += popcnt_pc_map_elem_pq(pc->pc_map[2]); > - } > + free = popcnt_pc_map(pc->pc_map); > if (free == 0) > break; > avail += free; Yes, this worked for me the same way as for you, the argument is taken directly from memory, without temporary spill. Is this due to silly inliner ? Whatever the reason is, I think a comment should be added noting the subtlety. Otherwise, looks fine. From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 14:23:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F51CFDC; Mon, 20 Apr 2015 14:23:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DB259D9; Mon, 20 Apr 2015 14:23:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KENJ1D029557; Mon, 20 Apr 2015 14:23:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KENJ39029556; Mon, 20 Apr 2015 14:23:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504201423.t3KENJ39029556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2015 14:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281766 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 14:23:19 -0000 Author: mav Date: Mon Apr 20 14:23:18 2015 New Revision: 281766 URL: https://svnweb.freebsd.org/changeset/base/281766 Log: Report link as up only if we managed to open tap device. It would be cool to report tap device status, but it has no such API. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 10:44:46 2015 (r281765) +++ head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 14:23:18 2015 (r281766) @@ -644,8 +644,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_NETWORK); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET); - /* link always up */ - sc->vsc_config.status = 1; + /* Link is up if we managed to open tap device. */ + sc->vsc_config.status = (sc->vsc_tapfd >= 0); /* use BAR 1 to map MSI-X table and PBA, if we're using MSI-X */ if (vi_intr_init(&sc->vsc_vs, 1, fbsdrun_virtio_msix())) From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 14:24:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA85D1CC; Mon, 20 Apr 2015 14:24:46 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 753DA9F1; Mon, 20 Apr 2015 14:24:45 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id B8E49D48BC7; Tue, 21 Apr 2015 00:24:37 +1000 (AEST) Date: Tue, 21 Apr 2015 00:24:30 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Jung-uk Kim , Alan Cox , John Baldwin , Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280279 - head/sys/sys In-Reply-To: <20150420115351.GD2390@kib.kiev.ua> Message-ID: <20150420220347.B9956@besplex.bde.org> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <550DA656.5060004@FreeBSD.org> <20150322080015.O955@besplex.bde.org> <17035816.lxyzYKiOWV@ralph.baldwin.cx> <552BFEB2.8040407@rice.edu> <552C215D.8020107@FreeBSD.org> <20150420115351.GD2390@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=YzZ1TwzqwVtC-boj8VAA:9 a=kxGYmLXp0S23Zjda:21 a=vdDRyBbVWsL--UbZ:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 14:24:46 -0000 On Mon, 20 Apr 2015, Konstantin Belousov wrote: > On Mon, Apr 13, 2015 at 04:04:45PM -0400, Jung-uk Kim wrote: >> Please try the attached patch. > >> Index: sys/amd64/amd64/pmap.c >> =================================================================== >> --- sys/amd64/amd64/pmap.c (revision 281496) >> +++ sys/amd64/amd64/pmap.c (working copy) >> @@ -412,7 +412,7 @@ static caddr_t crashdumpmap; >> static void free_pv_chunk(struct pv_chunk *pc); >> static void free_pv_entry(pmap_t pmap, pv_entry_t pv); >> static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); >> -static int popcnt_pc_map_elem_pq(uint64_t elem); >> +static int popcnt_pc_map(uint64_t *pc_map); >> static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); >> static void reserve_pv_entries(pmap_t pmap, int needed, >> struct rwlock **lockp); >> @@ -2979,7 +2979,7 @@ retry: >> } >> >> /* >> - * Returns the number of one bits within the given PV chunk map element. >> + * Returns the number of one bits within the given PV chunk map. >> * >> * The erratas for Intel processors state that "POPCNT Instruction May >> * Take Longer to Execute Than Expected". It is believed that the >> @@ -2994,12 +2994,21 @@ retry: >> * 5th Gen Core: BDM85 >> */ >> static int >> -popcnt_pc_map_elem_pq(uint64_t elem) >> +popcnt_pc_map(uint64_t *pc_map) >> { >> - u_long result; >> + u_long count, result; >> + int field; >> >> - __asm __volatile("xorl %k0,%k0;popcntq %1,%0" >> - : "=&r" (result) : "rm" (elem)); >> + result = 0; >> + if ((cpu_feature2 & CPUID2_POPCNT) != 0) >> + for (field = 0; field < _NPCM; field++) { >> + __asm __volatile("xorl %k0, %k0; popcntq %1, %0" >> + : "=r" (count) : "m" (pc_map[field])); >> + result += count; >> + } >> + else >> + for (field = 0; field < _NPCM; field++) >> + result += bitcount64(pc_map[field]); >> return (result); >> } >> >> @@ -3031,15 +3040,7 @@ reserve_pv_entries(pmap_t pmap, int needed, struct >> retry: >> avail = 0; >> TAILQ_FOREACH(pc, &pmap->pm_pvchunk, pc_list) { >> - if ((cpu_feature2 & CPUID2_POPCNT) == 0) { >> - free = bitcount64(pc->pc_map[0]); >> - free += bitcount64(pc->pc_map[1]); >> - free += bitcount64(pc->pc_map[2]); >> - } else { >> - free = popcnt_pc_map_elem_pq(pc->pc_map[0]); >> - free += popcnt_pc_map_elem_pq(pc->pc_map[1]); >> - free += popcnt_pc_map_elem_pq(pc->pc_map[2]); >> - } >> + free = popcnt_pc_map(pc->pc_map); >> if (free == 0) >> break; >> avail += free; > > Yes, this worked for me the same way as for you, the argument is taken > directly from memory, without temporary spill. Is this due to silly > inliner ? Whatever the reason is, I think a comment should be added > noting the subtlety. > > Otherwise, looks fine. Erm, this looks silly. It apparently works by making things too complicated for the compiler to "optimize" (where one of the optimizations actually gives pessimal spills). Its main changes are: - change the constraint from "rm" to "m". This alone is not enough to get the compiler to use the natural memory operands without a trip through a register - un-unroll a loop. This alone makes no difference in my simpler test environment. The compiler un-un-unrolls. (The compiler also inlines all the static function whether asked to or not. gcc shouldn't do this inlining for the 3 calls, and gcc -fno-inline-functions-called-once would never do it. clang is missing support for -fno-inline-functions- called-once, and gcc48 vanished with a recent "upgrade" on freefall, so I couldn't test this case easily. -fno-inline-functions-called-once should be the default for kernels. - some other changes apparently confused clang into doing the right thing. It works better to change the constraint to "r": X #include X X static __inline u_long X popcntq(u_long mask) X { X u_long result; X X __asm __volatile("xorl %k0,%k0; popcntq %1,%0" : X "=&r" (result) : "r" (mask)); X return (result); X } X X u_long x[3]; X X int X test(void) X { X return (popcntq(x[0]) + popcntq(x[1]) + popcntq(x[2])); X } X ... X .cfi_startproc X # BB#0: # %entry X pushq %rbp X .Ltmp0: X .cfi_def_cfa_offset 16 X .Ltmp1: X .cfi_offset %rbp, -16 X movq %rsp, %rbp X .Ltmp2: X .cfi_def_cfa_register %rbp X movq x(%rip), %rax X #APP X xorl %ecx, %ecx X popcntq %rax, %rcx X #NO_APP X movq x+8(%rip), %rax X #APP X xorl %edx, %edx X popcntq %rax, %rdx X #NO_APP X addl %ecx, %edx X movq x+16(%rip), %rcx X #APP X xorl %eax, %eax X popcntq %rcx, %rax X #NO_APP X addl %edx, %eax X # kill: EAX EAX RAX X popq %rbp X retq I changed and tested the generic popcntq() since this is the correct function to use and is easier to test. With the old constraint, the This version does extra load instructions, but those should have a negative or zero cost since the loads always have to be done and explicit loads may allow better scheduling (the asm moves them before the xorl's which gives hard-codes reasonable scheduling). Next, improve the asm by telling the compiler to load 0: X __asm __volatile("popcntq %1,%0" : X "=r" (result) : "r" (mask), "0" (0)); This avoids the ugliness with %k0 (the compiler knows the best way to load a 64-bit 0 -- use xorl). This generates the same code, except the compiler uses more registers and moves one of the xorls earlier. "rm" as a constraint still gives the spills. Next, further improve the asm by moving the load of 0 out of it: X result = 0; X __asm __volatile("popcntq %1,%0" : X "+r" (result) : "r" (mask)); This doesn't change the generated code. "rm" still gives spills (and "m" still gives a trip through a register). Finally for this mail, but leaving many more compiler bugs to be determined, further improve the asm by restoring "m" to a constraint but with "m" disparaged: X result = 0; X __asm __volatile("popcntq %1,%0" : X "+r,+r" (result) : "r,?m" (mask)); This works to get the register operand used here, but disparagement seems to be broken in clang (and I never got it to do anything useful in gcc -- I want alternatives in the main part of the asm, but that seems to only be possible in insns in .md files). Here clang prefers "r" even if it is strongly disparaged relative to "m" ("!r,m"). clang seems to always prefer the first alternative. Perhaps that is correct since the 2 alternatives for the output constraint are the same. No, since if the output is broken to "=m,+r", then the broken and disparaged case is prefered. Also, "r,+r" is a syntax error, but no error is detected for "+r,r". gcc42 tells me that it is "+r,"+r" that is the syntax error -- the "+" apparently must be first and then it applies to both alternatives. Disparagement seems to work in gcc42. E.g., with the operand naturally living in memory, "?m,r" still prefers the memory operand, but "!m,r" prefers the register operand. gcc generates suboptimal loads of 0, so the hard-coded xorl is probably best for it: X result = 0; X __asm __volatile("popcntq %1,%0" : X "+r,r" (result) : "r,?m" (mask)); (This is supposed to be the best version.) gcc42 output: X movl $0, %edx First load of 0. Should use xorl. X movl %edx, %ecx Second load of 0. Should use xorl so as to not depend on the previous load. X #APP X popcntq x,%ecx Use second load of 0. popcntq cannot be assembled on i386, but I only compiled to asm. X #NO_APP X movl %edx, %eax Third load of 0. Probably well enough scheduled. X #APP X popcntq x+4,%eax Use third load of 0. Poorly scheduled. Should use first load of 0. X popcntq x+8,%edx Use first load of 0. X #NO_APP X addl %ecx, %eax X addl %edx, %eax Can probably schedule these adds better too (start the first one earlier), but that is easy for the CPU to do. With "m" strongly disparaged ("r,!m"): X movl $0, %edx X movl %edx, %ecx X movl x, %eax X #APP X popcntq %eax,%ecx X #NO_APP X movl %edx, %eax X movl x+4, %ebx X #APP X popcntq %ebx,%eax First 2 popcntq's from the non-disparaged "r". X popcntq x+8,%edx But the disparagement wasn't strong enough for the third. OK. X #NO_APP X addl %ecx, %eax X addl %edx, %eax Bruce From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 14:52:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7EB6BE2; Mon, 20 Apr 2015 14:52:46 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 8ABA8D73; Mon, 20 Apr 2015 14:52:45 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 498EC7814AC; Tue, 21 Apr 2015 00:52:36 +1000 (AEST) Date: Tue, 21 Apr 2015 00:52:35 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: Konstantin Belousov , Jung-uk Kim , Alan Cox , John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280279 - head/sys/sys In-Reply-To: <20150420220347.B9956@besplex.bde.org> Message-ID: <20150421003316.M10305@besplex.bde.org> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <550DA656.5060004@FreeBSD.org> <20150322080015.O955@besplex.bde.org> <17035816.lxyzYKiOWV@ralph.baldwin.cx> <552BFEB2.8040407@rice.edu> <552C215D.8020107@FreeBSD.org> <20150420115351.GD2390@kib.kiev.ua> <20150420220347.B9956@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=RFWfT8eTE1r12Y_Lx4gA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 14:52:46 -0000 On Tue, 21 Apr 2015, Bruce Evans wrote: > On Mon, 20 Apr 2015, Konstantin Belousov wrote: > >> On Mon, Apr 13, 2015 at 04:04:45PM -0400, Jung-uk Kim wrote: >>> Please try the attached patch. >>> ... >>> - __asm __volatile("xorl %k0,%k0;popcntq %1,%0" >>> - : "=&r" (result) : "rm" (elem)); >>> ... >>> + __asm __volatile("xorl %k0, %k0; popcntq %1, %0" >>> + : "=r" (count) : "m" (pc_map[field])); >> ... >> Yes, this worked for me the same way as for you, the argument is taken >> directly from memory, without temporary spill. Is this due to silly >> inliner ? Whatever the reason is, I think a comment should be added >> noting the subtlety. >> >> Otherwise, looks fine. > > Erm, this looks silly. It apparently works by making things too complicated > for the compiler to "optimize" (where one of the optimizations actually > gives pessimal spills). Its main changes are: > ... > It works better to change the constraint to "r": It's even sillier than that. The problem is not limited to this function. clang seems to prefer memory whenever you use the "rm" constraint. The silliest case is when you have a chain of simple asm functions. Say the original popcntq (without the xorl): return (popcntq(popcntq(popcntq(popcntq(popcntq(x)))))); gcc compiles this to 5 sequential popcntq instructions, but clang spills the results of the first 4. This is an old bug. clang does this on FreeBSD[9-11]. cc does this on FreeBSD[10-11] (not on FreeBSD-9 since cc = gcc there. Asms should always use "rm" if "m" works. Ones in cpufunc.h always do except for lidt(), lldt() and ltr(). These 3 are fixed in my version. So cpufunc.h almost always asks for the pessimization. Bruce From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 14:55:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6AF9D40; Mon, 20 Apr 2015 14:55:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9562DD8A; Mon, 20 Apr 2015 14:55:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KEt2eG054148; Mon, 20 Apr 2015 14:55:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KEt2mx054147; Mon, 20 Apr 2015 14:55:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504201455.t3KEt2mx054147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2015 14:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281767 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 14:55:02 -0000 Author: mav Date: Mon Apr 20 14:55:01 2015 New Revision: 281767 URL: https://svnweb.freebsd.org/changeset/base/281767 Log: Report link as up if tap device is not specified (black hole). MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 14:23:18 2015 (r281766) +++ head/usr.sbin/bhyve/pci_virtio_net.c Mon Apr 20 14:55:01 2015 (r281767) @@ -645,7 +645,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET); /* Link is up if we managed to open tap device. */ - sc->vsc_config.status = (sc->vsc_tapfd >= 0); + sc->vsc_config.status = (opts == NULL || sc->vsc_tapfd >= 0); /* use BAR 1 to map MSI-X table and PBA, if we're using MSI-X */ if (vi_intr_init(&sc->vsc_vs, 1, fbsdrun_virtio_msix())) From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 15:45:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 506EAB04; Mon, 20 Apr 2015 15:45:47 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C295647; Mon, 20 Apr 2015 15:45:47 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D7F5AB913; Mon, 20 Apr 2015 11:45:45 -0400 (EDT) From: John Baldwin To: Justin Hibbits Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281721 - head/sys/sys Date: Mon, 20 Apr 2015 11:25:44 -0400 Message-ID: <476583045.Qcb6O2DFtY@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504190033.t3J0XMDX041769@svn.freebsd.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 20 Apr 2015 11:45:45 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 15:45:47 -0000 On Sunday, April 19, 2015 12:33:22 AM Justin Hibbits wrote: > Author: jhibbits > Date: Sun Apr 19 00:33:21 2015 > New Revision: 281721 > URL: https://svnweb.freebsd.org/changeset/base/281721 > > Log: > Fix the build. Commit the last part of e500 PMC. > > Pointy hat to: jhibbits > > Modified: > head/sys/sys/pmc.h > > Modified: head/sys/sys/pmc.h > ============================================================================== > --- head/sys/sys/pmc.h Sun Apr 19 00:29:02 2015 (r281720) > +++ head/sys/sys/pmc.h Sun Apr 19 00:33:21 2015 (r281721) > @@ -102,6 +102,8 @@ > __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ > __PMC_CPU(MIPS_74K, 0x202, "MIPS 74K") \ > __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ > + __PMC_CPU(PPC_E500, 0x340, "PowerPC e500 Core") \ > + __PMC_CPU(PPC_MPC85XX, 0x340, "Freescale PowerPC MPC85XX") \ > __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ > __PMC_CPU(GENERIC, 0x400, "Generic") > > @@ -136,6 +138,7 @@ enum pmc_cputype { > __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ > __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ > __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ > + __PMC_CLASS(E500) /* Freescale e500 class */ \ > __PMC_CLASS(SOFT) /* Software events */ Note that each time a PMC_CLASS is added, the ABI for pmccontrol -L breaks since the enum value of the "SOFT" class changes. We should perhaps fix the value of SOFT to make this less painful (just as we fix the values for PMC_CPU so that those don't change). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 16:20:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2D164FE; Mon, 20 Apr 2015 16:20:10 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 68B12A82; Mon, 20 Apr 2015 16:20:10 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id CF6B43C4483; Tue, 21 Apr 2015 02:20:00 +1000 (AEST) Date: Tue, 21 Apr 2015 02:19:52 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281721 - head/sys/sys In-Reply-To: <476583045.Qcb6O2DFtY@ralph.baldwin.cx> Message-ID: <20150421020808.D10623@besplex.bde.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=UsB5EdndRrl7-tn2VpUA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:20:10 -0000 On Mon, 20 Apr 2015, John Baldwin wrote: > On Sunday, April 19, 2015 12:33:22 AM Justin Hibbits wrote: >> Log: >> Fix the build. Commit the last part of e500 PMC. >> ... >> @@ -136,6 +138,7 @@ enum pmc_cputype { >> __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ >> __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ >> __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ >> + __PMC_CLASS(E500) /* Freescale e500 class */ \ >> __PMC_CLASS(SOFT) /* Software events */ > > Note that each time a PMC_CLASS is added, the ABI for pmccontrol -L > breaks since the enum value of the "SOFT" class changes. We should > perhaps fix the value of SOFT to make this less painful (just as we > fix the values for PMC_CPU so that those don't change). Enums should never be used in ABIs, since their size can be anything large enough. They also cause namespace problems. The whole enum declaration must be exposed in any header that uses an enum type. Bruce From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 16:24:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21BBC77A; Mon, 20 Apr 2015 16:24:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1055FB67; Mon, 20 Apr 2015 16:24:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KGNxkj023797; Mon, 20 Apr 2015 16:23:59 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KGNxpw023796; Mon, 20 Apr 2015 16:23:59 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201504201623.t3KGNxpw023796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 20 Apr 2015 16:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281768 - head/share/man/man3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:24:00 -0000 Author: brooks Date: Mon Apr 20 16:23:59 2015 New Revision: 281768 URL: https://svnweb.freebsd.org/changeset/base/281768 Log: Bump doc date missed in r281605. MFC after: 1 day Modified: head/share/man/man3/queue.3 Modified: head/share/man/man3/queue.3 ============================================================================== --- head/share/man/man3/queue.3 Mon Apr 20 14:55:01 2015 (r281767) +++ head/share/man/man3/queue.3 Mon Apr 20 16:23:59 2015 (r281768) @@ -28,7 +28,7 @@ .\" @(#)queue.3 8.2 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd June 17, 2013 +.Dd April 16, 2015 .Dt QUEUE 3 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 16:31:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29DA29D3; Mon, 20 Apr 2015 16:31:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18A7DC5E; Mon, 20 Apr 2015 16:31:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KGVRNK031113; Mon, 20 Apr 2015 16:31:27 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KGVRwo031112; Mon, 20 Apr 2015 16:31:27 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504201631.t3KGVRwo031112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 16:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281769 - head/sys/geom/uncompress X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:31:28 -0000 Author: pfg Date: Mon Apr 20 16:31:27 2015 New Revision: 281769 URL: https://svnweb.freebsd.org/changeset/base/281769 Log: g_uncompress_taste: prevent a double free. Found by: Clang Static Analyzer MFC after: 1 week Modified: head/sys/geom/uncompress/g_uncompress.c Modified: head/sys/geom/uncompress/g_uncompress.c ============================================================================== --- head/sys/geom/uncompress/g_uncompress.c Mon Apr 20 16:23:59 2015 (r281768) +++ head/sys/geom/uncompress/g_uncompress.c Mon Apr 20 16:31:27 2015 (r281769) @@ -571,6 +571,7 @@ g_uncompress_taste(struct g_class *mp, s (buf+sizeof(struct cloop_header)))[i]); } free(buf, M_GEOM); + buf = NULL; DPRINTF(("%s: done reading offsets\n", gp->name)); mtx_init(&sc->last_mtx, "geom_uncompress cache", NULL, MTX_DEF); sc->last_blk = -1; From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 16:36:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88AD2C99; Mon, 20 Apr 2015 16:36:20 +0000 (UTC) Received: from mail-qk0-x22a.google.com (mail-qk0-x22a.google.com [IPv6:2607:f8b0:400d:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42F69C9C; Mon, 20 Apr 2015 16:36:20 +0000 (UTC) Received: by qkgx75 with SMTP id x75so184837992qkg.1; Mon, 20 Apr 2015 09:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=6/hR8f7w8gi3WX8hGJa7ggTk9khtC2eQ6KgDnbCY3k8=; b=JI+z5kEvLLsbR3qnysoEvPSBeoKG6EQ07ri1E6umrJlCYhV7OrMKxx9rqF8EuxOScu 1QlglNA557ccZe7kWB471INlBqfZSkN/JP5hKAja7Wzi9L1KnriYRWPDJmp0QXzoAgzO QXAAQfSPaMvPcEJJeI5nlIj2R3GeCL9PUlPr1vHvWxoh4V/kKIHtHuc6AFFy0Giwh7Ch afI/W83IvRG3sng9FvNTe0mKuoQ9wZamPHUy/jGLh6TwUKk7ZTryBWEWcDaQFMTfhFGR aeyQnqjqgchZd3hu8vp1A2KifwyjaMmbd+kQZk5B28DhzkVEtk90bo2gco7s5fbkyNV6 +sxQ== MIME-Version: 1.0 X-Received: by 10.55.20.30 with SMTP id e30mr30189925qkh.45.1429547779427; Mon, 20 Apr 2015 09:36:19 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.140.84.179 with HTTP; Mon, 20 Apr 2015 09:36:19 -0700 (PDT) In-Reply-To: <20150421020808.D10623@besplex.bde.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> Date: Mon, 20 Apr 2015 09:36:19 -0700 X-Google-Sender-Auth: JRhvpZKjPh_YfFQOmNTqzQNDaTc Message-ID: Subject: Re: svn commit: r281721 - head/sys/sys From: Justin Hibbits To: Bruce Evans Cc: John Baldwin , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:36:20 -0000 On Mon, Apr 20, 2015 at 9:19 AM, Bruce Evans wrote: > On Mon, 20 Apr 2015, John Baldwin wrote: > >> On Sunday, April 19, 2015 12:33:22 AM Justin Hibbits wrote: >>> >>> Log: >>> Fix the build. Commit the last part of e500 PMC. >>> ... >>> @@ -136,6 +138,7 @@ enum pmc_cputype { >>> __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ >>> __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ >>> __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ >>> + __PMC_CLASS(E500) /* Freescale e500 class */ \ >>> __PMC_CLASS(SOFT) /* Software events */ >> >> >> Note that each time a PMC_CLASS is added, the ABI for pmccontrol -L >> breaks since the enum value of the "SOFT" class changes. We should >> perhaps fix the value of SOFT to make this less painful (just as we >> fix the values for PMC_CPU so that those don't change). > > > Enums should never be used in ABIs, since their size can be anything > large enough. > > They also cause namespace problems. The whole enum declaration must > be exposed in any header that uses an enum type. > > Bruce Any change breaks ABI for any architecture listed after anyway (Adrian's MIPS74K broke all PowerPC). Could we not take the same IDs as in pmc_events.h to generate the PM_CLASS IDs? - Justin From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 16:40:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 395BAF69; Mon, 20 Apr 2015 16:40:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 280DCCDE; Mon, 20 Apr 2015 16:40:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KGeEuK036848; Mon, 20 Apr 2015 16:40:14 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KGeE9P036847; Mon, 20 Apr 2015 16:40:14 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504201640.t3KGeE9P036847@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 16:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281770 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:40:14 -0000 Author: pfg Date: Mon Apr 20 16:40:13 2015 New Revision: 281770 URL: https://svnweb.freebsd.org/changeset/base/281770 Log: Prevent a double free. This is similar to r281756 so set the ptr NULL after free as a safety belt against future changes. Obtained from: HardenedBSD (b2e77ced9ae213d358b44d98f552d9ae4636ecac) Submitted by: Oliver Pinter Revewed by: rmacklem Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Mon Apr 20 16:31:27 2015 (r281769) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Mon Apr 20 16:40:13 2015 (r281770) @@ -537,8 +537,10 @@ nfsrpc_openrpc(struct nfsmount *nmp, vno (void) nfs_catnap(PZERO, ret, "nfs_open2"); } while (ret == NFSERR_DELAY); if (ret) { - if (ndp != NULL) + if (ndp != NULL) { FREE((caddr_t)ndp, M_NFSCLDELEG); + ndp = NULL; + } if (ret == NFSERR_STALECLIENTID || ret == NFSERR_STALEDONTRECOVER || ret == NFSERR_BADSESSION) From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 16:48:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EA524F3; Mon, 20 Apr 2015 16:48:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D7EAE06; Mon, 20 Apr 2015 16:48:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KGmL1A041874; Mon, 20 Apr 2015 16:48:21 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KGmLJo041873; Mon, 20 Apr 2015 16:48:21 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504201648.t3KGmLJo041873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 20 Apr 2015 16:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281771 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 16:48:22 -0000 Author: alc Date: Mon Apr 20 16:48:21 2015 New Revision: 281771 URL: https://svnweb.freebsd.org/changeset/base/281771 Log: Eliminate an unused variable. MFC after: 1 week Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Apr 20 16:40:13 2015 (r281770) +++ head/sys/vm/uma_core.c Mon Apr 20 16:48:21 2015 (r281771) @@ -307,9 +307,8 @@ bucket_init(void) { struct uma_bucket_zone *ubz; int size; - int i; - for (i = 0, ubz = &bucket_zones[0]; ubz->ubz_entries != 0; ubz++) { + for (ubz = &bucket_zones[0]; ubz->ubz_entries != 0; ubz++) { size = roundup(sizeof(struct uma_bucket), sizeof(void *)); size += sizeof(void *) * ubz->ubz_entries; ubz->ubz_zone = uma_zcreate(ubz->ubz_name, size, From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 17:14:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3DD5DFC; Mon, 20 Apr 2015 17:14:40 +0000 (UTC) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCB7D1E4; Mon, 20 Apr 2015 17:14:40 +0000 (UTC) Received: by iebrs15 with SMTP id rs15so121572900ieb.3; Mon, 20 Apr 2015 10:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=1bfgd8bYgnT+iylU4taadnAoq0CbQQzs26SiBZxIIuw=; b=hBa/EIMgxIqdJx457rxXbDHF+f7A7TXzOPOPblVGAOv38Esis2tW9nwrZ/A63VtUJD T+sdhJV2qV8sm9YnZoQXLLpNvtRZ8MojImwEeNKRQau5RCrKCRiUDPlB8Vv9YWfSjW48 9PEZ+m4U2eO+IEXtTZF/bH0DW5qQgrnx8Zdby6Q4jwPdRLxHlj3BXpEPS17gHnW2nXW1 h+Qd6irk7ud3TqD8X9fKyhqXB7jvUIf/j9XC6u4GjOKyxM7PPsY4v9oLIIvfCSKN/TKS I1TTVKKGotFgrPbYEeZK9QNUhg5xeqnOvpb2R32s+rJtVmHX1Qkv6YlXAAuMBWQPwMT2 uB4g== MIME-Version: 1.0 X-Received: by 10.107.155.13 with SMTP id d13mr22990211ioe.29.1429550080178; Mon, 20 Apr 2015 10:14:40 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Mon, 20 Apr 2015 10:14:40 -0700 (PDT) In-Reply-To: References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> Date: Mon, 20 Apr 2015 10:14:40 -0700 X-Google-Sender-Auth: DYzfLDUF8ZI1AXS-g0NaAtwlt4Q Message-ID: Subject: Re: svn commit: r281721 - head/sys/sys From: Adrian Chadd To: Justin Hibbits Cc: Bruce Evans , John Baldwin , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:14:41 -0000 (this is why I'm not mfc'ing it.) hwpmc's ABI is not in any way usefully backwards compatible. -adrian From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 17:21:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4BF310A; Mon, 20 Apr 2015 17: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B34CD2F5; Mon, 20 Apr 2015 17:21:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHLG05070731; Mon, 20 Apr 2015 17:21:16 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHLGCn070730; Mon, 20 Apr 2015 17:21:16 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201504201721.t3KHLGCn070730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 20 Apr 2015 17:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281772 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:21:16 -0000 Author: araujo (ports committer) Date: Mon Apr 20 17:21:15 2015 New Revision: 281772 URL: https://svnweb.freebsd.org/changeset/base/281772 Log: Remove unused variable. Differential Revision: D2331 Reviewed by: erj Modified: head/sys/dev/ixgbe/if_ix.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Mon Apr 20 16:48:21 2015 (r281771) +++ head/sys/dev/ixgbe/if_ix.c Mon Apr 20 17:21:15 2015 (r281772) @@ -1195,10 +1195,8 @@ ixgbe_handle_que(void *context, int pend struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; - bool more; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 17:24:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25FD6280; Mon, 20 Apr 2015 17:24:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1476631C; Mon, 20 Apr 2015 17:24:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHOdIJ073561; Mon, 20 Apr 2015 17:24:39 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHOdCE073560; Mon, 20 Apr 2015 17:24:39 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201504201724.t3KHOdCE073560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 20 Apr 2015 17:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281773 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:24:40 -0000 Author: araujo (ports committer) Date: Mon Apr 20 17:24:39 2015 New Revision: 281773 URL: https://svnweb.freebsd.org/changeset/base/281773 Log: Add back ixgbe_rxeof, just remove the assignment to more. Modified: head/sys/dev/ixgbe/if_ix.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Mon Apr 20 17:21:15 2015 (r281772) +++ head/sys/dev/ixgbe/if_ix.c Mon Apr 20 17:24:39 2015 (r281773) @@ -1197,6 +1197,7 @@ ixgbe_handle_que(void *context, int pend struct ifnet *ifp = adapter->ifp; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 17:30:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E730B6D6; Mon, 20 Apr 2015 17:30:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5CF4376; Mon, 20 Apr 2015 17:30:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHUD9d076747; Mon, 20 Apr 2015 17:30:13 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHUDn6076746; Mon, 20 Apr 2015 17:30:13 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201504201730.t3KHUDn6076746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 20 Apr 2015 17:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281774 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:30:14 -0000 Author: araujo (ports committer) Date: Mon Apr 20 17:30:13 2015 New Revision: 281774 URL: https://svnweb.freebsd.org/changeset/base/281774 Log: Remove unused variable. Differential Revision: D2333 Reviewed by: royger Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Apr 20 17:24:39 2015 (r281773) +++ head/sys/dev/xen/netfront/netfront.c Mon Apr 20 17:30:13 2015 (r281774) @@ -1472,7 +1472,6 @@ xn_assemble_tx_request(struct netfront_i struct ifnet *ifp; struct mbuf *m; u_int nfrags; - netif_extra_info_t *extra; int otherend_id; ifp = sc->xn_ifp; @@ -1546,7 +1545,6 @@ xn_assemble_tx_request(struct netfront_i * of fragments or hit the end of the mbuf chain. */ m = m_head; - extra = NULL; otherend_id = xenbus_get_otherend_id(sc->xbdev); for (m = m_head; m; m = m->m_next) { netif_tx_request_t *tx; From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 17:36:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1B87953; Mon, 20 Apr 2015 17:36:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFAAE64A; Mon, 20 Apr 2015 17:36:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHaZP3083447; Mon, 20 Apr 2015 17:36:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHaZAt083446; Mon, 20 Apr 2015 17:36:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504201736.t3KHaZAt083446@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 20 Apr 2015 17:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281775 - head/contrib/llvm/lib/MC/MCParser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:36:36 -0000 Author: dim Date: Mon Apr 20 17:36:35 2015 New Revision: 281775 URL: https://svnweb.freebsd.org/changeset/base/281775 Log: Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): MC: Allow multiple comma-separated expressions on the .uleb128 directive. For compatiblity with GNU as. Binutils documents this as '.uleb128 expressions'. Subtle, isn't it? Reported by: sbruno PR: 199554 MFC after: 3 days Modified: head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Modified: head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Mon Apr 20 17:30:13 2015 (r281774) +++ head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Mon Apr 20 17:36:35 2015 (r281775) @@ -3636,21 +3636,27 @@ bool AsmParser::parseDirectiveSpace(Stri } /// parseDirectiveLEB128 -/// ::= (.sleb128 | .uleb128) expression +/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] bool AsmParser::parseDirectiveLEB128(bool Signed) { checkForValidSection(); const MCExpr *Value; - if (parseExpression(Value)) - return true; + for (;;) { + if (parseExpression(Value)) + return true; - if (getLexer().isNot(AsmToken::EndOfStatement)) - return TokError("unexpected token in directive"); + if (Signed) + getStreamer().EmitSLEB128Value(Value); + else + getStreamer().EmitULEB128Value(Value); - if (Signed) - getStreamer().EmitSLEB128Value(Value); - else - getStreamer().EmitULEB128Value(Value); + if (getLexer().is(AsmToken::EndOfStatement)) + break; + + if (getLexer().isNot(AsmToken::Comma)) + return TokError("unexpected token in directive"); + Lex(); + } return false; } From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 17:37:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43921CFA; Mon, 20 Apr 2015 17:37:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2434A66E; Mon, 20 Apr 2015 17:37:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHbc8U084086; Mon, 20 Apr 2015 17:37:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHbcWH084085; Mon, 20 Apr 2015 17:37:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504201737.t3KHbcWH084085@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 20 Apr 2015 17:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281777 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:37:38 -0000 Author: dim Date: Mon Apr 20 17:37:37 2015 New Revision: 281777 URL: https://svnweb.freebsd.org/changeset/base/281777 Log: Add llvm patch corresponding to r281775. Added: head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Added: head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Mon Apr 20 17:37:37 2015 (r281777) @@ -0,0 +1,77 @@ +Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): + + MC: Allow multiple comma-separated expressions on the .uleb128 directive. + + For compatiblity with GNU as. Binutils documents this as + '.uleb128 expressions'. Subtle, isn't it? + +Introduced here: http://svnweb.freebsd.org/changeset/base/281775 + +Index: lib/MC/MCParser/AsmParser.cpp +=================================================================== +--- lib/MC/MCParser/AsmParser.cpp ++++ lib/MC/MCParser/AsmParser.cpp +@@ -3636,22 +3636,28 @@ bool AsmParser::parseDirectiveSpace(StringRef IDVa + } + + /// parseDirectiveLEB128 +-/// ::= (.sleb128 | .uleb128) expression ++/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] + bool AsmParser::parseDirectiveLEB128(bool Signed) { + checkForValidSection(); + const MCExpr *Value; + +- if (parseExpression(Value)) +- return true; ++ for (;;) { ++ if (parseExpression(Value)) ++ return true; + +- if (getLexer().isNot(AsmToken::EndOfStatement)) +- return TokError("unexpected token in directive"); ++ if (Signed) ++ getStreamer().EmitSLEB128Value(Value); ++ else ++ getStreamer().EmitULEB128Value(Value); + +- if (Signed) +- getStreamer().EmitSLEB128Value(Value); +- else +- getStreamer().EmitULEB128Value(Value); ++ if (getLexer().is(AsmToken::EndOfStatement)) ++ break; + ++ if (getLexer().isNot(AsmToken::Comma)) ++ return TokError("unexpected token in directive"); ++ Lex(); ++ } ++ + return false; + } + +Index: test/MC/ELF/uleb.s +=================================================================== +--- test/MC/ELF/uleb.s ++++ test/MC/ELF/uleb.s +@@ -11,16 +11,17 @@ foo: + .uleb128 128 + .uleb128 16383 + .uleb128 16384 ++ .uleb128 23, 42 + + // ELF_32: Name: .text + // ELF_32: SectionData ( +-// ELF_32: 0000: 00017F80 01FF7F80 8001 ++// ELF_32: 0000: 00017F80 01FF7F80 8001172A + // ELF_32: ) + // ELF_64: Name: .text + // ELF_64: SectionData ( +-// ELF_64: 0000: 00017F80 01FF7F80 8001 ++// ELF_64: 0000: 00017F80 01FF7F80 8001172A + // ELF_64: ) + // MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001172a') + // MACHO_64: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001172a') From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 17:43:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2B0C146; Mon, 20 Apr 2015 17:43:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A15A77B0; Mon, 20 Apr 2015 17:43:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHhtNP089930; Mon, 20 Apr 2015 17:43:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHhtcZ089929; Mon, 20 Apr 2015 17:43:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504201743.t3KHhtcZ089929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 Apr 2015 17:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281779 - head/usr.sbin/vidcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:43:55 -0000 Author: emaste Date: Mon Apr 20 17:43:55 2015 New Revision: 281779 URL: https://svnweb.freebsd.org/changeset/base/281779 Log: vidcontrol: skip invalid video modes returned by vt(4) vt(4) has a stub CONS_MODEINFO ioctl that does not provide any data but returns success. This needs to be fixed in the kernel, but address it in vidcontrol(1) as well in case it's run on an older kernel. Reviewed by: bde Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/vidcontrol/vidcontrol.c Modified: head/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- head/usr.sbin/vidcontrol/vidcontrol.c Mon Apr 20 17:43:36 2015 (r281778) +++ head/usr.sbin/vidcontrol/vidcontrol.c Mon Apr 20 17:43:55 2015 (r281779) @@ -1085,12 +1085,16 @@ show_mode_info(void) printf("---------------------------------------" "---------------------------------------\n"); + memset(&_info, 0, sizeof(_info)); for (mode = 0; mode <= M_VESA_MODE_MAX; ++mode) { _info.vi_mode = mode; if (ioctl(0, CONS_MODEINFO, &_info)) continue; if (_info.vi_mode != mode) continue; + if (_info.vi_width == 0 && _info.vi_height == 0 && + _info.vi_cwidth == 0 && _info.vi_cheight == 0) + continue; printf("%3d (0x%03x)", mode, mode); printf(" 0x%08x", _info.vi_flags); From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 17:46:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39EA42B1; Mon, 20 Apr 2015 17:46:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 285A67CC; Mon, 20 Apr 2015 17:46:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KHkAH3091111; Mon, 20 Apr 2015 17:46:10 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KHkAYT091110; Mon, 20 Apr 2015 17:46:10 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504201746.t3KHkAYT091110@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 20 Apr 2015 17:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281780 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 17:46:10 -0000 Author: dteske Date: Mon Apr 20 17:46:09 2015 New Revision: 281780 URL: https://svnweb.freebsd.org/changeset/base/281780 Log: Update usage statement to align with post-r279624 functionality. MFC after: 3 days X-MFC-to: stable/10 stable/9 Modified: head/usr.sbin/sysrc/sysrc Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Mon Apr 20 17:43:55 2015 (r281779) +++ head/usr.sbin/sysrc/sysrc Mon Apr 20 17:46:09 2015 (r281780) @@ -80,7 +80,7 @@ die() # usage() { - f_err "Usage: %s [OPTIONS] name[[+]=value] ...\n" "$pgm" + f_err "Usage: %s [OPTIONS] name[[+|-]=value] ...\n" "$pgm" f_err "Try \`%s --help' for more information.\n" "$pgm" die } From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 18:30:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 303F9C38; Mon, 20 Apr 2015 18: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E70ACCD; Mon, 20 Apr 2015 18:30:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KIU6Yf026506; Mon, 20 Apr 2015 18:30:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KIU6j6026505; Mon, 20 Apr 2015 18:30:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504201830.t3KIU6j6026505@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 Apr 2015 18:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281781 - head/usr.sbin/crunch/crunchide X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 18:30:07 -0000 Author: emaste Date: Mon Apr 20 18:30:06 2015 New Revision: 281781 URL: https://svnweb.freebsd.org/changeset/base/281781 Log: crunchide: Remove local EM_* ELF definitions provided by system ELF headers Suggested by: imp (in review D2314) Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- head/usr.sbin/crunch/crunchide/exec_elf32.c Mon Apr 20 17:46:09 2015 (r281780) +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Mon Apr 20 18:30:06 2015 (r281781) @@ -178,37 +178,13 @@ ELFNAMEEND(check)(int fd, const char *fn switch (xe16toh(eh.e_machine)) { case EM_386: break; case EM_ALPHA: break; -#ifndef EM_AARCH64 -#define EM_AARCH64 183 -#endif case EM_AARCH64: break; -#ifndef EM_ARM -#define EM_ARM 40 -#endif case EM_ARM: break; -#ifndef EM_MIPS -#define EM_MIPS 8 -#endif -#ifndef EM_MIPS_RS4_BE /* same as EM_MIPS_RS3_LE */ -#define EM_MIPS_RS4_BE 10 -#endif case EM_MIPS: break; case /* EM_MIPS_RS3_LE */ EM_MIPS_RS4_BE: break; -#ifndef EM_PPC -#define EM_PPC 20 -#endif case EM_PPC: break; -#ifndef EM_PPC64 -#define EM_PPC64 21 -#endif case EM_PPC64: break; -#ifndef EM_SPARCV9 -#define EM_SPARCV9 43 -#endif case EM_SPARCV9: break; -#ifndef EM_X86_64 -#define EM_X86_64 62 -#endif case EM_X86_64: break; /* ELFDEFNNAME(MACHDEP_ID_CASES) */ From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 18:53:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CB40BD for ; Mon, 20 Apr 2015 18:53:39 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2F7FF99 for ; Mon, 20 Apr 2015 18:53:38 +0000 (UTC) Received: by wizk4 with SMTP id k4so111337270wiz.1 for ; Mon, 20 Apr 2015 11:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ttCkft2SCpxmxa37mv056HGwqStsfkPIbBlwYA2f7OA=; b=ZiqXqYOIAqzG75178lXnfksn2pspBCheiD5f1/t9AWEFx7H8C645oJMfFfrGHce+ql 4ZFEVrxBTs1Qygw8fQ5z4Xj9modeFUcMDf+weB0CbGkESMT3MgooimWMJxBwVFNtiyUv Ge02NgcrZ1fMWagGiQeYV7mEqvtrEf3WGgjhc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=ttCkft2SCpxmxa37mv056HGwqStsfkPIbBlwYA2f7OA=; b=hK2IYEh4AFr9XIcY6jFsz4juMdPWwVYOZ90og7ONKl/cZpJ89DNQulfKDdyL2OH2En OgOy6WuytN8rmd1BjMEeo7XjaH4h4LeNlUq5BtbVMAL506AwQWlN4+QCGhzS0zlqEanE fx1XeVfo+DIEChdX7d/mUbajpe0gsYEsilLyp9LSLO2Nfa7cshWnTPpT+P/H01zh85N1 HWxY/YCxfWfCk6x6wXRDnVBYWHiPDDHASF73D60F9reEOWkM9XVhSspyvtDlw3B+qnWn pc0QdaTFpGtJ2f11Reuzk8Z5hJCfZ3/u+xRhQpOiQByWCJU/RHCqgs9zuRxH4aiU5Etl 60RA== X-Gm-Message-State: ALoCoQm9ORl+4wjAmf6dvoVOmFP5BuQ82V7iXRZAblRUak9wYQ+iOQ5H4M6bdaQDAJwi+Rq+z8co X-Received: by 10.194.237.34 with SMTP id uz2mr33064055wjc.157.1429556017194; Mon, 20 Apr 2015 11:53:37 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Mon, 20 Apr 2015 11:53:06 -0700 (PDT) In-Reply-To: <20150420134409.I855@besplex.bde.org> References: <201504200207.t3K27vFt078041@svn.freebsd.org> <20150420134409.I855@besplex.bde.org> From: Eitan Adler Date: Mon, 20 Apr 2015 11:53:06 -0700 X-Google-Sender-Auth: z4jxB6ikKZG--bXDsRlnp8KyTGI Message-ID: Subject: Re: svn commit: r281758 - head/bin/ed To: Bruce Evans Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 18:53:39 -0000 On 19 April 2015 at 21:23, Bruce Evans wrote: > On Mon, 20 Apr 2015, Eitan Adler wrote: > >> Log: >> ed(1): Fix [-Werror=logical-not-parentheses] >> /usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied >> to >> theleft hand side of comparison [-Werror=logical-not-parentheses] >> >> Obtained from: Dragonfly (1fff89cbaeaa43af720a1f23d9c466b756dd8a58) >> MFC After: 1 month >> >> Modified: >> head/bin/ed/glbl.c >> >> Modified: head/bin/ed/glbl.c >> >> ============================================================================== >> --- head/bin/ed/glbl.c Mon Apr 20 00:24:32 2015 (r281757) >> +++ head/bin/ed/glbl.c Mon Apr 20 02:07:57 2015 (r281758) >> @@ -60,7 +60,7 @@ build_active_list(int isgcmd) >> return ERR; >> if (isbinary) >> NUL_TO_NEWLINE(s, lp->len); >> - if (!regexec(pat, s, 0, NULL, 0) == isgcmd && >> + if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && >> set_active_node(lp) < 0) >> return ERR; >> } > > > How can this be right? !(a == b) is an obfuscated way of writing a != b. bah! How does something like the following look? Index: ed.h =================================================================== --- ed.h (revision 281759) +++ ed.h (working copy) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -191,7 +192,7 @@ int put_des_char(int, FILE *); void add_line_node(line_t *); int append_lines(long); int apply_subst_template(const char *, regmatch_t *, int, int); -int build_active_list(int); +int build_active_list(bool); int cbc_decode(unsigned char *, FILE *); int cbc_encode(unsigned char *, int, FILE *); int check_addr_range(long, long); Index: glbl.c =================================================================== --- glbl.c (revision 281759) +++ glbl.c (working copy) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); /* build_active_list: add line matching a pattern to the global-active list */ int -build_active_list(int isgcmd) +build_active_list(bool isgcmd) { pattern_t *pat; line_t *lp; @@ -60,7 +60,7 @@ int return ERR; if (isbinary) NUL_TO_NEWLINE(s, lp->len); - if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && + if ((!regexec(pat, s, 0, NULL, 0)) == isgcmd && set_active_node(lp) < 0) return ERR; } -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 19:11:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C825648; Mon, 20 Apr 2015 19:11:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B1ED26D; Mon, 20 Apr 2015 19:11:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KJBSQ5056042; Mon, 20 Apr 2015 19:11:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KJBSS0056041; Mon, 20 Apr 2015 19:11:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504201911.t3KJBSS0056041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2015 19:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281782 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 19:11:28 -0000 Author: mav Date: Mon Apr 20 19:11:27 2015 New Revision: 281782 URL: https://svnweb.freebsd.org/changeset/base/281782 Log: Don't set bits that should be zero for SATA devices. Old value made Linux think that it is PATA device with SATA bridge. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Mon Apr 20 18:30:06 2015 (r281781) +++ head/usr.sbin/bhyve/pci_ahci.c Mon Apr 20 19:11:27 2015 (r281782) @@ -930,7 +930,6 @@ handle_identify(struct ahci_port *p, int buf[88] = 0x7f; if (p->xfermode & ATA_UDMA0) buf[88] |= (1 << ((p->xfermode & 7) + 8)); - buf[93] = (1 | 1 <<14); buf[100] = sectors; buf[101] = (sectors >> 16); buf[102] = (sectors >> 32); From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 19:54:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F985371; Mon, 20 Apr 2015 19:54:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30EAA9C3; Mon, 20 Apr 2015 19:54:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KJstPq089407; Mon, 20 Apr 2015 19:54:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KJstFp089406; Mon, 20 Apr 2015 19:54:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504201954.t3KJstFp089406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 20 Apr 2015 19:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281783 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 19:54:55 -0000 Author: gjb Date: Mon Apr 20 19:54:54 2015 New Revision: 281783 URL: https://svnweb.freebsd.org/changeset/base/281783 Log: When building VM disk images, vm_copy_base() uses tar(1) to copy the userland from one md(4)-mounted filesystem to a clean filesystem to prevent remnants of files that were added and removed from resulting in an unclean filesystem. When newfs(8) creates the first filesystem with journaled soft-updates enabled, the /.sujournal file in the new filesystem cannot be overwritten by the /.sujournal in the original filesystem. To avoid this particular error case, do not enable journaled soft-updates when creating the md(4)-backed filesystems, and instead use tunefs(8) to enable journaled soft-updates after the new filesystem is populated in vm_copy_base(). While here, fix a long standing bug where the build environment /boot files were used by mkimg(1) when creating the VM disk images by using the files in .OBJDIR. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Mon Apr 20 19:11:27 2015 (r281782) +++ head/release/tools/vmimage.subr Mon Apr 20 19:54:54 2015 (r281783) @@ -14,17 +14,24 @@ write_partition_layout() { SWAPOPT="-p freebsd-swap/swapfs::1G" fi + _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" + if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then + BOOTFILES="${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" + else + BOOTFILES="${_OBJDIR}/usr/src/sys/boot" + fi + case "${TARGET}:${TARGET_ARCH}" in amd64:amd64 | i386:i386) - mkimg -s gpt -b /boot/pmbr \ - -p freebsd-boot/bootfs:=/boot/gptboot \ + mkimg -s gpt -b ${BOOTFILES}/i386/pmbr/pmbr \ + -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} ;; powerpc:powerpc*) mkimg -s apm \ - -p apple-boot/bootfs:=/boot/boot1.hfs \ + -p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} @@ -63,7 +70,7 @@ vm_create_base() { mkdir -p ${DESTDIR} truncate -s ${VMSIZE} ${VMBASE} mddev=$(mdconfig -f ${VMBASE}) - newfs -j /dev/${mddev} + newfs /dev/${mddev} mount /dev/${mddev} ${DESTDIR} return 0 @@ -83,10 +90,10 @@ vm_copy_base() { truncate -s ${VMSIZE} ${VMBASE}.tmp mkdir -p ${DESTDIR}/new mdnew=$(mdconfig -f ${VMBASE}.tmp) - newfs -j /dev/${mdnew} + newfs /dev/${mdnew} mount /dev/${mdnew} ${DESTDIR}/new - tar -cf- -C ${DESTDIR}/old . | tar -xf- -C ${DESTDIR}/new + tar -cf- -C ${DESTDIR}/old . | tar -xUf- -C ${DESTDIR}/new umount_loop /dev/${mdold} rmdir ${DESTDIR}/old @@ -94,6 +101,7 @@ vm_copy_base() { umount_loop /dev/${mdnew} rmdir ${DESTDIR}/new + tunefs -j enable /dev/${mdnew} mdconfig -d -u ${mdnew} mv ${VMBASE}.tmp ${VMBASE} } From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 20:03:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6844687F; Mon, 20 Apr 2015 20:03:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8E2AE8; Mon, 20 Apr 2015 20:03:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KK3R3k098043; Mon, 20 Apr 2015 20:03:27 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KK3QiA098040; Mon, 20 Apr 2015 20:03:26 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201504202003.t3KK3QiA098040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 20 Apr 2015 20:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281785 - in head: share/man/man9 sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:03:27 -0000 Author: vangyzen Date: Mon Apr 20 20:03:26 2015 New Revision: 281785 URL: https://svnweb.freebsd.org/changeset/base/281785 Log: Always send log(9) messages to the message buffer. It is truer to the semantics of logging for messages to *always* go to the message buffer, where they can eventually be collected and, in fact, be put into a log file. This restores the behavior prior to r70239, which seems to have changed it inadvertently. Submitted by: Eric Badger Reviewed by: jhb Approved by: kib (mentor) Obtained from: Dell Inc. MFC after: 1 week Modified: head/share/man/man9/printf.9 head/sys/kern/subr_prf.c Modified: head/share/man/man9/printf.9 ============================================================================== --- head/share/man/man9/printf.9 Mon Apr 20 20:03:07 2015 (r281784) +++ head/share/man/man9/printf.9 Mon Apr 20 20:03:26 2015 (r281785) @@ -67,7 +67,8 @@ The .Fn log function sends the message to the kernel logging facility, using the log level as indicated by -.Fa pri . +.Fa pri , +and to the console if no process is yet reading the log. .Pp Each of these related functions use the .Fa fmt Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Mon Apr 20 20:03:07 2015 (r281784) +++ head/sys/kern/subr_prf.c Mon Apr 20 20:03:26 2015 (r281785) @@ -295,7 +295,7 @@ log(int level, const char *fmt, ...) va_list ap; va_start(ap, fmt); - (void)_vprintf(level, log_open ? TOLOG : TOCONS, fmt, ap); + (void)_vprintf(level, log_open ? TOLOG : TOCONS | TOLOG, fmt, ap); va_end(ap); msgbuftrigger = 1; From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 20:07:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 139FEB54; Mon, 20 Apr 2015 20:07:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02284B22; Mon, 20 Apr 2015 20:07:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KK7dga000380; Mon, 20 Apr 2015 20:07:39 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KK7dtj000379; Mon, 20 Apr 2015 20:07:39 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201504202007.t3KK7dtj000379@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 20 Apr 2015 20:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281787 - head/sbin/dmesg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:07:40 -0000 Author: vangyzen Date: Mon Apr 20 20:07:39 2015 New Revision: 281787 URL: https://svnweb.freebsd.org/changeset/base/281787 Log: dmesg: accommodate message buffer growth between the sysctl calls Allocate 12.5% extra space to avoid ENOMEM when the message buffer is growing steadily. Reported by: Steve Wahl (and tested) Approved by: kib (mentor) Obtained from: Dell Inc. MFC after: 1 week Modified: head/sbin/dmesg/dmesg.c Modified: head/sbin/dmesg/dmesg.c ============================================================================== --- head/sbin/dmesg/dmesg.c Mon Apr 20 20:06:25 2015 (r281786) +++ head/sbin/dmesg/dmesg.c Mon Apr 20 20:07:39 2015 (r281787) @@ -118,6 +118,9 @@ main(int argc, char *argv[]) */ if (sysctlbyname("kern.msgbuf", NULL, &buflen, NULL, 0) == -1) err(1, "sysctl kern.msgbuf"); + /* Allocate extra room for growth between the sysctl calls. */ + buflen += buflen/8; + /* Allocate more than sysctl sees, for room to append \n\0. */ if ((bp = malloc(buflen + 2)) == NULL) errx(1, "malloc failed"); if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == -1) From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 20:11:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9826BD52; Mon, 20 Apr 2015 20:11:35 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id C6101BFC; Mon, 20 Apr 2015 20:11:34 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id E726F424073; Tue, 21 Apr 2015 05:53:10 +1000 (AEST) Date: Tue, 21 Apr 2015 05:53:09 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler cc: Bruce Evans , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r281758 - head/bin/ed In-Reply-To: Message-ID: <20150421050859.H11701@besplex.bde.org> References: <201504200207.t3K27vFt078041@svn.freebsd.org> <20150420134409.I855@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=TEllcOey7MfUqoLxoeYA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:11:35 -0000 On Mon, 20 Apr 2015, Eitan Adler wrote: > On 19 April 2015 at 21:23, Bruce Evans wrote: >> On Mon, 20 Apr 2015, Eitan Adler wrote: >>> ... >>> --- head/bin/ed/glbl.c Mon Apr 20 00:24:32 2015 (r281757) >>> +++ head/bin/ed/glbl.c Mon Apr 20 02:07:57 2015 (r281758) >>> @@ -60,7 +60,7 @@ build_active_list(int isgcmd) >>> return ERR; >>> if (isbinary) >>> NUL_TO_NEWLINE(s, lp->len); >>> - if (!regexec(pat, s, 0, NULL, 0) == isgcmd && >>> + if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && >>> set_active_node(lp) < 0) >>> return ERR; >>> } >> >> >> How can this be right? !(a == b) is an obfuscated way of writing a != b. > bah! > How does something like the following look? Sorry, not good. I don't like stdbool. Here using it just enlarges and unportablize the code. > Index: ed.h > =================================================================== > --- ed.h (revision 281759) > +++ ed.h (working copy) > @@ -33,6 +33,7 @@ > #include > #include > #include > +#include > #include > #include > #include ed already has bad style, with *.h included in ed.h... > @@ -191,7 +192,7 @@ int put_des_char(int, FILE *); > void add_line_node(line_t *); > int append_lines(long); > int apply_subst_template(const char *, regmatch_t *, int, int); > -int build_active_list(int); > +int build_active_list(bool); It would be impossible to even declare a function that uses bool in a header without increasing the pollution. Actually, this is easy in C99 and only difficult to do portably. _Bool is standard in C99, so the include is only needed for portability to systems that have but not _Bool, or if you want to spell _Bool as bool in C99. The header (and program) otherwise doesn't use many fancy types. > int cbc_decode(unsigned char *, FILE *); > int cbc_encode(unsigned char *, int, FILE *); > int check_addr_range(long, long); It does use FILE. That requires the pollution. > Index: glbl.c > =================================================================== > --- glbl.c (revision 281759) > +++ glbl.c (working copy) > @@ -60,7 +60,7 @@ int > return ERR; > if (isbinary) > NUL_TO_NEWLINE(s, lp->len); > - if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && > + if ((!regexec(pat, s, 0, NULL, 0)) == isgcmd && > set_active_node(lp) < 0) > return ERR; > } This still has the obfuscation of using ! on a non-boolean, and then needs excessive parentheses to defeat the compiler warning about (a side effect of) this. Parentheses are needed for syntactical reasons in the non-obfuscated version: if ((regexec(pat, s, 0, NULL, 0) == 0) == isgcmd && This depends on the value of isgcmd being 0 or 1. It obviously is, but we have to examine all the callers (just 1) to see this. The bool declaration lets the compiler ensure this. You can ensure it directly replacing isgcmd by (isgcmd != 0). Maybe I wouldn't object to using bool if you rewrote ed to use it in all places that use booleans. ed doesn't seem to have many such places. It uses the variable "int gflag" a lot. gflag contains 5 flags. These are essentially packed booleans. It would be silly to use booleans for the easy case of 1 truth value while continuing to use ints for more complicated cases, but I think that if you translate the complicated cases to use booleans then they would be even more complicated. Bruce From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 20:33:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B02731B; Mon, 20 Apr 2015 20:33:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39826E1B; Mon, 20 Apr 2015 20:33:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KKXNS9019827; Mon, 20 Apr 2015 20:33:23 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KKXMPW019822; Mon, 20 Apr 2015 20:33:22 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504202033.t3KKXMPW019822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 20 Apr 2015 20:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281789 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:33:23 -0000 Author: eadler Date: Mon Apr 20 20:33:22 2015 New Revision: 281789 URL: https://svnweb.freebsd.org/changeset/base/281789 Log: phabricator related changes: - don't lint either contrib or crypto: these are both externally written directories - add additional linters for spelling (check common typos like teh -> the) - chmod linter checks for executible bit on bad files - merge-conflict checks for merge conflict tokens then may have been resolved incorrectly - filename checks for back characters in filenames - json for json syntax correctness - remove history.immutable: it is meaningless on subversion, and causes workflow problems when trying to use git. It it set to 'true' by default with hg Modified: head/.arcconfig head/.arclint Modified: head/.arcconfig ============================================================================== --- head/.arcconfig Mon Apr 20 20:13:02 2015 (r281788) +++ head/.arcconfig Mon Apr 20 20:33:22 2015 (r281789) @@ -1,5 +1,4 @@ { "project.name": "S", - "phabricator.uri" : "https://reviews.freebsd.org/", - "history.immutable" : true + "phabricator.uri" : "https://reviews.freebsd.org/" } Modified: head/.arclint ============================================================================== --- head/.arclint Mon Apr 20 20:13:02 2015 (r281788) +++ head/.arclint Mon Apr 20 20:33:22 2015 (r281789) @@ -1,9 +1,25 @@ { + "exclude": "(contrib|crypto)", "linters": { "python": { "type": "pep8", - "exclude": "(contrib)", "include": "(\\.py$)" + }, + "spelling": { + "type": "spelling" + }, + "chmod": { + "type": "chmod" + }, + "merge-conflict": { + "type": "merge-conflict" + }, + "filename": { + "type": "filename" + }, + "json": { + "type": "json", + "include": "(\\.arclint|\\.json$)" } } } From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 20:45:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 106B4749; Mon, 20 Apr 2015 20:45:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9049F5E; Mon, 20 Apr 2015 20:45:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KKjA8B028649; Mon, 20 Apr 2015 20:45:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KKjA2H028648; Mon, 20 Apr 2015 20:45:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504202045.t3KKjA2H028648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 20 Apr 2015 20:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281790 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:45:11 -0000 Author: bdrewery Date: Mon Apr 20 20:45:10 2015 New Revision: 281790 URL: https://svnweb.freebsd.org/changeset/base/281790 Log: Fix indentation to use tabs Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Mon Apr 20 20:33:22 2015 (r281789) +++ head/tools/build/check-links.sh Mon Apr 20 20:45:10 2015 (r281790) @@ -11,27 +11,27 @@ esac # Check for useful libs list_libs="" for lib in $(readelf -d $1 | awk '$2 ~ /\(?NEEDED\)?/ { sub(/\[/,"",$NF); sub(/\]/,"",$NF); print $NF }'); do - echo -n "checking if $lib is needed: " - libpath=$(ldd $1 | awk -v lib=$lib '$1 == lib { print $3 }') - list_libs="$list_libs $libpath" - foundone=0 - for fct in $(nm -D $libpath | awk '$2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B" { print $3 }'); do - nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && foundone=1 && break - done - if [ $foundone -eq 1 ]; then - echo -n "yes... " - nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { print $2 ; exit }' - else - echo "no" - fi + echo -n "checking if $lib is needed: " + libpath=$(ldd $1 | awk -v lib=$lib '$1 == lib { print $3 }') + list_libs="$list_libs $libpath" + foundone=0 + for fct in $(nm -D $libpath | awk '$2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B" { print $3 }'); do + nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && foundone=1 && break + done + if [ $foundone -eq 1 ]; then + echo -n "yes... " + nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { print $2 ; exit }' + else + echo "no" + fi done for sym in $(nm -D $1 | awk '$1 == "U" { print $2 }'); do - found=0 - for l in ${list_libs} ; do - nm -D $l | awk -v s=$sym '($2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B") && $3 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && found=1 && break - done - if [ $found -eq 0 ]; then - echo "Unresolved symbol $sym" - fi + found=0 + for l in ${list_libs} ; do + nm -D $l | awk -v s=$sym '($2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B") && $3 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && found=1 && break + done + if [ $found -eq 0 ]; then + echo "Unresolved symbol $sym" + fi done From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 20:51:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84A3E963; Mon, 20 Apr 2015 20:51:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72EF4BA; Mon, 20 Apr 2015 20:51:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KKpKrC032928; Mon, 20 Apr 2015 20:51:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KKpK6S032927; Mon, 20 Apr 2015 20:51:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504202051.t3KKpK6S032927@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 20 Apr 2015 20:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281791 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 20:51:20 -0000 Author: bdrewery Date: Mon Apr 20 20:51:19 2015 New Revision: 281791 URL: https://svnweb.freebsd.org/changeset/base/281791 Log: - Speedup significantly by not using subshells for data already fetched. Ran against /usr/local/sbin/pkg: Before: 25.12 real 12.41 user 33.14 sys After: 0.53 real 0.49 user 0.13 sys - Exit with 1 if any missing or unresolved symbol is detected. - Add option '-U' to skip looking up unresolved symbols. - Don't consider provided weak objects as unresolved (nm V). Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Mon Apr 20 20:45:10 2015 (r281790) +++ head/tools/build/check-links.sh Mon Apr 20 20:51:19 2015 (r281791) @@ -1,6 +1,15 @@ #!/bin/sh # $FreeBSD$ +ret=0 +CHECK_UNRESOLVED=1 +while getopts "U" flag; do + case "${flag}" in + U) CHECK_UNRESOLVED=0 ;; + esac +done +shift $((OPTIND-1)) + mime=$(file -L --mime-type $1) case $mime in *application/x-executable);; @@ -8,30 +17,74 @@ case $mime in *) echo "Not an elf file" >&2 ; exit 1;; esac +# Gather all symbols from the target +unresolved_symbols=$(nm -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') +ldd_libs=$(ldd $1 | awk '{print $1 ":" $3}') + +libkey() { + libkey="lib_symbols_$1" + patterns=[.+,-] + replacement=_ + while :; do + case " ${libkey} " in + *${patterns}*) + libkey="${libkey%%${patterns}*}${replacement}${libkey#*${patterns}}" + ;; + *) + break + ;; + esac + done + return 0 +} + # Check for useful libs -list_libs="" +list_libs= +resolved_symbols= for lib in $(readelf -d $1 | awk '$2 ~ /\(?NEEDED\)?/ { sub(/\[/,"",$NF); sub(/\]/,"",$NF); print $NF }'); do echo -n "checking if $lib is needed: " - libpath=$(ldd $1 | awk -v lib=$lib '$1 == lib { print $3 }') - list_libs="$list_libs $libpath" - foundone=0 - for fct in $(nm -D $libpath | awk '$2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B" { print $3 }'); do - nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && foundone=1 && break + for libpair in ${ldd_libs}; do + case "${libpair}" in + ${lib}:*) libpath="${libpair#*:}" && break ;; + esac done - if [ $foundone -eq 1 ]; then - echo -n "yes... " - nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { print $2 ; exit }' + list_libs="$list_libs $lib" + foundone= + lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" + if [ ${CHECK_UNRESOLVED} -eq 1 ]; then + # Save the global symbols for this lib + libkey "${lib}" + setvar "${libkey}" "${lib_symbols}" + fi + for fct in ${lib_symbols}; do + case " ${unresolved_symbols} " in + *\ ${fct}\ *) foundone="${fct}" && break ;; + esac + done + if [ -n "${foundone}" ]; then + echo "yes... ${foundone}" else echo "no" + ret=1 fi done -for sym in $(nm -D $1 | awk '$1 == "U" { print $2 }'); do - found=0 - for l in ${list_libs} ; do - nm -D $l | awk -v s=$sym '($2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B") && $3 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && found=1 && break +if [ ${CHECK_UNRESOLVED} -eq 1 ]; then + for sym in ${unresolved_symbols}; do + found=0 + for lib in ${list_libs}; do + libkey "${lib}" + eval "lib_symbols=\"\${${libkey}}\"" + # lib_symbols now contains symbols for the lib. + case " ${lib_symbols} " in + *\ ${sym}\ *) found=1 && break ;; + esac + done + if [ $found -eq 0 ]; then + echo "Unresolved symbol $sym" + ret=1 + fi done - if [ $found -eq 0 ]; then - echo "Unresolved symbol $sym" - fi -done +fi + +exit ${ret} From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 21:19:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 327BCFB9; Mon, 20 Apr 2015 21: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2105F38E; Mon, 20 Apr 2015 21:19:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KLJSAw051351; Mon, 20 Apr 2015 21:19:28 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KLJRgO051342; Mon, 20 Apr 2015 21:19:27 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201504202119.t3KLJRgO051342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Mon, 20 Apr 2015 21:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281793 - in head: lib/libmt lib/libpmc share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 21:19:28 -0000 Author: joel (doc committer) Date: Mon Apr 20 21:19:26 2015 New Revision: 281793 URL: https://svnweb.freebsd.org/changeset/base/281793 Log: Minor mdoc fixes. Modified: head/lib/libmt/mt.3 head/lib/libpmc/pmc.haswellxeon.3 head/share/man/man4/ata.4 Modified: head/lib/libmt/mt.3 ============================================================================== --- head/lib/libmt/mt.3 Mon Apr 20 20:52:20 2015 (r281792) +++ head/lib/libmt/mt.3 Mon Apr 20 21:19:26 2015 (r281793) @@ -35,7 +35,6 @@ .Dt MT 3 .Os .Sh NAME -.Nm .Nm mt_start_element , .Nm mt_end_element , .Nm mt_char_handler , Modified: head/lib/libpmc/pmc.haswellxeon.3 ============================================================================== --- head/lib/libpmc/pmc.haswellxeon.3 Mon Apr 20 20:52:20 2015 (r281792) +++ head/lib/libpmc/pmc.haswellxeon.3 Mon Apr 20 21:19:26 2015 (r281793) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd 21 November, 2014 +.Dd November 21, 2014 .Dt PMC.HASWELLXEON 3 .Os .Sh NAME Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Mon Apr 20 20:52:20 2015 (r281792) +++ head/share/man/man4/ata.4 Mon Apr 20 21:19:26 2015 (r281793) @@ -99,6 +99,7 @@ Interface Power Management is disabled. This is the default value. .It 1 The device is allowed to initiate a PM state change; the host is passive. +.El .It Va hint.ata. Ns Ar X Ns Va .dev Ns Ar X Ns Va .sata_rev limits the initial SATA revision (speed) for the specified device on the specified channel. From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 21:44:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD094596; Mon, 20 Apr 2015 21:44:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB9DA8D2; Mon, 20 Apr 2015 21:44:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KLiuQm076628; Mon, 20 Apr 2015 21:44:56 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KLiuoc076627; Mon, 20 Apr 2015 21:44:56 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504202144.t3KLiuoc076627@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 21:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281795 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 21:44:56 -0000 Author: pfg Date: Mon Apr 20 21:44:55 2015 New Revision: 281795 URL: https://svnweb.freebsd.org/changeset/base/281795 Log: scsi_parse_transportid_rdma(): fix mismatch in memoty access size. Independently found by Coverity and gcc49. CID: 1230006 Reviewed by: ken MFC after: 5 days Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Mon Apr 20 21:27:25 2015 (r281794) +++ head/sys/cam/scsi/scsi_all.c Mon Apr 20 21:44:55 2015 (r281795) @@ -6039,7 +6039,7 @@ scsi_parse_transportid_rdma(char *id_str goto bailout; } *alloc_len = sizeof(*rdma); - bzero(rdma, sizeof(rdma)); + bzero(rdma, *alloc_len); rdma->format_protocol = SCSI_PROTO_RDMA | SCSI_TRN_RDMA_FORMAT_DEFAULT; bcopy(rdma_id, rdma->initiator_port_id, SCSI_TRN_RDMA_PORT_LEN); From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 22:08:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E108F952; Mon, 20 Apr 2015 22:08:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF6B2AE6; Mon, 20 Apr 2015 22:08:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KM8CBu094228; Mon, 20 Apr 2015 22:08:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KM8C4U094224; Mon, 20 Apr 2015 22:08:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504202208.t3KM8C4U094224@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 20 Apr 2015 22:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281797 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 22:08:13 -0000 Author: markj Date: Mon Apr 20 22:08:11 2015 New Revision: 281797 URL: https://svnweb.freebsd.org/changeset/base/281797 Log: Move the definition of struct bpf_if to bpf.c. A couple of fields are still exposed via struct bpf_if_ext so that bpf_peers_present() can be inlined into its callers. However, this change eliminates some type duplication in the resulting CTF container, since otherwise ctfmerge(1) propagates the duplication through all types that contain a struct bpf_if. Differential Revision: https://reviews.freebsd.org/D2319 Reviewed by: melifaro, rpaulo Modified: head/sys/net/bpf.c head/sys/net/bpf.h Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Mon Apr 20 21:45:38 2015 (r281796) +++ head/sys/net/bpf.c Mon Apr 20 22:08:11 2015 (r281797) @@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define BPF_INTERNAL #include #include #ifdef BPF_JITTER @@ -90,6 +89,20 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_BPF, "BPF", "BPF data"); +struct bpf_if { +#define bif_next bif_ext.bif_next +#define bif_dlist bif_ext.bif_dlist + struct bpf_if_ext bif_ext; /* public members */ + u_int bif_dlt; /* link layer type */ + u_int bif_hdrlen; /* length of link header */ + struct ifnet *bif_ifp; /* corresponding interface */ + struct rwlock bif_lock; /* interface lock */ + LIST_HEAD(, bpf_d) bif_wlist; /* writer-only list */ + int bif_flags; /* Interface flags */ +}; + +CTASSERT(offsetof(struct bpf_if, bif_ext) == 0); + #if defined(DEV_BPF) || defined(NETGRAPH_BPF) #define PRINET 26 /* interruptible */ @@ -1892,7 +1905,7 @@ bpf_setif(struct bpf_d *d, struct ifreq /* Check if interface is not being detached from BPF */ BPFIF_RLOCK(bp); - if (bp->flags & BPFIF_FLAG_DYING) { + if (bp->bif_flags & BPFIF_FLAG_DYING) { BPFIF_RUNLOCK(bp); return (ENXIO); } @@ -2561,7 +2574,7 @@ bpfdetach(struct ifnet *ifp) * Mark bp as detached to restrict new consumers. */ BPFIF_WLOCK(bp); - bp->flags |= BPFIF_FLAG_DYING; + bp->bif_flags |= BPFIF_FLAG_DYING; BPFIF_WUNLOCK(bp); CTR4(KTR_NET, "%s: sheduling free for encap %d (%p) for if %p", Modified: head/sys/net/bpf.h ============================================================================== --- head/sys/net/bpf.h Mon Apr 20 21:45:38 2015 (r281796) +++ head/sys/net/bpf.h Mon Apr 20 22:08:11 2015 (r281797) @@ -1451,21 +1451,14 @@ SYSCTL_DECL(_net_bpf); /* * Descriptor associated with each attached hardware interface. - * FIXME: this structure is exposed to external callers to speed up - * bpf_peers_present() call. However we cover all fields not needed by - * this function via BPF_INTERNAL define + * Part of this structure is exposed to external callers to speed up + * bpf_peers_present() calls. */ -struct bpf_if { +struct bpf_if; + +struct bpf_if_ext { LIST_ENTRY(bpf_if) bif_next; /* list of all interfaces */ LIST_HEAD(, bpf_d) bif_dlist; /* descriptor list */ -#ifdef BPF_INTERNAL - u_int bif_dlt; /* link layer type */ - u_int bif_hdrlen; /* length of link header */ - struct ifnet *bif_ifp; /* corresponding interface */ - struct rwlock bif_lock; /* interface lock */ - LIST_HEAD(, bpf_d) bif_wlist; /* writer-only list */ - int flags; /* Interface flags */ -#endif }; void bpf_bufheld(struct bpf_d *d); @@ -1483,8 +1476,10 @@ u_int bpf_filter(const struct bpf_insn static __inline int bpf_peers_present(struct bpf_if *bpf) { + struct bpf_if_ext *ext; - if (!LIST_EMPTY(&bpf->bif_dlist)) + ext = (struct bpf_if_ext *)bpf; + if (!LIST_EMPTY(&ext->bif_dlist)) return (1); return (0); } From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 22:09:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0DE7AED; Mon, 20 Apr 2015 22:09:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFCC8AFD; Mon, 20 Apr 2015 22:09:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KM9pNP094967; Mon, 20 Apr 2015 22:09:51 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KM9pXl094966; Mon, 20 Apr 2015 22:09:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504202209.t3KM9pXl094966@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 22:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281798 - head/lib/libc/iconv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 22:09:51 -0000 Author: pfg Date: Mon Apr 20 22:09:50 2015 New Revision: 281798 URL: https://svnweb.freebsd.org/changeset/base/281798 Log: Fix improbable memory leak in _citrus_prop_read_str(). Found by: Clang Static Analyzer Modified: head/lib/libc/iconv/citrus_prop.c Modified: head/lib/libc/iconv/citrus_prop.c ============================================================================== --- head/lib/libc/iconv/citrus_prop.c Mon Apr 20 22:08:11 2015 (r281797) +++ head/lib/libc/iconv/citrus_prop.c Mon Apr 20 22:09:50 2015 (r281798) @@ -293,8 +293,10 @@ done: } _memstream_ungetc(ms, ch); errnum = _citrus_prop_read_character_common(ms, &ch); - if (errnum != 0) + if (errnum != 0) { + free(s); return (errnum); + } s[n] = ch; ++n, --m; } From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 22:12:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58296C98; Mon, 20 Apr 2015 22:12:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4673ABCD; Mon, 20 Apr 2015 22:12:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KMCL9n099405; Mon, 20 Apr 2015 22:12:21 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KMCKtF099400; Mon, 20 Apr 2015 22:12:20 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504202212.t3KMCKtF099400@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 20 Apr 2015 22:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281799 - in head/sys: arm/conf modules/dtb/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 22:12:21 -0000 Author: loos Date: Mon Apr 20 22:12:19 2015 New Revision: 281799 URL: https://svnweb.freebsd.org/changeset/base/281799 Log: Build and install the DTB for all the supported AllWinner SoCs. We will need them when we start booting using ubldr. Added: head/sys/modules/dtb/allwinner/ head/sys/modules/dtb/allwinner/Makefile (contents, props changed) Modified: head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/CUBIEBOARD2 Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Mon Apr 20 22:09:50 2015 (r281798) +++ head/sys/arm/conf/CUBIEBOARD Mon Apr 20 22:12:19 2015 (r281799) @@ -139,4 +139,4 @@ device miibus options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard.dts - +makeoptions MODULES_EXTRA=dtb/allwinner Modified: head/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- head/sys/arm/conf/CUBIEBOARD2 Mon Apr 20 22:09:50 2015 (r281798) +++ head/sys/arm/conf/CUBIEBOARD2 Mon Apr 20 22:12:19 2015 (r281799) @@ -140,4 +140,4 @@ device miibus options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard2.dts - +makeoptions MODULES_EXTRA=dtb/allwinner Added: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/dtb/allwinner/Makefile Mon Apr 20 22:12:19 2015 (r281799) @@ -0,0 +1,7 @@ +# $FreeBSD$ +# All the dts files for allwinner systems we support. +DTS= \ + cubieboard.dts \ + cubieboard2.dts + +.include From owner-svn-src-head@FreeBSD.ORG Mon Apr 20 22:15:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CE89EE5; Mon, 20 Apr 2015 22:15:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6E7ABEE; Mon, 20 Apr 2015 22:15:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3KMFJiV000424; Mon, 20 Apr 2015 22:15:19 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3KMFJDu000420; Mon, 20 Apr 2015 22:15:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504202215.t3KMFJDu000420@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 20 Apr 2015 22:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281800 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 22:15:20 -0000 Author: pfg Date: Mon Apr 20 22:15:18 2015 New Revision: 281800 URL: https://svnweb.freebsd.org/changeset/base/281800 Log: patch(1): small include changes. Mostly to match OpenBSD, no functional change. Obtained from: OpenBSD Modified: head/usr.bin/patch/inp.c head/usr.bin/patch/pch.c head/usr.bin/patch/util.c Modified: head/usr.bin/patch/inp.c ============================================================================== --- head/usr.bin/patch/inp.c Mon Apr 20 22:12:19 2015 (r281799) +++ head/usr.bin/patch/inp.c Mon Apr 20 22:15:18 2015 (r281800) @@ -34,8 +34,8 @@ #include #include -#include #include +#include #include #include #include Modified: head/usr.bin/patch/pch.c ============================================================================== --- head/usr.bin/patch/pch.c Mon Apr 20 22:12:19 2015 (r281799) +++ head/usr.bin/patch/pch.c Mon Apr 20 22:15:18 2015 (r281800) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include Modified: head/usr.bin/patch/util.c ============================================================================== --- head/usr.bin/patch/util.c Mon Apr 20 22:12:19 2015 (r281799) +++ head/usr.bin/patch/util.c Mon Apr 20 22:15:18 2015 (r281800) @@ -27,13 +27,13 @@ * $FreeBSD$ */ -#include #include #include #include #include #include +#include #include #include #include @@ -96,7 +96,7 @@ int backup_file(const char *orig) { struct stat filestat; - char bakname[MAXPATHLEN], *s, *simplename; + char bakname[PATH_MAX], *s, *simplename; dev_t orig_device; ino_t orig_inode; @@ -406,7 +406,7 @@ fetchname(const char *at, bool *exists, char * checked_in(char *file) { - char *filebase, *filedir, tmpbuf[MAXPATHLEN]; + char *filebase, *filedir, tmpbuf[PATH_MAX]; struct stat filestat; filebase = basename(file); From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 00:48:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0437D6BC; Tue, 21 Apr 2015 00:48:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D96B2DAE; Tue, 21 Apr 2015 00:48:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L0mae5020067; Tue, 21 Apr 2015 00:48:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L0mao3020058; Tue, 21 Apr 2015 00:48:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504210048.t3L0mao3020058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2015 00:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281802 - in head/release: . arm64 tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 00:48:37 -0000 Author: gjb Date: Tue Apr 21 00:48:35 2015 New Revision: 281802 URL: https://svnweb.freebsd.org/changeset/base/281802 Log: Merge the following from ^/projects/release-arm64 to allow building FreeBSD/arm64 VM images and memstick.img installation medium: r281786, r281788, r281792: r281786: Add support for building arm64/aarch64 virtual machine images. r281788: Copy amd64/make-memstick.sh to arm64/make-memstick.sh for aarch64 memory stick images. Although arm64 does not yet have USB support, the memstick image should be bootable with certain virtualization tools, such as qemu. r281792: Add a buildenv_setup() prototype, intended to be overridden as needed. For example, the arm64/aarch64 build needs devel/aarch64-binutils, so buildenv_setup() in the release.conf for this architecture handles the installation of the port before buildworld/buildkernel. Sponsored by: The FreeBSD Foundation Added: head/release/arm64/ - copied from r281788, projects/release-arm64/release/arm64/ Modified: head/release/release.conf.sample head/release/release.sh head/release/tools/vmimage.subr Directory Properties: head/ (props changed) Modified: head/release/release.conf.sample ============================================================================== --- head/release/release.conf.sample Tue Apr 21 00:08:37 2015 (r281801) +++ head/release/release.conf.sample Tue Apr 21 00:48:35 2015 (r281802) @@ -7,6 +7,7 @@ ## defined in release.sh. #load_chroot_env() { } #load_target_env() { } +#buildenv_setup() { } ## Set the directory within which the release will be built. CHROOTDIR="/scratch" Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Tue Apr 21 00:08:37 2015 (r281801) +++ head/release/release.sh Tue Apr 21 00:48:35 2015 (r281802) @@ -42,6 +42,7 @@ export PATH # Prototypes that can be redefined per-chroot or per-target. load_chroot_env() { } load_target_env() { } +buildenv_setup() { } # The directory within which the release will be built. CHROOTDIR="/scratch" @@ -279,6 +280,7 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then fi fi +buildenv_setup load_target_env eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Tue Apr 21 00:08:37 2015 (r281801) +++ head/release/tools/vmimage.subr Tue Apr 21 00:48:35 2015 (r281802) @@ -29,6 +29,13 @@ write_partition_layout() { -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} ;; + arm64:aarch64) + mkimg -s gpt \ + -p efi/efiboot:=${BOOTFILES}/efi/boot1/boot1.efifat \ + ${SWAPOPT} \ + -p freebsd-ufs/rootfs:=${VMBASE} \ + -o ${VMIMAGE} + ;; powerpc:powerpc*) mkimg -s apm \ -p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs \ From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 01:37:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15247E29; Tue, 21 Apr 2015 01:37:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0350B2F0; Tue, 21 Apr 2015 01:37:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L1bE7A056181; Tue, 21 Apr 2015 01:37:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L1bE1c056180; Tue, 21 Apr 2015 01:37:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210137.t3L1bE1c056180@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 01:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281805 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 01:37:15 -0000 Author: bdrewery Date: Tue Apr 21 01:37:14 2015 New Revision: 281805 URL: https://svnweb.freebsd.org/changeset/base/281805 Log: Support demangling C++ symbols with -D flag. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 01:09:53 2015 (r281804) +++ head/tools/build/check-links.sh Tue Apr 21 01:37:14 2015 (r281805) @@ -3,8 +3,10 @@ ret=0 CHECK_UNRESOLVED=1 -while getopts "U" flag; do +DEMANGLE= +while getopts "DU" flag; do case "${flag}" in + D) DEMANGLE="-C" ;; U) CHECK_UNRESOLVED=0 ;; esac done @@ -18,7 +20,7 @@ case $mime in esac # Gather all symbols from the target -unresolved_symbols=$(nm -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') +unresolved_symbols=$(nm ${DEMANGLE} -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') ldd_libs=$(ldd $1 | awk '{print $1 ":" $3}') libkey() { @@ -50,7 +52,7 @@ for lib in $(readelf -d $1 | awk '$2 ~ / done list_libs="$list_libs $lib" foundone= - lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" + lib_symbols="$(nm ${DEMANGLE} -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" if [ ${CHECK_UNRESOLVED} -eq 1 ]; then # Save the global symbols for this lib libkey "${lib}" From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 01:45:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE5551F4; Tue, 21 Apr 2015 01:45:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97BB53F2; Tue, 21 Apr 2015 01:45:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L1jENX063450; Tue, 21 Apr 2015 01:45:14 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L1jCLp063432; Tue, 21 Apr 2015 01:45:12 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504210145.t3L1jCLp063432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 21 Apr 2015 01:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281806 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20 contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 01:45:14 -0000 Author: rpaulo Date: Tue Apr 21 01:45:11 2015 New Revision: 281806 URL: https://svnweb.freebsd.org/changeset/base/281806 Log: Merge wpa_supplicant/hostapd 2.4. Major changes are: SAE, Suite B, RFC 7268, EAP-PKE, ACS, and tons of bug fixes. Relnotes: yes Added: head/contrib/wpa/CONTRIBUTIONS - copied unchanged from r281682, vendor/wpa/dist/CONTRIBUTIONS head/contrib/wpa/hostapd/hapd_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/hostapd/hapd_module_tests.c head/contrib/wpa/hostapd/wps-ap-nfc.py - copied unchanged from r281682, vendor/wpa/dist/hostapd/wps-ap-nfc.py head/contrib/wpa/hs20/ - copied from r281682, vendor/wpa/dist/hs20/ head/contrib/wpa/patches/openssl-0.9.8za-tls-extensions.patch - copied unchanged from r281682, vendor/wpa/dist/patches/openssl-0.9.8za-tls-extensions.patch head/contrib/wpa/src/ap/acs.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/acs.c head/contrib/wpa/src/ap/acs.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/acs.h head/contrib/wpa/src/ap/bss_load.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/bss_load.c head/contrib/wpa/src/ap/bss_load.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/bss_load.h head/contrib/wpa/src/ap/dfs.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/dfs.c head/contrib/wpa/src/ap/dfs.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/dfs.h head/contrib/wpa/src/ap/dhcp_snoop.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/dhcp_snoop.c head/contrib/wpa/src/ap/dhcp_snoop.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/dhcp_snoop.h head/contrib/wpa/src/ap/ndisc_snoop.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/ndisc_snoop.c head/contrib/wpa/src/ap/ndisc_snoop.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/ndisc_snoop.h head/contrib/wpa/src/ap/x_snoop.c - copied unchanged from r281682, vendor/wpa/dist/src/ap/x_snoop.c head/contrib/wpa/src/ap/x_snoop.h - copied unchanged from r281682, vendor/wpa/dist/src/ap/x_snoop.h head/contrib/wpa/src/common/common_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/src/common/common_module_tests.c head/contrib/wpa/src/common/hw_features_common.c - copied unchanged from r281682, vendor/wpa/dist/src/common/hw_features_common.c head/contrib/wpa/src/common/hw_features_common.h - copied unchanged from r281682, vendor/wpa/dist/src/common/hw_features_common.h head/contrib/wpa/src/common/ieee802_1x_defs.h - copied unchanged from r281682, vendor/wpa/dist/src/common/ieee802_1x_defs.h head/contrib/wpa/src/common/qca-vendor-attr.h - copied unchanged from r281682, vendor/wpa/dist/src/common/qca-vendor-attr.h head/contrib/wpa/src/common/qca-vendor.h - copied unchanged from r281682, vendor/wpa/dist/src/common/qca-vendor.h head/contrib/wpa/src/common/sae.c - copied unchanged from r281682, vendor/wpa/dist/src/common/sae.c head/contrib/wpa/src/common/sae.h - copied unchanged from r281682, vendor/wpa/dist/src/common/sae.h head/contrib/wpa/src/common/tnc.h - copied unchanged from r281682, vendor/wpa/dist/src/common/tnc.h head/contrib/wpa/src/common/wpa_helpers.c - copied unchanged from r281682, vendor/wpa/dist/src/common/wpa_helpers.c head/contrib/wpa/src/common/wpa_helpers.h - copied unchanged from r281682, vendor/wpa/dist/src/common/wpa_helpers.h head/contrib/wpa/src/crypto/aes-siv.c - copied unchanged from r281682, vendor/wpa/dist/src/crypto/aes-siv.c head/contrib/wpa/src/crypto/aes_siv.h - copied unchanged from r281682, vendor/wpa/dist/src/crypto/aes_siv.h head/contrib/wpa/src/crypto/crypto_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/src/crypto/crypto_module_tests.c head/contrib/wpa/src/crypto/sha256-kdf.c - copied unchanged from r281682, vendor/wpa/dist/src/crypto/sha256-kdf.c head/contrib/wpa/src/crypto/sha384.h - copied unchanged from r281682, vendor/wpa/dist/src/crypto/sha384.h head/contrib/wpa/src/drivers/driver_macsec_qca.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_macsec_qca.c head/contrib/wpa/src/drivers/driver_nl80211.h - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211.h head/contrib/wpa/src/drivers/driver_nl80211_android.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211_android.c head/contrib/wpa/src/drivers/driver_nl80211_capa.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211_capa.c head/contrib/wpa/src/drivers/driver_nl80211_event.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211_event.c head/contrib/wpa/src/drivers/driver_nl80211_monitor.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211_monitor.c head/contrib/wpa/src/drivers/driver_nl80211_scan.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_nl80211_scan.c head/contrib/wpa/src/drivers/driver_openbsd.c - copied unchanged from r281682, vendor/wpa/dist/src/drivers/driver_openbsd.c head/contrib/wpa/src/drivers/linux_defines.h - copied unchanged from r281682, vendor/wpa/dist/src/drivers/linux_defines.h head/contrib/wpa/src/eap_common/eap_eke_common.c - copied unchanged from r281682, vendor/wpa/dist/src/eap_common/eap_eke_common.c head/contrib/wpa/src/eap_common/eap_eke_common.h - copied unchanged from r281682, vendor/wpa/dist/src/eap_common/eap_eke_common.h head/contrib/wpa/src/eap_peer/eap_eke.c - copied unchanged from r281682, vendor/wpa/dist/src/eap_peer/eap_eke.c head/contrib/wpa/src/eap_peer/eap_proxy.h - copied unchanged from r281682, vendor/wpa/dist/src/eap_peer/eap_proxy.h head/contrib/wpa/src/eap_peer/eap_proxy_dummy.c - copied unchanged from r281682, vendor/wpa/dist/src/eap_peer/eap_proxy_dummy.c head/contrib/wpa/src/eap_server/eap_server_eke.c - copied unchanged from r281682, vendor/wpa/dist/src/eap_server/eap_server_eke.c head/contrib/wpa/src/pae/ - copied from r281682, vendor/wpa/dist/src/pae/ head/contrib/wpa/src/utils/bitfield.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/bitfield.c head/contrib/wpa/src/utils/bitfield.h - copied unchanged from r281682, vendor/wpa/dist/src/utils/bitfield.h head/contrib/wpa/src/utils/browser-android.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/browser-android.c head/contrib/wpa/src/utils/browser-system.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/browser-system.c head/contrib/wpa/src/utils/browser-wpadebug.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/browser-wpadebug.c head/contrib/wpa/src/utils/browser.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/browser.c head/contrib/wpa/src/utils/browser.h - copied unchanged from r281682, vendor/wpa/dist/src/utils/browser.h head/contrib/wpa/src/utils/http-utils.h - copied unchanged from r281682, vendor/wpa/dist/src/utils/http-utils.h head/contrib/wpa/src/utils/http_curl.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/http_curl.c head/contrib/wpa/src/utils/platform.h - copied unchanged from r281682, vendor/wpa/dist/src/utils/platform.h head/contrib/wpa/src/utils/utils_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/utils_module_tests.c head/contrib/wpa/src/utils/xml-utils.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/xml-utils.c head/contrib/wpa/src/utils/xml-utils.h - copied unchanged from r281682, vendor/wpa/dist/src/utils/xml-utils.h head/contrib/wpa/src/utils/xml_libxml2.c - copied unchanged from r281682, vendor/wpa/dist/src/utils/xml_libxml2.c head/contrib/wpa/src/wps/wps_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/src/wps/wps_module_tests.c head/contrib/wpa/wpa_supplicant/eap_proxy_dummy.mak - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/eap_proxy_dummy.mak head/contrib/wpa/wpa_supplicant/eap_proxy_dummy.mk - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/eap_proxy_dummy.mk head/contrib/wpa/wpa_supplicant/examples/p2p-nfc.py - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/examples/p2p-nfc.py head/contrib/wpa/wpa_supplicant/mesh.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh.c head/contrib/wpa/wpa_supplicant/mesh.h - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh.h head/contrib/wpa/wpa_supplicant/mesh_mpm.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh_mpm.c head/contrib/wpa/wpa_supplicant/mesh_mpm.h - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh_mpm.h head/contrib/wpa/wpa_supplicant/mesh_rsn.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh_rsn.c head/contrib/wpa/wpa_supplicant/mesh_rsn.h - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/mesh_rsn.h head/contrib/wpa/wpa_supplicant/wmm_ac.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/wmm_ac.c head/contrib/wpa/wpa_supplicant/wmm_ac.h - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/wmm_ac.h head/contrib/wpa/wpa_supplicant/wpas_kay.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/wpas_kay.c head/contrib/wpa/wpa_supplicant/wpas_kay.h - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/wpas_kay.h head/contrib/wpa/wpa_supplicant/wpas_module_tests.c - copied unchanged from r281682, vendor/wpa/dist/wpa_supplicant/wpas_module_tests.c Deleted: head/contrib/wpa/hostapd/dump_state.c head/contrib/wpa/hostapd/dump_state.h head/contrib/wpa/patches/openssl-0.9.8-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8d-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8e-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8g-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8h-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8i-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.8x-tls-extensions.patch head/contrib/wpa/patches/openssl-0.9.9-session-ticket.patch head/contrib/wpa/src/crypto/crypto_nss.c head/contrib/wpa/src/crypto/fips_prf_cryptoapi.c head/contrib/wpa/src/crypto/fips_prf_gnutls.c head/contrib/wpa/src/crypto/fips_prf_nss.c head/contrib/wpa/src/crypto/tls_nss.c head/contrib/wpa/src/utils/eloop_none.c Modified: head/contrib/wpa/COPYING head/contrib/wpa/README head/contrib/wpa/hostapd/ChangeLog head/contrib/wpa/hostapd/README head/contrib/wpa/hostapd/README-WPS head/contrib/wpa/hostapd/config_file.c head/contrib/wpa/hostapd/ctrl_iface.c head/contrib/wpa/hostapd/defconfig head/contrib/wpa/hostapd/eap_register.c head/contrib/wpa/hostapd/hlr_auc_gw.c head/contrib/wpa/hostapd/hostapd.8 head/contrib/wpa/hostapd/hostapd.conf head/contrib/wpa/hostapd/hostapd.eap_user head/contrib/wpa/hostapd/hostapd.eap_user_sqlite head/contrib/wpa/hostapd/hostapd_cli.c head/contrib/wpa/hostapd/main.c head/contrib/wpa/src/ap/accounting.c head/contrib/wpa/src/ap/ap_config.c head/contrib/wpa/src/ap/ap_config.h head/contrib/wpa/src/ap/ap_drv_ops.c head/contrib/wpa/src/ap/ap_drv_ops.h head/contrib/wpa/src/ap/ap_list.c head/contrib/wpa/src/ap/ap_list.h head/contrib/wpa/src/ap/ap_mlme.c head/contrib/wpa/src/ap/authsrv.c head/contrib/wpa/src/ap/beacon.c head/contrib/wpa/src/ap/beacon.h head/contrib/wpa/src/ap/ctrl_iface_ap.c head/contrib/wpa/src/ap/ctrl_iface_ap.h head/contrib/wpa/src/ap/drv_callbacks.c head/contrib/wpa/src/ap/eap_user_db.c head/contrib/wpa/src/ap/gas_serv.c head/contrib/wpa/src/ap/gas_serv.h head/contrib/wpa/src/ap/hostapd.c head/contrib/wpa/src/ap/hostapd.h head/contrib/wpa/src/ap/hs20.c head/contrib/wpa/src/ap/hs20.h head/contrib/wpa/src/ap/hw_features.c head/contrib/wpa/src/ap/hw_features.h head/contrib/wpa/src/ap/iapp.c head/contrib/wpa/src/ap/ieee802_11.c head/contrib/wpa/src/ap/ieee802_11.h head/contrib/wpa/src/ap/ieee802_11_auth.c head/contrib/wpa/src/ap/ieee802_11_ht.c head/contrib/wpa/src/ap/ieee802_11_shared.c head/contrib/wpa/src/ap/ieee802_11_vht.c head/contrib/wpa/src/ap/ieee802_1x.c head/contrib/wpa/src/ap/ieee802_1x.h head/contrib/wpa/src/ap/p2p_hostapd.c head/contrib/wpa/src/ap/peerkey_auth.c head/contrib/wpa/src/ap/pmksa_cache_auth.c head/contrib/wpa/src/ap/pmksa_cache_auth.h head/contrib/wpa/src/ap/sta_info.c head/contrib/wpa/src/ap/sta_info.h head/contrib/wpa/src/ap/tkip_countermeasures.c head/contrib/wpa/src/ap/vlan_init.c head/contrib/wpa/src/ap/vlan_init.h head/contrib/wpa/src/ap/wmm.c head/contrib/wpa/src/ap/wmm.h head/contrib/wpa/src/ap/wnm_ap.c head/contrib/wpa/src/ap/wnm_ap.h head/contrib/wpa/src/ap/wpa_auth.c head/contrib/wpa/src/ap/wpa_auth.h head/contrib/wpa/src/ap/wpa_auth_ft.c head/contrib/wpa/src/ap/wpa_auth_glue.c head/contrib/wpa/src/ap/wpa_auth_i.h head/contrib/wpa/src/ap/wpa_auth_ie.c head/contrib/wpa/src/ap/wpa_auth_ie.h head/contrib/wpa/src/ap/wps_hostapd.c head/contrib/wpa/src/ap/wps_hostapd.h head/contrib/wpa/src/common/defs.h head/contrib/wpa/src/common/eapol_common.h head/contrib/wpa/src/common/ieee802_11_common.c head/contrib/wpa/src/common/ieee802_11_common.h head/contrib/wpa/src/common/ieee802_11_defs.h head/contrib/wpa/src/common/privsep_commands.h head/contrib/wpa/src/common/version.h head/contrib/wpa/src/common/wpa_common.c head/contrib/wpa/src/common/wpa_common.h head/contrib/wpa/src/common/wpa_ctrl.c head/contrib/wpa/src/common/wpa_ctrl.h head/contrib/wpa/src/crypto/aes-ccm.c head/contrib/wpa/src/crypto/aes-eax.c head/contrib/wpa/src/crypto/aes-gcm.c head/contrib/wpa/src/crypto/aes-omac1.c head/contrib/wpa/src/crypto/aes-unwrap.c head/contrib/wpa/src/crypto/aes-wrap.c head/contrib/wpa/src/crypto/aes_wrap.h head/contrib/wpa/src/crypto/crypto.h head/contrib/wpa/src/crypto/crypto_internal-rsa.c head/contrib/wpa/src/crypto/crypto_openssl.c head/contrib/wpa/src/crypto/dh_groups.c head/contrib/wpa/src/crypto/dh_groups.h head/contrib/wpa/src/crypto/md5.c head/contrib/wpa/src/crypto/milenage.c head/contrib/wpa/src/crypto/ms_funcs.c head/contrib/wpa/src/crypto/random.c head/contrib/wpa/src/crypto/sha1-internal.c head/contrib/wpa/src/crypto/sha1-prf.c head/contrib/wpa/src/crypto/sha1.c head/contrib/wpa/src/crypto/sha256-prf.c head/contrib/wpa/src/crypto/sha256.h head/contrib/wpa/src/crypto/tls.h head/contrib/wpa/src/crypto/tls_gnutls.c head/contrib/wpa/src/crypto/tls_internal.c head/contrib/wpa/src/crypto/tls_none.c head/contrib/wpa/src/crypto/tls_openssl.c head/contrib/wpa/src/crypto/tls_schannel.c head/contrib/wpa/src/drivers/driver.h head/contrib/wpa/src/drivers/driver_bsd.c head/contrib/wpa/src/drivers/driver_common.c head/contrib/wpa/src/drivers/driver_ndis.c head/contrib/wpa/src/drivers/driver_privsep.c head/contrib/wpa/src/drivers/driver_wired.c head/contrib/wpa/src/drivers/drivers.c head/contrib/wpa/src/eap_common/eap_common.c head/contrib/wpa/src/eap_common/eap_common.h head/contrib/wpa/src/eap_common/eap_defs.h head/contrib/wpa/src/eap_common/eap_fast_common.c head/contrib/wpa/src/eap_common/eap_fast_common.h head/contrib/wpa/src/eap_common/eap_gpsk_common.c head/contrib/wpa/src/eap_common/eap_gpsk_common.h head/contrib/wpa/src/eap_common/eap_ikev2_common.c head/contrib/wpa/src/eap_common/eap_ikev2_common.h head/contrib/wpa/src/eap_common/eap_pax_common.c head/contrib/wpa/src/eap_common/eap_pax_common.h head/contrib/wpa/src/eap_common/eap_pwd_common.c head/contrib/wpa/src/eap_common/eap_pwd_common.h head/contrib/wpa/src/eap_common/eap_sim_common.c head/contrib/wpa/src/eap_common/eap_sim_common.h head/contrib/wpa/src/eap_common/ikev2_common.c head/contrib/wpa/src/eap_common/ikev2_common.h head/contrib/wpa/src/eap_peer/eap.c head/contrib/wpa/src/eap_peer/eap.h head/contrib/wpa/src/eap_peer/eap_aka.c head/contrib/wpa/src/eap_peer/eap_config.h head/contrib/wpa/src/eap_peer/eap_fast.c head/contrib/wpa/src/eap_peer/eap_fast_pac.c head/contrib/wpa/src/eap_peer/eap_gpsk.c head/contrib/wpa/src/eap_peer/eap_i.h head/contrib/wpa/src/eap_peer/eap_ikev2.c head/contrib/wpa/src/eap_peer/eap_leap.c head/contrib/wpa/src/eap_peer/eap_methods.c head/contrib/wpa/src/eap_peer/eap_methods.h head/contrib/wpa/src/eap_peer/eap_mschapv2.c head/contrib/wpa/src/eap_peer/eap_pax.c head/contrib/wpa/src/eap_peer/eap_peap.c head/contrib/wpa/src/eap_peer/eap_psk.c head/contrib/wpa/src/eap_peer/eap_pwd.c head/contrib/wpa/src/eap_peer/eap_sake.c head/contrib/wpa/src/eap_peer/eap_sim.c head/contrib/wpa/src/eap_peer/eap_tls.c head/contrib/wpa/src/eap_peer/eap_tls_common.c head/contrib/wpa/src/eap_peer/eap_tls_common.h head/contrib/wpa/src/eap_peer/eap_tnc.c head/contrib/wpa/src/eap_peer/eap_ttls.c head/contrib/wpa/src/eap_peer/eap_vendor_test.c head/contrib/wpa/src/eap_peer/eap_wsc.c head/contrib/wpa/src/eap_peer/ikev2.c head/contrib/wpa/src/eap_peer/mschapv2.c head/contrib/wpa/src/eap_peer/tncc.c head/contrib/wpa/src/eap_server/eap.h head/contrib/wpa/src/eap_server/eap_i.h head/contrib/wpa/src/eap_server/eap_methods.h head/contrib/wpa/src/eap_server/eap_server.c head/contrib/wpa/src/eap_server/eap_server_aka.c head/contrib/wpa/src/eap_server/eap_server_fast.c head/contrib/wpa/src/eap_server/eap_server_gpsk.c head/contrib/wpa/src/eap_server/eap_server_gtc.c head/contrib/wpa/src/eap_server/eap_server_identity.c head/contrib/wpa/src/eap_server/eap_server_ikev2.c head/contrib/wpa/src/eap_server/eap_server_md5.c head/contrib/wpa/src/eap_server/eap_server_methods.c head/contrib/wpa/src/eap_server/eap_server_mschapv2.c head/contrib/wpa/src/eap_server/eap_server_pax.c head/contrib/wpa/src/eap_server/eap_server_peap.c head/contrib/wpa/src/eap_server/eap_server_psk.c head/contrib/wpa/src/eap_server/eap_server_pwd.c head/contrib/wpa/src/eap_server/eap_server_sake.c head/contrib/wpa/src/eap_server/eap_server_sim.c head/contrib/wpa/src/eap_server/eap_server_tls.c head/contrib/wpa/src/eap_server/eap_server_tls_common.c head/contrib/wpa/src/eap_server/eap_server_tnc.c head/contrib/wpa/src/eap_server/eap_server_ttls.c head/contrib/wpa/src/eap_server/eap_server_wsc.c head/contrib/wpa/src/eap_server/eap_sim_db.c head/contrib/wpa/src/eap_server/eap_tls_common.h head/contrib/wpa/src/eap_server/ikev2.c head/contrib/wpa/src/eap_server/tncs.c head/contrib/wpa/src/eapol_auth/eapol_auth_dump.c head/contrib/wpa/src/eapol_auth/eapol_auth_sm.c head/contrib/wpa/src/eapol_auth/eapol_auth_sm.h head/contrib/wpa/src/eapol_auth/eapol_auth_sm_i.h head/contrib/wpa/src/eapol_supp/eapol_supp_sm.c head/contrib/wpa/src/eapol_supp/eapol_supp_sm.h head/contrib/wpa/src/l2_packet/l2_packet.h head/contrib/wpa/src/l2_packet/l2_packet_freebsd.c head/contrib/wpa/src/l2_packet/l2_packet_ndis.c head/contrib/wpa/src/l2_packet/l2_packet_none.c head/contrib/wpa/src/l2_packet/l2_packet_privsep.c head/contrib/wpa/src/p2p/p2p.c head/contrib/wpa/src/p2p/p2p.h head/contrib/wpa/src/p2p/p2p_build.c head/contrib/wpa/src/p2p/p2p_dev_disc.c head/contrib/wpa/src/p2p/p2p_go_neg.c head/contrib/wpa/src/p2p/p2p_group.c head/contrib/wpa/src/p2p/p2p_i.h head/contrib/wpa/src/p2p/p2p_invitation.c head/contrib/wpa/src/p2p/p2p_parse.c head/contrib/wpa/src/p2p/p2p_pd.c head/contrib/wpa/src/p2p/p2p_sd.c head/contrib/wpa/src/p2p/p2p_utils.c head/contrib/wpa/src/radius/radius.c head/contrib/wpa/src/radius/radius.h head/contrib/wpa/src/radius/radius_client.c head/contrib/wpa/src/radius/radius_das.c head/contrib/wpa/src/radius/radius_das.h head/contrib/wpa/src/radius/radius_server.c head/contrib/wpa/src/radius/radius_server.h head/contrib/wpa/src/rsn_supp/peerkey.c head/contrib/wpa/src/rsn_supp/peerkey.h head/contrib/wpa/src/rsn_supp/pmksa_cache.c head/contrib/wpa/src/rsn_supp/pmksa_cache.h head/contrib/wpa/src/rsn_supp/preauth.c head/contrib/wpa/src/rsn_supp/preauth.h head/contrib/wpa/src/rsn_supp/tdls.c head/contrib/wpa/src/rsn_supp/wpa.c head/contrib/wpa/src/rsn_supp/wpa.h head/contrib/wpa/src/rsn_supp/wpa_ft.c head/contrib/wpa/src/rsn_supp/wpa_i.h head/contrib/wpa/src/rsn_supp/wpa_ie.c head/contrib/wpa/src/rsn_supp/wpa_ie.h head/contrib/wpa/src/tls/asn1.c head/contrib/wpa/src/tls/asn1.h head/contrib/wpa/src/tls/libtommath.c head/contrib/wpa/src/tls/pkcs1.c head/contrib/wpa/src/tls/pkcs1.h head/contrib/wpa/src/tls/rsa.c head/contrib/wpa/src/tls/rsa.h head/contrib/wpa/src/tls/tlsv1_client.c head/contrib/wpa/src/tls/tlsv1_client_read.c head/contrib/wpa/src/tls/tlsv1_client_write.c head/contrib/wpa/src/tls/tlsv1_common.c head/contrib/wpa/src/tls/tlsv1_common.h head/contrib/wpa/src/tls/tlsv1_record.c head/contrib/wpa/src/tls/tlsv1_server.c head/contrib/wpa/src/tls/tlsv1_server.h head/contrib/wpa/src/tls/tlsv1_server_i.h head/contrib/wpa/src/tls/tlsv1_server_read.c head/contrib/wpa/src/tls/tlsv1_server_write.c head/contrib/wpa/src/tls/x509v3.c head/contrib/wpa/src/utils/base64.c head/contrib/wpa/src/utils/build_config.h head/contrib/wpa/src/utils/common.c head/contrib/wpa/src/utils/common.h head/contrib/wpa/src/utils/edit.c head/contrib/wpa/src/utils/edit_readline.c head/contrib/wpa/src/utils/edit_simple.c head/contrib/wpa/src/utils/eloop.c head/contrib/wpa/src/utils/eloop.h head/contrib/wpa/src/utils/eloop_win.c head/contrib/wpa/src/utils/ext_password_test.c head/contrib/wpa/src/utils/ip_addr.c head/contrib/wpa/src/utils/ip_addr.h head/contrib/wpa/src/utils/list.h head/contrib/wpa/src/utils/os.h head/contrib/wpa/src/utils/os_internal.c head/contrib/wpa/src/utils/os_none.c head/contrib/wpa/src/utils/os_unix.c head/contrib/wpa/src/utils/os_win32.c head/contrib/wpa/src/utils/pcsc_funcs.c head/contrib/wpa/src/utils/pcsc_funcs.h head/contrib/wpa/src/utils/radiotap.c head/contrib/wpa/src/utils/radiotap.h head/contrib/wpa/src/utils/radiotap_iter.h head/contrib/wpa/src/utils/trace.c head/contrib/wpa/src/utils/trace.h head/contrib/wpa/src/utils/uuid.c head/contrib/wpa/src/utils/wpa_debug.c head/contrib/wpa/src/utils/wpa_debug.h head/contrib/wpa/src/utils/wpabuf.c head/contrib/wpa/src/utils/wpabuf.h head/contrib/wpa/src/wps/http_client.c head/contrib/wpa/src/wps/http_server.c head/contrib/wpa/src/wps/httpread.c head/contrib/wpa/src/wps/ndef.c head/contrib/wpa/src/wps/wps.c head/contrib/wpa/src/wps/wps.h head/contrib/wpa/src/wps/wps_attr_build.c head/contrib/wpa/src/wps/wps_attr_parse.c head/contrib/wpa/src/wps/wps_attr_parse.h head/contrib/wpa/src/wps/wps_attr_process.c head/contrib/wpa/src/wps/wps_common.c head/contrib/wpa/src/wps/wps_defs.h head/contrib/wpa/src/wps/wps_dev_attr.c head/contrib/wpa/src/wps/wps_dev_attr.h head/contrib/wpa/src/wps/wps_enrollee.c head/contrib/wpa/src/wps/wps_er.c head/contrib/wpa/src/wps/wps_er.h head/contrib/wpa/src/wps/wps_er_ssdp.c head/contrib/wpa/src/wps/wps_i.h head/contrib/wpa/src/wps/wps_registrar.c head/contrib/wpa/src/wps/wps_upnp.c head/contrib/wpa/src/wps/wps_upnp_ap.c head/contrib/wpa/src/wps/wps_upnp_i.h head/contrib/wpa/src/wps/wps_upnp_ssdp.c head/contrib/wpa/src/wps/wps_upnp_web.c head/contrib/wpa/src/wps/wps_validate.c head/contrib/wpa/wpa_supplicant/ChangeLog head/contrib/wpa/wpa_supplicant/README head/contrib/wpa/wpa_supplicant/README-HS20 head/contrib/wpa/wpa_supplicant/README-P2P head/contrib/wpa/wpa_supplicant/README-WPS head/contrib/wpa/wpa_supplicant/ap.c head/contrib/wpa/wpa_supplicant/ap.h head/contrib/wpa/wpa_supplicant/bgscan.c head/contrib/wpa/wpa_supplicant/bgscan.h head/contrib/wpa/wpa_supplicant/bgscan_learn.c head/contrib/wpa/wpa_supplicant/bgscan_simple.c head/contrib/wpa/wpa_supplicant/bss.c head/contrib/wpa/wpa_supplicant/bss.h head/contrib/wpa/wpa_supplicant/config.c head/contrib/wpa/wpa_supplicant/config.h head/contrib/wpa/wpa_supplicant/config_file.c head/contrib/wpa/wpa_supplicant/config_none.c head/contrib/wpa/wpa_supplicant/config_ssid.h head/contrib/wpa/wpa_supplicant/ctrl_iface.c head/contrib/wpa/wpa_supplicant/ctrl_iface.h head/contrib/wpa/wpa_supplicant/ctrl_iface_named_pipe.c head/contrib/wpa/wpa_supplicant/ctrl_iface_udp.c head/contrib/wpa/wpa_supplicant/ctrl_iface_unix.c head/contrib/wpa/wpa_supplicant/dbus/Makefile head/contrib/wpa/wpa_supplicant/dbus/dbus_common.c head/contrib/wpa/wpa_supplicant/dbus/dbus_dict_helpers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_dict_helpers.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_wps.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_introspect.c head/contrib/wpa/wpa_supplicant/dbus/dbus_old.c head/contrib/wpa/wpa_supplicant/dbus/dbus_old.h head/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers.h head/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers_wps.c head/contrib/wpa/wpa_supplicant/defconfig head/contrib/wpa/wpa_supplicant/driver_i.h head/contrib/wpa/wpa_supplicant/eap_register.c head/contrib/wpa/wpa_supplicant/eapol_test.c head/contrib/wpa/wpa_supplicant/events.c head/contrib/wpa/wpa_supplicant/examples/p2p-action.sh head/contrib/wpa/wpa_supplicant/examples/wps-ap-cli head/contrib/wpa/wpa_supplicant/examples/wps-nfc.py head/contrib/wpa/wpa_supplicant/gas_query.c head/contrib/wpa/wpa_supplicant/gas_query.h head/contrib/wpa/wpa_supplicant/hs20_supplicant.c head/contrib/wpa/wpa_supplicant/hs20_supplicant.h head/contrib/wpa/wpa_supplicant/ibss_rsn.c head/contrib/wpa/wpa_supplicant/ibss_rsn.h head/contrib/wpa/wpa_supplicant/interworking.c head/contrib/wpa/wpa_supplicant/interworking.h head/contrib/wpa/wpa_supplicant/main.c head/contrib/wpa/wpa_supplicant/main_none.c head/contrib/wpa/wpa_supplicant/notify.c head/contrib/wpa/wpa_supplicant/notify.h head/contrib/wpa/wpa_supplicant/offchannel.c head/contrib/wpa/wpa_supplicant/p2p_supplicant.c head/contrib/wpa/wpa_supplicant/p2p_supplicant.h head/contrib/wpa/wpa_supplicant/preauth_test.c head/contrib/wpa/wpa_supplicant/scan.c head/contrib/wpa/wpa_supplicant/scan.h head/contrib/wpa/wpa_supplicant/sme.c head/contrib/wpa/wpa_supplicant/sme.h head/contrib/wpa/wpa_supplicant/tests/test_wpa.c head/contrib/wpa/wpa_supplicant/todo.txt head/contrib/wpa/wpa_supplicant/wifi_display.c head/contrib/wpa/wpa_supplicant/wifi_display.h head/contrib/wpa/wpa_supplicant/wnm_sta.c head/contrib/wpa/wpa_supplicant/wnm_sta.h head/contrib/wpa/wpa_supplicant/wpa_cli.c head/contrib/wpa/wpa_supplicant/wpa_priv.c head/contrib/wpa/wpa_supplicant/wpa_supplicant.c head/contrib/wpa/wpa_supplicant/wpa_supplicant.conf head/contrib/wpa/wpa_supplicant/wpa_supplicant_i.h head/contrib/wpa/wpa_supplicant/wpa_supplicant_template.conf head/contrib/wpa/wpa_supplicant/wpas_glue.c head/contrib/wpa/wpa_supplicant/wps_supplicant.c head/contrib/wpa/wpa_supplicant/wps_supplicant.h head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/wpa_passphrase/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile Directory Properties: head/contrib/wpa/ (props changed) Copied: head/contrib/wpa/CONTRIBUTIONS (from r281682, vendor/wpa/dist/CONTRIBUTIONS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/wpa/CONTRIBUTIONS Tue Apr 21 01:45:11 2015 (r281806, copy of r281682, vendor/wpa/dist/CONTRIBUTIONS) @@ -0,0 +1,143 @@ +Contributions to hostap.git +--------------------------- + +This software is distributed under a permissive open source license to +allow it to be used in any projects, whether open source or proprietary. +Contributions to the project are welcome and it is important to maintain +clear record of contributions and terms under which they are licensed. +To help with this, following procedure is used to allow acceptance and +recording of the terms. + +All contributions are expected to be licensed under the modified BSD +license (see below). Acknowledgment of the terms is tracked through +inclusion of Signed-off-by tag in the contributions at the end of the +commit log message. This tag indicates that the contributor agrees with +the Developer Certificate of Origin (DCO) version 1.1 terms (see below; +also available from http://developercertificate.org/). + + +The current requirements for contributions to hostap.git +-------------------------------------------------------- + +To indicate your acceptance of Developer's Certificate of Origin 1.1 +terms, please add the following line to the end of the commit message +for each contribution you make to the project: + +Signed-off-by: Your Name + +using your real name. Pseudonyms or anonymous contributions cannot +unfortunately be accepted. + + +History of license and contributions terms +------------------------------------------ + +Until February 11, 2012, in case of most files in hostap.git, "under the +open source license indicated in the file" means that the contribution +is licensed both under GPL v2 and modified BSD license (see below) and +the choice between these licenses is given to anyone who redistributes +or uses the software. As such, the contribution has to be licensed under +both options to allow this choice. + +As of February 11, 2012, the project has chosen to use only the BSD +license option for future distribution. As such, the GPL v2 license +option is no longer used and the contributions are not required to be +licensed until GPL v2. In case of most files in hostap.git, "under the +open source license indicated in the file" means that the contribution +is licensed under the modified BSD license (see below). + +Until February 13, 2014, the project used an extended version of the DCO +that included the identical items (a) through (d) from DCO 1.1 and an +additional item (e): + +(e) The contribution can be licensed under the modified BSD license + as shown below even in case of files that are currently licensed + under other terms. + +This was used during the period when some of the files included the old +license terms. Acceptance of this extended DCO version was indicated +with a Signed-hostap tag in the commit message. This additional item (e) +was used to collect explicit approval to license the contribution with +only the modified BSD license (see below), i.e., without the GPL v2 +option. This was done to allow simpler licensing terms to be used in the +future. It should be noted that the modified BSD license is compatible +with GNU GPL and as such, this possible move to simpler licensing option +does not prevent use of this software in GPL projects. + + +===[ start quote from http://developercertificate.org/ ]======================= + +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +===[ end quote from http://developercertificate.org/ ]========================= + + +The license terms used for hostap.git files +------------------------------------------- + +Modified BSD license (no advertisement clause): + +Copyright (c) 2002-2015, Jouni Malinen and contributors +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name(s) of the above-listed copyright holder(s) 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. Modified: head/contrib/wpa/COPYING ============================================================================== --- head/contrib/wpa/COPYING Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/COPYING Tue Apr 21 01:45:11 2015 (r281806) @@ -1,7 +1,7 @@ wpa_supplicant and hostapd -------------------------- -Copyright (c) 2002-2012, Jouni Malinen and contributors +Copyright (c) 2002-2015, Jouni Malinen and contributors All Rights Reserved. Modified: head/contrib/wpa/README ============================================================================== --- head/contrib/wpa/README Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/README Tue Apr 21 01:45:11 2015 (r281806) @@ -1,7 +1,7 @@ wpa_supplicant and hostapd -------------------------- -Copyright (c) 2002-2012, Jouni Malinen and contributors +Copyright (c) 2002-2015, Jouni Malinen and contributors All Rights Reserved. These programs are licensed under the BSD license (the one with Modified: head/contrib/wpa/hostapd/ChangeLog ============================================================================== --- head/contrib/wpa/hostapd/ChangeLog Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/hostapd/ChangeLog Tue Apr 21 01:45:11 2015 (r281806) @@ -1,5 +1,191 @@ ChangeLog for hostapd +2015-03-15 - v2.4 + * allow OpenSSL cipher configuration to be set for internal EAP server + (openssl_ciphers parameter) + * fixed number of small issues based on hwsim test case failures and + static analyzer reports + * fixed Accounting-Request to not include duplicated Acct-Session-Id + * add support for Acct-Multi-Session-Id in RADIUS Accounting messages + * add support for PMKSA caching with SAE + * add support for generating BSS Load element (bss_load_update_period) + * fixed channel switch from VHT to HT + * add INTERFACE-ENABLED and INTERFACE-DISABLED ctrl_iface events + * add support for learning STA IPv4/IPv6 addresses and configuring + ProxyARP support + * dropped support for the madwifi driver interface + * add support for Suite B (128-bit and 192-bit level) key management and + cipher suites + * fixed a regression with driver=wired + * extend EAPOL-Key msg 1/4 retry workaround for changing SNonce + * add BSS_TM_REQ ctrl_iface command to send BSS Transition Management + Request frames and BSS-TM-RESP event to indicate response to such + frame + * add support for EAP Re-Authentication Protocol (ERP) + * fixed AP IE in EAPOL-Key 3/4 when both WPA and FT was enabled + * fixed a regression in HT 20/40 coex Action frame parsing + * set stdout to be line-buffered + * add support for vendor specific VHT extension to enable 256 QAM rates + (VHT-MCS 8 and 9) on 2.4 GHz band + * RADIUS DAS: + - extend Disconnect-Request processing to allow matching of multiple + sessions + - support Acct-Multi-Session-Id as an identifier + - allow PMKSA cache entry to be removed without association + * expire hostapd STA entry if kernel does not have a matching entry + * allow chanlist to be used to specify a subset of channels for ACS + * improve ACS behavior on 2.4 GHz band and allow channel bias to be + configured with acs_chan_bias parameter + * do not reply to a Probe Request frame that includes DSS Parameter Set + element in which the channel does not match the current operating + channel + * add UPDATE_BEACON ctrl_iface command; this can be used to force Beacon + frame contents to be updated and to start beaconing on an interface + that used start_disabled=1 + * fixed some RADIUS server failover cases + +2014-10-09 - v2.3 + * fixed number of minor issues identified in static analyzer warnings + * fixed DFS and channel switch operation for multi-BSS cases + * started to use constant time comparison for various password and hash + values to reduce possibility of any externally measurable timing + differences + * extended explicit clearing of freed memory and expired keys to avoid + keeping private data in memory longer than necessary + * added support for number of new RADIUS attributes from RFC 7268 + (Mobility-Domain-Id, WLAN-HESSID, WLAN-Pairwise-Cipher, + WLAN-Group-Cipher, WLAN-AKM-Suite, WLAN-Group-Mgmt-Pairwise-Cipher) + * fixed GET_CONFIG wpa_pairwise_cipher value + * added code to clear bridge FDB entry on station disconnection + * fixed PMKSA cache timeout from Session-Timeout for WPA/WPA2 cases + * fixed OKC PMKSA cache entry fetch to avoid a possible infinite loop + in case the first entry does not match + * fixed hostapd_cli action script execution to use more robust mechanism + (CVE-2014-3686) + +2014-06-04 - v2.2 + * fixed SAE confirm-before-commit validation to avoid a potential + segmentation fault in an unexpected message sequence that could be + triggered remotely + * extended VHT support + - Operating Mode Notification + - Power Constraint element (local_pwr_constraint) + - Spectrum management capability (spectrum_mgmt_required=1) + - fix VHT80 segment picking in ACS + - fix vht_capab 'Maximum A-MPDU Length Exponent' handling + - fix VHT20 + * fixed HT40 co-ex scan for some pri/sec channel switches + * extended HT40 co-ex support to allow dynamic channel width changes + during the lifetime of the BSS + * fixed HT40 co-ex support to check for overlapping 20 MHz BSS + * fixed MSCHAP UTF-8 to UCS-2 conversion for three-byte encoding; + this fixes password with include UTF-8 characters that use + three-byte encoding EAP methods that use NtPasswordHash + * reverted TLS certificate validation step change in v2.1 that rejected + any AAA server certificate with id-kp-clientAuth even if + id-kp-serverAuth EKU was included + * fixed STA validation step for WPS ER commands to prevent a potential + crash if an ER sends an unexpected PutWLANResponse to a station that + is disassociated, but not fully removed + * enforce full EAP authentication after RADIUS Disconnect-Request by + removing the PMKSA cache entry + * added support for NAS-IP-Address, NAS-identifier, and NAS-IPv6-Address + in RADIUS Disconnect-Request + * added mechanism for removing addresses for MAC ACLs by prefixing an + entry with "-" + * Interworking/Hotspot 2.0 enhancements + - support Hotspot 2.0 Release 2 + * OSEN network for online signup connection + * subscription remediation (based on RADIUS server request or + control interface HS20_WNM_NOTIF for testing purposes) + * Hotspot 2.0 release number indication in WFA RADIUS VSA + * deauthentication request (based on RADIUS server request or + control interface WNM_DEAUTH_REQ for testing purposes) + * Session Info URL RADIUS AVP to trigger ESS Disassociation Imminent + * hs20_icon config parameter to configure icon files for OSU + * osu_* config parameters for OSU Providers list + - do not use Interworking filtering rules on Probe Request if + Interworking is disabled to avoid interop issues + * added/fixed nl80211 functionality + - AP interface teardown optimization + - support vendor specific driver command + (VENDOR []) + * fixed PMF protection of Deauthentication frame when this is triggered + by session timeout + * internal TLS implementation enhancements/fixes + - add SHA256-based cipher suites + - add DHE-RSA cipher suites + - fix X.509 validation of PKCS#1 signature to check for extra data + * RADIUS server functionality + - add minimal RADIUS accounting server support (hostapd-as-server); + this is mainly to enable testing coverage with hwsim scripts + - allow authentication log to be written into SQLite databse + - added option for TLS protocol testing of an EAP peer by simulating + various misbehaviors/known attacks + - MAC ACL support for testing purposes + * fixed PTK derivation for CCMP-256 and GCMP-256 + * extended WPS per-station PSK to support ER case + * added option to configure the management group cipher + (group_mgmt_cipher=AES-128-CMAC (default), BIP-GMAC-128, BIP-GMAC-256, + BIP-CMAC-256) + * fixed AP mode default TXOP Limit values for AC_VI and AC_VO (these + were rounded incorrectly) + * added support for postponing FT response in case PMK-R1 needs to be + pulled from R0KH + * added option to advertise 40 MHz intolerant HT capability with + ht_capab=[40-INTOLERANT] + * remove WPS 1.0 only support, i.e., WSC 2.0 support is now enabled + whenever CONFIG_WPS=y is set + * EAP-pwd fixes + - fix possible segmentation fault on EAP method deinit if an invalid + group is negotiated + * fixed RADIUS client retransmit/failover behavior + - there was a potential ctash due to freed memory being accessed + - failover to a backup server mechanism did not work properly + * fixed a possible crash on double DISABLE command when multiple BSSes + are enabled + * fixed a memory leak in SAE random number generation + * fixed GTK rekeying when the station uses FT protocol + * fixed off-by-one bounds checking in printf_encode() + - this could result in deinial of service in some EAP server cases + * various bug fixes + +2014-02-04 - v2.1 + * added support for simultaneous authentication of equals (SAE) for + stronger password-based authentication with WPA2-Personal + * added nl80211 functionality + - VHT configuration for nl80211 + - support split wiphy dump + - driver-based MAC ACL + - QoS Mapping configuration + * added fully automated regression testing with mac80211_hwsim + * allow ctrl_iface group to be specified on command line (-G) + * allow single hostapd process to control independent WPS interfaces + (wps_independent=1) instead of synchronized operations through all + configured interfaces within a process + * avoid processing received management frames multiple times when using + nl80211 with multiple BSSes + * added support for DFS (processing radar detection events, CAC, channel + re-selection) + * added EAP-EKE server + * added automatic channel selection (ACS) + * added option for using per-BSS (vif) configuration files with + -b: + * extended global control interface ADD/REMOVE commands to allow BSSes + of a radio to be removed individually without having to add/remove all + other BSSes of the radio at the same time + * added support for sending debug info to Linux tracing (-T on command + line) + * replace dump_file functionality with same information being available + through the hostapd control interface + * added support for using Protected Dual of Public Action frames for + GAS/ANQP exchanges when PMF is enabled + * added support for WPS+NFC updates + - improved protocol + - option to fetch and report alternative carrier records for external + NFC operations + * various bug fixes + 2013-01-12 - v2.0 * added AP-STA-DISCONNECTED ctrl_iface event * improved debug logging (human readable event names, interface name Modified: head/contrib/wpa/hostapd/README ============================================================================== --- head/contrib/wpa/hostapd/README Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/hostapd/README Tue Apr 21 01:45:11 2015 (r281806) @@ -2,7 +2,7 @@ hostapd - user space IEEE 802.11 AP and Authenticator and RADIUS authentication server ================================================================ -Copyright (c) 2002-2012, Jouni Malinen and contributors +Copyright (c) 2002-2015, Jouni Malinen and contributors All Rights Reserved. This program is licensed under the BSD license (the one with @@ -74,12 +74,6 @@ Current hardware/software requirements: Please note that station firmware version needs to be 1.7.0 or newer to work in WPA mode. - madwifi driver for cards based on Atheros chip set (ar521x) - (http://sourceforge.net/projects/madwifi/) - Please note that you will need to add the correct path for - madwifi driver root directory in .config (see defconfig file for - an example: CFLAGS += -I) - mac80211-based drivers that support AP mode (with driver=nl80211). This includes drivers for Atheros (ath9k) and Broadcom (b43) chipsets. Modified: head/contrib/wpa/hostapd/README-WPS ============================================================================== --- head/contrib/wpa/hostapd/README-WPS Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/hostapd/README-WPS Tue Apr 21 01:45:11 2015 (r281806) @@ -58,12 +58,10 @@ hostapd configuration WPS is an optional component that needs to be enabled in hostapd build configuration (.config). Here is an example configuration that -includes WPS support and uses madwifi driver interface: +includes WPS support and uses nl80211 driver interface: -CONFIG_DRIVER_MADWIFI=y -CFLAGS += -I/usr/src/madwifi-0.9.3 +CONFIG_DRIVER_NL80211=y CONFIG_WPS=y -CONFIG_WPS2=y CONFIG_WPS_UPNP=y Following parameter can be used to enable support for NFC config method: @@ -75,8 +73,8 @@ Following section shows an example runti (hostapd.conf) that enables WPS: # Configure the driver and network interface -driver=madwifi -interface=ath0 +driver=nl80211 +interface=wlan0 # WPA2-Personal configuration for the AP ssid=wps-test @@ -338,3 +336,17 @@ If the NFC tag contains a password token internal Registrar. This allows station Enrollee from which the password token was received to run through WPS protocol to provision the credential. + +"nfc_get_handover_sel " command can be used to build the +contents of a Handover Select Message for connection handover when this +does not depend on the contents of the Handover Request Message. The +first argument selects the format of the output data and the second +argument selects which type of connection handover is requested (WPS = +Wi-Fi handover as specified in WSC 2.0). + +"nfc_report_handover WPS +" is used to report completed NFC +connection handover. The first parameter indicates whether the local +device initiated or responded to the connection handover and the carrier +records are the selected carrier from the handover request and select +messages as a hexdump. Modified: head/contrib/wpa/hostapd/config_file.c ============================================================================== --- head/contrib/wpa/hostapd/config_file.c Tue Apr 21 01:37:14 2015 (r281805) +++ head/contrib/wpa/hostapd/config_file.c Tue Apr 21 01:45:11 2015 (r281806) @@ -1,6 +1,6 @@ /* * hostapd / Configuration file parser - * Copyright (c) 2003-2012, Jouni Malinen + * Copyright (c) 2003-2015, Jouni Malinen * * This software may be distributed under the terms of the BSD license. * See README for more details. @@ -22,7 +22,12 @@ #include "config_file.h" -extern struct wpa_driver_ops *wpa_drivers[]; +#ifndef CONFIG_NO_RADIUS +#ifdef EAP_SERVER +static struct hostapd_radius_attr * +hostapd_parse_radius_attr(const char *value); +#endif /* EAP_SERVER */ +#endif /* CONFIG_NO_RADIUS */ #ifndef CONFIG_NO_VLAN @@ -83,7 +88,7 @@ static int hostapd_config_read_vlan_file return -1; } - vlan = os_malloc(sizeof(*vlan)); + vlan = os_zalloc(sizeof(*vlan)); if (vlan == NULL) { wpa_printf(MSG_ERROR, "Out of memory while reading " "VLAN interfaces from '%s'", fname); @@ -91,14 +96,10 @@ static int hostapd_config_read_vlan_file return -1; } - os_memset(vlan, 0, sizeof(*vlan)); vlan->vlan_id = vlan_id; os_strlcpy(vlan->ifname, pos, sizeof(vlan->ifname)); - if (bss->vlan_tail) - bss->vlan_tail->next = vlan; - else - bss->vlan = vlan; - bss->vlan_tail = vlan; + vlan->next = bss->vlan; + bss->vlan = vlan; } fclose(f); @@ -136,6 +137,8 @@ static int hostapd_config_read_maclist(c } while (fgets(buf, sizeof(buf), f)) { + int i, rem = 0; + line++; if (buf[0] == '#') @@ -150,14 +153,32 @@ static int hostapd_config_read_maclist(c } if (buf[0] == '\0') continue; + pos = buf; + if (buf[0] == '-') { + rem = 1; + pos++; + } - if (hwaddr_aton(buf, addr)) { + if (hwaddr_aton(pos, addr)) { wpa_printf(MSG_ERROR, "Invalid MAC address '%s' at " - "line %d in '%s'", buf, line, fname); + "line %d in '%s'", pos, line, fname); fclose(f); return -1; } + if (rem) { + i = 0; + while (i < *num) { + if (os_memcmp((*acl)[i].addr, addr, ETH_ALEN) == + 0) { + os_remove_in_array(*acl, *num, + sizeof(**acl), i); + (*num)--; + } else + i++; + } + continue; + } vlan_id = 0; pos = buf; while (*pos != '\0' && *pos != ' ' && *pos != '\t') @@ -195,7 +216,7 @@ static int hostapd_config_read_eap_user( FILE *f; char buf[512], *pos, *start, *pos2; int line = 0, ret = 0, num_methods; - struct hostapd_eap_user *user, *tail = NULL; + struct hostapd_eap_user *user = NULL, *tail = NULL, *new_user = NULL; if (!fname) return 0; @@ -229,6 +250,28 @@ static int hostapd_config_read_eap_user( if (buf[0] == '\0') continue; +#ifndef CONFIG_NO_RADIUS + if (user && os_strncmp(buf, "radius_accept_attr=", 19) == 0) { + struct hostapd_radius_attr *attr, *a; + attr = hostapd_parse_radius_attr(buf + 19); + if (attr == NULL) { + wpa_printf(MSG_ERROR, "Invalid radius_auth_req_attr: %s", + buf + 19); + user = NULL; /* already in the BSS list */ + goto failed; + } + if (user->accept_attr == NULL) { + user->accept_attr = attr; + } else { + a = user->accept_attr; + while (a->next) + a = a->next; + a->next = attr; + } + continue; + } +#endif /* CONFIG_NO_RADIUS */ + user = NULL; if (buf[0] != '"' && buf[0] != '*') { @@ -323,6 +366,10 @@ static int hostapd_config_read_eap_user( EAP_TTLS_AUTH_MSCHAPV2; goto skip_eap; } + if (os_strcmp(start, "MACACL") == 0) { + user->macacl = 1; + goto skip_eap; + } wpa_printf(MSG_ERROR, "Unsupported EAP type " "'%s' on line %d in '%s'", start, line, fname); @@ -337,7 +384,7 @@ static int hostapd_config_read_eap_user( break; start = pos3; } - if (num_methods == 0 && user->ttls_auth == 0) { + if (num_methods == 0 && user->ttls_auth == 0 && !user->macacl) { wpa_printf(MSG_ERROR, "No EAP types configured on " "line %d in '%s'", line, fname); goto failed; @@ -447,7 +494,7 @@ static int hostapd_config_read_eap_user( done: if (tail == NULL) { - tail = conf->eap_user = user; + tail = new_user = user; } else { tail->next = user; tail = user; @@ -455,17 +502,26 @@ static int hostapd_config_read_eap_user( continue; failed: - if (user) { - os_free(user->password); - os_free(user->identity); - os_free(user); - } + if (user) + hostapd_config_free_eap_user(user); ret = -1; break; } fclose(f); + if (ret == 0) { + user = conf->eap_user; + while (user) { + struct hostapd_eap_user *prev; + + prev = user; + user = user->next; + hostapd_config_free_eap_user(prev); + } + conf->eap_user = new_user; + } + return ret; } #endif /* EAP_SERVER */ @@ -636,6 +692,14 @@ static int hostapd_config_parse_key_mgmt else if (os_strcmp(start, "FT-SAE") == 0) val |= WPA_KEY_MGMT_FT_SAE; #endif /* CONFIG_SAE */ +#ifdef CONFIG_SUITEB + else if (os_strcmp(start, "WPA-EAP-SUITE-B") == 0) + val |= WPA_KEY_MGMT_IEEE8021X_SUITE_B; +#endif /* CONFIG_SUITEB */ +#ifdef CONFIG_SUITEB192 + else if (os_strcmp(start, "WPA-EAP-SUITE-B-192") == 0) + val |= WPA_KEY_MGMT_IEEE8021X_SUITE_B_192; +#endif /* CONFIG_SUITEB192 */ else { wpa_printf(MSG_ERROR, "Line %d: invalid key_mgmt '%s'", line, start); @@ -661,49 +725,12 @@ static int hostapd_config_parse_key_mgmt static int hostapd_config_parse_cipher(int line, const char *value) { - int val = 0, last; - char *start, *end, *buf; - - buf = os_strdup(value); - if (buf == NULL) + int val = wpa_parse_cipher(value); + if (val < 0) { + wpa_printf(MSG_ERROR, "Line %d: invalid cipher '%s'.", + line, value); return -1; - start = buf; - - while (*start != '\0') { - while (*start == ' ' || *start == '\t') - start++; - if (*start == '\0') - break; - end = start; - while (*end != ' ' && *end != '\t' && *end != '\0') - end++; - last = *end == '\0'; - *end = '\0'; - if (os_strcmp(start, "CCMP") == 0) - val |= WPA_CIPHER_CCMP; - else if (os_strcmp(start, "GCMP") == 0) - val |= WPA_CIPHER_GCMP; - else if (os_strcmp(start, "TKIP") == 0) - val |= WPA_CIPHER_TKIP; - else if (os_strcmp(start, "WEP104") == 0) - val |= WPA_CIPHER_WEP104; - else if (os_strcmp(start, "WEP40") == 0) - val |= WPA_CIPHER_WEP40; - else if (os_strcmp(start, "NONE") == 0) - val |= WPA_CIPHER_NONE; - else { - wpa_printf(MSG_ERROR, "Line %d: invalid cipher '%s'.", - line, start); - os_free(buf); - return -1; - } - - if (last) - break; - start = end + 1; } - os_free(buf); - if (val == 0) { wpa_printf(MSG_ERROR, "Line %d: no cipher values configured.", line); @@ -748,14 +775,14 @@ static int hostapd_config_read_wep(struc } -static int hostapd_parse_rates(int **rate_list, char *val) +static int hostapd_parse_intlist(int **int_list, char *val) { int *list; int count; char *pos, *end; - os_free(*rate_list); - *rate_list = NULL; + os_free(*int_list); + *int_list = NULL; pos = val; count = 0; @@ -782,37 +809,39 @@ static int hostapd_parse_rates(int **rat } list[count] = -1; - *rate_list = list; + *int_list = list; return 0; } static int hostapd_config_bss(struct hostapd_config *conf, const char *ifname) { - struct hostapd_bss_config *bss; + struct hostapd_bss_config **all, *bss; if (*ifname == '\0') return -1; - bss = os_realloc_array(conf->bss, conf->num_bss + 1, - sizeof(struct hostapd_bss_config)); - if (bss == NULL) { + all = os_realloc_array(conf->bss, conf->num_bss + 1, + sizeof(struct hostapd_bss_config *)); + if (all == NULL) { wpa_printf(MSG_ERROR, "Failed to allocate memory for " "multi-BSS entry"); return -1; } - conf->bss = bss; + conf->bss = all; - bss = &(conf->bss[conf->num_bss]); - os_memset(bss, 0, sizeof(*bss)); + bss = os_zalloc(sizeof(*bss)); + if (bss == NULL) + return -1; bss->radius = os_zalloc(sizeof(*bss->radius)); if (bss->radius == NULL) { wpa_printf(MSG_ERROR, "Failed to allocate memory for " "multi-BSS RADIUS data"); + os_free(bss); return -1; } - conf->num_bss++; + conf->bss[conf->num_bss++] = bss; conf->last_bss = bss; hostapd_config_defaults_bss(bss); @@ -1060,8 +1089,8 @@ static int hostapd_config_ht_capab(struc conf->ht_capab |= HT_CAP_INFO_MAX_AMSDU_SIZE; if (os_strstr(capab, "[DSSS_CCK-40]")) conf->ht_capab |= HT_CAP_INFO_DSSS_CCK40MHZ; - if (os_strstr(capab, "[PSMP]")) - conf->ht_capab |= HT_CAP_INFO_PSMP_SUPP; + if (os_strstr(capab, "[40-INTOLERANT]")) + conf->ht_capab |= HT_CAP_INFO_40MHZ_INTOLERANT; if (os_strstr(capab, "[LSIG-TXOP-PROT]")) conf->ht_capab |= HT_CAP_INFO_LSIG_TXOP_PROTECT_SUPPORT; @@ -1082,8 +1111,6 @@ static int hostapd_config_vht_capab(stru conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ; if (os_strstr(capab, "[VHT160-80PLUS80]")) conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ; - if (os_strstr(capab, "[VHT160-80PLUS80]")) - conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ; if (os_strstr(capab, "[RXLDPC]")) conf->vht_capab |= VHT_CAP_RXLDPC; if (os_strstr(capab, "[SHORT-GI-80]")) @@ -1101,15 +1128,15 @@ static int hostapd_config_vht_capab(stru if (os_strstr(capab, "[RX-STBC-1234]")) conf->vht_capab |= VHT_CAP_RXSTBC_4; if (os_strstr(capab, "[SU-BEAMFORMER]")) - conf->vht_capab |= VHT_CAP_MU_BEAMFORMER_CAPABLE; + conf->vht_capab |= VHT_CAP_SU_BEAMFORMER_CAPABLE; if (os_strstr(capab, "[SU-BEAMFORMEE]")) - conf->vht_capab |= VHT_CAP_MU_BEAMFORMEE_CAPABLE; + conf->vht_capab |= VHT_CAP_SU_BEAMFORMEE_CAPABLE; if (os_strstr(capab, "[BF-ANTENNA-2]") && - (conf->vht_capab & VHT_CAP_MU_BEAMFORMER_CAPABLE)) - conf->vht_capab |= VHT_CAP_BEAMFORMER_ANTENNAS_MAX; + (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) + conf->vht_capab |= (1 << VHT_CAP_BEAMFORMEE_STS_OFFSET); if (os_strstr(capab, "[SOUNDING-DIMENSION-2]") && - (conf->vht_capab & VHT_CAP_MU_BEAMFORMER_CAPABLE)) - conf->vht_capab |= VHT_CAP_SOUNDING_DIMENTION_MAX; + (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) + conf->vht_capab |= (1 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); if (os_strstr(capab, "[MU-BEAMFORMER]")) conf->vht_capab |= VHT_CAP_MU_BEAMFORMER_CAPABLE; if (os_strstr(capab, "[MU-BEAMFORMEE]")) @@ -1118,8 +1145,20 @@ static int hostapd_config_vht_capab(stru conf->vht_capab |= VHT_CAP_VHT_TXOP_PS; if (os_strstr(capab, "[HTC-VHT]")) conf->vht_capab |= VHT_CAP_HTC_VHT; - if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP0]")) - conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT; + if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP7]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP6]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_6; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP5]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_5; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP4]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_4; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP3]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_3; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP2]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_2; + else if (os_strstr(capab, "[MAX-A-MPDU-LEN-EXP1]")) + conf->vht_capab |= VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_1; if (os_strstr(capab, "[VHT-LINK-ADAPT2]") && (conf->vht_capab & VHT_CAP_HTC_VHT)) conf->vht_capab |= VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB; @@ -1135,141 +1174,6 @@ static int hostapd_config_vht_capab(stru #endif /* CONFIG_IEEE80211AC */ -static int hostapd_config_check_bss(struct hostapd_bss_config *bss, - struct hostapd_config *conf) -{ - if (bss->ieee802_1x && !bss->eap_server && - !bss->radius->auth_servers) { - wpa_printf(MSG_ERROR, "Invalid IEEE 802.1X configuration (no " - "EAP authenticator configured)."); - return -1; - } - - if (bss->wpa && bss->wpa_psk_radius != PSK_RADIUS_IGNORED && - bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH) { - wpa_printf(MSG_ERROR, "WPA-PSK using RADIUS enabled, but no " - "RADIUS checking (macaddr_acl=2) enabled."); - return -1; - } - - if (bss->wpa && (bss->wpa_key_mgmt & WPA_KEY_MGMT_PSK) && - bss->ssid.wpa_psk == NULL && bss->ssid.wpa_passphrase == NULL && - bss->ssid.wpa_psk_file == NULL && - (bss->wpa_psk_radius != PSK_RADIUS_REQUIRED || - bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH)) { - wpa_printf(MSG_ERROR, "WPA-PSK enabled, but PSK or passphrase " - "is not configured."); - return -1; - } - - if (hostapd_mac_comp_empty(bss->bssid) != 0) { - size_t i; - - for (i = 0; i < conf->num_bss; i++) { - if ((&conf->bss[i] != bss) && - (hostapd_mac_comp(conf->bss[i].bssid, - bss->bssid) == 0)) { - wpa_printf(MSG_ERROR, "Duplicate BSSID " MACSTR - " on interface '%s' and '%s'.", - MAC2STR(bss->bssid), - conf->bss[i].iface, bss->iface); - return -1; - } - } - } - -#ifdef CONFIG_IEEE80211R - if (wpa_key_mgmt_ft(bss->wpa_key_mgmt) && - (bss->nas_identifier == NULL || - os_strlen(bss->nas_identifier) < 1 || - os_strlen(bss->nas_identifier) > FT_R0KH_ID_MAX_LEN)) { - wpa_printf(MSG_ERROR, "FT (IEEE 802.11r) requires " - "nas_identifier to be configured as a 1..48 octet " - "string"); - return -1; - } -#endif /* CONFIG_IEEE80211R */ - -#ifdef CONFIG_IEEE80211N - if (conf->ieee80211n && conf->hw_mode == HOSTAPD_MODE_IEEE80211B) { - bss->disable_11n = 1; - wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) in 11b mode is not " - "allowed, disabling HT capabilites"); - } - - if (conf->ieee80211n && - bss->ssid.security_policy == SECURITY_STATIC_WEP) { - bss->disable_11n = 1; - wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) with WEP is not " - "allowed, disabling HT capabilities"); - } - - if (conf->ieee80211n && bss->wpa && - !(bss->wpa_pairwise & WPA_CIPHER_CCMP) && - !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP))) { - bss->disable_11n = 1; - wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) with WPA/WPA2 " - "requires CCMP/GCMP to be enabled, disabling HT " - "capabilities"); - } -#endif /* CONFIG_IEEE80211N */ - -#ifdef CONFIG_WPS2 - if (bss->wps_state && bss->ignore_broadcast_ssid) { - wpa_printf(MSG_INFO, "WPS: ignore_broadcast_ssid " - "configuration forced WPS to be disabled"); - bss->wps_state = 0; - } - - if (bss->wps_state && bss->ssid.wep.keys_set && bss->wpa == 0) { - wpa_printf(MSG_INFO, "WPS: WEP configuration forced WPS to be " - "disabled"); - bss->wps_state = 0; - } - - if (bss->wps_state && bss->wpa && - (!(bss->wpa & 2) || - !(bss->rsn_pairwise & WPA_CIPHER_CCMP))) { - wpa_printf(MSG_INFO, "WPS: WPA/TKIP configuration without " - "WPA2/CCMP forced WPS to be disabled"); - bss->wps_state = 0; - } -#endif /* CONFIG_WPS2 */ - -#ifdef CONFIG_HS20 - if (bss->hs20 && - (!(bss->wpa & 2) || - !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP)))) { - wpa_printf(MSG_ERROR, "HS 2.0: WPA2-Enterprise/CCMP " - "configuration is required for Hotspot 2.0 " - "functionality"); - return -1; - } -#endif /* CONFIG_HS20 */ - - return 0; -} - - -static int hostapd_config_check(struct hostapd_config *conf) -{ - size_t i; - - if (conf->ieee80211d && (!conf->country[0] || !conf->country[1])) { - wpa_printf(MSG_ERROR, "Cannot enable IEEE 802.11d without " - "setting the country_code"); - return -1; - } - - for (i = 0; i < conf->num_bss; i++) { - if (hostapd_config_check_bss(&conf->bss[i], conf)) - return -1; - } - - return 0; -} - - #ifdef CONFIG_INTERWORKING static int parse_roaming_consortium(struct hostapd_bss_config *bss, char *pos, int line) @@ -1306,26 +1210,34 @@ static int parse_roaming_consortium(stru static int parse_lang_string(struct hostapd_lang_string **array, unsigned int *count, char *pos) { - char *sep; - size_t clen, nlen; + char *sep, *str = NULL; + size_t clen, nlen, slen; struct hostapd_lang_string *ls; + int ret = -1; + + if (*pos == '"' || (*pos == 'P' && pos[1] == '"')) { + str = wpa_config_parse_string(pos, &slen); + if (!str) + return -1; + pos = str; + } sep = os_strchr(pos, ':'); if (sep == NULL) - return -1; + goto fail; *sep++ = '\0'; clen = os_strlen(pos); - if (clen < 2) - return -1; + if (clen < 2 || clen > sizeof(ls->lang)) + goto fail; nlen = os_strlen(sep); if (nlen > 252) - return -1; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 02:00:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A980713; Tue, 21 Apr 2015 02:00:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48E3D808; Tue, 21 Apr 2015 02:00:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L20cja076137; Tue, 21 Apr 2015 02:00:38 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L20cMd076136; Tue, 21 Apr 2015 02:00:38 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504210200.t3L20cMd076136@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 21 Apr 2015 02:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281807 - head/usr.sbin/wpa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 02:00:38 -0000 Author: rpaulo Date: Tue Apr 21 02:00:37 2015 New Revision: 281807 URL: https://svnweb.freebsd.org/changeset/base/281807 Log: Fix wpa/hostapd build without OpenSSL. Modified: head/usr.sbin/wpa/Makefile.crypto Modified: head/usr.sbin/wpa/Makefile.crypto ============================================================================== --- head/usr.sbin/wpa/Makefile.crypto Tue Apr 21 01:45:11 2015 (r281806) +++ head/usr.sbin/wpa/Makefile.crypto Tue Apr 21 02:00:37 2015 (r281807) @@ -53,7 +53,8 @@ SRCS+= tls_openssl.c .endif .if defined(CONFIG_INTERNAL_AES) -SRCS+= aes-internal.c \ +SRCS+= aes-unwrap.c aes-wrap.c \ + aes-internal.c \ aes-internal-dec.c \ aes-internal-enc.c .endif @@ -92,7 +93,7 @@ SRCS+= md4-internal.c .endif .if defined(CONFIG_INTERNAL_MD5) -SRCS+= md5-internal.c +SRCS+= md5.c md5-internal.c .endif .if defined(NEED_FIPS186_2_PRF) From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 02:02:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE495881; Tue, 21 Apr 2015 02:02:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCA21824; Tue, 21 Apr 2015 02:02:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L22PKC079207; Tue, 21 Apr 2015 02:02:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L22PR1079206; Tue, 21 Apr 2015 02:02:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210202.t3L22PR1079206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 02:02:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281808 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 02:02:26 -0000 Author: bdrewery Date: Tue Apr 21 02:02:25 2015 New Revision: 281808 URL: https://svnweb.freebsd.org/changeset/base/281808 Log: Pass full path to ldd(1) so it works on files in cwd. Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 02:00:37 2015 (r281807) +++ head/tools/build/check-links.sh Tue Apr 21 02:02:25 2015 (r281808) @@ -21,7 +21,7 @@ esac # Gather all symbols from the target unresolved_symbols=$(nm ${DEMANGLE} -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') -ldd_libs=$(ldd $1 | awk '{print $1 ":" $3}') +ldd_libs=$(ldd $(realpath $1) | awk '{print $1 ":" $3}') libkey() { libkey="lib_symbols_$1" From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 02:49:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49A81F7F; Tue, 21 Apr 2015 02:49:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3825CC3D; Tue, 21 Apr 2015 02:49:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L2njXn013269; Tue, 21 Apr 2015 02:49:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L2njXf013268; Tue, 21 Apr 2015 02:49:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504210249.t3L2njXf013268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2015 02:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281809 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 02:49:45 -0000 Author: gjb Date: Tue Apr 21 02:49:44 2015 New Revision: 281809 URL: https://svnweb.freebsd.org/changeset/base/281809 Log: Simplify variable expansion in attempt to fix the vm-image build. Sponsored by: The FreeBSD Foundation Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Tue Apr 21 02:02:25 2015 (r281808) +++ head/release/tools/vmimage.subr Tue Apr 21 02:49:44 2015 (r281809) @@ -14,9 +14,9 @@ write_partition_layout() { SWAPOPT="-p freebsd-swap/swapfs::1G" fi - _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" - if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then - BOOTFILES="${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" + _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR | tr -d '/usr/src')" + if [ -d "${_OBJDIR}/${TARGET}.${TARGET_ARCH}" ]; then + BOOTFILES="${_OBJDIR}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" else BOOTFILES="${_OBJDIR}/usr/src/sys/boot" fi From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 03:06:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BACA5DA; Tue, 21 Apr 2015 03:06:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69BC8F80; Tue, 21 Apr 2015 03:06:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L36x3d029616; Tue, 21 Apr 2015 03:06:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L36xAo029615; Tue, 21 Apr 2015 03:06:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210306.t3L36xAo029615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 03:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281810 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 03:06:59 -0000 Author: bdrewery Date: Tue Apr 21 03:06:58 2015 New Revision: 281810 URL: https://svnweb.freebsd.org/changeset/base/281810 Log: Revert r281805 for now as it breaks due to spaces in output Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 02:49:44 2015 (r281809) +++ head/tools/build/check-links.sh Tue Apr 21 03:06:58 2015 (r281810) @@ -3,10 +3,8 @@ ret=0 CHECK_UNRESOLVED=1 -DEMANGLE= -while getopts "DU" flag; do +while getopts "U" flag; do case "${flag}" in - D) DEMANGLE="-C" ;; U) CHECK_UNRESOLVED=0 ;; esac done @@ -20,7 +18,7 @@ case $mime in esac # Gather all symbols from the target -unresolved_symbols=$(nm ${DEMANGLE} -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') +unresolved_symbols=$(nm -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') ldd_libs=$(ldd $(realpath $1) | awk '{print $1 ":" $3}') libkey() { @@ -52,7 +50,7 @@ for lib in $(readelf -d $1 | awk '$2 ~ / done list_libs="$list_libs $lib" foundone= - lib_symbols="$(nm ${DEMANGLE} -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" + lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" if [ ${CHECK_UNRESOLVED} -eq 1 ]; then # Save the global symbols for this lib libkey "${lib}" From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 03:29:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A89259AC; Tue, 21 Apr 2015 03:29:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9653B227; Tue, 21 Apr 2015 03:29:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L3T4Vc046245; Tue, 21 Apr 2015 03:29:04 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L3T49n046244; Tue, 21 Apr 2015 03:29:04 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210329.t3L3T49n046244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 03:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281811 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 03:29:04 -0000 Author: bdrewery Date: Tue Apr 21 03:29:03 2015 New Revision: 281811 URL: https://svnweb.freebsd.org/changeset/base/281811 Log: - For executables search for matching (B) global uninitialized BSS symbols from linked libraries. Only do this for BSS symbols that have a size which avoids __bss_start. Without this some libraries would be considered unneeded even though they were providing a B symbol. - Add in the symbols from crt1.o to cover a handful of common unresolved symbols. - Consider (C) common data symbols as provided by libraries/crt1. - Move libkey() function to more appropriate place. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 03:06:58 2015 (r281810) +++ head/tools/build/check-links.sh Tue Apr 21 03:29:03 2015 (r281811) @@ -1,6 +1,23 @@ #!/bin/sh # $FreeBSD$ +libkey() { + libkey="lib_symbols_$1" + patterns=[.+,-] + replacement=_ + while :; do + case " ${libkey} " in + *${patterns}*) + libkey="${libkey%%${patterns}*}${replacement}${libkey#*${patterns}}" + ;; + *) + break + ;; + esac + done + return 0 +} + ret=0 CHECK_UNRESOLVED=1 while getopts "U" flag; do @@ -11,33 +28,17 @@ done shift $((OPTIND-1)) mime=$(file -L --mime-type $1) +isbin=0 case $mime in -*application/x-executable);; +*application/x-executable) isbin=1 ;; *application/x-sharedlib);; *) echo "Not an elf file" >&2 ; exit 1;; esac # Gather all symbols from the target -unresolved_symbols=$(nm -D -u --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') +unresolved_symbols=$(nm -D --format=posix "$1" | awk -v isbin=${isbin} '$2 == "U" || ($2 == "B" && $4 != "" && isbin == 1) {print $1}' | tr '\n' ' ') ldd_libs=$(ldd $(realpath $1) | awk '{print $1 ":" $3}') -libkey() { - libkey="lib_symbols_$1" - patterns=[.+,-] - replacement=_ - while :; do - case " ${libkey} " in - *${patterns}*) - libkey="${libkey%%${patterns}*}${replacement}${libkey#*${patterns}}" - ;; - *) - break - ;; - esac - done - return 0 -} - # Check for useful libs list_libs= resolved_symbols= @@ -50,11 +51,11 @@ for lib in $(readelf -d $1 | awk '$2 ~ / done list_libs="$list_libs $lib" foundone= - lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" + lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /C|R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" if [ ${CHECK_UNRESOLVED} -eq 1 ]; then # Save the global symbols for this lib libkey "${lib}" - setvar "${libkey}" "${lib_symbols}" + setvar "${libkey}" "${lib_symbols}" fi for fct in ${lib_symbols}; do case " ${unresolved_symbols} " in @@ -70,6 +71,14 @@ for lib in $(readelf -d $1 | awk '$2 ~ / done if [ ${CHECK_UNRESOLVED} -eq 1 ]; then + # Add in crt1 symbols + list_libs="${list_libs} crt1.o" + lib_symbols="$(nm --defined-only --format=posix "/usr/lib/crt1.o" | awk '$2 ~ /C|R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" + # Save the global symbols for this lib + libkey "crt1.o" + setvar "${libkey}" "${lib_symbols}" + + # No search libs for all symbols and report missing ones. for sym in ${unresolved_symbols}; do found=0 for lib in ${list_libs}; do From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 04:40:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3FAC344; Tue, 21 Apr 2015 04:40:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDE2BB2C; Tue, 21 Apr 2015 04:40:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L4eg48001509; Tue, 21 Apr 2015 04:40:42 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L4ecLY001402; Tue, 21 Apr 2015 04:40:38 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201504210440.t3L4ecLY001402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Tue, 21 Apr 2015 04:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281812 - in head: contrib/bmake contrib/bmake/PSD.doc contrib/bmake/lst.lib contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 04:40:42 -0000 Author: sjg Date: Tue Apr 21 04:40:38 2015 New Revision: 281812 URL: https://svnweb.freebsd.org/changeset/base/281812 Log: Merge bmake-20150418 PR: 199486 Added: head/contrib/bmake/mk/cython.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/cython.mk head/contrib/bmake/mk/manifest.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/manifest.mk head/contrib/bmake/mk/mkopt.sh - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/mkopt.sh head/contrib/bmake/mk/whats.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/mk/whats.mk head/contrib/bmake/unit-tests/comment.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/comment.exp head/contrib/bmake/unit-tests/comment.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/comment.mk head/contrib/bmake/unit-tests/cond1.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/cond1.exp head/contrib/bmake/unit-tests/cond1.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/cond1.mk head/contrib/bmake/unit-tests/doterror.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/doterror.exp head/contrib/bmake/unit-tests/doterror.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/doterror.mk head/contrib/bmake/unit-tests/dotwait.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/dotwait.exp head/contrib/bmake/unit-tests/dotwait.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/dotwait.mk head/contrib/bmake/unit-tests/error.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/error.exp head/contrib/bmake/unit-tests/error.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/error.mk head/contrib/bmake/unit-tests/escape.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/escape.exp head/contrib/bmake/unit-tests/escape.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/escape.mk head/contrib/bmake/unit-tests/export-all.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-all.exp head/contrib/bmake/unit-tests/export-all.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-all.mk head/contrib/bmake/unit-tests/export-env.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-env.exp head/contrib/bmake/unit-tests/export-env.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export-env.mk head/contrib/bmake/unit-tests/export.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export.exp head/contrib/bmake/unit-tests/export.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/export.mk head/contrib/bmake/unit-tests/forloop.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forloop.exp head/contrib/bmake/unit-tests/forloop.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forloop.mk head/contrib/bmake/unit-tests/forsubst.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forsubst.exp head/contrib/bmake/unit-tests/forsubst.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/forsubst.mk head/contrib/bmake/unit-tests/hash.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/hash.exp head/contrib/bmake/unit-tests/hash.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/hash.mk head/contrib/bmake/unit-tests/impsrc.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/impsrc.exp head/contrib/bmake/unit-tests/impsrc.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/impsrc.mk head/contrib/bmake/unit-tests/misc.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/misc.exp head/contrib/bmake/unit-tests/misc.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/misc.mk head/contrib/bmake/unit-tests/moderrs.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/moderrs.exp head/contrib/bmake/unit-tests/moderrs.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/moderrs.mk head/contrib/bmake/unit-tests/modmatch.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmatch.exp head/contrib/bmake/unit-tests/modmatch.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmatch.mk head/contrib/bmake/unit-tests/modmisc.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmisc.exp head/contrib/bmake/unit-tests/modmisc.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modmisc.mk head/contrib/bmake/unit-tests/modorder.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modorder.exp head/contrib/bmake/unit-tests/modorder.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modorder.mk head/contrib/bmake/unit-tests/modts.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modts.exp head/contrib/bmake/unit-tests/modts.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modts.mk head/contrib/bmake/unit-tests/modword.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modword.exp head/contrib/bmake/unit-tests/modword.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/modword.mk head/contrib/bmake/unit-tests/order.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/order.exp head/contrib/bmake/unit-tests/order.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/order.mk head/contrib/bmake/unit-tests/phony-end.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/phony-end.exp head/contrib/bmake/unit-tests/phony-end.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/phony-end.mk head/contrib/bmake/unit-tests/posix.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix.exp head/contrib/bmake/unit-tests/posix.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix.mk head/contrib/bmake/unit-tests/posix1.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix1.exp head/contrib/bmake/unit-tests/posix1.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/posix1.mk head/contrib/bmake/unit-tests/qequals.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/qequals.exp head/contrib/bmake/unit-tests/qequals.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/qequals.mk head/contrib/bmake/unit-tests/suffixes.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/suffixes.exp head/contrib/bmake/unit-tests/suffixes.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/suffixes.mk head/contrib/bmake/unit-tests/sunshcmd.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sunshcmd.exp head/contrib/bmake/unit-tests/sunshcmd.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sunshcmd.mk head/contrib/bmake/unit-tests/sysv.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sysv.exp head/contrib/bmake/unit-tests/sysv.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/sysv.mk head/contrib/bmake/unit-tests/ternary.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/ternary.exp head/contrib/bmake/unit-tests/ternary.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/ternary.mk head/contrib/bmake/unit-tests/unexport-env.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport-env.exp head/contrib/bmake/unit-tests/unexport-env.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport-env.mk head/contrib/bmake/unit-tests/unexport.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport.exp head/contrib/bmake/unit-tests/unexport.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/unexport.mk head/contrib/bmake/unit-tests/varcmd.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varcmd.exp head/contrib/bmake/unit-tests/varcmd.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varcmd.mk head/contrib/bmake/unit-tests/varmisc.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varmisc.exp head/contrib/bmake/unit-tests/varmisc.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varmisc.mk head/contrib/bmake/unit-tests/varshell.exp - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varshell.exp head/contrib/bmake/unit-tests/varshell.mk - copied unchanged from r281761, vendor/NetBSD/bmake/dist/unit-tests/varshell.mk Deleted: head/contrib/bmake/unit-tests/comment head/contrib/bmake/unit-tests/cond1 head/contrib/bmake/unit-tests/doterror head/contrib/bmake/unit-tests/dotwait head/contrib/bmake/unit-tests/error head/contrib/bmake/unit-tests/export head/contrib/bmake/unit-tests/export-all head/contrib/bmake/unit-tests/export-env head/contrib/bmake/unit-tests/forloop head/contrib/bmake/unit-tests/forsubst head/contrib/bmake/unit-tests/hash head/contrib/bmake/unit-tests/misc head/contrib/bmake/unit-tests/moderrs head/contrib/bmake/unit-tests/modmatch head/contrib/bmake/unit-tests/modmisc head/contrib/bmake/unit-tests/modorder head/contrib/bmake/unit-tests/modts head/contrib/bmake/unit-tests/modword head/contrib/bmake/unit-tests/order head/contrib/bmake/unit-tests/phony-end head/contrib/bmake/unit-tests/posix head/contrib/bmake/unit-tests/qequals head/contrib/bmake/unit-tests/sunshcmd head/contrib/bmake/unit-tests/sysv head/contrib/bmake/unit-tests/ternary head/contrib/bmake/unit-tests/test.exp head/contrib/bmake/unit-tests/unexport head/contrib/bmake/unit-tests/unexport-env head/contrib/bmake/unit-tests/varcmd Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/Makefile head/contrib/bmake/PSD.doc/Makefile head/contrib/bmake/PSD.doc/tutorial.ms head/contrib/bmake/bmake.1 head/contrib/bmake/bmake.cat1 head/contrib/bmake/compat.c head/contrib/bmake/configure head/contrib/bmake/configure.in head/contrib/bmake/job.c head/contrib/bmake/lst.h head/contrib/bmake/lst.lib/lstInt.h head/contrib/bmake/lst.lib/lstRemove.c head/contrib/bmake/main.c head/contrib/bmake/make.1 head/contrib/bmake/make.c head/contrib/bmake/make.h head/contrib/bmake/meta.c head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/FILES head/contrib/bmake/mk/auto.dep.mk head/contrib/bmake/mk/auto.obj.mk head/contrib/bmake/mk/autodep.mk head/contrib/bmake/mk/dep.mk head/contrib/bmake/mk/dirdeps.mk head/contrib/bmake/mk/gendirdeps.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/links.mk head/contrib/bmake/mk/meta.autodep.mk head/contrib/bmake/mk/meta.stage.mk head/contrib/bmake/mk/meta.sys.mk head/contrib/bmake/mk/meta2deps.py head/contrib/bmake/mk/meta2deps.sh head/contrib/bmake/mk/mk-files.txt head/contrib/bmake/mk/own.mk head/contrib/bmake/mk/sys.dependfile.mk head/contrib/bmake/nonints.h head/contrib/bmake/parse.c head/contrib/bmake/suff.c head/contrib/bmake/targ.c head/contrib/bmake/unit-tests/Makefile.in head/contrib/bmake/var.c head/usr.bin/bmake/Makefile head/usr.bin/bmake/unit-tests/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/ChangeLog Tue Apr 21 04:40:38 2015 (r281812) @@ -1,8 +1,76 @@ +2015-04-18 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150418 + Merge with NetBSD make, pick up + o job.c: use memmove() rather than memcpy() + + * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL + case, so skip it. + +2015-04-11 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150411 + bump version - only mk/ changes. + +2015-04-10 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150410 + Merge with NetBSD make, pick up + o document different handling of '-' in jobs mode vs compat + o fix jobs mode so that '-' only applies to whole job + when shell lacks hasErrCtl + o meta.c: use separate vars to track lcwd and latestdir (read) + per process + +2015-04-01 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150401 + Merge with NetBSD make, pick up + o meta.c: close meta file in child + + * Makefile: use BINDIR.bmake if set. + Same for MANDIR and SHAREDIR + Handy for testing release candidates + in various environments. + +2015-03-26 Simon J. Gerraty + + * move initialization of savederr to block where it is used + to avoid spurious warning from gcc5 + +2014-11-11 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20141111 + just a cooler number + +2014-11-05 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20141105 + Merge with NetBSD make, pick up + o revert major overhaul of suffix handling + and POSIX compliance - too much breakage + and impossible to make backwards compatible. + o we still have the new unit test structure which is ok. + o meta.c ensure "-- filemon" is at start of line. + +2014-09-17 Simon J. Gerraty + + * configure.in: test that result of getconf PATH_MAX is numeric + and discard if not. Apparently needed for Hurd. + +2014-08-30 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20140830 + Merge with NetBSD make, pick up + o major overhaul of suffix handling + o improved POSIX compliance + o overhauled unit-tests + 2014-06-20 Simon J. Gerraty * Makefile (MAKE_VERSION): 20140620 Merge with NetBSD make, pick up - o var.c return varNoError rather than var_Error for ::= modidiers. + o var.c return varNoError rather than var_Error for ::= modifiers. 2014-05-22 Simon J. Gerraty Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/FILES Tue Apr 21 04:40:38 2015 (r281812) @@ -92,35 +92,74 @@ targ.c trace.c trace.h unit-tests/Makefile.in -unit-tests/comment -unit-tests/cond1 -unit-tests/doterror -unit-tests/dotwait -unit-tests/error -unit-tests/export -unit-tests/export-all -unit-tests/export-env -unit-tests/forloop -unit-tests/forsubst -unit-tests/hash -unit-tests/misc -unit-tests/moderrs -unit-tests/modmatch -unit-tests/modmisc -unit-tests/modorder -unit-tests/modts -unit-tests/modword -unit-tests/order -unit-tests/phony-end -unit-tests/posix -unit-tests/qequals -unit-tests/sunshcmd -unit-tests/sysv -unit-tests/ternary -unit-tests/test.exp -unit-tests/unexport -unit-tests/unexport-env -unit-tests/varcmd +unit-tests/comment.exp +unit-tests/comment.mk +unit-tests/cond1.exp +unit-tests/cond1.mk +unit-tests/doterror.exp +unit-tests/doterror.mk +unit-tests/dotwait.exp +unit-tests/dotwait.mk +unit-tests/error.exp +unit-tests/error.mk +unit-tests/escape.exp +unit-tests/escape.mk +unit-tests/export-all.exp +unit-tests/export-all.mk +unit-tests/export-env.exp +unit-tests/export-env.mk +unit-tests/export.exp +unit-tests/export.mk +unit-tests/forloop.exp +unit-tests/forloop.mk +unit-tests/forsubst.exp +unit-tests/forsubst.mk +unit-tests/hash.exp +unit-tests/hash.mk +unit-tests/impsrc.exp +unit-tests/impsrc.mk +unit-tests/misc.exp +unit-tests/misc.mk +unit-tests/moderrs.exp +unit-tests/moderrs.mk +unit-tests/modmatch.exp +unit-tests/modmatch.mk +unit-tests/modmisc.exp +unit-tests/modmisc.mk +unit-tests/modorder.exp +unit-tests/modorder.mk +unit-tests/modts.exp +unit-tests/modts.mk +unit-tests/modword.exp +unit-tests/modword.mk +unit-tests/order.exp +unit-tests/order.mk +unit-tests/phony-end.exp +unit-tests/phony-end.mk +unit-tests/posix.exp +unit-tests/posix.mk +unit-tests/posix1.exp +unit-tests/posix1.mk +unit-tests/qequals.exp +unit-tests/qequals.mk +unit-tests/suffixes.exp +unit-tests/suffixes.mk +unit-tests/sunshcmd.exp +unit-tests/sunshcmd.mk +unit-tests/sysv.exp +unit-tests/sysv.mk +unit-tests/ternary.exp +unit-tests/ternary.mk +unit-tests/unexport-env.exp +unit-tests/unexport-env.mk +unit-tests/unexport.exp +unit-tests/unexport.mk +unit-tests/varcmd.exp +unit-tests/varcmd.mk +unit-tests/varmisc.exp +unit-tests/varmisc.mk +unit-tests/varshell.exp +unit-tests/varshell.mk util.c var.c wait.h Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/Makefile Tue Apr 21 04:40:38 2015 (r281812) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.27 2014/06/20 14:51:54 sjg Exp $ +# $Id: Makefile,v 1.36 2015/04/18 19:58:53 sjg Exp $ # Base version on src date -MAKE_VERSION= 20140620 +MAKE_VERSION= 20150418 PROG= bmake @@ -180,9 +180,9 @@ COPTS.parse.c += -Wno-format-nonliteral COPTS.var.c += -Wno-format-nonliteral # Force these -SHAREDIR= ${prefix}/share -BINDIR= ${prefix}/bin -MANDIR= ${SHAREDIR}/man +SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} +BINDIR= ${BINDIR.bmake:U${prefix}/bin} +MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} .if !exists(.depend) ${OBJS}: config.h Modified: head/contrib/bmake/PSD.doc/Makefile ============================================================================== --- head/contrib/bmake/PSD.doc/Makefile Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/PSD.doc/Makefile Tue Apr 21 04:40:38 2015 (r281812) @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.2 1995/06/14 15:20:23 christos Exp $ +# $NetBSD: Makefile,v 1.4 2014/07/05 19:22:43 dholland Exp $ # @(#)Makefile 8.1 (Berkeley) 8/14/93 -DIR= psd/12.make +SECTION=reference/ref1 +ARTICLE=make SRCS= tutorial.ms MACROS= -ms +EXTRAHTMLFILES=make1.png make2.png .include Modified: head/contrib/bmake/PSD.doc/tutorial.ms ============================================================================== --- head/contrib/bmake/PSD.doc/tutorial.ms Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/PSD.doc/tutorial.ms Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -.\" $NetBSD: tutorial.ms,v 1.11 2011/08/18 15:19:30 sjg Exp $ +.\" $NetBSD: tutorial.ms,v 1.12 2014/09/30 21:33:14 christos Exp $ .\" Copyright (c) 1988, 1989, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -67,6 +67,16 @@ .\" .EH 'PSD:12-%''PMake \*- A Tutorial' .OH 'PMake \*- A Tutorial''PSD:12-%' +.\" Ix is an indexing macro similar to .IX but I've disabled it for now +.\" Since that would require 2 passes and I am not in the mood for that. +.de Ix +.. +.\" Rd is section (region) define and Rm is region mention? Again disable for +.\" now. +.de Rd +.. +.de Rm +.. .\" xH is a macro to provide numbered headers that are automatically stuffed .\" into a table-of-contents, properly indented, etc. If the first argument .\" is numeric, it is taken as the depth for numbering (as for .NH), else Modified: head/contrib/bmake/bmake.1 ============================================================================== --- head/contrib/bmake/bmake.1 Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/bmake.1 Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.229 2014/01/19 10:23:29 apb Exp $ +.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd February 14, 2014 +.Dd April 9, 2015 .Dt MAKE 1 .Os .Sh NAME @@ -209,8 +209,6 @@ Force the option to print raw values of variables. .It Ar v Print debugging information about variable assignment. -.It Ar w -Print entering and leaving directory messages, pre and post processing. .It Ar x Run shell commands with .Fl x @@ -352,6 +350,8 @@ contains a then the value will be expanded before printing. .It Fl W Treat any warnings during makefile parsing as errors. +.It Fl w +Print entering and leaving directory messages, pre and post processing. .It Fl X Don't export variables passed on the command line to the environment individually. @@ -441,17 +441,29 @@ The value need not necessarily be used to describe existing files. Expansion is in directory order, not alphabetically as done in the shell. .Sh SHELL COMMANDS -Each target may have associated with it a series of shell commands, normally +Each target may have associated with it one or more lines of shell +commands, normally used to create the target. -Each of the commands in this script +Each of the lines in this script .Em must be preceded by a tab. -While any target may appear on a dependency line, only one of these -dependencies may be followed by a creation script, unless the +(For historical reasons, spaces are not accepted.) +While targets can appear in many dependency lines if desired, by +default only one of these rules may be followed by a creation +script. +If the .Ql Ic \&:: -operator is used. +operator is used, however, all rules may include scripts and the +scripts are executed in the order found. .Pp -If the first characters of the command line are any combination of +Each line is treated as a separate shell command, unless the end of +line is escaped with a backslash +.Pq Ql \e +in which case that line and the next are combined. +.\" The escaped newline is retained and passed to the shell, which +.\" normally ignores it. +.\" However, the tab at the beginning of the following line is removed. +If the first characters of the command are any combination of .Ql Ic @ , .Ql Ic + , or @@ -469,6 +481,7 @@ This is similar to the effect of the .MA except that the effect can be limited to a single line of a script. A .Ql Ic \- +in compatibility mode causes any non-zero exit status of the command line to be ignored. .Pp When @@ -477,22 +490,21 @@ is run in jobs mode with .Fl j Ar max_jobs , the entire script for the target is fed to a single instance of the shell. -.Pp In compatibility (non-jobs) mode, each command is run in a separate process. If the command contains any shell meta characters .Pq Ql #=|^(){};&<>*?[]:$`\e\en -it will be passed to the shell, otherwise +it will be passed to the shell; otherwise .Nm will attempt direct execution. -.Pp -Since -.Nm -will -.Xr chdir 2 -to -.Ql Va .OBJDIR -before executing any targets, each child process -starts with that as its current working directory. +If a line starts with +.Ql Ic \- +and the shell has ErrCtl enabled then failure of the command line +will be ignored as in compatibility mode. +Otherwise +.Ql Ic \- +affects the entire job; +the script will stop at the first command line that fails, +but the target will not be deemed to have failed. .Pp Makefiles should be written so that the mode of .Nm @@ -500,20 +512,32 @@ operation does not change their behavior For example, any command which needs to use .Dq cd or -.Dq chdir , -without side-effect should be put in parenthesis: +.Dq chdir +without potentially changing the directory for subsequent commands +should be put in parentheses so it executes in a subshell. +To force the use of one shell, escape the line breaks so as to make +the whole script one command. +For example: .Bd -literal -offset indent - avoid-chdir-side-effects: @echo Building $@ in `pwd` - @(cd ${.CURDIR} && ${.MAKE} $@) + @(cd ${.CURDIR} && ${MAKE} $@) @echo Back in `pwd` ensure-one-shell-regardless-of-mode: - @echo Building $@ in `pwd`; \\ - (cd ${.CURDIR} && ${.MAKE} $@); \\ + @echo Building $@ in `pwd`; \e + (cd ${.CURDIR} && ${MAKE} $@); \e echo Back in `pwd` .Ed +.Pp +Since +.Nm +will +.Xr chdir 2 +to +.Ql Va .OBJDIR +before executing any targets, each child process +starts with that as its current working directory. .Sh VARIABLE ASSIGNMENTS Variables in make are much like variables in the shell, and, by tradition, consist of all upper-case letters. @@ -624,13 +648,19 @@ Variables defined in the makefile or in Variables defined as part of the command line. .It Local variables Variables that are defined specific to a certain target. +.El +.Pp +Local variables are all built in and their values vary magically from +target to target. +It is not currently possible to define new local variables. The seven local variables are as follows: -.Bl -tag -width ".ARCHIVE" +.Bl -tag -width ".ARCHIVE" -offset indent .It Va .ALLSRC The list of all sources for this target; also known as .Ql Va \&\*[Gt] . .It Va .ARCHIVE -The name of the archive file. +The name of the archive file; also known as +.Ql Va \&! . .It Va .IMPSRC In suffix-transformation rules, the name/path of the source from which the target is to be transformed (the @@ -639,7 +669,8 @@ source); also known as .Ql Va \&\*[Lt] . It is not defined in explicit rules. .It Va .MEMBER -The name of the archive member. +The name of the archive member; also known as +.Ql Va % . .It Va .OODATE The list of sources for this target that were deemed out-of-date; also known as @@ -648,31 +679,41 @@ known as The file prefix of the target, containing only the file portion, no suffix or preceding directory components; also known as .Ql Va * . +The suffix must be one of the known suffixes declared with +.Ic .SUFFIXES +or it will not be recognized. .It Va .TARGET The name of the target; also known as .Ql Va @ . .El .Pp The shorter forms -.Ql Va @ , +.Ql ( Va \*[Gt] , +.Ql Va \&! , +.Ql Va \*[Lt] , +.Ql Va % , .Ql Va \&? , -.Ql Va \&\*[Lt] , -.Ql Va \&\*[Gt] , +.Ql Va * , and -.Ql Va * +.Ql Va @ ) are permitted for backward -compatibility with historical makefiles and are not recommended. -The six variables -.Ql Va "@F" , -.Ql Va "@D" , -.Ql Va "\*[Lt]F" , -.Ql Va "\*[Lt]D" , -.Ql Va "*F" , +compatibility with historical makefiles and legacy POSIX make and are +not recommended. +.Pp +Variants of these variables with the punctuation followed immediately by +.Ql D +or +.Ql F , +e.g. +.Ql Va $(@D) , +are legacy forms equivalent to using the +.Ql :H and -.Ql Va "*D" -are permitted for compatibility with +.Ql :T +modifiers. +These forms are accepted for compatibility with .At V -makefiles and are not recommended. +makefiles and POSIX but are not recommended. .Pp Four of the local variables may be used in sources on dependency lines because they expand to the proper value for each target on the line. @@ -682,7 +723,6 @@ These variables are .Ql Va .ARCHIVE , and .Ql Va .MEMBER . -.El .Ss Additional built-in variables In addition, .Nm @@ -2119,19 +2159,87 @@ system makefile system makefile directory .El .Sh COMPATIBILITY -The basic make syntax is compatible between different versions of make, +The basic make syntax is compatible between different versions of make; however the special variables, variable modifiers and conditionals are not. -.Pp -The way that parallel makes are scheduled changed in -NetBSD 4.0 -so that .ORDER and .WAIT apply recursively to the dependent nodes. -The algorithms used may change again in the future. +.Ss Older versions +An incomplete list of changes in older versions of +.Nm : .Pp The way that .for loop variables are substituted changed after NetBSD 5.0 so that they still appear to be variable expansions. In particular this stops them being treated as syntax, and removes some obscure problems using them in .if statements. +.Pp +The way that parallel makes are scheduled changed in +NetBSD 4.0 +so that .ORDER and .WAIT apply recursively to the dependent nodes. +The algorithms used may change again in the future. +.Ss Other make dialects +Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not +support most of the features of +.Nm +as described in this manual. +Most notably: +.Bl -bullet -offset indent +.It +The +.Ic .WAIT +and +.Ic .ORDER +declarations and most functionality pertaining to parallelization. +(GNU make supports parallelization but lacks these features needed to +control it effectively.) +.It +Directives, including for loops and conditionals and most of the +forms of include files. +(GNU make has its own incompatible and less powerful syntax for +conditionals.) +.It +All built-in variables that begin with a dot. +.It +Most of the special sources and targets that begin with a dot, +with the notable exception of +.Ic .PHONY , +.Ic .PRECIOUS , +and +.Ic .SUFFIXES . +.It +Variable modifiers, except for the +.Dl :old=new +string substitution, which does not portably support globbing with +.Ql % +and historically only works on declared suffixes. +.It +The +.Ic $> +variable even in its short form; most makes support this functionality +but its name varies. +.El +.Pp +Some features are somewhat more portable, such as assignment with +.Ic += , +.Ic ?= , +and +.Ic != . +The +.Ic .PATH +functionality is based on an older feature +.Ic VPATH +found in GNU make and many versions of SVR4 make; however, +historically its behavior is too ill-defined (and too buggy) to rely +upon. +.Pp +The +.Ic $@ +and +.Ic $< +variables are more or less universally portable, as is the +.Ic $(MAKE) +variable. +Basic use of suffix rules (for files only in the current directory, +not trying to chain transformations together, etc.) is also reasonably +portable. .Sh SEE ALSO .Xr mkdep 1 .Sh HISTORY Modified: head/contrib/bmake/bmake.cat1 ============================================================================== --- head/contrib/bmake/bmake.cat1 Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/bmake.cat1 Tue Apr 21 04:40:38 2015 (r281812) @@ -122,9 +122,6 @@ DDEESSCCRRIIPPTTIIOONN _v Print debugging information about variable assignment. - _w Print entering and leaving directory messages, pre and - post processing. - _x Run shell commands with --xx so the actual commands are printed as they are executed. @@ -221,6 +218,9 @@ DDEESSCCRRIIPPTTIIOONN --WW Treat any warnings during makefile parsing as errors. + --ww Print entering and leaving directory messages, pre and post pro- + cessing. + --XX Don't export variables passed on the command line to the environ- ment individually. Variables passed on the command line are still exported via the _M_A_K_E_F_L_A_G_S environment variable. This @@ -273,46 +273,55 @@ FFIILLEE DDEEPPEENNDDEENNCC done in the shell. SSHHEELLLL CCOOMMMMAANNDDSS - Each target may have associated with it a series of shell commands, nor- - mally used to create the target. Each of the commands in this script - _m_u_s_t be preceded by a tab. While any target may appear on a dependency - line, only one of these dependencies may be followed by a creation - script, unless the `::::' operator is used. - - If the first characters of the command line are any combination of `@@', - `++', or `--', the command is treated specially. A `@@' causes the command - not to be echoed before it is executed. A `++' causes the command to be - executed even when --nn is given. This is similar to the effect of the - .MAKE special source, except that the effect can be limited to a single - line of a script. A `--' causes any non-zero exit status of the command - line to be ignored. + Each target may have associated with it one or more lines of shell com- + mands, normally used to create the target. Each of the lines in this + script _m_u_s_t be preceded by a tab. (For historical reasons, spaces are + not accepted.) While targets can appear in many dependency lines if + desired, by default only one of these rules may be followed by a creation + script. If the `::::' operator is used, however, all rules may include + scripts and the scripts are executed in the order found. + + Each line is treated as a separate shell command, unless the end of line + is escaped with a backslash (`\') in which case that line and the next + are combined. If the first characters of the command are any combination + of `@@', `++', or `--', the command is treated specially. A `@@' causes the + command not to be echoed before it is executed. A `++' causes the command + to be executed even when --nn is given. This is similar to the effect of + the .MAKE special source, except that the effect can be limited to a sin- + gle line of a script. A `--' in compatibility mode causes any non-zero + exit status of the command line to be ignored. When bbmmaakkee is run in jobs mode with --jj _m_a_x___j_o_b_s, the entire script for - the target is fed to a single instance of the shell. - - In compatibility (non-jobs) mode, each command is run in a separate - process. If the command contains any shell meta characters - (`#=|^(){};&<>*?[]:$`\\n') it will be passed to the shell, otherwise - bbmmaakkee will attempt direct execution. - - Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each - child process starts with that as its current working directory. + the target is fed to a single instance of the shell. In compatibility + (non-jobs) mode, each command is run in a separate process. If the com- + mand contains any shell meta characters (`#=|^(){};&<>*?[]:$`\\n') it + will be passed to the shell; otherwise bbmmaakkee will attempt direct execu- + tion. If a line starts with `--' and the shell has ErrCtl enabled then + failure of the command line will be ignored as in compatibility mode. + Otherwise `--' affects the entire job; the script will stop at the first + command line that fails, but the target will not be deemed to have + failed. Makefiles should be written so that the mode of bbmmaakkee operation does not change their behavior. For example, any command which needs to use - ``cd'' or ``chdir'', without side-effect should be put in parenthesis: - + ``cd'' or ``chdir'' without potentially changing the directory for subse- + quent commands should be put in parentheses so it executes in a subshell. + To force the use of one shell, escape the line breaks so as to make the + whole script one command. For example: avoid-chdir-side-effects: @echo Building $@ in `pwd` - @(cd ${.CURDIR} && ${.MAKE} $@) + @(cd ${.CURDIR} && ${MAKE} $@) @echo Back in `pwd` ensure-one-shell-regardless-of-mode: @echo Building $@ in `pwd`; \ - (cd ${.CURDIR} && ${.MAKE} $@); \ + (cd ${.CURDIR} && ${MAKE} $@); \ echo Back in `pwd` + Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each + child process starts with that as its current working directory. + VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS Variables in make are much like variables in the shell, and, by tradi- tion, consist of all upper-case letters. @@ -402,40 +411,47 @@ VVAARRIIAABBLLEE AASSSSIIGG Variables defined as part of the command line. Local variables - Variables that are defined specific to a certain target. The - seven local variables are as follows: + Variables that are defined specific to a certain target. - _._A_L_L_S_R_C The list of all sources for this target; also known as - `_>'. + Local variables are all built in and their values vary magically from + target to target. It is not currently possible to define new local vari- + ables. The seven local variables are as follows: - _._A_R_C_H_I_V_E The name of the archive file. + _._A_L_L_S_R_C The list of all sources for this target; also known as + `_>'. - _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the - source from which the target is to be transformed (the - ``implied'' source); also known as `_<'. It is not - defined in explicit rules. + _._A_R_C_H_I_V_E The name of the archive file; also known as `_!'. - _._M_E_M_B_E_R The name of the archive member. + _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the + source from which the target is to be transformed (the + ``implied'' source); also known as `_<'. It is not + defined in explicit rules. - _._O_O_D_A_T_E The list of sources for this target that were deemed - out-of-date; also known as `_?'. + _._M_E_M_B_E_R The name of the archive member; also known as `_%'. - _._P_R_E_F_I_X The file prefix of the target, containing only the file - portion, no suffix or preceding directory components; - also known as `_*'. + _._O_O_D_A_T_E The list of sources for this target that were deemed out- + of-date; also known as `_?'. - _._T_A_R_G_E_T The name of the target; also known as `_@'. + _._P_R_E_F_I_X The file prefix of the target, containing only the file + portion, no suffix or preceding directory components; + also known as `_*'. The suffix must be one of the known + suffixes declared with ..SSUUFFFFIIXXEESS or it will not be recog- + nized. - The shorter forms `_@', `_?', `_<', `_>', and `_*' are permitted for - backward compatibility with historical makefiles and are not rec- - ommended. The six variables `_@_F', `_@_D', `_<_F', `_<_D', `_*_F', and - `_*_D' are permitted for compatibility with AT&T System V UNIX - makefiles and are not recommended. + _._T_A_R_G_E_T The name of the target; also known as `_@'. - Four of the local variables may be used in sources on dependency - lines because they expand to the proper value for each target on - the line. These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', - and `_._M_E_M_B_E_R'. + The shorter forms (`_>', `_!', `_<', `_%', `_?', `_*', and `_@') are permitted + for backward compatibility with historical makefiles and legacy POSIX + make and are not recommended. + + Variants of these variables with the punctuation followed immediately by + `D' or `F', e.g. `_$_(_@_D_)', are legacy forms equivalent to using the `:H' + and `:T' modifiers. These forms are accepted for compatibility with AT&T + System V UNIX makefiles and POSIX but are not recommended. + + Four of the local variables may be used in sources on dependency lines + because they expand to the proper value for each target on the line. + These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', and `_._M_E_M_B_E_R'. AAddddiittiioonnaall bbuuiilltt--iinn vvaarriiaabblleess In addition, bbmmaakkee sets or knows about the following variables: @@ -1356,19 +1372,58 @@ FFIILLEESS /usr/share/mk system makefile directory CCOOMMPPAATTIIBBIILLIITTYY - The basic make syntax is compatible between different versions of make, + The basic make syntax is compatible between different versions of make; however the special variables, variable modifiers and conditionals are not. - The way that parallel makes are scheduled changed in NetBSD 4.0 so that - .ORDER and .WAIT apply recursively to the dependent nodes. The algo- - rithms used may change again in the future. + OOllddeerr vveerrssiioonnss + An incomplete list of changes in older versions of bbmmaakkee: The way that .for loop variables are substituted changed after NetBSD 5.0 so that they still appear to be variable expansions. In particular this stops them being treated as syntax, and removes some obscure problems using them in .if statements. + The way that parallel makes are scheduled changed in NetBSD 4.0 so that + .ORDER and .WAIT apply recursively to the dependent nodes. The algo- + rithms used may change again in the future. + + OOtthheerr mmaakkee ddiiaalleeccttss + Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not sup- + port most of the features of bbmmaakkee as described in this manual. Most + notably: + + ++oo The ..WWAAIITT and ..OORRDDEERR declarations and most functionality per- + taining to parallelization. (GNU make supports parallelization + but lacks these features needed to control it effectively.) + + ++oo Directives, including for loops and conditionals and most of + the forms of include files. (GNU make has its own incompatible + and less powerful syntax for conditionals.) + + ++oo All built-in variables that begin with a dot. + + ++oo Most of the special sources and targets that begin with a dot, + with the notable exception of ..PPHHOONNYY, ..PPRREECCIIOOUUSS, and ..SSUUFFFFIIXXEESS. + + ++oo Variable modifiers, except for the + :old=new + string substitution, which does not portably support globbing + with `%' and historically only works on declared suffixes. + + ++oo The $$>> variable even in its short form; most makes support this + functionality but its name varies. + + Some features are somewhat more portable, such as assignment with ++==, ??==, + and !!==. The ..PPAATTHH functionality is based on an older feature VVPPAATTHH found + in GNU make and many versions of SVR4 make; however, historically its + behavior is too ill-defined (and too buggy) to rely upon. + + The $$@@ and $$<< variables are more or less universally portable, as is the + $$((MMAAKKEE)) variable. Basic use of suffix rules (for files only in the cur- + rent directory, not trying to chain transformations together, etc.) is + also reasonably portable. + SSEEEE AALLSSOO mkdep(1) @@ -1394,4 +1449,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 February 14, 2014 NetBSD 5.1 +NetBSD 5.1 April 9, 2015 NetBSD 5.1 Modified: head/contrib/bmake/compat.c ============================================================================== --- head/contrib/bmake/compat.c Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/compat.c Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.94 2014/01/03 00:02:01 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"); #endif #endif /* not lint */ #endif Modified: head/contrib/bmake/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: head/contrib/bmake/configure.in ============================================================================== --- head/contrib/bmake/configure.in Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/configure.in Tue Apr 21 04:40:38 2015 (r281812) @@ -1,6 +1,6 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.52 2014/02/15 22:27:59 sjg Exp $ +dnl $Id: configure.in,v 1.53 2014/11/06 01:49:40 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl @@ -82,6 +82,8 @@ dnl dnl Hurd refuses to define PATH_MAX or MAXPATHLEN if test -x /usr/bin/getconf; then bmake_path_max=`getconf PATH_MAX / 2> /dev/null` + # only a numeric response is useful + test ${bmake_path_max:-0} -gt 0 2> /dev/null || bmake_path_max= fi bmake_path_max=${bmake_path_max:-1024} if test $bmake_path_max -gt 1024; then Modified: head/contrib/bmake/job.c ============================================================================== --- head/contrib/bmake/job.c Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/job.c Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $ */ +/* $NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -744,7 +744,6 @@ JobPrintCommand(void *cmdp, void *jobp) shutUp = DEBUG(LOUD) ? FALSE : TRUE; break; case '-': - job->flags |= JOB_IGNERR; errOff = TRUE; break; case '+': @@ -823,6 +822,7 @@ JobPrintCommand(void *cmdp, void *jobp) * to ignore errors. Set cmdTemplate to use the weirdness * instead of the simple "%s\n" template. */ + job->flags |= JOB_IGNERR; if (!(job->flags & JOB_SILENT) && !shutUp) { if (commandShell->hasEchoCtl) { DBPRINTF("%s\n", commandShell->echoOff); @@ -1376,7 +1376,8 @@ JobExec(Job *job, char **argv) (void)fcntl(0, F_SETFD, 0); (void)lseek(0, (off_t)0, SEEK_SET); - if (Always_pass_job_queue || (job->node->type & OP_MAKE)) { + if (Always_pass_job_queue || + (job->node->type & (OP_MAKE | OP_SUBMAKE))) { /* * Pass job token pipe to submakes. */ @@ -1910,16 +1911,16 @@ end_loop: (void)fflush(stdout); } } - if (i < max - 1) { - /* shift the remaining characters down */ - (void)memcpy(job->outBuf, &job->outBuf[i + 1], max - (i + 1)); + /* + * max is the last offset still in the buffer. Move any remaining + * characters to the start of the buffer and update the end marker + * curPos. + */ + if (i < max) { + (void)memmove(job->outBuf, &job->outBuf[i + 1], max - (i + 1)); job->curPos = max - (i + 1); - } else { - /* - * We have written everything out, so we just start over - * from the start of the buffer. No copying. No nothing. - */ + assert(i == max); job->curPos = 0; } } Modified: head/contrib/bmake/lst.h ============================================================================== --- head/contrib/bmake/lst.h Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/lst.h Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -/* $NetBSD: lst.h,v 1.18 2009/01/23 21:58:27 dsl Exp $ */ +/* $NetBSD: lst.h,v 1.20 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. Modified: head/contrib/bmake/lst.lib/lstInt.h ============================================================================== --- head/contrib/bmake/lst.lib/lstInt.h Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/lst.lib/lstInt.h Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -/* $NetBSD: lstInt.h,v 1.20 2009/01/24 14:43:29 dsl Exp $ */ +/* $NetBSD: lstInt.h,v 1.22 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 Modified: head/contrib/bmake/lst.lib/lstRemove.c ============================================================================== --- head/contrib/bmake/lst.lib/lstRemove.c Tue Apr 21 03:29:03 2015 (r281811) +++ head/contrib/bmake/lst.lib/lstRemove.c Tue Apr 21 04:40:38 2015 (r281812) @@ -1,4 +1,4 @@ -/* $NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $ */ +/* $NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -33,14 +33,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $"; +static char rcsid[] = "$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)lstRemove.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: lstRemove.c,v 1.14 2008/12/13 15:19:29 dsl Exp $"); +__RCSID("$NetBSD: lstRemove.c,v 1.16 2014/09/07 20:55:34 joerg Exp $"); #endif #endif /* not lint */ #endif Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Tue Apr 21 03:29:03 2015 (r281811) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 05:10:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43B897EB; Tue, 21 Apr 2015 05:10:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32241FC1; Tue, 21 Apr 2015 05:10:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L5AJqF026023; Tue, 21 Apr 2015 05:10:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L5AJg6026022; Tue, 21 Apr 2015 05:10:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210510.t3L5AJg6026022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 05:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281813 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 05:10:19 -0000 Author: bdrewery Date: Tue Apr 21 05:10:18 2015 New Revision: 281813 URL: https://svnweb.freebsd.org/changeset/base/281813 Log: Support libraries linked by path. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 04:40:38 2015 (r281812) +++ head/tools/build/check-links.sh Tue Apr 21 05:10:18 2015 (r281813) @@ -3,7 +3,7 @@ libkey() { libkey="lib_symbols_$1" - patterns=[.+,-] + patterns=[.+,/-] replacement=_ while :; do case " ${libkey} " in @@ -44,11 +44,15 @@ list_libs= resolved_symbols= for lib in $(readelf -d $1 | awk '$2 ~ /\(?NEEDED\)?/ { sub(/\[/,"",$NF); sub(/\]/,"",$NF); print $NF }'); do echo -n "checking if $lib is needed: " - for libpair in ${ldd_libs}; do - case "${libpair}" in - ${lib}:*) libpath="${libpair#*:}" && break ;; - esac - done + if [ -n "${lib##/*}" ]; then + for libpair in ${ldd_libs}; do + case "${libpair}" in + ${lib}:*) libpath="${libpair#*:}" && break ;; + esac + done + else + libpath="${lib}" + fi list_libs="$list_libs $lib" foundone= lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /C|R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')" From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 05:41:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B237DD6B; Tue, 21 Apr 2015 05:41:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0082133C; Tue, 21 Apr 2015 05:41:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L5fv6S055117; Tue, 21 Apr 2015 05:41:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L5fv5F055116; Tue, 21 Apr 2015 05:41:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504210541.t3L5fv5F055116@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2015 05:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281814 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 05:41:57 -0000 Author: bdrewery Date: Tue Apr 21 05:41:56 2015 New Revision: 281814 URL: https://svnweb.freebsd.org/changeset/base/281814 Log: Tweak BSS symbol handling from r281811 to not consider them unresolved Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Tue Apr 21 05:10:18 2015 (r281813) +++ head/tools/build/check-links.sh Tue Apr 21 05:41:56 2015 (r281814) @@ -36,7 +36,8 @@ case $mime in esac # Gather all symbols from the target -unresolved_symbols=$(nm -D --format=posix "$1" | awk -v isbin=${isbin} '$2 == "U" || ($2 == "B" && $4 != "" && isbin == 1) {print $1}' | tr '\n' ' ') +unresolved_symbols=$(nm -u -D --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ') +[ ${isbin} -eq 1 ] && bss_symbols=$(nm -D --format=posix "$1" | awk '$2 == "B" && $4 != "" {print $1}' | tr '\n' ' ') ldd_libs=$(ldd $(realpath $1) | awk '{print $1 ":" $3}') # Check for useful libs @@ -62,7 +63,7 @@ for lib in $(readelf -d $1 | awk '$2 ~ / setvar "${libkey}" "${lib_symbols}" fi for fct in ${lib_symbols}; do - case " ${unresolved_symbols} " in + case " ${unresolved_symbols} ${bss_symbols} " in *\ ${fct}\ *) foundone="${fct}" && break ;; esac done From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 06:11:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2320550B; Tue, 21 Apr 2015 06: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11B1316CC; Tue, 21 Apr 2015 06:11:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L6BlkY078229; Tue, 21 Apr 2015 06:11:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L6Bl3f078228; Tue, 21 Apr 2015 06:11:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201504210611.t3L6Bl3f078228@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 21 Apr 2015 06:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281815 - head/sys/dev/usb/video X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 06:11:48 -0000 Author: hselasky Date: Tue Apr 21 06:11:47 2015 New Revision: 281815 URL: https://svnweb.freebsd.org/changeset/base/281815 Log: Don't print uninitialized variables. CID: 1295242 Modified: head/sys/dev/usb/video/udl.c Modified: head/sys/dev/usb/video/udl.c ============================================================================== --- head/sys/dev/usb/video/udl.c Tue Apr 21 05:41:56 2015 (r281814) +++ head/sys/dev/usb/video/udl.c Tue Apr 21 06:11:47 2015 (r281815) @@ -1082,8 +1082,7 @@ udl_select_mode(struct udl_softc *sc) } if (index == UDL_MAX_MODES) { - DPRINTF("no mode line found for %dx%d @ %dHz!\n", - mode.hdisplay, mode.vdisplay, mode.hz); + DPRINTF("no mode line found\n"); i = 0; while (i < sc->sc_edid_info.edid_nmodes) { From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 06:46:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1D53B91; Tue, 21 Apr 2015 06:46:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8647819F4; Tue, 21 Apr 2015 06:46:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L6kCZw009401; Tue, 21 Apr 2015 06:46:12 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L6kCY2009400; Tue, 21 Apr 2015 06:46:12 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504210646.t3L6kCY2009400@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 06:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281816 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 06:46:12 -0000 Author: glebius Date: Tue Apr 21 06:46:11 2015 New Revision: 281816 URL: https://svnweb.freebsd.org/changeset/base/281816 Log: Since brgphy doesn't call mii_phy_setmedia(), there is no reason to set any value to ifm_data. If brgphy ever to call mii_phy_setmedia(), then the value of BRGPHY_S1000 | BRGPHY_BMCR_FDX will trigger KASSERT. While here, remove the obfuscating macro and wrap long lines. Sponsored by: Nginx, Inc. Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Tue Apr 21 06:11:47 2015 (r281815) +++ head/sys/dev/mii/brgphy.c Tue Apr 21 06:46:11 2015 (r281816) @@ -266,20 +266,25 @@ brgphy_attach(device_t dev) sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); device_printf(dev, " "); -#define ADD(m, c) ifmedia_add(&sc->mii_pdata->mii_media, (m), (c), NULL) - /* Add the supported media types */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { mii_phy_add_media(sc); printf("\n"); } else { sc->mii_anegticks = MII_ANEGTICKS_GIGE; - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst), - BRGPHY_S1000 | BRGPHY_BMCR_FDX); + ifmedia_add(&sc->mii_pdata->mii_media, + IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst), + 0, NULL); printf("1000baseSX-FDX, "); - /* 2.5G support is a software enabled feature on the 5708S and 5709S. */ - if (bce_sc && (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG)) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, sc->mii_inst), 0); + /* + * 2.5G support is a software enabled feature + * on the 5708S and 5709S. + */ + if (bce_sc && (bce_sc->bce_phy_flags & + BCE_PHY_2_5G_CAPABLE_FLAG)) { + ifmedia_add(&sc->mii_pdata->mii_media, + IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, + sc->mii_inst), 0, NULL); printf("2500baseSX-FDX, "); } else if ((bsc->serdes_flags & BRGPHY_5708S) && bce_sc && (detect_hs21(bce_sc) != 0)) { @@ -295,11 +300,11 @@ brgphy_attach(device_t dev) printf("auto-neg workaround, "); bsc->serdes_flags |= BRGPHY_NOANWAIT; } - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); + ifmedia_add(&sc->mii_pdata->mii_media, IFM_MAKEWORD(IFM_ETHER, + IFM_AUTO, 0, sc->mii_inst), 0, NULL); printf("auto\n"); } -#undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); return (0); } From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 06:59:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51F8CD97; Tue, 21 Apr 2015 06:59:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 403821AEF; Tue, 21 Apr 2015 06:59:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L6xf29019981; Tue, 21 Apr 2015 06:59:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L6xfbc019980; Tue, 21 Apr 2015 06:59:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504210659.t3L6xfbc019980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 06:59:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281817 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 06:59:41 -0000 Author: glebius Date: Tue Apr 21 06:59:40 2015 New Revision: 281817 URL: https://svnweb.freebsd.org/changeset/base/281817 Log: Since xmphy doesn't call mii_phy_setmedia(), there is no reason to set ifm_data. Sponsored by: Nginx, Inc. Modified: head/sys/dev/mii/xmphy.c Modified: head/sys/dev/mii/xmphy.c ============================================================================== --- head/sys/dev/mii/xmphy.c Tue Apr 21 06:46:11 2015 (r281816) +++ head/sys/dev/mii/xmphy.c Tue Apr 21 06:59:40 2015 (r281817) @@ -116,16 +116,15 @@ xmphy_attach(device_t dev) PHY_RESET(sc); -#define ADD(m, c) ifmedia_add(&sc->mii_pdata->mii_media, (m), (c), NULL) +#define ADD(m) ifmedia_add(&sc->mii_pdata->mii_media, (m), 0, NULL) #define PRINT(s) printf("%s%s", sep, s); sep = ", " device_printf(dev, " "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, 0, sc->mii_inst), - XMPHY_BMCR_FDX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, 0, sc->mii_inst)); PRINT("1000baseSX"); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst), 0); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst)); PRINT("1000baseSX-FDX"); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst)); PRINT("auto"); printf("\n"); From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 07:13:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9722B20C; Tue, 21 Apr 2015 07:13:32 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 41BE91CD7; Tue, 21 Apr 2015 07:13:31 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 126DB1045EA0; Tue, 21 Apr 2015 16:48:36 +1000 (AEST) Date: Tue, 21 Apr 2015 16:48:35 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eric van Gyzen cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281787 - head/sbin/dmesg In-Reply-To: <201504202007.t3KK7dtj000379@svn.freebsd.org> Message-ID: <20150421151131.T1396@besplex.bde.org> References: <201504202007.t3KK7dtj000379@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=_cJNZYTe81WAuVWcR9kA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 07:13:32 -0000 On Mon, 20 Apr 2015, Eric van Gyzen wrote: > Log: > dmesg: accommodate message buffer growth between the sysctl calls > > Allocate 12.5% extra space to avoid ENOMEM when the message buffer > is growing steadily. This is bogus allocation. The message buffer has a small fixed size so that it fits in physical memory in the kernel, and rarely changes its size after it fills up. Userland can easily statically allocate a buffer 1000 if not 1000000 times as large as the full size in virtual memory. This is much easier to do than even half-baked dynamic allocation. > Modified: head/sbin/dmesg/dmesg.c > ============================================================================== > --- head/sbin/dmesg/dmesg.c Mon Apr 20 20:06:25 2015 (r281786) > +++ head/sbin/dmesg/dmesg.c Mon Apr 20 20:07:39 2015 (r281787) > @@ -118,6 +118,9 @@ main(int argc, char *argv[]) > */ > if (sysctlbyname("kern.msgbuf", NULL, &buflen, NULL, 0) == -1) > err(1, "sysctl kern.msgbuf"); > + /* Allocate extra room for growth between the sysctl calls. */ > + buflen += buflen/8; > + /* Allocate more than sysctl sees, for room to append \n\0. */ > if ((bp = malloc(buflen + 2)) == NULL) > errx(1, "malloc failed"); > if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == -1) This still fails if the size grows more than 12.5%. This adds some style bugs: - missing spaces around binary operator - verboseness. There is already a verbose comment about the method just above here - new verbose comments not made less verbose by not adding newline delimiters for the block (a single statement) of code that they describe, unlike some old single-line comments in the file. - (old style bug). Expansion of the verbose comment above gave a worse comment scope obfuscation. Code to adjust the buffer actually needs to be in a different block, but the comment about this code is appended to the main comment and the adjustment is not even appended. Non-half-baked dynamic initialization would check the error returned by the first sysctl, and if it is ENOMEM, then retry. This is actually simpler, since it doesn't need the second sysctl (except dynamically, and almost never then). Allocate some memory before starting the loop. This doesn't need any comments since it is obviously the only correct way to determine the amount of memory needed if the size can change. Dynamic allocation is still overkill. For the initial size, use MSG_BUFSIZE (+2) from . MSG_BUFSIZE is not quite unusable outside of the kernel. It is just a default, so cannot be used correctly outside of the kernel, but given that it exists, it is slightly better than an arbitrary value for the initial size, since that gives only 1 iteration of the loop in the usual case where dmesg was compiled with the same sources as the kernel and the user didn't change the default. Untested version: X buflen = MSGBUFSIZ / 2; X bp = NULL; X do { X buflen *= 2; X if ((bp = reallocf(bp, buflen + 2)) == NULL) X errx(1, "malloc failed"); X if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == 0) X break; X if (errno != ENOMEM) X err(1, "sysctl kern.msgbuf"); X } while (0); The error handling is still painful. malloc() failure can't happen, but I preserved the check for it. buflen *= 2 can overflow, but I omitted checking for it. This should be safe since the overflow only malloc() failures (that can't happen) have happened. phk has railed against the practice of starting with a small size and doubling it. Starting with a large size and hoping to never change it is better for bloatware. The above does the latter, except the "large" size is small. Doubling it is correct since anyone changing the default shouldn't make small adjustments. But small utilities don't need any dynamic allocation. They can allocate "large" buffers that are actually small using static allocation. Another not so good way to do the above is have a sysctl that returns the full msgbuf size. This cannot change. Then the only change needed in the original code is to change the first sysctl to determine the full size. All kernel parameters that are not constant because they may be changed by kernel options should have such a sysctl and shouldn't have any manifest constant (except as a default or minimum value, like POSIX minimum values for sysconf()). But using such a constant here just takes more code. It takes 1 sysctl() to determine the size, then a malloc(), then 1 sysctl() (but not in a loop) to use the size. Fully dynamical allocation starting with a reasonably large size usually only needs 1 malloc() and 1 sysctl(). Elsewhere, in much more important places, there is an enormous amount of sloppy code that abuses POSIX manifest constants like PATH_MAX instead of technically correct dynamic code using sysconf(), since static allocation is usually good enough and dynamic allocation is so painful. E.g., static allocation using PATH_MAX is: char path[PATH_MAX]; /* technically broken */ char path2[MAXPATHLEN]; /* honestly unportable */ and using sysconf() it is: long len = sysconf(_SC_PATH_MAX); /* Several lines to check for and handle errors in sysconf(). */ /* Several lines to check for and handle len being unrepresentable * size_t. */ path = malloc(len); /* Several lines to check for and handle errors in malloc(). */ and using PATH_MAX and sysconf() it is: #ifdef PATH_MAX char path[PATH_MAX]; /* assume comp. detects if too large #else /* Above code for dynamic case. */ #endif Bruce From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 07:42:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CF027AB; Tue, 21 Apr 2015 07:42:59 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C7C49102C; Tue, 21 Apr 2015 07:42:58 +0000 (UTC) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.1/8.15.1) with ESMTPSA id t3L7gmqO058209 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Apr 2015 07:42:50 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r281721 - head/sys/sys From: David Chisnall In-Reply-To: <20150421020808.D10623@besplex.bde.org> Date: Tue, 21 Apr 2015 08:42:41 +0100 Cc: John Baldwin , Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <785A553E-317E-4C80-83A0-567C80697ED8@FreeBSD.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 07:42:59 -0000 On 20 Apr 2015, at 17:19, Bruce Evans wrote: >=20 > Enums should never be used in ABIs, since their size can be anything > large enough. The rules for the size of enums also differ between C and C++, though = clang (and, I think, gcc) support an attribute for specifying the enum = type. > They also cause namespace problems. The whole enum declaration must > be exposed in any header that uses an enum type. Both C and C++ permit forward declarations of enums for use in function = prototypes and so on, e.g.: enum foo; void bar(enum foo); David From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 08:54:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CEB87C9; Tue, 21 Apr 2015 08:54:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 601C21885; Tue, 21 Apr 2015 08:54:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L8sFte024299; Tue, 21 Apr 2015 08:54:15 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L8sFOi024298; Tue, 21 Apr 2015 08:54:15 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504210854.t3L8sFOi024298@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 08:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281819 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 08:54:15 -0000 Author: glebius Date: Tue Apr 21 08:54:14 2015 New Revision: 281819 URL: https://svnweb.freebsd.org/changeset/base/281819 Log: The comment on BMCR data in if_media entry is wrong. The ifm_data stores the index array, not a value for BMCR register. In case of IFM_10_T there could be either MII_MEDIA_10_T or MII_MEDIA_10_T_FDX, which are 1 and 2, accordingly. Neither matches a valid BMCR value. My guessing is that this write is harmless, since later mii_phy_setmedia() would write a proper value there. The code is here since the initial checkin. Note that case IFM_100_TX has the same comment, but a proper value of BMCR_ISO is written. So, collapse two cases into one, always writing there BMCR_ISO. Sponsored by: Nginx, Inc. Modified: head/sys/dev/mii/mlphy.c Modified: head/sys/dev/mii/mlphy.c ============================================================================== --- head/sys/dev/mii/mlphy.c Tue Apr 21 08:47:27 2015 (r281818) +++ head/sys/dev/mii/mlphy.c Tue Apr 21 08:54:14 2015 (r281819) @@ -220,29 +220,11 @@ mlphy_service(xsc, mii, cmd) msc->ml_linked = 0; return (0); case IFM_10_T: - /* - * For 10baseT modes, reset and program the - * companion PHY (of any), then program ourselves - * to match. This will put us in pass-through - * mode and let the companion PHY do all the - * work. - * - * BMCR data is stored in the ifmedia entry. - */ - if (other != NULL) { - PHY_RESET(other); - PHY_WRITE(other, MII_BMCR, ife->ifm_data); - } - mii_phy_setmedia(sc); - msc->ml_state = 0; - break; case IFM_100_TX: /* - * For 100baseTX modes, reset and isolate the - * companion PHY (if any), then program ourselves + * For 10baseT and 100baseTX modes, reset and isolate + * the companion PHY (if any), then program ourselves * accordingly. - * - * BMCR data is stored in the ifmedia entry. */ if (other != NULL) { PHY_RESET(other); From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 09:11:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E161EAC; Tue, 21 Apr 2015 09:11: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C4C41A9E; Tue, 21 Apr 2015 09:11:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L9BTDc038323; Tue, 21 Apr 2015 09:11:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L9BTp7038322; Tue, 21 Apr 2015 09:11:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504210911.t3L9BTp7038322@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 21 Apr 2015 09:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281820 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 09:11:29 -0000 Author: trasz Date: Tue Apr 21 09:11:28 2015 New Revision: 281820 URL: https://svnweb.freebsd.org/changeset/base/281820 Log: Add hint about "volmode=dev" to ctl.conf(5). Differential Revision: https://reviews.freebsd.org/D2328 Reviewed by: allanjude@, bcr@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Tue Apr 21 08:54:14 2015 (r281819) +++ head/usr.sbin/ctld/ctl.conf.5 Tue Apr 21 09:11:28 2015 (r281820) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2015 +.Dd April 19, 2015 .Dt CTL.CONF 5 .Os .Sh NAME @@ -365,7 +365,12 @@ All CTL-specific options are documented section of .Xr ctladm 8 . .It Ic path Ar path -The path to the file or device node used to back the LUN. +The path to the file, device node, or +.Xr zfs 8 +volume used to back the LUN. +For optimal performance, create the volume with the +.Qq Ar volmode=dev +property set. .It Ic serial Ar string The SCSI serial number presented to the initiator. .It Ic size Ar size @@ -435,7 +440,8 @@ target naa.50015178f369f092 { .Sh SEE ALSO .Xr ctl 4 , .Xr ctladm 8 , -.Xr ctld 8 +.Xr ctld 8 , +.Xr zfs 8 .Sh AUTHORS The .Nm From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 09:32:36 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3CA03B6; Tue, 21 Apr 2015 09:32:36 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 85D221CF2; Tue, 21 Apr 2015 09:32:35 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 7023F4269AD; Tue, 21 Apr 2015 19:32:31 +1000 (AEST) Date: Tue, 21 Apr 2015 19:32:30 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Chisnall cc: Bruce Evans , John Baldwin , Justin Hibbits , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r281721 - head/sys/sys In-Reply-To: <785A553E-317E-4C80-83A0-567C80697ED8@FreeBSD.org> Message-ID: <20150421184157.Y2048@besplex.bde.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> <785A553E-317E-4C80-83A0-567C80697ED8@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=dKqfxopb c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=FpqDrhUIJt8TsK9rtWoA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 09:32:37 -0000 On Tue, 21 Apr 2015, David Chisnall wrote: > On 20 Apr 2015, at 17:19, Bruce Evans wrote: >> >> Enums should never be used in ABIs, since their size can be anything >> large enough. > > The rules for the size of enums also differ between C and C++, though clang (and, I think, gcc) support an attribute for specifying the enum type. > >> They also cause namespace problems. The whole enum declaration must >> be exposed in any header that uses an enum type. > > Both C and C++ permit forward declarations of enums for use in function prototypes and so on, e.g.: > > enum foo; > void > bar(enum foo); No, they cannot do this since the size may depend on the internals of the enum: TendDRA-5.0.0: "z.c", line 1: Error: [ISO C90 6.5.2.3]: Can't declare the enumeration 'enum foo'. gcc-4.2.1 -std=c99 -pedantic: z.c:1: warning: ISO C forbids forward references to 'enum' types z.c:3: warning: ISO C forbids forward references to 'enum' types clang-current -std==c99 -pedantic z.c:1:6: warning: ISO C forbids forward references to 'enum' types [-Wpedantic] g++-4.2.1: z.cc:1: error: use of enum `foo' without previous declaration clang++-current: z.cc:1:6: error: ISO C++ forbids forward references to 'enum' types It takes -pedantic to turn gcc-4.2.1 and clang-current into something resembling C99 compilers, but in gcc++-4.2.1 and clang++-current nothing is required and error is actually an error. gcc and clang are still far behind TenDRA in the quality of their diagnostics. I thought that forward declarations of enums were allowed too, until recently when their brokenness turned up in kernel builds. syscallsubr.h is broken, since it uses `enum idtype' without declaring it, except bogusly as a forward declaration as above. Only kern_wait6() and kern_procctl() use this enum. (syscallsubr.h also uses the older mistake `enum uio_seg', but it has the namespace pollution of including to get this instead of being broken by this. `enum uio seg' is under __BSD_VISIBLE, but it seems to be bogus to export it to userland since it is only useful in the kernel. struct uio is kernel-only. wait6(2) has somewhat different design errors. It spells `enum idtype' as idtype_t and also uses id_t. `enum idtype' is declared with wait6() in where it is not so polluting, but still needs anti-pollution ifdefs since only idtype_t is standard.) The bug in syscallsubr.h was detected as a side effect when I enabled -pedantic to check for other errors. enums are not used much in the kernel or syscalls, and they seem to mostly have complete declarations. The pollution problem would be larger if there were more of them. POSIX has excessive typedefs, but almost no enums, at least in old versions. In a 2001 draft, it has just 4 lines out of 209786 containing `enum', and a a few more containing `enumeration type'. Its only enum types are: /* For the bsearch family: */ enum { FIND, ENTER } ACTION; enum { preorder, postorder, endorder, leaf } VISIT; /* For wait6(): */ The type idtype_t shall be defined as an enumeration type whose possible values shall include ... Bruce From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 09:39:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF9E46CC; Tue, 21 Apr 2015 09:39:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACEF41D49; Tue, 21 Apr 2015 09:39:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L9dnHt061953; Tue, 21 Apr 2015 09:39:49 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L9dmL0061947; Tue, 21 Apr 2015 09:39:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504210939.t3L9dmL0061947@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 09:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281821 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 09:39:50 -0000 Author: glebius Date: Tue Apr 21 09:39:48 2015 New Revision: 281821 URL: https://svnweb.freebsd.org/changeset/base/281821 Log: Instead of storing mii_media_table array index in ifm_data, determine it in mii_phy_setmedia() functionally. Sponsored by: Nginx, Inc. Modified: head/sys/dev/mii/acphy.c head/sys/dev/mii/lxtphy.c head/sys/dev/mii/mii_physubr.c head/sys/dev/mii/miivar.h Modified: head/sys/dev/mii/acphy.c ============================================================================== --- head/sys/dev/mii/acphy.c Tue Apr 21 09:11:28 2015 (r281820) +++ head/sys/dev/mii/acphy.c Tue Apr 21 09:39:48 2015 (r281821) @@ -139,14 +139,12 @@ acphy_attach(device_t dev) sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & sc->mii_capmask; device_printf(dev, " "); -#define ADD(m, c) ifmedia_add(&sc->mii_pdata->mii_media, (m), (c), NULL) +#define ADD(m) ifmedia_add(&sc->mii_pdata->mii_media, (m), 0, NULL) if ((PHY_READ(sc, MII_ACPHY_MCTL) & AC_MCTL_FX_SEL) != 0) { sc->mii_flags |= MIIF_HAVEFIBER; - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst), - MII_MEDIA_100_TX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst)); printf("100baseFX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst), - MII_MEDIA_100_TX_FDX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst)); printf("100baseFX-FDX, "); } #undef ADD Modified: head/sys/dev/mii/lxtphy.c ============================================================================== --- head/sys/dev/mii/lxtphy.c Tue Apr 21 09:11:28 2015 (r281820) +++ head/sys/dev/mii/lxtphy.c Tue Apr 21 09:39:48 2015 (r281821) @@ -142,12 +142,10 @@ lxtphy_attach(device_t dev) sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & sc->mii_capmask; device_printf(dev, " "); -#define ADD(m, c) ifmedia_add(&sc->mii_pdata->mii_media, (m), (c), NULL) - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst), - MII_MEDIA_100_TX); +#define ADD(m) ifmedia_add(&sc->mii_pdata->mii_media, (m), 0, NULL) + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst)); printf("100baseFX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst), - MII_MEDIA_100_TX_FDX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst)); printf("100baseFX-FDX, "); #undef ADD Modified: head/sys/dev/mii/mii_physubr.c ============================================================================== --- head/sys/dev/mii/mii_physubr.c Tue Apr 21 09:11:28 2015 (r281820) +++ head/sys/dev/mii/mii_physubr.c Tue Apr 21 09:39:48 2015 (r281821) @@ -54,9 +54,28 @@ __FBSDID("$FreeBSD$"); #include "miibus_if.h" /* - * Media to register setting conversion table. Order matters. + * + * An array of structures to map MII media types to BMCR/ANAR settings. */ -static const struct mii_media mii_media_table[MII_NMEDIA] = { +enum { + MII_MEDIA_NONE = 0, + MII_MEDIA_10_T, + MII_MEDIA_10_T_FDX, + MII_MEDIA_100_T4, + MII_MEDIA_100_TX, + MII_MEDIA_100_TX_FDX, + MII_MEDIA_1000_X, + MII_MEDIA_1000_X_FDX, + MII_MEDIA_1000_T, + MII_MEDIA_1000_T_FDX, + MII_NMEDIA, +}; + +static const struct mii_media { + u_int mm_bmcr; /* BMCR settings for this media */ + u_int mm_anar; /* ANAR settings for this media */ + u_int mm_gtcr; /* 100base-T2 or 1000base-T CR */ +} mii_media_table[MII_NMEDIA] = { /* None */ { BMCR_ISO, ANAR_CSMA, 0, }, @@ -104,8 +123,10 @@ mii_phy_setmedia(struct mii_softc *sc) struct mii_data *mii = sc->mii_pdata; struct ifmedia_entry *ife = mii->mii_media.ifm_cur; int bmcr, anar, gtcr; + int index = -1; - if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) { + switch (IFM_SUBTYPE(ife->ifm_media)) { + case IFM_AUTO: /* * Force renegotiation if MIIF_DOPAUSE or MIIF_FORCEANEG. * The former is necessary as we might switch from flow- @@ -115,19 +136,78 @@ mii_phy_setmedia(struct mii_softc *sc) (sc->mii_flags & (MIIF_DOPAUSE | MIIF_FORCEANEG)) != 0) (void)mii_phy_auto(sc); return; + + case IFM_NONE: + index = MII_MEDIA_NONE; + break; + + case IFM_HPNA_1: + index = MII_MEDIA_10_T; + break; + + case IFM_10_T: + switch (IFM_OPTIONS(ife->ifm_media)) { + case 0: + index = MII_MEDIA_10_T; + break; + case IFM_FDX: + case (IFM_FDX | IFM_FLOW): + index = MII_MEDIA_10_T_FDX; + break; + }; + break; + + case IFM_100_TX: + case IFM_100_FX: + switch (IFM_OPTIONS(ife->ifm_media)) { + case 0: + index = MII_MEDIA_100_TX; + break; + case IFM_FDX: + case (IFM_FDX | IFM_FLOW): + index = MII_MEDIA_100_TX_FDX; + break; + } + break; + + case IFM_100_T4: + index = MII_MEDIA_100_T4; + break; + + case IFM_1000_SX: + switch (IFM_OPTIONS(ife->ifm_media)) { + case 0: + index = MII_MEDIA_1000_X; + break; + case IFM_FDX: + case (IFM_FDX | IFM_FLOW): + index = MII_MEDIA_1000_X_FDX; + break; + } + break; + + case IFM_1000_T: + switch (IFM_OPTIONS(ife->ifm_media)) { + case 0: + case IFM_ETH_MASTER: + index = MII_MEDIA_1000_T; + break; + case IFM_FDX: + case (IFM_FDX | IFM_ETH_MASTER): + case (IFM_FDX | IFM_FLOW): + case (IFM_FDX | IFM_FLOW | IFM_ETH_MASTER): + index = MII_MEDIA_1000_T_FDX; + break; + } + break; } - /* - * Table index is stored in the media entry. - */ + KASSERT(index != -1, ("%s: failed to map media word %d", + __func__, ife->ifm_media)); - KASSERT(ife->ifm_data >=0 && ife->ifm_data < MII_NMEDIA, - ("invalid ife->ifm_data (0x%x) in mii_phy_setmedia", - ife->ifm_data)); - - anar = mii_media_table[ife->ifm_data].mm_anar; - bmcr = mii_media_table[ife->ifm_data].mm_bmcr; - gtcr = mii_media_table[ife->ifm_data].mm_gtcr; + anar = mii_media_table[index].mm_anar; + bmcr = mii_media_table[index].mm_bmcr; + gtcr = mii_media_table[index].mm_gtcr; if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { gtcr |= GTCR_MAN_MS; @@ -318,12 +398,11 @@ mii_phy_add_media(struct mii_softc *sc) */ sc->mii_anegticks = MII_ANEGTICKS; -#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) +#define ADD(m) ifmedia_add(&mii->mii_media, (m), 0, NULL) #define PRINT(s) printf("%s%s", sep, s); sep = ", " if ((sc->mii_flags & MIIF_NOISOLATE) == 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), - MII_MEDIA_NONE); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst)); PRINT("none"); } @@ -335,51 +414,44 @@ mii_phy_add_media(struct mii_softc *sc) if ((sc->mii_flags & MIIF_IS_HPNA) != 0) { if ((sc->mii_capabilities & BMSR_10THDX) != 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_HPNA_1, 0, - sc->mii_inst), MII_MEDIA_10_T); + sc->mii_inst)); PRINT("HomePNA1"); } return; } if ((sc->mii_capabilities & BMSR_10THDX) != 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, sc->mii_inst), - MII_MEDIA_10_T); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, sc->mii_inst)); PRINT("10baseT"); } if ((sc->mii_capabilities & BMSR_10TFDX) != 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, sc->mii_inst), - MII_MEDIA_10_T_FDX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, sc->mii_inst)); PRINT("10baseT-FDX"); if ((sc->mii_flags & MIIF_DOPAUSE) != 0 && (sc->mii_flags & MIIF_NOMANPAUSE) == 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, - IFM_FDX | IFM_FLOW, sc->mii_inst), - MII_MEDIA_10_T_FDX); + IFM_FDX | IFM_FLOW, sc->mii_inst)); PRINT("10baseT-FDX-flow"); } fdx = 1; } if ((sc->mii_capabilities & BMSR_100TXHDX) != 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, sc->mii_inst), - MII_MEDIA_100_TX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, sc->mii_inst)); PRINT("100baseTX"); } if ((sc->mii_capabilities & BMSR_100TXFDX) != 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, sc->mii_inst), - MII_MEDIA_100_TX_FDX); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, sc->mii_inst)); PRINT("100baseTX-FDX"); if ((sc->mii_flags & MIIF_DOPAUSE) != 0 && (sc->mii_flags & MIIF_NOMANPAUSE) == 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, - IFM_FDX | IFM_FLOW, sc->mii_inst), - MII_MEDIA_100_TX_FDX); + IFM_FDX | IFM_FLOW, sc->mii_inst)); PRINT("100baseTX-FDX-flow"); } fdx = 1; } if ((sc->mii_capabilities & BMSR_100T4) != 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_T4, 0, sc->mii_inst), - MII_MEDIA_100_T4); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_T4, 0, sc->mii_inst)); PRINT("100baseT4"); } @@ -392,20 +464,19 @@ mii_phy_add_media(struct mii_softc *sc) sc->mii_anegticks = MII_ANEGTICKS_GIGE; sc->mii_flags |= MIIF_IS_1000X; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, 0, - sc->mii_inst), MII_MEDIA_1000_X); + sc->mii_inst)); PRINT("1000baseSX"); } if ((sc->mii_extcapabilities & EXTSR_1000XFDX) != 0) { sc->mii_anegticks = MII_ANEGTICKS_GIGE; sc->mii_flags |= MIIF_IS_1000X; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, - sc->mii_inst), MII_MEDIA_1000_X_FDX); + sc->mii_inst)); PRINT("1000baseSX-FDX"); if ((sc->mii_flags & MIIF_DOPAUSE) != 0 && (sc->mii_flags & MIIF_NOMANPAUSE) == 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, - IFM_FDX | IFM_FLOW, sc->mii_inst), - MII_MEDIA_1000_X_FDX); + IFM_FDX | IFM_FLOW, sc->mii_inst)); PRINT("1000baseSX-FDX-flow"); } fdx = 1; @@ -421,31 +492,29 @@ mii_phy_add_media(struct mii_softc *sc) sc->mii_anegticks = MII_ANEGTICKS_GIGE; sc->mii_flags |= MIIF_HAVE_GTCR; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, - sc->mii_inst), MII_MEDIA_1000_T); + sc->mii_inst)); PRINT("1000baseT"); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, - IFM_ETH_MASTER, sc->mii_inst), MII_MEDIA_1000_T); + IFM_ETH_MASTER, sc->mii_inst)); PRINT("1000baseT-master"); } if ((sc->mii_extcapabilities & EXTSR_1000TFDX) != 0) { sc->mii_anegticks = MII_ANEGTICKS_GIGE; sc->mii_flags |= MIIF_HAVE_GTCR; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, - sc->mii_inst), MII_MEDIA_1000_T_FDX); + sc->mii_inst)); PRINT("1000baseT-FDX"); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, - IFM_FDX | IFM_ETH_MASTER, sc->mii_inst), - MII_MEDIA_1000_T_FDX); + IFM_FDX | IFM_ETH_MASTER, sc->mii_inst)); PRINT("1000baseT-FDX-master"); if ((sc->mii_flags & MIIF_DOPAUSE) != 0 && (sc->mii_flags & MIIF_NOMANPAUSE) == 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, - IFM_FDX | IFM_FLOW, sc->mii_inst), - MII_MEDIA_1000_T_FDX); + IFM_FDX | IFM_FLOW, sc->mii_inst)); PRINT("1000baseT-FDX-flow"); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX | IFM_FLOW | IFM_ETH_MASTER, - sc->mii_inst), MII_MEDIA_1000_T_FDX); + sc->mii_inst)); PRINT("1000baseT-FDX-flow-master"); } fdx = 1; @@ -454,12 +523,11 @@ mii_phy_add_media(struct mii_softc *sc) if ((sc->mii_capabilities & BMSR_ANEG) != 0) { /* intentionally invalid index */ - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), - MII_NMEDIA); + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst)); PRINT("auto"); if (fdx != 0 && (sc->mii_flags & MIIF_DOPAUSE) != 0) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, IFM_FLOW, - sc->mii_inst), MII_NMEDIA); + sc->mii_inst)); PRINT("auto-flow"); } } Modified: head/sys/dev/mii/miivar.h ============================================================================== --- head/sys/dev/mii/miivar.h Tue Apr 21 09:11:28 2015 (r281820) +++ head/sys/dev/mii/miivar.h Tue Apr 21 09:39:48 2015 (r281821) @@ -180,27 +180,6 @@ struct mii_phydesc { MII_STR_ ## a ## _ ## b } #define MII_PHY_END { 0, 0, NULL } -/* - * An array of these structures map MII media types to BMCR/ANAR settings. - */ -struct mii_media { - u_int mm_bmcr; /* BMCR settings for this media */ - u_int mm_anar; /* ANAR settings for this media */ - u_int mm_gtcr; /* 100base-T2 or 1000base-T CR */ -}; - -#define MII_MEDIA_NONE 0 -#define MII_MEDIA_10_T 1 -#define MII_MEDIA_10_T_FDX 2 -#define MII_MEDIA_100_T4 3 -#define MII_MEDIA_100_TX 4 -#define MII_MEDIA_100_TX_FDX 5 -#define MII_MEDIA_1000_X 6 -#define MII_MEDIA_1000_X_FDX 7 -#define MII_MEDIA_1000_T 8 -#define MII_MEDIA_1000_T_FDX 9 -#define MII_NMEDIA 10 - #ifdef _KERNEL #define PHY_READ(p, r) \ From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 09:59:06 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7FF9BE2; Tue, 21 Apr 2015 09:59:06 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18F0A1F6F; Tue, 21 Apr 2015 09:59:05 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t3L9x086034723 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 21 Apr 2015 12:59:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t3L9x086034723 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t3L9x0WV034722; Tue, 21 Apr 2015 12:59:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 21 Apr 2015 12:59:00 +0300 From: Konstantin Belousov To: Bruce Evans Cc: David Chisnall , John Baldwin , Justin Hibbits , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r281721 - head/sys/sys Message-ID: <20150421095900.GL2390@kib.kiev.ua> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> <785A553E-317E-4C80-83A0-567C80697ED8@FreeBSD.org> <20150421184157.Y2048@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150421184157.Y2048@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 09:59:06 -0000 On Tue, Apr 21, 2015 at 07:32:30PM +1000, Bruce Evans wrote: > On Tue, 21 Apr 2015, David Chisnall wrote: > > > On 20 Apr 2015, at 17:19, Bruce Evans wrote: > >> > >> Enums should never be used in ABIs, since their size can be anything > >> large enough. > > > > The rules for the size of enums also differ between C and C++, though clang (and, I think, gcc) support an attribute for specifying the enum type. > > > >> They also cause namespace problems. The whole enum declaration must > >> be exposed in any header that uses an enum type. > > > > Both C and C++ permit forward declarations of enums for use in function prototypes and so on, e.g.: > > > > enum foo; > > void > > bar(enum foo); > > No, they cannot do this since the size may depend on the internals of the > enum: > > TendDRA-5.0.0: > "z.c", line 1: Error: > [ISO C90 6.5.2.3]: Can't declare the enumeration 'enum foo'. > This is not true for C. The i386 ABI specification, from year _1997_, states that enum must be 4-bytes unsigned entity, 4-bytes aligned. See page 28 of abi386-4.pdf. From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 10:17:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE700194; Tue, 21 Apr 2015 10:17:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD3801198; Tue, 21 Apr 2015 10:17:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LAHPVT094230; Tue, 21 Apr 2015 10:17:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LAHPk6094229; Tue, 21 Apr 2015 10:17:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504211017.t3LAHPk6094229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 21 Apr 2015 10:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281823 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 10:17:26 -0000 Author: ngie Date: Tue Apr 21 10:17:25 2015 New Revision: 281823 URL: https://svnweb.freebsd.org/changeset/base/281823 Log: Serialize all of _kerberos5_bootstrap_tools to avoid build failures involving make bootstrap-tools On the plus side, this also greatly reduces complexity MFC after: 1 week Pointyhat to: ngie Reported by: Willem Jan Withagen Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Apr 21 09:47:27 2015 (r281822) +++ head/Makefile.inc1 Tue Apr 21 10:17:25 2015 (r281823) @@ -1357,13 +1357,7 @@ _kerberos5_bootstrap_tools= \ kerberos5/tools/slc \ usr.bin/compile_et -${_bt}-kerberos5/lib/libroken: ${_bt}-kerberos5/tools/make-roken -${_bt}-kerberos5/tools/asn1_compile: \ - ${_bt}-kerberos5/lib/libroken ${_bt}-kerberos5/lib/libvers -${_bt}-kerberos5/tools/slc: \ - ${_bt}-kerberos5/lib/libroken ${_bt}-kerberos5/lib/libvers -${_bt}-usr.bin/compile_et: \ - ${_bt}-kerberos5/lib/libroken ${_bt}-kerberos5/lib/libvers +.ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} .endif bootstrap-tools: .PHONY From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 10:35:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3125A758; Tue, 21 Apr 2015 10:35:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F879139E; Tue, 21 Apr 2015 10:35:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LAZO0K007688; Tue, 21 Apr 2015 10:35:24 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LAZO4D007682; Tue, 21 Apr 2015 10:35:24 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504211035.t3LAZO4D007682@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 10:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281824 - in head/sys: conf net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 10:35:25 -0000 Author: glebius Date: Tue Apr 21 10:35:23 2015 New Revision: 281824 URL: https://svnweb.freebsd.org/changeset/base/281824 Log: Make IFMEDIA_DEBUG a kernel option. Sponsored by: Nginx, Inc. Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/net/if_media.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Apr 21 10:17:25 2015 (r281823) +++ head/sys/conf/NOTES Tue Apr 21 10:35:23 2015 (r281824) @@ -2836,6 +2836,7 @@ options INIT_PATH=/sbin/init:/rescue/in options BUS_DEBUG # enable newbus debugging options DEBUG_VFS_LOCKS # enable VFS lock debugging options SOCKBUF_DEBUG # enable sockbuf last record/mb tail checking +options IFMEDIA_DEBUG # enable debugging in net/if_media.c # # Verbose SYSINIT Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Apr 21 10:17:25 2015 (r281823) +++ head/sys/conf/options Tue Apr 21 10:35:23 2015 (r281824) @@ -553,6 +553,7 @@ LPT_DEBUG opt_lpt.h PLIP_DEBUG opt_plip.h LOCKF_DEBUG opt_debug_lockf.h SI_DEBUG opt_debug_si.h +IFMEDIA_DEBUG opt_ifmedia.h # Fb options FB_DEBUG opt_fb.h Modified: head/sys/net/if_media.c ============================================================================== --- head/sys/net/if_media.c Tue Apr 21 10:17:25 2015 (r281823) +++ head/sys/net/if_media.c Tue Apr 21 10:35:23 2015 (r281824) @@ -46,6 +46,8 @@ * to implement this interface. */ +#include "opt_ifmedia.h" + #include #include #include From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 10:55:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBBD0CD9; Tue, 21 Apr 2015 10:55:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9DA0161B; Tue, 21 Apr 2015 10:55:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LAtrN1022319; Tue, 21 Apr 2015 10:55:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LAtrR1022318; Tue, 21 Apr 2015 10:55:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504211055.t3LAtrR1022318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Apr 2015 10:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281825 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 10:55:54 -0000 Author: mav Date: Tue Apr 21 10:55:53 2015 New Revision: 281825 URL: https://svnweb.freebsd.org/changeset/base/281825 Log: Rewrite physio() to not allocate pbufs for unmapped I/O. pbufs is a limited resource, and their allocator is not SMP-scalable. So instead of always allocating pbuf to immediately convert it to bio, allocate bio just here. If buffer needs kernel mapping, then pbuf is still allocated, but used only as a source of KVA and storage for a list of held pages. On 40-core system doing many 512-byte reads from user level to array of raw SSDs this change removes huge lock congestion inside pbuf allocator. It improves peak performance from ~300K to ~1.2M IOPS. On my previous 24-core system this problem also existed, but was less serious. Reviewed by: kib MFC after: 2 weeks Modified: head/sys/kern/kern_physio.c Modified: head/sys/kern/kern_physio.c ============================================================================== --- head/sys/kern/kern_physio.c Tue Apr 21 10:35:23 2015 (r281824) +++ head/sys/kern/kern_physio.c Tue Apr 21 10:55:53 2015 (r281825) @@ -25,27 +25,26 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include +#include #include +#include int physio(struct cdev *dev, struct uio *uio, int ioflag) { - struct buf *bp; - struct cdevsw *csw; + struct buf *pbuf; + struct bio *bp; + struct vm_page **pages; caddr_t sa; - u_int iolen; - int error, i, mapped; - - /* Keep the process UPAGES from being swapped. XXX: why ? */ - PHOLD(curproc); - - bp = getpbuf(NULL); - sa = bp->b_data; - error = 0; + u_int iolen, poff; + int error, i, npages, maxpages; + vm_prot_t prot; /* XXX: sanity check */ if(dev->si_iosize_max < PAGE_SIZE) { @@ -76,95 +75,128 @@ physio(struct cdev *dev, struct uio *uio uprintf("%s: request vectors=%d > 1; " "cannot split request\n", devtoname(dev), uio->uio_iovcnt); - - error = EFBIG; - goto doerror; + return (EFBIG); } + /* + * Keep the process UPAGES from being swapped. Processes swapped + * out while holding pbufs, used by swapper, may lead to deadlock. + */ + PHOLD(curproc); + + bp = g_alloc_bio(); + if (uio->uio_segflg != UIO_USERSPACE) { + pbuf = NULL; + pages = NULL; + } else if ((dev->si_flags & SI_UNMAPPED) && unmapped_buf_allowed) { + pbuf = NULL; + maxpages = btoc(MIN(uio->uio_resid, MAXPHYS)) + 1; + pages = malloc(sizeof(*pages) * maxpages, M_DEVBUF, M_WAITOK); + } else { + pbuf = getpbuf(NULL); + sa = pbuf->b_data; + maxpages = btoc(MAXPHYS); + pages = pbuf->b_pages; + } + prot = VM_PROT_READ; + if (uio->uio_rw == UIO_READ) + prot |= VM_PROT_WRITE; /* Less backwards than it looks */ + error = 0; for (i = 0; i < uio->uio_iovcnt; i++) { while (uio->uio_iov[i].iov_len) { - bp->b_flags = 0; + bzero(bp, sizeof(*bp)); if (uio->uio_rw == UIO_READ) { - bp->b_iocmd = BIO_READ; + bp->bio_cmd = BIO_READ; curthread->td_ru.ru_inblock++; } else { - bp->b_iocmd = BIO_WRITE; + bp->bio_cmd = BIO_WRITE; curthread->td_ru.ru_oublock++; } - bp->b_iodone = bdone; - bp->b_data = uio->uio_iov[i].iov_base; - bp->b_bcount = uio->uio_iov[i].iov_len; - bp->b_offset = uio->uio_offset; - bp->b_iooffset = uio->uio_offset; - bp->b_saveaddr = sa; - - /* Don't exceed drivers iosize limit */ - if (bp->b_bcount > dev->si_iosize_max) - bp->b_bcount = dev->si_iosize_max; - - /* - * Make sure the pbuf can map the request - * XXX: The pbuf has kvasize = MAXPHYS so a request - * XXX: larger than MAXPHYS - PAGE_SIZE must be - * XXX: page aligned or it will be fragmented. + bp->bio_offset = uio->uio_offset; + bp->bio_data = uio->uio_iov[i].iov_base; + bp->bio_length = uio->uio_iov[i].iov_len; + if (bp->bio_length > dev->si_iosize_max) + bp->bio_length = dev->si_iosize_max; + if (bp->bio_length > MAXPHYS) + bp->bio_length = MAXPHYS; + + /* + * Make sure the pbuf can map the request. + * The pbuf has kvasize = MAXPHYS, so a request + * larger than MAXPHYS - PAGE_SIZE must be + * page aligned or it will be fragmented. */ - iolen = ((vm_offset_t) bp->b_data) & PAGE_MASK; - if ((bp->b_bcount + iolen) > bp->b_kvasize) { - /* - * This device does not want I/O to be split. - */ + poff = (vm_offset_t)bp->bio_data & PAGE_MASK; + if (pbuf && bp->bio_length + poff > pbuf->b_kvasize) { if (dev->si_flags & SI_NOSPLIT) { uprintf("%s: request ptr %p is not " "on a page boundary; cannot split " "request\n", devtoname(dev), - bp->b_data); + bp->bio_data); error = EFBIG; goto doerror; } - bp->b_bcount = bp->b_kvasize; - if (iolen != 0) - bp->b_bcount -= PAGE_SIZE; + bp->bio_length = pbuf->b_kvasize; + if (poff != 0) + bp->bio_length -= PAGE_SIZE; } - bp->b_bufsize = bp->b_bcount; - bp->b_blkno = btodb(bp->b_offset); + bp->bio_bcount = bp->bio_length; + bp->bio_dev = dev; - csw = dev->si_devsw; - if (uio->uio_segflg == UIO_USERSPACE) { - if (dev->si_flags & SI_UNMAPPED) - mapped = 0; - else - mapped = 1; - if (vmapbuf(bp, mapped) < 0) { + if (pages) { + if ((npages = vm_fault_quick_hold_pages( + &curproc->p_vmspace->vm_map, + (vm_offset_t)bp->bio_data, bp->bio_length, + prot, pages, maxpages)) < 0) { error = EFAULT; goto doerror; } + if (pbuf) { + pmap_qenter((vm_offset_t)sa, + pages, npages); + bp->bio_data = sa + poff; + } else { + bp->bio_ma = pages; + bp->bio_ma_n = npages; + bp->bio_ma_offset = poff; + bp->bio_data = unmapped_buf; + bp->bio_flags |= BIO_UNMAPPED; + } } - dev_strategy_csw(dev, csw, bp); + dev->si_devsw->d_strategy(bp); if (uio->uio_rw == UIO_READ) - bwait(bp, PRIBIO, "physrd"); + biowait(bp, "physrd"); else - bwait(bp, PRIBIO, "physwr"); + biowait(bp, "physwr"); + + if (pages) { + if (pbuf) + pmap_qremove((vm_offset_t)sa, npages); + vm_page_unhold_pages(pages, npages); + } - if (uio->uio_segflg == UIO_USERSPACE) - vunmapbuf(bp); - iolen = bp->b_bcount - bp->b_resid; - if (iolen == 0 && !(bp->b_ioflags & BIO_ERROR)) + iolen = bp->bio_length - bp->bio_resid; + if (iolen == 0 && !(bp->bio_flags & BIO_ERROR)) goto doerror; /* EOF */ uio->uio_iov[i].iov_len -= iolen; uio->uio_iov[i].iov_base = (char *)uio->uio_iov[i].iov_base + iolen; uio->uio_resid -= iolen; uio->uio_offset += iolen; - if( bp->b_ioflags & BIO_ERROR) { - error = bp->b_error; + if (bp->bio_flags & BIO_ERROR) { + error = bp->bio_error; goto doerror; } } } doerror: - relpbuf(bp, NULL); + if (pbuf) + relpbuf(pbuf, NULL); + else if (pages) + free(pages, M_DEVBUF); + g_destroy_bio(bp); PRELE(curproc); return (error); } From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 11:50:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87755C6D; Tue, 21 Apr 2015 11:50:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7505F1BE7; Tue, 21 Apr 2015 11:50:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LBoXTU064255; Tue, 21 Apr 2015 11:50:33 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LBoWw4064248; Tue, 21 Apr 2015 11:50:32 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201504211150.t3LBoWw4064248@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Tue, 21 Apr 2015 11:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281828 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 11:50:33 -0000 Author: jah Date: Tue Apr 21 11:50:31 2015 New Revision: 281828 URL: https://svnweb.freebsd.org/changeset/base/281828 Log: Fix numerous issues in iic(4) and iicbus(4): --Allow multiple open iic fds by storing addressing state in cdevpriv --Fix, as much as possible, the baked-in race conditions in the iic ioctl interface by requesting bus ownership on I2CSTART, releasing it on I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv to use the I/O ioctls --Reduce internal iic buffer size and remove 1K read/write limit by iteratively calling iicbus_read/iicbus_write --Eliminate dynamic allocation in I2CWRITE/I2CREAD --Move handling of I2CRDWR to separate function and improve error handling --Add new I2CSADDR ioctl to store address in current cdevpriv so that I2CSTART is not needed for read(2)/write(2) to work --Redesign iicbus_request_bus() and iicbus_release_bus(): --iicbus_request_bus() no longer falls through if the bus is already owned by the requesting device. Multiple threads on the same device may want exclusive access. Also, iicbus_release_bus() was never device-recursive anyway. --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be issued again --Do not hold iicbus mtx during IICBUS_CALLBACK call. There are several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed. --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns EWOULDBLOCK; instead pass that to the caller so that it can retry if so desired. Differential Revision: https://reviews.freebsd.org/D2140 Reviewed by: imp, jhb, loos Approved by: kib (mentor) Modified: head/sys/dev/iicbus/iic.c head/sys/dev/iicbus/iic.h head/sys/dev/iicbus/iicbus_if.m head/sys/dev/iicbus/iiconf.c Modified: head/sys/dev/iicbus/iic.c ============================================================================== --- head/sys/dev/iicbus/iic.c Tue Apr 21 11:29:07 2015 (r281827) +++ head/sys/dev/iicbus/iic.c Tue Apr 21 11:50:31 2015 (r281828) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -44,28 +45,32 @@ #include "iicbus_if.h" -#define BUFSIZE 1024 - struct iic_softc { - device_t sc_dev; - u_char sc_addr; /* 7 bit address on iicbus */ - int sc_count; /* >0 if device opened */ - - char sc_buffer[BUFSIZE]; /* output buffer */ - char sc_inbuf[BUFSIZE]; /* input buffer */ - struct cdev *sc_devnode; - struct sx sc_lock; }; -#define IIC_LOCK(sc) sx_xlock(&(sc)->sc_lock) -#define IIC_UNLOCK(sc) sx_xunlock(&(sc)->sc_lock) +struct iic_cdevpriv { + struct sx lock; + struct iic_softc *sc; + bool started; + uint8_t addr; +}; + + +#define IIC_LOCK(cdp) sx_xlock(&(cdp)->lock) +#define IIC_UNLOCK(cdp) sx_xunlock(&(cdp)->lock) + +static MALLOC_DEFINE(M_IIC, "iic", "I2C device data"); static int iic_probe(device_t); static int iic_attach(device_t); static int iic_detach(device_t); static void iic_identify(driver_t *driver, device_t parent); +static void iicdtor(void *data); +static int iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last); +static int iicuio(struct cdev *dev, struct uio *uio, int ioflag); +static int iicrdwr(struct iic_cdevpriv *priv, struct iic_rdwr_data *d, int flags); static devclass_t iic_devclass; @@ -89,18 +94,13 @@ static driver_t iic_driver = { }; static d_open_t iicopen; -static d_close_t iicclose; -static d_write_t iicwrite; -static d_read_t iicread; static d_ioctl_t iicioctl; static struct cdevsw iic_cdevsw = { .d_version = D_VERSION, - .d_flags = D_TRACKCLOSE, .d_open = iicopen, - .d_close = iicclose, - .d_read = iicread, - .d_write = iicwrite, + .d_read = iicuio, + .d_write = iicuio, .d_ioctl = iicioctl, .d_name = "iic", }; @@ -127,16 +127,15 @@ iic_probe(device_t dev) static int iic_attach(device_t dev) { - struct iic_softc *sc = (struct iic_softc *)device_get_softc(dev); + struct iic_softc *sc; + sc = device_get_softc(dev); sc->sc_dev = dev; - sx_init(&sc->sc_lock, "iic"); sc->sc_devnode = make_dev(&iic_cdevsw, device_get_unit(dev), UID_ROOT, GID_WHEEL, 0600, "iic%d", device_get_unit(dev)); if (sc->sc_devnode == NULL) { device_printf(dev, "failed to create character device\n"); - sx_destroy(&sc->sc_lock); return (ENXIO); } sc->sc_devnode->si_drv1 = sc; @@ -147,11 +146,12 @@ iic_attach(device_t dev) static int iic_detach(device_t dev) { - struct iic_softc *sc = (struct iic_softc *)device_get_softc(dev); + struct iic_softc *sc; + + sc = device_get_softc(dev); if (sc->sc_devnode) destroy_dev(sc->sc_devnode); - sx_destroy(&sc->sc_lock); return (0); } @@ -159,238 +159,331 @@ iic_detach(device_t dev) static int iicopen(struct cdev *dev, int flags, int fmt, struct thread *td) { - struct iic_softc *sc = dev->si_drv1; + struct iic_cdevpriv *priv; + int error; - IIC_LOCK(sc); - if (sc->sc_count > 0) { - IIC_UNLOCK(sc); - return (EBUSY); - } + priv = malloc(sizeof(*priv), M_IIC, M_WAITOK | M_ZERO); - sc->sc_count++; - IIC_UNLOCK(sc); + sx_init(&priv->lock, "iic"); + priv->sc = dev->si_drv1; - return (0); + error = devfs_set_cdevpriv(priv, iicdtor); + if (error != 0) + free(priv, M_IIC); + + return (error); } -static int -iicclose(struct cdev *dev, int flags, int fmt, struct thread *td) +static void +iicdtor(void *data) { - struct iic_softc *sc = dev->si_drv1; + device_t iicdev, parent; + struct iic_cdevpriv *priv; - IIC_LOCK(sc); - if (!sc->sc_count) { - /* XXX: I don't think this can happen. */ - IIC_UNLOCK(sc); - return (EINVAL); - } + priv = data; + KASSERT(priv != NULL, ("iic cdevpriv should not be NULL!")); - sc->sc_count--; + iicdev = priv->sc->sc_dev; + parent = device_get_parent(iicdev); - if (sc->sc_count < 0) - panic("%s: iic_count < 0!", __func__); - IIC_UNLOCK(sc); + if (priv->started) { + iicbus_stop(parent); + iicbus_reset(parent, IIC_UNKNOWN, 0, NULL); + iicbus_release_bus(parent, iicdev); + } - return (0); + sx_destroy(&priv->lock); + free(priv, M_IIC); } static int -iicwrite(struct cdev *dev, struct uio * uio, int ioflag) +iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last) { - struct iic_softc *sc = dev->si_drv1; - device_t iicdev = sc->sc_dev; - int sent, error, count; - - IIC_LOCK(sc); - if (!sc->sc_addr) { - IIC_UNLOCK(sc); - return (EINVAL); + device_t parent; + int error, num_bytes, transferred_bytes, written_bytes; + char buffer[128]; + + parent = device_get_parent(priv->sc->sc_dev); + error = 0; + + /* + * We can only transfer up to sizeof(buffer) bytes in 1 shot, so loop until + * everything has been transferred. + */ + while ((error == 0) && (uio->uio_resid > 0)) { + + num_bytes = MIN(uio->uio_resid, sizeof(buffer)); + transferred_bytes = 0; + + if (uio->uio_rw == UIO_WRITE) { + error = uiomove(buffer, num_bytes, uio); + + while ((error == 0) && (transferred_bytes < num_bytes)) { + written_bytes = 0; + error = iicbus_write(parent, &buffer[transferred_bytes], + num_bytes - transferred_bytes, &written_bytes, 0); + transferred_bytes += written_bytes; + } + + } else if (uio->uio_rw == UIO_READ) { + error = iicbus_read(parent, buffer, + num_bytes, &transferred_bytes, + ((uio->uio_resid <= sizeof(buffer)) ? last : 0), 0); + if (error == 0) + error = uiomove(buffer, transferred_bytes, uio); + } } - if (sc->sc_count == 0) { - /* XXX: I don't think this can happen. */ - IIC_UNLOCK(sc); - return (EINVAL); - } + return (error); +} - error = iicbus_request_bus(device_get_parent(iicdev), iicdev, - IIC_DONTWAIT); - if (error) { - IIC_UNLOCK(sc); +static int +iicuio(struct cdev *dev, struct uio *uio, int ioflag) +{ + device_t parent; + struct iic_cdevpriv *priv; + int error; + uint8_t addr; + + priv = NULL; + error = devfs_get_cdevpriv((void**)&priv); + + if (error != 0) return (error); + KASSERT(priv != NULL, ("iic cdevpriv should not be NULL!")); + + IIC_LOCK(priv); + if (priv->started || (priv->addr == 0)) { + IIC_UNLOCK(priv); + return (ENXIO); } + parent = device_get_parent(priv->sc->sc_dev); - count = min(uio->uio_resid, BUFSIZE); - error = uiomove(sc->sc_buffer, count, uio); - if (error) { - IIC_UNLOCK(sc); + error = iicbus_request_bus(parent, priv->sc->sc_dev, + (ioflag & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)); + if (error != 0) { + IIC_UNLOCK(priv); return (error); } - error = iicbus_block_write(device_get_parent(iicdev), sc->sc_addr, - sc->sc_buffer, count, &sent); + if (uio->uio_rw == UIO_READ) + addr = priv->addr | LSB; + else + addr = priv->addr & ~LSB; + + error = iicbus_start(parent, addr, 0); + if (error != 0) + { + iicbus_release_bus(parent, priv->sc->sc_dev); + IIC_UNLOCK(priv); + return (error); + } - iicbus_release_bus(device_get_parent(iicdev), iicdev); - IIC_UNLOCK(sc); + error = iicuio_move(priv, uio, IIC_LAST_READ); + iicbus_stop(parent); + iicbus_release_bus(parent, priv->sc->sc_dev); + IIC_UNLOCK(priv); return (error); } static int -iicread(struct cdev *dev, struct uio * uio, int ioflag) +iicrdwr(struct iic_cdevpriv *priv, struct iic_rdwr_data *d, int flags) { - struct iic_softc *sc = dev->si_drv1; - device_t iicdev = sc->sc_dev; - int len, error = 0; - int bufsize; - - IIC_LOCK(sc); - if (!sc->sc_addr) { - IIC_UNLOCK(sc); - return (EINVAL); - } + struct iic_msg *buf, *m; + void **usrbufs; + device_t iicdev, parent; + int error, i; - if (sc->sc_count == 0) { - /* XXX: I don't think this can happen. */ - IIC_UNLOCK(sc); - return (EINVAL); - } + iicdev = priv->sc->sc_dev; + parent = device_get_parent(iicdev); + error = 0; - error = iicbus_request_bus(device_get_parent(iicdev), iicdev, - IIC_DONTWAIT); - if (error) { - IIC_UNLOCK(sc); - return (error); - } + buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_IIC, M_WAITOK); - /* max amount of data to read */ - len = min(uio->uio_resid, BUFSIZE); + error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); - error = iicbus_block_read(device_get_parent(iicdev), sc->sc_addr, - sc->sc_inbuf, len, &bufsize); - if (error) { - IIC_UNLOCK(sc); - return (error); + /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_IIC, M_WAITOK | M_ZERO); + + for (i = 0; i < d->nmsgs; i++) { + m = &(buf[i]); + usrbufs[i] = m->buf; + + /* + * At least init the buffer to NULL so we can safely free() it later. + * If the copyin() to buf failed, don't try to malloc bogus m->len. + */ + m->buf = NULL; + if (error != 0) + continue; + m->buf = malloc(m->len, M_IIC, M_WAITOK); + if (!(m->flags & IIC_M_RD)) + error = copyin(usrbufs[i], m->buf, m->len); } - if (bufsize > uio->uio_resid) - panic("%s: too much data read!", __func__); + if (error == 0) + error = iicbus_request_bus(parent, iicdev, + (flags & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)); - iicbus_release_bus(device_get_parent(iicdev), iicdev); + if (error == 0) { + error = iicbus_transfer(iicdev, buf, d->nmsgs); + iicbus_release_bus(parent, iicdev); + } - error = uiomove(sc->sc_inbuf, bufsize, uio); - IIC_UNLOCK(sc); + /* Copyout all read segments, free up kernel buffers */ + for (i = 0; i < d->nmsgs; i++) { + m = &(buf[i]); + if ((error == 0) && (m->flags & IIC_M_RD)) + error = copyout(m->buf, usrbufs[i], m->len); + free(m->buf, M_IIC); + } + + free(usrbufs, M_IIC); + free(buf, M_IIC); return (error); } static int iicioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { - struct iic_softc *sc = dev->si_drv1; - device_t iicdev = sc->sc_dev; - device_t parent = device_get_parent(iicdev); - struct iiccmd *s = (struct iiccmd *)data; - struct iic_rdwr_data *d = (struct iic_rdwr_data *)data; - struct iic_msg *m; - int error, count, i; - char *buf = NULL; - void **usrbufs = NULL; - - if ((error = iicbus_request_bus(parent, iicdev, - (flags & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)))) + device_t parent, iicdev; + struct iiccmd *s; + struct uio ubuf; + struct iovec uvec; + struct iic_cdevpriv *priv; + int error; + + s = (struct iiccmd *)data; + error = devfs_get_cdevpriv((void**)&priv); + if (error != 0) return (error); + KASSERT(priv != NULL, ("iic cdevpriv should not be NULL!")); + + iicdev = priv->sc->sc_dev; + parent = device_get_parent(iicdev); + IIC_LOCK(priv); + + switch (cmd) { case I2CSTART: - IIC_LOCK(sc); - error = iicbus_start(parent, s->slave, 0); + if (priv->started) { + error = EINVAL; + break; + } + error = iicbus_request_bus(parent, iicdev, + (flags & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)); - /* - * Implicitly set the chip addr to the slave addr passed as - * parameter. Consequently, start/stop shall be called before - * the read or the write of a block. - */ - if (!error) - sc->sc_addr = s->slave; - IIC_UNLOCK(sc); + if (error == 0) + error = iicbus_start(parent, s->slave, 0); + + if (error == 0) { + priv->addr = s->slave; + priv->started = true; + } else + iicbus_release_bus(parent, iicdev); break; case I2CSTOP: - error = iicbus_stop(parent); + if (priv->started) { + error = iicbus_stop(parent); + iicbus_release_bus(parent, iicdev); + priv->started = false; + } + break; case I2CRSTCARD: - error = iicbus_reset(parent, IIC_UNKNOWN, 0, NULL); /* - * Ignore IIC_ENOADDR as it only means we have a master-only - * controller. - */ - if (error == IIC_ENOADDR) - error = 0; + * Bus should be owned before we reset it. + * We allow the bus to be already owned as the result of an in-progress + * sequence; however, bus reset will always be followed by release + * (a new start is presumably needed for I/O anyway). */ + if (!priv->started) + error = iicbus_request_bus(parent, iicdev, + (flags & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)); + + if (error == 0) { + error = iicbus_reset(parent, IIC_UNKNOWN, 0, NULL); + /* + * Ignore IIC_ENOADDR as it only means we have a master-only + * controller. + */ + if (error == IIC_ENOADDR) + error = 0; + + iicbus_release_bus(parent, iicdev); + priv->started = false; + } break; case I2CWRITE: - if (s->count <= 0) { + if (!priv->started) { error = EINVAL; break; } - buf = malloc((unsigned long)s->count, M_TEMP, M_WAITOK); - error = copyin(s->buf, buf, s->count); - if (error) - break; - error = iicbus_write(parent, buf, s->count, &count, 10); + uvec.iov_base = s->buf; + uvec.iov_len = s->count; + ubuf.uio_iov = &uvec; + ubuf.uio_iovcnt = 1; + ubuf.uio_segflg = UIO_USERSPACE; + ubuf.uio_td = td; + ubuf.uio_resid = s->count; + ubuf.uio_offset = 0; + ubuf.uio_rw = UIO_WRITE; + error = iicuio_move(priv, &ubuf, 0); break; case I2CREAD: - if (s->count <= 0) { + if (!priv->started) { error = EINVAL; break; } - buf = malloc((unsigned long)s->count, M_TEMP, M_WAITOK); - error = iicbus_read(parent, buf, s->count, &count, s->last, 10); - if (error) - break; - error = copyout(buf, s->buf, s->count); + uvec.iov_base = s->buf; + uvec.iov_len = s->count; + ubuf.uio_iov = &uvec; + ubuf.uio_iovcnt = 1; + ubuf.uio_segflg = UIO_USERSPACE; + ubuf.uio_td = td; + ubuf.uio_resid = s->count; + ubuf.uio_offset = 0; + ubuf.uio_rw = UIO_READ; + error = iicuio_move(priv, &ubuf, s->last); break; case I2CRDWR: - buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); - error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); - if (error) + /* + * The rdwr list should be a self-contained set of + * transactions. Fail if another transaction is in progress. + */ + if (priv->started) { + error = EINVAL; break; - /* Alloc kernel buffers for userland data, copyin write data */ - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); - for (i = 0; i < d->nmsgs; i++) { - m = &((struct iic_msg *)buf)[i]; - usrbufs[i] = m->buf; - m->buf = malloc(m->len, M_TEMP, M_WAITOK); - if (!(m->flags & IIC_M_RD)) - copyin(usrbufs[i], m->buf, m->len); - } - error = iicbus_transfer(iicdev, (struct iic_msg *)buf, d->nmsgs); - /* Copyout all read segments, free up kernel buffers */ - for (i = 0; i < d->nmsgs; i++) { - m = &((struct iic_msg *)buf)[i]; - if (m->flags & IIC_M_RD) - copyout(m->buf, usrbufs[i], m->len); - free(m->buf, M_TEMP); } - free(usrbufs, M_TEMP); + + error = iicrdwr(priv, (struct iic_rdwr_data *)data, flags); + break; case I2CRPTSTART: + if (!priv->started) { + error = EINVAL; + break; + } error = iicbus_repeated_start(parent, s->slave, 0); break; + case I2CSADDR: + priv->addr = *((uint8_t*)data); + break; + default: error = ENOTTY; } - iicbus_release_bus(parent, iicdev); - - if (buf != NULL) - free(buf, M_TEMP); + IIC_UNLOCK(priv); return (error); } Modified: head/sys/dev/iicbus/iic.h ============================================================================== --- head/sys/dev/iicbus/iic.h Tue Apr 21 11:29:07 2015 (r281827) +++ head/sys/dev/iicbus/iic.h Tue Apr 21 11:50:31 2015 (r281828) @@ -63,5 +63,6 @@ struct iic_rdwr_data { #define I2CREAD _IOW('i', 5, struct iiccmd) /* receive data */ #define I2CRDWR _IOW('i', 6, struct iic_rdwr_data) /* General read/write interface */ #define I2CRPTSTART _IOW('i', 7, struct iiccmd) /* repeated start */ +#define I2CSADDR _IOW('i', 8, uint8_t) /* set slave address for future I/O */ #endif Modified: head/sys/dev/iicbus/iicbus_if.m ============================================================================== --- head/sys/dev/iicbus/iicbus_if.m Tue Apr 21 11:29:07 2015 (r281827) +++ head/sys/dev/iicbus/iicbus_if.m Tue Apr 21 11:50:31 2015 (r281828) @@ -51,6 +51,10 @@ METHOD int intr { # # iicbus callback +# Request ownership of bus +# index: IIC_REQUEST_BUS or IIC_RELEASE_BUS +# data: pointer to int containing IIC_WAIT or IIC_DONTWAIT and either IIC_INTR or IIC_NOINTR +# This function is allowed to sleep if *data contains IIC_WAIT. # METHOD int callback { device_t dev; Modified: head/sys/dev/iicbus/iiconf.c ============================================================================== --- head/sys/dev/iicbus/iiconf.c Tue Apr 21 11:29:07 2015 (r281827) +++ head/sys/dev/iicbus/iiconf.c Tue Apr 21 11:50:31 2015 (r281828) @@ -71,7 +71,6 @@ iicbus_poll(struct iicbus_softc *sc, int default: return (EWOULDBLOCK); - break; } return (error); @@ -90,31 +89,32 @@ iicbus_request_bus(device_t bus, device_ struct iicbus_softc *sc = (struct iicbus_softc *)device_get_softc(bus); int error = 0; - /* first, ask the underlying layers if the request is ok */ IICBUS_LOCK(sc); - do { - error = IICBUS_CALLBACK(device_get_parent(bus), - IIC_REQUEST_BUS, (caddr_t)&how); - if (error) - error = iicbus_poll(sc, how); - } while (error == EWOULDBLOCK); - while (!error) { - if (sc->owner && sc->owner != dev) { + while ((error == 0) && (sc->owner != NULL)) + error = iicbus_poll(sc, how); - error = iicbus_poll(sc, how); - } else { - sc->owner = dev; + if (error == 0) { + sc->owner = dev; + /* + * Drop the lock around the call to the bus driver. + * This call should be allowed to sleep in the IIC_WAIT case. + * Drivers might also need to grab locks that would cause LOR + * if our lock is held. + */ + IICBUS_UNLOCK(sc); + /* Ask the underlying layers if the request is ok */ + error = IICBUS_CALLBACK(device_get_parent(bus), + IIC_REQUEST_BUS, (caddr_t)&how); + IICBUS_LOCK(sc); - IICBUS_UNLOCK(sc); - return (0); + if (error != 0) { + sc->owner = NULL; + wakeup_one(sc); } - - /* free any allocated resource */ - if (error) - IICBUS_CALLBACK(device_get_parent(bus), IIC_RELEASE_BUS, - (caddr_t)&how); } + + IICBUS_UNLOCK(sc); return (error); @@ -131,12 +131,6 @@ iicbus_release_bus(device_t bus, device_ struct iicbus_softc *sc = (struct iicbus_softc *)device_get_softc(bus); int error; - /* first, ask the underlying layers if the release is ok */ - error = IICBUS_CALLBACK(device_get_parent(bus), IIC_RELEASE_BUS, NULL); - - if (error) - return (error); - IICBUS_LOCK(sc); if (sc->owner != dev) { @@ -144,13 +138,26 @@ iicbus_release_bus(device_t bus, device_ return (EACCES); } - sc->owner = NULL; - - /* wakeup waiting processes */ - wakeup(sc); + /* + * Drop the lock around the call to the bus driver. + * This call should be allowed to sleep in the IIC_WAIT case. + * Drivers might also need to grab locks that would cause LOR + * if our lock is held. + */ IICBUS_UNLOCK(sc); + /* Ask the underlying layers if the release is ok */ + error = IICBUS_CALLBACK(device_get_parent(bus), IIC_RELEASE_BUS, NULL); - return (0); + if (error == 0) { + IICBUS_LOCK(sc); + sc->owner = NULL; + + /* wakeup a waiting thread */ + wakeup_one(sc); + IICBUS_UNLOCK(sc); + } + + return (error); } /* From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 12:40:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80658837; Tue, 21 Apr 2015 12:40:56 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 418031228; Tue, 21 Apr 2015 12:40:55 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id E26CF1047520; Tue, 21 Apr 2015 22:40:51 +1000 (AEST) Date: Tue, 21 Apr 2015 22:40:46 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , David Chisnall , John Baldwin , Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281721 - head/sys/sys In-Reply-To: <20150421095900.GL2390@kib.kiev.ua> Message-ID: <20150421222539.J2985@besplex.bde.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org> <785A553E-317E-4C80-83A0-567C80697ED8@FreeBSD.org> <20150421184157.Y2048@besplex.bde.org> <20150421095900.GL2390@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=yh1_mKi3brNwCaDYqQkA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 12:40:56 -0000 On Tue, 21 Apr 2015, Konstantin Belousov wrote: > On Tue, Apr 21, 2015 at 07:32:30PM +1000, Bruce Evans wrote: >> On Tue, 21 Apr 2015, David Chisnall wrote: >> >>> On 20 Apr 2015, at 17:19, Bruce Evans wrote: >>>> >>>> Enums should never be used in ABIs, since their size can be anything >>>> large enough. >>> >>> The rules for the size of enums also differ between C and C++, though clang (and, I think, gcc) support an attribute for specifying the enum type. >>> >>>> They also cause namespace problems. The whole enum declaration must >>>> be exposed in any header that uses an enum type. >>> >>> Both C and C++ permit forward declarations of enums for use in function prototypes and so on, e.g.: >>> >>> enum foo; >>> void >>> bar(enum foo); >> >> No, they cannot do this since the size may depend on the internals of the >> enum: >> >> TendDRA-5.0.0: >> "z.c", line 1: Error: >> [ISO C90 6.5.2.3]: Can't declare the enumeration 'enum foo'. >> > This is not true for C. The i386 ABI specification, from year _1997_, > states that enum must be 4-bytes unsigned entity, 4-bytes aligned. See page > 28 of abi386-4.pdf. That is only the i386 implementation of C. Good enough for ABI portability. Is it really so broken as to specify unsigned? enum values have type int, so unsigned cannot represent all of them. Unrepresentable enums are detected in all compilers I tested, but the error handling is broken except in gcc: clang-current: z.c:1:29: warning: overflow in enumeration value enum foo { xx = 0x7fffffff, yy }; ^ 1 warning generated. gcc4.2.1: z.c:1: error: overflow in enumeration values TenDRA-5.0.0: trans:/tmp/tccljzRYO/_tcc.t: internal error: constant out of range TendDRA also suffers from the C90 design error of not allowing a comma after yy. It detects this and handles it perfectly brokenly to C90 spec: "z.c", line 1: Error: [Syntax]: Extra comma at end of list. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 13:55:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D495179F; Tue, 21 Apr 2015 13:55:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C287A1A99; Tue, 21 Apr 2015 13:55:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LDtPTm059553; Tue, 21 Apr 2015 13:55:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LDtOen059543; Tue, 21 Apr 2015 13:55:24 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504211355.t3LDtOen059543@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 21 Apr 2015 13:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281829 - in head/sys: compat/linux kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 13:55:26 -0000 Author: trasz Date: Tue Apr 21 13:55:24 2015 New Revision: 281829 URL: https://svnweb.freebsd.org/changeset/base/281829 Log: Modify kern___getcwd() to take max pathlen limit as an additional argument. This will be used for the Linux emulation layer - for Linux, PATH_MAX is 4096 and not 1024. Differential Revision: https://reviews.freebsd.org/D2335 Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_getcwd.c head/sys/compat/linux/linux_misc.h head/sys/kern/vfs_cache.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/linux/linux_getcwd.c ============================================================================== --- head/sys/compat/linux/linux_getcwd.c Tue Apr 21 11:50:31 2015 (r281828) +++ head/sys/compat/linux/linux_getcwd.c Tue Apr 21 13:55:24 2015 (r281829) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#include #include #include @@ -423,14 +424,14 @@ linux_getcwd(struct thread *td, struct l len = args->bufsize; - if (len > MAXPATHLEN*4) - len = MAXPATHLEN*4; + if (len > LINUX_PATH_MAX) + len = LINUX_PATH_MAX; else if (len < 2) return ERANGE; path = malloc(len, M_TEMP, M_WAITOK); - error = kern___getcwd(td, path, UIO_SYSSPACE, len); + error = kern___getcwd(td, path, UIO_SYSSPACE, len, LINUX_PATH_MAX); if (!error) { lenused = strlen(path) + 1; if (lenused <= args->bufsize) { Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Tue Apr 21 11:50:31 2015 (r281828) +++ head/sys/compat/linux/linux_misc.h Tue Apr 21 13:55:24 2015 (r281829) @@ -55,6 +55,8 @@ #define LINUX_MREMAP_MAYMOVE 1 #define LINUX_MREMAP_FIXED 2 +#define LINUX_PATH_MAX 4096 + extern const char *linux_platform; /* Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Apr 21 11:50:31 2015 (r281828) +++ head/sys/kern/vfs_cache.c Tue Apr 21 13:55:24 2015 (r281829) @@ -1053,11 +1053,13 @@ sys___getcwd(td, uap) struct __getcwd_args *uap; { - return (kern___getcwd(td, uap->buf, UIO_USERSPACE, uap->buflen)); + return (kern___getcwd(td, uap->buf, UIO_USERSPACE, uap->buflen, + MAXPATHLEN)); } int -kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen) +kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen, + u_int path_max) { char *bp, *tmpbuf; struct filedesc *fdp; @@ -1068,8 +1070,8 @@ kern___getcwd(struct thread *td, char *b return (ENODEV); if (buflen < 2) return (EINVAL); - if (buflen > MAXPATHLEN) - buflen = MAXPATHLEN; + if (buflen > path_max) + buflen = path_max; tmpbuf = malloc(buflen, M_TEMP, M_WAITOK); fdp = td->td_proc->p_fd; Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Tue Apr 21 11:50:31 2015 (r281828) +++ head/sys/sys/syscallsubr.h Tue Apr 21 13:55:24 2015 (r281829) @@ -58,7 +58,7 @@ struct thr_param; struct __wrusage; int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, - u_int buflen); + u_int buflen, u_int path_max); int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); int kern_accept4(struct thread *td, int s, struct sockaddr **name, From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 14:48:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C194997D; Tue, 21 Apr 2015 14:48:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC6A41123; Tue, 21 Apr 2015 14:48:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LEmdM1001222; Tue, 21 Apr 2015 14:48:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LEmdIO001221; Tue, 21 Apr 2015 14:48:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504211448.t3LEmdIO001221@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2015 14:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281832 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 14:48:39 -0000 Author: gjb Date: Tue Apr 21 14:48:38 2015 New Revision: 281832 URL: https://svnweb.freebsd.org/changeset/base/281832 Log: Revert r281809, which did more harm than good, and apply a more proper fix when attempting to locate the /boot files. Sponsored by: The FreeBSD Foundation Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Tue Apr 21 14:48:18 2015 (r281831) +++ head/release/tools/vmimage.subr Tue Apr 21 14:48:38 2015 (r281832) @@ -14,11 +14,11 @@ write_partition_layout() { SWAPOPT="-p freebsd-swap/swapfs::1G" fi - _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR | tr -d '/usr/src')" - if [ -d "${_OBJDIR}/${TARGET}.${TARGET_ARCH}" ]; then - BOOTFILES="${_OBJDIR}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" + _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" + if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then + BOOTFILES="/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" else - BOOTFILES="${_OBJDIR}/usr/src/sys/boot" + BOOTFILES="/${_OBJDIR}/sys/boot" fi case "${TARGET}:${TARGET_ARCH}" in From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 20:24:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36C587C2; Tue, 21 Apr 2015 20:24:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 252CB1848; Tue, 21 Apr 2015 20:24:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LKOGOX073011; Tue, 21 Apr 2015 20:24:16 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LKOG3N073010; Tue, 21 Apr 2015 20:24:16 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201504212024.t3LKOG3N073010@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 21 Apr 2015 20:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281838 - head/sys/dev/e1000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 20:24:16 -0000 Author: hiren Date: Tue Apr 21 20:24:15 2015 New Revision: 281838 URL: https://svnweb.freebsd.org/changeset/base/281838 Log: For igb(4), when we are doing multiqueue, we are all setup to have full 32bit RSS hash from the card. We do not need to hide that under "ifdef RSS" and should expose that by default so others like lagg(4) can use that and avoid hashing the traffic by themselves. While here, improve comments and get rid of hidden/unimplemented RSS support code for UDP. Differential Revision: https://reviews.freebsd.org/D2296 Reviewed by: jfv, erj Discussed with: adrian Sponsored by: Limelight Networks Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Tue Apr 21 19:33:30 2015 (r281837) +++ head/sys/dev/e1000/if_igb.c Tue Apr 21 20:24:15 2015 (r281838) @@ -4630,8 +4630,11 @@ igb_initialise_rss_mapping(struct adapte /* Now fill in hash table */ - /* XXX This means RSS enable + 8 queues for my igb (82580.) */ - mrqc = E1000_MRQC_ENABLE_RSS_4Q; + /* + * MRQC: Multiple Receive Queues Command + * Set queuing to RSS control, number depends on the device. + */ + mrqc = E1000_MRQC_ENABLE_RSS_8Q; #ifdef RSS /* XXX ew typecasting */ @@ -5139,45 +5142,51 @@ igb_rxeof(struct igb_queue *que, int cou rxr->fmp->m_pkthdr.ether_vtag = vtag; rxr->fmp->m_flags |= M_VLANTAG; } -#ifdef RSS - /* XXX set flowtype once this works right */ - rxr->fmp->m_pkthdr.flowid = - le32toh(cur->wb.lower.hi_dword.rss); - switch (pkt_info & E1000_RXDADV_RSSTYPE_MASK) { - case E1000_RXDADV_RSSTYPE_IPV4_TCP: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_TCP_IPV4); - break; - case E1000_RXDADV_RSSTYPE_IPV4: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_IPV4); - break; - case E1000_RXDADV_RSSTYPE_IPV6_TCP: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_TCP_IPV6); - break; - case E1000_RXDADV_RSSTYPE_IPV6_EX: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_IPV6_EX); - break; - case E1000_RXDADV_RSSTYPE_IPV6: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_IPV6); - break; - case E1000_RXDADV_RSSTYPE_IPV6_TCP_EX: - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_RSS_TCP_IPV6_EX); - break; - - /* XXX no UDP support in RSS just yet */ -#ifdef notyet - case E1000_RXDADV_RSSTYPE_IPV4_UDP: - case E1000_RXDADV_RSSTYPE_IPV6_UDP: - case E1000_RXDADV_RSSTYPE_IPV6_UDP_EX: -#endif - - default: - /* XXX fallthrough */ + + /* + * In case of multiqueue, we have RXCSUM.PCSD bit set + * and never cleared. This means we have RSS hash + * available to be used. + */ + if (adapter->num_queues > 1) { + rxr->fmp->m_pkthdr.flowid = + le32toh(cur->wb.lower.hi_dword.rss); + switch (pkt_info & E1000_RXDADV_RSSTYPE_MASK) { + case E1000_RXDADV_RSSTYPE_IPV4_TCP: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_TCP_IPV4); + break; + case E1000_RXDADV_RSSTYPE_IPV4: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_IPV4); + break; + case E1000_RXDADV_RSSTYPE_IPV6_TCP: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_TCP_IPV6); + break; + case E1000_RXDADV_RSSTYPE_IPV6_EX: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_IPV6_EX); + break; + case E1000_RXDADV_RSSTYPE_IPV6: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_IPV6); + break; + case E1000_RXDADV_RSSTYPE_IPV6_TCP_EX: + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_RSS_TCP_IPV6_EX); + break; + default: + /* XXX fallthrough */ + M_HASHTYPE_SET(rxr->fmp, + M_HASHTYPE_OPAQUE); + } + } else { +#ifndef IGB_LEGACY_TX + rxr->fmp->m_pkthdr.flowid = que->msix; M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); - } -#elif !defined(IGB_LEGACY_TX) - rxr->fmp->m_pkthdr.flowid = que->msix; - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); #endif + } sendmp = rxr->fmp; /* Make sure to set M_PKTHDR. */ sendmp->m_flags |= M_PKTHDR; From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 20:25:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 378A190D; Tue, 21 Apr 2015 20:25:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 259571852; Tue, 21 Apr 2015 20:25:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LKPD04073560; Tue, 21 Apr 2015 20:25:13 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LKPDj7073559; Tue, 21 Apr 2015 20:25:13 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504212025.t3LKPDj7073559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Apr 2015 20:25:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281839 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 20:25:13 -0000 Author: glebius Date: Tue Apr 21 20:25:12 2015 New Revision: 281839 URL: https://svnweb.freebsd.org/changeset/base/281839 Log: Improve carp(4) locking: - Use the carp_sx to serialize not only CARP ioctls, but also carp_attach() and carp_detach(). - Use cif_mtx to lock only access to those the linked list. - These locking changes allow us to do some memory allocations with M_WAITOK and also properly call callout_drain() in carp_destroy(). - In carp_attach() assert that ifaddr isn't attached. We always come here with a pristine address from in[6]_control(). Reviewed by: oleg Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Tue Apr 21 20:24:15 2015 (r281838) +++ head/sys/netinet/ip_carp.c Tue Apr 21 20:25:12 2015 (r281839) @@ -256,7 +256,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_carp, OID #define CIF_LOCK(cif) mtx_lock(&(cif)->cif_mtx) #define CIF_UNLOCK(cif) mtx_unlock(&(cif)->cif_mtx) #define CIF_FREE(cif) do { \ - CIF_LOCK_ASSERT(cif); \ + CIF_LOCK(cif); \ if (TAILQ_EMPTY(&(cif)->cif_vrs)) \ carp_free_if(cif); \ else \ @@ -296,7 +296,6 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_carp, OID static void carp_input_c(struct mbuf *, struct carp_header *, sa_family_t); static struct carp_softc *carp_alloc(struct ifnet *); -static void carp_detach_locked(struct ifaddr *); static void carp_destroy(struct carp_softc *); static struct carp_if *carp_alloc_if(struct ifnet *); @@ -1250,8 +1249,6 @@ carp_multicast_setup(struct carp_if *cif struct ifnet *ifp = cif->cif_ifp; int error = 0; - CIF_LOCK_ASSERT(cif); - switch (sa) { #ifdef INET case AF_INET: @@ -1264,9 +1261,7 @@ carp_multicast_setup(struct carp_if *cif imo->imo_membership = (struct in_multi **)malloc( (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP, - M_NOWAIT); - if (imo->imo_membership == NULL) - return (ENOMEM); + M_WAITOK); imo->imo_mfilters = NULL; imo->imo_max_memberships = IP_MIN_MEMBERSHIPS; imo->imo_multicast_vif = -1; @@ -1296,9 +1291,7 @@ carp_multicast_setup(struct carp_if *cif im6o->im6o_membership = (struct in6_multi **)malloc( (sizeof(struct in6_multi *) * IPV6_MIN_MEMBERSHIPS), M_CARP, - M_ZERO | M_NOWAIT); - if (im6o->im6o_membership == NULL) - return (ENOMEM); + M_ZERO | M_WAITOK); im6o->im6o_mfilters = NULL; im6o->im6o_max_memberships = IPV6_MIN_MEMBERSHIPS; im6o->im6o_multicast_hlim = CARP_DFLTTL; @@ -1355,7 +1348,8 @@ static void carp_multicast_cleanup(struct carp_if *cif, sa_family_t sa) { - CIF_LOCK_ASSERT(cif); + sx_assert(&carp_sx, SA_XLOCKED); + switch (sa) { #ifdef INET case AF_INET: @@ -1504,22 +1498,18 @@ carp_alloc(struct ifnet *ifp) return (sc); } -static int +static void carp_grow_ifas(struct carp_softc *sc) { struct ifaddr **new; - CARP_LOCK_ASSERT(sc); - - new = malloc(sc->sc_ifasiz * 2, M_CARP, M_NOWAIT|M_ZERO); - if (new == NULL) - return (ENOMEM); + new = malloc(sc->sc_ifasiz * 2, M_CARP, M_WAITOK | M_ZERO); + CARP_LOCK(sc); bcopy(sc->sc_ifas, new, sc->sc_ifasiz); free(sc->sc_ifas, M_CARP); sc->sc_ifas = new; sc->sc_ifasiz *= 2; - - return (0); + CARP_UNLOCK(sc); } static void @@ -1528,17 +1518,20 @@ carp_destroy(struct carp_softc *sc) struct ifnet *ifp = sc->sc_carpdev; struct carp_if *cif = ifp->if_carp; - CIF_LOCK_ASSERT(cif); + sx_assert(&carp_sx, SA_XLOCKED); + + if (sc->sc_suppress) + carp_demote_adj(-V_carp_ifdown_adj, "vhid removed"); + CARP_UNLOCK(sc); + CIF_LOCK(cif); TAILQ_REMOVE(&cif->cif_vrs, sc, sc_list); + CIF_UNLOCK(cif); mtx_lock(&carp_mtx); LIST_REMOVE(sc, sc_next); mtx_unlock(&carp_mtx); - CARP_LOCK(sc); - if (sc->sc_suppress) - carp_demote_adj(-V_carp_ifdown_adj, "vhid removed"); callout_drain(&sc->sc_ad_tmo); #ifdef INET callout_drain(&sc->sc_md_tmo); @@ -1807,8 +1800,7 @@ carp_attach(struct ifaddr *ifa, int vhid struct carp_softc *sc; int index, error; - if (ifp->if_carp == NULL) - return (ENOPROTOOPT); + KASSERT(ifa->ifa_carp == NULL, ("%s: ifa %p attached", __func__, ifa)); switch (ifa->ifa_addr->sa_family) { #ifdef INET @@ -1822,40 +1814,32 @@ carp_attach(struct ifaddr *ifa, int vhid return (EPROTOTYPE); } + sx_xlock(&carp_sx); + if (ifp->if_carp == NULL) { + sx_xunlock(&carp_sx); + return (ENOPROTOOPT); + } + CIF_LOCK(cif); IFNET_FOREACH_CARP(ifp, sc) if (sc->sc_vhid == vhid) break; + CIF_UNLOCK(cif); if (sc == NULL) { - CIF_UNLOCK(cif); + sx_xunlock(&carp_sx); return (ENOENT); } - if (ifa->ifa_carp) { - if (ifa->ifa_carp->sc_vhid != vhid) - carp_detach_locked(ifa); - else { - CIF_UNLOCK(cif); - return (0); - } - } - error = carp_multicast_setup(cif, ifa->ifa_addr->sa_family); if (error) { CIF_FREE(cif); + sx_xunlock(&carp_sx); return (error); } - CARP_LOCK(sc); index = sc->sc_naddrs + sc->sc_naddrs6 + 1; if (index > sc->sc_ifasiz / sizeof(struct ifaddr *)) - if ((error = carp_grow_ifas(sc)) != 0) { - carp_multicast_cleanup(cif, - ifa->ifa_addr->sa_family); - CARP_UNLOCK(sc); - CIF_FREE(cif); - return (error); - } + carp_grow_ifas(sc); switch (ifa->ifa_addr->sa_family) { #ifdef INET @@ -1873,14 +1857,15 @@ carp_attach(struct ifaddr *ifa, int vhid } ifa_ref(ifa); + + CARP_LOCK(sc); sc->sc_ifas[index - 1] = ifa; ifa->ifa_carp = sc; - carp_hmac_prepare(sc); carp_sc_state(sc); - CARP_UNLOCK(sc); - CIF_UNLOCK(cif); + + sx_xunlock(&carp_sx); return (0); } @@ -1890,25 +1875,14 @@ carp_detach(struct ifaddr *ifa) { struct ifnet *ifp = ifa->ifa_ifp; struct carp_if *cif = ifp->if_carp; - - CIF_LOCK(cif); - carp_detach_locked(ifa); - CIF_FREE(cif); -} - -static void -carp_detach_locked(struct ifaddr *ifa) -{ - struct ifnet *ifp = ifa->ifa_ifp; - struct carp_if *cif = ifp->if_carp; struct carp_softc *sc = ifa->ifa_carp; int i, index; KASSERT(sc != NULL, ("%s: %p not attached", __func__, ifa)); - CIF_LOCK_ASSERT(cif); - CARP_LOCK(sc); + sx_xlock(&carp_sx); + CARP_LOCK(sc); /* Shift array. */ index = sc->sc_naddrs + sc->sc_naddrs6; for (i = 0; i < index; i++) @@ -1943,11 +1917,14 @@ carp_detach_locked(struct ifaddr *ifa) carp_hmac_prepare(sc); carp_sc_state(sc); - if (sc->sc_naddrs == 0 && sc->sc_naddrs6 == 0) { - CARP_UNLOCK(sc); + if (sc->sc_naddrs == 0 && sc->sc_naddrs6 == 0) carp_destroy(sc); - } else + else CARP_UNLOCK(sc); + + CIF_FREE(cif); + + sx_xunlock(&carp_sx); } static void From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 22:05:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9599878; Tue, 21 Apr 2015 22:05:59 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C60931383; Tue, 21 Apr 2015 22:05:59 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 6DFF710D75B; Tue, 21 Apr 2015 15:05:50 -0700 (PDT) Date: Tue, 21 Apr 2015 15:05:50 -0700 From: Hiren Panchasara To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281838 - head/sys/dev/e1000 Message-ID: <20150421220550.GA28632@strugglingcoder.info> References: <201504212024.t3LKOG3N073010@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <201504212024.t3LKOG3N073010@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 22:06:00 -0000 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 04/21/15 at 08:24P, Hiren Panchasara wrote: > Author: hiren > Date: Tue Apr 21 20:24:15 2015 > New Revision: 281838 > URL: https://svnweb.freebsd.org/changeset/base/281838 >=20 > Log: > For igb(4), when we are doing multiqueue, we are all setup to have full= 32bit > RSS hash from the card. We do not need to hide that under "ifdef RSS" a= nd should > expose that by default so others like lagg(4) can use that and avoid ha= shing the > traffic by themselves. > While here, improve comments and get rid of hidden/unimplemented RSS su= pport > code for UDP. > =20 > Differential Revision: https://reviews.freebsd.org/D2296 > Reviewed by: jfv, erj > Discussed with: adrian > Sponsored by: Limelight Networks >=20 > Modified: > head/sys/dev/e1000/if_igb.c I intend to MFC this in a week or so. But for that, I'd have to first MFC a part of https://svnweb.freebsd.org/base?view=3Drevision&revision=3D26= 8028 which sets rss hash types. Cheers, Hiren --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVNsm+XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/loCAH/R09M1fXl4pFI834wctgXyYD lIC0Dymbj8BlX1kiYX+RtHMFBKGhJJxCJ/O1tUdbAXh/w4mf1d6WOXF/3uhRG7hv Q82xwjF93e3GhMKI/lrvt7DNj7tAtk4zKeiw79b3o5EZJd9aAhdK76bPyvevBRQK i5G+mduKr1QX/ujFBZGb2aY9l1n4drlwbgieBCqCt+qLUdhSxlCuL+j/jVENAyfd eUbkjEWcsktYf6xVWgJKNn1Qaz5+5y+qfey5LUqDXqhzGMLnU5/69s9dMVwQ9Nau 6MtGLwrUxHc4ppv617RDLOiDoaxxzRPm+V9FHdPhcDUUOyQu2hdBkykfrkFGoc8= =VEWO -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0-- From owner-svn-src-head@FreeBSD.ORG Tue Apr 21 22:55:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E361F1; Tue, 21 Apr 2015 22:55:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C888188E; Tue, 21 Apr 2015 22:55:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LMtrZK094145; Tue, 21 Apr 2015 22:55:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LMtrIb094144; Tue, 21 Apr 2015 22:55:53 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504212255.t3LMtrIb094144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 21 Apr 2015 22:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281840 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 22:55:53 -0000 Author: delphij Date: Tue Apr 21 22:55:52 2015 New Revision: 281840 URL: https://svnweb.freebsd.org/changeset/base/281840 Log: Extend DA_Q_NO_RC16 to MXUB3* devices. PR: kern/198647 MFC after: 2 weeks Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Apr 21 20:25:12 2015 (r281839) +++ head/sys/cam/scsi/scsi_da.c Tue Apr 21 22:55:52 2015 (r281840) @@ -1186,7 +1186,7 @@ static struct da_quirk_entry da_quirk_ta /* * MX-ES USB Drive by Mach Xtreme */ - { T_DIRECT, SIP_MEDIA_REMOVABLE, "MX", "MXUB3SES*", "*"}, + { T_DIRECT, SIP_MEDIA_REMOVABLE, "MX", "MXUB3*", "*"}, /*quirks*/DA_Q_NO_RC16 }, }; From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 01:35:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2902CA9; Wed, 22 Apr 2015 01:35: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0CF2182F; Wed, 22 Apr 2015 01:35:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3M1ZTQ3017561; Wed, 22 Apr 2015 01:35:29 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3M1ZTap017560; Wed, 22 Apr 2015 01:35:29 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201504220135.t3M1ZTap017560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 22 Apr 2015 01:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281844 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 01:35:30 -0000 Author: rodrigc Date: Wed Apr 22 01:35:29 2015 New Revision: 281844 URL: https://svnweb.freebsd.org/changeset/base/281844 Log: Quiet compiler warnings in mbuf.h * Mark unused arguments with __unused * Move inline before the return type (and use __inline to keep the file consistent in style.) Submitted by: Steve Kiernan Obtained from: Juniper Networks, Inc. Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Apr 22 01:08:40 2015 (r281843) +++ head/sys/sys/mbuf.h Wed Apr 22 01:35:29 2015 (r281844) @@ -616,8 +616,8 @@ m_getzone(int size) * should go away with constant propagation for !MGETHDR. */ static __inline int -m_init(struct mbuf *m, uma_zone_t zone, int size, int how, short type, - int flags) +m_init(struct mbuf *m, uma_zone_t zone __unused, int size __unused, int how, + short type, int flags) { int error; @@ -1122,7 +1122,7 @@ m_tag_first(struct mbuf *m) * Return the next tag in the list of tags associated with an mbuf. */ static __inline struct m_tag * -m_tag_next(struct mbuf *m, struct m_tag *t) +m_tag_next(struct mbuf *m __unused, struct m_tag *t) { return (SLIST_NEXT(t, m_tag_link)); @@ -1178,7 +1178,7 @@ m_free(struct mbuf *m) return (n); } -static int inline +static __inline int rt_m_getfib(struct mbuf *m) { KASSERT(m->m_flags & M_PKTHDR , ("Attempt to get FIB from non header mbuf.")); From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 01:54:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA0FCF68; Wed, 22 Apr 2015 01:54:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A772519E2; Wed, 22 Apr 2015 01:54:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3M1sRrv031385; Wed, 22 Apr 2015 01:54:27 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3M1sQOi031375; Wed, 22 Apr 2015 01:54:26 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201504220154.t3M1sQOi031375@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 22 Apr 2015 01:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281845 - in head: lib/libc/stdio libexec/rtld-elf sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 01:54:27 -0000 Author: rodrigc Date: Wed Apr 22 01:54:25 2015 New Revision: 281845 URL: https://svnweb.freebsd.org/changeset/base/281845 Log: Support file verification in MAC. * Add VCREAT flag to indicate when a new file is being created * Add VVERIFY to indicate verification is required * Both VCREAT and VVERIFY are only passed on the MAC method vnode_check_open and are removed from the accmode after * Add O_VERIFY flag to rtld open of objects * Add 'v' flag to __sflags to set O_VERIFY flag. Submitted by: Steve Kiernan Obtained from: Juniper Networks, Inc. GitHub Pull Request: https://github.com/freebsd/freebsd/pull/27 Relnotes: yes Modified: head/lib/libc/stdio/flags.c head/libexec/rtld-elf/rtld.c head/sys/kern/vfs_vnops.c head/sys/sys/fcntl.h head/sys/sys/vnode.h Modified: head/lib/libc/stdio/flags.c ============================================================================== --- head/lib/libc/stdio/flags.c Wed Apr 22 01:35:29 2015 (r281844) +++ head/lib/libc/stdio/flags.c Wed Apr 22 01:54:25 2015 (r281845) @@ -97,6 +97,10 @@ __sflags(const char *mode, int *optr) /* set close-on-exec */ o |= O_CLOEXEC; break; + case 'v': + /* verify */ + o |= O_VERIFY; + break; default: known = 0; break; Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Apr 22 01:35:29 2015 (r281844) +++ head/libexec/rtld-elf/rtld.c Wed Apr 22 01:54:25 2015 (r281845) @@ -2165,7 +2165,7 @@ load_object(const char *name, int fd_u, * To avoid a race, we open the file and use fstat() rather than * using stat(). */ - if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1) { + if ((fd = open(path, O_RDONLY | O_CLOEXEC | O_VERIFY)) == -1) { _rtld_error("Cannot open \"%s\"", path); free(path); return (NULL); @@ -2855,7 +2855,7 @@ search_library_pathfds(const char *name, dirfd = parse_libdir(fdstr); if (dirfd < 0) break; - fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC); + fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC | O_VERIFY); if (fd >= 0) { *fdp = fd; len = strlen(fdstr) + strlen(name) + 3; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Wed Apr 22 01:35:29 2015 (r281844) +++ head/sys/kern/vfs_vnops.c Wed Apr 22 01:54:25 2015 (r281845) @@ -306,9 +306,15 @@ vn_open_vnode(struct vnode *vp, int fmod if ((fmode & O_APPEND) && (fmode & FWRITE)) accmode |= VAPPEND; #ifdef MAC + if (fmode & O_CREAT) + accmode |= VCREAT; + if (fmode & O_VERIFY) + accmode |= VVERIFY; error = mac_vnode_check_open(cred, vp, accmode); if (error) return (error); + + accmode &= ~(VCREAT | VVERIFY); #endif if ((fmode & O_CREAT) == 0) { if (accmode & VWRITE) { Modified: head/sys/sys/fcntl.h ============================================================================== --- head/sys/sys/fcntl.h Wed Apr 22 01:35:29 2015 (r281844) +++ head/sys/sys/fcntl.h Wed Apr 22 01:54:25 2015 (r281845) @@ -129,6 +129,10 @@ typedef __pid_t pid_t; #define O_CLOEXEC 0x00100000 #endif +#if __BSD_VISIBLE +#define O_VERIFY 0x00200000 /* open only after verification */ +#endif + /* * XXX missing O_DSYNC, O_RSYNC. */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed Apr 22 01:35:29 2015 (r281844) +++ head/sys/sys/vnode.h Wed Apr 22 01:54:25 2015 (r281845) @@ -336,6 +336,8 @@ struct vattr { #define VWRITE_ACL 000040000000 /* change ACL and/or file mode */ #define VWRITE_OWNER 000100000000 /* change file owner */ #define VSYNCHRONIZE 000200000000 /* not used */ +#define VCREAT 000400000000 /* creating new file */ +#define VVERIFY 001000000000 /* verification required */ /* * Permissions that were traditionally granted only to the file owner. From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 09:52:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1889211; Wed, 22 Apr 2015 09:52:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF3B61A5F; Wed, 22 Apr 2015 09:52:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3M9qpbh011317; Wed, 22 Apr 2015 09:52:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3M9qptF011316; Wed, 22 Apr 2015 09:52:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504220952.t3M9qptF011316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 22 Apr 2015 09:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281846 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 09:52:52 -0000 Author: andrew Date: Wed Apr 22 09:52:51 2015 New Revision: 281846 URL: https://svnweb.freebsd.org/changeset/base/281846 Log: Remove the calls to panic from pmap_object_init_pt and pmap_clear_modify. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Apr 22 01:54:25 2015 (r281845) +++ head/sys/arm64/arm64/pmap.c Wed Apr 22 09:52:51 2015 (r281846) @@ -2251,7 +2251,9 @@ pmap_object_init_pt(pmap_t pmap, vm_offs vm_pindex_t pindex, vm_size_t size) { - panic("pmap_object_init_pt"); + VM_OBJECT_ASSERT_WLOCKED(object); + KASSERT(object->type == OBJT_DEVICE || object->type == OBJT_SG, + ("pmap_object_init_pt: non-device object")); } /* @@ -2930,7 +2932,8 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; - panic("pmap_clear_modify"); + + /* TODO: We lack support for tracking if a page is modified */ } /* From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 12:24:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CCC7922; Wed, 22 Apr 2015 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B9C11A42; Wed, 22 Apr 2015 12:24:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MCOdgl027699; Wed, 22 Apr 2015 12:24:39 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MCOdJH027698; Wed, 22 Apr 2015 12:24:39 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504221224.t3MCOdJH027698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 22 Apr 2015 12:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281850 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 12:24:39 -0000 Author: andrew Date: Wed Apr 22 12:24:38 2015 New Revision: 281850 URL: https://svnweb.freebsd.org/changeset/base/281850 Log: Add the null implementation of stack_save and stack_save_td. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/stack_machdep.c Modified: head/sys/arm64/arm64/stack_machdep.c ============================================================================== --- head/sys/arm64/arm64/stack_machdep.c Wed Apr 22 10:59:05 2015 (r281849) +++ head/sys/arm64/arm64/stack_machdep.c Wed Apr 22 12:24:38 2015 (r281850) @@ -43,11 +43,18 @@ __FBSDID("$FreeBSD$"); void stack_save_td(struct stack *st, struct thread *td) { - panic("stack_save_td"); + + if (TD_IS_SWAPPED(td)) + panic("stack_save_td: swapped"); + if (TD_IS_RUNNING(td)) + panic("stack_save_td: running"); + + stack_zero(st); } void stack_save(struct stack *st) { - panic("stack_save"); + + stack_zero(st); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 12:32:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33D02CAC; Wed, 22 Apr 2015 12:32:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20E321B52; Wed, 22 Apr 2015 12:32:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MCWHW1034556; Wed, 22 Apr 2015 12:32:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MCWFaI034532; Wed, 22 Apr 2015 12:32:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504221232.t3MCWFaI034532@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 22 Apr 2015 12:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281851 - in head/sys: amd64/amd64 amd64/include conf i386/i386 i386/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 12:32:17 -0000 Author: kib Date: Wed Apr 22 12:32:14 2015 New Revision: 281851 URL: https://svnweb.freebsd.org/changeset/base/281851 Log: Move some common code from sys/amd64/amd64/machdep.c and sys/i386/i386/machdep.c to new file sys/x86/x86/cpu_machdep.c. Most of the code is related to the idle handling. Discussed with: pluknet Sponsored by: The FreeBSD Foundation Added: head/sys/x86/x86/cpu_machdep.c - copied, changed from r281849, head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/include/md_var.h head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/i386/i386/machdep.c head/sys/i386/include/md_var.h Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/amd64/amd64/machdep.c Wed Apr 22 12:32:14 2015 (r281851) @@ -578,375 +578,6 @@ freebsd4_sigreturn(struct thread *td, st } #endif - -/* - * Machine dependent boot() routine - * - * I haven't seen anything to put here yet - * Possibly some stuff might be grafted back here from boot() - */ -void -cpu_boot(int howto) -{ -} - -/* - * Flush the D-cache for non-DMA I/O so that the I-cache can - * be made coherent later. - */ -void -cpu_flush_dcache(void *ptr, size_t len) -{ - /* Not applicable */ -} - -/* Get current clock frequency for the given cpu id. */ -int -cpu_est_clockrate(int cpu_id, uint64_t *rate) -{ - uint64_t tsc1, tsc2; - uint64_t acnt, mcnt, perf; - register_t reg; - - if (pcpu_find(cpu_id) == NULL || rate == NULL) - return (EINVAL); - - /* - * If TSC is P-state invariant and APERF/MPERF MSRs do not exist, - * DELAY(9) based logic fails. - */ - if (tsc_is_invariant && !tsc_perf_stat) - return (EOPNOTSUPP); - -#ifdef SMP - if (smp_cpus > 1) { - /* Schedule ourselves on the indicated cpu. */ - thread_lock(curthread); - sched_bind(curthread, cpu_id); - thread_unlock(curthread); - } -#endif - - /* Calibrate by measuring a short delay. */ - reg = intr_disable(); - if (tsc_is_invariant) { - wrmsr(MSR_MPERF, 0); - wrmsr(MSR_APERF, 0); - tsc1 = rdtsc(); - DELAY(1000); - mcnt = rdmsr(MSR_MPERF); - acnt = rdmsr(MSR_APERF); - tsc2 = rdtsc(); - intr_restore(reg); - perf = 1000 * acnt / mcnt; - *rate = (tsc2 - tsc1) * perf; - } else { - tsc1 = rdtsc(); - DELAY(1000); - tsc2 = rdtsc(); - intr_restore(reg); - *rate = (tsc2 - tsc1) * 1000; - } - -#ifdef SMP - if (smp_cpus > 1) { - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - } -#endif - - return (0); -} - -/* - * Shutdown the CPU as much as possible - */ -void -cpu_halt(void) -{ - for (;;) - halt(); -} - -void (*cpu_idle_hook)(sbintime_t) = NULL; /* ACPI idle hook. */ -static int cpu_ident_amdc1e = 0; /* AMD C1E supported. */ -static int idle_mwait = 1; /* Use MONITOR/MWAIT for short idle. */ -SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RWTUN, &idle_mwait, - 0, "Use MONITOR/MWAIT for short idle"); - -#define STATE_RUNNING 0x0 -#define STATE_MWAIT 0x1 -#define STATE_SLEEPING 0x2 - -static void -cpu_idle_acpi(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_SLEEPING; - - /* See comments in cpu_idle_hlt(). */ - disable_intr(); - if (sched_runnable()) - enable_intr(); - else if (cpu_idle_hook) - cpu_idle_hook(sbt); - else - __asm __volatile("sti; hlt"); - *state = STATE_RUNNING; -} - -static void -cpu_idle_hlt(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_SLEEPING; - - /* - * Since we may be in a critical section from cpu_idle(), if - * an interrupt fires during that critical section we may have - * a pending preemption. If the CPU halts, then that thread - * may not execute until a later interrupt awakens the CPU. - * To handle this race, check for a runnable thread after - * disabling interrupts and immediately return if one is - * found. Also, we must absolutely guarentee that hlt is - * the next instruction after sti. This ensures that any - * interrupt that fires after the call to disable_intr() will - * immediately awaken the CPU from hlt. Finally, please note - * that on x86 this works fine because of interrupts enabled only - * after the instruction following sti takes place, while IF is set - * to 1 immediately, allowing hlt instruction to acknowledge the - * interrupt. - */ - disable_intr(); - if (sched_runnable()) - enable_intr(); - else - __asm __volatile("sti; hlt"); - *state = STATE_RUNNING; -} - -static void -cpu_idle_mwait(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_MWAIT; - - /* See comments in cpu_idle_hlt(). */ - disable_intr(); - if (sched_runnable()) { - enable_intr(); - *state = STATE_RUNNING; - return; - } - cpu_monitor(state, 0, 0); - if (*state == STATE_MWAIT) - __asm __volatile("sti; mwait" : : "a" (MWAIT_C1), "c" (0)); - else - enable_intr(); - *state = STATE_RUNNING; -} - -static void -cpu_idle_spin(sbintime_t sbt) -{ - int *state; - int i; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_RUNNING; - - /* - * The sched_runnable() call is racy but as long as there is - * a loop missing it one time will have just a little impact if any - * (and it is much better than missing the check at all). - */ - for (i = 0; i < 1000; i++) { - if (sched_runnable()) - return; - cpu_spinwait(); - } -} - -/* - * C1E renders the local APIC timer dead, so we disable it by - * reading the Interrupt Pending Message register and clearing - * both C1eOnCmpHalt (bit 28) and SmiOnCmpHalt (bit 27). - * - * Reference: - * "BIOS and Kernel Developer's Guide for AMD NPT Family 0Fh Processors" - * #32559 revision 3.00+ - */ -#define MSR_AMDK8_IPM 0xc0010055 -#define AMDK8_SMIONCMPHALT (1ULL << 27) -#define AMDK8_C1EONCMPHALT (1ULL << 28) -#define AMDK8_CMPHALT (AMDK8_SMIONCMPHALT | AMDK8_C1EONCMPHALT) - -static void -cpu_probe_amdc1e(void) -{ - - /* - * Detect the presence of C1E capability mostly on latest - * dual-cores (or future) k8 family. - */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - (cpu_id & 0x00000f00) == 0x00000f00 && - (cpu_id & 0x0fff0000) >= 0x00040000) { - cpu_ident_amdc1e = 1; - } -} - -void (*cpu_idle_fn)(sbintime_t) = cpu_idle_acpi; - -void -cpu_idle(int busy) -{ - uint64_t msr; - sbintime_t sbt = -1; - - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", - busy, curcpu); -#ifdef MP_WATCHDOG - ap_watchdog(PCPU_GET(cpuid)); -#endif - /* If we are busy - try to use fast methods. */ - if (busy) { - if ((cpu_feature2 & CPUID2_MON) && idle_mwait) { - cpu_idle_mwait(busy); - goto out; - } - } - - /* If we have time - switch timers into idle mode. */ - if (!busy) { - critical_enter(); - sbt = cpu_idleclock(); - } - - /* Apply AMD APIC timer C1E workaround. */ - if (cpu_ident_amdc1e && cpu_disable_c3_sleep) { - msr = rdmsr(MSR_AMDK8_IPM); - if (msr & AMDK8_CMPHALT) - wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); - } - - /* Call main idle method. */ - cpu_idle_fn(sbt); - - /* Switch timers back into active mode. */ - if (!busy) { - cpu_activeclock(); - critical_exit(); - } -out: - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", - busy, curcpu); -} - -int -cpu_idle_wakeup(int cpu) -{ - struct pcpu *pcpu; - int *state; - - pcpu = pcpu_find(cpu); - state = (int *)pcpu->pc_monitorbuf; - /* - * This doesn't need to be atomic since missing the race will - * simply result in unnecessary IPIs. - */ - if (*state == STATE_SLEEPING) - return (0); - if (*state == STATE_MWAIT) - *state = STATE_RUNNING; - return (1); -} - -/* - * Ordered by speed/power consumption. - */ -struct { - void *id_fn; - char *id_name; -} idle_tbl[] = { - { cpu_idle_spin, "spin" }, - { cpu_idle_mwait, "mwait" }, - { cpu_idle_hlt, "hlt" }, - { cpu_idle_acpi, "acpi" }, - { NULL, NULL } -}; - -static int -idle_sysctl_available(SYSCTL_HANDLER_ARGS) -{ - char *avail, *p; - int error; - int i; - - avail = malloc(256, M_TEMP, M_WAITOK); - p = avail; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (strstr(idle_tbl[i].id_name, "mwait") && - (cpu_feature2 & CPUID2_MON) == 0) - continue; - if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && - cpu_idle_hook == NULL) - continue; - p += sprintf(p, "%s%s", p != avail ? ", " : "", - idle_tbl[i].id_name); - } - error = sysctl_handle_string(oidp, avail, 0, req); - free(avail, M_TEMP); - return (error); -} - -SYSCTL_PROC(_machdep, OID_AUTO, idle_available, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, idle_sysctl_available, "A", "list of available idle functions"); - -static int -idle_sysctl(SYSCTL_HANDLER_ARGS) -{ - char buf[16]; - int error; - char *p; - int i; - - p = "unknown"; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (idle_tbl[i].id_fn == cpu_idle_fn) { - p = idle_tbl[i].id_name; - break; - } - } - strncpy(buf, p, sizeof(buf)); - error = sysctl_handle_string(oidp, buf, sizeof(buf), req); - if (error != 0 || req->newptr == NULL) - return (error); - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (strstr(idle_tbl[i].id_name, "mwait") && - (cpu_feature2 & CPUID2_MON) == 0) - continue; - if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && - cpu_idle_hook == NULL) - continue; - if (strcmp(idle_tbl[i].id_name, buf)) - continue; - cpu_idle_fn = idle_tbl[i].id_fn; - return (0); - } - return (EINVAL); -} - -SYSCTL_PROC(_machdep, OID_AUTO, idle, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, - idle_sysctl, "A", "currently selected idle function"); - /* * Reset registers to default values on exec. */ Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/amd64/include/md_var.h Wed Apr 22 12:32:14 2015 (r281851) @@ -91,6 +91,7 @@ struct dumperinfo; void *alloc_fpusave(int flags); void amd64_syscall(struct thread *td, int traced); void busdma_swi(void); +void cpu_probe_amdc1e(void); void cpu_setregs(void); void doreti_iret(void) __asm(__STRING(doreti_iret)); void doreti_iret_fault(void) __asm(__STRING(doreti_iret_fault)); Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/conf/files.amd64 Wed Apr 22 12:32:14 2015 (r281851) @@ -558,6 +558,7 @@ x86/pci/pci_bus.c optional pci x86/pci/qpi.c optional pci x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard +x86/x86/cpu_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/fdt_machdep.c optional fdt x86/x86/identcpu.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/conf/files.i386 Wed Apr 22 12:32:14 2015 (r281851) @@ -576,6 +576,7 @@ x86/pci/pci_bus.c optional pci x86/pci/qpi.c optional pci x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard +x86/x86/cpu_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/fdt_machdep.c optional fdt x86/x86/identcpu.c standard Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/conf/files.pc98 Wed Apr 22 12:32:14 2015 (r281851) @@ -248,6 +248,7 @@ x86/isa/isa.c optional isa x86/pci/pci_bus.c optional pci x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard +x86/x86/cpu_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/identcpu.c standard x86/x86/intr_machdep.c standard Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/i386/i386/machdep.c Wed Apr 22 12:32:14 2015 (r281851) @@ -1176,427 +1176,6 @@ sys_sigreturn(td, uap) } /* - * Machine dependent boot() routine - * - * I haven't seen anything to put here yet - * Possibly some stuff might be grafted back here from boot() - */ -void -cpu_boot(int howto) -{ -} - -/* - * Flush the D-cache for non-DMA I/O so that the I-cache can - * be made coherent later. - */ -void -cpu_flush_dcache(void *ptr, size_t len) -{ - /* Not applicable */ -} - -/* Get current clock frequency for the given cpu id. */ -int -cpu_est_clockrate(int cpu_id, uint64_t *rate) -{ - uint64_t tsc1, tsc2; - uint64_t acnt, mcnt, perf; - register_t reg; - - if (pcpu_find(cpu_id) == NULL || rate == NULL) - return (EINVAL); - if ((cpu_feature & CPUID_TSC) == 0) - return (EOPNOTSUPP); - - /* - * If TSC is P-state invariant and APERF/MPERF MSRs do not exist, - * DELAY(9) based logic fails. - */ - if (tsc_is_invariant && !tsc_perf_stat) - return (EOPNOTSUPP); - -#ifdef SMP - if (smp_cpus > 1) { - /* Schedule ourselves on the indicated cpu. */ - thread_lock(curthread); - sched_bind(curthread, cpu_id); - thread_unlock(curthread); - } -#endif - - /* Calibrate by measuring a short delay. */ - reg = intr_disable(); - if (tsc_is_invariant) { - wrmsr(MSR_MPERF, 0); - wrmsr(MSR_APERF, 0); - tsc1 = rdtsc(); - DELAY(1000); - mcnt = rdmsr(MSR_MPERF); - acnt = rdmsr(MSR_APERF); - tsc2 = rdtsc(); - intr_restore(reg); - perf = 1000 * acnt / mcnt; - *rate = (tsc2 - tsc1) * perf; - } else { - tsc1 = rdtsc(); - DELAY(1000); - tsc2 = rdtsc(); - intr_restore(reg); - *rate = (tsc2 - tsc1) * 1000; - } - -#ifdef SMP - if (smp_cpus > 1) { - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - } -#endif - - return (0); -} - -#ifdef XEN - -static void -idle_block(void) -{ - - HYPERVISOR_sched_op(SCHEDOP_block, 0); -} - -void -cpu_halt(void) -{ - HYPERVISOR_shutdown(SHUTDOWN_poweroff); -} - -int scheduler_running; - -static void -cpu_idle_hlt(sbintime_t sbt) -{ - - scheduler_running = 1; - enable_intr(); - idle_block(); -} - -#else -/* - * Shutdown the CPU as much as possible - */ -void -cpu_halt(void) -{ - for (;;) - halt(); -} - -#endif - -void (*cpu_idle_hook)(sbintime_t) = NULL; /* ACPI idle hook. */ -static int cpu_ident_amdc1e = 0; /* AMD C1E supported. */ -static int idle_mwait = 1; /* Use MONITOR/MWAIT for short idle. */ -SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RWTUN, &idle_mwait, - 0, "Use MONITOR/MWAIT for short idle"); - -#define STATE_RUNNING 0x0 -#define STATE_MWAIT 0x1 -#define STATE_SLEEPING 0x2 - -#ifndef PC98 -static void -cpu_idle_acpi(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_SLEEPING; - - /* See comments in cpu_idle_hlt(). */ - disable_intr(); - if (sched_runnable()) - enable_intr(); - else if (cpu_idle_hook) - cpu_idle_hook(sbt); - else - __asm __volatile("sti; hlt"); - *state = STATE_RUNNING; -} -#endif /* !PC98 */ - -#ifndef XEN -static void -cpu_idle_hlt(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_SLEEPING; - - /* - * Since we may be in a critical section from cpu_idle(), if - * an interrupt fires during that critical section we may have - * a pending preemption. If the CPU halts, then that thread - * may not execute until a later interrupt awakens the CPU. - * To handle this race, check for a runnable thread after - * disabling interrupts and immediately return if one is - * found. Also, we must absolutely guarentee that hlt is - * the next instruction after sti. This ensures that any - * interrupt that fires after the call to disable_intr() will - * immediately awaken the CPU from hlt. Finally, please note - * that on x86 this works fine because of interrupts enabled only - * after the instruction following sti takes place, while IF is set - * to 1 immediately, allowing hlt instruction to acknowledge the - * interrupt. - */ - disable_intr(); - if (sched_runnable()) - enable_intr(); - else - __asm __volatile("sti; hlt"); - *state = STATE_RUNNING; -} -#endif - -static void -cpu_idle_mwait(sbintime_t sbt) -{ - int *state; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_MWAIT; - - /* See comments in cpu_idle_hlt(). */ - disable_intr(); - if (sched_runnable()) { - enable_intr(); - *state = STATE_RUNNING; - return; - } - cpu_monitor(state, 0, 0); - if (*state == STATE_MWAIT) - __asm __volatile("sti; mwait" : : "a" (MWAIT_C1), "c" (0)); - else - enable_intr(); - *state = STATE_RUNNING; -} - -static void -cpu_idle_spin(sbintime_t sbt) -{ - int *state; - int i; - - state = (int *)PCPU_PTR(monitorbuf); - *state = STATE_RUNNING; - - /* - * The sched_runnable() call is racy but as long as there is - * a loop missing it one time will have just a little impact if any - * (and it is much better than missing the check at all). - */ - for (i = 0; i < 1000; i++) { - if (sched_runnable()) - return; - cpu_spinwait(); - } -} - -/* - * C1E renders the local APIC timer dead, so we disable it by - * reading the Interrupt Pending Message register and clearing - * both C1eOnCmpHalt (bit 28) and SmiOnCmpHalt (bit 27). - * - * Reference: - * "BIOS and Kernel Developer's Guide for AMD NPT Family 0Fh Processors" - * #32559 revision 3.00+ - */ -#define MSR_AMDK8_IPM 0xc0010055 -#define AMDK8_SMIONCMPHALT (1ULL << 27) -#define AMDK8_C1EONCMPHALT (1ULL << 28) -#define AMDK8_CMPHALT (AMDK8_SMIONCMPHALT | AMDK8_C1EONCMPHALT) - -static void -cpu_probe_amdc1e(void) -{ - - /* - * Detect the presence of C1E capability mostly on latest - * dual-cores (or future) k8 family. - */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - (cpu_id & 0x00000f00) == 0x00000f00 && - (cpu_id & 0x0fff0000) >= 0x00040000) { - cpu_ident_amdc1e = 1; - } -} - -#if defined(PC98) || defined(XEN) -void (*cpu_idle_fn)(sbintime_t) = cpu_idle_hlt; -#else -void (*cpu_idle_fn)(sbintime_t) = cpu_idle_acpi; -#endif - -void -cpu_idle(int busy) -{ -#ifndef XEN - uint64_t msr; -#endif - sbintime_t sbt = -1; - - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", - busy, curcpu); -#if defined(MP_WATCHDOG) && !defined(XEN) - ap_watchdog(PCPU_GET(cpuid)); -#endif -#ifndef XEN - /* If we are busy - try to use fast methods. */ - if (busy) { - if ((cpu_feature2 & CPUID2_MON) && idle_mwait) { - cpu_idle_mwait(busy); - goto out; - } - } -#endif - - /* If we have time - switch timers into idle mode. */ - if (!busy) { - critical_enter(); - sbt = cpu_idleclock(); - } - -#ifndef XEN - /* Apply AMD APIC timer C1E workaround. */ - if (cpu_ident_amdc1e && cpu_disable_c3_sleep) { - msr = rdmsr(MSR_AMDK8_IPM); - if (msr & AMDK8_CMPHALT) - wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); - } -#endif - - /* Call main idle method. */ - cpu_idle_fn(sbt); - - /* Switch timers back into active mode. */ - if (!busy) { - cpu_activeclock(); - critical_exit(); - } -#ifndef XEN -out: -#endif - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", - busy, curcpu); -} - -int -cpu_idle_wakeup(int cpu) -{ - struct pcpu *pcpu; - int *state; - - pcpu = pcpu_find(cpu); - state = (int *)pcpu->pc_monitorbuf; - /* - * This doesn't need to be atomic since missing the race will - * simply result in unnecessary IPIs. - */ - if (*state == STATE_SLEEPING) - return (0); - if (*state == STATE_MWAIT) - *state = STATE_RUNNING; - return (1); -} - -/* - * Ordered by speed/power consumption. - */ -struct { - void *id_fn; - char *id_name; -} idle_tbl[] = { - { cpu_idle_spin, "spin" }, - { cpu_idle_mwait, "mwait" }, - { cpu_idle_hlt, "hlt" }, -#ifndef PC98 - { cpu_idle_acpi, "acpi" }, -#endif - { NULL, NULL } -}; - -static int -idle_sysctl_available(SYSCTL_HANDLER_ARGS) -{ - char *avail, *p; - int error; - int i; - - avail = malloc(256, M_TEMP, M_WAITOK); - p = avail; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (strstr(idle_tbl[i].id_name, "mwait") && - (cpu_feature2 & CPUID2_MON) == 0) - continue; -#ifndef PC98 - if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && - cpu_idle_hook == NULL) - continue; -#endif - p += sprintf(p, "%s%s", p != avail ? ", " : "", - idle_tbl[i].id_name); - } - error = sysctl_handle_string(oidp, avail, 0, req); - free(avail, M_TEMP); - return (error); -} - -SYSCTL_PROC(_machdep, OID_AUTO, idle_available, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, idle_sysctl_available, "A", "list of available idle functions"); - -static int -idle_sysctl(SYSCTL_HANDLER_ARGS) -{ - char buf[16]; - int error; - char *p; - int i; - - p = "unknown"; - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (idle_tbl[i].id_fn == cpu_idle_fn) { - p = idle_tbl[i].id_name; - break; - } - } - strncpy(buf, p, sizeof(buf)); - error = sysctl_handle_string(oidp, buf, sizeof(buf), req); - if (error != 0 || req->newptr == NULL) - return (error); - for (i = 0; idle_tbl[i].id_name != NULL; i++) { - if (strstr(idle_tbl[i].id_name, "mwait") && - (cpu_feature2 & CPUID2_MON) == 0) - continue; -#ifndef PC98 - if (strcmp(idle_tbl[i].id_name, "acpi") == 0 && - cpu_idle_hook == NULL) - continue; -#endif - if (strcmp(idle_tbl[i].id_name, buf)) - continue; - cpu_idle_fn = idle_tbl[i].id_fn; - return (0); - } - return (EINVAL); -} - -SYSCTL_PROC(_machdep, OID_AUTO, idle, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, - idle_sysctl, "A", "currently selected idle function"); - -/* * Reset registers to default values on exec. */ void Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Wed Apr 22 12:24:38 2015 (r281850) +++ head/sys/i386/include/md_var.h Wed Apr 22 12:32:14 2015 (r281851) @@ -97,6 +97,7 @@ struct dumperinfo; void *alloc_fpusave(int flags); void bcopyb(const void *from, void *to, size_t len); void busdma_swi(void); +void cpu_probe_amdc1e(void); void cpu_setregs(void); void cpu_switch_load_gs(void) __asm(__STRING(cpu_switch_load_gs)); void doreti_iret(void) __asm(__STRING(doreti_iret)); Copied and modified: head/sys/x86/x86/cpu_machdep.c (from r281849, head/sys/i386/i386/machdep.c) ============================================================================== --- head/sys/i386/i386/machdep.c Wed Apr 22 10:59:05 2015 (r281849, copy source) +++ head/sys/x86/x86/cpu_machdep.c Wed Apr 22 12:32:14 2015 (r281851) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2003 Peter Wemm. * Copyright (c) 1992 Terrence R. Lambert. * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. * All rights reserved. @@ -40,7 +41,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_apic.h" #include "opt_atpic.h" #include "opt_compat.h" #include "opt_cpu.h" @@ -50,115 +50,55 @@ __FBSDID("$FreeBSD$"); #include "opt_kstack_pages.h" #include "opt_maxmem.h" #include "opt_mp_watchdog.h" -#include "opt_npx.h" #include "opt_perfmon.h" #include "opt_platform.h" +#ifdef __i386__ +#include "opt_npx.h" +#include "opt_apic.h" #include "opt_xbox.h" +#endif #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 #ifdef SMP #include #endif -#include #include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef DDB -#ifndef KDB -#error KDB must be enabled in order for DDB to work! -#endif -#include -#include -#endif - -#ifdef PC98 -#include -#else -#include -#endif -#include - -#include #include #include #include -#include -#include +#include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef PERFMON #include #endif +#include #ifdef SMP #include #endif -#ifdef FDT -#include -#endif -#ifdef DEV_APIC -#include -#endif - -#ifdef DEV_ISA -#include -#endif - -#ifdef XBOX -#include - -int arch_i386_is_xbox = 0; -uint32_t arch_i386_xbox_memsize = 0; -#endif +#include +#include +#include +#include +#include +#include +#include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 13:52:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A271FF10; Wed, 22 Apr 2015 13:52:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91194144D; Wed, 22 Apr 2015 13:52:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MDqUoB004367; Wed, 22 Apr 2015 13:52:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MDqUBx004366; Wed, 22 Apr 2015 13:52:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504221352.t3MDqUBx004366@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 22 Apr 2015 13:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281854 - head/release/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 13:52:30 -0000 Author: gjb Date: Wed Apr 22 13:52:29 2015 New Revision: 281854 URL: https://svnweb.freebsd.org/changeset/base/281854 Log: Remove the gptboot partition from the arm64 memory stick image, which is not needed/used. Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/make-memstick.sh Modified: head/release/arm64/make-memstick.sh ============================================================================== --- head/release/arm64/make-memstick.sh Wed Apr 22 12:58:16 2015 (r281853) +++ head/release/arm64/make-memstick.sh Wed Apr 22 13:52:29 2015 (r281854) @@ -36,6 +36,6 @@ if [ $? -ne 0 ]; then fi rm ${1}/etc/fstab -mkimg -s gpt -p efi:=${1}/boot/boot1.efifat -p freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} +mkimg -s gpt -p efi:=${1}/boot/boot1.efifat -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} rm ${2}.part From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 13:55:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9694212D; Wed, 22 Apr 2015 13:55:55 +0000 (UTC) Date: Wed, 22 Apr 2015 13:55:52 +0000 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281854 - head/release/arm64 Message-ID: <20150422135552.GD31769@hub.FreeBSD.org> References: <201504221352.t3MDqUBx004366@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NtwzykIc2mflq5ck" Content-Disposition: inline In-Reply-To: <201504221352.t3MDqUBx004366@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 13:55:56 -0000 --NtwzykIc2mflq5ck Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 22, 2015 at 01:52:30PM +0000, Glen Barber wrote: > Author: gjb > Date: Wed Apr 22 13:52:29 2015 > New Revision: 281854 > URL: https://svnweb.freebsd.org/changeset/base/281854 >=20 > Log: > Remove the gptboot partition from the arm64 memory stick image, > which is not needed/used. > =20 Spotted by andrew@. Glen --NtwzykIc2mflq5ck Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVN6hoAAoJEAMUWKVHj+KTqVkP/3+Gx2U7pxmtF5qQgxp1E+JM 3hjicIakaurtmEoJBUKdzQUctlUZwnM9E7dZ3bJLeGPVXbeDaRXR6Jl+mJ2s34+l zwM6FCzL+pozAhVhuoZ1gsAzM/CPgwmYYcM+Rdkgjvnw70a3CPq9tZ8hjSNdvV3B 8E1QONL6AgsR4EOWmL7hJQz2PqoX+xJCd49rDTY2kl9iYMR/DBH0lJtxJjr9pvUg zPGZ8CqQfA4Lmte5uZzb+JQc8EcLPqweHwyW26lhTZ7farJ3taWQZebPbwAWi/5v jGfNt5N52ek1l+ulIDfePYsrUxIgSNFbaHCf+4zUKVT+4dbDvcNfWF8i/gZH0pe4 T/uUH8ygE1ok98wPqPfB/b/b3bWhY2p6ARf0sLPSvma5fGn2CAEZ98L4dDh/jZxt 043Togf7ZBf6aDhqQq4FCv5cqcqf9Xe759P60O/DfoRpTHGowMw6HV7OqeNNyGnG GO/tzfUOFgul6scpoSRMYL+9oxt/FpWvam8MdzbRbJ4rideaFfEvmkOt+NWlsp4R eAFRREwHfrZWFt06yEaPxkN4+4lINh8JmHankbQe2FhJImf8H+rd1tOFKtuZSaHS /a75NbvGiMnIwVE5lt/YOXOyKdA9/YU2pmGnmoVhJY0928rDbY8QenyIKG/R+Q3H Ou8T4fokQRx11XzS0XuD =OFkk -----END PGP SIGNATURE----- --NtwzykIc2mflq5ck-- From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 14:39:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 275EF9BC; Wed, 22 Apr 2015 14:39:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 084551988; Wed, 22 Apr 2015 14:39:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MEd2Y6040613; Wed, 22 Apr 2015 14:39:02 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MEcxgW040556; Wed, 22 Apr 2015 14:38:59 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201504221438.t3MEcxgW040556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 22 Apr 2015 14:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281855 - in head/sys: conf dev/bxe dev/mxge geom/uncompress geom/uzip kern libkern net netgraph opencrypto sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 14:39:03 -0000 Author: rodrigc Date: Wed Apr 22 14:38:58 2015 New Revision: 281855 URL: https://svnweb.freebsd.org/changeset/base/281855 Log: Move zlib.c from net to libkern. It is not network-specific code and would be better as part of libkern instead. Move zlib.h and zutil.h from net/ to sys/ Update includes to use sys/zlib.h and sys/zutil.h instead of net/ Submitted by: Steve Kiernan stevek@juniper.net Obtained from: Juniper Networks, Inc. GitHub Pull Request: https://github.com/freebsd/freebsd/pull/28 Relnotes: yes Added: head/sys/libkern/zlib.c (contents, props changed) - copied, changed from r281845, head/sys/net/zlib.c head/sys/sys/zlib.h (contents, props changed) - copied, changed from r281845, head/sys/net/zlib.h head/sys/sys/zutil.h (contents, props changed) - copied, changed from r281845, head/sys/net/zutil.h Deleted: head/sys/net/zlib.c head/sys/net/zlib.h head/sys/net/zutil.h Modified: head/sys/conf/files head/sys/dev/bxe/bxe.h head/sys/dev/mxge/if_mxge.c head/sys/geom/uncompress/g_uncompress.c head/sys/geom/uzip/g_uzip.c head/sys/kern/kern_gzio.c head/sys/kern/link_elf.c head/sys/kern/link_elf_obj.c head/sys/netgraph/ng_deflate.c head/sys/opencrypto/cryptodeflate.c head/sys/opencrypto/deflate.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/conf/files Wed Apr 22 14:38:58 2015 (r281855) @@ -3262,6 +3262,9 @@ libkern/strtoul.c standard libkern/strtouq.c standard libkern/strvalid.c standard libkern/timingsafe_bcmp.c standard +libkern/zlib.c optional crypto | geom_uzip | ipsec | \ + mxge | netgraph_deflate | \ + ddb_ctf | gzio | geom_uncompress net/altq/altq_cbq.c optional altq net/altq/altq_cdnr.c optional altq net/altq/altq_hfsc.c optional altq @@ -3324,9 +3327,6 @@ net/slcompress.c optional netgraph_vjc netgraph_sppp net/toeplitz.c optional inet rss | inet6 rss net/vnet.c optional vimage -net/zlib.c optional crypto | geom_uzip | ipsec | \ - mxge | netgraph_deflate | \ - ddb_ctf | gzio | geom_uncompress net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan wlan_acl net80211/ieee80211_action.c optional wlan Modified: head/sys/dev/bxe/bxe.h ============================================================================== --- head/sys/dev/bxe/bxe.h Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/dev/bxe/bxe.h Wed Apr 22 14:38:58 2015 (r281855) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -60,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/dev/mxge/if_mxge.c Wed Apr 22 14:38:58 2015 (r281855) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -58,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/geom/uncompress/g_uncompress.c ============================================================================== --- head/sys/geom/uncompress/g_uncompress.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/geom/uncompress/g_uncompress.c Wed Apr 22 14:38:58 2015 (r281855) @@ -45,10 +45,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -#include #include #ifdef GEOM_UNCOMPRESS_DEBUG Modified: head/sys/geom/uzip/g_uzip.c ============================================================================== --- head/sys/geom/uzip/g_uzip.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/geom/uzip/g_uzip.c Wed Apr 22 14:38:58 2015 (r281855) @@ -38,9 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -#include FEATURE(geom_uzip, "GEOM uzip read-only compressed disks support"); Modified: head/sys/kern/kern_gzio.c ============================================================================== --- head/sys/kern/kern_gzio.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/kern/kern_gzio.c Wed Apr 22 14:38:58 2015 (r281855) @@ -32,8 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include - -#include +#include #define KERN_GZ_HDRLEN 10 /* gzip header length */ #define KERN_GZ_TRAILERLEN 8 /* gzip trailer length */ Modified: head/sys/kern/link_elf.c ============================================================================== --- head/sys/kern/link_elf.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/kern/link_elf.c Wed Apr 22 14:38:58 2015 (r281855) @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef DDB_CTF -#include +#include #endif #include "linker_if.h" Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/kern/link_elf_obj.c Wed Apr 22 14:38:58 2015 (r281855) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef DDB_CTF -#include +#include #endif #include "linker_if.h" Copied and modified: head/sys/libkern/zlib.c (from r281845, head/sys/net/zlib.c) ============================================================================== --- head/sys/net/zlib.c Wed Apr 22 01:54:25 2015 (r281845, copy source) +++ head/sys/libkern/zlib.c Wed Apr 22 14:38:58 2015 (r281855) @@ -54,7 +54,7 @@ #define _Z_UTIL_H #ifdef _KERNEL -#include +#include #else #include "zlib.h" #endif Modified: head/sys/netgraph/ng_deflate.c ============================================================================== --- head/sys/netgraph/ng_deflate.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/netgraph/ng_deflate.c Wed Apr 22 14:38:58 2015 (r281855) @@ -39,8 +39,7 @@ #include #include #include - -#include +#include #include #include Modified: head/sys/opencrypto/cryptodeflate.c ============================================================================== --- head/sys/opencrypto/cryptodeflate.c Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/opencrypto/cryptodeflate.c Wed Apr 22 14:38:58 2015 (r281855) @@ -29,7 +29,7 @@ /* * This file contains a wrapper around the deflate algo compression - * functions using the zlib library (see net/zlib.{c,h}) + * functions using the zlib library (see libkern/zlib.c and sys/zlib.h}) */ #include @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include Modified: head/sys/opencrypto/deflate.h ============================================================================== --- head/sys/opencrypto/deflate.h Wed Apr 22 13:52:29 2015 (r281854) +++ head/sys/opencrypto/deflate.h Wed Apr 22 14:38:58 2015 (r281855) @@ -36,7 +36,7 @@ #ifndef _CRYPTO_DEFLATE_H_ #define _CRYPTO_DEFLATE_H_ -#include +#include #define Z_METHOD 8 #define Z_MEMLEVEL 8 Copied and modified: head/sys/sys/zlib.h (from r281845, head/sys/net/zlib.h) ============================================================================== Copied and modified: head/sys/sys/zutil.h (from r281845, head/sys/net/zutil.h) ============================================================================== --- head/sys/net/zutil.h Wed Apr 22 01:54:25 2015 (r281845, copy source) +++ head/sys/sys/zutil.h Wed Apr 22 14:38:58 2015 (r281855) @@ -17,7 +17,7 @@ #define ZEXPORT #ifdef _KERNEL -#include +#include #else #include "zlib.h" #endif From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 15:19:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71DC234F; Wed, 22 Apr 2015 15:19:43 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CD461DC6; Wed, 22 Apr 2015 15:19:43 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3D3E7B9A3; Wed, 22 Apr 2015 11:19:42 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281851 - in head/sys: amd64/amd64 amd64/include conf i386/i386 i386/include x86/x86 Date: Wed, 22 Apr 2015 10:32:46 -0400 Message-ID: <4550390.4Tsi2WsAx2@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504221232.t3MCWFaI034532@svn.freebsd.org> References: <201504221232.t3MCWFaI034532@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 22 Apr 2015 11:19:42 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 15:19:43 -0000 On Wednesday, April 22, 2015 12:32:15 PM Konstantin Belousov wrote: > Author: kib > Date: Wed Apr 22 12:32:14 2015 > New Revision: 281851 > URL: https://svnweb.freebsd.org/changeset/base/281851 > > Log: > Move some common code from sys/amd64/amd64/machdep.c and > sys/i386/i386/machdep.c to new file sys/x86/x86/cpu_machdep.c. Most > of the code is related to the idle handling. > > Discussed with: pluknet > Sponsored by: The FreeBSD Foundation Nice! I still want to do a sys/x86/x86/mp_subr.c. Hopefully soonish. :-/ -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 16:51:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 168D9CDF; Wed, 22 Apr 2015 16:51:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04FB218C0; Wed, 22 Apr 2015 16:51:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MGpL9e040173; Wed, 22 Apr 2015 16:51:21 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MGpLbx040172; Wed, 22 Apr 2015 16:51:21 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504221651.t3MGpLbx040172@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 16:51:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281857 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 16:51:22 -0000 Author: pfg Date: Wed Apr 22 16:51:21 2015 New Revision: 281857 URL: https://svnweb.freebsd.org/changeset/base/281857 Log: _pthread_cleanup_push: fix allocator sizeof operand mismatch Same fix appears to be in DragonFly's libthread_xu. Found by: Clang Static Analyzer MFC after: 1 week Modified: head/lib/libthr/thread/thr_clean.c Modified: head/lib/libthr/thread/thr_clean.c ============================================================================== --- head/lib/libthr/thread/thr_clean.c Wed Apr 22 16:06:49 2015 (r281856) +++ head/lib/libthr/thread/thr_clean.c Wed Apr 22 16:51:21 2015 (r281857) @@ -84,7 +84,7 @@ _pthread_cleanup_push(void (*routine) (v curthread->unwind_disabled = 1; #endif if ((newbuf = (struct pthread_cleanup *) - malloc(sizeof(struct _pthread_cleanup_info))) != NULL) { + malloc(sizeof(struct pthread_cleanup))) != NULL) { newbuf->routine = routine; newbuf->routine_arg = arg; newbuf->onheap = 1; From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 17:09:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAA5611B; Wed, 22 Apr 2015 17:09:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9B271A41; Wed, 22 Apr 2015 17:09:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MH93ng054507; Wed, 22 Apr 2015 17:09:03 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MH93vD054506; Wed, 22 Apr 2015 17:09:03 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504221709.t3MH93vD054506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 17:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281858 - head/lib/libc/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 17:09:03 -0000 Author: pfg Date: Wed Apr 22 17:09:02 2015 New Revision: 281858 URL: https://svnweb.freebsd.org/changeset/base/281858 Log: computematchjumps(): fix allocator sizeof operand mismatch. Mostly cosmetical warning. Found by: Clang static analyzer Modified: head/lib/libc/regex/regcomp.c Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Wed Apr 22 16:51:21 2015 (r281857) +++ head/lib/libc/regex/regcomp.c Wed Apr 22 17:09:02 2015 (r281858) @@ -1726,13 +1726,13 @@ computematchjumps(struct parse *p, struc if (p->error != 0) return; - pmatches = (int*) malloc(g->mlen * sizeof(unsigned int)); + pmatches = (int*) malloc(g->mlen * sizeof(int)); if (pmatches == NULL) { g->matchjump = NULL; return; } - g->matchjump = (int*) malloc(g->mlen * sizeof(unsigned int)); + g->matchjump = (int*) malloc(g->mlen * sizeof(int)); if (g->matchjump == NULL) { /* Not a fatal error */ free(pmatches); return; From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 17:15:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id D1984428; Wed, 22 Apr 2015 17:15:42 +0000 (UTC) Date: Wed, 22 Apr 2015 17:15:42 +0000 From: Alexey Dokuchaev To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281858 - head/lib/libc/regex Message-ID: <20150422171542.GA4240@FreeBSD.org> References: <201504221709.t3MH93vD054506@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504221709.t3MH93vD054506@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 17:15:42 -0000 On Wed, Apr 22, 2015 at 05:09:03PM +0000, Pedro F. Giffuni wrote: > New Revision: 281858 > URL: https://svnweb.freebsd.org/changeset/base/281858 > > Log: > computematchjumps(): fix allocator sizeof operand mismatch. > [...] > - pmatches = (int*) malloc(g->mlen * sizeof(unsigned int)); > + pmatches = (int*) malloc(g->mlen * sizeof(int)); > if (pmatches == NULL) { > g->matchjump = NULL; > return; > } > > - g->matchjump = (int*) malloc(g->mlen * sizeof(unsigned int)); > + g->matchjump = (int*) malloc(g->mlen * sizeof(int)); Since you've touched these lines, you could'be also removed (int *) casting from malloc() calls. But now it's too late (does not warrant another commit). ./danfe From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 17:35:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A03487C5; Wed, 22 Apr 2015 17:35:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E0251D8C; Wed, 22 Apr 2015 17:35:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MHZxmN075218; Wed, 22 Apr 2015 17:35:59 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MHZxqx075217; Wed, 22 Apr 2015 17:35:59 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504221735.t3MHZxqx075217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 22 Apr 2015 17:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281859 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 17:35:59 -0000 Author: loos Date: Wed Apr 22 17:35:58 2015 New Revision: 281859 URL: https://svnweb.freebsd.org/changeset/base/281859 Log: Fix the SDHCI clock frequency for RPI2, the default clock (for the newer firmware versions) is 250MHz. Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2836.dtsi Wed Apr 22 17:09:02 2015 (r281858) +++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi Wed Apr 22 17:35:58 2015 (r281859) @@ -431,7 +431,7 @@ interrupts = <70>; interrupt-parent = <&intc>; - clock-frequency = <2500000000>; /* Set by VideoCore */ + clock-frequency = <250000000>; /* Set by VideoCore */ }; uart0: uart0 { From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 18:11:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08AC9F36; Wed, 22 Apr 2015 18:11:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA30411B2; Wed, 22 Apr 2015 18:11:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MIBY6L099703; Wed, 22 Apr 2015 18:11:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MIBYoA099702; Wed, 22 Apr 2015 18:11:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504221811.t3MIBYoA099702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Apr 2015 18:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281860 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 18:11:35 -0000 Author: mav Date: Wed Apr 22 18:11:34 2015 New Revision: 281860 URL: https://svnweb.freebsd.org/changeset/base/281860 Log: Make AIO to not allocate pbufs for unmapped I/O like r281825. While there, make few more performance optimizations. On 40-core system doing many 512-byte AIO reads from array of raw SSDs this change removes lock congestions inside pbuf allocator and devfs, and bottleneck on single AIO completion taskqueue thread. It improves peak AIO performance from ~600K to ~1.3M IOPS. MFC after: 2 weeks Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Wed Apr 22 17:35:58 2015 (r281859) +++ head/sys/kern/vfs_aio.c Wed Apr 22 18:11:34 2015 (r281860) @@ -59,10 +59,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include @@ -232,9 +234,10 @@ struct aiocblist { int jobstate; /* (b) job state */ int inputcharge; /* (*) input blockes */ int outputcharge; /* (*) output blockes */ - struct buf *bp; /* (*) private to BIO backend, - * buffer pointer - */ + struct bio *bp; /* (*) BIO backend BIO pointer */ + struct buf *pbuf; /* (*) BIO backend buffer pointer */ + struct vm_page *pages[btoc(MAXPHYS)+1]; /* BIO backend pages */ + int npages; /* BIO backend number of pages */ struct proc *userproc; /* (*) user process */ struct ucred *cred; /* (*) active credential when created */ struct file *fd_file; /* (*) pointer to file structure */ @@ -243,7 +246,6 @@ struct aiocblist { struct knlist klist; /* (a) list of knotes */ struct aiocb uaiocb; /* (*) kernel I/O control block */ ksiginfo_t ksi; /* (a) realtime signal info */ - struct task biotask; /* (*) private to BIO backend */ uint64_t seqno; /* (*) job number */ int pending; /* (a) number of pending I/O, aio_fsync only */ }; @@ -344,11 +346,10 @@ static void aio_process_mlock(struct aio static int aio_newproc(int *); int aio_aqueue(struct thread *td, struct aiocb *job, struct aioliojob *lio, int type, struct aiocb_ops *ops); -static void aio_physwakeup(struct buf *bp); +static void aio_physwakeup(struct bio *bp); static void aio_proc_rundown(void *arg, struct proc *p); static void aio_proc_rundown_exec(void *arg, struct proc *p, struct image_params *imgp); static int aio_qphysio(struct proc *p, struct aiocblist *iocb); -static void biohelper(void *, int); static void aio_daemon(void *param); static void aio_swake_cb(struct socket *, struct sockbuf *); static int aio_unload(void); @@ -1294,13 +1295,15 @@ aio_qphysio(struct proc *p, struct aiocb { struct aiocb *cb; struct file *fp; - struct buf *bp; + struct bio *bp; + struct buf *pbuf; struct vnode *vp; struct cdevsw *csw; struct cdev *dev; struct kaioinfo *ki; struct aioliojob *lj; - int error, ref; + int error, ref, unmap, poff; + vm_prot_t prot; cb = &aiocbe->uaiocb; fp = aiocbe->fd_file; @@ -1309,107 +1312,121 @@ aio_qphysio(struct proc *p, struct aiocb return (-1); vp = fp->f_vnode; - - /* - * If its not a disk, we don't want to return a positive error. - * It causes the aio code to not fall through to try the thread - * way when you're talking to a regular file. - */ - if (!vn_isdisk(vp, &error)) { - if (error == ENOTBLK) - return (-1); - else - return (error); - } - - if (vp->v_bufobj.bo_bsize == 0) - return (-1); - - if (cb->aio_nbytes % vp->v_bufobj.bo_bsize) + if (vp->v_type != VCHR) return (-1); - - if (cb->aio_nbytes > - MAXPHYS - (((vm_offset_t) cb->aio_buf) & PAGE_MASK)) + if (vp->v_bufobj.bo_bsize == 0) return (-1); - - ki = p->p_aioinfo; - if (ki->kaio_buffer_count >= ki->kaio_ballowed_count) + if (cb->aio_nbytes % vp->v_bufobj.bo_bsize) return (-1); ref = 0; csw = devvn_refthread(vp, &dev, &ref); if (csw == NULL) return (ENXIO); + + if ((csw->d_flags & D_DISK) == 0) { + error = -1; + goto unref; + } if (cb->aio_nbytes > dev->si_iosize_max) { error = -1; goto unref; } - /* Create and build a buffer header for a transfer. */ - bp = (struct buf *)getpbuf(NULL); - BUF_KERNPROC(bp); + ki = p->p_aioinfo; + poff = (vm_offset_t)cb->aio_buf & PAGE_MASK; + unmap = ((dev->si_flags & SI_UNMAPPED) && unmapped_buf_allowed); + if (unmap) { + if (cb->aio_nbytes > MAXPHYS) { + error = -1; + goto unref; + } + } else { + if (cb->aio_nbytes > MAXPHYS - poff) { + error = -1; + goto unref; + } + if (ki->kaio_buffer_count >= ki->kaio_ballowed_count) { + error = -1; + goto unref; + } + } + aiocbe->bp = bp = g_alloc_bio(); + if (!unmap) { + aiocbe->pbuf = pbuf = (struct buf *)getpbuf(NULL); + BUF_KERNPROC(pbuf); + } AIO_LOCK(ki); ki->kaio_count++; - ki->kaio_buffer_count++; + if (!unmap) + ki->kaio_buffer_count++; lj = aiocbe->lio; if (lj) lj->lioj_count++; - AIO_UNLOCK(ki); - - /* - * Get a copy of the kva from the physical buffer. - */ - error = 0; - - bp->b_bcount = cb->aio_nbytes; - bp->b_bufsize = cb->aio_nbytes; - bp->b_iodone = aio_physwakeup; - bp->b_saveaddr = bp->b_data; - bp->b_data = (void *)(uintptr_t)cb->aio_buf; - bp->b_offset = cb->aio_offset; - bp->b_iooffset = cb->aio_offset; - bp->b_blkno = btodb(cb->aio_offset); - bp->b_iocmd = cb->aio_lio_opcode == LIO_WRITE ? BIO_WRITE : BIO_READ; - - /* - * Bring buffer into kernel space. - */ - if (vmapbuf(bp, (dev->si_flags & SI_UNMAPPED) == 0) < 0) { - error = EFAULT; - goto doerror; - } - - AIO_LOCK(ki); - aiocbe->bp = bp; - bp->b_caller1 = (void *)aiocbe; TAILQ_INSERT_TAIL(&ki->kaio_bufqueue, aiocbe, plist); TAILQ_INSERT_TAIL(&ki->kaio_all, aiocbe, allist); aiocbe->jobstate = JOBST_JOBQBUF; cb->_aiocb_private.status = cb->aio_nbytes; AIO_UNLOCK(ki); - atomic_add_int(&num_queue_count, 1); - atomic_add_int(&num_buf_aio, 1); - - bp->b_error = 0; + bp->bio_length = cb->aio_nbytes; + bp->bio_bcount = cb->aio_nbytes; + bp->bio_done = aio_physwakeup; + bp->bio_data = (void *)(uintptr_t)cb->aio_buf; + bp->bio_offset = cb->aio_offset; + bp->bio_cmd = cb->aio_lio_opcode == LIO_WRITE ? BIO_WRITE : BIO_READ; + bp->bio_dev = dev; + bp->bio_caller1 = (void *)aiocbe; + + prot = VM_PROT_READ; + if (cb->aio_lio_opcode == LIO_READ) + prot |= VM_PROT_WRITE; /* Less backwards than it looks */ + if ((aiocbe->npages = vm_fault_quick_hold_pages( + &curproc->p_vmspace->vm_map, + (vm_offset_t)bp->bio_data, bp->bio_length, prot, aiocbe->pages, + sizeof(aiocbe->pages)/sizeof(aiocbe->pages[0]))) < 0) { + error = EFAULT; + goto doerror; + } + if (!unmap) { + pmap_qenter((vm_offset_t)pbuf->b_data, + aiocbe->pages, aiocbe->npages); + bp->bio_data = pbuf->b_data + poff; + } else { + bp->bio_ma = aiocbe->pages; + bp->bio_ma_n = aiocbe->npages; + bp->bio_ma_offset = poff; + bp->bio_data = unmapped_buf; + bp->bio_flags |= BIO_UNMAPPED; + } - TASK_INIT(&aiocbe->biotask, 0, biohelper, aiocbe); + atomic_add_int(&num_queue_count, 1); + if (!unmap) + atomic_add_int(&num_buf_aio, 1); /* Perform transfer. */ - dev_strategy_csw(dev, csw, bp); + csw->d_strategy(bp); dev_relthread(dev, ref); return (0); doerror: AIO_LOCK(ki); + aiocbe->jobstate = JOBST_NULL; + TAILQ_REMOVE(&ki->kaio_bufqueue, aiocbe, plist); + TAILQ_REMOVE(&ki->kaio_all, aiocbe, allist); ki->kaio_count--; - ki->kaio_buffer_count--; + if (!unmap) + ki->kaio_buffer_count--; if (lj) lj->lioj_count--; - aiocbe->bp = NULL; AIO_UNLOCK(ki); - relpbuf(bp, NULL); + if (pbuf) { + relpbuf(pbuf, NULL); + aiocbe->pbuf = NULL; + } + g_destroy_bio(bp); + aiocbe->bp = NULL; unref: dev_relthread(dev, ref); return (error); @@ -1787,8 +1804,6 @@ no_kqueue: } #endif queueit: - /* No buffer for daemon I/O. */ - aiocbe->bp = NULL; atomic_add_int(&num_queue_count, 1); AIO_LOCK(ki); @@ -2425,54 +2440,43 @@ sys_lio_listio(struct thread *td, struct return (error); } -/* - * Called from interrupt thread for physio, we should return as fast - * as possible, so we schedule a biohelper task. - */ static void -aio_physwakeup(struct buf *bp) +aio_physwakeup(struct bio *bp) { - struct aiocblist *aiocbe; - - aiocbe = (struct aiocblist *)bp->b_caller1; - taskqueue_enqueue(taskqueue_aiod_bio, &aiocbe->biotask); -} - -/* - * Task routine to perform heavy tasks, process wakeup, and signals. - */ -static void -biohelper(void *context, int pending) -{ - struct aiocblist *aiocbe = context; - struct buf *bp; + struct aiocblist *aiocbe = (struct aiocblist *)bp->bio_caller1; struct proc *userp; struct kaioinfo *ki; int nblks; + /* Release mapping into kernel space. */ + if (aiocbe->pbuf) { + pmap_qremove((vm_offset_t)aiocbe->pbuf->b_data, aiocbe->npages); + relpbuf(aiocbe->pbuf, NULL); + aiocbe->pbuf = NULL; + atomic_subtract_int(&num_buf_aio, 1); + } + vm_page_unhold_pages(aiocbe->pages, aiocbe->npages); + bp = aiocbe->bp; + aiocbe->bp = NULL; userp = aiocbe->userproc; ki = userp->p_aioinfo; AIO_LOCK(ki); - aiocbe->uaiocb._aiocb_private.status -= bp->b_resid; + aiocbe->uaiocb._aiocb_private.status -= bp->bio_resid; aiocbe->uaiocb._aiocb_private.error = 0; - if (bp->b_ioflags & BIO_ERROR) - aiocbe->uaiocb._aiocb_private.error = bp->b_error; + if (bp->bio_flags & BIO_ERROR) + aiocbe->uaiocb._aiocb_private.error = bp->bio_error; nblks = btodb(aiocbe->uaiocb.aio_nbytes); if (aiocbe->uaiocb.aio_lio_opcode == LIO_WRITE) aiocbe->outputcharge += nblks; else aiocbe->inputcharge += nblks; - aiocbe->bp = NULL; TAILQ_REMOVE(&userp->p_aioinfo->kaio_bufqueue, aiocbe, plist); ki->kaio_buffer_count--; aio_bio_done_notify(userp, aiocbe, DONE_BUF); AIO_UNLOCK(ki); - /* Release mapping into kernel space. */ - vunmapbuf(bp); - relpbuf(bp, NULL); - atomic_subtract_int(&num_buf_aio, 1); + g_destroy_bio(bp); } /* syscall - wait for the next completion of an aio request */ From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 18:13:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BF5913F; Wed, 22 Apr 2015 18:13: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A9B511D7; Wed, 22 Apr 2015 18:13:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MIDTSO003011; Wed, 22 Apr 2015 18:13:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MIDTgW003010; Wed, 22 Apr 2015 18:13:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504221813.t3MIDTgW003010@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 18:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281861 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 18:13:29 -0000 Author: pfg Date: Wed Apr 22 18:13:28 2015 New Revision: 281861 URL: https://svnweb.freebsd.org/changeset/base/281861 Log: Add definition for the argument_with_type_tag attribute. This attribute originates in clang and brings support for checking types of variadic functions' arguments for functions like fcntl() and ioctl(). Unfortunately lint(1) will complain about them: in particular as one of the parameters is the function being tagged. For now define this attribute in the lint-sensitive section. Reference: http://clang.llvm.org/docs/AttributeReference.html#type-safety-checking Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Wed Apr 22 18:11:34 2015 (r281860) +++ head/sys/sys/cdefs.h Wed Apr 22 18:13:28 2015 (r281861) @@ -212,6 +212,7 @@ #define __unused #define __packed #define __aligned(x) +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) #define __section(x) #define __weak #else @@ -236,6 +237,12 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif +#if __has_attribute(argument_with_type_tag) +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ + __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) +#else +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) +#endif #if defined(__INTEL_COMPILER) #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 18:15:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 885F029F; Wed, 22 Apr 2015 18:15:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76E8011E8; Wed, 22 Apr 2015 18:15:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MIFJoH003783; Wed, 22 Apr 2015 18:15:19 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MIFJFi003782; Wed, 22 Apr 2015 18:15:19 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201504221815.t3MIFJFi003782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Wed, 22 Apr 2015 18:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281862 - head/sys/modules/zlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 18:15:19 -0000 Author: rodrigc Date: Wed Apr 22 18:15:18 2015 New Revision: 281862 URL: https://svnweb.freebsd.org/changeset/base/281862 Log: Move zlib.c from net to libkern. Modified: head/sys/modules/zlib/Makefile Modified: head/sys/modules/zlib/Makefile ============================================================================== --- head/sys/modules/zlib/Makefile Wed Apr 22 18:13:28 2015 (r281861) +++ head/sys/modules/zlib/Makefile Wed Apr 22 18:15:18 2015 (r281862) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../net +.PATH: ${.CURDIR}/../../libkern KMOD= zlib SRCS= zlib.c From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 18:35:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4887619; Wed, 22 Apr 2015 18:35:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2FC21441; Wed, 22 Apr 2015 18:35:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MIZ3OL018106; Wed, 22 Apr 2015 18:35:03 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MIZ3ud018105; Wed, 22 Apr 2015 18:35:03 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504221835.t3MIZ3ud018105@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 22 Apr 2015 18:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281863 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 18:35:03 -0000 Author: loos Date: Wed Apr 22 18:35:02 2015 New Revision: 281863 URL: https://svnweb.freebsd.org/changeset/base/281863 Log: Fetch the SDHCI frequency from videocore (our prefered source) and only if it fails, fetch the clock-frequency from DTB. If both methods fail, use the hardcoded default. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Apr 22 18:15:18 2015 (r281862) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Apr 22 18:35:02 2015 (r281863) @@ -181,17 +181,16 @@ bcm_sdhci_attach(device_t dev) if (err == 0) { /* Convert to MHz */ default_freq /= 1000000; - if (bootverbose) - device_printf(dev, "default frequency: %dMHz\n", - default_freq); + } + if (default_freq == 0) { + node = ofw_bus_get_node(sc->sc_dev); + if ((OF_getencprop(node, "clock-frequency", &cell, + sizeof(cell))) > 0) + default_freq = cell / 1000000; } if (default_freq == 0) default_freq = BCM2835_DEFAULT_SDHCI_FREQ; - node = ofw_bus_get_node(sc->sc_dev); - if ((OF_getprop(node, "clock-frequency", &cell, sizeof(cell))) > 0) - default_freq = fdt32_to_cpu(cell)/1000000; - if (bootverbose) device_printf(dev, "SDHCI frequency: %dMHz\n", default_freq); From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 19:36:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 728FCDC7; Wed, 22 Apr 2015 19:36:06 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EBA51BCF; Wed, 22 Apr 2015 19:36:05 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id D24D410DD87; Wed, 22 Apr 2015 12:36:04 -0700 (PDT) Date: Wed, 22 Apr 2015 12:36:04 -0700 From: Hiren Panchasara To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281838 - head/sys/dev/e1000 Message-ID: <20150422193604.GF28632@strugglingcoder.info> References: <201504212024.t3LKOG3N073010@svn.freebsd.org> <20150421220550.GA28632@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DEueqSqTbz/jWVG1" Content-Disposition: inline In-Reply-To: <20150421220550.GA28632@strugglingcoder.info> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 19:36:06 -0000 --DEueqSqTbz/jWVG1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 04/21/15 at 03:05P, Hiren Panchasara wrote: > On 04/21/15 at 08:24P, Hiren Panchasara wrote: > > Author: hiren > > Date: Tue Apr 21 20:24:15 2015 > > New Revision: 281838 > > URL: https://svnweb.freebsd.org/changeset/base/281838 > >=20 > > Log: > > For igb(4), when we are doing multiqueue, we are all setup to have fu= ll 32bit > > RSS hash from the card. We do not need to hide that under "ifdef RSS"= and should > > expose that by default so others like lagg(4) can use that and avoid = hashing the > > traffic by themselves. > > While here, improve comments and get rid of hidden/unimplemented RSS = support > > code for UDP. > > =20 > > Differential Revision: https://reviews.freebsd.org/D2296 > > Reviewed by: jfv, erj > > Discussed with: adrian > > Sponsored by: Limelight Networks > >=20 > > Modified: > > head/sys/dev/e1000/if_igb.c >=20 > I intend to MFC this in a week or so. But for that, I'd have to first > MFC a part of https://svnweb.freebsd.org/base?view=3Drevision&revision=3D= 268028 > which sets rss hash types. Apparently another missing MFC is r275358. I'll work on them. Cheers, Hiren --DEueqSqTbz/jWVG1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVN/gkXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/l32MH/jrWPSjFWU4IsU4v/Zw17hNY DO4GfhIEa6SotLBo9sSvJRZFYa/eU31AnwO6KTEV0LE1bfQ4vnPM5gMgZjP23/lF Z7M7EfNmEIQriuSnMfESQzPHMVidMiZBPTmEHhMHf33kcxq+vcrAz+z32LMpgmPZ c6NoSTkaf8YEyYppOhQEHX58XooEyHnNNuFK+Jm/w+3KDxaccOXbKZ6vPFIW09m6 ZwfjJPGabmMBi8bvmMf9bY/g4HIU1x4Xe0G9hnMOksrdsGhh8WBwIeH17mfBAfhg 1yngHJw9qtBBtvHCUwzDm1xCO8LMh0IrWCqqmwZlMbKCA1trP6qABgrpQBLySyI= =PXBC -----END PGP SIGNATURE----- --DEueqSqTbz/jWVG1-- From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 21:38:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF1A0CC0; Wed, 22 Apr 2015 21:38:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADBC818B0; Wed, 22 Apr 2015 21:38:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MLcMD0053453; Wed, 22 Apr 2015 21:38:22 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MLcMou053452; Wed, 22 Apr 2015 21:38:22 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504222138.t3MLcMou053452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2015 21:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281870 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 21:38:22 -0000 Author: jhb Date: Wed Apr 22 21:38:21 2015 New Revision: 281870 URL: https://svnweb.freebsd.org/changeset/base/281870 Log: Cosmetic change: use PCIR_SECLAT_2 rather than PCIR_SECLAT_1. Modified: head/sys/dev/pccbb/pccbb_pci.c Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Wed Apr 22 20:48:56 2015 (r281869) +++ head/sys/dev/pccbb/pccbb_pci.c Wed Apr 22 21:38:21 2015 (r281870) @@ -467,8 +467,8 @@ cbb_chipinit(struct cbb_softc *sc) uint32_t mux, sysctrl, reg; /* Set CardBus latency timer */ - if (pci_read_config(sc->dev, PCIR_SECLAT_1, 1) < 0x20) - pci_write_config(sc->dev, PCIR_SECLAT_1, 0x20, 1); + if (pci_read_config(sc->dev, PCIR_SECLAT_2, 1) < 0x20) + pci_write_config(sc->dev, PCIR_SECLAT_2, 0x20, 1); /* Set PCI latency timer */ if (pci_read_config(sc->dev, PCIR_LATTIMER, 1) < 0x20) From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 21:42:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E926F44; Wed, 22 Apr 2015 21:42:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE76B1988; Wed, 22 Apr 2015 21:41:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MLfx8s058403; Wed, 22 Apr 2015 21:41:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MLfx0k058402; Wed, 22 Apr 2015 21:41:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504222141.t3MLfx0k058402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2015 21:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281871 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 21:42:00 -0000 Author: jhb Date: Wed Apr 22 21:41:59 2015 New Revision: 281871 URL: https://svnweb.freebsd.org/changeset/base/281871 Log: The minimim grant and maximum latency PCI config registers are only valid for type 0 devices, not type 1 or 2 bridges. Don't read them for bridge devices during bus scans and return an error when attempting to read them as ivars for bridge devices. Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Apr 22 21:38:21 2015 (r281870) +++ head/sys/dev/pci/pci.c Wed Apr 22 21:41:59 2015 (r281871) @@ -583,6 +583,8 @@ pci_hdrtypedata(device_t pcib, int b, in case PCIM_HDRTYPE_NORMAL: cfg->subvendor = REG(PCIR_SUBVEND_0, 2); cfg->subdevice = REG(PCIR_SUBDEV_0, 2); + cfg->mingnt = REG(PCIR_MINGNT, 1); + cfg->maxlat = REG(PCIR_MAXLAT, 1); cfg->nummaps = PCI_MAXMAPS_0; break; case PCIM_HDRTYPE_BRIDGE: @@ -641,9 +643,6 @@ pci_fill_devinfo(device_t pcib, int d, i cfg->intpin = REG(PCIR_INTPIN, 1); cfg->intline = REG(PCIR_INTLINE, 1); - cfg->mingnt = REG(PCIR_MINGNT, 1); - cfg->maxlat = REG(PCIR_MAXLAT, 1); - cfg->mfdev = (cfg->hdrtype & PCIM_MFDEV) != 0; cfg->hdrtype &= ~PCIM_MFDEV; STAILQ_INIT(&cfg->maps); @@ -4425,9 +4424,17 @@ pci_read_ivar(device_t dev, device_t chi *result = cfg->cachelnsz; break; case PCI_IVAR_MINGNT: + if (cfg->hdrtype != PCIM_HDRTYPE_NORMAL) { + *result = -1; + return (EINVAL); + } *result = cfg->mingnt; break; case PCI_IVAR_MAXLAT: + if (cfg->hdrtype != PCIM_HDRTYPE_NORMAL) { + *result = -1; + return (EINVAL); + } *result = cfg->maxlat; break; case PCI_IVAR_LATTIMER: From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 21:47:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08F631E0; Wed, 22 Apr 2015 21:47:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB77919D5; Wed, 22 Apr 2015 21:47:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MLlppO060508; Wed, 22 Apr 2015 21:47:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MLlpwd060507; Wed, 22 Apr 2015 21:47:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504222147.t3MLlpwd060507@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2015 21:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281872 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 21:47:52 -0000 Author: jhb Date: Wed Apr 22 21:47:51 2015 New Revision: 281872 URL: https://svnweb.freebsd.org/changeset/base/281872 Log: Fix some incorrect #if conditions around older workarounds for bus numbering goofs. MFC after: 1 week Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Wed Apr 22 21:41:59 2015 (r281871) +++ head/sys/dev/pci/pci_pci.c Wed Apr 22 21:47:51 2015 (r281872) @@ -950,7 +950,7 @@ pcib_attach_common(device_t dev) * Quirk handling. */ switch (pci_get_devid(dev)) { -#if !defined(NEW_PCIB) && !defined(PCI_RES_BUS) +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) case 0x12258086: /* Intel 82454KX/GX (Orion) */ { uint8_t supbus; @@ -976,7 +976,7 @@ pcib_attach_common(device_t dev) sc->flags |= PCIB_SUBTRACTIVE; break; -#if !defined(NEW_PCIB) && !defined(PCI_RES_BUS) +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) /* Compaq R3000 BIOS sets wrong subordinate bus number. */ case 0x00dd10de: { From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 21:56:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF531557; Wed, 22 Apr 2015 21:56:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD5961AC3; Wed, 22 Apr 2015 21:56:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MLuie0067665; Wed, 22 Apr 2015 21:56:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MLuiuq067664; Wed, 22 Apr 2015 21:56:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504222156.t3MLuiuq067664@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2015 21:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281873 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 21:56:45 -0000 Author: jhb Date: Wed Apr 22 21:56:44 2015 New Revision: 281873 URL: https://svnweb.freebsd.org/changeset/base/281873 Log: Don't explicitly manage power states for PCI-PCI bridge devices in the driver's suspend and resume routines. These have been redundant no-ops since r214065 changed the PCI bus driver to manage power states for all devices (including type 1/2 bridge devices) during suspend and resume. Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Wed Apr 22 21:47:51 2015 (r281872) +++ head/sys/dev/pci/pci_pci.c Wed Apr 22 21:56:44 2015 (r281873) @@ -1101,32 +1101,15 @@ pcib_attach(device_t dev) int pcib_suspend(device_t dev) { - device_t pcib; - int dstate, error; pcib_cfg_save(device_get_softc(dev)); - error = bus_generic_suspend(dev); - if (error == 0 && pci_do_power_suspend) { - dstate = PCI_POWERSTATE_D3; - pcib = device_get_parent(device_get_parent(dev)); - if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) - pci_set_powerstate(dev, dstate); - } - return (error); + return (bus_generic_suspend(dev)); } int pcib_resume(device_t dev) { - device_t pcib; - int dstate; - if (pci_do_power_resume) { - pcib = device_get_parent(device_get_parent(dev)); - dstate = PCI_POWERSTATE_D0; - if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) - pci_set_powerstate(dev, dstate); - } pcib_cfg_restore(device_get_softc(dev)); return (bus_generic_resume(dev)); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 22:02:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05621896; Wed, 22 Apr 2015 22:02: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5AF11BD9; Wed, 22 Apr 2015 22:02:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MM2Sws073413; Wed, 22 Apr 2015 22:02:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MM2R78073403; Wed, 22 Apr 2015 22:02:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504222202.t3MM2R78073403@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2015 22:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281874 - in head/sys/dev: pccbb pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 22:02:29 -0000 Author: jhb Date: Wed Apr 22 22:02:27 2015 New Revision: 281874 URL: https://svnweb.freebsd.org/changeset/base/281874 Log: Update the pci_cfg_save/restore routines to operate on bridge devices (type 1 and type 2) as well as leaf devices (type 0). In particular, this allows the existing PCI bus logic to save and restore capability registers such as MSI and PCI-express work for bridge devices rather than requiring that code to be duplicated in bridge drivers. It also means that bridge drivers no longer need to save and restore basic registers such as the PCI command register or BARs nor manage powerstates for the bridge device. While here, pci_setup_secbus() has been changed to initialize the 'sec' and 'sub' fields in the 'secbus' structure instead of requiring the pcib and pccbb drivers to do this in the NEW_PCIB + PCI_RES_BUS case. Differential Revision: https://reviews.freebsd.org/D2240 Reviewed by: imp, jmg MFC after: 2 weeks Modified: head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pci/pci.c head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_private.h head/sys/dev/pci/pcivar.h Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Wed Apr 22 21:56:44 2015 (r281873) +++ head/sys/dev/pccbb/pccbb_pci.c Wed Apr 22 22:02:27 2015 (r281874) @@ -259,32 +259,6 @@ cbb_pci_probe(device_t brdev) } /* - * Still need this because the pci code only does power for type 0 - * header devices. - */ -static void -cbb_powerstate_d0(device_t dev) -{ - u_int32_t membase, irq; - - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - /* Save important PCI config data. */ - membase = pci_read_config(dev, CBBR_SOCKBASE, 4); - irq = pci_read_config(dev, PCIR_INTLINE, 4); - - /* Reset the power state. */ - 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); - - /* Restore PCI config data. */ - pci_write_config(dev, CBBR_SOCKBASE, membase, 4); - pci_write_config(dev, PCIR_INTLINE, irq, 4); - } -} - -/* * Print out the config space */ static void @@ -321,15 +295,15 @@ cbb_pci_attach(device_t brdev) sc->cbdev = NULL; sc->exca[0].pccarddev = NULL; sc->domain = pci_get_domain(brdev); - sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); - sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); sc->pribus = pcib_get_bus(parent); #if defined(NEW_PCIB) && defined(PCI_RES_BUS) pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); pcib_setup_secbus(brdev, &sc->bus, 1); +#else + sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); + sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); #endif SLIST_INIT(&sc->rl); - cbb_powerstate_d0(brdev); rid = CBBR_SOCKBASE; sc->base_res = bus_alloc_resource_any(brdev, SYS_RES_MEMORY, &rid, @@ -474,11 +448,6 @@ cbb_chipinit(struct cbb_softc *sc) if (pci_read_config(sc->dev, PCIR_LATTIMER, 1) < 0x20) pci_write_config(sc->dev, PCIR_LATTIMER, 0x20, 1); - /* Restore bus configuration */ - pci_write_config(sc->dev, PCIR_PRIBUS_2, sc->pribus, 1); - pci_write_config(sc->dev, PCIR_SECBUS_2, sc->bus.sec, 1); - pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->bus.sub, 1); - /* Enable DMA, memory access for this card and I/O acces for children */ pci_enable_busmaster(sc->dev); pci_enable_io(sc->dev, SYS_RES_IOPORT); @@ -906,15 +875,10 @@ cbb_pci_resume(device_t brdev) * from D0 and back to D0 cause the bridge to lose its config space, so * all the bus mappings and such are preserved. * - * For most drivers, the PCI layer handles this saving. However, since - * there's much black magic and arcane art hidden in these few lines of - * code that would be difficult to transition into the PCI - * layer. chipinit was several years of trial and error to write. + * The PCI layer handles standard PCI registers like the + * command register and BARs, but cbb-specific registers are + * handled here. */ - pci_write_config(brdev, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); - DEVPRINTF((brdev, "PCI Memory allocated: %08lx\n", - rman_get_start(sc->base_res))); - sc->chipinit(sc); /* reset interrupt -- Do we really need to do this? */ Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Apr 22 21:56:44 2015 (r281873) +++ head/sys/dev/pci/pci.c Wed Apr 22 22:02:27 2015 (r281874) @@ -588,9 +588,19 @@ pci_hdrtypedata(device_t pcib, int b, in cfg->nummaps = PCI_MAXMAPS_0; break; case PCIM_HDRTYPE_BRIDGE: + cfg->bridge.br_seclat = REG(PCIR_SECLAT_1, 1); + cfg->bridge.br_subbus = REG(PCIR_SUBBUS_1, 1); + cfg->bridge.br_secbus = REG(PCIR_SECBUS_1, 1); + cfg->bridge.br_pribus = REG(PCIR_PRIBUS_1, 1); + cfg->bridge.br_control = REG(PCIR_BRIDGECTL_1, 2); cfg->nummaps = PCI_MAXMAPS_1; break; case PCIM_HDRTYPE_CARDBUS: + cfg->bridge.br_seclat = REG(PCIR_SECLAT_2, 1); + cfg->bridge.br_subbus = REG(PCIR_SUBBUS_2, 1); + cfg->bridge.br_secbus = REG(PCIR_SECBUS_2, 1); + cfg->bridge.br_pribus = REG(PCIR_PRIBUS_2, 1); + cfg->bridge.br_control = REG(PCIR_BRIDGECTL_2, 2); cfg->subvendor = REG(PCIR_SUBVEND_2, 2); cfg->subdevice = REG(PCIR_SUBDEV_2, 2); cfg->nummaps = PCI_MAXMAPS_2; @@ -5132,16 +5142,6 @@ pci_cfg_restore(device_t dev, struct pci { /* - * Only do header type 0 devices. Type 1 devices are bridges, - * which we know need special treatment. Type 2 devices are - * cardbus bridges which also require special treatment. - * Other types are unknown, and we err on the side of safety - * by ignoring them. - */ - if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) - return; - - /* * Restore the device to full power mode. We must do this * before we restore the registers because moving from D3 to * D0 will cause the chip's BARs and some other registers to @@ -5151,16 +5151,44 @@ pci_cfg_restore(device_t dev, struct pci */ if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) pci_set_powerstate(dev, PCI_POWERSTATE_D0); - pci_restore_bars(dev); pci_write_config(dev, PCIR_COMMAND, dinfo->cfg.cmdreg, 2); pci_write_config(dev, PCIR_INTLINE, dinfo->cfg.intline, 1); pci_write_config(dev, PCIR_INTPIN, dinfo->cfg.intpin, 1); - pci_write_config(dev, PCIR_MINGNT, dinfo->cfg.mingnt, 1); - pci_write_config(dev, PCIR_MAXLAT, dinfo->cfg.maxlat, 1); pci_write_config(dev, PCIR_CACHELNSZ, dinfo->cfg.cachelnsz, 1); pci_write_config(dev, PCIR_LATTIMER, dinfo->cfg.lattimer, 1); pci_write_config(dev, PCIR_PROGIF, dinfo->cfg.progif, 1); pci_write_config(dev, PCIR_REVID, dinfo->cfg.revid, 1); + switch (dinfo->cfg.hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_NORMAL: + pci_write_config(dev, PCIR_MINGNT, dinfo->cfg.mingnt, 1); + pci_write_config(dev, PCIR_MAXLAT, dinfo->cfg.maxlat, 1); + break; + case PCIM_HDRTYPE_BRIDGE: + pci_write_config(dev, PCIR_SECLAT_1, + dinfo->cfg.bridge.br_seclat, 1); + pci_write_config(dev, PCIR_SUBBUS_1, + dinfo->cfg.bridge.br_subbus, 1); + pci_write_config(dev, PCIR_SECBUS_1, + dinfo->cfg.bridge.br_secbus, 1); + pci_write_config(dev, PCIR_PRIBUS_1, + dinfo->cfg.bridge.br_pribus, 1); + pci_write_config(dev, PCIR_BRIDGECTL_1, + dinfo->cfg.bridge.br_control, 2); + break; + case PCIM_HDRTYPE_CARDBUS: + pci_write_config(dev, PCIR_SECLAT_2, + dinfo->cfg.bridge.br_seclat, 1); + pci_write_config(dev, PCIR_SUBBUS_2, + dinfo->cfg.bridge.br_subbus, 1); + pci_write_config(dev, PCIR_SECBUS_2, + dinfo->cfg.bridge.br_secbus, 1); + pci_write_config(dev, PCIR_PRIBUS_2, + dinfo->cfg.bridge.br_pribus, 1); + pci_write_config(dev, PCIR_BRIDGECTL_2, + dinfo->cfg.bridge.br_control, 2); + break; + } + pci_restore_bars(dev); /* * Restore extended capabilities for PCI-Express and PCI-X @@ -5229,40 +5257,57 @@ pci_cfg_save(device_t dev, struct pci_de int ps; /* - * Only do header type 0 devices. Type 1 devices are bridges, which - * we know need special treatment. Type 2 devices are cardbus bridges - * which also require special treatment. Other types are unknown, and - * we err on the side of safety by ignoring them. Powering down - * bridges should not be undertaken lightly. - */ - if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) - return; - - /* * Some drivers apparently write to these registers w/o updating our * cached copy. No harm happens if we update the copy, so do so here * so we can restore them. The COMMAND register is modified by the * bus w/o updating the cache. This should represent the normally - * writable portion of the 'defined' part of type 0 headers. In - * theory we also need to save/restore the PCI capability structures - * we know about, but apart from power we don't know any that are - * writable. + * writable portion of the 'defined' part of type 0/1/2 headers. */ - dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_0, 2); - dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_0, 2); dinfo->cfg.vendor = pci_read_config(dev, PCIR_VENDOR, 2); dinfo->cfg.device = pci_read_config(dev, PCIR_DEVICE, 2); dinfo->cfg.cmdreg = pci_read_config(dev, PCIR_COMMAND, 2); dinfo->cfg.intline = pci_read_config(dev, PCIR_INTLINE, 1); dinfo->cfg.intpin = pci_read_config(dev, PCIR_INTPIN, 1); - dinfo->cfg.mingnt = pci_read_config(dev, PCIR_MINGNT, 1); - dinfo->cfg.maxlat = pci_read_config(dev, PCIR_MAXLAT, 1); dinfo->cfg.cachelnsz = pci_read_config(dev, PCIR_CACHELNSZ, 1); dinfo->cfg.lattimer = pci_read_config(dev, PCIR_LATTIMER, 1); dinfo->cfg.baseclass = pci_read_config(dev, PCIR_CLASS, 1); dinfo->cfg.subclass = pci_read_config(dev, PCIR_SUBCLASS, 1); dinfo->cfg.progif = pci_read_config(dev, PCIR_PROGIF, 1); dinfo->cfg.revid = pci_read_config(dev, PCIR_REVID, 1); + switch (dinfo->cfg.hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_NORMAL: + dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_0, 2); + dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_0, 2); + dinfo->cfg.mingnt = pci_read_config(dev, PCIR_MINGNT, 1); + dinfo->cfg.maxlat = pci_read_config(dev, PCIR_MAXLAT, 1); + break; + case PCIM_HDRTYPE_BRIDGE: + dinfo->cfg.bridge.br_seclat = pci_read_config(dev, + PCIR_SECLAT_1, 1); + dinfo->cfg.bridge.br_subbus = pci_read_config(dev, + PCIR_SUBBUS_1, 1); + dinfo->cfg.bridge.br_secbus = pci_read_config(dev, + PCIR_SECBUS_1, 1); + dinfo->cfg.bridge.br_pribus = pci_read_config(dev, + PCIR_PRIBUS_1, 1); + dinfo->cfg.bridge.br_control = pci_read_config(dev, + PCIR_BRIDGECTL_1, 2); + break; + case PCIM_HDRTYPE_CARDBUS: + dinfo->cfg.bridge.br_seclat = pci_read_config(dev, + PCIR_SECLAT_2, 1); + dinfo->cfg.bridge.br_subbus = pci_read_config(dev, + PCIR_SUBBUS_2, 1); + dinfo->cfg.bridge.br_secbus = pci_read_config(dev, + PCIR_SECBUS_2, 1); + dinfo->cfg.bridge.br_pribus = pci_read_config(dev, + PCIR_PRIBUS_2, 1); + dinfo->cfg.bridge.br_control = pci_read_config(dev, + PCIR_BRIDGECTL_2, 2); + dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_2, 2); + dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_2, 2); + break; + } if (dinfo->cfg.pcie.pcie_location != 0) pci_cfg_save_pcie(dev, dinfo); Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Wed Apr 22 21:56:44 2015 (r281873) +++ head/sys/dev/pci/pci_pci.c Wed Apr 22 22:02:27 2015 (r281874) @@ -553,18 +553,22 @@ void pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, int min_count) { char buf[64]; - int error, rid; + int error, rid, sec_reg; switch (pci_read_config(dev, PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) { case PCIM_HDRTYPE_BRIDGE: + sec_reg = PCIR_SECBUS_1; bus->sub_reg = PCIR_SUBBUS_1; break; case PCIM_HDRTYPE_CARDBUS: + sec_reg = PCIR_SECBUS_2; bus->sub_reg = PCIR_SUBBUS_2; break; default: panic("not a PCI bridge"); } + bus->sec = pci_read_config(dev, sec_reg, 1); + bus->sub = pci_read_config(dev, bus->sub_reg, 1); bus->dev = dev; bus->rman.rm_start = 0; bus->rman.rm_end = PCI_BUSMAX; @@ -849,20 +853,16 @@ pcib_set_mem_decode(struct pcib_softc *s static void pcib_cfg_save(struct pcib_softc *sc) { +#ifndef NEW_PCIB device_t dev; + uint16_t command; dev = sc->dev; - sc->command = pci_read_config(dev, PCIR_COMMAND, 2); - sc->pribus = pci_read_config(dev, PCIR_PRIBUS_1, 1); - sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); - sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); - sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); - sc->seclat = pci_read_config(dev, PCIR_SECLAT_1, 1); -#ifndef NEW_PCIB - if (sc->command & PCIM_CMD_PORTEN) + command = pci_read_config(dev, PCIR_COMMAND, 2); + if (command & PCIM_CMD_PORTEN) pcib_get_io_decode(sc); - if (sc->command & PCIM_CMD_MEMEN) + if (command & PCIM_CMD_MEMEN) pcib_get_mem_decode(sc); #endif } @@ -874,21 +874,18 @@ static void pcib_cfg_restore(struct pcib_softc *sc) { device_t dev; - +#ifndef NEW_PCIB + uint16_t command; +#endif dev = sc->dev; - pci_write_config(dev, PCIR_COMMAND, sc->command, 2); - pci_write_config(dev, PCIR_PRIBUS_1, sc->pribus, 1); - pci_write_config(dev, PCIR_SECBUS_1, sc->bus.sec, 1); - pci_write_config(dev, PCIR_SUBBUS_1, sc->bus.sub, 1); - pci_write_config(dev, PCIR_BRIDGECTL_1, sc->bridgectl, 2); - pci_write_config(dev, PCIR_SECLAT_1, sc->seclat, 1); #ifdef NEW_PCIB pcib_write_windows(sc, WIN_IO | WIN_MEM | WIN_PMEM); #else - if (sc->command & PCIM_CMD_PORTEN) + command = pci_read_config(dev, PCIR_COMMAND, 2); + if (command & PCIM_CMD_PORTEN) pcib_set_io_decode(sc); - if (sc->command & PCIM_CMD_MEMEN) + if (command & PCIM_CMD_MEMEN) pcib_set_mem_decode(sc); #endif } @@ -922,7 +919,11 @@ pcib_attach_common(device_t dev) * Get current bridge configuration. */ sc->domain = pci_get_domain(dev); - sc->secstat = pci_read_config(dev, PCIR_SECSTAT_1, 2); +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) + sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); + sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); +#endif + sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); pcib_cfg_save(sc); /* Modified: head/sys/dev/pci/pcib_private.h ============================================================================== --- head/sys/dev/pci/pcib_private.h Wed Apr 22 21:56:44 2015 (r281873) +++ head/sys/dev/pci/pcib_private.h Wed Apr 22 22:02:27 2015 (r281874) @@ -106,7 +106,6 @@ struct pcib_softc #define PCIB_DISABLE_MSI 0x2 #define PCIB_DISABLE_MSIX 0x4 #define PCIB_ENABLE_ARI 0x8 - uint16_t command; /* command register */ u_int domain; /* domain number */ u_int pribus; /* primary bus number */ struct pcib_secbus bus; /* secondary bus numbers */ @@ -122,9 +121,7 @@ struct pcib_softc uint32_t iobase; /* base address of port window */ uint32_t iolimit; /* topmost address of port window */ #endif - uint16_t secstat; /* secondary bus status register */ uint16_t bridgectl; /* bridge control register */ - uint8_t seclat; /* secondary bus latency timer */ }; #define PCIB_SUPPORTED_ARI_VER 1 Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Wed Apr 22 21:56:44 2015 (r281873) +++ head/sys/dev/pci/pcivar.h Wed Apr 22 22:02:27 2015 (r281874) @@ -41,6 +41,15 @@ typedef uint64_t pci_addr_t; struct nvlist; +/* Config registers for PCI-PCI and PCI-Cardbus bridges. */ +struct pcicfg_bridge { + uint8_t br_seclat; + uint8_t br_subbus; + uint8_t br_secbus; + uint8_t br_pribus; + uint16_t br_control; +}; + /* Interesting values for PCI power management */ struct pcicfg_pp { uint16_t pp_cap; /* PCI power management capabilities */ @@ -190,6 +199,7 @@ typedef struct pcicfg { uint32_t flags; /* flags defined above */ size_t devinfo_size; /* Size of devinfo for this bus type. */ + struct pcicfg_bridge bridge; /* Bridges */ struct pcicfg_pp pp; /* Power management */ struct pcicfg_vpd vpd; /* Vital product data */ struct pcicfg_msi msi; /* PCI MSI */ From owner-svn-src-head@FreeBSD.ORG Wed Apr 22 22:23:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45A00E2D; Wed, 22 Apr 2015 22:23:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33D5F1DFB; Wed, 22 Apr 2015 22:23:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MMNv7n091912; Wed, 22 Apr 2015 22:23:57 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MMNv5l091910; Wed, 22 Apr 2015 22:23:57 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504222223.t3MMNv5l091910@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 22:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281875 - head/lib/libgeom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 22:23:57 -0000 Author: pfg Date: Wed Apr 22 22:23:56 2015 New Revision: 281875 URL: https://svnweb.freebsd.org/changeset/base/281875 Log: libgeom: plug memory leak in EndElement. CID: 1016696 Found by: Clang static checker MFC after: 1 week Modified: head/lib/libgeom/geom_xml2tree.c Modified: head/lib/libgeom/geom_xml2tree.c ============================================================================== --- head/lib/libgeom/geom_xml2tree.c Wed Apr 22 22:02:27 2015 (r281874) +++ head/lib/libgeom/geom_xml2tree.c Wed Apr 22 22:23:56 2015 (r281875) @@ -257,6 +257,7 @@ EndElement(void *userData, const char *n if (!strcmp(name, "config")) { mt->config = NULL; + free(p); return; } From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 01:04:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEC66D06; Thu, 23 Apr 2015 01:04:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF531F51; Thu, 23 Apr 2015 01:04:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N14FmK011241; Thu, 23 Apr 2015 01:04:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N14FfQ011235; Thu, 23 Apr 2015 01:04:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504230104.t3N14FfQ011235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 23 Apr 2015 01:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281876 - in head/release: scripts tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 01:04:15 -0000 Author: gjb Date: Thu Apr 23 01:04:14 2015 New Revision: 281876 URL: https://svnweb.freebsd.org/changeset/base/281876 Log: Create the arm64/aarch64 VM disk image as MBR instead of GPT scheme. UEFI needs to know the unique partition GUID with GPT, which changes each time. Specifically, the QEMU EFI BIOS file has this hard-coded.[1] Since the GPT labels are now unavailable, unconditionally label the root filesystem as 'rootfs' with newfs(8), since it does not hurt anything anywhere else. For the arm64 case, '/' is mounted from /dev/ufs/rootfs; for all other VM images, '/' is mounted from /dev/gpt/rootfs. Unfortunately, since the /dev/gpt/swapfs label is also lost, set NOSWAP=1 for the arm64/aarch64 images. This is temporary, until I figure out a scalable solution to this. But, a certain piece of softare was written "very fast", and ended up living for 15 years. We can deal with this for a week or so. Information from: andrew, emaste [1] Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/mk-vmimage.sh head/release/tools/vmimage.subr Modified: head/release/scripts/mk-vmimage.sh ============================================================================== --- head/release/scripts/mk-vmimage.sh Wed Apr 22 22:23:56 2015 (r281875) +++ head/release/scripts/mk-vmimage.sh Thu Apr 23 01:04:14 2015 (r281876) @@ -93,6 +93,16 @@ main() { . "${VMCONFIG}" fi + case ${TARGET}:${TARGET_ARCH} in + arm64:aarch64) + ROOTLABEL="ufs" + NOSWAP=1 + ;; + *) + ROOTLABEL="gpt" + ;; + esac + vm_create_base vm_install_base vm_extra_install_base Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Wed Apr 22 22:23:56 2015 (r281875) +++ head/release/tools/vmimage.subr Thu Apr 23 01:04:14 2015 (r281876) @@ -30,10 +30,9 @@ write_partition_layout() { -o ${VMIMAGE} ;; arm64:aarch64) - mkimg -s gpt \ - -p efi/efiboot:=${BOOTFILES}/efi/boot1/boot1.efifat \ - ${SWAPOPT} \ - -p freebsd-ufs/rootfs:=${VMBASE} \ + mkimg -s mbr \ + -p efi:=${BOOTFILES}/efi/boot1/boot1.efifat \ + -p freebsd:=${VMBASE} \ -o ${VMIMAGE} ;; powerpc:powerpc*) @@ -77,7 +76,7 @@ vm_create_base() { mkdir -p ${DESTDIR} truncate -s ${VMSIZE} ${VMBASE} mddev=$(mdconfig -f ${VMBASE}) - newfs /dev/${mddev} + newfs -L rootfs /dev/${mddev} mount /dev/${mddev} ${DESTDIR} return 0 @@ -97,7 +96,7 @@ vm_copy_base() { truncate -s ${VMSIZE} ${VMBASE}.tmp mkdir -p ${DESTDIR}/new mdnew=$(mdconfig -f ${VMBASE}.tmp) - newfs /dev/${mdnew} + newfs -L rootfs /dev/${mdnew} mount /dev/${mdnew} ${DESTDIR}/new tar -cf- -C ${DESTDIR}/old . | tar -xUf- -C ${DESTDIR}/new @@ -123,7 +122,7 @@ vm_install_base() { echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab - echo '/dev/gpt/rootfs / ufs rw 1 1' \ + echo "/dev/${ROOTLABEL}/rootfs / ufs rw 1 1" \ >> ${DESTDIR}/etc/fstab if [ -z "${NOSWAP}" ]; then echo '/dev/gpt/swapfs none swap sw 0 0' \ From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 01:39:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C3F43C6; Thu, 23 Apr 2015 01:39: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEA68124C; Thu, 23 Apr 2015 01:39:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N1dSdI057852; Thu, 23 Apr 2015 01:39:28 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N1dS9d057851; Thu, 23 Apr 2015 01:39:28 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201504230139.t3N1dS9d057851@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 23 Apr 2015 01:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281877 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 01:39:29 -0000 Author: yongari Date: Thu Apr 23 01:39:28 2015 New Revision: 281877 URL: https://svnweb.freebsd.org/changeset/base/281877 Log: Add another variant of BCM5708S controller to IBM HS21 workaround list. PR: 118238 MFC after: 2 weeks Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Thu Apr 23 01:04:14 2015 (r281876) +++ head/sys/dev/mii/brgphy.c Thu Apr 23 01:39:28 2015 (r281877) @@ -160,25 +160,33 @@ static const struct mii_phy_funcs brgphy brgphy_reset }; -#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21" -#define HS21_BCM_CHIPID 0x57081021 +static const struct hs21_type { + const uint32_t id; + const char *prod; +} hs21_type_lists[] = { + { 0x57081021, "IBM eServer BladeCenter HS21" }, + { 0x57081011, "IBM eServer BladeCenter HS21 -[8853PAU]-" }, +}; static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; - int found; + int found, i; found = 0; - if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { - sysenv = kern_getenv("smbios.system.product"); - if (sysenv != NULL) { - if (strncmp(sysenv, HS21_PRODUCT_ID, - strlen(HS21_PRODUCT_ID)) == 0) - found = 1; - freeenv(sysenv); + sysenv = kern_getenv("smbios.system.product"); + if (sysenv == NULL) + return (found); + for (i = 0; i < nitems(hs21_type_lists); i++) { + if (bce_sc->bce_chipid == hs21_type_lists[i].id && + strncmp(sysenv, hs21_type_lists[i].prod, + strlen(hs21_type_lists[i].prod)) == 0) { + found++; + break; } } + freeenv(sysenv); return (found); } From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 02:50:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46FA6B09; Thu, 23 Apr 2015 02:50:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 360FE18EB; Thu, 23 Apr 2015 02:50:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N2o7YW058432; Thu, 23 Apr 2015 02:50:07 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N2o7bE058430; Thu, 23 Apr 2015 02:50:07 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201504230250.t3N2o7bE058430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 23 Apr 2015 02:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281879 - head/sys/amd64/vmm/amd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 02:50:07 -0000 Author: araujo (ports committer) Date: Thu Apr 23 02:50:06 2015 New Revision: 281879 URL: https://svnweb.freebsd.org/changeset/base/281879 Log: Missing break in switch case. Differential Revision: D2342 Reviewed by: neel Modified: head/sys/amd64/vmm/amd/svm.c Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Thu Apr 23 01:52:07 2015 (r281878) +++ head/sys/amd64/vmm/amd/svm.c Thu Apr 23 02:50:06 2015 (r281879) @@ -802,6 +802,7 @@ svm_handle_inst_emul(struct vmcb *vmcb, case CPU_MODE_REAL: vmexit->u.inst_emul.cs_base = seg.base; vmexit->u.inst_emul.cs_d = 0; + break; case CPU_MODE_PROTECTED: case CPU_MODE_COMPATIBILITY: vmexit->u.inst_emul.cs_base = seg.base; From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 07:41:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3172D51F; Thu, 23 Apr 2015 07:41:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F4FC1716; Thu, 23 Apr 2015 07:41:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N7fwYX042285; Thu, 23 Apr 2015 07:41:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N7fwqa042283; Thu, 23 Apr 2015 07:41:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201504230741.t3N7fwqa042283@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 23 Apr 2015 07:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281881 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 07:41:59 -0000 Author: hselasky Date: Thu Apr 23 07:41:58 2015 New Revision: 281881 URL: https://svnweb.freebsd.org/changeset/base/281881 Log: Disable multi process interrupts, because the current code doesn't use them. Else we can end up in an infinite interrupt loop in USB device mode. MFC after: 3 days Modified: head/sys/dev/usb/controller/dwc_otg.c Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Thu Apr 23 07:32:28 2015 (r281880) +++ head/sys/dev/usb/controller/dwc_otg.c Thu Apr 23 07:41:58 2015 (r281881) @@ -3876,20 +3876,18 @@ dwc_otg_init(struct dwc_otg_softc *sc) if (temp & GHWCFG2_MPI) { uint8_t x; - DPRINTF("Multi Process Interrupts\n"); + DPRINTF("Disable Multi Process Interrupts\n"); for (x = 0; x != sc->sc_dev_in_ep_max; x++) { - DWC_OTG_WRITE_4(sc, DOTG_DIEPEACHINTMSK(x), - DIEPMSK_XFERCOMPLMSK); + DWC_OTG_WRITE_4(sc, DOTG_DIEPEACHINTMSK(x), 0); DWC_OTG_WRITE_4(sc, DOTG_DOEPEACHINTMSK(x), 0); } - DWC_OTG_WRITE_4(sc, DOTG_DEACHINTMSK, 0xFFFF); - } else { - DWC_OTG_WRITE_4(sc, DOTG_DIEPMSK, - DIEPMSK_XFERCOMPLMSK); - DWC_OTG_WRITE_4(sc, DOTG_DOEPMSK, 0); - DWC_OTG_WRITE_4(sc, DOTG_DAINTMSK, 0xFFFF); + DWC_OTG_WRITE_4(sc, DOTG_DEACHINTMSK, 0); } + DWC_OTG_WRITE_4(sc, DOTG_DIEPMSK, + DIEPMSK_XFERCOMPLMSK); + DWC_OTG_WRITE_4(sc, DOTG_DOEPMSK, 0); + DWC_OTG_WRITE_4(sc, DOTG_DAINTMSK, 0xFFFF); } if (sc->sc_mode == DWC_MODE_OTG || sc->sc_mode == DWC_MODE_HOST) { From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 08:41:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA46CFAC; Thu, 23 Apr 2015 08:41:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B28E1DC7; Thu, 23 Apr 2015 08:41:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3N8fplA007583; Thu, 23 Apr 2015 08:41:51 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3N8fpYo007582; Thu, 23 Apr 2015 08:41:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504230841.t3N8fpYo007582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 23 Apr 2015 08:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281882 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 08:41:51 -0000 Author: trasz Date: Thu Apr 23 08:41:50 2015 New Revision: 281882 URL: https://svnweb.freebsd.org/changeset/base/281882 Log: Simplify linux_getcwd(), removing code that was longer used. Differential Revision: https://reviews.freebsd.org/D2326 Reviewed by: dchagin@, kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_getcwd.c Modified: head/sys/compat/linux/linux_getcwd.c ============================================================================== --- head/sys/compat/linux/linux_getcwd.c Thu Apr 23 07:41:58 2015 (r281881) +++ head/sys/compat/linux/linux_getcwd.c Thu Apr 23 08:41:50 2015 (r281882) @@ -2,11 +2,15 @@ /* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. + * Copyright (c) 2015 The FreeBSD Foundation * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Bill Sommerfeld. * + * Portions of this software were developed by Edward Tomasz Napierala + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -36,19 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include -#include #include -#include -#include #include -#include #include -#include -#include /* XXX only for DIRBLKSIZ */ #ifdef COMPAT_LINUX32 #include @@ -60,408 +54,37 @@ __FBSDID("$FreeBSD$"); #include #include -#include - -static int -linux_getcwd_scandir(struct vnode **, struct vnode **, - char **, char *, struct thread *); -static int -linux_getcwd_common(struct vnode *, struct vnode *, - char **, char *, int, int, struct thread *); - -#define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) - -/* - * Vnode variable naming conventions in this file: - * - * rvp: the current root we're aiming towards. - * lvp, *lvpp: the "lower" vnode - * uvp, *uvpp: the "upper" vnode. - * - * Since all the vnodes we're dealing with are directories, and the - * lookups are going *up* in the filesystem rather than *down*, the - * usual "pvp" (parent) or "dvp" (directory) naming conventions are - * too confusing. - */ - -/* - * XXX Will infinite loop in certain cases if a directory read reliably - * returns EINVAL on last block. - * XXX is EINVAL the right thing to return if a directory is malformed? - */ - -/* - * XXX Untested vs. mount -o union; probably does the wrong thing. - */ - -/* - * Find parent vnode of *lvpp, return in *uvpp - * - * If we care about the name, scan it looking for name of directory - * entry pointing at lvp. - * - * Place the name in the buffer which starts at bufp, immediately - * before *bpp, and move bpp backwards to point at the start of it. - * - * On entry, *lvpp is a locked vnode reference; on exit, it is vput and NULL'ed - * On exit, *uvpp is either NULL or is a locked vnode reference. - */ -static int -linux_getcwd_scandir(lvpp, uvpp, bpp, bufp, td) - struct vnode **lvpp; - struct vnode **uvpp; - char **bpp; - char *bufp; - struct thread *td; -{ - int error = 0; - int eofflag; - off_t off; - int tries; - struct uio uio; - struct iovec iov; - char *dirbuf = NULL; - int dirbuflen; - ino_t fileno; - struct vattr va; - struct vnode *uvp = NULL; - struct vnode *lvp = *lvpp; - struct componentname cn; - int len, reclen; - tries = 0; - - /* - * If we want the filename, get some info we need while the - * current directory is still locked. - */ - if (bufp != NULL) { - error = VOP_GETATTR(lvp, &va, td->td_ucred); - if (error) { - vput(lvp); - *lvpp = NULL; - *uvpp = NULL; - return error; - } - } - - /* - * Ok, we have to do it the hard way.. - * Next, get parent vnode using lookup of .. - */ - cn.cn_nameiop = LOOKUP; - cn.cn_flags = ISLASTCN | ISDOTDOT | RDONLY; - cn.cn_thread = td; - cn.cn_cred = td->td_ucred; - cn.cn_pnbuf = NULL; - cn.cn_nameptr = ".."; - cn.cn_namelen = 2; - cn.cn_consume = 0; - cn.cn_lkflags = LK_SHARED; - - /* - * At this point, lvp is locked and will be unlocked by the lookup. - * On successful return, *uvpp will be locked - */ -#ifdef MAC - error = mac_vnode_check_lookup(td->td_ucred, lvp, &cn); - if (error == 0) -#endif - error = VOP_LOOKUP(lvp, uvpp, &cn); - if (error) { - vput(lvp); - *lvpp = NULL; - *uvpp = NULL; - return error; - } - uvp = *uvpp; - - /* If we don't care about the pathname, we're done */ - if (bufp == NULL) { - vput(lvp); - *lvpp = NULL; - return 0; - } - - fileno = va.va_fileid; - - dirbuflen = DIRBLKSIZ; - if (dirbuflen < va.va_blocksize) - dirbuflen = va.va_blocksize; - dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); - -#if 0 -unionread: -#endif - off = 0; - do { - /* call VOP_READDIR of parent */ - iov.iov_base = dirbuf; - iov.iov_len = dirbuflen; - - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - uio.uio_offset = off; - uio.uio_resid = dirbuflen; - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_rw = UIO_READ; - uio.uio_td = td; - - eofflag = 0; - -#ifdef MAC - error = mac_vnode_check_readdir(td->td_ucred, uvp); - if (error == 0) -#endif /* MAC */ - error = VOP_READDIR(uvp, &uio, td->td_ucred, &eofflag, - 0, 0); - - off = uio.uio_offset; - - /* - * Try again if NFS tosses its cookies. - * XXX this can still loop forever if the directory is busted - * such that the second or subsequent page of it always - * returns EINVAL - */ - if ((error == EINVAL) && (tries < 3)) { - off = 0; - tries++; - continue; /* once more, with feeling */ - } - - if (!error) { - char *cpos; - struct dirent *dp; - - cpos = dirbuf; - tries = 0; - - /* scan directory page looking for matching vnode */ - for (len = (dirbuflen - uio.uio_resid); len > 0; len -= reclen) { - dp = (struct dirent *) cpos; - reclen = dp->d_reclen; - - /* check for malformed directory.. */ - if (reclen < DIRENT_MINSIZE) { - error = EINVAL; - goto out; - } - /* - * XXX should perhaps do VOP_LOOKUP to - * check that we got back to the right place, - * but getting the locking games for that - * right would be heinous. - */ - if ((dp->d_type != DT_WHT) && - (dp->d_fileno == fileno)) { - char *bp = *bpp; - bp -= dp->d_namlen; - - if (bp <= bufp) { - error = ERANGE; - goto out; - } - bcopy(dp->d_name, bp, dp->d_namlen); - error = 0; - *bpp = bp; - goto out; - } - cpos += reclen; - } - } - } while (!eofflag); - error = ENOENT; - -out: - vput(lvp); - *lvpp = NULL; - free(dirbuf, M_TEMP); - return error; -} - - -/* - * common routine shared by sys___getcwd() and linux_vn_isunder() - */ - -#define GETCWD_CHECK_ACCESS 0x0001 - -static int -linux_getcwd_common (lvp, rvp, bpp, bufp, limit, flags, td) - struct vnode *lvp; - struct vnode *rvp; - char **bpp; - char *bufp; - int limit; - int flags; - struct thread *td; -{ - struct filedesc *fdp = td->td_proc->p_fd; - struct vnode *uvp = NULL; - char *bp = NULL; - int error; - accmode_t accmode = VEXEC; - - if (rvp == NULL) { - rvp = fdp->fd_rdir; - if (rvp == NULL) - rvp = rootvnode; - } - - VREF(rvp); - VREF(lvp); - - /* - * Error handling invariant: - * Before a `goto out': - * lvp is either NULL, or locked and held. - * uvp is either NULL, or locked and held. - */ - - error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY); - if (error != 0) - panic("vn_lock LK_RETRY returned error %d", error); - if (bufp) - bp = *bpp; - /* - * this loop will terminate when one of the following happens: - * - we hit the root - * - getdirentries or lookup fails - * - we run out of space in the buffer. - */ - if (lvp == rvp) { - if (bp) - *(--bp) = '/'; - goto out; - } - do { - if (lvp->v_type != VDIR) { - error = ENOTDIR; - goto out; - } - - /* - * access check here is optional, depending on - * whether or not caller cares. - */ - if (flags & GETCWD_CHECK_ACCESS) { - error = VOP_ACCESS(lvp, accmode, td->td_ucred, td); - if (error) - goto out; - accmode = VEXEC|VREAD; - } - - /* - * step up if we're a covered vnode.. - */ - while (lvp->v_vflag & VV_ROOT) { - struct vnode *tvp; - - if (lvp == rvp) - goto out; - - tvp = lvp; - lvp = lvp->v_mount->mnt_vnodecovered; - vput(tvp); - /* - * hodie natus est radici frater - */ - if (lvp == NULL) { - error = ENOENT; - goto out; - } - VREF(lvp); - error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY); - if (error != 0) - panic("vn_lock LK_RETRY returned %d", error); - } - error = linux_getcwd_scandir(&lvp, &uvp, &bp, bufp, td); - if (error) - goto out; -#ifdef DIAGNOSTIC - if (lvp != NULL) - panic("getcwd: oops, forgot to null lvp"); - if (bufp && (bp <= bufp)) { - panic("getcwd: oops, went back too far"); - } -#endif - if (bp) - *(--bp) = '/'; - lvp = uvp; - uvp = NULL; - limit--; - } while ((lvp != rvp) && (limit > 0)); - -out: - if (bpp) - *bpp = bp; - if (uvp) - vput(uvp); - if (lvp) - vput(lvp); - vrele(rvp); - return error; -} - - /* * Find pathname of process's current directory. - * - * Use vfs vnode-to-name reverse cache; if that fails, fall back - * to reading directory contents. */ - int linux_getcwd(struct thread *td, struct linux_getcwd_args *args) { - char *bp, *bend, *path; - int error, len, lenused; + char *path; + int error, lenused; #ifdef DEBUG if (ldebug(getcwd)) printf(ARGS(getcwd, "%p, %ld"), args->buf, (long)args->bufsize); #endif - len = args->bufsize; - - if (len > LINUX_PATH_MAX) - len = LINUX_PATH_MAX; - else if (len < 2) - return ERANGE; + /* + * Linux returns ERANGE instead of EINVAL. + */ + if (args->bufsize < 2) + return (ERANGE); - path = malloc(len, M_TEMP, M_WAITOK); + path = malloc(LINUX_PATH_MAX, M_TEMP, M_WAITOK); - error = kern___getcwd(td, path, UIO_SYSSPACE, len, LINUX_PATH_MAX); - if (!error) { + error = kern___getcwd(td, path, UIO_SYSSPACE, args->bufsize, + LINUX_PATH_MAX); + if (error == 0) { lenused = strlen(path) + 1; - if (lenused <= args->bufsize) { + error = copyout(path, args->buf, lenused); + if (error == 0) td->td_retval[0] = lenused; - error = copyout(path, args->buf, lenused); - } - else - error = ERANGE; - } else { - bp = &path[len]; - bend = bp; - *(--bp) = '\0'; - - /* - * 5th argument here is "max number of vnodes to traverse". - * Since each entry takes up at least 2 bytes in the output buffer, - * limit it to N/2 vnodes for an N byte buffer. - */ - - error = linux_getcwd_common (td->td_proc->p_fd->fd_cdir, NULL, - &bp, path, len/2, GETCWD_CHECK_ACCESS, td); - if (error) - goto out; - lenused = bend - bp; - td->td_retval[0] = lenused; - /* put the result into user buffer */ - error = copyout(bp, args->buf, lenused); } -out: + free(path, M_TEMP); return (error); } - From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 11:27:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D00C6EAB; Thu, 23 Apr 2015 11:27:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEACF1ED6; Thu, 23 Apr 2015 11:27:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NBRL75079503; Thu, 23 Apr 2015 11:27:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NBRLQu079502; Thu, 23 Apr 2015 11:27:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504231127.t3NBRLQu079502@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Apr 2015 11:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281883 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 11:27:21 -0000 Author: kib Date: Thu Apr 23 11:27:21 2015 New Revision: 281883 URL: https://svnweb.freebsd.org/changeset/base/281883 Log: Handle incorrect ELF images specifying size for PT_GNU_STACK not being multiple of page size. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Thu Apr 23 08:41:50 2015 (r281882) +++ head/sys/kern/kern_exec.c Thu Apr 23 11:27:21 2015 (r281883) @@ -1060,7 +1060,7 @@ exec_new_vmspace(imgp, sv) /* Allocate a new stack */ if (imgp->stack_sz != 0) { - ssiz = imgp->stack_sz; + ssiz = trunc_page(imgp->stack_sz); PROC_LOCK(p); lim_rlimit(p, RLIMIT_STACK, &rlim_stack); PROC_UNLOCK(p); From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 12:25:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62AC8C02 for ; Thu, 23 Apr 2015 12:25:36 +0000 (UTC) Received: from nm17-vm4.bullet.mail.gq1.yahoo.com (nm17-vm4.bullet.mail.gq1.yahoo.com [98.137.177.228]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30D6A15D0 for ; Thu, 23 Apr 2015 12:25:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429791551; bh=P/ucPUHh0dgHJKfDY3+oSMBpvM8D2PuwoYJ5/R2DSW4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=fphf/3hunUwhcrgE/gTxDPVRWCZZfJSfm8/rNUwp/8A0P7P6bPptK/gSluHu0hgUHQ9jk5VGAM0iL6SaF42HvqKqcCiHRODSzDCBh/m2oUrwz5PLOkzI87t+TphZdKtVlbYiLRdpm5iHrnQqDPsPQAkobTfQ66sOMan3tLDD4juCUbJYUpnolR1POLuVOj10WCpgOo7uyUnO0F2Rrnhulfvuw6tNx4QPixjcXT4YkxjPWpDQdBunofZ+ovR5mtO5aOV2Vo1Tfl6hS740IXUVN5zRlXufzjFEme8UJzmSd1YYHjCZIuObAJA/EsIGr0TJFNlwetxs3HxolqzxRMKkmA== Received: from [98.137.12.190] by nm17.bullet.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 12:19:11 -0000 Received: from [208.71.42.197] by tm11.bullet.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 12:19:11 -0000 Received: from [127.0.0.1] by smtp208.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 12:19:11 -0000 X-Yahoo-Newman-Id: 536258.72180.bm@smtp208.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: mzDE.yAVM1mb.QlFcdQgncUZTt3Mq3j0rmrnjp8fDV9GR1X wrfFohfa6ySPlrsmnYtM3bMiknS41KqXAVlRKyasIvE3M5j3GXbunltg6pTb owa_1gTAb9aTNtDuod0Wzcp8kSegluHVSsx1zzjzTGOY_u5NTBktDuFCCmqD IwqIycAh7mo0QC6n2w5VdTW29t.pQyGQuTlJazXDXmsPJYUAy0m4J88C.PyH 32bEgSd0yH_uNUyDqQZ0jlm6F1D5vFcZkVGmrx7Z289sgkRrKwIC98oOybz6 zRNC4wUeUf7vFJvlN8AaViEpCgN5TQcBvGLCZzIs8rvRzFr8FqoypzWXQMPD j63Y9Vifviai2DUKyuzg8J5UoE1qItKasYL6wvKvIaod2p7hH5Gv23kJ4sB1 OdppQDVrZnfhqNJxOrzhXorP.5IQXCxBaW.8798gnUk_joslJ4u398ZByqGE B_o.dVnNrwJ.2UItgH9hn.IGofhLZuxUZHKXQykj5yEuFoGeOAkbRQ4DPSOI q9m7kNyKKxZ6ghmqbhQcsnsr1XRDQRjqYpIkIAPS0 X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: <201504120621.t3C6LxAV095209@svn.freebsd.org> Date: Thu, 23 Apr 2015 06:19:10 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> References: <201504120621.t3C6LxAV095209@svn.freebsd.org> To: Dmitry Chagin X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 12:25:36 -0000 > On Apr 12, 2015, at 12:21 AM, Dmitry Chagin = wrote: >=20 > Author: dchagin > Date: Sun Apr 12 06:21:58 2015 > New Revision: 281451 > URL: https://svnweb.freebsd.org/changeset/base/281451 >=20 > Log: > Rework r281162. Indeed, the flexible array member is preferable here. >=20 > Suggested by: Justin T. Gibbs >=20 > MFC after: 3 days >=20 > Modified: > head/sys/vm/uma_core.c > head/sys/vm/uma_int.h There=E2=80=99s still something wrong with this. I have a machine with = 28 cores (56 with hyperthreading) and 256GB of RAM, and ever since you = committed r281162, it panics early in boot with a failed assertion. It = looks like the first few members of a uma_slab_t are getting overwritten = accidentally, and somehow the padding of the extra member in the = uma_zone_t was previously protecting it. I don=E2=80=99t know the exact = cause yet, but I must ask that you revert to r281161 in HEAD and = stable/10 until the problem is resolved. Thanks, Scott From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 13:10:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3806B6AC; Thu, 23 Apr 2015 13:10:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 268BC1ADA; Thu, 23 Apr 2015 13:10:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NDA4mN055207; Thu, 23 Apr 2015 13:10:04 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NDA4JE055206; Thu, 23 Apr 2015 13:10:04 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201504231310.t3NDA4JE055206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 23 Apr 2015 13:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281884 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 13:10:04 -0000 Author: tuexen Date: Thu Apr 23 13:10:03 2015 New Revision: 281884 URL: https://svnweb.freebsd.org/changeset/base/281884 Log: A complete user message is signalled with the MSG_EOR flag, not the MSG_EOF flag. Thanks to Valentin Nechayev for reporting the issue. MFC after: 1 week Modified: head/lib/libc/net/sctp_recvmsg.3 Modified: head/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- head/lib/libc/net/sctp_recvmsg.3 Thu Apr 23 11:27:21 2015 (r281883) +++ head/lib/libc/net/sctp_recvmsg.3 Thu Apr 23 13:10:03 2015 (r281884) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 13, 2007 +.Dd April 23, 2015 .Dt SCTP_RECVMSG 3 .Os .Sh NAME @@ -98,13 +98,13 @@ receive buffer, then the argument will .Em not have the -.Dv MSG_EOF +.Dv MSG_EOR flag applied. If the message is a complete message then the .Fa flags argument will have -.Dv MSG_EOF +.Dv MSG_EOR set. Locally detected errors are indicated by a return value of -1 with From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 13:19:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37F8B9B0; Thu, 23 Apr 2015 13:19:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 268C01B79; Thu, 23 Apr 2015 13:19:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NDJ1FC060061; Thu, 23 Apr 2015 13:19:01 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NDJ1tW060060; Thu, 23 Apr 2015 13:19:01 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504231319.t3NDJ1tW060060@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 23 Apr 2015 13:19:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281885 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 13:19:01 -0000 Author: glebius Date: Thu Apr 23 13:19:00 2015 New Revision: 281885 URL: https://svnweb.freebsd.org/changeset/base/281885 Log: Don't propagate SIOCSIFCAPS from a vlan(4) to its parent. This leads to quite unexpected result of toggling capabilities on the neighbour vlan(4) interfaces. Reviewed by: melifaro, np Differential Revision: https://reviews.freebsd.org/D2310 Sponsored by: Nginx, Inc. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Thu Apr 23 13:10:03 2015 (r281884) +++ head/sys/net/if_vlan.c Thu Apr 23 13:19:00 2015 (r281885) @@ -1705,27 +1705,6 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd } break; - case SIOCSIFCAP: - VLAN_LOCK(); - if (TRUNK(ifv) != NULL) { - p = PARENT(ifv); - VLAN_UNLOCK(); - if ((p->if_type != IFT_ETHER) && - (ifr->ifr_reqcap & IFCAP_VLAN_HWTAGGING) == 0) { - error = EINVAL; - break; - } - error = (*p->if_ioctl)(p, cmd, data); - if (error) - break; - /* Propogate vlan interface capabilities */ - vlan_trunk_capabilities(p); - } else { - VLAN_UNLOCK(); - error = EINVAL; - } - break; - default: error = EINVAL; break; From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 14:02:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA97BF3F; Thu, 23 Apr 2015 14:02:35 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B629C1123; Thu, 23 Apr 2015 14:02:35 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 10BE9B923; Thu, 23 Apr 2015 10:02:34 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281885 - head/sys/net Date: Thu, 23 Apr 2015 10:02:19 -0400 Message-ID: <1643843.xLCHLSf0Gm@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504231319.t3NDJ1tW060060@svn.freebsd.org> References: <201504231319.t3NDJ1tW060060@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 23 Apr 2015 10:02:34 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:02:36 -0000 On Thursday, April 23, 2015 01:19:01 PM Gleb Smirnoff wrote: > Author: glebius > Date: Thu Apr 23 13:19:00 2015 > New Revision: 281885 > URL: https://svnweb.freebsd.org/changeset/base/281885 > > Log: > Don't propagate SIOCSIFCAPS from a vlan(4) to its parent. This leads to > quite unexpected result of toggling capabilities on the neighbour vlan(4) > interfaces. > > Reviewed by: melifaro, np > Differential Revision: https://reviews.freebsd.org/D2310 > Sponsored by: Nginx, Inc. Can you look at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194855 or grab it? It seems to be closely related. I'm not sure if it is useful to allow vlans to use independent MTUs. It does not seem to make sense for a VLAN to have a larger MTU than the trunk though (perhaps the other direction can make sense, but maybe we should let a VLAN's MTU track the trunk unless the VLAN's MTU is set explicitly?) -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 14:04:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EBF922C; Thu, 23 Apr 2015 14:04:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FBE01150; Thu, 23 Apr 2015 14:04:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NE4YQe085810; Thu, 23 Apr 2015 14:04:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NE4XSu085800; Thu, 23 Apr 2015 14:04:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504231404.t3NE4XSu085800@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 23 Apr 2015 14:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281886 - in head: lib/libstand sys/boot/libstand32 sys/boot/userboot/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:04:34 -0000 Author: emaste Date: Thu Apr 23 14:04:33 2015 New Revision: 281886 URL: https://svnweb.freebsd.org/changeset/base/281886 Log: Reduce diffs between the three copies of libstand's Makefile This should be a non-functional change. A future change should address the functional differences between these three and converge on a single source. Differential Revision: https://reviews.freebsd.org/D2058 Reviewed by: jhb Sponsored by: The FreeBSD Foundation Modified: head/lib/libstand/Makefile head/sys/boot/libstand32/Makefile head/sys/boot/userboot/libstand/Makefile Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Thu Apr 23 13:19:00 2015 (r281885) +++ head/lib/libstand/Makefile Thu Apr 23 14:04:33 2015 (r281886) @@ -11,6 +11,9 @@ MK_SSP= no .include +LIBSTAND_SRC= ${.CURDIR} +LIBC_SRC= ${LIBSTAND_SRC}/../libc + LIB= stand NO_PIC= INCS= stand.h @@ -19,7 +22,7 @@ MAN= libstand.3 WARNS?= 0 CFLAGS+= -ffreestanding -Wformat -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${LIBSTAND_SRC} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float @@ -54,54 +57,54 @@ SRCS+= gzguts.h zutil.h __main.c assert. # private (pruned) versions of libc string functions SRCS+= strcasecmp.c -.PATH: ${.CURDIR}/../libc/net +.PATH: ${LIBC_SRC}/net SRCS+= ntoh.c # string functions from libc -.PATH: ${.CURDIR}/../libc/string +.PATH: ${LIBC_SRC}/string SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \ memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \ strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \ strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c .if ${MACHINE_CPUARCH} == "arm" -.PATH: ${.CURDIR}/../libc/arm/gen +.PATH: ${LIBC_SRC}/arm/gen # Compiler support functions -.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/builtins/ +.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/ # __clzsi2 and ctzsi2 for various builtin functions SRCS+= clzsi2.c ctzsi2.c # Divide and modulus functions called by the compiler SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c -.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/builtins/arm/ +.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S .endif .if ${MACHINE_CPUARCH} == "aarch64" -.PATH: ${.CURDIR}/../libc/aarch64/gen +.PATH: ${LIBC_SRC}/aarch64/gen .endif .if ${MACHINE_CPUARCH} == "powerpc" -.PATH: ${.CURDIR}/../libc/quad +.PATH: ${LIBC_SRC}/quad SRCS+= ashldi3.c ashrdi3.c SRCS+= syncicache.c .endif # uuid functions from libc -.PATH: ${.CURDIR}/../libc/uuid +.PATH: ${LIBC_SRC}/uuid SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp -.PATH: ${.CURDIR}/${MACHINE_CPUARCH} +.PATH: ${LIBSTAND_SRC}/${MACHINE_CPUARCH} SRCS+= _setjmp.S # decompression functionality from libbz2 # NOTE: to actually test this functionality after libbz2 upgrade compile # loader(8) with LOADER_BZIP2_SUPPORT defined -.PATH: ${.CURDIR}/../../contrib/bzip2 +.PATH: ${LIBSTAND_SRC}/../../contrib/bzip2 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS SRCS+= libstand_bzlib_private.h @@ -110,7 +113,8 @@ SRCS+= _${file} CLEANFILES+= _${file} _${file}: ${file} - sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET} + sed "s|bzlib_private\.h|libstand_bzlib_private.h|" \ + ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= libstand_bzlib_private.h @@ -119,8 +123,8 @@ libstand_bzlib_private.h: bzlib_private. ${.ALLSRC} > ${.TARGET} # decompression functionality from libz -.PATH: ${.CURDIR}/../libz -CFLAGS+=-DHAVE_MEMCPY -I${.CURDIR}/../libz +.PATH: ${LIBSTAND_SRC}/../libz +CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../libz SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h .for file in infback.c inffast.c inflate.c inftrees.c zutil.c @@ -165,4 +169,3 @@ SRCS+= nandfs.c .endif .include - Modified: head/sys/boot/libstand32/Makefile ============================================================================== --- head/sys/boot/libstand32/Makefile Thu Apr 23 13:19:00 2015 (r281885) +++ head/sys/boot/libstand32/Makefile Thu Apr 23 14:04:33 2015 (r281886) @@ -11,9 +11,10 @@ MAN= .include MK_SSP= no -S= ${.CURDIR}/../../../lib/libstand +LIBSTAND_SRC= ${.CURDIR}/../../../lib/libstand +LIBC_SRC= ${LIBSTAND_SRC}/../libc -.PATH: ${S} +.PATH: ${LIBSTAND_SRC} LIB= stand INTERNALLIB= MK_PROFILE= no @@ -22,7 +23,7 @@ NO_PIC= WARNS?= 0 CFLAGS+= -ffreestanding -Wformat -CFLAGS+= -I${S} +CFLAGS+= -I${LIBSTAND_SRC} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS.gcc+= -mpreferred-stack-boundary=2 @@ -52,56 +53,54 @@ SRCS+= gzguts.h zutil.h __main.c assert. # private (pruned) versions of libc string functions SRCS+= strcasecmp.c -LIBC= ${S}/../libc - -.PATH: ${LIBC}/net +.PATH: ${LIBC_SRC}/net SRCS+= ntoh.c # string functions from libc -.PATH: ${LIBC}/string +.PATH: ${LIBC_SRC}/string SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \ memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \ strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \ strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c .if ${MACHINE_CPUARCH} == "arm" -.PATH: ${LIBC}/arm/gen +.PATH: ${LIBC_SRC}/arm/gen # Compiler support functions -.PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/builtins/ +.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/ # __clzsi2 and ctzsi2 for various builtin functions SRCS+= clzsi2.c ctzsi2.c # Divide and modulus functions called by the compiler SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c -.PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/builtins/arm/ +.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/builtins/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S .endif .if ${MACHINE_CPUARCH} == "powerpc" -.PATH: ${LIBC}/quad +.PATH: ${LIBC_SRC}/quad SRCS+= ashldi3.c ashrdi3.c SRCS+= syncicache.c .endif # uuid functions from libc -.PATH: ${LIBC}/uuid +.PATH: ${LIBC_SRC}/uuid SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp .if ${MACHINE_CPUARCH} == "amd64" -.PATH: ${S}/i386 +.PATH: ${LIBSTAND_SRC}/i386 .else -.PATH: ${S}/${MACHINE_CPUARCH} +.PATH: ${LIBSTAND_SRC}/${MACHINE_CPUARCH} .endif SRCS+= _setjmp.S # decompression functionality from libbz2 # NOTE: to actually test this functionality after libbz2 upgrade compile # loader(8) with LOADER_BZIP2_SUPPORT defined -.PATH: ${.CURDIR}/../../../contrib/bzip2 +.PATH: ${LIBSTAND_SRC}/../../contrib/bzip2 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS SRCS+= libstand_bzlib_private.h @@ -110,7 +109,8 @@ SRCS+= _${file} CLEANFILES+= _${file} _${file}: ${file} - sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET} + sed "s|bzlib_private\.h|libstand_bzlib_private.h|" \ + ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= libstand_bzlib_private.h @@ -119,8 +119,8 @@ libstand_bzlib_private.h: bzlib_private. ${.ALLSRC} > ${.TARGET} # decompression functionality from libz -.PATH: ${S}/../libz -CFLAGS+=-DHAVE_MEMCPY -I${S}/../libz +.PATH: ${LIBSTAND_SRC}/../libz +CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../libz SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h .for file in infback.c inffast.c inflate.c inftrees.c zutil.c Modified: head/sys/boot/userboot/libstand/Makefile ============================================================================== --- head/sys/boot/userboot/libstand/Makefile Thu Apr 23 13:19:00 2015 (r281885) +++ head/sys/boot/userboot/libstand/Makefile Thu Apr 23 14:04:33 2015 (r281886) @@ -11,9 +11,10 @@ MAN= .include MK_SSP= no -S= ${.CURDIR}/../../../../lib/libstand +LIBSTAND_SRC= ${.CURDIR}/../../../../lib/libstand +LIBC_SRC= ${LIBSTAND_SRC}/../libc -.PATH: ${S} +.PATH: ${LIBSTAND_SRC} LIB= stand INTERNALLIB= MK_PROFILE= no @@ -22,7 +23,7 @@ NO_PIC= WARNS?= 0 CFLAGS+= -ffreestanding -Wformat -fPIC -CFLAGS+= -I${.CURDIR}/../../../../lib/libstand +CFLAGS+= -I${LIBSTAND_SRC} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 @@ -49,14 +50,12 @@ SRCS+= gzguts.h zutil.h __main.c assert. # private (pruned) versions of libc string functions SRCS+= strcasecmp.c -LIBC= ${.CURDIR}/../../../../lib/libc - -.PATH: ${LIBC}/net +.PATH: ${LIBC_SRC}/net SRCS+= ntoh.c # string functions from libc -.PATH: ${LIBC}/string +.PATH: ${LIBC_SRC}/string .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "powerpc" || \ ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "arm" @@ -66,34 +65,34 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memc strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c .endif .if ${MACHINE_CPUARCH} == "arm" -.PATH: ${LIBC}/arm/gen +.PATH: ${LIBC_SRC}/arm/gen SRCS+= divsi3.S .endif .if ${MACHINE_CPUARCH} == "powerpc" -.PATH: ${LIBC}/libc/quad +.PATH: ${LIBC_SRC}/quad SRCS+= ashldi3.c ashrdi3.c -.PATH: ${LIBC}/powerpc/gen +.PATH: ${LIBC_SRC}/powerpc/gen SRCS+= syncicache.c .endif # uuid functions from libc -.PATH: ${LIBC}/uuid +.PATH: ${LIBC_SRC}/uuid SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp .if ${MACHINE_CPUARCH} == "amd64" -.PATH: ${S}/amd64 +.PATH: ${LIBSTAND_SRC}/amd64 .elif ${MACHINE_ARCH} == "powerpc64" -.PATH: ${S}/powerpc +.PATH: ${LIBSTAND_SRC}/powerpc .else -.PATH: ${S}/${MACHINE_CPUARCH} +.PATH: ${LIBSTAND_SRC}/${MACHINE_CPUARCH} .endif SRCS+= _setjmp.S # decompression functionality from libbz2 # NOTE: to actually test this functionality after libbz2 upgrade compile # loader(8) with LOADER_BZIP2_SUPPORT defined -.PATH: ${.CURDIR}/../../../../contrib/bzip2 +.PATH: ${LIBSTAND_SRC}/../../contrib/bzip2 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS SRCS+= libstand_bzlib_private.h @@ -102,7 +101,8 @@ SRCS+= _${file} CLEANFILES+= _${file} _${file}: ${file} - sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET} + sed "s|bzlib_private\.h|libstand_bzlib_private.h|" \ + ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= libstand_bzlib_private.h @@ -111,8 +111,8 @@ libstand_bzlib_private.h: bzlib_private. ${.ALLSRC} > ${.TARGET} # decompression functionality from libz -.PATH: ${.CURDIR}/../../../../lib/libz -CFLAGS+=-DHAVE_MEMCPY -I${.CURDIR}/../../../../lib/libz +.PATH: ${LIBSTAND_SRC}/../libz +CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../libz SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h .for file in infback.c inffast.c inflate.c inftrees.c zutil.c @@ -121,7 +121,8 @@ CLEANFILES+= _${file} _${file}: ${file} sed -e "s|zutil\.h|libstand_zutil.h|" \ - -e "s|gzguts\.h|libstand_gzguts.h|" ${.ALLSRC} > ${.TARGET} + -e "s|gzguts\.h|libstand_gzguts.h|" \ + ${.ALLSRC} > ${.TARGET} .endfor # depend on stand.h being able to be included multiple times From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 14:22:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE854862; Thu, 23 Apr 2015 14:22:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D91801475; Thu, 23 Apr 2015 14:22:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NEManc095689; Thu, 23 Apr 2015 14:22:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NEML80095575; Thu, 23 Apr 2015 14:22:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504231422.t3NEML80095575@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 23 Apr 2015 14:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281887 - in head: lib/libc/gen lib/libc/include lib/libc/stdio lib/libc/sys share/man/man9 sys/amd64/include sys/boot/i386/common sys/dev/pci sys/i386/include sys/sys sys/vm sys/x86/ac... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:22:37 -0000 Author: jhb Date: Thu Apr 23 14:22:20 2015 New Revision: 281887 URL: https://svnweb.freebsd.org/changeset/base/281887 Log: Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC. Approved by: Hudson River Trading LLC (who owns ACT LLC) MFC after: 1 week Modified: head/lib/libc/gen/_once_stub.c head/lib/libc/include/compat.h head/lib/libc/stdio/open_memstream.3 head/lib/libc/stdio/open_memstream.c head/lib/libc/stdio/open_wmemstream.c head/lib/libc/sys/closefrom.2 head/lib/libc/sys/procctl.2 head/share/man/man9/BUS_BIND_INTR.9 head/share/man/man9/BUS_CHILD_DELETED.9 head/share/man/man9/BUS_CHILD_DETACHED.9 head/share/man/man9/BUS_DESCRIBE_INTR.9 head/share/man/man9/BUS_NEW_PASS.9 head/share/man/man9/VOP_ADVISE.9 head/share/man/man9/VOP_ALLOCATE.9 head/share/man/man9/bus_adjust_resource.9 head/share/man/man9/bus_generic_new_pass.9 head/share/man/man9/bus_set_pass.9 head/share/man/man9/getenv.9 head/share/man/man9/refcount.9 head/share/man/man9/sglist.9 head/share/man/man9/shm_map.9 head/sys/amd64/include/vm.h head/sys/boot/i386/common/edd.h head/sys/dev/pci/pci_subr.c head/sys/i386/include/vm.h head/sys/sys/procctl.h head/sys/vm/sg_pager.c head/sys/x86/acpica/srat.c head/sys/x86/include/mca.h head/sys/x86/pci/qpi.c head/sys/x86/x86/mca.c head/tools/regression/file/closefrom/closefrom.c head/tools/regression/lib/libc/stdio/test-open_memstream.c head/tools/regression/lib/libc/stdio/test-open_wmemstream.c head/tools/regression/netinet/arphold/arphold.c head/tools/tools/tscdrift/tscdrift.c head/usr.bin/perror/perror.1 head/usr.bin/perror/perror.c head/usr.bin/procstat/procstat_rusage.c head/usr.bin/protect/protect.1 head/usr.bin/protect/protect.c head/usr.sbin/bhyve/ioapic.c head/usr.sbin/bhyve/ioapic.h head/usr.sbin/bhyve/pci_irq.c head/usr.sbin/bhyve/pci_irq.h head/usr.sbin/bhyve/pm.c head/usr.sbin/etcupdate/etcupdate.8 head/usr.sbin/etcupdate/etcupdate.sh head/usr.sbin/etcupdate/tests/always_test.sh head/usr.sbin/etcupdate/tests/conflicts_test.sh head/usr.sbin/etcupdate/tests/fbsdid_test.sh head/usr.sbin/etcupdate/tests/ignore_test.sh head/usr.sbin/etcupdate/tests/preworld_test.sh head/usr.sbin/etcupdate/tests/tests_test.sh head/usr.sbin/etcupdate/tests/tzsetup_test.sh head/usr.sbin/pciconf/err.c Modified: head/lib/libc/gen/_once_stub.c ============================================================================== --- head/lib/libc/gen/_once_stub.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/gen/_once_stub.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/lib/libc/include/compat.h ============================================================================== --- head/lib/libc/include/compat.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/include/compat.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/lib/libc/stdio/open_memstream.3 ============================================================================== --- head/lib/libc/stdio/open_memstream.3 Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/stdio/open_memstream.3 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/lib/libc/stdio/open_memstream.c ============================================================================== --- head/lib/libc/stdio/open_memstream.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/stdio/open_memstream.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/lib/libc/stdio/open_wmemstream.c ============================================================================== --- head/lib/libc/stdio/open_wmemstream.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/stdio/open_wmemstream.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/lib/libc/sys/closefrom.2 ============================================================================== --- head/lib/libc/sys/closefrom.2 Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/sys/closefrom.2 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Thu Apr 23 14:04:33 2015 (r281886) +++ head/lib/libc/sys/procctl.2 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/BUS_BIND_INTR.9 ============================================================================== --- head/share/man/man9/BUS_BIND_INTR.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/BUS_BIND_INTR.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/BUS_CHILD_DELETED.9 ============================================================================== --- head/share/man/man9/BUS_CHILD_DELETED.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/BUS_CHILD_DELETED.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2012 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/BUS_CHILD_DETACHED.9 ============================================================================== --- head/share/man/man9/BUS_CHILD_DETACHED.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/BUS_CHILD_DETACHED.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2012 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/BUS_DESCRIBE_INTR.9 ============================================================================== --- head/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/BUS_NEW_PASS.9 ============================================================================== --- head/share/man/man9/BUS_NEW_PASS.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/BUS_NEW_PASS.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/VOP_ADVISE.9 ============================================================================== --- head/share/man/man9/VOP_ADVISE.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/VOP_ADVISE.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/VOP_ALLOCATE.9 ============================================================================== --- head/share/man/man9/VOP_ALLOCATE.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/VOP_ALLOCATE.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/bus_adjust_resource.9 ============================================================================== --- head/share/man/man9/bus_adjust_resource.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/bus_adjust_resource.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/bus_generic_new_pass.9 ============================================================================== --- head/share/man/man9/bus_generic_new_pass.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/bus_generic_new_pass.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/bus_set_pass.9 ============================================================================== --- head/share/man/man9/bus_set_pass.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/bus_set_pass.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/getenv.9 ============================================================================== --- head/share/man/man9/getenv.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/getenv.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/refcount.9 ============================================================================== --- head/share/man/man9/refcount.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/refcount.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/sglist.9 ============================================================================== --- head/share/man/man9/sglist.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/sglist.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/share/man/man9/shm_map.9 ============================================================================== --- head/share/man/man9/shm_map.9 Thu Apr 23 14:04:33 2015 (r281886) +++ head/share/man/man9/shm_map.9 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/sys/amd64/include/vm.h ============================================================================== --- head/sys/amd64/include/vm.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/amd64/include/vm.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/boot/i386/common/edd.h ============================================================================== --- head/sys/boot/i386/common/edd.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/boot/i386/common/edd.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/dev/pci/pci_subr.c ============================================================================== --- head/sys/dev/pci/pci_subr.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/dev/pci/pci_subr.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/i386/include/vm.h ============================================================================== --- head/sys/i386/include/vm.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/i386/include/vm.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/sys/procctl.h ============================================================================== --- head/sys/sys/procctl.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/sys/procctl.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/vm/sg_pager.c ============================================================================== --- head/sys/vm/sg_pager.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/vm/sg_pager.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/x86/acpica/srat.c ============================================================================== --- head/sys/x86/acpica/srat.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/x86/acpica/srat.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/x86/include/mca.h ============================================================================== --- head/sys/x86/include/mca.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/x86/include/mca.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/x86/pci/qpi.c ============================================================================== --- head/sys/x86/pci/qpi.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/x86/pci/qpi.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/sys/x86/x86/mca.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/tools/regression/file/closefrom/closefrom.c ============================================================================== --- head/tools/regression/file/closefrom/closefrom.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/tools/regression/file/closefrom/closefrom.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/tools/regression/lib/libc/stdio/test-open_memstream.c ============================================================================== --- head/tools/regression/lib/libc/stdio/test-open_memstream.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/tools/regression/lib/libc/stdio/test-open_memstream.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/tools/regression/lib/libc/stdio/test-open_wmemstream.c ============================================================================== --- head/tools/regression/lib/libc/stdio/test-open_wmemstream.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/tools/regression/lib/libc/stdio/test-open_wmemstream.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/tools/regression/netinet/arphold/arphold.c ============================================================================== --- head/tools/regression/netinet/arphold/arphold.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/tools/regression/netinet/arphold/arphold.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by George Neville-Neil gnn@freebsd.org * All rights reserved. * Modified: head/tools/tools/tscdrift/tscdrift.c ============================================================================== --- head/tools/tools/tscdrift/tscdrift.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/tools/tools/tscdrift/tscdrift.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.bin/perror/perror.1 ============================================================================== --- head/usr.bin/perror/perror.1 Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.bin/perror/perror.1 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: George V. Neville-Neil .\" All rights reserved. .\" Modified: head/usr.bin/perror/perror.c ============================================================================== --- head/usr.bin/perror/perror.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.bin/perror/perror.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: George V. Neville-Neil * All rights reserved. * Modified: head/usr.bin/procstat/procstat_rusage.c ============================================================================== --- head/usr.bin/procstat/procstat_rusage.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.bin/procstat/procstat_rusage.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.bin/protect/protect.1 ============================================================================== --- head/usr.bin/protect/protect.1 Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.bin/protect/protect.1 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/usr.bin/protect/protect.c ============================================================================== --- head/usr.bin/protect/protect.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.bin/protect/protect.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/bhyve/ioapic.c ============================================================================== --- head/usr.sbin/bhyve/ioapic.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/bhyve/ioapic.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/bhyve/ioapic.h ============================================================================== --- head/usr.sbin/bhyve/ioapic.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/bhyve/ioapic.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/bhyve/pci_irq.c ============================================================================== --- head/usr.sbin/bhyve/pci_irq.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/bhyve/pci_irq.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/bhyve/pci_irq.h ============================================================================== --- head/usr.sbin/bhyve/pci_irq.h Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/bhyve/pci_irq.h Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/bhyve/pm.c ============================================================================== --- head/usr.sbin/bhyve/pm.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/bhyve/pm.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: head/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.8 Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/etcupdate.8 Thu Apr 23 14:22:20 2015 (r281887) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2010-2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: head/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/etcupdate.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010-2013 Advanced Computing Technologies LLC +# Copyright (c) 2010-2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/always_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/always_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/always_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/conflicts_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/conflicts_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/conflicts_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/fbsdid_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/fbsdid_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/fbsdid_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/ignore_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/ignore_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/ignore_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/preworld_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/preworld_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/preworld_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/tests_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/tests_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/tests_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/etcupdate/tests/tzsetup_test.sh ============================================================================== --- head/usr.sbin/etcupdate/tests/tzsetup_test.sh Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/etcupdate/tests/tzsetup_test.sh Thu Apr 23 14:22:20 2015 (r281887) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: head/usr.sbin/pciconf/err.c ============================================================================== --- head/usr.sbin/pciconf/err.c Thu Apr 23 14:04:33 2015 (r281886) +++ head/usr.sbin/pciconf/err.c Thu Apr 23 14:22:20 2015 (r281887) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 14:36:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80301DBF; Thu, 23 Apr 2015 14:36:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CF08161D; Thu, 23 Apr 2015 14:36:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NEa2AD001645; Thu, 23 Apr 2015 14:36:02 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NEa2Vp001643; Thu, 23 Apr 2015 14:36:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504231436.t3NEa2Vp001643@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 23 Apr 2015 14:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281888 - head/usr.bin/nfsstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:36:02 -0000 Author: trasz Date: Thu Apr 23 14:36:01 2015 New Revision: 281888 URL: https://svnweb.freebsd.org/changeset/base/281888 Log: Remove oldnfs support from nfsstat(1). Reviewed by: rmacklem@ (earlier version) Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/nfsstat/nfsstat.1 head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.1 ============================================================================== --- head/usr.bin/nfsstat/nfsstat.1 Thu Apr 23 14:22:20 2015 (r281887) +++ head/usr.bin/nfsstat/nfsstat.1 Thu Apr 23 14:36:01 2015 (r281888) @@ -28,7 +28,7 @@ .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 1, 2013 +.Dd April 23, 2015 .Dt NFSSTAT 1 .Os .Sh NAME @@ -38,7 +38,7 @@ statistics .Sh SYNOPSIS .Nm -.Op Fl cemoszW +.Op Fl cemszW .Op Fl M Ar core .Op Fl N Ar system .Op Fl w Ar wait @@ -58,10 +58,8 @@ The options are as follows: .It Fl c Only display client side statistics. .It Fl e -Report the extra statistics collected by the new NFS client and +Report the extra statistics collected by the NFS client and server for NFSv4. -This option is incompatible with -.Fl o . .It Fl M Extract values associated with the name list from the specified core instead of the default @@ -75,10 +73,6 @@ This option is only supported by the new .It Fl N Extract the name list from the specified system instead of the default .Pa /boot/kernel/kernel . -.It Fl o -Report statistics for the old NFS client and/or server. -Without this -option statistics for the new NFS client and/or server will be reported. .It Fl s Only display server side statistics. .It Fl W Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Thu Apr 23 14:22:20 2015 (r281887) +++ head/usr.bin/nfsstat/nfsstat.c Thu Apr 23 14:36:01 2015 (r281888) @@ -79,22 +79,19 @@ struct nlist nl[] = { }; kvm_t *kd; -static int deadkernel = 0; static int widemode = 0; static int zflag = 0; -static int run_v4 = 1; static int printtitle = 1; static struct ext_nfsstats ext_nfsstats; static int extra_output = 0; -void intpr(int, int); -void printhdr(int, int); -void sidewaysintpr(u_int, int, int); -void usage(void); -char *sperc1(int, int); -char *sperc2(int, int); -void exp_intpr(int, int); -void exp_sidewaysintpr(u_int, int, int); +static void intpr(int, int); +static void printhdr(int, int); +static void usage(void); +static char *sperc1(int, int); +static char *sperc2(int, int); +static void exp_intpr(int, int); +static void exp_sidewaysintpr(u_int, int, int); #define DELTA(field) (nfsstats.field - lastst.field) @@ -106,7 +103,6 @@ main(int argc, char **argv) int serverOnly = -1; int ch; char *memf, *nlistf; - char errbuf[_POSIX2_LINE_MAX]; int mntlen, i; char buf[1024]; struct statfs *mntbuf; @@ -114,7 +110,7 @@ main(int argc, char **argv) interval = 0; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "cesWM:mN:ow:z")) != -1) + while ((ch = getopt(argc, argv, "cesWM:mN:w:z")) != -1) switch(ch) { case 'M': memf = optarg; @@ -162,14 +158,7 @@ main(int argc, char **argv) case 'z': zflag = 1; break; - case 'o': - if (extra_output != 0) - err(1, "-o incompatible with -e"); - run_v4 = 0; - break; case 'e': - if (run_v4 == 0) - err(1, "-e incompatible with -o"); extra_output = 1; break; case '?': @@ -190,26 +179,11 @@ main(int argc, char **argv) } } #endif - if (run_v4 != 0 && modfind("nfscommon") < 0) - errx(1, "new client/server not loaded"); - - if (run_v4 == 0 && (nlistf != NULL || memf != NULL)) { - deadkernel = 1; - - if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, - errbuf)) == 0) { - errx(1, "kvm_openfiles: %s", errbuf); - } - if (kvm_nlist(kd, nl) != 0) { - errx(1, "kvm_nlist: can't get names"); - } - } + if (modfind("nfscommon") < 0) + errx(1, "NFS client/server not loaded"); if (interval) { - if (run_v4 > 0) - exp_sidewaysintpr(interval, clientOnly, serverOnly); - else - sidewaysintpr(interval, clientOnly, serverOnly); + exp_sidewaysintpr(interval, clientOnly, serverOnly); } else { if (extra_output != 0) exp_intpr(clientOnly, serverOnly); @@ -220,434 +194,160 @@ main(int argc, char **argv) } /* - * Read the nfs stats using sysctl(3) for live kernels, or kvm_read - * for dead ones. - */ -static void -readstats(struct nfsstats **stp, struct nfsrvstats **srvstp, int zero) -{ - union { - struct nfsstats client; - struct nfsrvstats server; - } zerostat; - size_t buflen; - - if (deadkernel) { - if (*stp != NULL && kvm_read(kd, (u_long)nl[N_NFSSTAT].n_value, - *stp, sizeof(struct nfsstats)) < 0) { - *stp = NULL; - } - if (*srvstp != NULL && kvm_read(kd, - (u_long)nl[N_NFSRVSTAT].n_value, *srvstp, - sizeof(struct nfsrvstats)) < 0) { - *srvstp = NULL; - } - } else { - if (zero) - bzero(&zerostat, sizeof(zerostat)); - buflen = sizeof(struct nfsrvstats); - if (*srvstp != NULL && sysctlbyname("vfs.nfsrv.nfsrvstats", - *srvstp, &buflen, zero ? &zerostat : NULL, - zero ? buflen : 0) < 0) { - if (errno != ENOENT) - err(1, "sysctl: vfs.nfsrv.nfsrvstats"); - *srvstp = NULL; - } - } -} - -/* * Print a description of the nfs stats. */ -void +static void intpr(int clientOnly, int serverOnly) { - struct nfsstats nfsstats, *nfsstatsp; - struct nfsrvstats nfsrvstats, *nfsrvstatsp; int nfssvc_flag; - if (run_v4 == 0) { - /* - * Only read the stats we are going to display to avoid zeroing - * stats the user didn't request. - */ - if (clientOnly) - nfsstatsp = &nfsstats; - else - nfsstatsp = NULL; - if (serverOnly) - nfsrvstatsp = &nfsrvstats; - else - nfsrvstatsp = NULL; - - readstats(&nfsstatsp, &nfsrvstatsp, zflag); - - if (clientOnly && !nfsstatsp) { - printf("Client not present!\n"); - clientOnly = 0; - } - } else { - nfssvc_flag = NFSSVC_GETSTATS; - if (zflag != 0) { - if (clientOnly != 0) - nfssvc_flag |= NFSSVC_ZEROCLTSTATS; - if (serverOnly != 0) - nfssvc_flag |= NFSSVC_ZEROSRVSTATS; - } - if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) - err(1, "Can't get stats"); + nfssvc_flag = NFSSVC_GETSTATS; + if (zflag != 0) { + if (clientOnly != 0) + nfssvc_flag |= NFSSVC_ZEROCLTSTATS; + if (serverOnly != 0) + nfssvc_flag |= NFSSVC_ZEROSRVSTATS; } + if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) + err(1, "Can't get stats"); if (clientOnly) { printf("Client Info:\n"); printf("Rpc Counts:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Getattr", "Setattr", "Lookup", "Readlink", "Read", "Write", "Create", "Remove"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsstats.rpccnt[NFSPROC_GETATTR], - nfsstats.rpccnt[NFSPROC_SETATTR], - nfsstats.rpccnt[NFSPROC_LOOKUP], - nfsstats.rpccnt[NFSPROC_READLINK], - nfsstats.rpccnt[NFSPROC_READ], - nfsstats.rpccnt[NFSPROC_WRITE], - nfsstats.rpccnt[NFSPROC_CREATE], - nfsstats.rpccnt[NFSPROC_REMOVE]); - else - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_GETATTR], - ext_nfsstats.rpccnt[NFSPROC_SETATTR], - ext_nfsstats.rpccnt[NFSPROC_LOOKUP], - ext_nfsstats.rpccnt[NFSPROC_READLINK], - ext_nfsstats.rpccnt[NFSPROC_READ], - ext_nfsstats.rpccnt[NFSPROC_WRITE], - ext_nfsstats.rpccnt[NFSPROC_CREATE], - ext_nfsstats.rpccnt[NFSPROC_REMOVE]); + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.rpccnt[NFSPROC_GETATTR], + ext_nfsstats.rpccnt[NFSPROC_SETATTR], + ext_nfsstats.rpccnt[NFSPROC_LOOKUP], + ext_nfsstats.rpccnt[NFSPROC_READLINK], + ext_nfsstats.rpccnt[NFSPROC_READ], + ext_nfsstats.rpccnt[NFSPROC_WRITE], + ext_nfsstats.rpccnt[NFSPROC_CREATE], + ext_nfsstats.rpccnt[NFSPROC_REMOVE]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Rename", "Link", "Symlink", "Mkdir", "Rmdir", "Readdir", "RdirPlus", "Access"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsstats.rpccnt[NFSPROC_RENAME], - nfsstats.rpccnt[NFSPROC_LINK], - nfsstats.rpccnt[NFSPROC_SYMLINK], - nfsstats.rpccnt[NFSPROC_MKDIR], - nfsstats.rpccnt[NFSPROC_RMDIR], - nfsstats.rpccnt[NFSPROC_READDIR], - nfsstats.rpccnt[NFSPROC_READDIRPLUS], - nfsstats.rpccnt[NFSPROC_ACCESS]); - else - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_RENAME], - ext_nfsstats.rpccnt[NFSPROC_LINK], - ext_nfsstats.rpccnt[NFSPROC_SYMLINK], - ext_nfsstats.rpccnt[NFSPROC_MKDIR], - ext_nfsstats.rpccnt[NFSPROC_RMDIR], - ext_nfsstats.rpccnt[NFSPROC_READDIR], - ext_nfsstats.rpccnt[NFSPROC_READDIRPLUS], - ext_nfsstats.rpccnt[NFSPROC_ACCESS]); + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.rpccnt[NFSPROC_RENAME], + ext_nfsstats.rpccnt[NFSPROC_LINK], + ext_nfsstats.rpccnt[NFSPROC_SYMLINK], + ext_nfsstats.rpccnt[NFSPROC_MKDIR], + ext_nfsstats.rpccnt[NFSPROC_RMDIR], + ext_nfsstats.rpccnt[NFSPROC_READDIR], + ext_nfsstats.rpccnt[NFSPROC_READDIRPLUS], + ext_nfsstats.rpccnt[NFSPROC_ACCESS]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "Mknod", "Fsstat", "Fsinfo", "PathConf", "Commit"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d\n", - nfsstats.rpccnt[NFSPROC_MKNOD], - nfsstats.rpccnt[NFSPROC_FSSTAT], - nfsstats.rpccnt[NFSPROC_FSINFO], - nfsstats.rpccnt[NFSPROC_PATHCONF], - nfsstats.rpccnt[NFSPROC_COMMIT]); - else - printf("%9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_MKNOD], - ext_nfsstats.rpccnt[NFSPROC_FSSTAT], - ext_nfsstats.rpccnt[NFSPROC_FSINFO], - ext_nfsstats.rpccnt[NFSPROC_PATHCONF], - ext_nfsstats.rpccnt[NFSPROC_COMMIT]); + printf("%9d %9d %9d %9d %9d\n", + ext_nfsstats.rpccnt[NFSPROC_MKNOD], + ext_nfsstats.rpccnt[NFSPROC_FSSTAT], + ext_nfsstats.rpccnt[NFSPROC_FSINFO], + ext_nfsstats.rpccnt[NFSPROC_PATHCONF], + ext_nfsstats.rpccnt[NFSPROC_COMMIT]); printf("Rpc Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "TimedOut", "Invalid", "X Replies", "Retries", "Requests"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d\n", - nfsstats.rpctimeouts, - nfsstats.rpcinvalid, - nfsstats.rpcunexpected, - nfsstats.rpcretries, - nfsstats.rpcrequests); - else - printf("%9d %9d %9d %9d %9d\n", - ext_nfsstats.rpctimeouts, - ext_nfsstats.rpcinvalid, - ext_nfsstats.rpcunexpected, - ext_nfsstats.rpcretries, - ext_nfsstats.rpcrequests); + printf("%9d %9d %9d %9d %9d\n", + ext_nfsstats.rpctimeouts, + ext_nfsstats.rpcinvalid, + ext_nfsstats.rpcunexpected, + ext_nfsstats.rpcretries, + ext_nfsstats.rpcrequests); printf("Cache Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s", "Attr Hits", "Misses", "Lkup Hits", "Misses"); printf(" %9.9s %9.9s %9.9s %9.9s\n", "BioR Hits", "Misses", "BioW Hits", "Misses"); - if (run_v4 == 0) { - printf("%9d %9d %9d %9d", - nfsstats.attrcache_hits, - nfsstats.attrcache_misses, - nfsstats.lookupcache_hits, - nfsstats.lookupcache_misses); - printf(" %9d %9d %9d %9d\n", - nfsstats.biocache_reads-nfsstats.read_bios, - nfsstats.read_bios, - nfsstats.biocache_writes-nfsstats.write_bios, - nfsstats.write_bios); - } else { - printf("%9d %9d %9d %9d", - ext_nfsstats.attrcache_hits, - ext_nfsstats.attrcache_misses, - ext_nfsstats.lookupcache_hits, - ext_nfsstats.lookupcache_misses); - printf(" %9d %9d %9d %9d\n", - ext_nfsstats.biocache_reads - - ext_nfsstats.read_bios, - ext_nfsstats.read_bios, - ext_nfsstats.biocache_writes - - ext_nfsstats.write_bios, - ext_nfsstats.write_bios); - } + printf("%9d %9d %9d %9d", + ext_nfsstats.attrcache_hits, + ext_nfsstats.attrcache_misses, + ext_nfsstats.lookupcache_hits, + ext_nfsstats.lookupcache_misses); + printf(" %9d %9d %9d %9d\n", + ext_nfsstats.biocache_reads - + ext_nfsstats.read_bios, + ext_nfsstats.read_bios, + ext_nfsstats.biocache_writes - + ext_nfsstats.write_bios, + ext_nfsstats.write_bios); printf("%9.9s %9.9s %9.9s %9.9s", "BioRLHits", "Misses", "BioD Hits", "Misses"); printf(" %9.9s %9.9s %9.9s %9.9s\n", "DirE Hits", "Misses", "Accs Hits", "Misses"); - if (run_v4 == 0) { - printf("%9d %9d %9d %9d", - nfsstats.biocache_readlinks - - nfsstats.readlink_bios, - nfsstats.readlink_bios, - nfsstats.biocache_readdirs - - nfsstats.readdir_bios, - nfsstats.readdir_bios); - printf(" %9d %9d %9d %9d\n", - nfsstats.direofcache_hits, - nfsstats.direofcache_misses, - nfsstats.accesscache_hits, - nfsstats.accesscache_misses); - } else { - printf("%9d %9d %9d %9d", - ext_nfsstats.biocache_readlinks - - ext_nfsstats.readlink_bios, - ext_nfsstats.readlink_bios, - ext_nfsstats.biocache_readdirs - - ext_nfsstats.readdir_bios, - ext_nfsstats.readdir_bios); - printf(" %9d %9d %9d %9d\n", - ext_nfsstats.direofcache_hits, - ext_nfsstats.direofcache_misses, - ext_nfsstats.accesscache_hits, - ext_nfsstats.accesscache_misses); - } - } - if (run_v4 == 0 && serverOnly && !nfsrvstatsp) { - printf("Server not present!\n"); - serverOnly = 0; + printf("%9d %9d %9d %9d", + ext_nfsstats.biocache_readlinks - + ext_nfsstats.readlink_bios, + ext_nfsstats.readlink_bios, + ext_nfsstats.biocache_readdirs - + ext_nfsstats.readdir_bios, + ext_nfsstats.readdir_bios); + printf(" %9d %9d %9d %9d\n", + ext_nfsstats.direofcache_hits, + ext_nfsstats.direofcache_misses, + ext_nfsstats.accesscache_hits, + ext_nfsstats.accesscache_misses); } if (serverOnly) { printf("\nServer Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Getattr", "Setattr", "Lookup", "Readlink", "Read", "Write", "Create", "Remove"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsrvstats.srvrpccnt[NFSPROC_GETATTR], - nfsrvstats.srvrpccnt[NFSPROC_SETATTR], - nfsrvstats.srvrpccnt[NFSPROC_LOOKUP], - nfsrvstats.srvrpccnt[NFSPROC_READLINK], - nfsrvstats.srvrpccnt[NFSPROC_READ], - nfsrvstats.srvrpccnt[NFSPROC_WRITE], - nfsrvstats.srvrpccnt[NFSPROC_CREATE], - nfsrvstats.srvrpccnt[NFSPROC_REMOVE]); - else - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_GETATTR], - ext_nfsstats.srvrpccnt[NFSV4OP_SETATTR], - ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUP], - ext_nfsstats.srvrpccnt[NFSV4OP_READLINK], - ext_nfsstats.srvrpccnt[NFSV4OP_READ], - ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], - ext_nfsstats.srvrpccnt[NFSV4OP_CREATE], - ext_nfsstats.srvrpccnt[NFSV4OP_REMOVE]); + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSV4OP_GETATTR], + ext_nfsstats.srvrpccnt[NFSV4OP_SETATTR], + ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUP], + ext_nfsstats.srvrpccnt[NFSV4OP_READLINK], + ext_nfsstats.srvrpccnt[NFSV4OP_READ], + ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], + ext_nfsstats.srvrpccnt[NFSV4OP_CREATE], + ext_nfsstats.srvrpccnt[NFSV4OP_REMOVE]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Rename", "Link", "Symlink", "Mkdir", "Rmdir", "Readdir", "RdirPlus", "Access"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsrvstats.srvrpccnt[NFSPROC_RENAME], - nfsrvstats.srvrpccnt[NFSPROC_LINK], - nfsrvstats.srvrpccnt[NFSPROC_SYMLINK], - nfsrvstats.srvrpccnt[NFSPROC_MKDIR], - nfsrvstats.srvrpccnt[NFSPROC_RMDIR], - nfsrvstats.srvrpccnt[NFSPROC_READDIR], - nfsrvstats.srvrpccnt[NFSPROC_READDIRPLUS], - nfsrvstats.srvrpccnt[NFSPROC_ACCESS]); - else - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_RENAME], - ext_nfsstats.srvrpccnt[NFSV4OP_LINK], - ext_nfsstats.srvrpccnt[NFSV4OP_SYMLINK], - ext_nfsstats.srvrpccnt[NFSV4OP_MKDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_RMDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_READDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_READDIRPLUS], - ext_nfsstats.srvrpccnt[NFSV4OP_ACCESS]); + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSV4OP_RENAME], + ext_nfsstats.srvrpccnt[NFSV4OP_LINK], + ext_nfsstats.srvrpccnt[NFSV4OP_SYMLINK], + ext_nfsstats.srvrpccnt[NFSV4OP_MKDIR], + ext_nfsstats.srvrpccnt[NFSV4OP_RMDIR], + ext_nfsstats.srvrpccnt[NFSV4OP_READDIR], + ext_nfsstats.srvrpccnt[NFSV4OP_READDIRPLUS], + ext_nfsstats.srvrpccnt[NFSV4OP_ACCESS]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "Mknod", "Fsstat", "Fsinfo", "PathConf", "Commit"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d %9d\n", - nfsrvstats.srvrpccnt[NFSPROC_MKNOD], - nfsrvstats.srvrpccnt[NFSPROC_FSSTAT], - nfsrvstats.srvrpccnt[NFSPROC_FSINFO], - nfsrvstats.srvrpccnt[NFSPROC_PATHCONF], - nfsrvstats.srvrpccnt[NFSPROC_COMMIT]); - else - printf("%9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_MKNOD], - ext_nfsstats.srvrpccnt[NFSV4OP_FSSTAT], - ext_nfsstats.srvrpccnt[NFSV4OP_FSINFO], - ext_nfsstats.srvrpccnt[NFSV4OP_PATHCONF], - ext_nfsstats.srvrpccnt[NFSV4OP_COMMIT]); + printf("%9d %9d %9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSV4OP_MKNOD], + ext_nfsstats.srvrpccnt[NFSV4OP_FSSTAT], + ext_nfsstats.srvrpccnt[NFSV4OP_FSINFO], + ext_nfsstats.srvrpccnt[NFSV4OP_PATHCONF], + ext_nfsstats.srvrpccnt[NFSV4OP_COMMIT]); printf("Server Ret-Failed\n"); - if (run_v4 == 0) - printf("%17d\n", nfsrvstats.srvrpc_errs); - else - printf("%17d\n", ext_nfsstats.srvrpc_errs); + printf("%17d\n", ext_nfsstats.srvrpc_errs); printf("Server Faults\n"); - if (run_v4 == 0) - printf("%13d\n", nfsrvstats.srv_errs); - else - printf("%13d\n", ext_nfsstats.srv_errs); + printf("%13d\n", ext_nfsstats.srv_errs); printf("Server Cache Stats:\n"); printf("%9.9s %9.9s %9.9s %9.9s\n", "Inprog", "Idem", "Non-idem", "Misses"); - if (run_v4 == 0) - printf("%9d %9d %9d %9d\n", - nfsrvstats.srvcache_inproghits, - nfsrvstats.srvcache_idemdonehits, - nfsrvstats.srvcache_nonidemdonehits, - nfsrvstats.srvcache_misses); - else - printf("%9d %9d %9d %9d\n", - ext_nfsstats.srvcache_inproghits, - ext_nfsstats.srvcache_idemdonehits, - ext_nfsstats.srvcache_nonidemdonehits, - ext_nfsstats.srvcache_misses); + printf("%9d %9d %9d %9d\n", + ext_nfsstats.srvcache_inproghits, + ext_nfsstats.srvcache_idemdonehits, + ext_nfsstats.srvcache_nonidemdonehits, + ext_nfsstats.srvcache_misses); printf("Server Write Gathering:\n"); printf("%9.9s %9.9s %9.9s\n", "WriteOps", "WriteRPC", "Opsaved"); - if (run_v4 == 0) - printf("%9d %9d %9d\n", - nfsrvstats.srvvop_writes, - nfsrvstats.srvrpccnt[NFSPROC_WRITE], - nfsrvstats.srvrpccnt[NFSPROC_WRITE] - - nfsrvstats.srvvop_writes); - else - /* - * The new client doesn't do write gathering. It was - * only useful for NFSv2. - */ - printf("%9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], - ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], 0); - } -} - -u_char signalled; /* set if alarm goes off "early" */ - -/* - * Print a running summary of nfs statistics. - * Repeat display every interval seconds, showing statistics - * collected over that interval. Assumes that interval is non-zero. - * First line printed at top of screen is always cumulative. - */ -void -sidewaysintpr(u_int interval, int clientOnly, int serverOnly) -{ - struct nfsstats nfsstats, lastst, *nfsstatsp; - struct nfsrvstats nfsrvstats, lastsrvst, *nfsrvstatsp; - int hdrcnt = 1; - - nfsstatsp = &lastst; - nfsrvstatsp = &lastsrvst; - readstats(&nfsstatsp, &nfsrvstatsp, 0); - if (clientOnly && !nfsstatsp) { - printf("Client not present!\n"); - clientOnly = 0; - } - if (serverOnly && !nfsrvstatsp) { - printf("Server not present!\n"); - serverOnly = 0; - } - sleep(interval); - - for (;;) { - nfsstatsp = &nfsstats; - nfsrvstatsp = &nfsrvstats; - readstats(&nfsstatsp, &nfsrvstatsp, 0); - - if (--hdrcnt == 0) { - printhdr(clientOnly, serverOnly); - if (clientOnly && serverOnly) - hdrcnt = 10; - else - hdrcnt = 20; - } - if (clientOnly) { - printf("%s %6d %6d %6d %6d %6d %6d %6d %6d", - ((clientOnly && serverOnly) ? "Client:" : ""), - DELTA(rpccnt[NFSPROC_GETATTR]), - DELTA(rpccnt[NFSPROC_LOOKUP]), - DELTA(rpccnt[NFSPROC_READLINK]), - DELTA(rpccnt[NFSPROC_READ]), - DELTA(rpccnt[NFSPROC_WRITE]), - DELTA(rpccnt[NFSPROC_RENAME]), - DELTA(rpccnt[NFSPROC_ACCESS]), - DELTA(rpccnt[NFSPROC_READDIR]) + - DELTA(rpccnt[NFSPROC_READDIRPLUS]) - ); - if (widemode) { - printf(" %s %s %s %s %s %s", - sperc1(DELTA(attrcache_hits), - DELTA(attrcache_misses)), - sperc1(DELTA(lookupcache_hits), - DELTA(lookupcache_misses)), - sperc2(DELTA(biocache_reads), - DELTA(read_bios)), - sperc2(DELTA(biocache_writes), - DELTA(write_bios)), - sperc1(DELTA(accesscache_hits), - DELTA(accesscache_misses)), - sperc2(DELTA(biocache_readdirs), - DELTA(readdir_bios)) - ); - } - printf("\n"); - lastst = nfsstats; - } - if (serverOnly) { - printf("%s %6d %6d %6d %6d %6d %6d %6d %6d", - ((clientOnly && serverOnly) ? "Server:" : ""), - nfsrvstats.srvrpccnt[NFSPROC_GETATTR]-lastsrvst.srvrpccnt[NFSPROC_GETATTR], - nfsrvstats.srvrpccnt[NFSPROC_LOOKUP]-lastsrvst.srvrpccnt[NFSPROC_LOOKUP], - nfsrvstats.srvrpccnt[NFSPROC_READLINK]-lastsrvst.srvrpccnt[NFSPROC_READLINK], - nfsrvstats.srvrpccnt[NFSPROC_READ]-lastsrvst.srvrpccnt[NFSPROC_READ], - nfsrvstats.srvrpccnt[NFSPROC_WRITE]-lastsrvst.srvrpccnt[NFSPROC_WRITE], - nfsrvstats.srvrpccnt[NFSPROC_RENAME]-lastsrvst.srvrpccnt[NFSPROC_RENAME], - nfsrvstats.srvrpccnt[NFSPROC_ACCESS]-lastsrvst.srvrpccnt[NFSPROC_ACCESS], - (nfsrvstats.srvrpccnt[NFSPROC_READDIR]-lastsrvst.srvrpccnt[NFSPROC_READDIR]) - +(nfsrvstats.srvrpccnt[NFSPROC_READDIRPLUS]-lastsrvst.srvrpccnt[NFSPROC_READDIRPLUS])); - printf("\n"); - lastsrvst = nfsrvstats; - } - fflush(stdout); - sleep(interval); + /* + * The new client doesn't do write gathering. It was + * only useful for NFSv2. + */ + printf("%9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], + ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], 0); } - /*NOTREACHED*/ } -void +static void printhdr(int clientOnly, int serverOnly) { printf("%s%6.6s %6.6s %6.6s %6.6s %6.6s %6.6s %6.6s %6.6s", @@ -661,18 +361,18 @@ printhdr(int clientOnly, int serverOnly) fflush(stdout); } -void +static void usage(void) { (void)fprintf(stderr, - "usage: nfsstat [-cemoszW] [-M core] [-N system] [-w wait]\n"); + "usage: nfsstat [-cemszW] [-M core] [-N system] [-w wait]\n"); exit(1); } static char SPBuf[64][8]; static int SPIndex; -char * +static char * sperc1(int hits, int misses) { char *p = SPBuf[SPIndex]; @@ -687,7 +387,7 @@ sperc1(int hits, int misses) return(p); } -char * +static char * sperc2(int ttl, int misses) { char *p = SPBuf[SPIndex]; @@ -705,7 +405,7 @@ sperc2(int ttl, int misses) /* * Print a description of the nfs stats for the experimental client/server. */ -void +static void exp_intpr(int clientOnly, int serverOnly) { int nfssvc_flag; @@ -961,7 +661,7 @@ exp_intpr(int clientOnly, int serverOnly * collected over that interval. Assumes that interval is non-zero. * First line printed at top of screen is always cumulative. */ -void +static void exp_sidewaysintpr(u_int interval, int clientOnly, int serverOnly) { struct ext_nfsstats nfsstats, lastst, *ext_nfsstatsp; @@ -1035,4 +735,3 @@ exp_sidewaysintpr(u_int interval, int cl } /*NOTREACHED*/ } - From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 14:53:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D4E43C8; Thu, 23 Apr 2015 14: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CB671885; Thu, 23 Apr 2015 14:53:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NErkaf011354; Thu, 23 Apr 2015 14:53:46 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NErk1t011353; Thu, 23 Apr 2015 14:53:46 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504231453.t3NErk1t011353@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 23 Apr 2015 14:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281889 - head/sys/dev/kbdmux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:53:46 -0000 Author: pfg Date: Thu Apr 23 14:53:45 2015 New Revision: 281889 URL: https://svnweb.freebsd.org/changeset/base/281889 Log: Plug memory leaks in kbdmux(4) Al kudos here for the Clang static analyzer which, unlike Coverity, failed to flag a false positive. Found by: clang static analyzer CID: 1007072 CID: 1007073 CID: 1007074 MFC after: 1 week Modified: head/sys/dev/kbdmux/kbdmux.c Modified: head/sys/dev/kbdmux/kbdmux.c ============================================================================== --- head/sys/dev/kbdmux/kbdmux.c Thu Apr 23 14:36:01 2015 (r281888) +++ head/sys/dev/kbdmux/kbdmux.c Thu Apr 23 14:53:45 2015 (r281889) @@ -472,6 +472,11 @@ kbdmux_init(int unit, keyboard_t **kbdp, KBDMUX_UNLOCK(state); } + if (needfree) { + free(accmap, M_KBDMUX); + free(fkeymap, M_KBDMUX); + free(keymap, M_KBDMUX); + } return (0); bad: if (needfree) { From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 14:58:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 410A668B; Thu, 23 Apr 2015 14:58:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EEAA18E2; Thu, 23 Apr 2015 14:58:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NEwe1F012178; Thu, 23 Apr 2015 14:58:40 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NEweEU012177; Thu, 23 Apr 2015 14:58:40 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504231458.t3NEweEU012177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 23 Apr 2015 14:58:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281890 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 14:58:40 -0000 Author: loos Date: Thu Apr 23 14:58:39 2015 New Revision: 281890 URL: https://svnweb.freebsd.org/changeset/base/281890 Log: Enable the watchdog on RPI2. The watchdog is used to reset the SoC on cpu_reset(). Without this, RPI2 will not reboot when asked to. Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2836.dtsi Thu Apr 23 14:53:45 2015 (r281889) +++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi Thu Apr 23 14:58:39 2015 (r281890) @@ -101,6 +101,12 @@ */ }; + watchdog0 { + compatible = "broadcom,bcm2835-wdt", + "broadcom,bcm2708-wdt"; + reg = <0x10001c 0x0c>; /* 0x1c, 0x20, 0x24 */ + }; + gpio: gpio { compatible = "broadcom,bcm2835-gpio", "broadcom,bcm2708-gpio"; From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 15:22:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96222373; Thu, 23 Apr 2015 15:22:05 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70CB91C49; Thu, 23 Apr 2015 15:22:05 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EBCEEB93B; Thu, 23 Apr 2015 11:22:03 -0400 (EDT) From: John Baldwin To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281888 - head/usr.bin/nfsstat Date: Thu, 23 Apr 2015 11:21:52 -0400 Message-ID: <10554184.33BWS7eSAa@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504231436.t3NEa2Vp001643@svn.freebsd.org> References: <201504231436.t3NEa2Vp001643@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 23 Apr 2015 11:22:04 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:22:05 -0000 On Thursday, April 23, 2015 02:36:02 PM Edward Tomasz Napierala wrote: > Author: trasz > Date: Thu Apr 23 14:36:01 2015 > New Revision: 281888 > URL: https://svnweb.freebsd.org/changeset/base/281888 > > Log: > Remove oldnfs support from nfsstat(1). > > Reviewed by: rmacklem@ (earlier version) > Sponsored by: The FreeBSD Foundation > > Modified: > head/usr.bin/nfsstat/nfsstat.1 > head/usr.bin/nfsstat/nfsstat.c It might be nice to rename the "new" datastructure names as well, so that ext_nfsstats would just be nfsstats. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 18:36:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90A547D3; Thu, 23 Apr 2015 18:36:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6512512B9; Thu, 23 Apr 2015 18:36:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NIabOW022284; Thu, 23 Apr 2015 18:36:37 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NIaaEk022281; Thu, 23 Apr 2015 18:36:36 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504231836.t3NIaaEk022281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 23 Apr 2015 18:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281899 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 18:36:37 -0000 Author: loos Date: Thu Apr 23 18:36:36 2015 New Revision: 281899 URL: https://svnweb.freebsd.org/changeset/base/281899 Log: Fix the gpio-leds node to match the LEDs on RPI2. The 'pwr' LED is connected to GPIO pin 35 (active high) and the 'act' LED is connected to GPIO pin 47 (active high). Remove the GPIO pin 47 from reserved pins list, previously it was used to signaling the SD Card presence and now it is used by act LED. Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi head/sys/boot/fdt/dts/arm/rpi2.dts Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2836.dtsi Thu Apr 23 15:26:07 2015 (r281898) +++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi Thu Apr 23 18:36:36 2015 (r281899) @@ -131,11 +131,11 @@ pinctrl-names = "default"; pinctrl-0 = <&pins_reserved>; - /* Pins that can short 3.3V to GND in output mode: 46-47 + /* Pins that can short 3.3V to GND in output mode: 46 * Pins used by VideoCore: 48-53 */ - broadcom,read-only = <46>, <47>, <48>, <49>, <50>, - <51>, <52>, <53>; + broadcom,read-only = <46>, <48>, <49>, <50>, + <51>, <52>, <53>; /* BSC0 */ pins_bsc0_a: bsc0_a { Modified: head/sys/boot/fdt/dts/arm/rpi2.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi2.dts Thu Apr 23 15:26:07 2015 (r281898) +++ head/sys/boot/fdt/dts/arm/rpi2.dts Thu Apr 23 18:36:36 2015 (r281899) @@ -322,18 +322,14 @@ leds { compatible = "gpio-leds"; - ok { - label = "ok"; - gpios = <&gpio 16 1>; - - /* Don't change this - it configures - * how the led driver determines if - * the led is on or off when it loads. - */ - default-state = "keep"; + pwr { + label = "pwr"; + gpios = <&gpio 35 0>; + }; - /* This is the real default state. */ - linux,default-trigger = "default-on"; + act { + label = "act"; + gpios = <&gpio 47 0>; }; }; From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 18:56:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2C8DBE0 for ; Thu, 23 Apr 2015 18:56:55 +0000 (UTC) Received: from nm14-vm10.bullet.mail.gq1.yahoo.com (nm14-vm10.bullet.mail.gq1.yahoo.com [98.136.218.186]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1A12151E for ; Thu, 23 Apr 2015 18:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429814992; bh=lz1Da5b/edlLLOHid6gbr9ijTz1FoXw2BgsG8g739sU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=lzRz8snVFXhH+5Pes0jL1DCGiB/hJ+8euUkLau3FZT0p29Zzyg8bMXAcf33yFqIpQiULEG85UqWErS2ydky/2VfT+GYLigJg5VANmlPG5/NWXJ4u6ERuw4AvXZilISyd6FLtOGBqwf3IzbDI46cQ9lK4nqaL1FtP4nnvjk6TbsstswWHgY+EczuE/iGGbp74+0rK3uKOiqbkCMagzoKQK2LkRjPxhv1+6tmoEOY7B5W3ry99OKOL3LXlDeBXye9XmdSiJ4peZXYEqMxz9mhxmuy+1SEjRH5ynB7oJL08LNsMMS1uknixMkUNHRkqm74YWMR8He8eP4WVy99Avuqjdg== Received: from [98.137.12.61] by nm14.bullet.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 18:49:52 -0000 Received: from [98.136.164.67] by tm6.bullet.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 18:49:52 -0000 Received: from [127.0.0.1] by smtp229.mail.gq1.yahoo.com with NNFMP; 23 Apr 2015 18:49:52 -0000 X-Yahoo-Newman-Id: 532243.9751.bm@smtp229.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Qqlf0.IVM1lICLnaEt3QOieQLHst7rMLH6hsUniG8M9btP6 4caWCJE9rdYDnRNPU8Dwddw2GH7C7BlgsXBzDE_SC6dE5UiCkpkaPiiuw8Pr po.BsywCAUftexncpUhHeJCZL964ZNwT.fLlNdCi8M5lOHwWJFqCkkOoHIVr bOrivGLIevjhEUIS.g7Bgc8.FB8nyAxiQDxyA24E5pD4JptVP8o0nNxxO9yx gBh98YtqeEM7KTC8iAvyTBCzuvodtD7Ov5DOXTRpjOi0fWMpGWrSzf7wioPp 5jK9qJ6QaSRV6w5vemfkjo4oA8851.Y4lqd8iaZww.7qXI008vGHY4r0WYYR zG_D34VIov.HerglUnHz_1TU9HjxBaTIFm8hREsSVz7kJ83hIcMQ.rCu6gN. S_GApKUDP8UCeLVo_MuXle0pSed8ljK6EW1Ebc.EUzrBO60Vi4kIyBTDp3MT sFIeaegHQ1WBGRCjxeWjrV43m2q1NO9AvbIc.oi_esVrf85fnJlWS2jrSQ2G spPjCGwUeqBt77fVUdzOTvsGm3EWQX3lyoflA0WNm X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> Date: Thu, 23 Apr 2015 12:49:51 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4E109480-FD27-4C7F-8B5F-B1DB2232CD3D@yahoo.com> References: <201504120621.t3C6LxAV095209@svn.freebsd.org> <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> To: Dmitry Chagin X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 18:56:56 -0000 > On Apr 23, 2015, at 6:19 AM, Scott Long wrote: >=20 >>=20 >> On Apr 12, 2015, at 12:21 AM, Dmitry Chagin = wrote: >>=20 >> Author: dchagin >> Date: Sun Apr 12 06:21:58 2015 >> New Revision: 281451 >> URL: https://svnweb.freebsd.org/changeset/base/281451 >>=20 >> Log: >> Rework r281162. Indeed, the flexible array member is preferable here. >>=20 >> Suggested by: Justin T. Gibbs >>=20 >> MFC after: 3 days >>=20 >> Modified: >> head/sys/vm/uma_core.c >> head/sys/vm/uma_int.h >=20 > There=E2=80=99s still something wrong with this. I have a machine = with 28 cores (56 with hyperthreading) and 256GB of RAM, and ever since = you committed r281162, it panics early in boot with a failed assertion. = It looks like the first few members of a uma_slab_t are getting = overwritten accidentally, and somehow the padding of the extra member in = the uma_zone_t was previously protecting it. I don=E2=80=99t know the = exact cause yet, but I must ask that you revert to r281161 in HEAD and = stable/10 until the problem is resolved. >=20 I think the problem is that the masterzone_k and masterzone_z objects = that are statically allocated in uma_core.c no longer have space for the = uz_cpu field, but uma_zalloc_arg() always assumes that it=E2=80=99s = there. Early in boot when the =E2=80=98kegs' and =E2=80=98zones=E2=80=99 = zones are being initialized, there=E2=80=99s only 1 CPU so = pre-allocating 1 uz_cpu element in the uma_zone is enough. I can=E2=80=99= t see any way around this without significantly changing how = uma_zalloc_arg() treats per-cpu caches. I think it=E2=80=99s best to = revert this change. Scott From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 19:29:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28A1D804; Thu, 23 Apr 2015 19:29:39 +0000 (UTC) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D72A0188C; Thu, 23 Apr 2015 19:29:37 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.1/8.15.1) with ESMTPS id t3NJSR8u019804 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Apr 2015 19:29:27 GMT (envelope-from dchagin@dchagin.static.corbina.net) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be dchagin.static.corbina.net Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.15.1/8.15.1) with ESMTPS id t3NJSJb8013214 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 Apr 2015 22:28:26 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.15.1/8.15.1/Submit) id t3NJSJn7013213; Thu, 23 Apr 2015 22:28:19 +0300 (MSK) (envelope-from dchagin) Date: Thu, 23 Apr 2015 22:28:19 +0300 From: Chagin Dmitry To: Scott Long Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281451 - head/sys/vm Message-ID: <20150423192819.GA13122@dchagin.static.corbina.net> References: <201504120621.t3C6LxAV095209@svn.freebsd.org> <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> <4E109480-FD27-4C7F-8B5F-B1DB2232CD3D@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E109480-FD27-4C7F-8B5F-B1DB2232CD3D@yahoo.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 19:29:39 -0000 On Thu, Apr 23, 2015 at 12:49:51PM -0600, Scott Long wrote: > > > On Apr 23, 2015, at 6:19 AM, Scott Long wrote: > > > >> > >> On Apr 12, 2015, at 12:21 AM, Dmitry Chagin wrote: > >> > >> Author: dchagin > >> Date: Sun Apr 12 06:21:58 2015 > >> New Revision: 281451 > >> URL: https://svnweb.freebsd.org/changeset/base/281451 > >> > >> Log: > >> Rework r281162. Indeed, the flexible array member is preferable here. > >> > >> Suggested by: Justin T. Gibbs > >> > >> MFC after: 3 days > >> > >> Modified: > >> head/sys/vm/uma_core.c > >> head/sys/vm/uma_int.h > > > > There???s still something wrong with this. I have a machine with 28 cores (56 with hyperthreading) and 256GB of RAM, and ever since you committed r281162, it panics early in boot with a failed assertion. It looks like the first few members of a uma_slab_t are getting overwritten accidentally, and somehow the padding of the extra member in the uma_zone_t was previously protecting it. I don???t know the exact cause yet, but I must ask that you revert to r281161 in HEAD and stable/10 until the problem is resolved. > > > > I think the problem is that the masterzone_k and masterzone_z objects that are statically allocated in uma_core.c no longer have space for the uz_cpu field, but uma_zalloc_arg() always assumes that it???s there. Early in boot when the ???kegs' and ???zones??? zones are being initialized, there???s only 1 CPU so pre-allocating 1 uz_cpu element in the uma_zone is enough. I can???t see any way around this without significantly changing how uma_zalloc_arg() treats per-cpu caches. I think it???s best to revert this change. > Hi, they initialized in uma_startup() and not used before. I have a private converstion with a man which stable/10 hangs in vm_mem_init().\ with my commit. weird. I do not object to revert, but give me a chance to figure out what's going on. -- Have fun! chd From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 19:50:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12C0ED75; Thu, 23 Apr 2015 19:50:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02DDC1ACA; Thu, 23 Apr 2015 19:50:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NJoMcr058934; Thu, 23 Apr 2015 19:50:22 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NJoMuF058933; Thu, 23 Apr 2015 19:50:22 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504231950.t3NJoMuF058933@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 23 Apr 2015 19:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281900 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 19:50:23 -0000 Author: loos Date: Thu Apr 23 19:50:22 2015 New Revision: 281900 URL: https://svnweb.freebsd.org/changeset/base/281900 Log: Now that we have an U-Boot for RPI2, do not use the static DTB compiled into the kernel, which is used mostly on early development stages. On RPI(2) the DTB is loaded and modified by firmware and then handed to kernel via U-Boot and ubldr. The RPI firmware adds (or modify) a few valuable data to the in memory DTB, like: - System memory; - Ethernet MAC address; - framebuffer settings; - Board serial and revision; - clock-frequency for most of devices. Modified: head/sys/arm/conf/RPI2 Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Thu Apr 23 18:36:36 2015 (r281899) +++ head/sys/arm/conf/RPI2 Thu Apr 23 19:50:22 2015 (r281900) @@ -137,6 +137,6 @@ device bcm2835_spi options FDT # Configure using FDT/DTB data # Note: DTB is normally loaded and modified by RPi boot loader, then # handed to kernel via U-Boot and ubldr. -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=rpi2.dts +#options FDT_DTB_STATIC +#makeoptions FDT_DTS_FILE=rpi2.dts makeoptions MODULES_EXTRA=dtb/rpi From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 19:53:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5F40FC8; Thu, 23 Apr 2015 19:53:21 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 614AC1BB2; Thu, 23 Apr 2015 19:53:21 +0000 (UTC) Received: by wicmx19 with SMTP id mx19so20089742wic.1; Thu, 23 Apr 2015 12:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=QTp3cF1ezHrUVzke+LxSXFn7m7tOqcGvqVw/Sc1F7+I=; b=B+jeq3wb4DAX4lymORgqAGlApd15dR9018F8c7oJIJxBpaq+JXxVhEQyqX8/g6jeAl kgcplnlOwMdBv8QUQzLHIHDWWfhOPEk1U1Y4EvMUzEgFWR9ZvDzVxbLtmTzM7kmWTcR9 548aOrXnbVi4S3vDmiyRuG3LEE1LnyfxQG4NcM4eLuzz2+XGEFrNM6i4TzKqRxfjOOow 9XhCj2gfibM1MdgzEp3YtpP/Eq0zJyBshDHtz+SiFpefsClvM0coHDVjlTOrLW/tdYyg AE2H2H8K+d1wZ5/iWCL2jk/RKOEoIn0NoIgaYr5beMHlrolr42e/xnK6GgLEvhL8MgdM RRKA== MIME-Version: 1.0 X-Received: by 10.194.78.49 with SMTP id y17mr8817222wjw.131.1429818799981; Thu, 23 Apr 2015 12:53:19 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.194.87.100 with HTTP; Thu, 23 Apr 2015 12:53:19 -0700 (PDT) In-Reply-To: <201504111851.t3BIpgRS071392@svn.freebsd.org> References: <201504111851.t3BIpgRS071392@svn.freebsd.org> Date: Thu, 23 Apr 2015 21:53:19 +0200 X-Google-Sender-Auth: KJfD8v9khcaI4m3dGc6QWP5LjMI Message-ID: Subject: Re: svn commit: r281442 - head/sys/kern From: Antoine Brodin To: Will Andrews Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 19:53:21 -0000 On Sat, Apr 11, 2015 at 8:51 PM, Will Andrews wrote: > Author: will > Date: Sat Apr 11 18:51:41 2015 > New Revision: 281442 > URL: https://svnweb.freebsd.org/changeset/base/281442 > > Log: > uiomove_object_page(): Avoid instantiating pages in sparse regions on reads. > > Check whether the page being requested is either resident or on swap. If > not, read from the zero_region instead of instantiating an unnecessary page. > > This avoids consuming memory for sparse files on tmpfs, when they are read > by applications that do not use SEEK_HOLE/SEEK_DATA (which is most of them). > > Reviewed by: kib > MFC after: 1 week > Sponsored by: Spectra Logic Hi, We have a daily panic on one of the package builders: https://reviews.freebsd.org/P60 Reverting this commit seems to fix the panic. Cheers, Antoine From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 20:08:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5BE9501; Thu, 23 Apr 2015 20:08:50 +0000 (UTC) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8164D1CEA; Thu, 23 Apr 2015 20:08:50 +0000 (UTC) Received: by igblo3 with SMTP id lo3so32834576igb.1; Thu, 23 Apr 2015 13:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=9BWQfHXjammrhgKlF9nT5qHNfIbpJXIvVel232th8Ug=; b=l815lW3y36ZneSvKlXS977AexkVCb1Ue4lleXNfmPE09kf/DIF2MWdEAWbF8l6DwIf JpXj12z6cw5rPg2gduJ93ivDq1U6RldwBuyu0s4GrjQRKEb2WHAZY/9Ok9TvgpupIPhR BMsBnhKISMrnsACvll0eGSsY0GYljyRiyshHSEZ5dGhLZTVtmMVYff4Bm3b9wKHoY9P3 QcQsCLfDBLNt/+Qm7JneyFaGKW6OcYIDC7Kqp9bWEVUXTatxnCKWHxqLFvn6vEeioeC4 S3GGpysxhcNZNZdr1BAeOx/Pb5Ue6JSRH5ewakaBhf9E8Qkthh54ABEB7apSCFSgEatx fzxA== X-Received: by 10.50.30.130 with SMTP id s2mr56220igh.11.1429819725521; Thu, 23 Apr 2015 13:08:45 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.48.3 with HTTP; Thu, 23 Apr 2015 13:08:24 -0700 (PDT) In-Reply-To: <201504231453.t3NErk1t011353@svn.freebsd.org> References: <201504231453.t3NErk1t011353@svn.freebsd.org> From: Ed Maste Date: Thu, 23 Apr 2015 16:08:24 -0400 X-Google-Sender-Auth: nW9FETCH3ID6199fxcYAdLVMn8I Message-ID: Subject: Re: svn commit: r281889 - head/sys/dev/kbdmux To: "Pedro F. Giffuni" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:08:50 -0000 On 23 April 2015 at 10:53, Pedro F. Giffuni wrote: > Author: pfg > Date: Thu Apr 23 14:53:45 2015 > New Revision: 281889 > URL: https://svnweb.freebsd.org/changeset/base/281889 accmap, fkeymap and keymap are passed to kbd_set_maps at line 1390. After r281889 kbd has references to these freed maps and the keyboard doesn't work. From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 20:26:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AA21943; Thu, 23 Apr 2015 20:26:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF0A91EBB; Thu, 23 Apr 2015 20:26:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NKQM0x076541; Thu, 23 Apr 2015 20:26:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NKQM9R076540; Thu, 23 Apr 2015 20:26:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504232026.t3NKQM9R076540@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 23 Apr 2015 20:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281901 - head/sys/dev/kbdmux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:26:23 -0000 Author: emaste Date: Thu Apr 23 20:26:22 2015 New Revision: 281901 URL: https://svnweb.freebsd.org/changeset/base/281901 Log: Revert r281889, it broke keyboard input Modified: head/sys/dev/kbdmux/kbdmux.c Modified: head/sys/dev/kbdmux/kbdmux.c ============================================================================== --- head/sys/dev/kbdmux/kbdmux.c Thu Apr 23 19:50:22 2015 (r281900) +++ head/sys/dev/kbdmux/kbdmux.c Thu Apr 23 20:26:22 2015 (r281901) @@ -472,11 +472,6 @@ kbdmux_init(int unit, keyboard_t **kbdp, KBDMUX_UNLOCK(state); } - if (needfree) { - free(accmap, M_KBDMUX); - free(fkeymap, M_KBDMUX); - free(keymap, M_KBDMUX); - } return (0); bad: if (needfree) { From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 20:28:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE70AAB5; Thu, 23 Apr 2015 20:28:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C2561EDC; Thu, 23 Apr 2015 20:28:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NKSveW076921; Thu, 23 Apr 2015 20:28:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NKSvgg076919; Thu, 23 Apr 2015 20:28:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232028.t3NKSvgg076919@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 20:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281902 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:28:57 -0000 Author: andrew Date: Thu Apr 23 20:28:56 2015 New Revision: 281902 URL: https://svnweb.freebsd.org/changeset/base/281902 Log: Update the ODROIDC1 and VSATV102 to reduce the diff to the other armv6 kernel config files. Modified: head/sys/arm/conf/ODROIDC1 head/sys/arm/conf/VSATV102 Modified: head/sys/arm/conf/ODROIDC1 ============================================================================== --- head/sys/arm/conf/ODROIDC1 Thu Apr 23 20:26:22 2015 (r281901) +++ head/sys/arm/conf/ODROIDC1 Thu Apr 23 20:28:56 2015 (r281902) @@ -1,7 +1,7 @@ # ODROIDC1 -- Custom configuration for the HardKernel ODROID-C1 SBC # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -19,50 +19,60 @@ ident ODROIDC1 -include "../amlogic/aml8726/std.odroidc1" +include "../amlogic/aml8726/std.odroidc1" -options HZ=100 -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options LINUX_BOOT_ABI -options VFP # vfp/neon +options HZ=100 +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options LINUX_BOOT_ABI +options VFP # Enable floating point hardware support # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options BOOTVERBOSE=1 -options KDB -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options BOOTVERBOSE=1 +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -#options NFSCL # New Network Filesystem Client -#options NFSLOCKD # Network Lock Manager -#options NFS_ROOT # NFS usable as /, requires NFSCL - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -70,12 +80,12 @@ options WITNESS_SKIPSPIN # Don't run wi #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=axe0 -# MMC/SD/SDIO card slot support +# MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" +options ROOTDEVNAME=\"ufs:mmcsd0s2\" # GPIO device gpio @@ -107,8 +117,8 @@ device bpf # Berkeley packet filter # USB support device usb # General USB code (mandatory for USB) device dwcotg # DWC OTG controller -options USB_HOST_ALIGN=64 # Cacheline size is 64 -options USB_DEBUG +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE @@ -125,9 +135,9 @@ device miibus # MII bus support # SoC Ethernet, requires miibus device dwc -# USB Ethernet, requires miibus +# USB Ethernet support, requires miibus device axe # ASIX Electronics USB Ethernet # Flattened Device Tree -options FDT -options FDT_DTB_STATIC +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC Modified: head/sys/arm/conf/VSATV102 ============================================================================== --- head/sys/arm/conf/VSATV102 Thu Apr 23 20:26:22 2015 (r281901) +++ head/sys/arm/conf/VSATV102 Thu Apr 23 20:28:56 2015 (r281902) @@ -1,7 +1,7 @@ # VSATV102 -- Custom configuration for the Visson ATV-102 media player # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # @@ -17,52 +17,62 @@ # # $FreeBSD$ -ident VSATV102 +ident ODROIDC1 -include "../amlogic/aml8726/std.vsatv102-m6" +include "../amlogic/aml8726/std.vsatv102-m6" -options HZ=100 -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options LINUX_BOOT_ABI -options VFP # vfp/neon +options HZ=100 +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options LINUX_BOOT_ABI +options VFP # Enable floating point hardware support # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options BOOTVERBOSE=1 -options KDB -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options BOOTVERBOSE=1 +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -#options NFSCL # New Network Filesystem Client -#options NFSLOCKD # Network Lock Manager -#options NFS_ROOT # NFS usable as /, requires NFSCL - # NFS root from boopt/dhcp #options BOOTP #options BOOTP_NFSROOT @@ -70,12 +80,12 @@ options WITNESS_SKIPSPIN # Don't run wi #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=axe0 -# MMC/SD/SDIO card slot support +# MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" +options ROOTDEVNAME=\"ufs:mmcsd0s2\" # GPIO device gpio @@ -107,8 +117,8 @@ device bpf # Berkeley packet filter # USB support device usb # General USB code (mandatory for USB) device dwcotg # DWC OTG controller -options USB_HOST_ALIGN=64 # Cacheline size is 64 -options USB_DEBUG +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE @@ -125,9 +135,9 @@ device miibus # MII bus support # SoC Ethernet, requires miibus device dwc -# USB Ethernet, requires miibus +# USB Ethernet support, requires miibus device axe # ASIX Electronics USB Ethernet # Flattened Device Tree -options FDT -options FDT_DTB_STATIC +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 20:36:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 503B9DD8 for ; Thu, 23 Apr 2015 20:36:09 +0000 (UTC) Received: from nm2-vm1.bullet.mail.bf1.yahoo.com (nm2-vm1.bullet.mail.bf1.yahoo.com [98.139.213.158]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3E591FCD for ; Thu, 23 Apr 2015 20:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429821361; bh=oNVS3JE+pZEFzU1BdHg41Jtep7QVFXG2gfzKJPt3PPA=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=huy1yKhFNh0xmLE+BrsU06E4IkrmT8RvB3rns6lExprgyR2DqV6UX61Ff9QL/RE1nys8NGolPwcjodIaox9BSwMAgsintJamdLYWwA+iSdGMQ8MsGVwoytEjKafK1PelPKu7Y0CJ9WJBHzM2eoPv01dG+svoyHJsFkv7S2ll7YhDot7R8bidFMIJaN5FHKJlcVlYrkOccNsCKnQtIhv6CyOiOZB26GmgQPdfx9zZVk1Ft4CUNwUWZDvNVRuQhivzsNC67xUuLcgcU06Q3IbLknK2VYnopXiPgxocVZHdL/Lhi/4HPUzKyb5vrfh440Xs9RG4qYomIqOeqhXxlY72PQ== Received: from [98.139.214.32] by nm2.bullet.mail.bf1.yahoo.com with NNFMP; 23 Apr 2015 20:36:01 -0000 Received: from [68.142.230.64] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 23 Apr 2015 20:36:01 -0000 Received: from [127.0.0.1] by smtp221.mail.bf1.yahoo.com with NNFMP; 23 Apr 2015 20:36:01 -0000 X-Yahoo-Newman-Id: 664158.68205.bm@smtp221.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: MWJ2KnMVM1mjqkgpTWwo0TX6vdD4PfklXV9Xy_ot_I8.xA9 7bWp_H_mykqB5MfH4VCsvk0OLbV5DJd5wdMhPzBh2NW2Af5ZfrUGrMaZrTbY 3OnqtbJq62.YfKUl3MXpulFoJsjIusqSsn005LCaleu6sBT.9356oJwjyacq 2DKz7H.O2br_uVAfyIA004RIqKhgSFYnV1VVdMZSzrn.P9QrBG6SPUswRRR. gXoPoDgXXAwtslxUepsw_KQuR848n86KF0rSCrw6vOXg6iZWm8C0qgj3JOLH vRn157dUumKVtBQ5WZALsFQ.ws7IyuFjxt5l86sGH7pxjEYDdT1WSNlZWct. dEEKxXSXxOxu9d9dK2QHjSofA9sCG4zgzPcbS7b2gU2eorY1aj47r6d4UKd7 CT4a5yWfmcGopDndaEXHHUYy598VjsIcLMFWs6QLExh1dl_3p_KVxUefu5ny RuEQ4GTI3RxkIZErTgHdpfT7ZUOlqIdGkTjshCpvsnfDRKEaTZhb.kJU0SDo cyisABG1wPxduw9B8RPJ6ZvyZihk.Pk1w X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <553957B6.4020304@FreeBSD.org> Date: Thu, 23 Apr 2015 15:36:06 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281901 - head/sys/dev/kbdmux References: <201504232026.t3NKQM9R076540@svn.freebsd.org> In-Reply-To: <201504232026.t3NKQM9R076540@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:36:09 -0000 Thank you! On 04/23/15 15:26, Ed Maste wrote: > Author: emaste > Date: Thu Apr 23 20:26:22 2015 > New Revision: 281901 > URL: https://svnweb.freebsd.org/changeset/base/281901 > > Log: > Revert r281889, it broke keyboard input > > Modified: > head/sys/dev/kbdmux/kbdmux.c For the record: I did test the patch and my keyboard is still working. Pedro. From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 20:39:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05E03B0; Thu, 23 Apr 2015 20:39:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D03B61FEF; Thu, 23 Apr 2015 20:39:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NKdfmi082772; Thu, 23 Apr 2015 20:39:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NKdfss082769; Thu, 23 Apr 2015 20:39:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232039.t3NKdfss082769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 20:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281903 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:39:42 -0000 Author: andrew Date: Thu Apr 23 20:39:40 2015 New Revision: 281903 URL: https://svnweb.freebsd.org/changeset/base/281903 Log: - Move files selected in files.smp to files.aml8726 and remove it. - Remove a redundant file from files.aml8726 Deleted: head/sys/arm/amlogic/aml8726/files.smp Modified: head/sys/arm/amlogic/aml8726/files.aml8726 head/sys/arm/amlogic/aml8726/std.odroidc1 head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Modified: head/sys/arm/amlogic/aml8726/files.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/files.aml8726 Thu Apr 23 20:28:56 2015 (r281902) +++ head/sys/arm/amlogic/aml8726/files.aml8726 Thu Apr 23 20:39:40 2015 (r281903) @@ -4,12 +4,13 @@ kern/kern_clocksource.c standard arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard -arm/arm/bus_space_asm_generic.S standard +arm/arm/gic.c standard arm/arm/pl310.c standard arm/amlogic/aml8726/aml8726_l2cache.c standard arm/amlogic/aml8726/aml8726_machdep.c standard +arm/amlogic/aml8726/aml8726_mp.c optional smp arm/amlogic/aml8726/aml8726_identsoc.c standard arm/amlogic/aml8726/aml8726_ccm.c standard arm/amlogic/aml8726/aml8726_clkmsr.c standard Modified: head/sys/arm/amlogic/aml8726/std.odroidc1 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.odroidc1 Thu Apr 23 20:28:56 2015 (r281902) +++ head/sys/arm/amlogic/aml8726/std.odroidc1 Thu Apr 23 20:39:40 2015 (r281903) @@ -5,7 +5,6 @@ include "../amlogic/aml8726/std.aml8726 makeoptions FDT_DTS_FILE=odroidc1.dts options SMP # Enable multiple cores -files "../amlogic/aml8726/files.smp" # Physical memory starts at 0x00000000. We assume the kernel is loaded # at 0x00100000 by u-boot (which doesn't support ubldr since it's missing Modified: head/sys/arm/amlogic/aml8726/std.vsatv102-m6 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Thu Apr 23 20:28:56 2015 (r281902) +++ head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Thu Apr 23 20:39:40 2015 (r281903) @@ -5,7 +5,6 @@ include "../amlogic/aml8726/std.aml8726 makeoptions FDT_DTS_FILE=vsatv102-m6.dts options SMP # Enable multiple cores -files "../amlogic/aml8726/files.smp" # Physical memory starts at 0x80000000. We assume the kernel is loaded # at 0x80100000 by u-boot (which doesn't support ubldr since it's missing From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 20:43:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E1B125F; Thu, 23 Apr 2015 20:43:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8B6610BA; Thu, 23 Apr 2015 20:43:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NKhPkG086932; Thu, 23 Apr 2015 20:43:25 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NKhPsT086929; Thu, 23 Apr 2015 20:43:25 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232043.t3NKhPsT086929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 20:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281904 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:43:26 -0000 Author: andrew Date: Thu Apr 23 20:43:24 2015 New Revision: 281904 URL: https://svnweb.freebsd.org/changeset/base/281904 Log: Move KERNVIRTADDR to the common std.aml8726. Modified: head/sys/arm/amlogic/aml8726/std.aml8726 head/sys/arm/amlogic/aml8726/std.odroidc1 head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Modified: head/sys/arm/amlogic/aml8726/std.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.aml8726 Thu Apr 23 20:39:40 2015 (r281903) +++ head/sys/arm/amlogic/aml8726/std.aml8726 Thu Apr 23 20:43:24 2015 (r281904) @@ -4,6 +4,15 @@ cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" +# Physical memory starts at 0x80000000. We assume the kernel is loaded +# at 0x80100000 by u-boot (which doesn't support ubldr since it's missing +# CONFIG_API). The kernel must be supplied as a binary since u-boot is +# also missing CONFIG_CMD_ELF. +# +# +options KERNVIRTADDR=0xc0100000 # Used in ldscript.arm +makeoptions KERNVIRTADDR=0xc0100000 + device fdt_pinctrl files "../amlogic/aml8726/files.aml8726" Modified: head/sys/arm/amlogic/aml8726/std.odroidc1 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.odroidc1 Thu Apr 23 20:39:40 2015 (r281903) +++ head/sys/arm/amlogic/aml8726/std.odroidc1 Thu Apr 23 20:43:24 2015 (r281904) @@ -5,12 +5,3 @@ include "../amlogic/aml8726/std.aml8726 makeoptions FDT_DTS_FILE=odroidc1.dts options SMP # Enable multiple cores - -# Physical memory starts at 0x00000000. We assume the kernel is loaded -# at 0x00100000 by u-boot (which doesn't support ubldr since it's missing -# CONFIG_API). The kernel must be supplied as a binary since u-boot is -# also missing CONFIG_CMD_ELF. -# -# -options KERNVIRTADDR=0xc0100000 # Used in ldscript.arm -makeoptions KERNVIRTADDR=0xc0100000 Modified: head/sys/arm/amlogic/aml8726/std.vsatv102-m6 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Thu Apr 23 20:39:40 2015 (r281903) +++ head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Thu Apr 23 20:43:24 2015 (r281904) @@ -5,12 +5,3 @@ include "../amlogic/aml8726/std.aml8726 makeoptions FDT_DTS_FILE=vsatv102-m6.dts options SMP # Enable multiple cores - -# Physical memory starts at 0x80000000. We assume the kernel is loaded -# at 0x80100000 by u-boot (which doesn't support ubldr since it's missing -# CONFIG_API). The kernel must be supplied as a binary since u-boot is -# also missing CONFIG_CMD_ELF. -# -# -options KERNVIRTADDR=0xc0100000 # Used in ldscript.arm -makeoptions KERNVIRTADDR=0xc0100000 From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 20:53:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FFBF6D7; Thu, 23 Apr 2015 20:53:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15F8411CA; Thu, 23 Apr 2015 20:53:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NKrTN3092198; Thu, 23 Apr 2015 20:53:29 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NKrTow092196; Thu, 23 Apr 2015 20:53:29 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232053.t3NKrTow092196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 20:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281905 - in head/sys/arm: amlogic/aml8726 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 20:53:30 -0000 Author: andrew Date: Thu Apr 23 20:53:29 2015 New Revision: 281905 URL: https://svnweb.freebsd.org/changeset/base/281905 Log: Remove the need for board specific std files on aml8726 by moving the options they set to the main kernel config. Deleted: head/sys/arm/amlogic/aml8726/std.odroidc1 head/sys/arm/amlogic/aml8726/std.vsatv102-m6 Modified: head/sys/arm/conf/ODROIDC1 head/sys/arm/conf/VSATV102 Modified: head/sys/arm/conf/ODROIDC1 ============================================================================== --- head/sys/arm/conf/ODROIDC1 Thu Apr 23 20:43:24 2015 (r281904) +++ head/sys/arm/conf/ODROIDC1 Thu Apr 23 20:53:29 2015 (r281905) @@ -19,7 +19,7 @@ ident ODROIDC1 -include "../amlogic/aml8726/std.odroidc1" +include "../amlogic/aml8726/std.aml8726" options HZ=100 options SCHED_ULE # ULE scheduler @@ -56,6 +56,7 @@ options KBD_INSTALL_CDEV # install a CD options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) options LINUX_BOOT_ABI options VFP # Enable floating point hardware support +options SMP # Enable multiple cores # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols @@ -141,3 +142,4 @@ device axe # ASIX Electronics USB Eth # Flattened Device Tree options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=odroidc1.dts Modified: head/sys/arm/conf/VSATV102 ============================================================================== --- head/sys/arm/conf/VSATV102 Thu Apr 23 20:43:24 2015 (r281904) +++ head/sys/arm/conf/VSATV102 Thu Apr 23 20:53:29 2015 (r281905) @@ -19,7 +19,7 @@ ident ODROIDC1 -include "../amlogic/aml8726/std.vsatv102-m6" +include "../amlogic/aml8726/std.aml8726" options HZ=100 options SCHED_ULE # ULE scheduler @@ -56,6 +56,7 @@ options KBD_INSTALL_CDEV # install a CD options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) options LINUX_BOOT_ABI options VFP # Enable floating point hardware support +options SMP # Enable multiple cores # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols @@ -141,3 +142,4 @@ device axe # ASIX Electronics USB Eth # Flattened Device Tree options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=vsatv102-m6.dts From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 21:31:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B2FD23D; Thu, 23 Apr 2015 21:31:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A29C168D; Thu, 23 Apr 2015 21:31:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NLV7ax012685; Thu, 23 Apr 2015 21:31:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NLV6q5012680; Thu, 23 Apr 2015 21:31:06 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232131.t3NLV6q5012680@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 21:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281906 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 21:31:07 -0000 Author: andrew Date: Thu Apr 23 21:31:06 2015 New Revision: 281906 URL: https://svnweb.freebsd.org/changeset/base/281906 Log: Pull out the common parts of the ODROIDC1 and VSATV102 kernels to a new kernel config. This also removes the per-board config files from universe. Added: head/sys/arm/conf/AML8726 (contents, props changed) Modified: head/sys/arm/conf/ODROIDC1 head/sys/arm/conf/VSATV102 Added: head/sys/arm/conf/AML8726 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/AML8726 Thu Apr 23 21:31:06 2015 (r281906) @@ -0,0 +1,143 @@ +# +# Kernel configuration for Amlogic aml8726 boards. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident AML8726 +include "../amlogic/aml8726/std.aml8726" + +options HZ=100 +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options LINUX_BOOT_ABI +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores + +# Debugging +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options ALT_BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options BOOTVERBOSE=1 +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=axe0 + +# MMC/SD/SDIO Card slot support +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards + +# Boot device is 2nd slice on MMC/SD card +options ROOTDEVNAME=\"ufs:mmcsd0s2\" + +# GPIO +device gpio +device gpioled + +# I2C support +device iicbus +device iicbb +device iic + +# vt is the default console driver, resembling an SCO console +device vt +#device kbdmux + +# Serial (COM) ports +device uart # Generic UART driver + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device pty # BSD-style compatibility pseudo ttys + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# USB support +device usb # General USB code (mandatory for USB) +device dwcotg # DWC OTG controller +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE + +#device ukbd # USB keyboard +#device ums # USB mouse + +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device umass # Disks/Mass storage - Requires scbus and da + +# Ethernet support +device miibus # MII bus support + +# SoC Ethernet, requires miibus +device dwc + +# USB Ethernet support, requires miibus +device axe # ASIX Electronics USB Ethernet + +# Flattened Device Tree +options FDT # Configure using FDT/DTB data Modified: head/sys/arm/conf/ODROIDC1 ============================================================================== --- head/sys/arm/conf/ODROIDC1 Thu Apr 23 20:53:29 2015 (r281905) +++ head/sys/arm/conf/ODROIDC1 Thu Apr 23 21:31:06 2015 (r281906) @@ -17,129 +17,10 @@ # # $FreeBSD$ -ident ODROIDC1 - -include "../amlogic/aml8726/std.aml8726" - -options HZ=100 -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -options QUOTA # Enable disk quotas for UFS -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options TMPFS # Efficient memory filesystem -options GEOM_PART_GPT # GUID Partition Tables -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) -options LINUX_BOOT_ABI -options VFP # Enable floating point hardware support -options SMP # Enable multiple cores - -# Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options BOOTVERBOSE=1 -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - -# NFS root from boopt/dhcp -#options BOOTP -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=axe0 - -# MMC/SD/SDIO Card slot support -device mmc # mmc/sd bus -device mmcsd # mmc/sd flash cards - -# Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" - -# GPIO -device gpio -device gpioled - -# I2C support -device iicbus -device iicbb -device iic - -# vt is the default console driver, resembling an SCO console -device vt -#device kbdmux +#NO_UNIVERSE -# Serial (COM) ports -device uart # Generic UART driver - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -device pty # BSD-style compatibility pseudo ttys - -# The `bpf' device enables the Berkeley Packet Filter. -# Be aware of the administrative consequences of enabling this! -# Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter - -# USB support -device usb # General USB code (mandatory for USB) -device dwcotg # DWC OTG controller -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE - -#device ukbd # USB keyboard -#device ums # USB mouse - -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device umass # Disks/Mass storage - Requires scbus and da - -# Ethernet support -device miibus # MII bus support - -# SoC Ethernet, requires miibus -device dwc - -# USB Ethernet support, requires miibus -device axe # ASIX Electronics USB Ethernet +include "AML8726" +ident ODROIDC1 -# Flattened Device Tree -options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=odroidc1.dts Modified: head/sys/arm/conf/VSATV102 ============================================================================== --- head/sys/arm/conf/VSATV102 Thu Apr 23 20:53:29 2015 (r281905) +++ head/sys/arm/conf/VSATV102 Thu Apr 23 21:31:06 2015 (r281906) @@ -17,129 +17,10 @@ # # $FreeBSD$ -ident ODROIDC1 +#NO_UNIVERSE -include "../amlogic/aml8726/std.aml8726" +include "AML8726" +ident VSATV102 -options HZ=100 -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -options QUOTA # Enable disk quotas for UFS -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options TMPFS # Efficient memory filesystem -options GEOM_PART_GPT # GUID Partition Tables -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) -options LINUX_BOOT_ABI -options VFP # Enable floating point hardware support -options SMP # Enable multiple cores - -# Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options BOOTVERBOSE=1 -options KDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options DIAGNOSTIC - -# NFS root from boopt/dhcp -#options BOOTP -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=axe0 - -# MMC/SD/SDIO Card slot support -device mmc # mmc/sd bus -device mmcsd # mmc/sd flash cards - -# Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" - -# GPIO -device gpio -device gpioled - -# I2C support -device iicbus -device iicbb -device iic - -# vt is the default console driver, resembling an SCO console -device vt -#device kbdmux - -# Serial (COM) ports -device uart # Generic UART driver - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -device pty # BSD-style compatibility pseudo ttys - -# The `bpf' device enables the Berkeley Packet Filter. -# Be aware of the administrative consequences of enabling this! -# Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter - -# USB support -device usb # General USB code (mandatory for USB) -device dwcotg # DWC OTG controller -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE - -#device ukbd # USB keyboard -#device ums # USB mouse - -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device umass # Disks/Mass storage - Requires scbus and da - -# Ethernet support -device miibus # MII bus support - -# SoC Ethernet, requires miibus -device dwc - -# USB Ethernet support, requires miibus -device axe # ASIX Electronics USB Ethernet - -# Flattened Device Tree -options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=vsatv102-m6.dts From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 21:39:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38356478; Thu, 23 Apr 2015 21:39:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27AC016F6; Thu, 23 Apr 2015 21:39:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NLdXEL014345; Thu, 23 Apr 2015 21:39:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NLdWkh014343; Thu, 23 Apr 2015 21:39:32 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232139.t3NLdWkh014343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 21:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281907 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 21:39:33 -0000 Author: andrew Date: Thu Apr 23 21:39:32 2015 New Revision: 281907 URL: https://svnweb.freebsd.org/changeset/base/281907 Log: Reduce the diff between files.imx51 and files.imx53 Modified: head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Thu Apr 23 21:31:06 2015 (r281906) +++ head/sys/arm/freescale/imx/files.imx51 Thu Apr 23 21:39:32 2015 (r281907) @@ -9,9 +9,12 @@ arm/freescale/imx/imx_machdep.c standar arm/freescale/imx/imx51_machdep.c standard arm/arm/bus_space_base.c standard -# Dummy serial console +# Special serial console for debuging early boot code #arm/freescale/imx/console.c standard +# UART driver (includes serial console support) +dev/uart/uart_dev_imx.c optional uart + # TrustZone Interrupt Controller arm/freescale/imx/tzic.c standard @@ -30,9 +33,6 @@ arm/freescale/imx/imx51_ccm.c standard # i.MX5xx PATA controller dev/ata/chipsets/ata-fsl.c optional imxata -# UART driver -dev/uart/uart_dev_imx.c optional uart - # USB OH3 controller (1 OTG, 3 EHCI) arm/freescale/imx/imx_nop_usbphy.c optional ehci dev/usb/controller/ehci_imx.c optional ehci Modified: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Thu Apr 23 21:31:06 2015 (r281906) +++ head/sys/arm/freescale/imx/files.imx53 Thu Apr 23 21:39:32 2015 (r281907) @@ -13,7 +13,7 @@ arm/arm/bus_space_base.c standard #arm/freescale/imx/console.c standard # UART driver (includes serial console support) -dev/uart/uart_dev_imx.c optional uart +dev/uart/uart_dev_imx.c optional uart # TrustZone Interrupt Controller arm/freescale/imx/tzic.c standard From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 21:43:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0891F6E6; Thu, 23 Apr 2015 21:43:27 +0000 (UTC) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 7F00917B8; Thu, 23 Apr 2015 21:43:25 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2D7AwC/ZjlV/95baINbg15hgxXDCwmBUYYEAoFvFAEBAQEBAQGBCoQhAQEEI1YbDgYEAgINGQJZBog+DbdclGUBAQEBAQEBAQEBAQEBAQEBAQEBFQSBIYoWhFA0B4JogUUFkSWEJodWg0WQZCOEECKBdYEAAQEB X-IronPort-AV: E=Sophos;i="5.11,634,1422939600"; d="scan'208";a="207649980" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-annu.net.uoguelph.ca with ESMTP; 23 Apr 2015 17:43:17 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 090D5B402F; Thu, 23 Apr 2015 17:43:17 -0400 (EDT) Date: Thu, 23 Apr 2015 17:43:17 -0400 (EDT) From: Rick Macklem To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Edward Tomasz Napierala Message-ID: <720283503.24818611.1429825397025.JavaMail.root@uoguelph.ca> In-Reply-To: <10554184.33BWS7eSAa@ralph.baldwin.cx> Subject: Re: svn commit: r281888 - head/usr.bin/nfsstat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.95.12] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 21:43:27 -0000 John Baldwin wrote: > On Thursday, April 23, 2015 02:36:02 PM Edward Tomasz Napierala > wrote: > > Author: trasz > > Date: Thu Apr 23 14:36:01 2015 > > New Revision: 281888 > > URL: https://svnweb.freebsd.org/changeset/base/281888 > > > > Log: > > Remove oldnfs support from nfsstat(1). > > > > Reviewed by: rmacklem@ (earlier version) > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/usr.bin/nfsstat/nfsstat.1 > > head/usr.bin/nfsstat/nfsstat.c > > It might be nice to rename the "new" datastructure names as well, so > that > ext_nfsstats would just be nfsstats. > Actually, I hope to soon add a new revision of "nfsstats", so that the "iostat like stats" can be supported (D1626) and also make all the fields uint64_t, so they don't wrap. Maybe I can all that one "nfsstats"? ;-) Btw, if you have a suggestion for the best way to acquire this new structure from the kernel, please let me know. (I was planning on code that would copy this new one to ext_nfsstats when it is acquired by an old binary.) rick > -- > John Baldwin > > From owner-svn-src-head@FreeBSD.ORG Thu Apr 23 22:20:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD88E7C8; Thu, 23 Apr 2015 22:20:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB88D1B4C; Thu, 23 Apr 2015 22:20:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NMKjE3037091; Thu, 23 Apr 2015 22:20:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NMKhDX036421; Thu, 23 Apr 2015 22:20:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504232220.t3NMKhDX036421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 23 Apr 2015 22:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281909 - in head/sys: arm/conf arm/freescale/imx conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 22:20:46 -0000 Author: andrew Date: Thu Apr 23 22:20:43 2015 New Revision: 281909 URL: https://svnweb.freebsd.org/changeset/base/281909 Log: Add the SOC_IMX51, SOC_IMX53, and SOC_IMX6 options. These are used to select which SoCs the kernel config will support. Use these options to merge files.imx51 and files.imx53. Added: head/sys/arm/freescale/imx/files.imx5 - copied, changed from r281907, head/sys/arm/freescale/imx/files.imx53 Deleted: head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 Modified: head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/IMX53 head/sys/arm/conf/IMX6 head/sys/arm/freescale/imx/std.imx51 head/sys/arm/freescale/imx/std.imx53 head/sys/conf/options.arm Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/arm/conf/EFIKA_MX Thu Apr 23 22:20:43 2015 (r281909) @@ -24,6 +24,8 @@ include "../freescale/imx/std.imx51" makeoptions WITHOUT_MODULES="ahc" +options SOC_IMX51 + options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/arm/conf/IMX53 Thu Apr 23 22:20:43 2015 (r281909) @@ -22,6 +22,8 @@ ident IMX53 include "../freescale/imx/std.imx53" +options SOC_IMX53 + options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/arm/conf/IMX6 Thu Apr 23 22:20:43 2015 (r281909) @@ -21,6 +21,8 @@ ident IMX6 include "../freescale/imx/std.imx6" +options SOC_IMX6 + options HZ=500 # Scheduling quantum is 2 milliseconds. options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption Copied and modified: head/sys/arm/freescale/imx/files.imx5 (from r281907, head/sys/arm/freescale/imx/files.imx53) ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Thu Apr 23 21:39:32 2015 (r281907, copy source) +++ head/sys/arm/freescale/imx/files.imx5 Thu Apr 23 22:20:43 2015 (r281909) @@ -6,7 +6,8 @@ kern/kern_clocksource.c standard # Init arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard -arm/freescale/imx/imx53_machdep.c standard +arm/freescale/imx/imx51_machdep.c optional soc_imx51 +arm/freescale/imx/imx53_machdep.c optional soc_imx53 arm/arm/bus_space_base.c standard # Special serial console for debuging early boot code Modified: head/sys/arm/freescale/imx/std.imx51 ============================================================================== --- head/sys/arm/freescale/imx/std.imx51 Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/arm/freescale/imx/std.imx51 Thu Apr 23 22:20:43 2015 (r281909) @@ -13,5 +13,4 @@ options PHYSADDR=0x90000000 device fdt_pinctrl -files "../freescale/imx/files.imx51" - +files "../freescale/imx/files.imx5" Modified: head/sys/arm/freescale/imx/std.imx53 ============================================================================== --- head/sys/arm/freescale/imx/std.imx53 Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/arm/freescale/imx/std.imx53 Thu Apr 23 22:20:43 2015 (r281909) @@ -13,5 +13,4 @@ options PHYSADDR=0x70000000 device fdt_pinctrl -files "../freescale/imx/files.imx53" - +files "../freescale/imx/files.imx5" Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Thu Apr 23 22:06:02 2015 (r281908) +++ head/sys/conf/options.arm Thu Apr 23 22:20:43 2015 (r281909) @@ -40,6 +40,9 @@ PV_STATS opt_pmap.h QEMU_WORKAROUNDS opt_global.h SOC_BCM2835 opt_global.h SOC_BCM2836 opt_global.h +SOC_IMX51 opt_global.h +SOC_IMX53 opt_global.h +SOC_IMX6 opt_global.h SOC_MV_ARMADAXP opt_global.h SOC_MV_DISCOVERY opt_global.h SOC_MV_DOVE opt_global.h From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 03:17:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D90EB85B; Fri, 24 Apr 2015 03:17:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAABB1889; Fri, 24 Apr 2015 03:17:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O3HMf2083782; Fri, 24 Apr 2015 03:17:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O3HL0v083778; Fri, 24 Apr 2015 03:17:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504240317.t3O3HL0v083778@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2015 03:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281915 - in head: share/man/man9 sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 03:17:23 -0000 Author: markj Date: Fri Apr 24 03:17:21 2015 New Revision: 281915 URL: https://svnweb.freebsd.org/changeset/base/281915 Log: Make vpanic() externally visible so that it can be called as part of the DTrace panic() action. Differential Revision: https://reviews.freebsd.org/D2349 Reviewed by: avg MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man9/Makefile head/share/man/man9/panic.9 head/sys/kern/kern_shutdown.c head/sys/sys/systm.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Fri Apr 24 02:43:02 2015 (r281914) +++ head/share/man/man9/Makefile Fri Apr 24 03:17:21 2015 (r281915) @@ -1135,6 +1135,7 @@ MLINKS+=osd.9 osd_call.9 \ osd.9 osd_get.9 \ osd.9 osd_register.9 \ osd.9 osd_set.9 +MLINKS+=panic.9 vpanic.9 MLINKS+=pbuf.9 getpbuf.9 \ pbuf.9 relpbuf.9 \ pbuf.9 trypbuf.9 Modified: head/share/man/man9/panic.9 ============================================================================== --- head/share/man/man9/panic.9 Fri Apr 24 02:43:02 2015 (r281914) +++ head/share/man/man9/panic.9 Fri Apr 24 03:17:21 2015 (r281915) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 11, 1995 +.Dd April 23, 2015 .Dt PANIC 9 .Os .Sh NAME @@ -42,10 +42,14 @@ .In sys/systm.h .Ft void .Fn panic "const char *fmt" ... +.Ft void +.Fn vpanic "const char *fmt" "va_list ap" .Sh DESCRIPTION The .Fn panic -function terminates the running system. +and +.Fn vpanic +functions terminate the running system. The message .Fa fmt is a Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Fri Apr 24 02:43:02 2015 (r281914) +++ head/sys/kern/kern_shutdown.c Fri Apr 24 03:17:21 2015 (r281915) @@ -154,7 +154,6 @@ static void poweroff_wait(void *, int); static void shutdown_halt(void *junk, int howto); static void shutdown_panic(void *junk, int howto); static void shutdown_reset(void *junk, int howto); -static void vpanic(const char *fmt, va_list ap) __dead2; /* register various local shutdown events */ static void @@ -676,7 +675,7 @@ panic(const char *fmt, ...) vpanic(fmt, ap); } -static void +void vpanic(const char *fmt, va_list ap) { #ifdef SMP Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Fri Apr 24 02:43:02 2015 (r281914) +++ head/sys/sys/systm.h Fri Apr 24 03:17:21 2015 (r281915) @@ -187,6 +187,7 @@ void *phashinit(int count, struct malloc void g_waitidle(void); void panic(const char *, ...) __dead2 __printflike(1, 2); +void vpanic(const char *, __va_list) __dead2 __printflike(1, 0); void cpu_boot(int); void cpu_flush_dcache(void *, size_t); From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 03:19:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CE4D9B7; Fri, 24 Apr 2015 03:19:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68CEB189C; Fri, 24 Apr 2015 03:19:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O3JWVl084135; Fri, 24 Apr 2015 03:19:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O3JUNe084124; Fri, 24 Apr 2015 03:19:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504240319.t3O3JUNe084124@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2015 03:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281916 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace dev/dtrace dev/dtrace/amd64 dev/dtrace/arm dev/dtrace/i386 dev/dtrace/mips dev/dtrace/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 03:19:32 -0000 Author: markj Date: Fri Apr 24 03:19:30 2015 New Revision: 281916 URL: https://svnweb.freebsd.org/changeset/base/281916 Log: Fix DTrace's panic() action. It would previously call into some unfinished Solaris compatibility code and return without actually calling panic(9). The compatibility code is unneeded, however, so just remove it and have dtrace_panic() call vpanic(9) directly. Differential Revision: https://reviews.freebsd.org/D2349 Reviewed by: avg MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S head/sys/cddl/dev/dtrace/arm/dtrace_asm.S head/sys/cddl/dev/dtrace/dtrace_hacks.c head/sys/cddl/dev/dtrace/i386/dtrace_asm.S head/sys/cddl/dev/dtrace/mips/dtrace_asm.S head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Apr 24 03:19:30 2015 (r281916) @@ -611,7 +611,11 @@ dtrace_panic(const char *format, ...) va_list alist; va_start(alist, format); +#ifdef __FreeBSD__ + vpanic(format, alist); +#else dtrace_vpanic(format, alist); +#endif va_end(alist); } Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S Fri Apr 24 03:19:30 2015 (r281916) @@ -363,211 +363,3 @@ dtrace_interrupt_enable(dtrace_icookie_t popfq ret END(dtrace_interrupt_enable) - -/* - * The panic() and cmn_err() functions invoke vpanic() as a common entry point - * into the panic code implemented in panicsys(). vpanic() is responsible - * for passing through the format string and arguments, and constructing a - * regs structure on the stack into which it saves the current register - * values. If we are not dying due to a fatal trap, these registers will - * then be preserved in panicbuf as the current processor state. Before - * invoking panicsys(), vpanic() activates the first panic trigger (see - * common/os/panic.c) and switches to the panic_stack if successful. Note that - * DTrace takes a slightly different panic path if it must panic from probe - * context. Instead of calling panic, it calls into dtrace_vpanic(), which - * sets up the initial stack as vpanic does, calls dtrace_panic_trigger(), and - * branches back into vpanic(). - */ - -/* -void -vpanic(const char *format, va_list alist) -*/ - ENTRY(vpanic) /* Initial stack layout: */ - - pushq %rbp /* | %rip | 0x60 */ - movq %rsp, %rbp /* | %rbp | 0x58 */ - pushfq /* | rfl | 0x50 */ - pushq %r11 /* | %r11 | 0x48 */ - pushq %r10 /* | %r10 | 0x40 */ - pushq %rbx /* | %rbx | 0x38 */ - pushq %rax /* | %rax | 0x30 */ - pushq %r9 /* | %r9 | 0x28 */ - pushq %r8 /* | %r8 | 0x20 */ - pushq %rcx /* | %rcx | 0x18 */ - pushq %rdx /* | %rdx | 0x10 */ - pushq %rsi /* | %rsi | 0x8 alist */ - pushq %rdi /* | %rdi | 0x0 format */ - - movq %rsp, %rbx /* %rbx = current %rsp */ - - leaq panic_quiesce(%rip), %rdi /* %rdi = &panic_quiesce */ - call panic_trigger /* %eax = panic_trigger() */ - -vpanic_common: - /* - * The panic_trigger result is in %eax from the call above, and - * dtrace_panic places it in %eax before branching here. - * The rdmsr instructions that follow below will clobber %eax so - * we stash the panic_trigger result in %r11d. - */ - movl %eax, %r11d - cmpl $0, %r11d - je 0f - - /* - * If panic_trigger() was successful, we are the first to initiate a - * panic: we now switch to the reserved panic_stack before continuing. - */ - leaq panic_stack(%rip), %rsp - addq $PANICSTKSIZE, %rsp -0: subq $REGSIZE, %rsp - /* - * Now that we've got everything set up, store the register values as - * they were when we entered vpanic() to the designated location in - * the regs structure we allocated on the stack. - */ -#ifdef notyet - movq 0x0(%rbx), %rcx - movq %rcx, REGOFF_RDI(%rsp) - movq 0x8(%rbx), %rcx - movq %rcx, REGOFF_RSI(%rsp) - movq 0x10(%rbx), %rcx - movq %rcx, REGOFF_RDX(%rsp) - movq 0x18(%rbx), %rcx - movq %rcx, REGOFF_RCX(%rsp) - movq 0x20(%rbx), %rcx - - movq %rcx, REGOFF_R8(%rsp) - movq 0x28(%rbx), %rcx - movq %rcx, REGOFF_R9(%rsp) - movq 0x30(%rbx), %rcx - movq %rcx, REGOFF_RAX(%rsp) - movq 0x38(%rbx), %rcx - movq %rcx, REGOFF_RBX(%rsp) - movq 0x58(%rbx), %rcx - - movq %rcx, REGOFF_RBP(%rsp) - movq 0x40(%rbx), %rcx - movq %rcx, REGOFF_R10(%rsp) - movq 0x48(%rbx), %rcx - movq %rcx, REGOFF_R11(%rsp) - movq %r12, REGOFF_R12(%rsp) - - movq %r13, REGOFF_R13(%rsp) - movq %r14, REGOFF_R14(%rsp) - movq %r15, REGOFF_R15(%rsp) - - xorl %ecx, %ecx - movw %ds, %cx - movq %rcx, REGOFF_DS(%rsp) - movw %es, %cx - movq %rcx, REGOFF_ES(%rsp) - movw %fs, %cx - movq %rcx, REGOFF_FS(%rsp) - movw %gs, %cx - movq %rcx, REGOFF_GS(%rsp) - - movq $0, REGOFF_TRAPNO(%rsp) - - movq $0, REGOFF_ERR(%rsp) - leaq vpanic(%rip), %rcx - movq %rcx, REGOFF_RIP(%rsp) - movw %cs, %cx - movzwq %cx, %rcx - movq %rcx, REGOFF_CS(%rsp) - movq 0x50(%rbx), %rcx - movq %rcx, REGOFF_RFL(%rsp) - movq %rbx, %rcx - addq $0x60, %rcx - movq %rcx, REGOFF_RSP(%rsp) - movw %ss, %cx - movzwq %cx, %rcx - movq %rcx, REGOFF_SS(%rsp) - - /* - * panicsys(format, alist, rp, on_panic_stack) - */ - movq REGOFF_RDI(%rsp), %rdi /* format */ - movq REGOFF_RSI(%rsp), %rsi /* alist */ - movq %rsp, %rdx /* struct regs */ - movl %r11d, %ecx /* on_panic_stack */ - call panicsys - addq $REGSIZE, %rsp -#endif - popq %rdi - popq %rsi - popq %rdx - popq %rcx - popq %r8 - popq %r9 - popq %rax - popq %rbx - popq %r10 - popq %r11 - popfq - leave - ret - END(vpanic) - -/* -void -dtrace_vpanic(const char *format, va_list alist) -*/ - ENTRY(dtrace_vpanic) /* Initial stack layout: */ - - pushq %rbp /* | %rip | 0x60 */ - movq %rsp, %rbp /* | %rbp | 0x58 */ - pushfq /* | rfl | 0x50 */ - pushq %r11 /* | %r11 | 0x48 */ - pushq %r10 /* | %r10 | 0x40 */ - pushq %rbx /* | %rbx | 0x38 */ - pushq %rax /* | %rax | 0x30 */ - pushq %r9 /* | %r9 | 0x28 */ - pushq %r8 /* | %r8 | 0x20 */ - pushq %rcx /* | %rcx | 0x18 */ - pushq %rdx /* | %rdx | 0x10 */ - pushq %rsi /* | %rsi | 0x8 alist */ - pushq %rdi /* | %rdi | 0x0 format */ - - movq %rsp, %rbx /* %rbx = current %rsp */ - - leaq panic_quiesce(%rip), %rdi /* %rdi = &panic_quiesce */ - call dtrace_panic_trigger /* %eax = dtrace_panic_trigger() */ - jmp vpanic_common - - END(dtrace_vpanic) - -/* -int -panic_trigger(int *tp) -*/ - ENTRY(panic_trigger) - xorl %eax, %eax - movl $0xdefacedd, %edx - lock - xchgl %edx, (%rdi) - cmpl $0, %edx - je 0f - movl $0, %eax - ret -0: movl $1, %eax - ret - END(panic_trigger) - -/* -int -dtrace_panic_trigger(int *tp) -*/ - ENTRY(dtrace_panic_trigger) - xorl %eax, %eax - movl $0xdefacedd, %edx - lock - xchgl %edx, (%rdi) - cmpl $0, %edx - je 0f - movl $0, %eax - ret -0: movl $1, %eax - ret - END(dtrace_panic_trigger) Modified: head/sys/cddl/dev/dtrace/arm/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/arm/dtrace_asm.S Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/arm/dtrace_asm.S Fri Apr 24 03:19:30 2015 (r281916) @@ -170,24 +170,6 @@ ENTRY(dtrace_copystr) END(dtrace_copystr) /* -void -vpanic(const char *format, va_list alist) -*/ -ENTRY(vpanic) /* Initial stack layout: */ -vpanic_common: - RET -END(vpanic) - -/* -void -dtrace_vpanic(const char *format, va_list alist) -*/ -ENTRY(dtrace_vpanic) /* Initial stack layout: */ - b vpanic - RET -END(dtrace_vpanic) /* Initial stack layout: */ - -/* uintptr_t dtrace_caller(int aframes) */ Modified: head/sys/cddl/dev/dtrace/dtrace_hacks.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_hacks.c Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/dtrace_hacks.c Fri Apr 24 03:19:30 2015 (r281916) @@ -3,9 +3,6 @@ dtrace_cacheid_t dtrace_predcache_id; -int panic_quiesce; -char panic_stack[PANICSTKSIZE]; - boolean_t priv_policy_only(const cred_t *a, int b, boolean_t c) { Modified: head/sys/cddl/dev/dtrace/i386/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/i386/dtrace_asm.S Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/i386/dtrace_asm.S Fri Apr 24 03:19:30 2015 (r281916) @@ -355,167 +355,3 @@ void dtrace_interrupt_enable(dtrace_icoo popfl ret END(dtrace_interrupt_enable) - -/* - * The panic() and cmn_err() functions invoke vpanic() as a common entry point - * into the panic code implemented in panicsys(). vpanic() is responsible - * for passing through the format string and arguments, and constructing a - * regs structure on the stack into which it saves the current register - * values. If we are not dying due to a fatal trap, these registers will - * then be preserved in panicbuf as the current processor state. Before - * invoking panicsys(), vpanic() activates the first panic trigger (see - * common/os/panic.c) and switches to the panic_stack if successful. Note that - * DTrace takes a slightly different panic path if it must panic from probe - * context. Instead of calling panic, it calls into dtrace_vpanic(), which - * sets up the initial stack as vpanic does, calls dtrace_panic_trigger(), and - * branches back into vpanic(). - */ -/* -void vpanic(const char *format, va_list alist) -*/ - ENTRY(vpanic) /* Initial stack layout: */ - - pushl %ebp /* | %eip | 20 */ - movl %esp, %ebp /* | %ebp | 16 */ - pushl %eax /* | %eax | 12 */ - pushl %ebx /* | %ebx | 8 */ - pushl %ecx /* | %ecx | 4 */ - pushl %edx /* | %edx | 0 */ - - movl %esp, %ebx /* %ebx = current stack pointer */ - - lea panic_quiesce, %eax /* %eax = &panic_quiesce */ - pushl %eax /* push &panic_quiesce */ - call panic_trigger /* %eax = panic_trigger() */ - addl $4, %esp /* reset stack pointer */ - -vpanic_common: - cmpl $0, %eax /* if (%eax == 0) */ - je 0f /* goto 0f; */ - - /* - * If panic_trigger() was successful, we are the first to initiate a - * panic: we now switch to the reserved panic_stack before continuing. - */ - lea panic_stack, %esp /* %esp = panic_stack */ - addl $PANICSTKSIZE, %esp /* %esp += PANICSTKSIZE */ - -0: subl $REGSIZE, %esp /* allocate struct regs */ - - /* - * Now that we've got everything set up, store the register values as - * they were when we entered vpanic() to the designated location in - * the regs structure we allocated on the stack. - */ -#ifdef notyet - mov %gs, %edx - mov %edx, REGOFF_GS(%esp) - mov %fs, %edx - mov %edx, REGOFF_FS(%esp) - mov %es, %edx - mov %edx, REGOFF_ES(%esp) - mov %ds, %edx - mov %edx, REGOFF_DS(%esp) - movl %edi, REGOFF_EDI(%esp) - movl %esi, REGOFF_ESI(%esp) - movl 16(%ebx), %ecx - movl %ecx, REGOFF_EBP(%esp) - movl %ebx, %ecx - addl $20, %ecx - movl %ecx, REGOFF_ESP(%esp) - movl 8(%ebx), %ecx - movl %ecx, REGOFF_EBX(%esp) - movl 0(%ebx), %ecx - movl %ecx, REGOFF_EDX(%esp) - movl 4(%ebx), %ecx - movl %ecx, REGOFF_ECX(%esp) - movl 12(%ebx), %ecx - movl %ecx, REGOFF_EAX(%esp) - movl $0, REGOFF_TRAPNO(%esp) - movl $0, REGOFF_ERR(%esp) - lea vpanic, %ecx - movl %ecx, REGOFF_EIP(%esp) - mov %cs, %edx - movl %edx, REGOFF_CS(%esp) - pushfl - popl %ecx - movl %ecx, REGOFF_EFL(%esp) - movl $0, REGOFF_UESP(%esp) - mov %ss, %edx - movl %edx, REGOFF_SS(%esp) - - movl %esp, %ecx /* %ecx = ®s */ - pushl %eax /* push on_panic_stack */ - pushl %ecx /* push ®s */ - movl 12(%ebp), %ecx /* %ecx = alist */ - pushl %ecx /* push alist */ - movl 8(%ebp), %ecx /* %ecx = format */ - pushl %ecx /* push format */ - call panicsys /* panicsys(); */ - addl $16, %esp /* pop arguments */ - - addl $REGSIZE, %esp -#endif - popl %edx - popl %ecx - popl %ebx - popl %eax - leave - ret - END(vpanic) - -/* -void dtrace_vpanic(const char *format, va_list alist) -*/ - ENTRY(dtrace_vpanic) /* Initial stack layout: */ - - pushl %ebp /* | %eip | 20 */ - movl %esp, %ebp /* | %ebp | 16 */ - pushl %eax /* | %eax | 12 */ - pushl %ebx /* | %ebx | 8 */ - pushl %ecx /* | %ecx | 4 */ - pushl %edx /* | %edx | 0 */ - - movl %esp, %ebx /* %ebx = current stack pointer */ - - lea panic_quiesce, %eax /* %eax = &panic_quiesce */ - pushl %eax /* push &panic_quiesce */ - call dtrace_panic_trigger /* %eax = dtrace_panic_trigger() */ - addl $4, %esp /* reset stack pointer */ - jmp vpanic_common /* jump back to common code */ - - END(dtrace_vpanic) - -/* -int -panic_trigger(int *tp) -*/ - ENTRY(panic_trigger) - xorl %eax, %eax - movl $0xdefacedd, %edx - lock - xchgl %edx, (%edi) - cmpl $0, %edx - je 0f - movl $0, %eax - ret -0: movl $1, %eax - ret - END(panic_trigger) - -/* -int -dtrace_panic_trigger(int *tp) -*/ - ENTRY(dtrace_panic_trigger) - xorl %eax, %eax - movl $0xdefacedd, %edx - lock - xchgl %edx, (%edi) - cmpl $0, %edx - je 0f - movl $0, %eax - ret -0: movl $1, %eax - ret - END(dtrace_panic_trigger) Modified: head/sys/cddl/dev/dtrace/mips/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/mips/dtrace_asm.S Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/mips/dtrace_asm.S Fri Apr 24 03:19:30 2015 (r281916) @@ -249,49 +249,6 @@ LEAF(dtrace_invop_uninit) END(dtrace_invop_uninit) /* - * The panic() and cmn_err() functions invoke vpanic() as a common entry point - * into the panic code implemented in panicsys(). vpanic() is responsible - * for passing through the format string and arguments, and constructing a - * regs structure on the stack into which it saves the current register - * values. If we are not dying due to a fatal trap, these registers will - * then be preserved in panicbuf as the current processor state. Before - * invoking panicsys(), vpanic() activates the first panic trigger (see - * common/os/panic.c) and switches to the panic_stack if successful. Note that - * DTrace takes a slightly different panic path if it must panic from probe - * context. Instead of calling panic, it calls into dtrace_vpanic(), which - * sets up the initial stack as vpanic does, calls dtrace_panic_trigger(), and - * branches back into vpanic(). - */ - -/* -void -vpanic(const char *format, va_list alist) -*/ -LEAF(vpanic) /* Initial stack layout: */ - -vpanic_common: - j ra - nop -END(vpanic) - - - -/* -void -dtrace_vpanic(const char *format, va_list alist) -*/ -LEAF(dtrace_vpanic) /* Initial stack layout: */ - -#if 0 - jal dtrace_panic_trigger /* %eax = dtrace_panic_trigger() */ - nop -#endif - j vpanic_common - nop - -END(dtrace_vpanic) - -/* uintptr_t dtrace_caller(int aframes) */ @@ -300,4 +257,3 @@ LEAF(dtrace_caller) j ra nop END(dtrace_caller) - Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Fri Apr 24 03:17:21 2015 (r281915) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Fri Apr 24 03:19:30 2015 (r281916) @@ -161,45 +161,6 @@ ASENTRY_NOPROF(dtrace_copystr) END(dtrace_copystr) /* - * The panic() and cmn_err() functions invoke vpanic() as a common entry point - * into the panic code implemented in panicsys(). vpanic() is responsible - * for passing through the format string and arguments, and constructing a - * regs structure on the stack into which it saves the current register - * values. If we are not dying due to a fatal trap, these registers will - * then be preserved in panicbuf as the current processor state. Before - * invoking panicsys(), vpanic() activates the first panic trigger (see - * common/os/panic.c) and switches to the panic_stack if successful. Note that - * DTrace takes a slightly different panic path if it must panic from probe - * context. Instead of calling panic, it calls into dtrace_vpanic(), which - * sets up the initial stack as vpanic does, calls dtrace_panic_trigger(), and - * branches back into vpanic(). - */ - -/* -void -vpanic(const char *format, va_list alist) -*/ -ASENTRY_NOPROF(vpanic) /* Initial stack layout: */ - -vpanic_common: - blr -END(vpanic) - - - -/* -void -dtrace_vpanic(const char *format, va_list alist) -*/ -ASENTRY_NOPROF(dtrace_vpanic) /* Initial stack layout: */ - -#if 0 - bl dtrace_panic_trigger /* %eax = dtrace_panic_trigger() */ -#endif - b vpanic_common -END(dtrace_vpanic) - -/* uintptr_t dtrace_caller(int aframes) */ @@ -207,4 +168,3 @@ ASENTRY_NOPROF(dtrace_caller) li %r3, -1 blr END(dtrace_caller) - From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 03:23:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38F38B1D; Fri, 24 Apr 2015 03:23:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DB0D1960; Fri, 24 Apr 2015 03:23:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O3NfZ2088328; Fri, 24 Apr 2015 03:23:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O3NfSf088327; Fri, 24 Apr 2015 03:23:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504240323.t3O3NfSf088327@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2015 03:23:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281917 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 03:23:42 -0000 Author: markj Date: Fri Apr 24 03:23:41 2015 New Revision: 281917 URL: https://svnweb.freebsd.org/changeset/base/281917 Log: Add _.arm64.* to the svn:ignore property for head/. Modified: Directory Properties: head/ (props changed) From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 04:57:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53BF1B87; Fri, 24 Apr 2015 04:57:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 431FA11C7; Fri, 24 Apr 2015 04:57:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O4vJa0033642; Fri, 24 Apr 2015 04:57:19 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O4vJ47033641; Fri, 24 Apr 2015 04:57:19 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201504240457.t3O4vJ47033641@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 24 Apr 2015 04:57:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281918 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 04:57:19 -0000 Author: kevlo Date: Fri Apr 24 04:57:18 2015 New Revision: 281918 URL: https://svnweb.freebsd.org/changeset/base/281918 Log: - Fix the length of efuse content. - Replace the magic numbers with something more readable. Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Fri Apr 24 03:23:41 2015 (r281917) +++ head/sys/dev/usb/wlan/if_urtwn.c Fri Apr 24 04:57:18 2015 (r281918) @@ -1236,9 +1236,11 @@ urtwn_efuse_read(struct urtwn_softc *sc) static void urtwn_efuse_switch_power(struct urtwn_softc *sc) { - uint8_t vol; uint32_t reg; + if (sc->chip & URTWN_CHIP_88E) + urtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_ON); + reg = urtwn_read_2(sc, R92C_SYS_ISO_CTRL); if (!(reg & R92C_SYS_ISO_CTRL_PWC_EV12V)) { urtwn_write_2(sc, R92C_SYS_ISO_CTRL, @@ -1256,11 +1258,15 @@ urtwn_efuse_switch_power(struct urtwn_so reg | R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M); } - /* Enable LDO 2.5V. */ - vol = urtwn_read_1(sc, R92C_EFUSE_TEST + 3); - vol &= 0x0f; - vol |= 0x30; - urtwn_write_1(sc, R92C_EFUSE_TEST + 3, (vol | 0x80)); + if (!(sc->chip & URTWN_CHIP_88E)) { + uint8_t vol; + + /* Enable LDO 2.5V. */ + vol = urtwn_read_1(sc, R92C_EFUSE_TEST + 3); + vol &= 0x0f; + vol |= 0x30; + urtwn_write_1(sc, R92C_EFUSE_TEST + 3, (vol | 0x80)); + } } static int @@ -1328,7 +1334,7 @@ urtwn_r88e_read_rom(struct urtwn_softc * /* Read full ROM image. */ memset(&sc->r88e_rom, 0xff, sizeof(sc->r88e_rom)); - while (addr < 1024) { + while (addr < 512) { reg = urtwn_efuse_read_1(sc, addr); if (reg == 0xff) break; @@ -1354,6 +1360,8 @@ urtwn_r88e_read_rom(struct urtwn_softc * } } + urtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_OFF); + addr = 0x10; for (i = 0; i < 6; i++) sc->cck_tx_pwr[i] = sc->r88e_rom[addr++]; @@ -2193,14 +2201,12 @@ urtwn_r92c_power_on(struct urtwn_softc * static int urtwn_r88e_power_on(struct urtwn_softc *sc) { - uint8_t val; uint32_t reg; int ntries; /* Wait for power ready bit. */ for (ntries = 0; ntries < 5000; ntries++) { - val = urtwn_read_1(sc, 0x6) & 0x2; - if (val == 0x2) + if (urtwn_read_4(sc, R92C_APS_FSMCO) & R92C_APS_FSMCO_SUS_HOST) break; urtwn_ms_delay(sc); } @@ -2215,17 +2221,23 @@ urtwn_r88e_power_on(struct urtwn_softc * urtwn_read_1(sc, R92C_SYS_FUNC_EN) & ~(R92C_SYS_FUNC_EN_BBRSTB | R92C_SYS_FUNC_EN_BB_GLB_RST)); - urtwn_write_1(sc, 0x26, urtwn_read_1(sc, 0x26) | 0x80); + urtwn_write_1(sc, R92C_AFE_XTAL_CTRL + 2, + urtwn_read_1(sc, R92C_AFE_XTAL_CTRL + 2) | 0x80); /* Disable HWPDN. */ - urtwn_write_1(sc, 0x5, urtwn_read_1(sc, 0x5) & ~0x80); + urtwn_write_2(sc, R92C_APS_FSMCO, + urtwn_read_2(sc, R92C_APS_FSMCO) & ~R92C_APS_FSMCO_APDM_HPDN); /* Disable WL suspend. */ - urtwn_write_1(sc, 0x5, urtwn_read_1(sc, 0x5) & ~0x18); + urtwn_write_2(sc, R92C_APS_FSMCO, + urtwn_read_2(sc, R92C_APS_FSMCO) & + ~(R92C_APS_FSMCO_AFSM_HSUS | R92C_APS_FSMCO_AFSM_PCIE)); - urtwn_write_1(sc, 0x5, urtwn_read_1(sc, 0x5) | 0x1); + urtwn_write_2(sc, R92C_APS_FSMCO, + urtwn_read_2(sc, R92C_APS_FSMCO) | R92C_APS_FSMCO_APFM_ONMAC); for (ntries = 0; ntries < 5000; ntries++) { - if (!(urtwn_read_1(sc, 0x5) & 0x1)) + if (!(urtwn_read_2(sc, R92C_APS_FSMCO) & + R92C_APS_FSMCO_APFM_ONMAC)) break; urtwn_ms_delay(sc); } @@ -2233,7 +2245,8 @@ urtwn_r88e_power_on(struct urtwn_softc * return (ETIMEDOUT); /* Enable LDO normal mode. */ - urtwn_write_1(sc, 0x23, urtwn_read_1(sc, 0x23) & ~0x10); + urtwn_write_1(sc, R92C_LPLDO_CTRL, + urtwn_read_1(sc, R92C_LPLDO_CTRL) & ~0x10); /* Enable MAC DMA/WMAC/SCHEDULE/SEC blocks. */ urtwn_write_2(sc, R92C_CR, 0); From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 05:00:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E08EF45; Fri, 24 Apr 2015 05:00:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D64E1202; Fri, 24 Apr 2015 05:00:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O50wHA036447; Fri, 24 Apr 2015 05:00:58 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O50wlq036425; Fri, 24 Apr 2015 05:00:58 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201504240500.t3O50wlq036425@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 24 Apr 2015 05:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281919 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 05:00:58 -0000 Author: kevlo Date: Fri Apr 24 05:00:57 2015 New Revision: 281919 URL: https://svnweb.freebsd.org/changeset/base/281919 Log: Plural fix. Modified: head/share/man/man4/urtwn.4 Modified: head/share/man/man4/urtwn.4 ============================================================================== --- head/share/man/man4/urtwn.4 Fri Apr 24 04:57:18 2015 (r281918) +++ head/share/man/man4/urtwn.4 Fri Apr 24 05:00:57 2015 (r281919) @@ -52,7 +52,7 @@ The driver supports USB 2.0 wireless network devices based on Realtek RTL8188CUS, RTL8188CE-VAU, RTL8188EUS, RTL8188RU and RTL8192CU chipsets. .Pp -The RTL8188CUS and RTL8188EUS are highly integrated 802.11n adapter that +The RTL8188CUS and RTL8188EUS are highly integrated 802.11n adapters that combine a MAC, a 1T1R capable baseband and an RF in a single chip. They operate in the 2GHz spectrum only. The RTL8188RU is a high-power variant of the RTL8188CUS. From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 05:27:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F215A5FD for ; Fri, 24 Apr 2015 05:27:05 +0000 (UTC) Received: from nm18-vm2.bullet.mail.gq1.yahoo.com (nm18-vm2.bullet.mail.gq1.yahoo.com [98.136.217.217]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCFB81504 for ; Fri, 24 Apr 2015 05:27:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429853218; bh=QxFoRR8yb6O49E8K5pMCQZQo3dm8gNnj/ahtKlaLysc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=Au4P903x4xhCnUnCwHDpX+z8Evj23FSLdLGyXSAusXimofuF9ryfVfg7Mm0OM4M34RYa/XKi10FUKCyQ51HAfl90pevhtYLRVzs7SLgf4Tc7gkWo3RAzsy3TN1booLrgk13wQ1ZOxHYVGssSDW+C9h454KI2SWzD1vrqGlJ7gQBePfD5L26WKhOWq+Hgz9zI1nqn0bXRzxWro1v8QrkGQcJh+XKnpM87pbbqkA38uzp6whu5eup6CXwNRbNmMPkdy6srahMYFia5N/duUA+hsM7bTDfFbGkqoCkw4L16s6RYSJnxq3j8RTFBYewnnUFvMr2JLXc5Gmo5mWUut24Amw== Received: from [98.137.12.189] by nm18.bullet.mail.gq1.yahoo.com with NNFMP; 24 Apr 2015 05:26:58 -0000 Received: from [208.71.42.200] by tm10.bullet.mail.gq1.yahoo.com with NNFMP; 24 Apr 2015 05:26:58 -0000 Received: from [127.0.0.1] by smtp211.mail.gq1.yahoo.com with NNFMP; 24 Apr 2015 05:26:58 -0000 X-Yahoo-Newman-Id: 473614.4371.bm@smtp211.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: e0FFuP8VM1kq1zSJx1m31DfNsFK5AAd7Zaa2gdeO6A.IWn3 KJNMgS9p5XzSLyqs2jPzkq2WUdxR0.tt5djquR0zErA3Evhnj8mnS8QV5c4i yY1oCYYO8cxNJ9oMvo8qxph28O.egTcDv18K1hEMZKfnzwTSl.lCDHZeyU6s yMrCVB8os.8v9.YK6FamobSjDg8fheNeCPRy9kCPz_zbyVOHHgeeqq4j1Qbr p5B8WgO87ZjIXr4dTuWGqnYI.nFAg3rvjWHmokIRkdZlS90cqldNJ2moAKXO oBX2SZul6N73CMx1JKjJ.I_DjPGH3_.gO_HyEScYasD0_CMNjIS223hEpIb2 DVZfYNpP_OjWWGYuY.5BARoJJI6QAMMUlQK_cRKGg2M4AJi39KGRw3W9vVxZ q1bno9je8t.yiaWCUGZE0lPkZdB_usuWdYshnroVGJYAvIMcJHf1rQ5xXXhL xl71dQMlTvUxGGbJAmF58xVxRIFdXE6VJpV7AUE3lUWavLDcDKgN.7wLkerN 4F8_J3FesHRo6t2wg.kAMnq5Hic5K3fxUFWgpsXC_ X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: <20150423192819.GA13122@dchagin.static.corbina.net> Date: Thu, 23 Apr 2015 23:26:55 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201504120621.t3C6LxAV095209@svn.freebsd.org> <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> <4E109480-FD27-4C7F-8B5F-B1DB2232CD3D@yahoo.com> <20150423192819.GA13122@dchagin.static.corbina.net> To: Chagin Dmitry X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 05:27:06 -0000 > On Apr 23, 2015, at 1:28 PM, Chagin Dmitry = wrote: >=20 > On Thu, Apr 23, 2015 at 12:49:51PM -0600, Scott Long wrote: >>=20 >>> On Apr 23, 2015, at 6:19 AM, Scott Long = wrote: >>>=20 >>>>=20 >>>> On Apr 12, 2015, at 12:21 AM, Dmitry Chagin = wrote: >>>>=20 >>>> Author: dchagin >>>> Date: Sun Apr 12 06:21:58 2015 >>>> New Revision: 281451 >>>> URL: https://svnweb.freebsd.org/changeset/base/281451 >>>>=20 >>>> Log: >>>> Rework r281162. Indeed, the flexible array member is preferable = here. >>>>=20 >>>> Suggested by: Justin T. Gibbs >>>>=20 >>>> MFC after: 3 days >>>>=20 >>>> Modified: >>>> head/sys/vm/uma_core.c >>>> head/sys/vm/uma_int.h >>>=20 >>> There???s still something wrong with this. I have a machine with 28 = cores (56 with hyperthreading) and 256GB of RAM, and ever since you = committed r281162, it panics early in boot with a failed assertion. It = looks like the first few members of a uma_slab_t are getting overwritten = accidentally, and somehow the padding of the extra member in the = uma_zone_t was previously protecting it. I don???t know the exact cause = yet, but I must ask that you revert to r281161 in HEAD and stable/10 = until the problem is resolved. >>>=20 >>=20 >> I think the problem is that the masterzone_k and masterzone_z objects = that are statically allocated in uma_core.c no longer have space for the = uz_cpu field, but uma_zalloc_arg() always assumes that it???s there. = Early in boot when the ???kegs' and ???zones??? zones are being = initialized, there???s only 1 CPU so pre-allocating 1 uz_cpu element in = the uma_zone is enough. I can???t see any way around this without = significantly changing how uma_zalloc_arg() treats per-cpu caches. I = think it???s best to revert this change. >>=20 > Hi, > they initialized in uma_startup() and not used before. > I have a private converstion with a man which stable/10 hangs in = vm_mem_init().\ > with my commit. weird. >=20 > I do not object to revert, but give me a chance to figure out what's = going on. With INVARIANTS enabled, the system will panic. Without it, it will = spin in vm_mem_init(), as you noted. Even if it=E2=80=99s not happening = to everyone, it=E2=80=99s a serious problem for such a minor anticipated = benefit. I must insist that it be reverted. Scott From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 06:00:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31EB6CE8; Fri, 24 Apr 2015 06:00:19 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0239D1867; Fri, 24 Apr 2015 06:00:19 +0000 (UTC) Received: by iebrs15 with SMTP id rs15so76927477ieb.3; Thu, 23 Apr 2015 23:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=gHnhLvzhQf0I5x8tWCGWRwil018ZTB1aP1xpLnJDxXc=; b=uUmR2Pd6CE4A6hYVPvET6AfKZgsWDuO4wlm4eUcc9ZkXmaVE35SHBLEX4pG3U3tUiA T+1pf/kA78NOM5n6rWZlVko6gpe+h8xjKtbT23TGO4N6tBdnOtDKh49UHPx/E5s9W7R2 n7KvdIESb2OiMgnIc+5Vgwu3HuqyX4bcqX462Ny/xJV4P0+9ByAwFVlTCQiHzel9Rkf0 k9U86ag89qbbRMVieKsOTY5Cm3gI6Y8/5AR+cVOdqIfL67NnUFz4ykAu58FnyGfLl/nC qvoM8CWcwGFiZr1Aozxct+DZo7dhSvC8Kdq8B4/XQVUB1tFMaQe0l7A1itPTV7FlnBiH FNqQ== MIME-Version: 1.0 X-Received: by 10.107.136.25 with SMTP id k25mr8569479iod.88.1429855218034; Thu, 23 Apr 2015 23:00:18 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Thu, 23 Apr 2015 23:00:17 -0700 (PDT) In-Reply-To: References: <201504120621.t3C6LxAV095209@svn.freebsd.org> <5B48434B-EA97-45B3-BC4E-B039A868186B@yahoo.com> <4E109480-FD27-4C7F-8B5F-B1DB2232CD3D@yahoo.com> <20150423192819.GA13122@dchagin.static.corbina.net> Date: Thu, 23 Apr 2015 23:00:17 -0700 X-Google-Sender-Auth: zr7-ilGzD7kwJH2J1vlqI-LuYWY Message-ID: Subject: Re: svn commit: r281451 - head/sys/vm From: Adrian Chadd To: Scott Long Cc: Chagin Dmitry , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 06:00:19 -0000 On 23 April 2015 at 22:26, Scott Long wrote: > >> On Apr 23, 2015, at 1:28 PM, Chagin Dmitry wrote: >> >> On Thu, Apr 23, 2015 at 12:49:51PM -0600, Scott Long wrote: >>> >>>> On Apr 23, 2015, at 6:19 AM, Scott Long wrote: >>>> >>>>> >>>>> On Apr 12, 2015, at 12:21 AM, Dmitry Chagin wro= te: >>>>> >>>>> Author: dchagin >>>>> Date: Sun Apr 12 06:21:58 2015 >>>>> New Revision: 281451 >>>>> URL: https://svnweb.freebsd.org/changeset/base/281451 >>>>> >>>>> Log: >>>>> Rework r281162. Indeed, the flexible array member is preferable here. >>>>> >>>>> Suggested by: Justin T. Gibbs >>>>> >>>>> MFC after: 3 days >>>>> >>>>> Modified: >>>>> head/sys/vm/uma_core.c >>>>> head/sys/vm/uma_int.h >>>> >>>> There???s still something wrong with this. I have a machine with 28 c= ores (56 with hyperthreading) and 256GB of RAM, and ever since you committe= d r281162, it panics early in boot with a failed assertion. It looks like = the first few members of a uma_slab_t are getting overwritten accidentally,= and somehow the padding of the extra member in the uma_zone_t was previous= ly protecting it. I don???t know the exact cause yet, but I must ask that = you revert to r281161 in HEAD and stable/10 until the problem is resolved. >>>> >>> >>> I think the problem is that the masterzone_k and masterzone_z objects t= hat are statically allocated in uma_core.c no longer have space for the uz_= cpu field, but uma_zalloc_arg() always assumes that it???s there. Early in= boot when the ???kegs' and ???zones??? zones are being initialized, there?= ??s only 1 CPU so pre-allocating 1 uz_cpu element in the uma_zone is enough= . I can???t see any way around this without significantly changing how uma= _zalloc_arg() treats per-cpu caches. I think it???s best to revert this ch= ange. >>> >> Hi, >> they initialized in uma_startup() and not used before. >> I have a private converstion with a man which stable/10 hangs in vm_mem_= init().\ >> with my commit. weird. >> >> I do not object to revert, but give me a chance to figure out what's goi= ng on. > > With INVARIANTS enabled, the system will panic. Without it, it will spin= in vm_mem_init(), as you noted. Even if it=E2=80=99s not happening to eve= ryone, it=E2=80=99s a serious problem for such a minor anticipated benefit.= I must insist that it be reverted. Hi, +1 - please revert the patch for now and figure it out locally. Having -HEAD broken is very annoying. -a From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 07:24:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4683BAC3; Fri, 24 Apr 2015 07:24:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34F0410FE; Fri, 24 Apr 2015 07:24:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O7OWK5006955; Fri, 24 Apr 2015 07:24:32 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O7OWHf006954; Fri, 24 Apr 2015 07:24:32 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <201504240724.t3O7OWHf006954@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Fri, 24 Apr 2015 07:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281920 - head/sys/dev/ichsmb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 07:24:32 -0000 Author: takawata Date: Fri Apr 24 07:24:31 2015 New Revision: 281920 URL: https://svnweb.freebsd.org/changeset/base/281920 Log: Add Lynx-Point LP smbus controller ID. Modified: head/sys/dev/ichsmb/ichsmb_pci.c Modified: head/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- head/sys/dev/ichsmb/ichsmb_pci.c Fri Apr 24 05:00:57 2015 (r281919) +++ head/sys/dev/ichsmb/ichsmb_pci.c Fri Apr 24 07:24:31 2015 (r281920) @@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$"); #define ID_AVOTON 0x1f3c8086 #define ID_COLETOCRK 0x23B08086 #define ID_LPT 0x8c228086 +#define ID_LPTLP 0x9c228086 #define ID_WCPT 0x8ca28086 #define ID_WCPTLP 0x9ca28086 @@ -199,6 +200,9 @@ ichsmb_pci_probe(device_t dev) case ID_LPT: device_set_desc(dev, "Intel Lynx Point SMBus controller"); break; + case ID_LPTLP: + device_set_desc(dev, "Intel Lynx Point-LP SMBus controller"); + break; case ID_WCPT: device_set_desc(dev, "Intel Wildcat Point SMBus controller"); break; From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 07:58:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D85E94EA; Fri, 24 Apr 2015 07:58:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6CA714A9; Fri, 24 Apr 2015 07:58:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O7w07T022553; Fri, 24 Apr 2015 07:58:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O7w0o1022549; Fri, 24 Apr 2015 07:58:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504240758.t3O7w0o1022549@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 24 Apr 2015 07:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281922 - head/usr.bin/nfsstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 07:58:01 -0000 Author: trasz Date: Fri Apr 24 07:57:59 2015 New Revision: 281922 URL: https://svnweb.freebsd.org/changeset/base/281922 Log: Make nfsstat(1) build with WARNS=6. Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/nfsstat/Makefile head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/Makefile ============================================================================== --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) @@ -6,6 +6,4 @@ CFLAGS+=-DNFS LIBADD= kvm -WARNS?= 3 - .include Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) @@ -70,15 +70,6 @@ static const char rcsid[] = #include #include -struct nlist nl[] = { -#define N_NFSSTAT 0 - { .n_name = "nfsstats" }, -#define N_NFSRVSTAT 1 - { .n_name = "nfsrvstats" }, - { .n_name = NULL }, -}; -kvm_t *kd; - static int widemode = 0; static int zflag = 0; static int printtitle = 1; From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 09:47:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2FA2B31; Fri, 24 Apr 2015 09:47:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D03DB107A; Fri, 24 Apr 2015 09:47:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O9lAds076145; Fri, 24 Apr 2015 09:47:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O9lAIn076144; Fri, 24 Apr 2015 09:47:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504240947.t3O9lAIn076144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2015 09:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281923 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 09:47:11 -0000 Author: mav Date: Fri Apr 24 09:47:10 2015 New Revision: 281923 URL: https://svnweb.freebsd.org/changeset/base/281923 Log: Add link to mvs(4). MFC after: 1 week Modified: head/share/man/man4/ada.4 Modified: head/share/man/man4/ada.4 ============================================================================== --- head/share/man/man4/ada.4 Fri Apr 24 07:57:59 2015 (r281922) +++ head/share/man/man4/ada.4 Fri Apr 24 09:47:10 2015 (r281923) @@ -156,6 +156,7 @@ ATA device nodes .Xr ahci 4 , .Xr cam 4 , .Xr da 4 , +.Xr mvs 4 .Xr siis 4 .Sh HISTORY The From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 09:52:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0E96CF0; Fri, 24 Apr 2015 09:52:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADD65115A; Fri, 24 Apr 2015 09:52:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O9qgAD080427; Fri, 24 Apr 2015 09:52:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O9qgvZ080426; Fri, 24 Apr 2015 09:52:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504240952.t3O9qgvZ080426@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2015 09:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281924 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 09:52:42 -0000 Author: mav Date: Fri Apr 24 09:52:41 2015 New Revision: 281924 URL: https://svnweb.freebsd.org/changeset/base/281924 Log: Oops, add missing comma. MFC after: 1 week Modified: head/share/man/man4/ada.4 Modified: head/share/man/man4/ada.4 ============================================================================== --- head/share/man/man4/ada.4 Fri Apr 24 09:47:10 2015 (r281923) +++ head/share/man/man4/ada.4 Fri Apr 24 09:52:41 2015 (r281924) @@ -156,7 +156,7 @@ ATA device nodes .Xr ahci 4 , .Xr cam 4 , .Xr da 4 , -.Xr mvs 4 +.Xr mvs 4 , .Xr siis 4 .Sh HISTORY The From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 10:17:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 985E4586; Fri, 24 Apr 2015 10:17:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B2091434; Fri, 24 Apr 2015 10:17:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OAHvPJ091023; Fri, 24 Apr 2015 10:17:57 GMT (envelope-from theraven@FreeBSD.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OAHuLl091015; Fri, 24 Apr 2015 10:17:56 GMT (envelope-from theraven@FreeBSD.org) Message-Id: <201504241017.t3OAHuLl091015@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: theraven set sender to theraven@FreeBSD.org using -f From: David Chisnall Date: Fri, 24 Apr 2015 10:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281925 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 10:17:57 -0000 Author: theraven Date: Fri Apr 24 10:17:55 2015 New Revision: 281925 URL: https://svnweb.freebsd.org/changeset/base/281925 Log: Small changes to locale-related man pages. Fix a missing .h and change the recommended include for the POSIX2008 functions from xlocale.h to locale.h. Including xlocale.h is for legacy / Darwin compatibility so should not be encouraged. Modified: head/lib/libc/locale/duplocale.3 head/lib/libc/locale/freelocale.3 head/lib/libc/locale/newlocale.3 head/lib/libc/locale/querylocale.3 head/lib/libc/locale/uselocale.3 Modified: head/lib/libc/locale/duplocale.3 ============================================================================== --- head/lib/libc/locale/duplocale.3 Fri Apr 24 09:52:41 2015 (r281924) +++ head/lib/libc/locale/duplocale.3 Fri Apr 24 10:17:55 2015 (r281925) @@ -36,7 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft locale_t .Fn duplocale "locale_t locale" .Sh DESCRIPTION Modified: head/lib/libc/locale/freelocale.3 ============================================================================== --- head/lib/libc/locale/freelocale.3 Fri Apr 24 09:52:41 2015 (r281924) +++ head/lib/libc/locale/freelocale.3 Fri Apr 24 10:17:55 2015 (r281925) @@ -38,7 +38,7 @@ or .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft int .Fn freelocale "locale_t locale" .Sh DESCRIPTION Modified: head/lib/libc/locale/newlocale.3 ============================================================================== --- head/lib/libc/locale/newlocale.3 Fri Apr 24 09:52:41 2015 (r281924) +++ head/lib/libc/locale/newlocale.3 Fri Apr 24 10:17:55 2015 (r281925) @@ -35,7 +35,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale +.In locale.h .Ft locale_t .Fn newlocale "int mask" "const char * locale" "locale_t base" .Sh DESCRIPTION Modified: head/lib/libc/locale/querylocale.3 ============================================================================== --- head/lib/libc/locale/querylocale.3 Fri Apr 24 09:52:41 2015 (r281924) +++ head/lib/libc/locale/querylocale.3 Fri Apr 24 10:17:55 2015 (r281925) @@ -36,7 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft const char * .Fn querylocale "int mask" "locale_t locale" .Sh DESCRIPTION Modified: head/lib/libc/locale/uselocale.3 ============================================================================== --- head/lib/libc/locale/uselocale.3 Fri Apr 24 09:52:41 2015 (r281924) +++ head/lib/libc/locale/uselocale.3 Fri Apr 24 10:17:55 2015 (r281925) @@ -36,7 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft locale_t .Fn uselocale "locale_t locale" .Sh DESCRIPTION From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 10:21:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E191848; Fri, 24 Apr 2015 10:21:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B7EE153B; Fri, 24 Apr 2015 10:21:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OALLSU094611; Fri, 24 Apr 2015 10:21:21 GMT (envelope-from theraven@FreeBSD.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OALLsi094610; Fri, 24 Apr 2015 10:21:21 GMT (envelope-from theraven@FreeBSD.org) Message-Id: <201504241021.t3OALLsi094610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: theraven set sender to theraven@FreeBSD.org using -f From: David Chisnall Date: Fri, 24 Apr 2015 10:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281927 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 10:21:21 -0000 Author: theraven Date: Fri Apr 24 10:21:20 2015 New Revision: 281927 URL: https://svnweb.freebsd.org/changeset/base/281927 Log: __xlocale_C_ctype should not be const. It contains a reference count that is modified by newlocale / duplocale / freelocale. MFC after: 1 week Modified: head/lib/libc/locale/none.c Modified: head/lib/libc/locale/none.c ============================================================================== --- head/lib/libc/locale/none.c Fri Apr 24 10:18:41 2015 (r281926) +++ head/lib/libc/locale/none.c Fri Apr 24 10:21:20 2015 (r281927) @@ -209,7 +209,7 @@ struct xlocale_ctype __xlocale_global_ct 256 /* __mb_sb_limit */ }; -const struct xlocale_ctype __xlocale_C_ctype = { +struct xlocale_ctype __xlocale_C_ctype = { {{0}, "C"}, (_RuneLocale*)&_DefaultRuneLocale, _none_mbrtowc, From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 11:03:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DB663FE; Fri, 24 Apr 2015 11:03:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AD8219D5; Fri, 24 Apr 2015 11:03:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OB3m0F016020; Fri, 24 Apr 2015 11:03:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OB3m92016019; Fri, 24 Apr 2015 11:03:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504241103.t3OB3m92016019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 24 Apr 2015 11:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281928 - head/lib/libmd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 11:03:48 -0000 Author: ngie Date: Fri Apr 24 11:03:47 2015 New Revision: 281928 URL: https://svnweb.freebsd.org/changeset/base/281928 Log: Avoid an infinite loop by ensuring that the amount of bytes read is greater than 0 in MDXFileChunk when calculating the checksum This edgecase can be triggered if the file is truncated while the checksum is being calculated (i.e. the EOF is reached) Differential Revision: https://reviews.freebsd.org/D2351 (patch by darius) PR: 196694 Reviewed by: delphij, ngie Submitted by: Daniel O'Connor Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libmd/mdXhl.c Modified: head/lib/libmd/mdXhl.c ============================================================================== --- head/lib/libmd/mdXhl.c Fri Apr 24 10:21:20 2015 (r281927) +++ head/lib/libmd/mdXhl.c Fri Apr 24 11:03:47 2015 (r281928) @@ -74,7 +74,7 @@ MDXFileChunk(const char *filename, char i = read(f, buffer, sizeof(buffer)); else i = read(f, buffer, n); - if (i < 0) + if (i <= 0) break; MDXUpdate(&ctx, buffer, i); n -= i; From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 11:08:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71F5767E; Fri, 24 Apr 2015 11:08:30 +0000 (UTC) Received: from elf.torek.net (mail.torek.net [96.90.199.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 531521A43; Fri, 24 Apr 2015 11:08:29 +0000 (UTC) Received: from elf.torek.net (localhost [127.0.0.1]) by elf.torek.net (8.14.9/8.14.9) with ESMTP id t3OB1Ovp029628; Fri, 24 Apr 2015 04:01:24 -0700 (PDT) (envelope-from torek@elf.torek.net) Received: (from torek@localhost) by elf.torek.net (8.14.9/8.14.9/Submit) id t3OB1O8Z029626; Fri, 24 Apr 2015 04:01:24 -0700 (PDT) (envelope-from torek) Date: Fri, 24 Apr 2015 04:01:24 -0700 (PDT) From: Chris Torek Message-Id: <201504241101.t3OB1O8Z029626@elf.torek.net> To: adrian@freebsd.org, scott4long@yahoo.com Subject: Re: svn commit: r281451 - head/sys/vm Cc: dchagin@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (elf.torek.net [127.0.0.1]); Fri, 24 Apr 2015 04:01:24 -0700 (PDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 11:08:30 -0000 The problem seems likely to be related to odd compiler handling of alignment. Consider this code bit, which extracts the essentials: struct x { int x; } __attribute__((__aligned__(32))); struct s1 { int a; struct x b[1]; }; struct s2 { int a; struct x b[]; }; extern void test2(int); void test(void) { test2(sizeof(struct s1)); test2(sizeof(struct s2)); } Compiled, here are the two sizeof values (this particular compiler output is from clang but gcc and clang both agree on sizeof here): movl $64, %edi callq test2 movl $32, %edi popq %rbp jmp test2 # TAILCALL With the flexible array, (sizeof(struct uma_cache)) is going to be 32 bytes smaller than without it. (I have not looked closely enough to determine what the size should be.) Chris From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 11:31:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94696D10; Fri, 24 Apr 2015 11:31:33 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D0A11D58; Fri, 24 Apr 2015 11:31:33 +0000 (UTC) Received: by wizk4 with SMTP id k4so18288786wiz.1; Fri, 24 Apr 2015 04:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ni1webI4ABYWa3kPYPGfPsia0aKYXRtKoF990Lsv40E=; b=brIlbzlKu7ZJQlODftabi9uWVxcqu51pSZcG3S8REN58huPjZj6P9Zjafpb8vptwzT dg2+ukq8Hixxfic9/yKqoFFjHAbcuhbXbDz7sk/019khrVSOZ2zZHLly39d2woueVSt1 w1PWd1ZuDtJxgIMDZDCIZtrwcR50BrB3IKCmj2mHDBJOKPr0/h8QKkPSffhkiQAxmwbg 5gmTWhCu2D/ZUjHFCjmkF3LG2sYLM4d/ieZLYOxMjoDi428+bslV/cErD2zJaPCaFHSY C8stzox+4TuWlVSYp/+306aPVYLaIkA3ZCnxz4cZP1u+XMcuB69t5wVyGMJiVByG7X/c nk8Q== MIME-Version: 1.0 X-Received: by 10.194.236.33 with SMTP id ur1mr14625798wjc.77.1429875091637; Fri, 24 Apr 2015 04:31:31 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.80.202 with HTTP; Fri, 24 Apr 2015 04:31:31 -0700 (PDT) In-Reply-To: <201504240758.t3O7w0o1022549@svn.freebsd.org> References: <201504240758.t3O7w0o1022549@svn.freebsd.org> Date: Fri, 24 Apr 2015 14:31:31 +0300 X-Google-Sender-Auth: TnvLsQy4VZ460KRhU9FYllQ1cx4 Message-ID: Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat From: Sergey Kandaurov To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 11:31:33 -0000 On 24 April 2015 at 10:58, Edward Tomasz Napierala wrote: > Author: trasz > Date: Fri Apr 24 07:57:59 2015 > New Revision: 281922 > URL: https://svnweb.freebsd.org/changeset/base/281922 > > Log: > Make nfsstat(1) build with WARNS=6. > > Sponsored by: The FreeBSD Foundation > > Modified: > head/usr.bin/nfsstat/Makefile > head/usr.bin/nfsstat/nfsstat.c > > Modified: head/usr.bin/nfsstat/Makefile > ============================================================================== > --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) > +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) > @@ -6,6 +6,4 @@ CFLAGS+=-DNFS > > LIBADD= kvm > > -WARNS?= 3 > - > .include > > Modified: head/usr.bin/nfsstat/nfsstat.c > ============================================================================== > --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) > +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) > @@ -70,15 +70,6 @@ static const char rcsid[] = > #include > #include > > -struct nlist nl[] = { > -#define N_NFSSTAT 0 > - { .n_name = "nfsstats" }, > -#define N_NFSRVSTAT 1 > - { .n_name = "nfsrvstats" }, > - { .n_name = NULL }, > -}; > -kvm_t *kd; > - > static int widemode = 0; > static int zflag = 0; > static int printtitle = 1; > Now that nfsstat no longer uses kvm to extract statistics, it could be further trimmed. - no longer link with kvm - un-document -M/-N options but still kept (?) for backward compatibility - cleanup from the previous sysctl/kvm usage. Index: Makefile =================================================================== --- Makefile (revision 281924) +++ Makefile (working copy) @@ -2,8 +2,5 @@ # $FreeBSD$ PROG= nfsstat -CFLAGS+=-DNFS -LIBADD= kvm - .include Index: nfsstat.1 =================================================================== --- nfsstat.1 (revision 281924) +++ nfsstat.1 (working copy) @@ -39,8 +39,6 @@ .Sh SYNOPSIS .Nm .Op Fl cemszW -.Op Fl M Ar core -.Op Fl N Ar system .Op Fl w Ar wait .Sh DESCRIPTION The @@ -60,19 +58,12 @@ .It Fl e Report the extra statistics collected by the NFS client and server for NFSv4. -.It Fl M -Extract values associated with the name list from the specified core -instead of the default -.Pa /dev/kmem . .It Fl m Report the mount options for all new NFS client mounts. This option overrides all others and .Nm will exit after completing the report. This option is only supported by the new NFS client. -.It Fl N -Extract the name list from the specified system instead of the default -.Pa /boot/kernel/kernel . .It Fl s Only display server side statistics. .It Fl W @@ -92,19 +83,11 @@ .It Fl z Reset statistics after displaying them. .El -.Sh FILES -.Bl -tag -width ".Pa /boot/kernel/kernel" -compact -.It Pa /boot/kernel/kernel -default kernel namelist -.It Pa /dev/kmem -default memory file -.El .Sh SEE ALSO .Xr fstat 1 , .Xr netstat 1 , .Xr ps 1 , .Xr systat 1 , -.Xr sysctl 3 , .Xr iostat 8 , .Xr nfsdumpstate 8 , .Xr pstat 8 , Index: nfsstat.c =================================================================== --- nfsstat.c (revision 281924) +++ nfsstat.c (working copy) @@ -48,26 +48,16 @@ #include #include #include -#include #include -#include -#include #include #include -#include -#include -#include #include -#include -#include -#include #include #include #include #include -#include #include static int widemode = 0; @@ -93,18 +83,15 @@ int clientOnly = -1; int serverOnly = -1; int ch; - char *memf, *nlistf; int mntlen, i; char buf[1024]; struct statfs *mntbuf; struct nfscl_dumpmntopts dumpmntopts; interval = 0; - memf = nlistf = NULL; while ((ch = getopt(argc, argv, "cesWM:mN:w:z")) != -1) switch(ch) { case 'M': - memf = optarg; break; case 'm': /* Display mount options for NFS mount points. */ @@ -128,7 +115,6 @@ } exit(0); case 'N': - nlistf = optarg; break; case 'W': widemode = 1; @@ -159,17 +145,6 @@ argc -= optind; argv += optind; -#define BACKWARD_COMPATIBILITY -#ifdef BACKWARD_COMPATIBILITY - if (*argv) { - interval = atoi(*argv); - if (*++argv) { - nlistf = *argv; - if (*++argv) - memf = *argv; - } - } -#endif if (modfind("nfscommon") < 0) errx(1, "NFS client/server not loaded"); -- wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 11:46:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 704693A5; Fri, 24 Apr 2015 11:46:25 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B3A71EBB; Fri, 24 Apr 2015 11:46:24 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::dd55:8565:6cfd:c136] (unknown [IPv6:2001:7b8:3a7:0:dd55:8565:6cfd:c136]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 959A65C37; Fri, 24 Apr 2015 13:46:13 +0200 (CEST) Subject: Re: svn commit: r281451 - head/sys/vm Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8DD2A96B-B49A-4354-B6F8-DA5E952FE9B0"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b6 From: Dimitry Andric In-Reply-To: <201504241101.t3OB1O8Z029626@elf.torek.net> Date: Fri, 24 Apr 2015 13:46:10 +0200 Cc: Adrian Chadd , scott4long@yahoo.com, dchagin@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> References: <201504241101.t3OB1O8Z029626@elf.torek.net> To: Chris Torek X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 11:46:25 -0000 --Apple-Mail=_8DD2A96B-B49A-4354-B6F8-DA5E952FE9B0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 24 Apr 2015, at 13:01, Chris Torek wrote: > > The problem seems likely to be related to odd compiler handling of > alignment. Consider this code bit, which extracts the essentials: > > struct x { > int x; > } __attribute__((__aligned__(32))); > > struct s1 { > int a; > struct x b[1]; > }; > > struct s2 { > int a; > struct x b[]; > }; > > extern void test2(int); > void test(void) { > test2(sizeof(struct s1)); > test2(sizeof(struct s2)); > } > > Compiled, here are the two sizeof values (this particular compiler > output is from clang but gcc and clang both agree on sizeof here): > > movl $64, %edi > callq test2 > movl $32, %edi > popq %rbp > jmp test2 # TAILCALL > > With the flexible array, (sizeof(struct uma_cache)) is going to be > 32 bytes smaller than without it. > > (I have not looked closely enough to determine what the size should be.) I'm not sure I would consider this odd. For purposes of sizeof(), the flexible array member declaration can be thought of as: struct x b[0]; so while both struct s1 and s2 have members that must be aligned at 32 bytes, the former has one extra, while the latter doesn't. Ergo, 2x32 bytes and 1x32 bytes. -Dimitry --Apple-Mail=_8DD2A96B-B49A-4354-B6F8-DA5E952FE9B0 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----- Version: GnuPG/MacGPG2 v2.0.27 iEYEARECAAYFAlU6LQUACgkQsF6jCi4glqNeDACgyo1jXpFzVxfNg/zHVgEuBuZf xjEAoLKT7Ltnjr0YIk7QQvawoQxwA808 =9NxY -----END PGP SIGNATURE----- --Apple-Mail=_8DD2A96B-B49A-4354-B6F8-DA5E952FE9B0-- From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 12:04:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 850848A3; Fri, 24 Apr 2015 12:04:02 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2082D10B6; Fri, 24 Apr 2015 12:04:02 +0000 (UTC) Received: by wiun10 with SMTP id n10so17608141wiu.1; Fri, 24 Apr 2015 05:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=xf69IgraeceZifT//y1ncAV5CPO2T+1celX9zUzBts4=; b=x0AgOKrpquUqwF0NcLfajQCO6erINGyX/LJWGKU01F6NVAhrFXDAUnCuEJ3gjXz9oW VvRLErX2G9hqlInZ8E+Ylrr0Ak8oCoX5k3duwDjLjmwj6ng7ROP9uu9vRSRRRNmiYa2+ K1LARAK5oTZ2hUgbgyAQJTqPTB5JAVLegfX6C40Lsqip9rdv8kJcoipR1khfxwGR6/vv 1/LWD/IXdYdwk5XLeeaJiEgCI01wrlCqRLsCg9cLRkW0UcHOvKEy6Z8g6HbiNeNEtFsA uyzccMqyLbbz8zkvdhZAZUeDUxyWKOrb39I3hEudMLFe1zZ42ZfC9AKimZ28ce9PSMl4 aLEw== X-Received: by 10.180.210.171 with SMTP id mv11mr3192726wic.61.1429877040626; Fri, 24 Apr 2015 05:04:00 -0700 (PDT) Received: from brick.home (adiw48.neoplus.adsl.tpnet.pl. [79.184.204.48]) by mx.google.com with ESMTPSA id kc4sm16620749wjc.2.2015.04.24.05.03.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2015 05:03:59 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 24 Apr 2015 14:03:57 +0200 From: Edward Tomasz Napierala To: Sergey Kandaurov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat Message-ID: <20150424120357.GA5210@brick.home> Mail-Followup-To: Sergey Kandaurov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201504240758.t3O7w0o1022549@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 12:04:02 -0000 On 0424T1431, Sergey Kandaurov wrote: > On 24 April 2015 at 10:58, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Fri Apr 24 07:57:59 2015 > > New Revision: 281922 > > URL: https://svnweb.freebsd.org/changeset/base/281922 > > > > Log: > > Make nfsstat(1) build with WARNS=6. > > > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/usr.bin/nfsstat/Makefile > > head/usr.bin/nfsstat/nfsstat.c > > > > Modified: head/usr.bin/nfsstat/Makefile > > ============================================================================== > > --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) > > +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) > > @@ -6,6 +6,4 @@ CFLAGS+=-DNFS > > > > LIBADD= kvm > > > > -WARNS?= 3 > > - > > .include > > > > Modified: head/usr.bin/nfsstat/nfsstat.c > > ============================================================================== > > --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) > > +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) > > @@ -70,15 +70,6 @@ static const char rcsid[] = > > #include > > #include > > > > -struct nlist nl[] = { > > -#define N_NFSSTAT 0 > > - { .n_name = "nfsstats" }, > > -#define N_NFSRVSTAT 1 > > - { .n_name = "nfsrvstats" }, > > - { .n_name = NULL }, > > -}; > > -kvm_t *kd; > > - > > static int widemode = 0; > > static int zflag = 0; > > static int printtitle = 1; > > > > Now that nfsstat no longer uses kvm to extract statistics, it could be > further trimmed. > - no longer link with kvm > - un-document -M/-N options but still kept (?) for backward compatibility > - cleanup from the previous sysctl/kvm usage. > > Index: Makefile > =================================================================== > --- Makefile (revision 281924) > +++ Makefile (working copy) > @@ -2,8 +2,5 @@ > # $FreeBSD$ > > PROG= nfsstat > -CFLAGS+=-DNFS > > -LIBADD= kvm > - > .include > Index: nfsstat.1 > =================================================================== > --- nfsstat.1 (revision 281924) > +++ nfsstat.1 (working copy) > @@ -39,8 +39,6 @@ > .Sh SYNOPSIS > .Nm > .Op Fl cemszW > -.Op Fl M Ar core > -.Op Fl N Ar system > .Op Fl w Ar wait > .Sh DESCRIPTION > The > @@ -60,19 +58,12 @@ > .It Fl e > Report the extra statistics collected by the NFS client and > server for NFSv4. > -.It Fl M > -Extract values associated with the name list from the specified core > -instead of the default > -.Pa /dev/kmem . > .It Fl m > Report the mount options for all new NFS client mounts. > This option overrides all others and > .Nm > will exit after completing the report. > This option is only supported by the new NFS client. > -.It Fl N > -Extract the name list from the specified system instead of the default > -.Pa /boot/kernel/kernel . > .It Fl s > Only display server side statistics. > .It Fl W > @@ -92,19 +83,11 @@ > .It Fl z > Reset statistics after displaying them. > .El > -.Sh FILES > -.Bl -tag -width ".Pa /boot/kernel/kernel" -compact > -.It Pa /boot/kernel/kernel > -default kernel namelist > -.It Pa /dev/kmem > -default memory file > -.El > .Sh SEE ALSO > .Xr fstat 1 , > .Xr netstat 1 , > .Xr ps 1 , > .Xr systat 1 , > -.Xr sysctl 3 , > .Xr iostat 8 , > .Xr nfsdumpstate 8 , > .Xr pstat 8 , > Index: nfsstat.c > =================================================================== > --- nfsstat.c (revision 281924) > +++ nfsstat.c (working copy) > @@ -48,26 +48,16 @@ > #include > #include > #include > -#include > #include > -#include > -#include > #include > > #include > > -#include > -#include > -#include > #include > -#include > -#include > -#include > #include > #include > #include > #include > -#include > #include > > static int widemode = 0; > @@ -93,18 +83,15 @@ > int clientOnly = -1; > int serverOnly = -1; > int ch; > - char *memf, *nlistf; > int mntlen, i; > char buf[1024]; > struct statfs *mntbuf; > struct nfscl_dumpmntopts dumpmntopts; > > interval = 0; > - memf = nlistf = NULL; > while ((ch = getopt(argc, argv, "cesWM:mN:w:z")) != -1) > switch(ch) { > case 'M': > - memf = optarg; > break; > case 'm': > /* Display mount options for NFS mount points. */ > @@ -128,7 +115,6 @@ > } > exit(0); > case 'N': > - nlistf = optarg; > break; > case 'W': > widemode = 1; > @@ -159,17 +145,6 @@ > argc -= optind; > argv += optind; > > -#define BACKWARD_COMPATIBILITY > -#ifdef BACKWARD_COMPATIBILITY > - if (*argv) { > - interval = atoi(*argv); > - if (*++argv) { > - nlistf = *argv; > - if (*++argv) > - memf = *argv; > - } > - } > -#endif Doesn't this chunk break usage like "nfsstat 1"? From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 12:13:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A9C0D1A; Fri, 24 Apr 2015 12:13:59 +0000 (UTC) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C64BC11BD; Fri, 24 Apr 2015 12:13:58 +0000 (UTC) Received: by wgin8 with SMTP id n8so48502484wgi.0; Fri, 24 Apr 2015 05:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=vYOnOOSFYIHWkGBO+LlyGnaHRTiDzCjvFxmeNJ6KiLI=; b=SKqnJwAk3hrsyviNB2y7rbVX4NSmL4C15sMnliQY38t6nChejy2kFMV2NJlDWJQxHW a9FuTFENYtdd6989VtI4I4HTOa0zGLSW9hsrs0rz3ptfM9sxiDEKSYMTrbAkjwG8uGDQ 2BsdNT2L74p3R/5PQCngxJhnI55bbrEZ+kRMm0qBB7IPO3mreVoxQFxXPm4tQHUxx6Vn DD2X6EAlIL0mKSaqkPD7pAIIVCTbCdDRZ3XMkEyPP1U8vgY6B2E9lq9UPt/Jwo6nD/TE QRVvgmDt7uipZUsaBK3E8VwneDhhZ1gLmZAs2n2tKWYrkVb3TGExFDLnFv+Y6WRxTpLB 2MbA== MIME-Version: 1.0 X-Received: by 10.180.93.7 with SMTP id cq7mr3484109wib.24.1429877637303; Fri, 24 Apr 2015 05:13:57 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.80.202 with HTTP; Fri, 24 Apr 2015 05:13:57 -0700 (PDT) In-Reply-To: <20150424120357.GA5210@brick.home> References: <201504240758.t3O7w0o1022549@svn.freebsd.org> <20150424120357.GA5210@brick.home> Date: Fri, 24 Apr 2015 15:13:57 +0300 X-Google-Sender-Auth: M4bnxg7FD65p6hmaUJkueFTjLv4 Message-ID: Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat From: Sergey Kandaurov To: Sergey Kandaurov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 12:13:59 -0000 On 24 April 2015 at 15:03, Edward Tomasz Napierala wrote: > On 0424T1431, Sergey Kandaurov wrote: [..] >> @@ -159,17 +145,6 @@ >> argc -= optind; >> argv += optind; >> >> -#define BACKWARD_COMPATIBILITY >> -#ifdef BACKWARD_COMPATIBILITY >> - if (*argv) { >> - interval = atoi(*argv); >> - if (*++argv) { >> - nlistf = *argv; >> - if (*++argv) >> - memf = *argv; >> - } >> - } >> -#endif > > Doesn't this chunk break usage like "nfsstat 1"? > Sure, thanks. -- wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 12:37:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CE3E358; Fri, 24 Apr 2015 12:37:23 +0000 (UTC) Received: from elf.torek.net (mail.torek.net [96.90.199.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 403F71450; Fri, 24 Apr 2015 12:37:22 +0000 (UTC) Received: from elf.torek.net (localhost [127.0.0.1]) by elf.torek.net (8.14.9/8.14.9) with ESMTP id t3OCbLH7039665; Fri, 24 Apr 2015 05:37:21 -0700 (PDT) (envelope-from torek@elf.torek.net) Received: (from torek@localhost) by elf.torek.net (8.14.9/8.14.9/Submit) id t3OCbLmd039664; Fri, 24 Apr 2015 05:37:21 -0700 (PDT) (envelope-from torek) Date: Fri, 24 Apr 2015 05:37:21 -0700 (PDT) From: Chris Torek Message-Id: <201504241237.t3OCbLmd039664@elf.torek.net> To: dim@FreeBSD.org Subject: Re: svn commit: r281451 - head/sys/vm Cc: adrian@freebsd.org, dchagin@freebsd.org, scott4long@yahoo.com, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (elf.torek.net [127.0.0.1]); Fri, 24 Apr 2015 05:37:22 -0700 (PDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 12:37:23 -0000 True, it's not actually odd, it's just surprising the first time one comes across it. Also, I goofed in the text: >> With the flexible array, (sizeof(struct uma_cache)) is going to be >> 32 bytes smaller than without it. It's `struct uma_zone` that shrinks by (potentially) more than one would expect. (The uma_cache struct is itself 32 bytes and is not changed, so the args.size value should be the same -- implying that some OTHER "sizeof(struct uma_zone)" is where things are going wrong.) Chris From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 12:48:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07875573; Fri, 24 Apr 2015 12:48:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAC981597; Fri, 24 Apr 2015 12:48:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OCmnwS065762; Fri, 24 Apr 2015 12:48:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OCmn5A065761; Fri, 24 Apr 2015 12:48:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504241248.t3OCmn5A065761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 24 Apr 2015 12:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281929 - head/sbin/growfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 12:48:50 -0000 Author: trasz Date: Fri Apr 24 12:48:48 2015 New Revision: 281929 URL: https://svnweb.freebsd.org/changeset/base/281929 Log: Fix growfs(8) build with debug enabled (make -DGFSDBG). PR: 199641 Submitted by: Willem Jan Withagen MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sbin/growfs/Makefile head/sbin/growfs/growfs.c Modified: head/sbin/growfs/Makefile ============================================================================== --- head/sbin/growfs/Makefile Fri Apr 24 11:03:47 2015 (r281928) +++ head/sbin/growfs/Makefile Fri Apr 24 12:48:48 2015 (r281929) @@ -4,8 +4,6 @@ # $FreeBSD$ # -#GFSDBG= - .include .PATH: ${.CURDIR}/../mount @@ -16,7 +14,9 @@ MAN= growfs.8 CFLAGS+=-I${.CURDIR}/../mount .if defined(GFSDBG) -SRCS+= debug.c +SRCS+= debug.c +CFLAGS+= -DFS_DEBUG +NO_WCAST_ALIGN= yes .endif LIBADD= util Modified: head/sbin/growfs/growfs.c ============================================================================== --- head/sbin/growfs/growfs.c Fri Apr 24 11:03:47 2015 (r281928) +++ head/sbin/growfs/growfs.c Fri Apr 24 12:48:48 2015 (r281929) @@ -161,7 +161,7 @@ growfs(int fsi, int fso, unsigned int Nf #ifdef FS_DEBUG { struct csum *dbg_csp; - int dbg_csc; + u_int32_t dbg_csc; char dbg_line[80]; dbg_csp = fscs; @@ -242,7 +242,7 @@ growfs(int fsi, int fso, unsigned int Nf #ifdef FS_DEBUG { struct csum *dbg_csp; - int dbg_csc; + u_int32_t dbg_csc; char dbg_line[80]; dbg_csp = fscs; From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 13:12:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E65D1AB7; Fri, 24 Apr 2015 13:12:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D60BE187E; Fri, 24 Apr 2015 13:12:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ODC4YS079676; Fri, 24 Apr 2015 13:12:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ODC4Zq079675; Fri, 24 Apr 2015 13:12:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504241312.t3ODC4Zq079675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 Apr 2015 13:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281930 - head/sys/sparc64/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 13:12:05 -0000 Author: jhb Date: Fri Apr 24 13:12:04 2015 New Revision: 281930 URL: https://svnweb.freebsd.org/changeset/base/281930 Log: Update this driver to not save copies of registers that are no longer used after r281874. While here, also update it to always write the parent's PCI bus number to the primary bus register. Modified: head/sys/sparc64/pci/apb.c Modified: head/sys/sparc64/pci/apb.c ============================================================================== --- head/sys/sparc64/pci/apb.c Fri Apr 24 12:48:48 2015 (r281929) +++ head/sys/sparc64/pci/apb.c Fri Apr 24 13:12:04 2015 (r281930) @@ -171,20 +171,14 @@ apb_attach(device_t dev) * Get current bridge configuration. */ sc->sc_bsc.ops_pcib_sc.domain = pci_get_domain(dev); - sc->sc_bsc.ops_pcib_sc.secstat = - pci_read_config(dev, PCIR_SECSTAT_1, 2); - sc->sc_bsc.ops_pcib_sc.command = - pci_read_config(dev, PCIR_COMMAND, 2); - sc->sc_bsc.ops_pcib_sc.pribus = - pci_read_config(dev, PCIR_PRIBUS_1, 1); + sc->sc_bsc.ops_pcib_sc.pribus = pci_get_bus(dev); + pci_write_config(dev, PCIR_PRIBUS_1, sc->sc_bsc.ops_pcib_sc.pribus, 1); sc->sc_bsc.ops_pcib_sc.bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); sc->sc_bsc.ops_pcib_sc.bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); sc->sc_bsc.ops_pcib_sc.bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); - sc->sc_bsc.ops_pcib_sc.seclat = - pci_read_config(dev, PCIR_SECLAT_1, 1); sc->sc_iomap = pci_read_config(dev, APBR_IOMAP, 1); sc->sc_memmap = pci_read_config(dev, APBR_MEMMAP, 1); From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 14:36:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5012DA1A; Fri, 24 Apr 2015 14:36:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24CA01253; Fri, 24 Apr 2015 14:36:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OEa86K021435; Fri, 24 Apr 2015 14:36:08 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OEa70H021431; Fri, 24 Apr 2015 14:36:07 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201504241436.t3OEa70H021431@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Fri, 24 Apr 2015 14:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281931 - in head: sbin/camcontrol usr.sbin/iovctl usr.sbin/jail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 14:36:08 -0000 Author: joel (doc committer) Date: Fri Apr 24 14:36:06 2015 New Revision: 281931 URL: https://svnweb.freebsd.org/changeset/base/281931 Log: Fix minor mdoc issues. Modified: head/sbin/camcontrol/camcontrol.8 head/usr.sbin/iovctl/iovctl.conf.5 head/usr.sbin/jail/jail.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Fri Apr 24 13:12:04 2015 (r281930) +++ head/sbin/camcontrol/camcontrol.8 Fri Apr 24 14:36:06 2015 (r281931) @@ -575,7 +575,6 @@ Most drives support this format. Print out the list in extended physical sector format. The extended format allows for ranges of blocks to be printed. .El -.Pp .It Fl G Print out the grown defect list. This is a list of bad blocks that have Modified: head/usr.sbin/iovctl/iovctl.conf.5 ============================================================================== --- head/usr.sbin/iovctl/iovctl.conf.5 Fri Apr 24 13:12:04 2015 (r281930) +++ head/usr.sbin/iovctl/iovctl.conf.5 Fri Apr 24 14:36:06 2015 (r281931) @@ -144,7 +144,7 @@ passthrough devices through the use of t VF-0 is not configured as a passthrough device as it explicitly overrides the default. VF-0 also sets a device-specific parameter named mac-addr. -.Bd -literal .offset ident +.Bd -literal -offset ident PF { device : "ix0"; num_vfs : 3; @@ -160,8 +160,8 @@ VF-0 { } .Ed .Sh SEE ALSO -.Xr iovctl 8 , -.Xr rc.conf 5 +.Xr rc.conf 5 , +.Xr iovctl 8 .Sh AUTHORS This manual page was written by .An Ryan Stone Aq Mt rstone@FreeBSD.org . Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Fri Apr 24 13:12:04 2015 (r281930) +++ head/usr.sbin/jail/jail.8 Fri Apr 24 14:36:06 2015 (r281931) @@ -1221,7 +1221,6 @@ environment of the first jail. .Xr jls 8 , .Xr mount 8 , .Xr named 8 , -.Xr procfs 5 , .Xr reboot 8 , .Xr rpcbind 8 , .Xr sendmail 8 , From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 14:46:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C96C4EA1 for ; Fri, 24 Apr 2015 14:46:06 +0000 (UTC) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C7471391 for ; Fri, 24 Apr 2015 14:46:06 +0000 (UTC) Received: by widdi4 with SMTP id di4so24938568wid.0 for ; Fri, 24 Apr 2015 07:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=e4BZ+km6J70zxr5Cfff7mbPlVsrex5f4Y/o2GIRtKX4=; b=IG0WCKei8Wfl2hJTvj0M2ISvDfHC3cUvcH7XYOGxmlMyqoSbx1DjLZdXv14cHz3Z3+ DtG6IiuL1h02g70ELfORhEFyxgQmY3WYJYzztbLE+PrS9VbQ/30lm60BpKJKcJZyUXgK AnVlDnC3ZfvsvoK3QLdf0Ek/Hw6viOFQXgxxw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=e4BZ+km6J70zxr5Cfff7mbPlVsrex5f4Y/o2GIRtKX4=; b=mdONq7NkZqL+vCTTT+2u2m49VufMlpIKbFe0SXDMD2hGpyLqq82dZG/MroASqPm83p Qjx+Hd0f/5/216EfoCe6rX4f9/sTPzAklkU5TlBmQKBSeKW12faNnHOWgvk33MQKaidh ONPKqbQ11xQAi3SYDin6VKD5vhGObpVlHrjPKlueLXY6H0cGu5JGM0RuGrrEOtriPEnJ 37BS9SyH7PeR3VqSgS4gIwj3aL6Chl88SW2ED445vQcUQ2ucYFRT+npuAz9pfpR/j6LC BGV4OdEURoY+LPTP4MSMiUwJ4wfXQsmnesNUIwmlzlp9Fn65HxWxNykvHPJv2IYy5tqm ObSA== X-Gm-Message-State: ALoCoQnjqQHeAoOSkgekGqHcm7N9+99h2AuXRdrUJs1bT7rhsBDD1q8noKqx8060xlE/3W4yhcbO X-Received: by 10.180.216.103 with SMTP id op7mr4482090wic.90.1429886764755; Fri, 24 Apr 2015 07:46:04 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.20.75 with HTTP; Fri, 24 Apr 2015 07:45:34 -0700 (PDT) In-Reply-To: References: <201504240758.t3O7w0o1022549@svn.freebsd.org> From: Eitan Adler Date: Fri, 24 Apr 2015 07:45:34 -0700 X-Google-Sender-Auth: GD93f5Lb-wM2HgQyF18B48iV1cc Message-ID: Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat To: Sergey Kandaurov Cc: Edward Tomasz Napierala , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 14:46:06 -0000 On 24 April 2015 at 04:31, Sergey Kandaurov wrote: > Now that nfsstat no longer uses kvm to extract statistics, it could be > further trimmed. > - no longer link with kvm > - un-document -M/-N options but still kept (?) for backward compatibility If we are keeping flags, they should documented as being kept for compat. If they are not documented, support for them should be removed as they are bugs. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 14:47:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C464912C; Fri, 24 Apr 2015 14:47:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B385813BE; Fri, 24 Apr 2015 14:47:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OElscF026705; Fri, 24 Apr 2015 14:47:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OElsmu026704; Fri, 24 Apr 2015 14:47:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504241447.t3OElsmu026704@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 Apr 2015 14:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281932 - head/sys/modules/oce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 14:47:54 -0000 Author: jhb Date: Fri Apr 24 14:47:53 2015 New Revision: 281932 URL: https://svnweb.freebsd.org/changeset/base/281932 Log: Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge about kld filenames for network drivers that requires them to follow the pattern of if_. This also fixes the existing documentation in the manpage which says to use if_oce_load=YES in loader.conf. PR: 199095 MFC after: 1 week Modified: head/sys/modules/oce/Makefile Modified: head/sys/modules/oce/Makefile ============================================================================== --- head/sys/modules/oce/Makefile Fri Apr 24 14:36:06 2015 (r281931) +++ head/sys/modules/oce/Makefile Fri Apr 24 14:47:53 2015 (r281932) @@ -3,7 +3,7 @@ # .PATH: ${.CURDIR}/../../dev/oce -KMOD = oce +KMOD = if_oce SRCS = oce_if.c oce_hw.c oce_mbox.c oce_util.c oce_queue.c oce_sysctl.c SRCS += bus_if.h device_if.h pci_if.h opt_inet.h opt_inet6.h From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 15:03:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8759B48; Fri, 24 Apr 2015 15:03:36 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B301E16CA; Fri, 24 Apr 2015 15:03:36 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A5D63B95E; Fri, 24 Apr 2015 11:03:35 -0400 (EDT) From: John Baldwin To: Sergey Kandaurov Cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat Date: Fri, 24 Apr 2015 10:33:56 -0400 Message-ID: <1589639.roM6gzoYx3@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201504240758.t3O7w0o1022549@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 24 Apr 2015 11:03:35 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:03:37 -0000 On Friday, April 24, 2015 02:31:31 PM Sergey Kandaurov wrote: > On 24 April 2015 at 10:58, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Fri Apr 24 07:57:59 2015 > > New Revision: 281922 > > URL: https://svnweb.freebsd.org/changeset/base/281922 > > > > Log: > > Make nfsstat(1) build with WARNS=6. > > > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/usr.bin/nfsstat/Makefile > > head/usr.bin/nfsstat/nfsstat.c > > > > Modified: head/usr.bin/nfsstat/Makefile > > ============================================================================== > > --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) > > +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) > > @@ -6,6 +6,4 @@ CFLAGS+=-DNFS > > > > LIBADD= kvm > > > > -WARNS?= 3 > > - > > .include > > > > Modified: head/usr.bin/nfsstat/nfsstat.c > > ============================================================================== > > --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) > > +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) > > @@ -70,15 +70,6 @@ static const char rcsid[] = > > #include > > #include > > > > -struct nlist nl[] = { > > -#define N_NFSSTAT 0 > > - { .n_name = "nfsstats" }, > > -#define N_NFSRVSTAT 1 > > - { .n_name = "nfsrvstats" }, > > - { .n_name = NULL }, > > -}; > > -kvm_t *kd; > > - > > static int widemode = 0; > > static int zflag = 0; > > static int printtitle = 1; > > > > Now that nfsstat no longer uses kvm to extract statistics, it could be > further trimmed. > - no longer link with kvm > - un-document -M/-N options but still kept (?) for backward compatibility > - cleanup from the previous sysctl/kvm usage. If these are just global structures in the kernel it would be nice to keep -N/-M support for use in crash dump reporting. This just broke crashinfo (again), so please either restore KVM support for crash reporting, or remove nfsstat from crashinfo. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 15:17:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E628B422; Fri, 24 Apr 2015 15:17:44 +0000 (UTC) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id C96DB1891; Fri, 24 Apr 2015 15:17:44 +0000 (UTC) Received: from marvin.lab.vangyzen.net (c-73-147-253-17.hsd1.va.comcast.net [73.147.253.17]) by smtp.vangyzen.net (Postfix) with ESMTPSA id C907156467; Fri, 24 Apr 2015 10:17:43 -0500 (CDT) Message-ID: <553A5E9B.7090503@FreeBSD.org> Date: Fri, 24 Apr 2015 11:17:47 -0400 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: John Baldwin , Sergey Kandaurov CC: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat References: <201504240758.t3O7w0o1022549@svn.freebsd.org> <1589639.roM6gzoYx3@ralph.baldwin.cx> In-Reply-To: <1589639.roM6gzoYx3@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:17:45 -0000 On 04/24/2015 10:33, John Baldwin wrote: > On Friday, April 24, 2015 02:31:31 PM Sergey Kandaurov wrote: >> On 24 April 2015 at 10:58, Edward Tomasz Napierala wrote: >>> Author: trasz >>> Date: Fri Apr 24 07:57:59 2015 >>> New Revision: 281922 >>> URL: https://svnweb.freebsd.org/changeset/base/281922 >>> >>> Log: >>> Make nfsstat(1) build with WARNS=6. >>> >>> Sponsored by: The FreeBSD Foundation >>> >>> Modified: >>> head/usr.bin/nfsstat/Makefile >>> head/usr.bin/nfsstat/nfsstat.c >>> >>> Modified: head/usr.bin/nfsstat/Makefile >>> ============================================================================== >>> --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) >>> +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) >>> @@ -6,6 +6,4 @@ CFLAGS+=-DNFS >>> >>> LIBADD= kvm >>> >>> -WARNS?= 3 >>> - >>> .include >>> >>> Modified: head/usr.bin/nfsstat/nfsstat.c >>> ============================================================================== >>> --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) >>> +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) >>> @@ -70,15 +70,6 @@ static const char rcsid[] = >>> #include >>> #include >>> >>> -struct nlist nl[] = { >>> -#define N_NFSSTAT 0 >>> - { .n_name = "nfsstats" }, >>> -#define N_NFSRVSTAT 1 >>> - { .n_name = "nfsrvstats" }, >>> - { .n_name = NULL }, >>> -}; >>> -kvm_t *kd; >>> - >>> static int widemode = 0; >>> static int zflag = 0; >>> static int printtitle = 1; >>> >> >> Now that nfsstat no longer uses kvm to extract statistics, it could be >> further trimmed. >> - no longer link with kvm >> - un-document -M/-N options but still kept (?) for backward compatibility >> - cleanup from the previous sysctl/kvm usage. > > If these are just global structures in the kernel it would be nice to keep > -N/-M support for use in crash dump reporting. This just broke crashinfo > (again), so please either restore KVM support for crash reporting, or > remove nfsstat from crashinfo. ...or implement debugger scripts that provide similar functionality, and call those from crashinfo. Eric From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 16:11:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75217E89; Fri, 24 Apr 2015 16:11:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62B7F1F4F; Fri, 24 Apr 2015 16:11:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OGBOPO072436; Fri, 24 Apr 2015 16:11:24 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OGBNTV072428; Fri, 24 Apr 2015 16:11:23 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201504241611.t3OGBNTV072428@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 24 Apr 2015 16:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281938 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 16:11:24 -0000 Author: brooks Date: Fri Apr 24 16:11:22 2015 New Revision: 281938 URL: https://svnweb.freebsd.org/changeset/base/281938 Log: Merge from CheriBSD: 1065cf515a7c2062598009c1318055aacbb39e80 Convert the pfsync dissector to use the netdissect framework. Differential Revision: https://reviews.freebsd.org/D2359 Reviewed by: glebius Sponsored by: DARPA, AFRL Modified: head/contrib/tcpdump/interface.h head/contrib/tcpdump/netdissect.h head/contrib/tcpdump/print-ip.c head/contrib/tcpdump/print-pfsync.c Modified: head/contrib/tcpdump/interface.h ============================================================================== --- head/contrib/tcpdump/interface.h Fri Apr 24 15:58:41 2015 (r281937) +++ head/contrib/tcpdump/interface.h Fri Apr 24 16:11:22 2015 (r281938) @@ -148,8 +148,6 @@ extern uint16_t create_osi_cksum(const u #include -extern void pfsync_ip_print(const u_char *, u_int); - extern char *q922_string(const u_char *); extern char *smb_errstr(int, int); extern const char *nt_errstr(uint32_t); Modified: head/contrib/tcpdump/netdissect.h ============================================================================== --- head/contrib/tcpdump/netdissect.h Fri Apr 24 15:58:41 2015 (r281937) +++ head/contrib/tcpdump/netdissect.h Fri Apr 24 16:11:22 2015 (r281938) @@ -540,6 +540,8 @@ extern void timed_print(netdissect_optio extern void m3ua_print(netdissect_options *, const u_char *, const u_int); extern void aoe_print(netdissect_options *, const u_char *, const u_int); +extern void pfsync_ip_print(netdissect_options *, const u_char *, u_int); + /* stuff that has not yet been rototiled */ #if 0 Modified: head/contrib/tcpdump/print-ip.c ============================================================================== --- head/contrib/tcpdump/print-ip.c Fri Apr 24 15:58:41 2015 (r281937) +++ head/contrib/tcpdump/print-ip.c Fri Apr 24 16:11:22 2015 (r281938) @@ -487,7 +487,7 @@ again: #if defined(HAVE_NET_PFVAR_H) case IPPROTO_PFSYNC: - pfsync_ip_print(ipds->cp, ipds->len); + pfsync_ip_print(ndo, ipds->cp, ipds->len); break; #endif Modified: head/contrib/tcpdump/print-pfsync.c ============================================================================== --- head/contrib/tcpdump/print-pfsync.c Fri Apr 24 15:58:41 2015 (r281937) +++ head/contrib/tcpdump/print-pfsync.c Fri Apr 24 16:11:22 2015 (r281938) @@ -47,10 +47,12 @@ #include "interface.h" #include "addrtoname.h" -static void pfsync_print(struct pfsync_header *, const u_char *, u_int); -static void print_src_dst(const struct pfsync_state_peer *, +static void pfsync_print(netdissect_options *, struct pfsync_header *, + const u_char *, u_int); +static void print_src_dst(netdissect_options *, + const struct pfsync_state_peer *, const struct pfsync_state_peer *, uint8_t); -static void print_state(struct pfsync_state *); +static void print_state(netdissect_options *, struct pfsync_state *); #ifdef notyet void @@ -62,7 +64,7 @@ pfsync_if_print(u_char *user, const stru ts_print(&h->ts); if (caplen < PFSYNC_HDRLEN) { - printf("[|pfsync]"); + ND_PRINT((ndo, "[|pfsync]")); goto out; } @@ -73,36 +75,36 @@ out: if (xflag) { default_print((const u_char *)p, caplen); } - putchar('\n'); + safeputchar(ndo, '\n'); } #endif /* notyet */ void -pfsync_ip_print(const u_char *bp, u_int len) +pfsync_ip_print(netdissect_options *ndo , const u_char *bp, u_int len) { struct pfsync_header *hdr = (struct pfsync_header *)bp; if (len < PFSYNC_HDRLEN) - printf("[|pfsync]"); + ND_PRINT((ndo, "[|pfsync]")); else - pfsync_print(hdr, bp + sizeof(struct pfsync_header), + pfsync_print(ndo, hdr, bp + sizeof(struct pfsync_header), len - sizeof(struct pfsync_header)); } struct pfsync_actions { const char *name; size_t len; - void (*print)(const void *); + void (*print)(netdissect_options *, const void *); }; -static void pfsync_print_clr(const void *); -static void pfsync_print_state(const void *); -static void pfsync_print_ins_ack(const void *); -static void pfsync_print_upd_c(const void *); -static void pfsync_print_upd_req(const void *); -static void pfsync_print_del_c(const void *); -static void pfsync_print_bus(const void *); -static void pfsync_print_tdb(const void *); +static void pfsync_print_clr(netdissect_options *, const void *); +static void pfsync_print_state(netdissect_options *, const void *); +static void pfsync_print_ins_ack(netdissect_options *, const void *); +static void pfsync_print_upd_c(netdissect_options *, const void *); +static void pfsync_print_upd_req(netdissect_options *, const void *); +static void pfsync_print_del_c(netdissect_options *, const void *); +static void pfsync_print_bus(netdissect_options *, const void *); +static void pfsync_print_tdb(netdissect_options *, const void *); struct pfsync_actions actions[] = { { "clear all", sizeof(struct pfsync_clr), pfsync_print_clr }, @@ -125,7 +127,8 @@ struct pfsync_actions actions[] = { }; static void -pfsync_print(struct pfsync_header *hdr, const u_char *bp, u_int len) +pfsync_print(netdissect_options *ndo, struct pfsync_header *hdr, + const u_char *bp, u_int len) { struct pfsync_subheader *subh; int count, plen, i; @@ -133,7 +136,7 @@ pfsync_print(struct pfsync_header *hdr, plen = ntohs(hdr->len); - printf("PFSYNCv%d len %d", hdr->version, plen); + ND_PRINT((ndo, "PFSYNCv%d len %d", hdr->version, plen)); if (hdr->version != PFSYNC_VERSION) return; @@ -150,19 +153,22 @@ pfsync_print(struct pfsync_header *hdr, plen -= sizeof(*subh); if (subh->action >= PFSYNC_ACT_MAX) { - printf("\n act UNKNOWN id %d", subh->action); + ND_PRINT((ndo, "\n act UNKNOWN id %d", + subh->action)); return; } count = ntohs(subh->count); - printf("\n %s count %d", actions[subh->action].name, count); + ND_PRINT((ndo, "\n %s count %d", actions[subh->action].name, + count)); alen = actions[subh->action].len; if (subh->action == PFSYNC_ACT_EOF) return; if (actions[subh->action].print == NULL) { - printf("\n unimplemented action %hhu", subh->action); + ND_PRINT((ndo, "\n unimplemented action %hhu", + subh->action)); return; } @@ -173,7 +179,7 @@ pfsync_print(struct pfsync_header *hdr, } if (vflag) - actions[subh->action].print(bp); + actions[subh->action].print(ndo, bp); bp += alen; len -= alen; @@ -182,78 +188,78 @@ pfsync_print(struct pfsync_header *hdr, } if (plen > 0) { - printf("\n ..."); + ND_PRINT((ndo, "\n ...")); return; } if (plen < 0) { - printf("\n invalid header length"); + ND_PRINT((ndo, "\n invalid header length")); return; } if (len > 0) - printf("\n invalid packet length"); + ND_PRINT((ndo, "\n invalid packet length")); } static void -pfsync_print_clr(const void *bp) +pfsync_print_clr(netdissect_options *ndo, const void *bp) { const struct pfsync_clr *clr = bp; - printf("\n\tcreatorid: %08x", htonl(clr->creatorid)); + ND_PRINT((ndo, "\n\tcreatorid: %08x", htonl(clr->creatorid))); if (clr->ifname[0] != '\0') - printf(" interface: %s", clr->ifname); + ND_PRINT((ndo, " interface: %s", clr->ifname)); } static void -pfsync_print_state(const void *bp) +pfsync_print_state(netdissect_options *ndo, const void *bp) { struct pfsync_state *st = (struct pfsync_state *)bp; - putchar('\n'); - print_state(st); + safeputchar(ndo, '\n'); + print_state(ndo, st); } static void -pfsync_print_ins_ack(const void *bp) +pfsync_print_ins_ack(netdissect_options *ndo, const void *bp) { const struct pfsync_ins_ack *iack = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(iack->id), - ntohl(iack->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(iack->id), ntohl(iack->creatorid))); } static void -pfsync_print_upd_c(const void *bp) +pfsync_print_upd_c(netdissect_options *ndo, const void *bp) { const struct pfsync_upd_c *u = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(u->id), - ntohl(u->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(u->id), ntohl(u->creatorid))); if (vflag > 2) { - printf("\n\tTCP? :"); - print_src_dst(&u->src, &u->dst, IPPROTO_TCP); + ND_PRINT((ndo, "\n\tTCP? :")); + print_src_dst(ndo, &u->src, &u->dst, IPPROTO_TCP); } } static void -pfsync_print_upd_req(const void *bp) +pfsync_print_upd_req(netdissect_options *ndo, const void *bp) { const struct pfsync_upd_req *ur = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(ur->id), - ntohl(ur->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(ur->id), ntohl(ur->creatorid))); } static void -pfsync_print_del_c(const void *bp) +pfsync_print_del_c(netdissect_options *ndo, const void *bp) { const struct pfsync_del_c *d = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(d->id), - ntohl(d->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(d->id), ntohl(d->creatorid))); } static void -pfsync_print_bus(const void *bp) +pfsync_print_bus(netdissect_options *ndo, const void *bp) { const struct pfsync_bus *b = bp; uint32_t endtime; @@ -278,95 +284,95 @@ pfsync_print_bus(const void *bp) break; } - printf("\n\tcreatorid: %08x age: %.2u:%.2u:%.2u status: %s", - htonl(b->creatorid), endtime, min, sec, status); + ND_PRINT((ndo, "\n\tcreatorid: %08x age: %.2u:%.2u:%.2u status: %s", + htonl(b->creatorid), endtime, min, sec, status)); } static void -pfsync_print_tdb(const void *bp) +pfsync_print_tdb(netdissect_options *ndo, const void *bp) { const struct pfsync_tdb *t = bp; - printf("\n\tspi: 0x%08x rpl: %ju cur_bytes: %ju", + ND_PRINT((ndo, "\n\tspi: 0x%08x rpl: %ju cur_bytes: %ju", ntohl(t->spi), (uintmax_t )be64toh(t->rpl), - (uintmax_t )be64toh(t->cur_bytes)); + (uintmax_t )be64toh(t->cur_bytes))); } static void -print_host(struct pf_addr *addr, uint16_t port, sa_family_t af, - const char *proto) +print_host(netdissect_options *ndo, struct pf_addr *addr, uint16_t port, + sa_family_t af, const char *proto) { char buf[48]; if (inet_ntop(af, addr, buf, sizeof(buf)) == NULL) - printf("?"); + ND_PRINT((ndo, "?")); else - printf("%s", buf); + ND_PRINT((ndo, "%s", buf)); if (port) - printf(".%hu", ntohs(port)); + ND_PRINT((ndo, ".%hu", ntohs(port))); } static void -print_seq(const struct pfsync_state_peer *p) +print_seq(netdissect_options *ndo, const struct pfsync_state_peer *p) { if (p->seqdiff) - printf("[%u + %u](+%u)", ntohl(p->seqlo), - ntohl(p->seqhi) - ntohl(p->seqlo), ntohl(p->seqdiff)); + ND_PRINT((ndo, "[%u + %u](+%u)", ntohl(p->seqlo), + ntohl(p->seqhi) - ntohl(p->seqlo), ntohl(p->seqdiff))); else - printf("[%u + %u]", ntohl(p->seqlo), - ntohl(p->seqhi) - ntohl(p->seqlo)); + ND_PRINT((ndo, "[%u + %u]", ntohl(p->seqlo), + ntohl(p->seqhi) - ntohl(p->seqlo))); } static void -print_src_dst(const struct pfsync_state_peer *src, +print_src_dst(netdissect_options *ndo, const struct pfsync_state_peer *src, const struct pfsync_state_peer *dst, uint8_t proto) { if (proto == IPPROTO_TCP) { if (src->state <= TCPS_TIME_WAIT && dst->state <= TCPS_TIME_WAIT) - printf(" %s:%s", tcpstates[src->state], - tcpstates[dst->state]); + ND_PRINT((ndo, " %s:%s", tcpstates[src->state], + tcpstates[dst->state])); else if (src->state == PF_TCPS_PROXY_SRC || dst->state == PF_TCPS_PROXY_SRC) - printf(" PROXY:SRC"); + ND_PRINT((ndo, " PROXY:SRC")); else if (src->state == PF_TCPS_PROXY_DST || dst->state == PF_TCPS_PROXY_DST) - printf(" PROXY:DST"); + ND_PRINT((ndo, " PROXY:DST")); else - printf(" ", - src->state, dst->state); + ND_PRINT((ndo, " ", + src->state, dst->state)); if (vflag > 1) { - printf("\n\t"); - print_seq(src); + ND_PRINT((ndo, "\n\t")); + print_seq(ndo, src); if (src->wscale && dst->wscale) - printf(" wscale %u", - src->wscale & PF_WSCALE_MASK); - printf(" "); - print_seq(dst); + ND_PRINT((ndo, " wscale %u", + src->wscale & PF_WSCALE_MASK)); + ND_PRINT((ndo, " ")); + print_seq(ndo, dst); if (src->wscale && dst->wscale) - printf(" wscale %u", - dst->wscale & PF_WSCALE_MASK); + ND_PRINT((ndo, " wscale %u", + dst->wscale & PF_WSCALE_MASK)); } } else if (proto == IPPROTO_UDP && src->state < PFUDPS_NSTATES && dst->state < PFUDPS_NSTATES) { const char *states[] = PFUDPS_NAMES; - printf(" %s:%s", states[src->state], states[dst->state]); + ND_PRINT((ndo, " %s:%s", states[src->state], states[dst->state])); } else if (proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES && dst->state < PFOTHERS_NSTATES) { /* XXX ICMP doesn't really have state levels */ const char *states[] = PFOTHERS_NAMES; - printf(" %s:%s", states[src->state], states[dst->state]); + ND_PRINT((ndo, " %s:%s", states[src->state], states[dst->state])); } else { - printf(" %u:%u", src->state, dst->state); + ND_PRINT((ndo, " %u:%u", src->state, dst->state)); } } static void -print_state(struct pfsync_state *s) +print_state(netdissect_options *ndo, struct pfsync_state *s) { struct pfsync_state_peer *src, *dst; struct pfsync_state_key *sk, *nk; @@ -387,29 +393,29 @@ print_state(struct pfsync_state *s) if (s->proto == IPPROTO_ICMP || s->proto == IPPROTO_ICMPV6) sk->port[1] = nk->port[1]; } - printf("\t%s ", s->ifname); - printf("proto %u ", s->proto); + ND_PRINT((ndo, "\t%s ", s->ifname)); + ND_PRINT((ndo, "proto %u ", s->proto)); - print_host(&nk->addr[1], nk->port[1], s->af, NULL); + print_host(ndo, &nk->addr[1], nk->port[1], s->af, NULL); if (PF_ANEQ(&nk->addr[1], &sk->addr[1], s->af) || nk->port[1] != sk->port[1]) { - printf(" ("); - print_host(&sk->addr[1], sk->port[1], s->af, NULL); - printf(")"); + ND_PRINT((ndo, " (")); + print_host(ndo, &sk->addr[1], sk->port[1], s->af, NULL); + ND_PRINT((ndo, ")")); } if (s->direction == PF_OUT) - printf(" -> "); + ND_PRINT((ndo, " -> ")); else - printf(" <- "); - print_host(&nk->addr[0], nk->port[0], s->af, NULL); + ND_PRINT((ndo, " <- ")); + print_host(ndo, &nk->addr[0], nk->port[0], s->af, NULL); if (PF_ANEQ(&nk->addr[0], &sk->addr[0], s->af) || nk->port[0] != sk->port[0]) { - printf(" ("); - print_host(&sk->addr[0], sk->port[0], s->af, NULL); - printf(")"); + ND_PRINT((ndo, " (")); + print_host(ndo, &sk->addr[0], sk->port[0], s->af, NULL); + ND_PRINT((ndo, ")")); } - print_src_dst(src, dst, s->proto); + print_src_dst(ndo, src, dst, s->proto); if (vflag > 1) { uint64_t packets[2]; @@ -421,30 +427,30 @@ print_state(struct pfsync_state *s) creation /= 60; min = creation % 60; creation /= 60; - printf("\n\tage %.2u:%.2u:%.2u", creation, min, sec); + ND_PRINT((ndo, "\n\tage %.2u:%.2u:%.2u", creation, min, sec)); sec = expire % 60; expire /= 60; min = expire % 60; expire /= 60; - printf(", expires in %.2u:%.2u:%.2u", expire, min, sec); + ND_PRINT((ndo, ", expires in %.2u:%.2u:%.2u", expire, min, sec)); bcopy(s->packets[0], &packets[0], sizeof(uint64_t)); bcopy(s->packets[1], &packets[1], sizeof(uint64_t)); bcopy(s->bytes[0], &bytes[0], sizeof(uint64_t)); bcopy(s->bytes[1], &bytes[1], sizeof(uint64_t)); - printf(", %ju:%ju pkts, %ju:%ju bytes", + ND_PRINT((ndo, ", %ju:%ju pkts, %ju:%ju bytes", be64toh(packets[0]), be64toh(packets[1]), - be64toh(bytes[0]), be64toh(bytes[1])); + be64toh(bytes[0]), be64toh(bytes[1]))); if (s->anchor != ntohl(-1)) - printf(", anchor %u", ntohl(s->anchor)); + ND_PRINT((ndo, ", anchor %u", ntohl(s->anchor))); if (s->rule != ntohl(-1)) - printf(", rule %u", ntohl(s->rule)); + ND_PRINT((ndo, ", rule %u", ntohl(s->rule))); } if (vflag > 1) { uint64_t id; bcopy(&s->id, &id, sizeof(uint64_t)); - printf("\n\tid: %016jx creatorid: %08x", - (uintmax_t )be64toh(id), ntohl(s->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t )be64toh(id), ntohl(s->creatorid))); } } From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 16:20:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4BEB653; Fri, 24 Apr 2015 16:20:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 919A0112E; Fri, 24 Apr 2015 16:20:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OGKvQQ075242; Fri, 24 Apr 2015 16:20:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OGKvpe075240; Fri, 24 Apr 2015 16:20:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504241620.t3OGKvpe075240@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Apr 2015 16:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281940 - in head/sys: amd64/amd64 amd64/include conf i386/i386 i386/include i386/xen x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 16:20:57 -0000 Author: kib Date: Fri Apr 24 16:20:56 2015 New Revision: 281940 URL: https://svnweb.freebsd.org/changeset/base/281940 Log: Move common code from sys/i386/i386/mp_machdep.c and sys/amd64/amd64/mp_machdep.c, to the new common x86 source sys/x86/x86/mp_x86.c. Proposed and reviewed by: jhb Review: https://reviews.freebsd.org/D2347 Sponsored by: The FreeBSD Foundation Added: head/sys/x86/x86/mp_x86.c - copied, changed from r281937, head/sys/i386/i386/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/smp.h head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/i386/i386/mp_machdep.c head/sys/i386/include/smp.h head/sys/i386/xen/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Apr 24 16:12:30 2015 (r281939) +++ head/sys/amd64/amd64/mp_machdep.c Fri Apr 24 16:20:56 2015 (r281940) @@ -81,28 +81,11 @@ __FBSDID("$FreeBSD$"); #define BIOS_RESET (0x0f) #define BIOS_WARM (0x0a) -/* lock region used by kernel profiling */ -int mcount_lock; - -int mp_naps; /* # of Applications processors */ -int boot_cpu_id = -1; /* designated BSP */ - -extern struct pcpu __pcpu[]; - -/* AP uses this during bootstrap. Do not staticize. */ -char *bootSTK; -int bootAP; - -/* Free these after use */ -void *bootstacks[MAXCPU]; +extern struct pcpu __pcpu[]; /* Temporary variables for init_secondary() */ char *doublefault_stack; char *nmi_stack; -void *dpcpu; - -struct pcb stoppcbs[MAXCPU]; -struct susppcb **susppcbs; /* Variables needed for SMP tlb shootdown. */ vm_offset_t smp_tlb_addr2; @@ -112,309 +95,16 @@ uint64_t pcid_cr3; pmap_t smp_tlb_pmap; extern int invpcid_works; -#ifdef COUNT_IPIS -/* Interrupt counts. */ -static u_long *ipi_preempt_counts[MAXCPU]; -static u_long *ipi_ast_counts[MAXCPU]; -u_long *ipi_invltlb_counts[MAXCPU]; -u_long *ipi_invlrng_counts[MAXCPU]; -u_long *ipi_invlpg_counts[MAXCPU]; -u_long *ipi_invlcache_counts[MAXCPU]; -u_long *ipi_rendezvous_counts[MAXCPU]; -static u_long *ipi_hardclock_counts[MAXCPU]; -#endif - -/* Default cpu_ops implementation. */ -struct cpu_ops cpu_ops; - extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); -extern int pmap_pcid_enabled; - /* * Local data and functions. */ -static volatile cpuset_t ipi_nmi_pending; - -/* used to hold the AP's until we are ready to release them */ -struct mtx ap_boot_mtx; - -/* Set to 1 once we're ready to let the APs out of the pen. */ -static volatile int aps_ready = 0; - -/* - * Store data from cpu_add() until later in the boot when we actually setup - * the APs. - */ -struct cpu_info { - int cpu_present:1; - int cpu_bsp:1; - int cpu_disabled:1; - int cpu_hyperthread:1; -} static cpu_info[MAX_APIC_ID + 1]; -int cpu_apic_ids[MAXCPU]; -int apic_cpuids[MAX_APIC_ID + 1]; - -/* Holds pending bitmap based IPIs per CPU */ -volatile u_int cpu_ipi_pending[MAXCPU]; - -static u_int boot_address; -static int cpu_logical; /* logical cpus per core */ -static int cpu_cores; /* cores per package */ - -static void assign_cpu_ids(void); -static void set_interrupt_apic_ids(void); static int start_ap(int apic_id); -static void release_aps(void *dummy); -static u_int hyperthreading_cpus; /* logical cpus sharing L1 cache */ -static int hyperthreading_allowed = 1; static u_int bootMP_size; - -static void -mem_range_AP_init(void) -{ - if (mem_range_softc.mr_op && mem_range_softc.mr_op->initAP) - mem_range_softc.mr_op->initAP(&mem_range_softc); -} - -static void -topo_probe_amd(void) -{ - int core_id_bits; - int id; - - /* AMD processors do not support HTT. */ - cpu_logical = 1; - - if ((amd_feature2 & AMDID2_CMP) == 0) { - cpu_cores = 1; - return; - } - - core_id_bits = (cpu_procinfo2 & AMDID_COREID_SIZE) >> - AMDID_COREID_SIZE_SHIFT; - if (core_id_bits == 0) { - cpu_cores = (cpu_procinfo2 & AMDID_CMP_CORES) + 1; - return; - } - - /* Fam 10h and newer should get here. */ - for (id = 0; id <= MAX_APIC_ID; id++) { - /* Check logical CPU availability. */ - if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled) - continue; - /* Check if logical CPU has the same package ID. */ - if ((id >> core_id_bits) != (boot_cpu_id >> core_id_bits)) - continue; - cpu_cores++; - } -} - -/* - * Round up to the next power of two, if necessary, and then - * take log2. - * Returns -1 if argument is zero. - */ -static __inline int -mask_width(u_int x) -{ - - return (fls(x << (1 - powerof2(x))) - 1); -} - -static void -topo_probe_0x4(void) -{ - u_int p[4]; - int pkg_id_bits; - int core_id_bits; - int max_cores; - int max_logical; - int id; - - /* Both zero and one here mean one logical processor per package. */ - max_logical = (cpu_feature & CPUID_HTT) != 0 ? - (cpu_procinfo & CPUID_HTT_CORES) >> 16 : 1; - if (max_logical <= 1) - return; - - /* - * Because of uniformity assumption we examine only - * those logical processors that belong to the same - * package as BSP. Further, we count number of - * logical processors that belong to the same core - * as BSP thus deducing number of threads per core. - */ - if (cpu_high >= 0x4) { - cpuid_count(0x04, 0, p); - max_cores = ((p[0] >> 26) & 0x3f) + 1; - } else - max_cores = 1; - core_id_bits = mask_width(max_logical/max_cores); - if (core_id_bits < 0) - return; - pkg_id_bits = core_id_bits + mask_width(max_cores); - - for (id = 0; id <= MAX_APIC_ID; id++) { - /* Check logical CPU availability. */ - if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled) - continue; - /* Check if logical CPU has the same package ID. */ - if ((id >> pkg_id_bits) != (boot_cpu_id >> pkg_id_bits)) - continue; - cpu_cores++; - /* Check if logical CPU has the same package and core IDs. */ - if ((id >> core_id_bits) == (boot_cpu_id >> core_id_bits)) - cpu_logical++; - } - - KASSERT(cpu_cores >= 1 && cpu_logical >= 1, - ("topo_probe_0x4 couldn't find BSP")); - - cpu_cores /= cpu_logical; - hyperthreading_cpus = cpu_logical; -} - -static void -topo_probe_0xb(void) -{ - u_int p[4]; - int bits; - int cnt; - int i; - int logical; - int type; - int x; - - /* We only support three levels for now. */ - for (i = 0; i < 3; i++) { - cpuid_count(0x0b, i, p); - - /* Fall back if CPU leaf 11 doesn't really exist. */ - if (i == 0 && p[1] == 0) { - topo_probe_0x4(); - return; - } - - bits = p[0] & 0x1f; - logical = p[1] &= 0xffff; - type = (p[2] >> 8) & 0xff; - if (type == 0 || logical == 0) - break; - /* - * Because of uniformity assumption we examine only - * those logical processors that belong to the same - * package as BSP. - */ - for (cnt = 0, x = 0; x <= MAX_APIC_ID; x++) { - if (!cpu_info[x].cpu_present || - cpu_info[x].cpu_disabled) - continue; - if (x >> bits == boot_cpu_id >> bits) - cnt++; - } - if (type == CPUID_TYPE_SMT) - cpu_logical = cnt; - else if (type == CPUID_TYPE_CORE) - cpu_cores = cnt; - } - if (cpu_logical == 0) - cpu_logical = 1; - cpu_cores /= cpu_logical; -} - -/* - * Both topology discovery code and code that consumes topology - * information assume top-down uniformity of the topology. - * That is, all physical packages must be identical and each - * core in a package must have the same number of threads. - * Topology information is queried only on BSP, on which this - * code runs and for which it can query CPUID information. - * Then topology is extrapolated on all packages using the - * uniformity assumption. - */ -static void -topo_probe(void) -{ - static int cpu_topo_probed = 0; - - if (cpu_topo_probed) - return; - - CPU_ZERO(&logical_cpus_mask); - if (mp_ncpus <= 1) - cpu_cores = cpu_logical = 1; - else if (cpu_vendor_id == CPU_VENDOR_AMD) - topo_probe_amd(); - else if (cpu_vendor_id == CPU_VENDOR_INTEL) { - /* - * See Intel(R) 64 Architecture Processor - * Topology Enumeration article for details. - * - * Note that 0x1 <= cpu_high < 4 case should be - * compatible with topo_probe_0x4() logic when - * CPUID.1:EBX[23:16] > 0 (cpu_cores will be 1) - * or it should trigger the fallback otherwise. - */ - if (cpu_high >= 0xb) - topo_probe_0xb(); - else if (cpu_high >= 0x1) - topo_probe_0x4(); - } - - /* - * Fallback: assume each logical CPU is in separate - * physical package. That is, no multi-core, no SMT. - */ - if (cpu_cores == 0 || cpu_logical == 0) - cpu_cores = cpu_logical = 1; - cpu_topo_probed = 1; -} - -struct cpu_group * -cpu_topo(void) -{ - int cg_flags; - - /* - * Determine whether any threading flags are - * necessry. - */ - topo_probe(); - if (cpu_logical > 1 && hyperthreading_cpus) - cg_flags = CG_FLAG_HTT; - else if (cpu_logical > 1) - cg_flags = CG_FLAG_SMT; - else - cg_flags = 0; - if (mp_ncpus % (cpu_cores * cpu_logical) != 0) { - printf("WARNING: Non-uniform processors.\n"); - printf("WARNING: Using suboptimal topology.\n"); - return (smp_topo_none()); - } - /* - * No multi-core or hyper-threaded. - */ - if (cpu_logical * cpu_cores == 1) - return (smp_topo_none()); - /* - * Only HTT no multi-core. - */ - if (cpu_logical > 1 && cpu_cores == 1) - return (smp_topo_1level(CG_SHARE_L1, cpu_logical, cg_flags)); - /* - * Only multi-core no HTT. - */ - if (cpu_cores > 1 && cpu_logical == 1) - return (smp_topo_1level(CG_SHARE_L2, cpu_cores, cg_flags)); - /* - * Both HTT and multi-core. - */ - return (smp_topo_2level(CG_SHARE_L2, cpu_cores, - CG_SHARE_L1, cpu_logical, cg_flags)); -} +static u_int boot_address; /* * Calculate usable address in base memory for AP trampoline code. @@ -433,85 +123,6 @@ mp_bootaddress(u_int basemem) return mptramp_pagetables; } -void -cpu_add(u_int apic_id, char boot_cpu) -{ - - if (apic_id > MAX_APIC_ID) { - panic("SMP: APIC ID %d too high", apic_id); - return; - } - KASSERT(cpu_info[apic_id].cpu_present == 0, ("CPU %d added twice", - apic_id)); - cpu_info[apic_id].cpu_present = 1; - if (boot_cpu) { - KASSERT(boot_cpu_id == -1, - ("CPU %d claims to be BSP, but CPU %d already is", apic_id, - boot_cpu_id)); - boot_cpu_id = apic_id; - cpu_info[apic_id].cpu_bsp = 1; - } - if (mp_ncpus < MAXCPU) { - mp_ncpus++; - mp_maxid = mp_ncpus - 1; - } - if (bootverbose) - printf("SMP: Added CPU %d (%s)\n", apic_id, boot_cpu ? "BSP" : - "AP"); -} - -void -cpu_mp_setmaxid(void) -{ - - /* - * mp_maxid should be already set by calls to cpu_add(). - * Just sanity check its value here. - */ - if (mp_ncpus == 0) - KASSERT(mp_maxid == 0, - ("%s: mp_ncpus is zero, but mp_maxid is not", __func__)); - else if (mp_ncpus == 1) - mp_maxid = 0; - else - KASSERT(mp_maxid >= mp_ncpus - 1, - ("%s: counters out of sync: max %d, count %d", __func__, - mp_maxid, mp_ncpus)); -} - -int -cpu_mp_probe(void) -{ - - /* - * Always record BSP in CPU map so that the mbuf init code works - * correctly. - */ - CPU_SETOF(0, &all_cpus); - if (mp_ncpus == 0) { - /* - * No CPUs were found, so this must be a UP system. Setup - * the variables to represent a system with a single CPU - * with an id of 0. - */ - mp_ncpus = 1; - return (0); - } - - /* At least one CPU was found. */ - if (mp_ncpus == 1) { - /* - * One CPU was found, so this must be a UP system with - * an I/O APIC. - */ - mp_maxid = 0; - return (0); - } - - /* At least two CPUs were found. */ - return (1); -} - /* * Initialize the IPI handlers and start up the AP's. */ @@ -575,47 +186,6 @@ cpu_mp_start(void) /* - * Print various information about the SMP system hardware and setup. - */ -void -cpu_mp_announce(void) -{ - const char *hyperthread; - int i; - - printf("FreeBSD/SMP: %d package(s) x %d core(s)", - mp_ncpus / (cpu_cores * cpu_logical), cpu_cores); - if (hyperthreading_cpus > 1) - printf(" x %d HTT threads", cpu_logical); - else if (cpu_logical > 1) - printf(" x %d SMT threads", cpu_logical); - printf("\n"); - - /* List active CPUs first. */ - printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id); - for (i = 1; i < mp_ncpus; i++) { - if (cpu_info[cpu_apic_ids[i]].cpu_hyperthread) - hyperthread = "/HT"; - else - hyperthread = ""; - printf(" cpu%d (AP%s): APIC ID: %2d\n", i, hyperthread, - cpu_apic_ids[i]); - } - - /* List disabled CPUs last. */ - for (i = 0; i <= MAX_APIC_ID; i++) { - if (!cpu_info[i].cpu_present || !cpu_info[i].cpu_disabled) - continue; - if (cpu_info[i].cpu_hyperthread) - hyperthread = "/HT"; - else - hyperthread = ""; - printf(" cpu (AP%s): APIC ID: %2d (disabled)\n", hyperthread, - i); - } -} - -/* * AP CPU's call this to initialize themselves. */ void @@ -624,7 +194,6 @@ init_secondary(void) struct pcpu *pc; struct nmi_pcpu *np; u_int64_t msr, cr0; - u_int cpuid; int cpu, gsel_tss, x; struct region_descriptor ap_gdt; @@ -712,94 +281,7 @@ init_secondary(void) while (!aps_ready) ia32_pause(); - /* - * On real hardware, switch to x2apic mode if possible. Do it - * after aps_ready was signalled, to avoid manipulating the - * mode while BSP might still want to send some IPI to us - * (second startup IPI is ignored on modern hardware etc). - */ - lapic_xapic_mode(); - - /* Initialize the PAT MSR. */ - pmap_init_pat(); - - /* set up CPU registers and state */ - cpu_setregs(); - - /* set up SSE/NX */ - initializecpu(); - - /* set up FPU state on the AP */ - fpuinit(); - - if (cpu_ops.cpu_init) - cpu_ops.cpu_init(); - - /* A quick check from sanity claus */ - cpuid = PCPU_GET(cpuid); - if (PCPU_GET(apic_id) != lapic_id()) { - printf("SMP: cpuid = %d\n", cpuid); - printf("SMP: actual apic_id = %d\n", lapic_id()); - printf("SMP: correct apic_id = %d\n", PCPU_GET(apic_id)); - panic("cpuid mismatch! boom!!"); - } - - /* Initialize curthread. */ - KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); - PCPU_SET(curthread, PCPU_GET(idlethread)); - - mca_init(); - - mtx_lock_spin(&ap_boot_mtx); - - /* Init local apic for irq's */ - lapic_setup(1); - - /* Set memory range attributes for this CPU to match the BSP */ - mem_range_AP_init(); - - smp_cpus++; - - CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", cpuid); - printf("SMP: AP CPU #%d Launched!\n", cpuid); - - /* Determine if we are a logical CPU. */ - /* XXX Calculation depends on cpu_logical being a power of 2, e.g. 2 */ - if (cpu_logical > 1 && PCPU_GET(apic_id) % cpu_logical != 0) - CPU_SET(cpuid, &logical_cpus_mask); - - if (bootverbose) - lapic_dump("AP"); - - if (smp_cpus == mp_ncpus) { - /* enable IPI's, tlb shootdown, freezes etc */ - atomic_store_rel_int(&smp_started, 1); - } - - /* - * Enable global pages TLB extension - * This also implicitly flushes the TLB - */ - - load_cr4(rcr4() | CR4_PGE); - if (pmap_pcid_enabled) - load_cr4(rcr4() | CR4_PCIDE); - load_ds(_udatasel); - load_es(_udatasel); - load_fs(_ufssel); - mtx_unlock_spin(&ap_boot_mtx); - - /* Wait until all the AP's are up. */ - while (smp_started == 0) - ia32_pause(); - - /* Start per-CPU event timers. */ - cpu_initclocks_ap(); - - sched_throw(NULL); - - panic("scheduler returned us to %s", __func__); - /* NOTREACHED */ + init_secondary_tail(); } /******************************************************************* @@ -807,108 +289,6 @@ init_secondary(void) */ /* - * We tell the I/O APIC code about all the CPUs we want to receive - * interrupts. If we don't want certain CPUs to receive IRQs we - * can simply not tell the I/O APIC code about them in this function. - * We also do not tell it about the BSP since it tells itself about - * the BSP internally to work with UP kernels and on UP machines. - */ -static void -set_interrupt_apic_ids(void) -{ - u_int i, apic_id; - - for (i = 0; i < MAXCPU; i++) { - apic_id = cpu_apic_ids[i]; - if (apic_id == -1) - continue; - if (cpu_info[apic_id].cpu_bsp) - continue; - if (cpu_info[apic_id].cpu_disabled) - continue; - - /* Don't let hyperthreads service interrupts. */ - if (cpu_logical > 1 && - apic_id % cpu_logical != 0) - continue; - - intr_add_cpu(i); - } -} - -/* - * Assign logical CPU IDs to local APICs. - */ -static void -assign_cpu_ids(void) -{ - u_int i; - - TUNABLE_INT_FETCH("machdep.hyperthreading_allowed", - &hyperthreading_allowed); - - /* Check for explicitly disabled CPUs. */ - for (i = 0; i <= MAX_APIC_ID; i++) { - if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp) - continue; - - if (hyperthreading_cpus > 1 && i % hyperthreading_cpus != 0) { - cpu_info[i].cpu_hyperthread = 1; - - /* - * Don't use HT CPU if it has been disabled by a - * tunable. - */ - if (hyperthreading_allowed == 0) { - cpu_info[i].cpu_disabled = 1; - continue; - } - } - - /* Don't use this CPU if it has been disabled by a tunable. */ - if (resource_disabled("lapic", i)) { - cpu_info[i].cpu_disabled = 1; - continue; - } - } - - if (hyperthreading_allowed == 0 && hyperthreading_cpus > 1) { - hyperthreading_cpus = 0; - cpu_logical = 1; - } - - /* - * Assign CPU IDs to local APIC IDs and disable any CPUs - * beyond MAXCPU. CPU 0 is always assigned to the BSP. - * - * To minimize confusion for userland, we attempt to number - * CPUs such that all threads and cores in a package are - * grouped together. For now we assume that the BSP is always - * the first thread in a package and just start adding APs - * starting with the BSP's APIC ID. - */ - mp_ncpus = 1; - cpu_apic_ids[0] = boot_cpu_id; - apic_cpuids[boot_cpu_id] = 0; - for (i = boot_cpu_id + 1; i != boot_cpu_id; - i == MAX_APIC_ID ? i = 0 : i++) { - if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp || - cpu_info[i].cpu_disabled) - continue; - - if (mp_ncpus < MAXCPU) { - cpu_apic_ids[mp_ncpus] = i; - apic_cpuids[i] = mp_ncpus; - mp_ncpus++; - } else - cpu_info[i].cpu_disabled = 1; - } - KASSERT(mp_maxid >= mp_ncpus - 1, - ("%s: counters out of sync: max %d, count %d", __func__, mp_maxid, - mp_ncpus)); -} - -/* * start each AP in our list */ int @@ -1026,129 +406,6 @@ start_ap(int apic_id) return 0; /* return FAILURE */ } -#ifdef COUNT_XINVLTLB_HITS -u_int xhits_gbl[MAXCPU]; -u_int xhits_pg[MAXCPU]; -u_int xhits_rng[MAXCPU]; -static SYSCTL_NODE(_debug, OID_AUTO, xhits, CTLFLAG_RW, 0, ""); -SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, global, CTLFLAG_RW, &xhits_gbl, - sizeof(xhits_gbl), "IU", ""); -SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, page, CTLFLAG_RW, &xhits_pg, - sizeof(xhits_pg), "IU", ""); -SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, range, CTLFLAG_RW, &xhits_rng, - sizeof(xhits_rng), "IU", ""); - -u_int ipi_global; -u_int ipi_page; -u_int ipi_range; -u_int ipi_range_size; -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_global, CTLFLAG_RW, &ipi_global, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_page, CTLFLAG_RW, &ipi_page, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_range, CTLFLAG_RW, &ipi_range, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_range_size, CTLFLAG_RW, - &ipi_range_size, 0, ""); - -u_int ipi_masked_global; -u_int ipi_masked_page; -u_int ipi_masked_range; -u_int ipi_masked_range_size; -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_global, CTLFLAG_RW, - &ipi_masked_global, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_page, CTLFLAG_RW, - &ipi_masked_page, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_range, CTLFLAG_RW, - &ipi_masked_range, 0, ""); -SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_range_size, CTLFLAG_RW, - &ipi_masked_range_size, 0, ""); -#endif /* COUNT_XINVLTLB_HITS */ - -/* - * Init and startup IPI. - */ -void -ipi_startup(int apic_id, int vector) -{ - - /* - * This attempts to follow the algorithm described in the - * Intel Multiprocessor Specification v1.4 in section B.4. - * For each IPI, we allow the local APIC ~20us to deliver the - * IPI. If that times out, we panic. - */ - - /* - * first we do an INIT IPI: this INIT IPI might be run, resetting - * and running the target CPU. OR this INIT IPI might be latched (P5 - * bug), CPU waiting for STARTUP IPI. OR this INIT IPI might be - * ignored. - */ - lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL | - APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, apic_id); - lapic_ipi_wait(100); - - /* Explicitly deassert the INIT IPI. */ - lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_LEVEL | - APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT, - apic_id); - - DELAY(10000); /* wait ~10mS */ - - /* - * next we do a STARTUP IPI: the previous INIT IPI might still be - * latched, (P5 bug) this 1st STARTUP would then terminate - * immediately, and the previously started INIT IPI would continue. OR - * the previous INIT IPI has already run. and this STARTUP IPI will - * run. OR the previous INIT IPI was ignored. and this STARTUP IPI - * will run. - */ - lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | - APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | - vector, apic_id); - if (!lapic_ipi_wait(100)) - panic("Failed to deliver first STARTUP IPI to APIC %d", - apic_id); - DELAY(200); /* wait ~200uS */ - - /* - * finally we do a 2nd STARTUP IPI: this 2nd STARTUP IPI should run IF - * the previous STARTUP IPI was cancelled by a latched INIT IPI. OR - * this STARTUP IPI will be ignored, as only ONE STARTUP IPI is - * recognized after hardware RESET or INIT IPI. - */ - lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | - APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_STARTUP | - vector, apic_id); - if (!lapic_ipi_wait(100)) - panic("Failed to deliver second STARTUP IPI to APIC %d", - apic_id); - - DELAY(200); /* wait ~200uS */ -} - -/* - * Send an IPI to specified CPU handling the bitmap logic. - */ -static void -ipi_send_cpu(int cpu, u_int ipi) -{ - u_int bitmap, old_pending, new_pending; - - KASSERT(cpu_apic_ids[cpu] != -1, ("IPI to non-existent CPU %d", cpu)); - - if (IPI_IS_BITMAPED(ipi)) { - bitmap = 1 << ipi; - ipi = IPI_BITMAP_VECTOR; - do { - old_pending = cpu_ipi_pending[cpu]; - new_pending = old_pending | bitmap; - } while (!atomic_cmpset_int(&cpu_ipi_pending[cpu], - old_pending, new_pending)); - if (old_pending) - return; - } - lapic_ipi_vectored(ipi, cpu_apic_ids[cpu]); -} - /* * Flush the TLB on all other CPU's */ @@ -1228,26 +485,6 @@ smp_targeted_tlb_shootdown(cpuset_t mask } void -smp_cache_flush(void) -{ - - if (smp_started) - smp_tlb_shootdown(IPI_INVLCACHE, NULL, 0, 0); -} - -void -smp_invltlb(pmap_t pmap) -{ - - if (smp_started) { - smp_tlb_shootdown(IPI_INVLTLB, pmap, 0, 0); -#ifdef COUNT_XINVLTLB_HITS - ipi_global++; -#endif - } -} - -void smp_invlpg(pmap_t pmap, vm_offset_t addr) { @@ -1312,210 +549,23 @@ smp_masked_invlpg_range(cpuset_t mask, p } void -ipi_bitmap_handler(struct trapframe frame) -{ - struct trapframe *oldframe; - struct thread *td; - int cpu = PCPU_GET(cpuid); - u_int ipi_bitmap; - - critical_enter(); - td = curthread; - td->td_intr_nesting_level++; - oldframe = td->td_intr_frame; - td->td_intr_frame = &frame; - ipi_bitmap = atomic_readandclear_int(&cpu_ipi_pending[cpu]); - if (ipi_bitmap & (1 << IPI_PREEMPT)) { -#ifdef COUNT_IPIS - (*ipi_preempt_counts[cpu])++; -#endif - sched_preempt(td); - } - if (ipi_bitmap & (1 << IPI_AST)) { -#ifdef COUNT_IPIS - (*ipi_ast_counts[cpu])++; -#endif - /* Nothing to do for AST */ - } - if (ipi_bitmap & (1 << IPI_HARDCLOCK)) { -#ifdef COUNT_IPIS - (*ipi_hardclock_counts[cpu])++; -#endif - hardclockintr(); - } - td->td_intr_frame = oldframe; - td->td_intr_nesting_level--; - critical_exit(); -} - -/* - * send an IPI to a set of cpus. - */ -void -ipi_selected(cpuset_t cpus, u_int ipi) -{ - int cpu; - - /* - * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit - * of help in order to understand what is the source. - * Set the mask of receiving CPUs for this purpose. - */ - if (ipi == IPI_STOP_HARD) - CPU_OR_ATOMIC(&ipi_nmi_pending, &cpus); - - while ((cpu = CPU_FFS(&cpus)) != 0) { - cpu--; - CPU_CLR(cpu, &cpus); - CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi); - ipi_send_cpu(cpu, ipi); - } -} - -/* - * send an IPI to a specific CPU. - */ -void -ipi_cpu(int cpu, u_int ipi) -{ - - /* - * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit - * of help in order to understand what is the source. - * Set the mask of receiving CPUs for this purpose. - */ - if (ipi == IPI_STOP_HARD) - CPU_SET_ATOMIC(cpu, &ipi_nmi_pending); - - CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi); - ipi_send_cpu(cpu, ipi); -} - -/* - * send an IPI to all CPUs EXCEPT myself - */ -void -ipi_all_but_self(u_int ipi) +smp_cache_flush(void) { - cpuset_t other_cpus; - - other_cpus = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &other_cpus); - - if (IPI_IS_BITMAPED(ipi)) { - ipi_selected(other_cpus, ipi); - return; - } - - /* - * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit - * of help in order to understand what is the source. - * Set the mask of receiving CPUs for this purpose. - */ - if (ipi == IPI_STOP_HARD) - CPU_OR_ATOMIC(&ipi_nmi_pending, &other_cpus); - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); + if (smp_started) + smp_tlb_shootdown(IPI_INVLCACHE, NULL, 0, 0); } -int -ipi_nmi_handler() -{ - u_int cpuid; - - /* - * As long as there is not a simple way to know about a NMI's - * source, if the bitmask for the current CPU is present in - * the global pending bitword an IPI_STOP_HARD has been issued - * and should be handled. - */ - cpuid = PCPU_GET(cpuid); - if (!CPU_ISSET(cpuid, &ipi_nmi_pending)) - return (1); - - CPU_CLR_ATOMIC(cpuid, &ipi_nmi_pending); - cpustop_handler(); - return (0); -} - -/* - * Handle an IPI_STOP by saving our current context and spinning until we - * are resumed. - */ void -cpustop_handler(void) -{ - u_int cpu; - - cpu = PCPU_GET(cpuid); - - savectx(&stoppcbs[cpu]); - - /* Indicate that we are stopped */ - CPU_SET_ATOMIC(cpu, &stopped_cpus); - - /* Wait for restart */ - while (!CPU_ISSET(cpu, &started_cpus)) - ia32_pause(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 16:56:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D9E5350; Fri, 24 Apr 2015 16:56:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BBC31574; Fri, 24 Apr 2015 16:56:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OGuPqH093259; Fri, 24 Apr 2015 16:56:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OGuOA9093255; Fri, 24 Apr 2015 16:56:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504241656.t3OGuOA9093255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 Apr 2015 16:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281941 - head/sys/dev/ipmi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 16:56:25 -0000 Author: jhb Date: Fri Apr 24 16:56:23 2015 New Revision: 281941 URL: https://svnweb.freebsd.org/changeset/base/281941 Log: Watchdog drivers need to support rearming the watchdog in contexts which are not permitted to sleep. Only use the IPMI watchdog with backends which poll driver-initiated requests to meet this requirement. In practice this means that watchdogs will no longer be used on systems that use the SSIF backend. Differential Revision: https://reviews.freebsd.org/D2062 MFC after: 2 weeks Modified: head/sys/dev/ipmi/ipmi.c head/sys/dev/ipmi/ipmi_kcs.c head/sys/dev/ipmi/ipmi_smic.c head/sys/dev/ipmi/ipmivars.h Modified: head/sys/dev/ipmi/ipmi.c ============================================================================== --- head/sys/dev/ipmi/ipmi.c Fri Apr 24 16:20:56 2015 (r281940) +++ head/sys/dev/ipmi/ipmi.c Fri Apr 24 16:56:23 2015 (r281941) @@ -756,17 +756,22 @@ ipmi_startup(void *arg) } device_printf(dev, "Number of channels %d\n", i); - /* probe for watchdog */ - IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), - IPMI_GET_WDOG, 0, 0); - - ipmi_submit_driver_request(sc, req, 0); - - if (req->ir_compcode == 0x00) { - device_printf(dev, "Attached watchdog\n"); - /* register the watchdog event handler */ - sc->ipmi_watchdog_tag = EVENTHANDLER_REGISTER(watchdog_list, - ipmi_wd_event, sc, 0); + /* + * Probe for watchdog, but only for backends which support + * polled driver requests. + */ + if (sc->ipmi_driver_requests_polled) { + IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_GET_WDOG, 0, 0); + + ipmi_submit_driver_request(sc, req, 0); + + if (req->ir_compcode == 0x00) { + device_printf(dev, "Attached watchdog\n"); + /* register the watchdog event handler */ + sc->ipmi_watchdog_tag = EVENTHANDLER_REGISTER( + watchdog_list, ipmi_wd_event, sc, 0); + } } sc->ipmi_cdev = make_dev(&ipmi_cdevsw, device_get_unit(dev), Modified: head/sys/dev/ipmi/ipmi_kcs.c ============================================================================== --- head/sys/dev/ipmi/ipmi_kcs.c Fri Apr 24 16:20:56 2015 (r281940) +++ head/sys/dev/ipmi/ipmi_kcs.c Fri Apr 24 16:56:23 2015 (r281941) @@ -520,6 +520,7 @@ ipmi_kcs_attach(struct ipmi_softc *sc) sc->ipmi_startup = kcs_startup; sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; sc->ipmi_driver_request = kcs_driver_request; + sc->ipmi_driver_requests_polled = 1; /* See if we can talk to the controller. */ status = INB(sc, KCS_CTL_STS); Modified: head/sys/dev/ipmi/ipmi_smic.c ============================================================================== --- head/sys/dev/ipmi/ipmi_smic.c Fri Apr 24 16:20:56 2015 (r281940) +++ head/sys/dev/ipmi/ipmi_smic.c Fri Apr 24 16:56:23 2015 (r281941) @@ -415,6 +415,7 @@ ipmi_smic_attach(struct ipmi_softc *sc) sc->ipmi_startup = smic_startup; sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; sc->ipmi_driver_request = smic_driver_request; + sc->ipmi_driver_requests_polled = 1; /* See if we can talk to the controller. */ flags = INB(sc, SMIC_FLAGS); Modified: head/sys/dev/ipmi/ipmivars.h ============================================================================== --- head/sys/dev/ipmi/ipmivars.h Fri Apr 24 16:20:56 2015 (r281940) +++ head/sys/dev/ipmi/ipmivars.h Fri Apr 24 16:56:23 2015 (r281941) @@ -105,6 +105,7 @@ struct ipmi_softc { int ipmi_opened; struct cdev *ipmi_cdev; TAILQ_HEAD(,ipmi_request) ipmi_pending_requests; + int ipmi_driver_requests_polled; eventhandler_tag ipmi_watchdog_tag; int ipmi_watchdog_active; struct intr_config_hook ipmi_ich; From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 17:03:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB82F657; Fri, 24 Apr 2015 17:03:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9D8A167B; Fri, 24 Apr 2015 17:03:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OH3rk6097922; Fri, 24 Apr 2015 17:03:53 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OH3rpr097920; Fri, 24 Apr 2015 17:03:53 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201504241703.t3OH3rpr097920@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Fri, 24 Apr 2015 17:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281942 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 17:03:54 -0000 Author: scottl Date: Fri Apr 24 17:03:53 2015 New Revision: 281942 URL: https://svnweb.freebsd.org/changeset/base/281942 Log: Revert r281451. It causes a panic/hang early in boot for a number of users, myself included. The original code is likely papering over a larger bug that needs to be explored, but for now get things back to a working state. Obtained from: Netflix, Inc. MFC after: immediately Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Fri Apr 24 16:56:23 2015 (r281941) +++ head/sys/vm/uma_int.h Fri Apr 24 17:03:53 2015 (r281942) @@ -311,7 +311,7 @@ struct uma_zone { * This HAS to be the last item because we adjust the zone size * based on NCPU and then allocate the space for the zones. */ - struct uma_cache uz_cpu[]; /* Per cpu caches */ + struct uma_cache uz_cpu[1]; /* Per cpu caches */ }; /* From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 17:36:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F643507; Fri, 24 Apr 2015 17:36:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D2311B1C; Fri, 24 Apr 2015 17:36:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OHaR5j013329; Fri, 24 Apr 2015 17:36:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OHaR6c013328; Fri, 24 Apr 2015 17:36:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241736.t3OHaR6c013328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 17:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281944 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 17:36:27 -0000 Author: emaste Date: Fri Apr 24 17:36:26 2015 New Revision: 281944 URL: https://svnweb.freebsd.org/changeset/base/281944 Log: vt(4): Simplify mouse area detection vt_is_cursor_in_area needs to return true if any part of the mouse cursor is visible in the rectangle area. Replace the existing test with a simpler version of a test for overlapping rectangles. Differential Revision: https://reviews.freebsd.org/D2356 Reviewed by: ray Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Apr 24 17:05:18 2015 (r281943) +++ head/sys/dev/vt/vt_core.c Fri Apr 24 17:36:26 2015 (r281944) @@ -1029,7 +1029,7 @@ vt_determine_colors(term_char_t c, int c int vt_is_cursor_in_area(const struct vt_device *vd, const term_rect_t *area) { - unsigned int mx, my, x1, y1, x2, y2; + unsigned int mx, my; /* * We use the cursor position saved during the current refresh, @@ -1038,18 +1038,12 @@ vt_is_cursor_in_area(const struct vt_dev mx = vd->vd_mx_drawn + vd->vd_curwindow->vw_draw_area.tr_begin.tp_col; my = vd->vd_my_drawn + vd->vd_curwindow->vw_draw_area.tr_begin.tp_row; - x1 = area->tr_begin.tp_col; - y1 = area->tr_begin.tp_row; - x2 = area->tr_end.tp_col; - y2 = area->tr_end.tp_row; - - if (((mx >= x1 && x2 - 1 >= mx) || - (mx < x1 && mx + vd->vd_mcursor->width >= x1)) && - ((my >= y1 && y2 - 1 >= my) || - (my < y1 && my + vd->vd_mcursor->height >= y1))) - return (1); - - return (0); + if (mx >= area->tr_end.tp_col || + mx + vd->vd_mcursor->width <= area->tr_begin.tp_col || + my >= area->tr_end.tp_row || + my + vd->vd_mcursor->height <= area->tr_begin.tp_row) + return (0); + return (1); } static void From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 18:07:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2023C1B; Fri, 24 Apr 2015 18:07:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFCB91E65; Fri, 24 Apr 2015 18:07:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OI7Ypk028393; Fri, 24 Apr 2015 18:07:34 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OI7Yml028392; Fri, 24 Apr 2015 18:07:34 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504241807.t3OI7Yml028392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 24 Apr 2015 18:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281945 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 18:07:35 -0000 Author: pfg Date: Fri Apr 24 18:07:34 2015 New Revision: 281945 URL: https://svnweb.freebsd.org/changeset/base/281945 Log: Add definition to support alloc_align attribute. gcc 4.9 added support for new alignment attribute alloc_align: The alloc_align attribute is used to tell the compiler that the function return value points to memory, where the returned pointer minimum alignment is given by one of the functions parameters. GCC uses this information to improve pointer alignment analysis. This attribute is not (yet) available on clang. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Apr 24 17:36:26 2015 (r281944) +++ head/sys/sys/cdefs.h Fri Apr 24 18:07:34 2015 (r281945) @@ -395,6 +395,12 @@ #define __alloc_size(x) #endif +#if __has_attribute(alloc_align) || __GNUC_PREREQ__(4, 9) +#define __alloc_align(x) __attribute__((__alloc_align__(x))) +#else +#define __alloc_align(x) +#endif + /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) #define __func__ NULL From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 18:19:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C3F3F78 for ; Fri, 24 Apr 2015 18:19:43 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5120C1F9D for ; Fri, 24 Apr 2015 18:19:43 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OIJhE7019512 for ; Fri, 24 Apr 2015 18:19:43 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t3OIJhTM019510 for svn-src-head@freebsd.org; Fri, 24 Apr 2015 18:19:43 GMT (envelope-from bdrewery) Received: (qmail 702 invoked from network); 24 Apr 2015 13:19:41 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 24 Apr 2015 13:19:41 -0500 Message-ID: <553A8942.3080205@FreeBSD.org> Date: Fri, 24 Apr 2015 13:19:46 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281942 - head/sys/vm References: <201504241703.t3OH3rpr097920@svn.freebsd.org> In-Reply-To: <201504241703.t3OH3rpr097920@svn.freebsd.org> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AU0SeX0GGVxQHDRlTvokvNngvdoh6a2RP" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 18:19:43 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --AU0SeX0GGVxQHDRlTvokvNngvdoh6a2RP Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/24/2015 12:03 PM, Scott Long wrote: > Author: scottl > Date: Fri Apr 24 17:03:53 2015 > New Revision: 281942 > URL: https://svnweb.freebsd.org/changeset/base/281942 >=20 > Log: > Revert r281451. It causes a panic/hang early in boot for a number of= The diff confused me at first. It is more proper to say revert r281451 _and_ r281162. I thought the sys/vm/uma_core.c change was missing at firs= t. Bryan --AU0SeX0GGVxQHDRlTvokvNngvdoh6a2RP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVOolCAAoJEDXXcbtuRpfPBn8IAK6WOjZz/bBnfpsSph9U/2oc AkGryDkmp8Pzr1wP9tqcSExkXaT9+Xpt0U7kW+SRbOJydJ/TN8ly6Kzosugepehd 151eAproo6mRBmlO4nKegT1FpZHG+9BU4QQ6VxkPPzk9nNr2jTLJhEwfw0pKhUvX wwP2u3xTkghcrZwHdIUkXYJwXtIABAOSqmoY0hKlUVUxpYckUzcKcwv0gJNLGrra mC5yTaiaE9bL8nd91cV0wSnoeMDhQr++Qx0BEmF57pjlcPd416cmEhaLmS2mFAvP hFSlJNLGOgvh7LP1goCimbKXg/DMcljDrXQKpgOXbDqD/qaoUhSV3nDHJf8Vgws= =Gzeo -----END PGP SIGNATURE----- --AU0SeX0GGVxQHDRlTvokvNngvdoh6a2RP-- From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 19:15:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BADCA290; Fri, 24 Apr 2015 19:15:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B5B5164C; Fri, 24 Apr 2015 19:15:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OJFdJW062984; Fri, 24 Apr 2015 19:15:39 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OJFd8K062983; Fri, 24 Apr 2015 19:15:39 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201504241915.t3OJFd8K062983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Fri, 24 Apr 2015 19:15:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281946 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 19:15:39 -0000 Author: neel Date: Fri Apr 24 19:15:38 2015 New Revision: 281946 URL: https://svnweb.freebsd.org/changeset/base/281946 Log: Don't allow guest to modify readonly bits in the PCI config 'status' register. Reported by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Fri Apr 24 18:07:34 2015 (r281945) +++ head/usr.sbin/bhyve/pci_emul.c Fri Apr 24 19:15:38 2015 (r281946) @@ -59,17 +59,6 @@ __FBSDID("$FreeBSD$"); #define CONF1_ENABLE 0x80000000ul -#define CFGWRITE(pi,off,val,b) \ -do { \ - if ((b) == 1) { \ - pci_set_cfgdata8((pi),(off),(val)); \ - } else if ((b) == 2) { \ - pci_set_cfgdata16((pi),(off),(val)); \ - } else { \ - pci_set_cfgdata32((pi),(off),(val)); \ - } \ -} while (0) - #define MAXBUSES (PCI_BUSMAX + 1) #define MAXSLOTS (PCI_SLOTMAX + 1) #define MAXFUNCS (PCI_FUNCMAX + 1) @@ -124,6 +113,30 @@ static void pci_lintr_update(struct pci_ static void pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func, int coff, int bytes, uint32_t *val); +static __inline void +CFGWRITE(struct pci_devinst *pi, int coff, uint32_t val, int bytes) +{ + + if (bytes == 1) + pci_set_cfgdata8(pi, coff, val); + else if (bytes == 2) + pci_set_cfgdata16(pi, coff, val); + else + pci_set_cfgdata32(pi, coff, val); +} + +static __inline uint32_t +CFGREAD(struct pci_devinst *pi, int coff, int bytes) +{ + + if (bytes == 1) + return (pci_get_cfgdata8(pi, coff)); + else if (bytes == 2) + return (pci_get_cfgdata16(pi, coff)); + else + return (pci_get_cfgdata32(pi, coff)); +} + /* * I/O access */ @@ -1653,27 +1666,31 @@ pci_emul_hdrtype_fixup(int bus, int slot } } -static uint32_t -bits_changed(uint32_t old, uint32_t new, uint32_t mask) -{ - - return ((old ^ new) & mask); -} - static void -pci_emul_cmdwrite(struct pci_devinst *pi, uint32_t new, int bytes) +pci_emul_cmdsts_write(struct pci_devinst *pi, int coff, uint32_t new, int bytes) { - int i; - uint16_t old; + int i, rshift; + uint32_t cmd, cmd2, changed, old, readonly; + + cmd = pci_get_cfgdata16(pi, PCIR_COMMAND); /* stash old value */ /* - * The command register is at an offset of 4 bytes and thus the - * guest could write 1, 2 or 4 bytes starting at this offset. + * From PCI Local Bus Specification 3.0 sections 6.2.2 and 6.2.3. + * + * XXX Bits 8, 11, 12, 13, 14 and 15 in the status register are + * 'write 1 to clear'. However these bits are not set to '1' by + * any device emulation so it is simpler to treat them as readonly. */ + rshift = (coff & 0x3) * 8; + readonly = 0xFFFFF880 >> rshift; + + old = CFGREAD(pi, coff, bytes); + new &= ~readonly; + new |= (old & readonly); + CFGWRITE(pi, coff, new, bytes); /* update config */ - old = pci_get_cfgdata16(pi, PCIR_COMMAND); /* stash old value */ - CFGWRITE(pi, PCIR_COMMAND, new, bytes); /* update config */ - new = pci_get_cfgdata16(pi, PCIR_COMMAND); /* get updated value */ + cmd2 = pci_get_cfgdata16(pi, PCIR_COMMAND); /* get updated value */ + changed = cmd ^ cmd2; /* * If the MMIO or I/O address space decoding has changed then @@ -1686,7 +1703,7 @@ pci_emul_cmdwrite(struct pci_devinst *pi break; case PCIBAR_IO: /* I/O address space decoding changed? */ - if (bits_changed(old, new, PCIM_CMD_PORTEN)) { + if (changed & PCIM_CMD_PORTEN) { if (porten(pi)) register_bar(pi, i); else @@ -1696,7 +1713,7 @@ pci_emul_cmdwrite(struct pci_devinst *pi case PCIBAR_MEM32: case PCIBAR_MEM64: /* MMIO address space decoding changed? */ - if (bits_changed(old, new, PCIM_CMD_MEMEN)) { + if (changed & PCIM_CMD_MEMEN) { if (memen(pi)) register_bar(pi, i); else @@ -1776,14 +1793,8 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, i needcfg = 1; } - if (needcfg) { - if (bytes == 1) - *eax = pci_get_cfgdata8(pi, coff); - else if (bytes == 2) - *eax = pci_get_cfgdata16(pi, coff); - else - *eax = pci_get_cfgdata32(pi, coff); - } + if (needcfg) + *eax = CFGREAD(pi, coff, bytes); pci_emul_hdrtype_fixup(bus, slot, coff, bytes, eax); } else { @@ -1853,8 +1864,8 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, i } else if (pci_emul_iscap(pi, coff)) { pci_emul_capwrite(pi, coff, bytes, *eax); - } else if (coff == PCIR_COMMAND) { - pci_emul_cmdwrite(pi, *eax, bytes); + } else if (coff >= PCIR_COMMAND && coff < PCIR_REVID) { + pci_emul_cmdsts_write(pi, coff, *eax, bytes); } else { CFGWRITE(pi, coff, *eax, bytes); } From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 20:29:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0C07437; Fri, 24 Apr 2015 20:29:36 +0000 (UTC) Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [IPv6:2607:f8b0:400e:c03::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B2D61E83; Fri, 24 Apr 2015 20:29:36 +0000 (UTC) Received: by pacyx8 with SMTP id yx8so57840152pac.1; Fri, 24 Apr 2015 13:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=mBW2CD/o6uvukK4iZJB0zmejCDUG33S0c0ZJoocUJRg=; b=VSCF9vU3/NUfKOawlWdk85KR5ldEJubAyc73hI3aXUdMbp5q7FoO6mM9Csc4OEC3Yo iY/32OBDH+ArVJ/X+/4DfbrNR4OUnRoOR+NEPtlaftO3DNETU7iwb0FfuVMrBBoyFVNB q2Ec4J1kr9k34oBc0mRIputziGaABB4DWkYobEb+Aoc15AjthZarPH9dTNnz1T7hAVGr XiCxBIc0QLDidWNaUnMdsg6zRy6UtF8JZ85/zOwbCKsoevzdK6EivP94IuA92vxkPSkW D+Cp39buqzfSTO5eCUjZJOw9KFpQSm2fkyI1ZCoEcNSF1AEboBLUKpDfK95SOiZE800E VJxQ== X-Received: by 10.66.145.133 with SMTP id su5mr339640pab.114.1429907375504; Fri, 24 Apr 2015 13:29:35 -0700 (PDT) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id fu7sm12035547pac.26.2015.04.24.13.29.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Apr 2015 13:29:34 -0700 (PDT) References: <201504241447.t3OElsmu026704@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201504241447.t3OElsmu026704@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <7CA7DCFB-65E7-49FC-9717-FFD26F12F6B9@gmail.com> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: svn commit: r281932 - head/sys/modules/oce Date: Fri, 24 Apr 2015 13:29:32 -0700 To: John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 20:29:36 -0000 > On Apr 24, 2015, at 07:47, John Baldwin wrote: > > Author: jhb > Date: Fri Apr 24 14:47:53 2015 > New Revision: 281932 > URL: https://svnweb.freebsd.org/changeset/base/281932 > > Log: > Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge > about kld filenames for network drivers that requires them to follow the > pattern of if_. This also fixes the existing documentation in the > manpage which says to use if_oce_load=YES in loader.conf. > > PR: 199095 > MFC after: 1 week Does this deserve relnotes? From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 20:35:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CABE744; Fri, 24 Apr 2015 20:35:05 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 008E31FBA; Fri, 24 Apr 2015 20:35:04 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t3OKYx76015966 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 24 Apr 2015 23:34:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t3OKYx76015966 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t3OKYxxo015965; Fri, 24 Apr 2015 23:34:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 24 Apr 2015 23:34:59 +0300 From: Konstantin Belousov To: Antoine Brodin Cc: Will Andrews , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281442 - head/sys/kern Message-ID: <20150424203459.GA2390@kib.kiev.ua> References: <201504111851.t3BIpgRS071392@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 20:35:05 -0000 On Thu, Apr 23, 2015 at 09:53:19PM +0200, Antoine Brodin wrote: > On Sat, Apr 11, 2015 at 8:51 PM, Will Andrews wrote: > > Author: will > > Date: Sat Apr 11 18:51:41 2015 > > New Revision: 281442 > > URL: https://svnweb.freebsd.org/changeset/base/281442 > > > > Log: > > uiomove_object_page(): Avoid instantiating pages in sparse regions on reads. > > > > Check whether the page being requested is either resident or on swap. If > > not, read from the zero_region instead of instantiating an unnecessary page. > > > > This avoids consuming memory for sparse files on tmpfs, when they are read > > by applications that do not use SEEK_HOLE/SEEK_DATA (which is most of them). > > > > Reviewed by: kib > > MFC after: 1 week > > Sponsored by: Spectra Logic > > Hi, > > We have a daily panic on one of the package builders: > https://reviews.freebsd.org/P60 > > Reverting this commit seems to fix the panic. I already provided the following patch to gjb. I am waiting for a confirmation to commit. diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 8410ed9..93c7ed1 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -170,7 +170,7 @@ uiomove_object_page(vm_object_t obj, size_t len, struct uio *uio) if (uio->uio_rw == UIO_READ && vm_page_lookup(obj, idx) == NULL && !vm_pager_has_page(obj, idx, NULL, NULL)) { VM_OBJECT_WUNLOCK(obj); - return (uiomove(__DECONST(void *, zero_region), len, uio)); + return (uiomove(__DECONST(void *, zero_region), tlen, uio)); } /* From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 20:40:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19813AA4; Fri, 24 Apr 2015 20:40:04 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E87F51024; Fri, 24 Apr 2015 20:40:03 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E8D97B923; Fri, 24 Apr 2015 16:40:02 -0400 (EDT) From: John Baldwin To: Garrett Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r281932 - head/sys/modules/oce Date: Fri, 24 Apr 2015 16:40:01 -0400 Message-ID: <10317438.JIgLtq45SY@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <7CA7DCFB-65E7-49FC-9717-FFD26F12F6B9@gmail.com> References: <201504241447.t3OElsmu026704@svn.freebsd.org> <7CA7DCFB-65E7-49FC-9717-FFD26F12F6B9@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 24 Apr 2015 16:40:03 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 20:40:04 -0000 On Friday, April 24, 2015 01:29:32 PM Garrett Cooper wrote: > > > On Apr 24, 2015, at 07:47, John Baldwin wrote: > > > > Author: jhb > > Date: Fri Apr 24 14:47:53 2015 > > New Revision: 281932 > > URL: https://svnweb.freebsd.org/changeset/base/281932 > > > > Log: > > Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge > > about kld filenames for network drivers that requires them to follow the > > pattern of if_. This also fixes the existing documentation in the > > manpage which says to use if_oce_load=YES in loader.conf. > > > > PR: 199095 > > MFC after: 1 week > > Does this deserve relnotes? Not sure, possibly. I guess one should err on the side of caution and note it. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 21:05:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DC4E317; Fri, 24 Apr 2015 21:05:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DA88132A; Fri, 24 Apr 2015 21:05:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OL5Tsq021175; Fri, 24 Apr 2015 21:05:29 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OL5TRS021174; Fri, 24 Apr 2015 21:05:29 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504242105.t3OL5TRS021174@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 24 Apr 2015 21:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281950 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 21:05:30 -0000 Author: ae Date: Fri Apr 24 21:05:29 2015 New Revision: 281950 URL: https://svnweb.freebsd.org/changeset/base/281950 Log: Fix possible reference leak. Sponsored by: Yandex LLC Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Fri Apr 24 20:09:52 2015 (r281949) +++ head/sys/netinet/tcp_subr.c Fri Apr 24 21:05:29 2015 (r281950) @@ -2159,6 +2159,7 @@ tcp_signature_do_compute(struct mbuf *m, break; #endif default: + KEY_FREESAV(&sav); return (-1); /* NOTREACHED */ break; From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 22:04:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9A0064C; Fri, 24 Apr 2015 22:04:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C92C819C5; Fri, 24 Apr 2015 22:04:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OM4xXd051461; Fri, 24 Apr 2015 22:04:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OM4xk1051459; Fri, 24 Apr 2015 22:04:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504242204.t3OM4xk1051459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 22:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281952 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 22:05:00 -0000 Author: emaste Date: Fri Apr 24 22:04:59 2015 New Revision: 281952 URL: https://svnweb.freebsd.org/changeset/base/281952 Log: Add LLDB to BROKEN_OPTIONS for arm prior to armv6 LLVM lacks support on FreeBSD for ARMv4/ARMv5 64-bit atomic operations. Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Apr 24 21:38:18 2015 (r281951) +++ head/share/mk/src.opts.mk Fri Apr 24 22:04:59 2015 (r281952) @@ -235,6 +235,10 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTST .if ${__T} == "aarch64" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GDB .endif +# LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 +.if ${__T} == "arm" || ${__T} == "armeb" +BROKEN_OPTIONS+=LLDB +.endif .include From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 22:05:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74873791; Fri, 24 Apr 2015 22:05:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6471119CA; Fri, 24 Apr 2015 22:05:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OM5D7Y051598; Fri, 24 Apr 2015 22:05:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OM5D3J051597; Fri, 24 Apr 2015 22:05:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504242205.t3OM5D3J051597@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 24 Apr 2015 22:05:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281953 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 22:05:13 -0000 Author: kib Date: Fri Apr 24 22:05:12 2015 New Revision: 281953 URL: https://svnweb.freebsd.org/changeset/base/281953 Log: Use correct length for sparse uiomove(). It must be the clipped to the page size, len is the total transfer length, which may be larger than zero_region. Reported and tested by: clusteradm (gjb) Sponsored by: The FreeBSD Foundation X-MFC-With: r281442 Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Fri Apr 24 22:04:59 2015 (r281952) +++ head/sys/kern/uipc_shm.c Fri Apr 24 22:05:12 2015 (r281953) @@ -170,7 +170,7 @@ uiomove_object_page(vm_object_t obj, siz if (uio->uio_rw == UIO_READ && vm_page_lookup(obj, idx) == NULL && !vm_pager_has_page(obj, idx, NULL, NULL)) { VM_OBJECT_WUNLOCK(obj); - return (uiomove(__DECONST(void *, zero_region), len, uio)); + return (uiomove(__DECONST(void *, zero_region), tlen, uio)); } /* From owner-svn-src-head@FreeBSD.ORG Fri Apr 24 23:27:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7860E809; Fri, 24 Apr 2015 23:27:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65FF81133; Fri, 24 Apr 2015 23:27:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ONRpjD092301; Fri, 24 Apr 2015 23:27:51 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ONRo2V092297; Fri, 24 Apr 2015 23:27:50 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201504242327.t3ONRo2V092297@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 24 Apr 2015 23:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281956 - in head/sys/ufs: ffs ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 23:27:51 -0000 Author: mckusick Date: Fri Apr 24 23:27:50 2015 New Revision: 281956 URL: https://svnweb.freebsd.org/changeset/base/281956 Log: Limit the number of cylinder groups that will be searched when trying to build a cluster. The limit is tunable using the sysctl vfs.ffs.maxclustersearch. The current limit is 10 cylinder groups per block allocation. It was previously limited to the number of cylinder groups in the filesystem per block allocation. When there were no clusters of the needed size left, it repeatedly searched the whole filesystem for a non-existent cluster on every block allocation. The result was very slow filesystem allocation with 100% CPU utilization. The old behavior can be had by setting vfs.ffs.maxclustersearch to a huge number (1,000,000). This change affects only the layout policy routines so is not able to interfere with the integrity of the filesystem. Reported by: Dmitry Sivachenko (demon@) Tested by: Dmitry Sivachenko (demon@) MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/inode.h Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Fri Apr 24 23:26:44 2015 (r281955) +++ head/sys/ufs/ffs/ffs_alloc.c Fri Apr 24 23:27:50 2015 (r281956) @@ -112,8 +112,7 @@ static void ffs_blkfree_trim_task(void * #ifdef INVARIANTS static int ffs_checkblk(struct inode *, ufs2_daddr_t, long); #endif -static ufs2_daddr_t ffs_clusteralloc(struct inode *, u_int, ufs2_daddr_t, int, - int); +static ufs2_daddr_t ffs_clusteralloc(struct inode *, u_int, ufs2_daddr_t, int); static ino_t ffs_dirpref(struct inode *); static ufs2_daddr_t ffs_fragextend(struct inode *, u_int, ufs2_daddr_t, int, int); @@ -460,10 +459,16 @@ nospace: SYSCTL_NODE(_vfs, OID_AUTO, ffs, CTLFLAG_RW, 0, "FFS filesystem"); static int doasyncfree = 1; -SYSCTL_INT(_vfs_ffs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, ""); +SYSCTL_INT(_vfs_ffs, OID_AUTO, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, +"do not force synchronous writes when blocks are reallocated"); static int doreallocblks = 1; -SYSCTL_INT(_vfs_ffs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, ""); +SYSCTL_INT(_vfs_ffs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, +"enable block reallocation"); + +static int maxclustersearch = 10; +SYSCTL_INT(_vfs_ffs, OID_AUTO, maxclustersearch, CTLFLAG_RW, &maxclustersearch, +0, "max number of cylinder group to search for contigous blocks"); #ifdef DEBUG static volatile int prtrealloc = 0; @@ -510,7 +515,7 @@ ffs_reallocblks_ufs1(ap) ufs1_daddr_t soff, newblk, blkno; ufs2_daddr_t pref; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; - int i, len, start_lvl, end_lvl, ssize; + int i, cg, len, start_lvl, end_lvl, ssize; vp = ap->a_vp; ip = VTOI(vp); @@ -597,18 +602,39 @@ ffs_reallocblks_ufs1(ap) ebap = (ufs1_daddr_t *)ebp->b_data; } /* - * Find the preferred location for the cluster. + * Find the preferred location for the cluster. If we have not + * previously failed at this endeavor, then follow our standard + * preference calculation. If we have failed at it, then pick up + * where we last ended our search. */ UFS_LOCK(ump); - pref = ffs_blkpref_ufs1(ip, start_lbn, soff, sbap); + if (ip->i_nextclustercg == -1) + pref = ffs_blkpref_ufs1(ip, start_lbn, soff, sbap); + else + pref = cgdata(fs, ip->i_nextclustercg); /* * Search the block map looking for an allocation of the desired size. + * To avoid wasting too much time, we limit the number of cylinder + * groups that we will search. + */ + cg = dtog(fs, pref); + for (i = min(maxclustersearch, fs->fs_ncg); i > 0; i--) { + if ((newblk = ffs_clusteralloc(ip, cg, pref, len)) != 0) + break; + cg += 1; + if (cg >= fs->fs_ncg) + cg = 0; + } + /* + * If we have failed in our search, record where we gave up for + * next time. Otherwise, fall back to our usual search citerion. */ - if ((newblk = ffs_hashalloc(ip, dtog(fs, pref), pref, - len, len, ffs_clusteralloc)) == 0) { + if (newblk == 0) { + ip->i_nextclustercg = cg; UFS_UNLOCK(ump); goto fail; } + ip->i_nextclustercg = -1; /* * We have found a new contiguous block. * @@ -737,7 +763,7 @@ ffs_reallocblks_ufs2(ap) ufs_lbn_t start_lbn, end_lbn; ufs2_daddr_t soff, newblk, blkno, pref; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; - int i, len, start_lvl, end_lvl, ssize; + int i, cg, len, start_lvl, end_lvl, ssize; vp = ap->a_vp; ip = VTOI(vp); @@ -824,18 +850,39 @@ ffs_reallocblks_ufs2(ap) ebap = (ufs2_daddr_t *)ebp->b_data; } /* - * Find the preferred location for the cluster. + * Find the preferred location for the cluster. If we have not + * previously failed at this endeavor, then follow our standard + * preference calculation. If we have failed at it, then pick up + * where we last ended our search. */ UFS_LOCK(ump); - pref = ffs_blkpref_ufs2(ip, start_lbn, soff, sbap); + if (ip->i_nextclustercg == -1) + pref = ffs_blkpref_ufs2(ip, start_lbn, soff, sbap); + else + pref = cgdata(fs, ip->i_nextclustercg); /* * Search the block map looking for an allocation of the desired size. + * To avoid wasting too much time, we limit the number of cylinder + * groups that we will search. + */ + cg = dtog(fs, pref); + for (i = min(maxclustersearch, fs->fs_ncg); i > 0; i--) { + if ((newblk = ffs_clusteralloc(ip, cg, pref, len)) != 0) + break; + cg += 1; + if (cg >= fs->fs_ncg) + cg = 0; + } + /* + * If we have failed in our search, record where we gave up for + * next time. Otherwise, fall back to our usual search citerion. */ - if ((newblk = ffs_hashalloc(ip, dtog(fs, pref), pref, - len, len, ffs_clusteralloc)) == 0) { + if (newblk == 0) { + ip->i_nextclustercg = cg; UFS_UNLOCK(ump); goto fail; } + ip->i_nextclustercg = -1; /* * We have found a new contiguous block. * @@ -1786,12 +1833,11 @@ gotit: * take the first one that we find following bpref. */ static ufs2_daddr_t -ffs_clusteralloc(ip, cg, bpref, len, unused) +ffs_clusteralloc(ip, cg, bpref, len) struct inode *ip; u_int cg; ufs2_daddr_t bpref; int len; - int unused; { struct fs *fs; struct cg *cgp; Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Apr 24 23:26:44 2015 (r281955) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Apr 24 23:27:50 2015 (r281956) @@ -1688,6 +1688,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags ip->i_dev = dev; ip->i_number = ino; ip->i_ea_refs = 0; + ip->i_nextclustercg = -1; #ifdef QUOTA { int i; Modified: head/sys/ufs/ufs/inode.h ============================================================================== --- head/sys/ufs/ufs/inode.h Fri Apr 24 23:26:44 2015 (r281955) +++ head/sys/ufs/ufs/inode.h Fri Apr 24 23:27:50 2015 (r281956) @@ -87,6 +87,8 @@ struct inode { daddr_t *snapblklist; /* Collect expunged snapshot blocks. */ } i_un; + int i_nextclustercg; /* last cg searched for cluster */ + /* * Data for extended attribute modification. */ From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 00:51:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FDED2EC; Sat, 25 Apr 2015 00:51:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 000991932; Sat, 25 Apr 2015 00:51:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P0piVc037356; Sat, 25 Apr 2015 00:51:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P0pitf037355; Sat, 25 Apr 2015 00:51:44 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504250051.t3P0pitf037355@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 25 Apr 2015 00:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281959 - head/usr.bin/whois X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 00:51:45 -0000 Author: delphij Date: Sat Apr 25 00:51:44 2015 New Revision: 281959 URL: https://svnweb.freebsd.org/changeset/base/281959 Log: Try alternate addresses more agressively. Attempt to connect to alternate addresses if the connect doesn't succeed in 180ms, and cut wait time between connection attempts in half for each additional, if no connection was established. Take the first connection to succeed and close the others. This makes whois more responsive when e.g. IPv6 service took long time or fail to respond. PR: 158125 Submitted by: Mark Andrews (with changes from me) MFC after: 2 weeks Modified: head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Sat Apr 25 00:36:43 2015 (r281958) +++ head/usr.bin/whois/whois.c Sat Apr 25 00:51:44 2015 (r281959) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. * @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -55,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #define ABUSEHOST "whois.abuse.net" #define NICHOST "whois.crsnic.net" @@ -280,21 +283,136 @@ whois(const char *query, const char *hos FILE *fp; struct addrinfo *hostres, *res; char *buf, *host, *nhost, *p; - int i, s; + int i, j, s = -1, count; size_t c, len; + struct pollfd *fds; + int timeout = 180; - s = -1; hostres = gethostinfo(hostname, 1); - for (res = hostres; res; res = res->ai_next) { - s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); + for (res = hostres, count = 0; res; res = res->ai_next) + count++; + + fds = calloc(count, sizeof(*fds)); + if (fds == NULL) + err(EX_OSERR, "calloc()"); + + /* + * Traverse the result list elements and make non-block + * connection attempts. + */ + count = i = 0; + for (res = hostres; res != NULL; res = res->ai_next) { + s = socket(res->ai_family, res->ai_socktype | SOCK_NONBLOCK, + res->ai_protocol); if (s < 0) continue; - if (connect(s, res->ai_addr, res->ai_addrlen) == 0) - break; - close(s); + if (connect(s, res->ai_addr, res->ai_addrlen) < 0) { + if (errno == EINPROGRESS) { + /* Add the socket to poll list */ + fds[i].fd = s; + fds[i].events = POLLERR | POLLHUP | + POLLIN | POLLOUT; + count++; + i++; + } else { + close(s); + s = -1; + + /* + * Poll only if we have something to poll, + * otherwise just go ahead and try next + * address + */ + if (count == 0) + continue; + } + } else + goto done; + + /* + * If we are at the last address, poll until a connection is + * established or we failed all connection attempts. + */ + if (res->ai_next == NULL) + timeout = INFTIM; + + /* + * Poll the watched descriptors for successful connections: + * if we still have more untried resolved addresses, poll only + * once; otherwise, poll until all descriptors have errors, + * which will be considered as ETIMEDOUT later. + */ + do { + int n; + + n = poll(fds, i, timeout); + if (n == 0) { + /* + * No event reported in time. Try with a + * smaller timeout (but cap at 2-3ms) + * after a new host have been added. + */ + if (timeout >= 3) + timeout <<= 1; + + break; + } else if (n < 0) { + /* + * errno here can only be EINTR which we would want + * to clean up and bail out. + */ + s = -1; + goto done; + } + + /* + * Check for the event(s) we have seen. + */ + for (j = 0; j < i; j++) { + if (fds[j].fd == -1 || fds[j].events == 0 || + fds[j].revents == 0) + continue; + if (fds[j].revents & ~(POLLIN | POLLOUT)) { + close(s); + fds[j].fd = -1; + fds[j].events = 0; + count--; + continue; + } else if (fds[j].revents & (POLLIN | POLLOUT)) { + /* Connect succeeded. */ + s = fds[j].fd; + + goto done; + } + + } + } while (timeout == INFTIM && count != 0); } + + /* All attempts were failed */ + s = -1; + if (count == 0) + errno = ETIMEDOUT; + +done: + /* Close all watched fds except the succeeded one */ + for (j = 0; j < i; j++) + if (fds[j].fd != s && fds[j].fd != -1) + close(fds[j].fd); + + if (s != -1) { + /* Restore default blocking behavior. */ + if ((flags = fcntl(s, F_GETFL)) != -1) { + flags &= ~O_NONBLOCK; + if (fcntl(s, F_SETFL, flags) == -1) + err(EX_OSERR, "fcntl()"); + } else + err(EX_OSERR, "fcntl()"); + } + + free(fds); freeaddrinfo(hostres); - if (res == NULL) + if (s == -1) err(EX_OSERR, "connect()"); fp = fdopen(s, "r+"); From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 00:52:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E15247A; Sat, 25 Apr 2015 00:52:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E3661942; Sat, 25 Apr 2015 00:52:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P0q3NT037483; Sat, 25 Apr 2015 00:52:03 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P0q28U037478; Sat, 25 Apr 2015 00:52:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201504250052.t3P0q28U037478@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 25 Apr 2015 00:52:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281960 - in head/sys: fs/nfs fs/nfsclient kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 00:52:03 -0000 Author: rmacklem Date: Sat Apr 25 00:52:01 2015 New Revision: 281960 URL: https://svnweb.freebsd.org/changeset/base/281960 Log: MAXBSIZE defines both the largest UFS block size and the largest size for a buffer in the buffer cache. This patch defines a new constant MAXBCACHEBUF, which is the largest size for a buffer in the buffer cache. Having a separate constant allows MAXBCACHEBUF to be set larger than MAXBSIZE on a per-architecture basis, so that NFS can do larger read/writes for these architectures. It modifies sys/param.h so that BKVASIZE can also be set on a per-architecture basis. A couple of cases where NFS used MAXBSIZE instead of NFS_MAXBSIZE is fixed as well. Differential Revision: https://reviews.freebsd.org/D2330 Reviewed by: mav, kib MFC after: 2 weeks Modified: head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/kern/vfs_bio.c head/sys/sys/param.h Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sat Apr 25 00:51:44 2015 (r281959) +++ head/sys/fs/nfs/nfsport.h Sat Apr 25 00:52:01 2015 (r281960) @@ -950,7 +950,7 @@ struct nfsreq { }; #ifndef NFS_MAXBSIZE -#define NFS_MAXBSIZE MAXBSIZE +#define NFS_MAXBSIZE MAXBCACHEBUF #endif /* Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sat Apr 25 00:51:44 2015 (r281959) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sat Apr 25 00:52:01 2015 (r281960) @@ -201,16 +201,16 @@ newnfs_iosize(struct nfsmount *nmp) } if (nmp->nm_rsize > maxio || nmp->nm_rsize == 0) nmp->nm_rsize = maxio; - if (nmp->nm_rsize > MAXBSIZE) - nmp->nm_rsize = MAXBSIZE; + if (nmp->nm_rsize > NFS_MAXBSIZE) + nmp->nm_rsize = NFS_MAXBSIZE; if (nmp->nm_readdirsize > maxio || nmp->nm_readdirsize == 0) nmp->nm_readdirsize = maxio; if (nmp->nm_readdirsize > nmp->nm_rsize) nmp->nm_readdirsize = nmp->nm_rsize; if (nmp->nm_wsize > maxio || nmp->nm_wsize == 0) nmp->nm_wsize = maxio; - if (nmp->nm_wsize > MAXBSIZE) - nmp->nm_wsize = MAXBSIZE; + if (nmp->nm_wsize > NFS_MAXBSIZE) + nmp->nm_wsize = NFS_MAXBSIZE; /* * Calculate the size used for io buffers. Use the larger Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat Apr 25 00:51:44 2015 (r281959) +++ head/sys/kern/vfs_bio.c Sat Apr 25 00:52:01 2015 (r281960) @@ -805,6 +805,7 @@ bufinit(void) struct buf *bp; int i; + CTASSERT(MAXBCACHEBUF >= MAXBSIZE); mtx_init(&bqclean, "bufq clean lock", NULL, MTX_DEF); mtx_init(&bqdirty, "bufq dirty lock", NULL, MTX_DEF); mtx_init(&rbreqlock, "runningbufspace lock", NULL, MTX_DEF); @@ -846,8 +847,8 @@ bufinit(void) * by the system. */ maxbufspace = (long)nbuf * BKVASIZE; - hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBSIZE * 10); - lobufspace = hibufspace - MAXBSIZE; + hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBCACHEBUF * 10); + lobufspace = hibufspace - MAXBCACHEBUF; /* * Note: The 16 MiB upper limit for hirunningspace was chosen @@ -857,9 +858,9 @@ bufinit(void) * The lower 1 MiB limit is the historical upper limit for * hirunningspace. */ - hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBSIZE), + hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBCACHEBUF), 16 * 1024 * 1024), 1024 * 1024); - lorunningspace = roundup((hirunningspace * 2) / 3, MAXBSIZE); + lorunningspace = roundup((hirunningspace * 2) / 3, MAXBCACHEBUF); /* * Limit the amount of malloc memory since it is wired permanently into @@ -3073,8 +3074,9 @@ getblk(struct vnode *vp, daddr_t blkno, KASSERT((flags & (GB_UNMAPPED | GB_KVAALLOC)) != GB_KVAALLOC, ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); ASSERT_VOP_LOCKED(vp, "getblk"); - if (size > MAXBSIZE) - panic("getblk: size(%d) > MAXBSIZE(%d)\n", size, MAXBSIZE); + if (size > MAXBCACHEBUF) + panic("getblk: size(%d) > MAXBCACHEBUF(%d)\n", size, + MAXBCACHEBUF); if (!unmapped_buf_allowed) flags &= ~(GB_UNMAPPED | GB_KVAALLOC); Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Apr 25 00:51:44 2015 (r281959) +++ head/sys/sys/param.h Sat Apr 25 00:52:01 2015 (r281960) @@ -233,10 +233,19 @@ * and may be made smaller at the risk of not being able to use * filesystems which require a block size exceeding MAXBSIZE. * + * MAXBCACHEBUF - Maximum size of a buffer in the buffer cache. This must + * be >= MAXBSIZE and can be set differently for different + * architectures by defining it in . + * Making this larger allows NFS to do larger reads/writes. + * * BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the * minimum KVM memory reservation the kernel is willing to make. * Filesystems can of course request smaller chunks. Actual * backing memory uses a chunk size of a page (PAGE_SIZE). + * The default value here can be overridden on a per-architecture + * basis by defining it in . This should + * probably be done to increase its value, when MAXBCACHEBUF is + * defined as a larger value in . * * If you make BKVASIZE too small you risk seriously fragmenting * the buffer KVM map which may slow things down a bit. If you @@ -248,7 +257,12 @@ * normal UFS filesystem. */ #define MAXBSIZE 65536 /* must be power of 2 */ +#ifndef MAXBCACHEBUF +#define MAXBCACHEBUF MAXBSIZE /* must be a power of 2 >= MAXBSIZE */ +#endif +#ifndef BKVASIZE #define BKVASIZE 16384 /* must be power of 2 */ +#endif #define BKVAMASK (BKVASIZE-1) /* From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 00:58:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24804B26; Sat, 25 Apr 2015 00:58:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 126DD1990; Sat, 25 Apr 2015 00:58:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P0wO3R038855; Sat, 25 Apr 2015 00:58:24 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P0wO6I038854; Sat, 25 Apr 2015 00:58:24 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201504250058.t3P0wO6I038854@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 25 Apr 2015 00:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281962 - head/sys/fs/nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 00:58:25 -0000 Author: rmacklem Date: Sat Apr 25 00:58:24 2015 New Revision: 281962 URL: https://svnweb.freebsd.org/changeset/base/281962 Log: Fix the NFS server's handling of a bogus NFSv2 ROOT RPC. The ROOT RPC is deprecated in the NFSv2 RFC, RFC-1094 and should never be used by a client. Tested by: thmu@freenet.de MFC after: 1 week Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdkrpc.c Sat Apr 25 00:58:19 2015 (r281961) +++ head/sys/fs/nfsserver/nfs_nfsdkrpc.c Sat Apr 25 00:58:24 2015 (r281962) @@ -117,7 +117,8 @@ nfssvc_program(struct svc_req *rqst, SVC memset(&nd, 0, sizeof(nd)); if (rqst->rq_vers == NFS_VER2) { - if (rqst->rq_proc > NFSV2PROC_STATFS) { + if (rqst->rq_proc > NFSV2PROC_STATFS || + newnfs_nfsv3_procid[rqst->rq_proc] == NFSPROC_NOOP) { svcerr_noproc(rqst); svc_freereq(rqst); goto out; From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 04:30:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33DCBE89; Sat, 25 Apr 2015 04:30:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2250A1E34; Sat, 25 Apr 2015 04:30:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P4U2gr044479; Sat, 25 Apr 2015 04:30:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P4U1FR044477; Sat, 25 Apr 2015 04:30:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250430.t3P4U1FR044477@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 04:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281966 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 04:30:02 -0000 Author: ngie Date: Sat Apr 25 04:30:01 2015 New Revision: 281966 URL: https://svnweb.freebsd.org/changeset/base/281966 Log: Add #include sys/types.h for register_t for mips MFC after: 3 days Modified: head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Sat Apr 25 01:29:40 2015 (r281965) +++ head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Sat Apr 25 04:30:01 2015 (r281966) @@ -28,6 +28,9 @@ #include __RCSID("$NetBSD"); +#ifdef __FreeBSD__ +#include +#endif #include #include #include From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 04:35:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49A5E97; Sat, 25 Apr 2015 04:35:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 388F81EF4; Sat, 25 Apr 2015 04:35:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P4ZipQ048833; Sat, 25 Apr 2015 04:35:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P4Zipv048832; Sat, 25 Apr 2015 04:35:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250435.t3P4Zipv048832@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 04:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281967 - head/lib/libc/tests/db X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 04:35:44 -0000 Author: ngie Date: Sat Apr 25 04:35:43 2015 New Revision: 281967 URL: https://svnweb.freebsd.org/changeset/base/281967 Log: Assuming a system has /bin/csh on it is a bad idea (especially it being optional on FreeBSD). Look for /bin/cat instead MFC after: 3 days Modified: head/lib/libc/tests/db/Makefile Directory Properties: head/ (props changed) Modified: head/lib/libc/tests/db/Makefile ============================================================================== --- head/lib/libc/tests/db/Makefile Sat Apr 25 04:30:01 2015 (r281966) +++ head/lib/libc/tests/db/Makefile Sat Apr 25 04:35:43 2015 (r281967) @@ -11,6 +11,7 @@ FILESDIR= ${TESTSDIR} FILES= README NETBSD_ATF_TESTS_SH+= db_test +ATF_TESTS_SH_SED_db_test= -e 's,/bin/csh,/bin/cat,g' .include "../Makefile.netbsd-tests" From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 04:58:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55C4663B; Sat, 25 Apr 2015 04:58:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 445C110DB; Sat, 25 Apr 2015 04:58:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P4w9Ci059238; Sat, 25 Apr 2015 04:58:09 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P4w9Rw059237; Sat, 25 Apr 2015 04:58:09 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201504250458.t3P4w9Rw059237@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Sat, 25 Apr 2015 04:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281970 - head/usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 04:58:09 -0000 Author: sobomax Date: Sat Apr 25 04:58:08 2015 New Revision: 281970 URL: https://svnweb.freebsd.org/changeset/base/281970 Log: o Properly init prevtime, so that we don't print bogus value in the first entry reported by the relative mode (-R). o Properly print negative offsets, which I guess may happen if records get re-ordered somehow, possibly due to the locking. Right now we report huge bogus diff (i.e. 2 seconds or so). Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Sat Apr 25 04:49:45 2015 (r281969) +++ head/usr.bin/kdump/kdump.c Sat Apr 25 04:58:08 2015 (r281970) @@ -586,6 +586,7 @@ dumpheader(struct ktr_header *kth) static char unknown[64]; static struct timeval prevtime, prevtime_e, temp; const char *type; + const char *sign; switch (kth->ktr_type) { case KTR_SYSCALL: @@ -662,10 +663,20 @@ dumpheader(struct ktr_header *kth) timevaladd(&kth->ktr_time, &prevtime_e); } if (timestamp & TIMESTAMP_RELATIVE) { + if (prevtime.tv_sec == 0) + prevtime = kth->ktr_time; temp = kth->ktr_time; timevalsub(&kth->ktr_time, &prevtime); - prevtime = temp; - printf("%jd.%06ld ", (intmax_t)kth->ktr_time.tv_sec, + if ((intmax_t)kth->ktr_time.tv_sec < 0) { + kth->ktr_time = prevtime; + prevtime = temp; + timevalsub(&kth->ktr_time, &prevtime); + sign = "-"; + } else { + prevtime = temp; + sign = ""; + } + printf("%s%jd.%06ld ", sign, (intmax_t)kth->ktr_time.tv_sec, kth->ktr_time.tv_usec); } } From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 07:07:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE804FC1; Sat, 25 Apr 2015 07:07:40 +0000 (UTC) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 807CD1C9D; Sat, 25 Apr 2015 07:07:39 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.1/8.15.1) with ESMTPS id t3P77DbL046092 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 25 Apr 2015 07:07:27 GMT (envelope-from dchagin@dchagin.static.corbina.net) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be dchagin.static.corbina.net Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.15.1/8.15.1) with ESMTPS id t3P774YH003471 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 25 Apr 2015 10:07:09 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.15.1/8.15.1/Submit) id t3P7732X003470; Sat, 25 Apr 2015 10:07:03 +0300 (MSK) (envelope-from dchagin) Date: Sat, 25 Apr 2015 10:06:58 +0300 From: Chagin Dmitry To: Chris Torek Cc: dim@FreeBSD.org, adrian@freebsd.org, scott4long@yahoo.com, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281451 - head/sys/vm Message-ID: <20150425070658.GA3442@dchagin.static.corbina.net> References: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> <201504241237.t3OCbLmd039664@elf.torek.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504241237.t3OCbLmd039664@elf.torek.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 07:07:40 -0000 On Fri, Apr 24, 2015 at 05:37:21AM -0700, Chris Torek wrote: > True, it's not actually odd, it's just surprising the first time > one comes across it. > > Also, I goofed in the text: > > >> With the flexible array, (sizeof(struct uma_cache)) is going to be > >> 32 bytes smaller than without it. > > It's `struct uma_zone` that shrinks by (potentially) more than one > would expect. (The uma_cache struct is itself 32 bytes and is not > changed, so the args.size value should be the same -- implying that > some OTHER "sizeof(struct uma_zone)" is where things are going wrong.) > vm_mem_init() called before uma init. unfortunately, we have not seen a proper info about panic from scottl -- Have fun! chd From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 07:20:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C4CA2C9; Sat, 25 Apr 2015 07:20:38 +0000 (UTC) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DDD81D6F; Sat, 25 Apr 2015 07:20:38 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.1/8.15.1) with ESMTPS id t3P7KLZp046134 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 25 Apr 2015 07:20:32 GMT (envelope-from dchagin@dchagin.static.corbina.net) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be dchagin.static.corbina.net Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.15.1/8.15.1) with ESMTPS id t3P7KKig003525 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 25 Apr 2015 10:20:20 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.15.1/8.15.1/Submit) id t3P7KK4v003524; Sat, 25 Apr 2015 10:20:20 +0300 (MSK) (envelope-from dchagin) Date: Sat, 25 Apr 2015 10:20:15 +0300 From: Chagin Dmitry To: Scott Long Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281942 - head/sys/vm Message-ID: <20150425072015.GA3506@dchagin.static.corbina.net> References: <201504241703.t3OH3rpr097920@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504241703.t3OH3rpr097920@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 07:20:38 -0000 On Fri, Apr 24, 2015 at 05:03:53PM +0000, Scott Long wrote: > Author: scottl > Date: Fri Apr 24 17:03:53 2015 > New Revision: 281942 > URL: https://svnweb.freebsd.org/changeset/base/281942 > > Log: > Revert r281451. It causes a panic/hang early in boot for a number of > users, myself included. The original code is likely papering over a > larger bug that needs to be explored, but for now get things back to > a working state. > > Obtained from: Netflix, Inc. > MFC after: immediately ouch, you're so nervous, may I ask you to revert clang3.6 import as after that my workstation panics so often that I can't do anything? please, read "dblfault panic r277611" topic in current@ )) seroiusly, you could at least show what happens. -- Have fun! chd From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 08:31:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 379257A8; Sat, 25 Apr 2015 08:31:06 +0000 (UTC) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 09436147A; Sat, 25 Apr 2015 08:31:05 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.1/8.15.1) with ESMTPS id t3P8UrX8049392 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 25 Apr 2015 08:31:01 GMT (envelope-from dchagin@dchagin.static.corbina.net) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be dchagin.static.corbina.net Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.15.1/8.15.1) with ESMTPS id t3P8UaaH003726 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 25 Apr 2015 11:30:46 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.15.1/8.15.1/Submit) id t3P8UZ1v003725; Sat, 25 Apr 2015 11:30:35 +0300 (MSK) (envelope-from dchagin) Date: Sat, 25 Apr 2015 11:30:30 +0300 From: Chagin Dmitry To: Scott Long Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281942 - head/sys/vm Message-ID: <20150425083030.GA3555@dchagin.static.corbina.net> References: <201504241703.t3OH3rpr097920@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504241703.t3OH3rpr097920@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 08:31:06 -0000 On Fri, Apr 24, 2015 at 05:03:53PM +0000, Scott Long wrote: > Author: scottl > Date: Fri Apr 24 17:03:53 2015 > New Revision: 281942 > URL: https://svnweb.freebsd.org/changeset/base/281942 > > Log: > Revert r281451. It causes a panic/hang early in boot for a number of > users, myself included. The original code is likely papering over a > larger bug that needs to be explored, but for now get things back to > a working state. > > Obtained from: Netflix, Inc. > MFC after: immediately > in my POV, at vm_mem_init stage vm_map_init() call uma_zcreate() that uses uinitialized zones (which initialized in uma_startup()). I bet zones contains garbage. I see very similar bug that appears in kern_clocksource.c:579. The per cpu et_hw_mtx contains some garbage data before mtx_init(), it seems that something corrupts the kernel memory after teh kernel is loaded. Unfortunately, I did not succeed to catch the intruder. It is strange, that hw breakpoints does not help. -- Have fun! chd From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 08:47:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7BB1A4F; Sat, 25 Apr 2015 08:47:42 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 93D6A163C; Sat, 25 Apr 2015 08:47:42 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id E33DE428126; Sat, 25 Apr 2015 18:47:33 +1000 (AEST) Date: Sat, 25 Apr 2015 18:47:32 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281966 - head/contrib/netbsd-tests/lib/libpthread In-Reply-To: <201504250430.t3P4U1FR044477@svn.freebsd.org> Message-ID: <20150425175312.T972@besplex.bde.org> References: <201504250430.t3P4U1FR044477@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=Gkr5MAAsbZnOi7l2F54A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 08:47:43 -0000 On Sat, 25 Apr 2015, Garrett Cooper wrote: > Log: > Add #include sys/types.h for register_t for mips Why not fix mips? > Modified: head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c > ============================================================================== > --- head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Sat Apr 25 01:29:40 2015 (r281965) > +++ head/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Sat Apr 25 04:30:01 2015 (r281966) > @@ -28,6 +28,9 @@ > #include > __RCSID("$NetBSD"); > > +#ifdef __FreeBSD__ > +#include > +#endif > #include > #include > #include The test detected that ucontext.h is broken on mips, but was shot instead of mips. has massive namespace pollution, but not enough to declare register_t. /usr/include/ucontext.h has its own namespace pollution, and it includes machine/ucontext.h which has massively more on some arches. i386/include/ucontext.h used to be careful about this. It used the basic type corresponding to register_t (int) to avoid any dependencies. amd64/include/ucontext.h was and is not so careful. It used and uses __register_t, so it depends on or though not on . i386 ucontext.h has been unimproved by merging with amd64. Now the basic type cannot be used, since register_t is MD and in fact varies between i386 and amd64. i386 ucontext.h uses __register_t even its own compatibility part that cannot be merged. mips is not careful about this. Its ucontext.h uses register_t. Its ucontext.h has many even larger bugs. The non-broken MD ucontext.h's don't include any _types.h file to get __register_t defined, but that is correct since it is an error to include directly except possibly in the kernel. Applications must include Nearby namespace pollution: only uc_* and ss_* are reserved in POSIX , at least in old versions, but FreeBSD has the following: - some at the . See the enclosed patch which does't really fix it. - arm: seems to be perfectly correct. It uses underscores a lot. It is just ugly to use "unsigned int" instead of something shorter. The BSD spelling u_int cannot be used in standard user headers since it would be namespace pollution. __register_t isn't really right on i386 or amd64, since this is one of the few places where unsigned types should be used. Using plain int for __register_t is just an old bug in i386 (from 386BSD?) copied to amd64. - arm64: very broken. It never uses underscores, so pollutes the following the following namespaces: gp*, gp*, mc_*. It also uses u_int, uint32_t and uint64_t. Better yet, it uses the long long abomination instead of uint64_t in some places. - mips: mc_*, sr (a field in struct __mcontext that doesn't even have an mc_ prefix), mullo, mulhi (like sr), register_t, f_register_t, int32_t, uint32_t, mcontext32_t (only mcontext_t is allowed (and required, but pollution in the mc* namespace is limited), SZREG, UCTX_REG(), UCR_*. - powerpc: mc_*, uint32_t, register_t, uint64_t (POSIX allows foo_t to be declared, but only a low quality implementation would declare it). - sparc64: uint64_t, mc_* - x86: mc_*. As well as __register_t, x86 is careful to use __uintN_t instead of uintN_t. Old changes to document and partially reduce the pollution at the top level: X Index: ucontext.h X =================================================================== X RCS file: /home/ncvs/src/sys/sys/ucontext.h,v X retrieving revision 1.11 X diff -u -2 -r1.11 ucontext.h X --- ucontext.h 9 Nov 2003 20:31:04 -0000 1.11 X +++ ucontext.h 10 Nov 2003 09:38:33 -0000 X @@ -32,5 +32,11 @@ X #define _SYS_UCONTEXT_H_ X X +#ifdef _KERNEL X +#include X +#else X +/* XXX need stack_t as well as sigset_t. */ X #include X +#endif X + X #include X POSIX requires stack_t, and in old versions didn't alow anything else from . Newer versions of POSIX tend to break things like this by allowing but not requiring all the symbols in a header like X @@ -50,6 +56,7 @@ X stack_t uc_stack; X int uc_flags; X +/* XXX namespace pollution. */ X #define UCF_SWAPPED 0x00000001 /* Used by swapcontext(3). */ X - int __spare__[4]; X + int uc_spare[4]; X } ucontext_t; X Names like UCF_SWAPPED bogotify more careful naming for _MC*. So do names the mc_*. All the underscores for __spare__ are bogus, and without a uc_ prefix it isn't clear what this field is spare for. X @@ -61,27 +68,22 @@ X struct ucontext4 *uc_link; X stack_t uc_stack; X - int __spare__[8]; X + int uc_spare[8]; X }; X -#else /* __i386__ || __alpha__ */ X +#else /* __i386__ || __alpha__ */ X #define ucontext4 ucontext X -#endif /* __i386__ || __alpha__ */ X -#endif /* _KERNEL */ X +#endif /* __i386__ || __alpha__ */ X +#endif /* _KERNEL */ X X #ifndef _KERNEL X - X __BEGIN_DECLS X - X int getcontext(ucontext_t *); X -int setcontext(const ucontext_t *); X void makecontext(ucontext_t *, void (*)(void), int, ...); X -int signalcontext(ucontext_t *, int, __sighandler_t *); X +int setcontext(const ucontext_t *); X +int signalcontext(ucontext_t *, int, void (*)(int)); X int swapcontext(ucontext_t *, const ucontext_t *); X - X __END_DECLS X X #else /* _KERNEL */ X X -struct thread; X - X /* X * Flags for get_mcontext(). The low order 4 bits (i.e a mask of 0x0f) are X @@ -91,8 +93,8 @@ X #define GET_MC_CLEAR_RET 1 X X -/* Machine-dependent functions: */ X +struct thread; X + X int get_mcontext(struct thread *, mcontext_t *, int); X int set_mcontext(struct thread *, const mcontext_t *); X - X #endif /* !_KERNEL */ X Bruce From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 13:34:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C96AA672; Sat, 25 Apr 2015 13:34:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B80F71012; Sat, 25 Apr 2015 13:34:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PDYQHN016984; Sat, 25 Apr 2015 13:34:26 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PDYQAM016983; Sat, 25 Apr 2015 13:34:26 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201504251334.t3PDYQAM016983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 25 Apr 2015 13:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281982 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 13:34:26 -0000 Author: jilles Date: Sat Apr 25 13:34:25 2015 New Revision: 281982 URL: https://svnweb.freebsd.org/changeset/base/281982 Log: sh: Pass along SIGINT from a child if job control is enabled, even when not interactive. I added the interactive check in r208881 to be safe, but in actual use (scripts in set -m mode) passing along SIGINT seems best. Discussed with: bdrewery Modified: head/bin/sh/jobs.c Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Sat Apr 25 08:14:08 2015 (r281981) +++ head/bin/sh/jobs.c Sat Apr 25 13:34:25 2015 (r281982) @@ -1057,7 +1057,7 @@ waitforjob(struct job *jp, int *origstat CLEAR_PENDING_INT; } #if JOBS - else if (rootshell && iflag && propagate_int && + else if (rootshell && propagate_int && WIFSIGNALED(status) && WTERMSIG(status) == SIGINT) kill(getpid(), SIGINT); #endif From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 15:43:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6332EBDE; Sat, 25 Apr 2015 15:43:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5239C1C12; Sat, 25 Apr 2015 15:43:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PFhD5f081456; Sat, 25 Apr 2015 15:43:13 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PFhDFZ081455; Sat, 25 Apr 2015 15:43:13 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201504251543.t3PFhDFZ081455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Sat, 25 Apr 2015 15:43:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281983 - head/sys/cddl/dev/profile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 15:43:13 -0000 Author: rwatson Date: Sat Apr 25 15:43:12 2015 New Revision: 281983 URL: https://svnweb.freebsd.org/changeset/base/281983 Log: Adjust PROF_ARTIFICIAL_FRAMES in the DTrace profile provider on ARM to skip 10, rather than 9, frames. This appears to work quite well in practice on the BeagleBone Black, so remove a comment about the value being bogus and replace it with a slightly less negative one. However, the number of frames to skip is quite sensitive to details of the timer and interrupt handling paths, so this is necessarily fragile -- but no more so than on x86. Sponsored by: DARPA, AFRL Modified: head/sys/cddl/dev/profile/profile.c Modified: head/sys/cddl/dev/profile/profile.c ============================================================================== --- head/sys/cddl/dev/profile/profile.c Sat Apr 25 13:34:25 2015 (r281982) +++ head/sys/cddl/dev/profile/profile.c Sat Apr 25 15:43:12 2015 (r281983) @@ -134,8 +134,10 @@ struct profile_probe_percpu; #endif #ifdef __arm__ -/* bogus */ -#define PROF_ARTIFICIAL_FRAMES 9 +/* + * At least on ARMv7, this appears to work quite well. + */ +#define PROF_ARTIFICIAL_FRAMES 10 #endif typedef struct profile_probe { From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 16:12:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAAF33C8; Sat, 25 Apr 2015 16:12:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF7401EF2; Sat, 25 Apr 2015 16:12:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PGC78k096100; Sat, 25 Apr 2015 16:12:07 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PGC7nF096099; Sat, 25 Apr 2015 16:12:07 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201504251612.t3PGC7nF096099@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Sat, 25 Apr 2015 16:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281984 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 16:12:08 -0000 Author: hiren Date: Sat Apr 25 16:12:06 2015 New Revision: 281984 URL: https://svnweb.freebsd.org/changeset/base/281984 Log: Currently there is no easy way to specify net.isr.maxthreads = all cpus. We need to specify exact number of cpus in loader.conf which get annoying when you have mix of machines which don't have equal number of total cpus. I propose "-1" as that value. When loader.conf has net.isr.maxthreads = -1, netisr will use all available cpus. In collaboration with: davide Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D2318 MFC after: 2 weeks Sponsored by: Limelight Networks Modified: head/sys/net/netisr.c Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Sat Apr 25 15:43:12 2015 (r281983) +++ head/sys/net/netisr.c Sat Apr 25 16:12:06 2015 (r281984) @@ -156,10 +156,13 @@ SYSCTL_PROC(_net_isr, OID_AUTO, dispatch /* * Allow the administrator to limit the number of threads (CPUs) to use for * netisr. We don't check netisr_maxthreads before creating the thread for - * CPU 0, so in practice we ignore values <= 1. This must be set at boot. - * We will create at most one thread per CPU. + * CPU 0. This must be set at boot. We will create at most one thread per CPU. + * By default we initialize this to 1 which would assign just 1 cpu (cpu0) and + * therefore only 1 workstream. If set to -1, netisr would use all cpus + * (mp_ncpus) and therefore would have those many workstreams. One workstream + * per thread (CPU). */ -static int netisr_maxthreads = -1; /* Max number of threads. */ +static int netisr_maxthreads = 1; /* Max number of threads. */ SYSCTL_INT(_net_isr, OID_AUTO, maxthreads, CTLFLAG_RDTUN, &netisr_maxthreads, 0, "Use at most this many CPUs for netisr processing"); @@ -1120,8 +1123,10 @@ netisr_init(void *arg) KASSERT(curcpu == 0, ("%s: not on CPU 0", __func__)); NETISR_LOCK_INIT(); - if (netisr_maxthreads < 1) - netisr_maxthreads = 1; + if (netisr_maxthreads == 0 || netisr_maxthreads < -1 ) + netisr_maxthreads = 1; /* default behavior */ + else if (netisr_maxthreads == -1) + netisr_maxthreads = mp_ncpus; /* use max cpus */ if (netisr_maxthreads > mp_ncpus) { printf("netisr_init: forcing maxthreads from %d to %d\n", netisr_maxthreads, mp_ncpus); From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 16:15:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E239634; Sat, 25 Apr 2015 16:15:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B0FD1F0E; Sat, 25 Apr 2015 16:15:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PGF4jp096955; Sat, 25 Apr 2015 16:15:04 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PGF2Z1096937; Sat, 25 Apr 2015 16:15:02 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <201504251615.t3PGF2Z1096937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Sat, 25 Apr 2015 16:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281985 - in head: share/man/man4 sys/dev/smbus usr.sbin/smbmsg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 16:15:04 -0000 Author: grembo (ports committer) Date: Sat Apr 25 16:15:01 2015 New Revision: 281985 URL: https://svnweb.freebsd.org/changeset/base/281985 Log: Expand SMBUS API to add smbus_trans() function. Differential Revision: https://reviews.freebsd.org/D1955 Reviewed by: adrian, jhb, wblock Approved by: adrian, jhb Modified: head/share/man/man4/smb.4 head/sys/dev/smbus/smb.c head/sys/dev/smbus/smb.h head/sys/dev/smbus/smbconf.h head/sys/dev/smbus/smbus.c head/sys/dev/smbus/smbus.h head/sys/dev/smbus/smbus_if.m head/usr.sbin/smbmsg/smbmsg.c Modified: head/share/man/man4/smb.4 ============================================================================== --- head/share/man/man4/smb.4 Sat Apr 25 16:12:06 2015 (r281984) +++ head/share/man/man4/smb.4 Sat Apr 25 16:15:01 2015 (r281985) @@ -1,5 +1,6 @@ .\" Copyright (c) 1998, Nicolas Souchu .\" Copyright (c) 2004, Joerg Wunsch +.\" Copyright (c) 2015, Michael Gmelin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2009 +.Dd April 25, 2015 .Dt SMB 4 .Os .Sh NAME @@ -49,21 +50,24 @@ as its argument. #include struct smbcmd { - char cmd; - int count; - u_char slave; + u_char cmd; + u_char reserved; + u_short op; union { - char byte; - short word; - - char *byte_ptr; - short *word_ptr; - - struct { - short sdata; - short *rdata; - } process; - } data; + char byte; + char buf[2]; + short word; + } wdata; + union { + char byte; + char buf[2]; + short word; + } rdata; + int slave; + char *wbuf; /* use wdata if NULL */ + int wcount; + char *rbuf; /* use rdata if NULL */ + int rcount; }; .Ed .Pp @@ -107,14 +111,14 @@ The command first sends the byte from the .Fa cmd field to the device, followed by the byte given in -.Fa data.byte . +.Fa wdata.byte . .It Dv SMB_WRITEW Ta The .Em WriteWord command first sends the byte from the .Fa cmd field to the device, followed by the word given in -.Fa data.word . +.Fa wdata.word . Note that the SMBus byte-order is little-endian by definition. .It Dv SMB_READB Ta The @@ -123,8 +127,8 @@ command first sends the byte from the .Fa cmd field to the device, and then reads one byte of data from the device. -The returned data will be stored in the location pointed to by -.Fa data.byte_ptr . +The returned data will be stored in +.Fa rdata.byte . .It Dv SMB_READW Ta The .Em ReadWord @@ -132,29 +136,33 @@ command first sends the byte from the .Fa cmd field to the device, and then reads one word of data from the device. -The returned data will be stored in the location pointed to by -.Fa data.word_ptr . +The returned data will be stored in +.Fa rdata.word . .It Dv SMB_PCALL Ta The .Em ProcedureCall command first sends the byte from the .Fa cmd field to the device, followed by the word provided in -.Fa data.process.sdata . +.Fa wdata.word . It then reads one word of data from the device, and returns it -in the location pointed to by -.Fa data.process.rdata . +in +.Fa rdata.word . .It Dv SMB_BWRITE Ta The .Em BlockWrite command first sends the byte from the .Fa cmd field to the device, followed by -.Fa count +.Fa wcount bytes of data that are taken from the buffer pointed to by -.Fa data.byte_ptr . +.Fa wbuf . The SMBus specification mandates that no more than 32 bytes of -data can be transferred in a single block read or write command. +data can be transferred in a single block read or write command, +but since +.Xr smbus 4 +is also used to access I2C devices, the limit has been increased +to 1024. This value is available in the constant .Dv SMB_MAXBLOCKSIZE . .It Dv SMB_BREAD Ta @@ -163,10 +171,38 @@ The command first sends the byte from the .Fa cmd field to the device, and then reads -.Fa count +.Fa rcount bytes of data that from the device. These data will be returned in the buffer pointed to by -.Fa data.byte_ptr . +.Fa rbuf . +.It Dv SMB_TRANS Ta +The +.Em Trans +command sends an SMB roll-up transaction with flags that also allow it to +be used for (mostly) I2C pass-through and with with 10-bit addresses. +This function can be used to roll up all of the above functions. +It first sends the byte from the +.Fa cmd +field to the device, followed by +.Fa wcount +bytes of data that are taken from the buffer pointed to by +.Fa wbuf , +then reads +.Fa rcount +bytes of data that from the device. +These data will be returned in the buffer pointed to by +.Fa rbuf . +.Pp +The following flags are allowed in +.Fa op : +.Pp +.Bd -literal -compact +SMB_TRANS_NOSTOP Do not send STOP at end +SMB_TRANS_NOCMD Ignore cmd field (do not tx) +SMB_TRANS_NOCNT Do not tx or rx count field +SMB_TRANS_7BIT Change address mode to 7-bit +SMB_TRANS_10BIT Change address mode to 10-bit +.Ed .El .Pp The @@ -201,4 +237,7 @@ manual page first appeared in .Sh AUTHORS This manual page was written by -.An Nicolas Souchu . +.An Nicolas Souchu +and extended by +.An Michael Gmelin Aq freebsd@grem.de +. Modified: head/sys/dev/smbus/smb.c ============================================================================== --- head/sys/dev/smbus/smb.c Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smb.c Sat Apr 25 16:15:01 2015 (r281985) @@ -26,10 +26,6 @@ * $FreeBSD$ */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_compat.h" -#endif - #include #include #include @@ -104,19 +100,24 @@ smb_identify(driver_t *driver, device_t static int smb_probe(device_t dev) { - device_set_desc(dev, "SMBus generic I/O"); + if (smbus_get_addr(dev) != -1) + return (ENXIO); - return (0); + device_set_desc(dev, "SMBus generic I/O"); + return (BUS_PROBE_NOWILDCARD); } static int smb_attach(device_t dev) { struct smb_softc *sc = device_get_softc(dev); - + int unit; + + unit = device_get_unit(dev); sc->sc_dev = dev; - sc->sc_devnode = make_dev(&smb_cdevsw, device_get_unit(dev), - UID_ROOT, GID_WHEEL, 0600, "smb%d", device_get_unit(dev)); + + sc->sc_devnode = make_dev(&smb_cdevsw, unit, UID_ROOT, GID_WHEEL, + 0600, "smb%d", unit); sc->sc_devnode->si_drv1 = sc; mtx_init(&sc->sc_lock, device_get_nameunit(dev), NULL, MTX_DEF); @@ -174,9 +175,16 @@ smbioctl(struct cdev *dev, u_long cmd, c struct smb_softc *sc = dev->si_drv1; device_t smbdev = sc->sc_dev; int error; - short w; - u_char count; - char c; + int unit; + u_char bcount; + + /* + * If a specific slave device is being used, override any passed-in + * slave. + */ + unit = dev2unit(dev); + if (unit & 0x0400) + s->slave = unit & 0x03ff; parent = device_get_parent(smbdev); @@ -208,77 +216,101 @@ smbioctl(struct cdev *dev, u_long cmd, c case SMB_WRITEB: error = smbus_error(smbus_writeb(parent, s->slave, s->cmd, - s->data.byte)); + s->wdata.byte)); break; case SMB_WRITEW: error = smbus_error(smbus_writew(parent, s->slave, - s->cmd, s->data.word)); + s->cmd, s->wdata.word)); break; case SMB_READB: - if (s->data.byte_ptr) { - error = smbus_error(smbus_readb(parent, s->slave, - s->cmd, &c)); - if (error) - break; - error = copyout(&c, s->data.byte_ptr, - sizeof(*(s->data.byte_ptr))); + error = smbus_error(smbus_readb(parent, s->slave, s->cmd, + &s->rdata.byte)); + if (error) + break; + if (s->rbuf && s->rcount >= 1) { + error = copyout(&s->rdata.byte, s->rbuf, 1); + s->rcount = 1; } break; case SMB_READW: - if (s->data.word_ptr) { - error = smbus_error(smbus_readw(parent, s->slave, - s->cmd, &w)); - if (error == 0) { - error = copyout(&w, s->data.word_ptr, - sizeof(*(s->data.word_ptr))); - } + error = smbus_error(smbus_readw(parent, s->slave, s->cmd, + &s->rdata.word)); + if (error) + break; + if (s->rbuf && s->rcount >= 2) { + buf[0] = (u_char)s->rdata.word; + buf[1] = (u_char)(s->rdata.word >> 8); + error = copyout(buf, s->rbuf, 2); + s->rcount = 2; } break; case SMB_PCALL: - if (s->data.process.rdata) { - - error = smbus_error(smbus_pcall(parent, s->slave, s->cmd, - s->data.process.sdata, &w)); - if (error) - break; - error = copyout(&w, s->data.process.rdata, - sizeof(*(s->data.process.rdata))); + error = smbus_error(smbus_pcall(parent, s->slave, s->cmd, + s->wdata.word, &s->rdata.word)); + if (error) + break; + if (s->rbuf && s->rcount >= 2) { + buf[0] = (u_char)s->rdata.word; + buf[1] = (u_char)(s->rdata.word >> 8); + error = copyout(buf, s->rbuf, 2); + s->rcount = 2; } - + break; case SMB_BWRITE: - if (s->count && s->data.byte_ptr) { - if (s->count > SMB_MAXBLOCKSIZE) - s->count = SMB_MAXBLOCKSIZE; - error = copyin(s->data.byte_ptr, buf, s->count); - if (error) - break; - error = smbus_error(smbus_bwrite(parent, s->slave, - s->cmd, s->count, buf)); + if (s->wcount < 0) { + error = EINVAL; + break; } + if (s->wcount > SMB_MAXBLOCKSIZE) + s->wcount = SMB_MAXBLOCKSIZE; + if (s->wcount) + error = copyin(s->wbuf, buf, s->wcount); + if (error) + break; + error = smbus_error(smbus_bwrite(parent, s->slave, s->cmd, + s->wcount, buf)); break; -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD6) - case SMB_OLD_BREAD: -#endif case SMB_BREAD: - if (s->count && s->data.byte_ptr) { - count = min(s->count, SMB_MAXBLOCKSIZE); - error = smbus_error(smbus_bread(parent, s->slave, - s->cmd, &count, buf)); - if (error) - break; - error = copyout(buf, s->data.byte_ptr, - min(count, s->count)); - s->count = count; + if (s->rcount < 0) { + error = EINVAL; + break; + } + if (s->rcount > SMB_MAXBLOCKSIZE) + s->rcount = SMB_MAXBLOCKSIZE; + error = smbus_error(smbus_bread(parent, s->slave, s->cmd, + &bcount, buf)); + if (error) + break; + if (s->rcount > bcount) + s->rcount = bcount; + error = copyout(buf, s->rbuf, s->rcount); + break; + + case SMB_TRANS: + if (s->rcount < 0 || s->wcount < 0) { + error = EINVAL; + break; } + if (s->rcount > SMB_MAXBLOCKSIZE) + s->rcount = SMB_MAXBLOCKSIZE; + if (s->wcount > SMB_MAXBLOCKSIZE) + s->wcount = SMB_MAXBLOCKSIZE; + if (s->wcount) + error = copyin(s->wbuf, buf, s->wcount); + if (error) + break; + error = smbus_error(smbus_trans(parent, s->slave, s->cmd, + s->op, buf, s->wcount, buf, s->rcount, &s->rcount)); + if (error == 0) + error = copyout(buf, s->rbuf, s->rcount); break; - default: error = ENOTTY; } Modified: head/sys/dev/smbus/smb.h ============================================================================== --- head/sys/dev/smbus/smb.h Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smb.h Sat Apr 25 16:15:01 2015 (r281985) @@ -32,27 +32,33 @@ #include struct smbcmd { - char cmd; - int count; - u_char slave; + u_char cmd; + u_char reserved; + u_short op; union { - char byte; - short word; - - char *byte_ptr; - short *word_ptr; - - struct { - short sdata; - short *rdata; - } process; - } data; + char byte; + char buf[2]; + short word; + } wdata; + union { + char byte; + char buf[2]; + short word; + } rdata; + int slave; + char *wbuf; /* use wdata if NULL */ + int wcount; + char *rbuf; /* use rdata if NULL */ + int rcount; }; /* * SMBus spec 2.0 says block transfers may be at most 32 bytes. + * We use SMBus for i2c as well, make the size limit something more + * reasonable. Keep in mind that a char buf array is declared on the + * kernel stack. */ -#define SMB_MAXBLOCKSIZE 32 +#define SMB_MAXBLOCKSIZE 1024 #define SMB_QUICK_WRITE _IOW('i', 1, struct smbcmd) #define SMB_QUICK_READ _IOW('i', 2, struct smbcmd) @@ -66,5 +72,6 @@ struct smbcmd { #define SMB_BWRITE _IOW('i', 10, struct smbcmd) #define SMB_OLD_BREAD _IOW('i', 11, struct smbcmd) #define SMB_BREAD _IOWR('i', 11, struct smbcmd) +#define SMB_TRANS _IOWR('i', 12, struct smbcmd) #endif Modified: head/sys/dev/smbus/smbconf.h ============================================================================== --- head/sys/dev/smbus/smbconf.h Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smbconf.h Sat Apr 25 16:15:01 2015 (r281985) @@ -68,9 +68,30 @@ #define SMB_QREAD 0x1 /* + * smbus transction op with pass-thru capabilities + * + * This smbus function is capable of doing a smbus command transaction + * (read or write), and can be flagged to not issue the 'cmd' and/or + * issue or expect a count field as well as flagged for chaining (no STOP), + * which gives it an i2c pass-through capability. + * + * NOSTOP- Caller chaining transactions, do not issue STOP + * NOCMD- Do not transmit the command field + * NOCNT- Do not transmit (wr) or expect (rd) the count field + */ +#define SMB_TRANS_NOSTOP 0x0001 /* do not send STOP at end */ +#define SMB_TRANS_NOCMD 0x0002 /* ignore cmd field (do not tx) */ +#define SMB_TRANS_NOCNT 0x0004 /* do not tx or rx count field */ +#define SMB_TRANS_7BIT 0x0008 /* change address mode to 7-bit */ +#define SMB_TRANS_10BIT 0x0010 /* change address mode to 10-bit */ +#define SMB_TRANS_NOREPORT 0x0020 /* do not report errors */ + +/* * ivars codes */ -#define SMBUS_IVAR_ADDR 0x1 /* slave address of the device */ +enum smbus_ivars { + SMBUS_IVAR_ADDR, /* slave address of the device */ +}; int smbus_request_bus(device_t, device_t, int); int smbus_release_bus(device_t, device_t); @@ -79,7 +100,12 @@ int smbus_error(int error); void smbus_intr(device_t, u_char, char low, char high, int error); -u_char smbus_get_addr(device_t); +#define SMBUS_ACCESSOR(var, ivar, type) \ + __BUS_ACCESSOR(smbus, var, SMBUS, ivar, type) + +SMBUS_ACCESSOR(addr, ADDR, int) + +#undef SMBUS_ACCESSOR extern driver_t smbus_driver; extern devclass_t smbus_devclass; @@ -104,6 +130,9 @@ extern devclass_t smbus_devclass; (SMBUS_BWRITE(device_get_parent(bus), slave, cmd, count, buf)) #define smbus_bread(bus,slave,cmd,count,buf) \ (SMBUS_BREAD(device_get_parent(bus), slave, cmd, count, buf)) +#define smbus_trans(bus,slave,cmd,op,wbuf,wcount,rbuf,rcount,actualp) \ + (SMBUS_TRANS(device_get_parent(bus), slave, cmd, op, \ + wbuf, wcount, rbuf, rcount, actualp)) #define SMBUS_MODVER 1 #define SMBUS_MINVER 1 Modified: head/sys/dev/smbus/smbus.c ============================================================================== --- head/sys/dev/smbus/smbus.c Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smbus.c Sat Apr 25 16:15:01 2015 (r281985) @@ -33,11 +33,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include +#include "smbus_if.h" +#include "bus_if.h" + + /* * Autoconfiguration and support routines for System Management bus */ @@ -49,6 +53,13 @@ static int smbus_probe(device_t); static int smbus_attach(device_t); static int smbus_detach(device_t); +static int smbus_child_location_str(device_t parent, device_t child, + char *buf, size_t buflen); +static int smbus_print_child(device_t parent, device_t child); +static void smbus_probe_device(device_t dev, u_char* addr); +static int smbus_read_ivar(device_t parent, device_t child, int which, + uintptr_t *result); + static device_method_t smbus_methods[] = { /* device interface */ DEVMETHOD(device_probe, smbus_probe), @@ -57,6 +68,10 @@ static device_method_t smbus_methods[] = /* bus interface */ DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_child_location_str, smbus_child_location_str), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + DEVMETHOD(bus_print_child, smbus_print_child), + DEVMETHOD(bus_read_ivar, smbus_read_ivar), DEVMETHOD_END }; @@ -87,9 +102,14 @@ static int smbus_attach(device_t dev) { struct smbus_softc *sc = device_get_softc(dev); + unsigned char addr; mtx_init(&sc->lock, device_get_nameunit(dev), "smbus", MTX_DEF); bus_generic_probe(dev); + for (addr = SMBUS_ADDR_MIN; addr < SMBUS_ADDR_MAX; ++addr) { + sc->addrs[addr] = addr; + smbus_probe_device(dev, &sc->addrs[addr]); + } bus_generic_attach(dev); return (0); @@ -114,4 +134,70 @@ smbus_generic_intr(device_t dev, u_char { } +static void +smbus_probe_device(device_t dev, u_char* addr) +{ + device_t child; + int error; + u_char cmd; + u_char buf[2]; + + cmd = 0x01; + error = smbus_trans(dev, *addr, cmd, + SMB_TRANS_NOCNT | SMB_TRANS_NOREPORT, + NULL, 0, buf, 1, NULL); + if (error == 0) { + if (bootverbose) + device_printf(dev, "Probed address 0x%02x\n", *addr); + child = device_add_child(dev, NULL, -1); + device_set_ivars(child, addr); + } +} + +static int +smbus_child_location_str(device_t parent, device_t child, char *buf, + size_t buflen) +{ + unsigned char *addr; + + addr = device_get_ivars(child); + if (addr) + snprintf(buf, buflen, "addr=0x%x", *addr); + else if (buflen) + buf[0] = 0; + return (0); +} + +static int +smbus_print_child(device_t parent, device_t child) +{ + unsigned char *addr; + int retval; + + addr = device_get_ivars(child); + retval = bus_print_child_header(parent, child); + if (addr) + retval += printf(" at addr 0x%x", *addr); + retval += bus_print_child_footer(parent, child); + + return (retval); +} + +static int +smbus_read_ivar(device_t parent, device_t child, int which, + uintptr_t *result) +{ + unsigned char *addr; + + addr = device_get_ivars(child); + switch (which) { + case SMBUS_IVAR_ADDR: + *result = (addr == NULL) ? -1 : *addr; + break; + default: + return (ENOENT); + } + return (0); +} + MODULE_VERSION(smbus, SMBUS_MODVER); Modified: head/sys/dev/smbus/smbus.h ============================================================================== --- head/sys/dev/smbus/smbus.h Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smbus.h Sat Apr 25 16:15:01 2015 (r281985) @@ -29,9 +29,13 @@ #ifndef __SMBUS_H #define __SMBUS_H +#define SMBUS_ADDR_MIN 0x10 +#define SMBUS_ADDR_MAX 0x70 + struct smbus_softc { device_t owner; /* smbus owner device structure */ struct mtx lock; + unsigned char addrs[SMBUS_ADDR_MAX]; }; void smbus_generic_intr(device_t dev, u_char devaddr, char low, char high, int err); Modified: head/sys/dev/smbus/smbus_if.m ============================================================================== --- head/sys/dev/smbus/smbus_if.m Sat Apr 25 16:12:06 2015 (r281984) +++ head/sys/dev/smbus/smbus_if.m Sat Apr 25 16:15:01 2015 (r281985) @@ -149,3 +149,20 @@ METHOD int bread { u_char *count; char *buf; }; + +# +# SMB roll-up transaction with flags that also allow it to be +# used for (mostly) i2c pass-through and with 10-bit addresses. +# This function can be used to roll-up all of the above functions. +# +METHOD int trans { + device_t dev; + int slave; + char cmd; + int op; + char *wbuf; + int wcount; + char *rbuf; + int rcount; + int *actualp; +}; Modified: head/usr.sbin/smbmsg/smbmsg.c ============================================================================== --- head/usr.sbin/smbmsg/smbmsg.c Sat Apr 25 16:12:06 2015 (r281984) +++ head/usr.sbin/smbmsg/smbmsg.c Sat Apr 25 16:15:01 2015 (r281985) @@ -163,7 +163,8 @@ do_io(void) } if (iflag == 1 && oflag == -1) { /* command + 1 byte input: read byte op. */ - c.data.byte_ptr = ibuf; + c.rbuf = ibuf; + c.rcount = iflag; if (ioctl(fd, SMB_READB, &c) == -1) return (-1); printf(fmt, (int)(unsigned char)ibuf[0]); @@ -171,11 +172,12 @@ do_io(void) return (0); } else if (iflag == -1 && oflag == 1) { /* command + 1 byte output: write byte op. */ - c.data.byte = obuf[0]; + c.wdata.byte = obuf[0]; return (ioctl(fd, SMB_WRITEB, &c)); } else if (wflag && iflag == 2 && oflag == -1) { /* command + 2 bytes input: read word op. */ - c.data.word_ptr = &iword; + c.rbuf = (char*) &iword; + c.rcount = iflag; if (ioctl(fd, SMB_READW, &c) == -1) return (-1); printf(fmt, (int)(unsigned short)iword); @@ -183,15 +185,16 @@ do_io(void) return (0); } else if (wflag && iflag == -1 && oflag == 2) { /* command + 2 bytes output: write word op. */ - c.data.word = oword; + c.wdata.word = oword; return (ioctl(fd, SMB_WRITEW, &c)); } else if (wflag && iflag == 2 && oflag == 2) { /* * command + 2 bytes output + 2 bytes input: * "process call" op. */ - c.data.process.sdata = oword; - c.data.process.rdata = &iword; + c.wdata.word = oword; + c.rbuf = (char*) &iword; + c.rcount = iflag; if (ioctl(fd, SMB_PCALL, &c) == -1) return (-1); printf(fmt, (int)(unsigned short)iword); @@ -199,8 +202,8 @@ do_io(void) return (0); } else if (iflag > 1 && oflag == -1) { /* command + > 1 bytes of input: block read */ - c.data.byte_ptr = ibuf; - c.count = iflag; + c.rbuf = ibuf; + c.rcount = iflag; if (ioctl(fd, SMB_BREAD, &c) == -1) return (-1); for (i = 0; i < iflag; i++) { @@ -212,8 +215,8 @@ do_io(void) return (0); } else if (iflag == -1 && oflag > 1) { /* command + > 1 bytes of output: block write */ - c.data.byte_ptr = obuf; - c.count = oflag; + c.wbuf = obuf; + c.wcount = oflag; return (ioctl(fd, SMB_BWRITE, &c)); } From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 18:17:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57AE6601; Sat, 25 Apr 2015 18:17:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0C71B3B; Sat, 25 Apr 2015 18:17:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PIH9TE060177; Sat, 25 Apr 2015 18:17:09 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PIH9In060176; Sat, 25 Apr 2015 18:17:09 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504251817.t3PIH9In060176@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 25 Apr 2015 18:17:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281986 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 18:17:09 -0000 Author: pfg Date: Sat Apr 25 18:17:08 2015 New Revision: 281986 URL: https://svnweb.freebsd.org/changeset/base/281986 Log: Cleanup a bit the clang attributes for type safety checking. Cleanup r281861 by moving the definitions to their own section but still leave the definitions out of lint. In addition to the 'argument_with_type_tag' attribute, bring 'type_tag_for_datatype' which is necessary for annotating the data types. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sat Apr 25 16:15:01 2015 (r281985) +++ head/sys/sys/cdefs.h Sat Apr 25 18:17:08 2015 (r281986) @@ -212,7 +212,6 @@ #define __unused #define __packed #define __aligned(x) -#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) #define __section(x) #define __weak #else @@ -237,12 +236,6 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif -#if __has_attribute(argument_with_type_tag) -#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ - __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) -#else -#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) -#endif #if defined(__INTEL_COMPILER) #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) @@ -776,6 +769,24 @@ #endif /* + * Type Safety Checking + * + * Clang provides additional attributes to enable checking type safety + * properties that cannot be enforced by the C type system. + */ + +#if __has_attribute(argument_with_type_tag) && \ + __has_attribute(type_tag_for_datatype) && !defined(lint) +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ + __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) +#define __datatype_type_tag(kind, type) \ + __attribute__((__type_tag_for_datatype__(kind, type))) +#else +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) +#define __datatype_type_tag(kind, type) +#endif + +/* * Lock annotations. * * Clang provides support for doing basic thread-safety tests at From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 19:02:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7A9C1FC; Sat, 25 Apr 2015 19:02:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A59791FC4; Sat, 25 Apr 2015 19:02:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PJ27PH084588; Sat, 25 Apr 2015 19:02:07 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PJ27eN084587; Sat, 25 Apr 2015 19:02:07 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201504251902.t3PJ27eN084587@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Sat, 25 Apr 2015 19:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281987 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 19:02:07 -0000 Author: tychon Date: Sat Apr 25 19:02:06 2015 New Revision: 281987 URL: https://svnweb.freebsd.org/changeset/base/281987 Log: STOS/STOSB/STOSW/STOSD/STOSQ instruction emulation. Reviewed by: neel Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Sat Apr 25 18:17:08 2015 (r281986) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Sat Apr 25 19:02:06 2015 (r281987) @@ -72,6 +72,7 @@ enum { VIE_OP_TYPE_POP, VIE_OP_TYPE_MOVS, VIE_OP_TYPE_GROUP1, + VIE_OP_TYPE_STOS, VIE_OP_TYPE_LAST }; @@ -146,6 +147,16 @@ static const struct vie_op one_byte_opco .op_type = VIE_OP_TYPE_MOVS, .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_NO_GLA_VERIFICATION }, + [0xAA] = { + .op_byte = 0xAA, + .op_type = VIE_OP_TYPE_STOS, + .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_NO_GLA_VERIFICATION + }, + [0xAB] = { + .op_byte = 0xAB, + .op_type = VIE_OP_TYPE_STOS, + .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_NO_GLA_VERIFICATION + }, [0xC6] = { /* XXX Group 11 extended opcode - not just MOV */ .op_byte = 0xC6, @@ -803,6 +814,68 @@ done: } static int +emulate_stos(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, + struct vm_guest_paging *paging, mem_region_read_t memread, + mem_region_write_t memwrite, void *arg) +{ + int error, opsize, repeat; + uint64_t val; + uint64_t rcx, rdi, rflags; + + opsize = (vie->op.op_byte == 0xAA) ? 1 : vie->opsize; + repeat = vie->repz_present | vie->repnz_present; + + if (repeat) { + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RCX, &rcx); + KASSERT(!error, ("%s: error %d getting rcx", __func__, error)); + + /* + * The count register is %rcx, %ecx or %cx depending on the + * address size of the instruction. + */ + if ((rcx & vie_size2mask(vie->addrsize)) == 0) + return (0); + } + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RAX, &val); + KASSERT(!error, ("%s: error %d getting rax", __func__, error)); + + error = memwrite(vm, vcpuid, gpa, val, opsize, arg); + if (error) + return (error); + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RDI, &rdi); + KASSERT(error == 0, ("%s: error %d getting rdi", __func__, error)); + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RFLAGS, &rflags); + KASSERT(error == 0, ("%s: error %d getting rflags", __func__, error)); + + if (rflags & PSL_D) + rdi -= opsize; + else + rdi += opsize; + + error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RDI, rdi, + vie->addrsize); + KASSERT(error == 0, ("%s: error %d updating rdi", __func__, error)); + + if (repeat) { + rcx = rcx - 1; + error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RCX, + rcx, vie->addrsize); + KASSERT(!error, ("%s: error %d updating rcx", __func__, error)); + + /* + * Repeat the instruction if the count register is not zero. + */ + if ((rcx & vie_size2mask(vie->addrsize)) != 0) + vm_restart_instruction(vm, vcpuid); + } + + return (0); +} + +static int emulate_and(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, mem_region_read_t memread, mem_region_write_t memwrite, void *arg) { @@ -1302,6 +1375,10 @@ vmm_emulate_instruction(void *vm, int vc error = emulate_movs(vm, vcpuid, gpa, vie, paging, memread, memwrite, memarg); break; + case VIE_OP_TYPE_STOS: + error = emulate_stos(vm, vcpuid, gpa, vie, paging, memread, + memwrite, memarg); + break; case VIE_OP_TYPE_AND: error = emulate_and(vm, vcpuid, gpa, vie, memread, memwrite, memarg); From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 19:34:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A28E737 for ; Sat, 25 Apr 2015 19:34:59 +0000 (UTC) Received: from nm20-vm5.bullet.mail.gq1.yahoo.com (nm20-vm5.bullet.mail.gq1.yahoo.com [98.136.217.36]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EC781268 for ; Sat, 25 Apr 2015 19:34:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429990096; bh=Auf/+jyp9UpbPtJMzlRn1FlbVXrzrd0Dy5svHeoDoMI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=NeEX4Al/6jjiFwmxrOCJsXdLGVK6HactzT9X8S4Udi/5ar8xQ4ODE4TmA5pypPxtAlkmzv2UTXmGlYPd6j+bra/e1XrgW7VM8dhBMzVvrrom1bTCguSfzZGohp3uFvvj06ySQ2Lkr/YuSgHt0r8+dZiJZH4KrjzbeXUYmx2cRfDyuhUT3qzZRjOFjvpkJMfNIgJ+6eVQe1z7/TEUFPTVaNef5yhxlhqUvjP0mayj7RzGBofMc37mKqqgsQ4vCGNhrkuf6S5NZ5idSpXqdBEYPOWdQQg4+uVCgZ+PuVz7r/n1HoZ6l2aAKP/BQgJLLyJ2nRyfEVdQDFFCTETwzrPD0g== Received: from [216.39.60.182] by nm20.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 19:28:16 -0000 Received: from [98.136.164.69] by tm18.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 19:28:15 -0000 Received: from [127.0.0.1] by smtp231.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 19:28:15 -0000 X-Yahoo-Newman-Id: 867034.69309.bm@smtp231.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: OcNdHLkVM1nkOxG5MTkJYDbjEVfoh9uksmA1QJgGoFmIlzW jIRXbcYnm5gknzhzCSlLw6b99pqJ5Icn9Kw5OUhi0UKuz3AHhT9lwyiUroGc 2uIyy_XbjKgtKVy2qzIRhhsPXseOjiene6JUnMJcRzExmg5CqeNlrCXQFhz_ r9nvvlXT0sg9eReJCGPAZL4HyKlCQebN3YMy9ztFEU8PImOp_smcg3_wMzJT F0Wfgj5DXTWqJjpwzih9y442d72QQfxfxzlEQXn1DUORAs83Wc_pNmyPfCEo cl5os3FgeiUHYo1n2_gCbsIX5fwNLrqOnDDqs7NCubqmjrfz1_D_QK6KMDF. LX7obzOUfyL8bbJpIftfbPogasHghtRlZS2dlQIQTSJHumfl9CsRcoSgBToM 3_WjSQaJlJFTyJbt_9eJ8egIPYq0PtAAwJHZs6I7swygpExBwGyK.RO3zwt0 EJ9q9.4GUj8luleF9JAYnva0g471cDzOLc_xjSyBlNo1OVxgSN7IynCrFV63 1_rn8FZMon8ioXyEWw_0K5SgLYw2lTg7W4.6rkovK X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: <20150425070658.GA3442@dchagin.static.corbina.net> Date: Sat, 25 Apr 2015 13:28:12 -0600 Cc: Chris Torek , dim@FreeBSD.org, adrian@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> References: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> <201504241237.t3OCbLmd039664@elf.torek.net> <20150425070658.GA3442@dchagin.static.corbina.net> To: Chagin Dmitry X-Mailer: Apple Mail (2.2070.6) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 19:34:59 -0000 > On Apr 25, 2015, at 1:06 AM, Chagin Dmitry wrote: > > On Fri, Apr 24, 2015 at 05:37:21AM -0700, Chris Torek wrote: >> True, it's not actually odd, it's just surprising the first time >> one comes across it. >> >> Also, I goofed in the text: >> >>>> With the flexible array, (sizeof(struct uma_cache)) is going to be >>>> 32 bytes smaller than without it. >> >> It's `struct uma_zone` that shrinks by (potentially) more than one >> would expect. (The uma_cache struct is itself 32 bytes and is not >> changed, so the args.size value should be the same -- implying that >> some OTHER "sizeof(struct uma_zone)" is where things are going wrong.) >> > vm_mem_init() called before uma init. unfortunately, we have not seen > a proper info about panic from scottl > -- > Have fun! > chd Too early in boot to get a crashdump. From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 20:04:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3D4D9C6; Sat, 25 Apr 2015 20:04:00 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 708FE154F; Sat, 25 Apr 2015 20:03:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t3PJxllw048501; Sat, 25 Apr 2015 22:59:47 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Sat, 25 Apr 2015 22:59:47 +0300 (MSK) From: Dmitry Morozovsky To: Scott Long cc: Chagin Dmitry , adrian@freebsd.org, src-committers@freebsd.org, Chris Torek , svn-src-all@freebsd.org, dim@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281451 - head/sys/vm In-Reply-To: <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> Message-ID: References: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> <201504241237.t3OCbLmd039664@elf.torek.net> <20150425070658.GA3442@dchagin.static.corbina.net> <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Sat, 25 Apr 2015 23:00:47 +0300 (MSK) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 20:04:01 -0000 On Sat, 25 Apr 2015, Scott Long via svn-src-all wrote: > >> True, it's not actually odd, it's just surprising the first time > >> one comes across it. > >> > >> Also, I goofed in the text: > >> > >>>> With the flexible array, (sizeof(struct uma_cache)) is going to be > >>>> 32 bytes smaller than without it. > >> > >> It's `struct uma_zone` that shrinks by (potentially) more than one > >> would expect. (The uma_cache struct is itself 32 bytes and is not > >> changed, so the args.size value should be the same -- implying that > >> some OTHER "sizeof(struct uma_zone)" is where things are going wrong.) > >> > > vm_mem_init() called before uma init. unfortunately, we have not seen > > a proper info about panic from scottl > Too early in boot to get a crashdump. ... and even console not set up enough to have a backtrace/some debugging printfs displayed? -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 20:10:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40015B5A for ; Sat, 25 Apr 2015 20:10:13 +0000 (UTC) Received: from nm18-vm2.bullet.mail.gq1.yahoo.com (nm18-vm2.bullet.mail.gq1.yahoo.com [98.136.217.217]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BA0F1593 for ; Sat, 25 Apr 2015 20:10:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429992606; bh=o/OdhauQ3IAV3PxXT6rybcUGYxLrZMff1fJcQk9ILhk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=H02ioIFMbrU9sugtfbsSZWwE+sfil3ZE0EI9wpG6UaR+yT2zn48CPH+/yBcY3Irrtlc4AvmQMj2oy62bapbOLF4BOHpqg1kVrh7o74RZ32btY49qnHTLodPPsejwo0E9JGWRv/NQKGXUjfIBT+EFMn4QTgCtn5My7L5anRb1CL52wZ4owuk3PS9pW2dMzVDDyMVomkSryUTZ0IqNUKRlzLjFcql1tbnuACzjCHsTLEk3wwLJ9O7FExTyxIpcccXiO2IS3WP/2gcBv65DEFGgnss9fyVvdJ7um3CmldGkBQTvkj08LT260Fy9zVvtfk/XdoFDpJ8xxPIesJyLsqZaJQ== Received: from [98.137.12.175] by nm18.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 20:10:06 -0000 Received: from [98.136.164.73] by tm14.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 20:10:06 -0000 Received: from [127.0.0.1] by smtp235.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 20:10:06 -0000 X-Yahoo-Newman-Id: 596064.53946.bm@smtp235.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: uR2x4W0VM1kFLYfG3x7KzYLfrXNqoxD0K.oQHVkOtSjirbS HJgBF3XjLVebUTdnefywWx8bG0GCItqOfTMJu.rXi14Pa7QIXcghjPUJZ8SZ VmP1BBNhv2Le6RS4f_7ycU289aaRZwQwdQE2Yz4OETIfW2gLKPhLcs.a8yMc 4n5Mu83Jrn57D2trN1l2uWNh15vxvk.L_c1b22ZpiynJqdfvRPT5zfChYx3E G.IWmKzHcbxoeb88hesL7GKVjQOggQSCMDwlgRPkbT795jJo9.psqQkFjav8 LqDU_4c4QC4g6LpporDTE4dnXkl4.vDal_Q623Unq5AkMwH6yqpxDDcxV1gl sbwKFhoktuyem6kT2CsJT2T0mCGxL43jWXbXo5supmxopYbhm.GieX1D7DeM A0fFcvLXib5NwbZaoKBYJxWasOW7u.IREYzd6PBovr_2fWYSekDZ56Kd_hN5 P2dylbqZPyZ7Tsx2qP1a8HDw3ierd77dAb0VxNRP0Fzfn3mr2gLi9cdtXgR_ zkyvjuhnoRRtD7CoNAOthEjNzVgKzhQ-- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: Date: Sat, 25 Apr 2015 14:10:03 -0600 Cc: Chagin Dmitry , adrian@freebsd.org, src-committers@freebsd.org, Chris Torek , svn-src-all@freebsd.org, dim@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1D0056BB-EC90-4560-AFDE-6143957435EE@yahoo.com> References: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> <201504241237.t3OCbLmd039664@elf.torek.net> <20150425070658.GA3442@dchagin.static.corbina.net> <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> To: Dmitry Morozovsky X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 20:10:13 -0000 > On Apr 25, 2015, at 1:59 PM, Dmitry Morozovsky wrote: >=20 > On Sat, 25 Apr 2015, Scott Long via svn-src-all wrote: >=20 >>>> True, it's not actually odd, it's just surprising the first time >>>> one comes across it. >>>>=20 >>>> Also, I goofed in the text: >>>>=20 >>>>>> With the flexible array, (sizeof(struct uma_cache)) is going to = be >>>>>> 32 bytes smaller than without it. >>>>=20 >>>> It's `struct uma_zone` that shrinks by (potentially) more than one >>>> would expect. (The uma_cache struct is itself 32 bytes and is not >>>> changed, so the args.size value should be the same -- implying that >>>> some OTHER "sizeof(struct uma_zone)" is where things are going = wrong.) >>>>=20 >>> vm_mem_init() called before uma init. unfortunately, we have not = seen >>> a proper info about panic from scottl >=20 >> Too early in boot to get a crashdump. >=20 > ... and even console not set up enough to have a backtrace/some = debugging=20 > printfs displayed? Maybe you didn=E2=80=99t see the backtrace that was printed and = included? What debugging printfs should I have predicted that you would = want? Scott From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 21:19:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CC0D581 for ; Sat, 25 Apr 2015 21:19:43 +0000 (UTC) Received: from nm8-vm2.bullet.mail.gq1.yahoo.com (nm8-vm2.bullet.mail.gq1.yahoo.com [98.136.218.225]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0767C1BDA for ; Sat, 25 Apr 2015 21:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1429996776; bh=xxiS1alm5Zbwqd83uAsCbftxT6t7NKH5j8wKLogLwgI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=nzSoOwNa022ni9qnlV299ZdXkKvhiNsZUxzkl6T9RPFdLmULWLQffyOW7KsydTYRd5XeHnE8P7uhmqvtDIMHgYIgd+0ei3aYxTW4AsHpJ/AO/O6OsRoFYkrvvvKcbbxem5zozvhJutPPVWG2iFZso92WHsm9+b6mcyVt5Mx9Mjzq+9xvfk2rHxUzHdaj1s6EQ2gT8kO3Y9ne/H9iyqXY1AHCbT7oP+DemV2jWLpPTejkM6GqsGQQlT2XhWtLX9Gi98hIKGOkzTspJHcf3x6MStXh5e4uboGlJ91j7BqPGBVDXXss855eISCloOJDOV389J6cyFkfto7Qd3R/z348dw== Received: from [98.137.12.188] by nm8.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 21:19:36 -0000 Received: from [98.136.164.64] by tm9.bullet.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 21:19:36 -0000 Received: from [127.0.0.1] by smtp226.mail.gq1.yahoo.com with NNFMP; 25 Apr 2015 21:19:36 -0000 X-Yahoo-Newman-Id: 667705.80295.bm@smtp226.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 9p3E2GgVM1ndM8nfJKxxG4zCJ.k4qw21yCcyTW4uim6kTAw sNINEydO01n5GpwVWsNTxqi9RSYSwHA1.8e3oxenHIf4LBEPOnmakuq_FvTf OUrer9UOm7Luv6huFHSPLTXD6yvRMSGJWlg08A5CyPwtBZBOKX778vuku4YC 6aJj0KnZy0j.6Atr6O6Kld1FWIJ2PZFrgfAHqC5FbwVtuO7R6WA22oMUv7du q0WeI_n.rievidMIAEfokbAfgibvM95XlEuYX_7BpFzZ9ewXubSQ6NocEyMl Awdn6blOpiNe98Pq412LsFDY9KZkNA6VyqPCe38AdFT2VRy7VPTDXzJKuWeW hf6S9ENZ3KqR6xinHVRitpz9BHq.x3IrtHRqYnxCsWxhntUFa_0Qexs.jOco wFEV5dQvwFq7PUiZtLpGZjVqhAGLxdsAXwSwfQFFZwyEdvzoQ0f7Iy2NemPY sygAH0ShX43xgfWTSX8VK9p7v3gOl5v_lwcDkePMghJhbEfjYTvvvArLzJtR DEaJShM9tq5xQrMzKd3jX3f0.1PSgGTcWZN.uoULO X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281942 - head/sys/vm From: Scott Long In-Reply-To: <20150425083030.GA3555@dchagin.static.corbina.net> Date: Sat, 25 Apr 2015 15:19:34 -0600 Cc: Scott Long , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <99BAA5F2-AF62-426A-A79D-A0466B7B5E74@yahoo.com> References: <201504241703.t3OH3rpr097920@svn.freebsd.org> <20150425083030.GA3555@dchagin.static.corbina.net> To: Chagin Dmitry X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 21:19:43 -0000 > On Apr 25, 2015, at 2:30 AM, Chagin Dmitry = wrote: >=20 > On Fri, Apr 24, 2015 at 05:03:53PM +0000, Scott Long wrote: >> Author: scottl >> Date: Fri Apr 24 17:03:53 2015 >> New Revision: 281942 >> URL: https://svnweb.freebsd.org/changeset/base/281942 >>=20 >> Log: >> Revert r281451. It causes a panic/hang early in boot for a number = of >> users, myself included. The original code is likely papering over a >> larger bug that needs to be explored, but for now get things back to >> a working state. >>=20 >> Obtained from: Netflix, Inc. >> MFC after: immediately >>=20 > in my POV, at vm_mem_init stage vm_map_init() call > uma_zcreate() that uses uinitialized zones (which initialized > in uma_startup()). I bet zones contains garbage. >=20 I don=E2=80=99t follow. vm_mem_init() is called at SI_SUB_VM sysinit, = and vm_map_init() is called much later at SI_SUB_INTRINSIC. vm_mem_init() calls = uma_startup() almost immediately, which will then call zone_ctor() on the =E2=80=9Ckegs=E2= =80=9D and =E2=80=9Czones=E2=80=9D that were allocated from bss. I don=E2=80=99t think that they=E2=80=99re = being used prior to that. The problem that I see is that both of these zones are allocated = statically, and contain no storage for the uz_cpu member when that member is declared as = a zero-length array. All other zones are created dynamically and include = space for these members. uma_startup() is initializing these zones at the right = time, before their first use, but isn=E2=80=99t giving them enough room. According to the stack trace I posted, the problem triggers in the = second call to uma_zcreate() from uma_startup(). I think what happens is that the = first call to uma_zcreate() winds up writing to the zero-length uz_cpu member of masterzone_z from inside of uma_zalloc_args(). This overwrites the = adjacent =E2=80=9Ckegs=E2=80=9D and =E2=80=9Czones=E2=80=9D pointers in the bss. = The next call to uma_zcreate() then follows a path of trying to look in the kegs, and eventually blows up. = I=E2=80=99m not entirely certain on this chain of events though as it=E2=80=99s a bit = twisty inside of uma_zcreate() and I=E2=80=99m not sure I=E2=80=99ve found a link to = where it calls uma_zalloc_args(). Scott From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 21:25:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D2DE7B8; Sat, 25 Apr 2015 21:25:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BB451CA6; Sat, 25 Apr 2015 21:25:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PLP0R6053905; Sat, 25 Apr 2015 21:25:00 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PLP0G1053904; Sat, 25 Apr 2015 21:25:00 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201504252125.t3PLP0G1053904@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 25 Apr 2015 21:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281988 - head/lib/libarchive X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 21:25:01 -0000 Author: jilles Date: Sat Apr 25 21:25:00 2015 New Revision: 281988 URL: https://svnweb.freebsd.org/changeset/base/281988 Log: libarchive: Allow setting nanosecond timestamps. Modified: head/lib/libarchive/config_freebsd.h Modified: head/lib/libarchive/config_freebsd.h ============================================================================== --- head/lib/libarchive/config_freebsd.h Sat Apr 25 19:02:06 2015 (r281987) +++ head/lib/libarchive/config_freebsd.h Sat Apr 25 21:25:00 2015 (r281988) @@ -25,6 +25,8 @@ * $FreeBSD$ */ +#include + /* FreeBSD 5.0 and later have ACL and extattr support. */ #if __FreeBSD__ > 4 #define HAVE_ACL_CREATE_ENTRY 1 @@ -220,6 +222,11 @@ #define HAVE_ZLIB_H 1 #define TIME_WITH_SYS_TIME 1 +#if __FreeBSD_version >= 1100056 +#define HAVE_FUTIMENS 1 +#define HAVE_UTIMENSAT 1 +#endif + /* FreeBSD 4 and earlier lack intmax_t/uintmax_t */ #if __FreeBSD__ < 5 #define intmax_t int64_t From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 21:43:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 149FAA2A; Sat, 25 Apr 2015 21:43:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA1F01E42; Sat, 25 Apr 2015 21:43:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PLhTso063537; Sat, 25 Apr 2015 21:43:29 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PLhTqP063536; Sat, 25 Apr 2015 21:43:29 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504252143.t3PLhTqP063536@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 25 Apr 2015 21:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281989 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 21:43:30 -0000 Author: loos Date: Sat Apr 25 21:43:29 2015 New Revision: 281989 URL: https://svnweb.freebsd.org/changeset/base/281989 Log: Make the pcf8563 RTC work on FDT systems and on interrupt based i2c controllers. Call iicbus_transfer() from the device context and not from the iicbus context. I am committing a slightly different patch, so if something break, it is probably my fault. PR: 199496 Submitted by: Juraj Lutter Modified: head/sys/dev/iicbus/pcf8563.c Modified: head/sys/dev/iicbus/pcf8563.c ============================================================================== --- head/sys/dev/iicbus/pcf8563.c Sat Apr 25 21:25:00 2015 (r281988) +++ head/sys/dev/iicbus/pcf8563.c Sat Apr 25 21:43:29 2015 (r281989) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2012 Marius Strobl + * Copyright (c) 2015 Juraj Lutter * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +32,8 @@ __FBSDID("$FreeBSD$"); * Driver for NXP PCF8563 real-time clock/calendar */ +#include "opt_platform.h" + #include #include #include @@ -41,6 +44,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef FDT +#include +#include +#include +#endif #include "clock_if.h" #include "iicbus_if.h" @@ -48,6 +56,7 @@ __FBSDID("$FreeBSD$"); #define PCF8563_NCLOCKREGS (PCF8563_R_YEAR - PCF8563_R_CS1 + 1) struct pcf8563_softc { + struct intr_config_hook enum_hook; uint32_t sc_flags; #define PCF8563_CPOL (1 << 0) /* PCF8563_R_MONTH_C means 19xx */ uint16_t sc_addr; /* PCF8563 slave address */ @@ -58,30 +67,62 @@ static device_attach_t pcf8563_attach; static device_probe_t pcf8563_probe; static clock_gettime_t pcf8563_gettime; static clock_settime_t pcf8563_settime; +static void pcf8563_start(void *); static int pcf8563_probe(device_t dev) { +#ifdef FDT + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "nxp,pcf8563") && + !ofw_bus_is_compatible(dev, "philips,pcf8563") && + !ofw_bus_is_compatible(dev, "pcf8563")) + return (ENXIO); +#endif device_set_desc(dev, "NXP PCF8563 RTC"); - return (BUS_PROBE_NOWILDCARD); + + return (BUS_PROBE_DEFAULT); } static int pcf8563_attach(device_t dev) { + struct pcf8563_softc *sc; + + sc = device_get_softc(dev); + sc->sc_addr = iicbus_get_addr(dev); + if (sc->sc_addr == 0) + sc->sc_addr = PCF8563_ADDR; + sc->sc_year0 = 1900; + sc->enum_hook.ich_func = pcf8563_start; + sc->enum_hook.ich_arg = dev; + + /* + * We have to wait until interrupts are enabled. Sometimes I2C read + * and write only works when the interrupts are available. + */ + if (config_intrhook_establish(&sc->enum_hook) != 0) + return (ENOMEM); + + return (0); +} + +static void +pcf8563_start(void *xdev) +{ + device_t dev; uint8_t reg = PCF8563_R_SECOND, val; struct iic_msg msgs[] = { { 0, IIC_M_WR, sizeof(reg), ® }, { 0, IIC_M_RD, sizeof(val), &val } }; struct pcf8563_softc *sc; - int error; + dev = (device_t)xdev; sc = device_get_softc(dev); - sc->sc_addr = iicbus_get_addr(dev); - if (sc->sc_addr == 0) - sc->sc_addr = PCF8563_ADDR; + config_intrhook_disestablish(&sc->enum_hook); /* * NB: PCF8563_R_SECOND_VL doesn't automatically clear when VDD @@ -94,18 +135,14 @@ pcf8563_attach(device_t dev) * as a side-effect. */ msgs[0].slave = msgs[1].slave = sc->sc_addr; - error = iicbus_transfer(device_get_parent(dev), msgs, sizeof(msgs) / - sizeof(*msgs)); - if (error != 0) { + if (iicbus_transfer(dev, msgs, nitems(msgs)) != 0) { device_printf(dev, "%s: cannot read RTC\n", __func__); - return (error); + return; } if ((val & PCF8563_R_SECOND_VL) != 0) device_printf(dev, "%s: battery low\n", __func__); - sc->sc_year0 = 1900; clock_register(dev, 1000000); /* 1 second resolution */ - return (0); } static int @@ -122,8 +159,7 @@ pcf8563_gettime(device_t dev, struct tim sc = device_get_softc(dev); msgs[0].slave = msgs[1].slave = sc->sc_addr; - error = iicbus_transfer(device_get_parent(dev), msgs, sizeof(msgs) / - sizeof(*msgs)); + error = iicbus_transfer(dev, msgs, nitems(msgs)); if (error != 0) { device_printf(dev, "%s: cannot read RTC\n", __func__); return (error); @@ -145,6 +181,7 @@ pcf8563_gettime(device_t dev, struct tim sc->sc_flags |= PCF8563_CPOL; } else if (ct.year < 100 + sc->sc_year0) sc->sc_flags |= PCF8563_CPOL; + return (clock_ct_to_ts(&ct, ts)); } @@ -180,10 +217,10 @@ pcf8563_settime(device_t dev, struct tim val[PCF8563_R_MONTH] |= PCF8563_R_MONTH_C; msgs[0].slave = sc->sc_addr; - error = iicbus_transfer(device_get_parent(dev), msgs, sizeof(msgs) / - sizeof(*msgs)); + error = iicbus_transfer(dev, msgs, nitems(msgs)); if (error != 0) device_printf(dev, "%s: cannot write RTC\n", __func__); + return (error); } From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 22:42:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF5CAE97; Sat, 25 Apr 2015 22:42:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDA3C1320; Sat, 25 Apr 2015 22:42:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3PMg4kO093283; Sat, 25 Apr 2015 22:42:04 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3PMg4Mv093281; Sat, 25 Apr 2015 22:42:04 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504252242.t3PMg4Mv093281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 25 Apr 2015 22:42:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281991 - in head/sys/arm: allwinner broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 22:42:04 -0000 Author: loos Date: Sat Apr 25 22:42:03 2015 New Revision: 281991 URL: https://svnweb.freebsd.org/changeset/base/281991 Log: Set ARM_L2_PIPT for A10 and RPI2, they are probably missing by accident. Noted by: Michal Meloun Modified: head/sys/arm/allwinner/std.a10 head/sys/arm/broadcom/bcm2835/std.bcm2836 Modified: head/sys/arm/allwinner/std.a10 ============================================================================== --- head/sys/arm/allwinner/std.a10 Sat Apr 25 22:05:48 2015 (r281990) +++ head/sys/arm/allwinner/std.a10 Sat Apr 25 22:42:03 2015 (r281991) @@ -17,5 +17,7 @@ options KERNPHYSADDR=0x40200000 makeoptions KERNVIRTADDR=0xc0200000 options KERNVIRTADDR=0xc0200000 +options ARM_L2_PIPT + files "../allwinner/files.allwinner" files "../allwinner/files.a10" Modified: head/sys/arm/broadcom/bcm2835/std.bcm2836 ============================================================================== --- head/sys/arm/broadcom/bcm2835/std.bcm2836 Sat Apr 25 22:05:48 2015 (r281990) +++ head/sys/arm/broadcom/bcm2835/std.bcm2836 Sat Apr 25 22:42:03 2015 (r281991) @@ -5,6 +5,8 @@ cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" options SOC_BCM2836 +options ARM_L2_PIPT + files "../broadcom/bcm2835/files.bcm2836" files "../broadcom/bcm2835/files.bcm283x"